import { defineComponent as Hp, inject as qp, onMounted as Gp, openBlock as Yp, createElementBlock as Wp, normalizeClass as Zp, unref as Xp, createElementVNode as Jp } from "../vue.esm-browser.prod.js";
import { c as Vi, g as Kp, v as Qp } from "./index.6a15f04e.es.js";
function $c(Yl) {
  throw new Error('Could not dynamically require "' + Yl + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var fh = { exports: {} };
(function(Yl, Zs) {
  (function(v) {
    Yl.exports = v();
  })(function() {
    return function v(Q, $, m) {
      function g(e, r) {
        if (!$[e]) {
          if (!Q[e]) {
            var n = typeof $c == "function" && $c;
            if (!r && n)
              return n(e, !0);
            if (k)
              return k(e, !0);
            var s = new Error("Cannot find module '" + e + "'");
            throw s.code = "MODULE_NOT_FOUND", s;
          }
          var t = $[e] = { exports: {} };
          Q[e][0].call(t.exports, function(d) {
            return g(Q[e][1][d] || d);
          }, t, t.exports, v, Q, $, m);
        }
        return $[e].exports;
      }
      for (var k = typeof $c == "function" && $c, x = 0; x < m.length; x++)
        g(m[x]);
      return g;
    }({ 1: [function(v, Q, $) {
      var m = v("../src/lib"), g = { "X,X div": 'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;', "X input,X button": 'font-family:"Open Sans",verdana,arial,sans-serif;', "X input:focus,X button:focus": "outline:none;", "X a": "text-decoration:none;", "X a:hover": "text-decoration:none;", "X .crisp": "shape-rendering:crispEdges;", "X .user-select-none": "-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;", "X svg": "overflow:hidden;", "X svg a": "fill:#447adb;", "X svg a:hover": "fill:#3c6dc5;", "X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;", "X .main-svg .draglayer": "pointer-events:all;", "X .cursor-default": "cursor:default;", "X .cursor-pointer": "cursor:pointer;", "X .cursor-crosshair": "cursor:crosshair;", "X .cursor-move": "cursor:move;", "X .cursor-col-resize": "cursor:col-resize;", "X .cursor-row-resize": "cursor:row-resize;", "X .cursor-ns-resize": "cursor:ns-resize;", "X .cursor-ew-resize": "cursor:ew-resize;", "X .cursor-sw-resize": "cursor:sw-resize;", "X .cursor-s-resize": "cursor:s-resize;", "X .cursor-se-resize": "cursor:se-resize;", "X .cursor-w-resize": "cursor:w-resize;", "X .cursor-e-resize": "cursor:e-resize;", "X .cursor-nw-resize": "cursor:nw-resize;", "X .cursor-n-resize": "cursor:n-resize;", "X .cursor-ne-resize": "cursor:ne-resize;", "X .cursor-grab": "cursor:-webkit-grab;cursor:grab;", "X .modebar": "position:absolute;top:2px;right:2px;", "X .ease-bg": "-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;", "X .modebar--hover>:not(.watermark)": "opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;", "X:hover .modebar--hover .modebar-group": "opacity:1;", "X .modebar-group": "float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;", "X .modebar-btn": "position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;", "X .modebar-btn svg": "position:relative;top:2px;", "X .modebar.vertical": "display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;", "X .modebar.vertical svg": "top:-1px;", "X .modebar.vertical .modebar-group": "display:block;float:none;padding-left:0px;padding-bottom:8px;", "X .modebar.vertical .modebar-group .modebar-btn": "display:block;text-align:center;", "X [data-title]:before,X [data-title]:after": "position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;", "X [data-title]:hover:before,X [data-title]:hover:after": "display:block;opacity:1;", "X [data-title]:before": 'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;', "X [data-title]:after": "content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;", "X .vertical [data-title]:before,X .vertical [data-title]:after": "top:0%;right:200%;", "X .vertical [data-title]:before": "border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;", Y: 'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;', "Y p": "margin:0;", "Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;", "Y .notifier-close": "color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;", "Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;" };
      for (var k in g) {
        var x = k.replace(/^,/, " ,").replace(/X/g, ".js-plotly-plot .plotly").replace(/Y/g, ".plotly-notifier");
        m.addStyleRule(x, g[k]);
      }
    }, { "../src/lib": 515 }], 2: [function(v, Q, $) {
      Q.exports = v("../src/transforms/aggregate");
    }, { "../src/transforms/aggregate": 1127 }], 3: [function(v, Q, $) {
      Q.exports = v("../src/traces/bar");
    }, { "../src/traces/bar": 665 }], 4: [function(v, Q, $) {
      Q.exports = v("../src/traces/barpolar");
    }, { "../src/traces/barpolar": 678 }], 5: [function(v, Q, $) {
      Q.exports = v("../src/traces/box");
    }, { "../src/traces/box": 688 }], 6: [function(v, Q, $) {
      Q.exports = v("../src/components/calendars");
    }, { "../src/components/calendars": 365 }], 7: [function(v, Q, $) {
      Q.exports = v("../src/traces/candlestick");
    }, { "../src/traces/candlestick": 697 }], 8: [function(v, Q, $) {
      Q.exports = v("../src/traces/carpet");
    }, { "../src/traces/carpet": 716 }], 9: [function(v, Q, $) {
      Q.exports = v("../src/traces/choropleth");
    }, { "../src/traces/choropleth": 730 }], 10: [function(v, Q, $) {
      Q.exports = v("../src/traces/choroplethmapbox");
    }, { "../src/traces/choroplethmapbox": 737 }], 11: [function(v, Q, $) {
      Q.exports = v("../src/traces/cone");
    }, { "../src/traces/cone": 743 }], 12: [function(v, Q, $) {
      Q.exports = v("../src/traces/contour");
    }, { "../src/traces/contour": 758 }], 13: [function(v, Q, $) {
      Q.exports = v("../src/traces/contourcarpet");
    }, { "../src/traces/contourcarpet": 769 }], 14: [function(v, Q, $) {
      Q.exports = v("../src/core");
    }, { "../src/core": 493 }], 15: [function(v, Q, $) {
      Q.exports = v("../src/traces/densitymapbox");
    }, { "../src/traces/densitymapbox": 777 }], 16: [function(v, Q, $) {
      Q.exports = v("../src/transforms/filter");
    }, { "../src/transforms/filter": 1128 }], 17: [function(v, Q, $) {
      Q.exports = v("../src/traces/funnel");
    }, { "../src/traces/funnel": 787 }], 18: [function(v, Q, $) {
      Q.exports = v("../src/traces/funnelarea");
    }, { "../src/traces/funnelarea": 796 }], 19: [function(v, Q, $) {
      Q.exports = v("../src/transforms/groupby");
    }, { "../src/transforms/groupby": 1129 }], 20: [function(v, Q, $) {
      Q.exports = v("../src/traces/heatmap");
    }, { "../src/traces/heatmap": 809 }], 21: [function(v, Q, $) {
      Q.exports = v("../src/traces/heatmapgl");
    }, { "../src/traces/heatmapgl": 820 }], 22: [function(v, Q, $) {
      Q.exports = v("../src/traces/histogram");
    }, { "../src/traces/histogram": 832 }], 23: [function(v, Q, $) {
      Q.exports = v("../src/traces/histogram2d");
    }, { "../src/traces/histogram2d": 838 }], 24: [function(v, Q, $) {
      Q.exports = v("../src/traces/histogram2dcontour");
    }, { "../src/traces/histogram2dcontour": 842 }], 25: [function(v, Q, $) {
      Q.exports = v("../src/traces/icicle");
    }, { "../src/traces/icicle": 848 }], 26: [function(v, Q, $) {
      Q.exports = v("../src/traces/image");
    }, { "../src/traces/image": 861 }], 27: [function(v, Q, $) {
      var m = v("./core");
      m.register([v("./bar"), v("./box"), v("./heatmap"), v("./histogram"), v("./histogram2d"), v("./histogram2dcontour"), v("./contour"), v("./scatterternary"), v("./violin"), v("./funnel"), v("./waterfall"), v("./image"), v("./pie"), v("./sunburst"), v("./treemap"), v("./icicle"), v("./funnelarea"), v("./scatter3d"), v("./surface"), v("./isosurface"), v("./volume"), v("./mesh3d"), v("./cone"), v("./streamtube"), v("./scattergeo"), v("./choropleth"), v("./scattergl"), v("./splom"), v("./pointcloud"), v("./heatmapgl"), v("./parcoords"), v("./parcats"), v("./scattermapbox"), v("./choroplethmapbox"), v("./densitymapbox"), v("./sankey"), v("./indicator"), v("./table"), v("./carpet"), v("./scattercarpet"), v("./contourcarpet"), v("./ohlc"), v("./candlestick"), v("./scatterpolar"), v("./scatterpolargl"), v("./barpolar"), v("./scattersmith"), v("./aggregate"), v("./filter"), v("./groupby"), v("./sort"), v("./calendars")]), Q.exports = m;
    }, { "./aggregate": 2, "./bar": 3, "./barpolar": 4, "./box": 5, "./calendars": 6, "./candlestick": 7, "./carpet": 8, "./choropleth": 9, "./choroplethmapbox": 10, "./cone": 11, "./contour": 12, "./contourcarpet": 13, "./core": 14, "./densitymapbox": 15, "./filter": 16, "./funnel": 17, "./funnelarea": 18, "./groupby": 19, "./heatmap": 20, "./heatmapgl": 21, "./histogram": 22, "./histogram2d": 23, "./histogram2dcontour": 24, "./icicle": 25, "./image": 26, "./indicator": 28, "./isosurface": 29, "./mesh3d": 30, "./ohlc": 31, "./parcats": 32, "./parcoords": 33, "./pie": 34, "./pointcloud": 35, "./sankey": 36, "./scatter3d": 37, "./scattercarpet": 38, "./scattergeo": 39, "./scattergl": 40, "./scattermapbox": 41, "./scatterpolar": 42, "./scatterpolargl": 43, "./scattersmith": 44, "./scatterternary": 45, "./sort": 46, "./splom": 47, "./streamtube": 48, "./sunburst": 49, "./surface": 50, "./table": 51, "./treemap": 52, "./violin": 53, "./volume": 54, "./waterfall": 55 }], 28: [function(v, Q, $) {
      Q.exports = v("../src/traces/indicator");
    }, { "../src/traces/indicator": 869 }], 29: [function(v, Q, $) {
      Q.exports = v("../src/traces/isosurface");
    }, { "../src/traces/isosurface": 875 }], 30: [function(v, Q, $) {
      Q.exports = v("../src/traces/mesh3d");
    }, { "../src/traces/mesh3d": 880 }], 31: [function(v, Q, $) {
      Q.exports = v("../src/traces/ohlc");
    }, { "../src/traces/ohlc": 885 }], 32: [function(v, Q, $) {
      Q.exports = v("../src/traces/parcats");
    }, { "../src/traces/parcats": 894 }], 33: [function(v, Q, $) {
      Q.exports = v("../src/traces/parcoords");
    }, { "../src/traces/parcoords": 905 }], 34: [function(v, Q, $) {
      Q.exports = v("../src/traces/pie");
    }, { "../src/traces/pie": 916 }], 35: [function(v, Q, $) {
      Q.exports = v("../src/traces/pointcloud");
    }, { "../src/traces/pointcloud": 925 }], 36: [function(v, Q, $) {
      Q.exports = v("../src/traces/sankey");
    }, { "../src/traces/sankey": 931 }], 37: [function(v, Q, $) {
      Q.exports = v("../src/traces/scatter3d");
    }, { "../src/traces/scatter3d": 969 }], 38: [function(v, Q, $) {
      Q.exports = v("../src/traces/scattercarpet");
    }, { "../src/traces/scattercarpet": 976 }], 39: [function(v, Q, $) {
      Q.exports = v("../src/traces/scattergeo");
    }, { "../src/traces/scattergeo": 984 }], 40: [function(v, Q, $) {
      Q.exports = v("../src/traces/scattergl");
    }, { "../src/traces/scattergl": 998 }], 41: [function(v, Q, $) {
      Q.exports = v("../src/traces/scattermapbox");
    }, { "../src/traces/scattermapbox": 1008 }], 42: [function(v, Q, $) {
      Q.exports = v("../src/traces/scatterpolar");
    }, { "../src/traces/scatterpolar": 1016 }], 43: [function(v, Q, $) {
      Q.exports = v("../src/traces/scatterpolargl");
    }, { "../src/traces/scatterpolargl": 1024 }], 44: [function(v, Q, $) {
      Q.exports = v("../src/traces/scattersmith");
    }, { "../src/traces/scattersmith": 1031 }], 45: [function(v, Q, $) {
      Q.exports = v("../src/traces/scatterternary");
    }, { "../src/traces/scatterternary": 1039 }], 46: [function(v, Q, $) {
      Q.exports = v("../src/transforms/sort");
    }, { "../src/transforms/sort": 1131 }], 47: [function(v, Q, $) {
      Q.exports = v("../src/traces/splom");
    }, { "../src/traces/splom": 1049 }], 48: [function(v, Q, $) {
      Q.exports = v("../src/traces/streamtube");
    }, { "../src/traces/streamtube": 1057 }], 49: [function(v, Q, $) {
      Q.exports = v("../src/traces/sunburst");
    }, { "../src/traces/sunburst": 1065 }], 50: [function(v, Q, $) {
      Q.exports = v("../src/traces/surface");
    }, { "../src/traces/surface": 1074 }], 51: [function(v, Q, $) {
      Q.exports = v("../src/traces/table");
    }, { "../src/traces/table": 1082 }], 52: [function(v, Q, $) {
      Q.exports = v("../src/traces/treemap");
    }, { "../src/traces/treemap": 1093 }], 53: [function(v, Q, $) {
      Q.exports = v("../src/traces/violin");
    }, { "../src/traces/violin": 1106 }], 54: [function(v, Q, $) {
      Q.exports = v("../src/traces/volume");
    }, { "../src/traces/volume": 1114 }], 55: [function(v, Q, $) {
      Q.exports = v("../src/traces/waterfall");
    }, { "../src/traces/waterfall": 1122 }], 56: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-array"), v("d3-collection"), v("d3-shape"), v("elementary-circuits-directed-graph")) : g(m.d3 = m.d3 || {}, m.d3, m.d3, m.d3, null);
      })(this, function(m, g, k, x, e) {
        function r(te) {
          return te.target.depth;
        }
        function n(te, ie) {
          return te.sourceLinks.length ? te.depth : ie - 1;
        }
        function s(te) {
          return function() {
            return te;
          };
        }
        e = e && e.hasOwnProperty("default") ? e.default : e;
        var t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(te) {
          return typeof te;
        } : function(te) {
          return te && typeof Symbol == "function" && te.constructor === Symbol && te !== Symbol.prototype ? "symbol" : typeof te;
        };
        function d(te, ie) {
          return o(te.source, ie.source) || te.index - ie.index;
        }
        function u(te, ie) {
          return o(te.target, ie.target) || te.index - ie.index;
        }
        function o(te, ie) {
          return te.partOfCycle === ie.partOfCycle ? te.y0 - ie.y0 : te.circularLinkType === "top" || ie.circularLinkType === "bottom" ? -1 : 1;
        }
        function h(te) {
          return te.value;
        }
        function l(te) {
          return (te.y0 + te.y1) / 2;
        }
        function i(te) {
          return l(te.source);
        }
        function p(te) {
          return l(te.target);
        }
        function c(te) {
          return te.index;
        }
        function a(te) {
          return te.nodes;
        }
        function y(te) {
          return te.links;
        }
        function f(te, ie) {
          var le = te.get(ie);
          if (!le)
            throw new Error("missing: " + ie);
          return le;
        }
        function _(te, ie) {
          return ie(te);
        }
        function b(te, ie, le) {
          var oe = 0;
          if (le === null) {
            for (var ve = [], ue = 0; ue < te.links.length; ue++) {
              var ye = te.links[ue], Ae = ye.source.index, pe = ye.target.index;
              ve[Ae] || (ve[Ae] = []), ve[pe] || (ve[pe] = []), ve[Ae].indexOf(pe) === -1 && ve[Ae].push(pe);
            }
            var ge = e(ve);
            ge.sort(function(de, Te) {
              return de.length - Te.length;
            });
            var we = {};
            for (ue = 0; ue < ge.length; ue++) {
              var se = ge[ue].slice(-2);
              we[se[0]] || (we[se[0]] = {}), we[se[0]][se[1]] = !0;
            }
            te.links.forEach(function(de) {
              var Te = de.target.index, Ee = de.source.index;
              Te === Ee || we[Ee] && we[Ee][Te] ? (de.circular = !0, de.circularLinkID = oe, oe += 1) : de.circular = !1;
            });
          } else
            te.links.forEach(function(de) {
              de.source[le] < de.target[le] ? de.circular = !1 : (de.circular = !0, de.circularLinkID = oe, oe += 1);
            });
        }
        function w(te, ie) {
          var le = 0, oe = 0;
          te.links.forEach(function(ve) {
            ve.circular && (ve.source.circularLinkType || ve.target.circularLinkType ? ve.circularLinkType = ve.source.circularLinkType ? ve.source.circularLinkType : ve.target.circularLinkType : ve.circularLinkType = le < oe ? "top" : "bottom", ve.circularLinkType == "top" ? le += 1 : oe += 1, te.nodes.forEach(function(ue) {
              _(ue, ie) != _(ve.source, ie) && _(ue, ie) != _(ve.target, ie) || (ue.circularLinkType = ve.circularLinkType);
            }));
          }), te.links.forEach(function(ve) {
            ve.circular && (ve.source.circularLinkType == ve.target.circularLinkType && (ve.circularLinkType = ve.source.circularLinkType), K(ve, ie) && (ve.circularLinkType = ve.source.circularLinkType));
          });
        }
        function T(te) {
          var ie = Math.abs(te.y1 - te.y0), le = Math.abs(te.target.x0 - te.source.x1);
          return Math.atan(le / ie);
        }
        function L(te, ie) {
          var le = 0;
          te.sourceLinks.forEach(function(ve) {
            le = ve.circular && !K(ve, ie) ? le + 1 : le;
          });
          var oe = 0;
          return te.targetLinks.forEach(function(ve) {
            oe = ve.circular && !K(ve, ie) ? oe + 1 : oe;
          }), le + oe;
        }
        function A(te) {
          var ie = te.source.sourceLinks, le = 0;
          ie.forEach(function(ue) {
            le = ue.circular ? le + 1 : le;
          });
          var oe = te.target.targetLinks, ve = 0;
          return oe.forEach(function(ue) {
            ve = ue.circular ? ve + 1 : ve;
          }), !(le > 1 || ve > 1);
        }
        function I(te, ie, le) {
          return te.sort(S), te.forEach(function(oe, ve) {
            var ue, ye, Ae = 0;
            if (K(oe, le) && A(oe))
              oe.circularPathData.verticalBuffer = Ae + oe.width / 2;
            else {
              for (var pe = 0; pe < ve; pe++)
                if (ue = te[ve], ye = te[pe], !(ue.source.column < ye.target.column || ue.target.column > ye.source.column)) {
                  var ge = te[pe].circularPathData.verticalBuffer + te[pe].width / 2 + ie;
                  Ae = ge > Ae ? ge : Ae;
                }
              oe.circularPathData.verticalBuffer = Ae + oe.width / 2;
            }
          }), te;
        }
        function P(te, ie, le, oe) {
          var ve = g.min(te.links, function(ue) {
            return ue.source.y0;
          });
          te.links.forEach(function(ue) {
            ue.circular && (ue.circularPathData = {});
          }), I(te.links.filter(function(ue) {
            return ue.circularLinkType == "top";
          }), ie, oe), I(te.links.filter(function(ue) {
            return ue.circularLinkType == "bottom";
          }), ie, oe), te.links.forEach(function(ue) {
            if (ue.circular) {
              if (ue.circularPathData.arcRadius = ue.width + 10, ue.circularPathData.leftNodeBuffer = 5, ue.circularPathData.rightNodeBuffer = 5, ue.circularPathData.sourceWidth = ue.source.x1 - ue.source.x0, ue.circularPathData.sourceX = ue.source.x0 + ue.circularPathData.sourceWidth, ue.circularPathData.targetX = ue.target.x0, ue.circularPathData.sourceY = ue.y0, ue.circularPathData.targetY = ue.y1, K(ue, oe) && A(ue))
                ue.circularPathData.leftSmallArcRadius = 10 + ue.width / 2, ue.circularPathData.leftLargeArcRadius = 10 + ue.width / 2, ue.circularPathData.rightSmallArcRadius = 10 + ue.width / 2, ue.circularPathData.rightLargeArcRadius = 10 + ue.width / 2, ue.circularLinkType == "bottom" ? (ue.circularPathData.verticalFullExtent = ue.source.y1 + 25 + ue.circularPathData.verticalBuffer, ue.circularPathData.verticalLeftInnerExtent = ue.circularPathData.verticalFullExtent - ue.circularPathData.leftLargeArcRadius, ue.circularPathData.verticalRightInnerExtent = ue.circularPathData.verticalFullExtent - ue.circularPathData.rightLargeArcRadius) : (ue.circularPathData.verticalFullExtent = ue.source.y0 - 25 - ue.circularPathData.verticalBuffer, ue.circularPathData.verticalLeftInnerExtent = ue.circularPathData.verticalFullExtent + ue.circularPathData.leftLargeArcRadius, ue.circularPathData.verticalRightInnerExtent = ue.circularPathData.verticalFullExtent + ue.circularPathData.rightLargeArcRadius);
              else {
                var ye = ue.source.column, Ae = ue.circularLinkType, pe = te.links.filter(function(se) {
                  return se.source.column == ye && se.circularLinkType == Ae;
                });
                ue.circularLinkType == "bottom" ? pe.sort(R) : pe.sort(E);
                var ge = 0;
                pe.forEach(function(se, de) {
                  se.circularLinkID == ue.circularLinkID && (ue.circularPathData.leftSmallArcRadius = 10 + ue.width / 2 + ge, ue.circularPathData.leftLargeArcRadius = 10 + ue.width / 2 + de * ie + ge), ge += se.width;
                }), ye = ue.target.column, pe = te.links.filter(function(se) {
                  return se.target.column == ye && se.circularLinkType == Ae;
                }), ue.circularLinkType == "bottom" ? pe.sort(j) : pe.sort(z), ge = 0, pe.forEach(function(se, de) {
                  se.circularLinkID == ue.circularLinkID && (ue.circularPathData.rightSmallArcRadius = 10 + ue.width / 2 + ge, ue.circularPathData.rightLargeArcRadius = 10 + ue.width / 2 + de * ie + ge), ge += se.width;
                }), ue.circularLinkType == "bottom" ? (ue.circularPathData.verticalFullExtent = Math.max(le, ue.source.y1, ue.target.y1) + 25 + ue.circularPathData.verticalBuffer, ue.circularPathData.verticalLeftInnerExtent = ue.circularPathData.verticalFullExtent - ue.circularPathData.leftLargeArcRadius, ue.circularPathData.verticalRightInnerExtent = ue.circularPathData.verticalFullExtent - ue.circularPathData.rightLargeArcRadius) : (ue.circularPathData.verticalFullExtent = ve - 25 - ue.circularPathData.verticalBuffer, ue.circularPathData.verticalLeftInnerExtent = ue.circularPathData.verticalFullExtent + ue.circularPathData.leftLargeArcRadius, ue.circularPathData.verticalRightInnerExtent = ue.circularPathData.verticalFullExtent + ue.circularPathData.rightLargeArcRadius);
              }
              ue.circularPathData.leftInnerExtent = ue.circularPathData.sourceX + ue.circularPathData.leftNodeBuffer, ue.circularPathData.rightInnerExtent = ue.circularPathData.targetX - ue.circularPathData.rightNodeBuffer, ue.circularPathData.leftFullExtent = ue.circularPathData.sourceX + ue.circularPathData.leftLargeArcRadius + ue.circularPathData.leftNodeBuffer, ue.circularPathData.rightFullExtent = ue.circularPathData.targetX - ue.circularPathData.rightLargeArcRadius - ue.circularPathData.rightNodeBuffer;
            }
            if (ue.circular)
              ue.path = function(se) {
                var de = "";
                return de = se.circularLinkType == "top" ? "M" + se.circularPathData.sourceX + " " + se.circularPathData.sourceY + " L" + se.circularPathData.leftInnerExtent + " " + se.circularPathData.sourceY + " A" + se.circularPathData.leftLargeArcRadius + " " + se.circularPathData.leftSmallArcRadius + " 0 0 0 " + se.circularPathData.leftFullExtent + " " + (se.circularPathData.sourceY - se.circularPathData.leftSmallArcRadius) + " L" + se.circularPathData.leftFullExtent + " " + se.circularPathData.verticalLeftInnerExtent + " A" + se.circularPathData.leftLargeArcRadius + " " + se.circularPathData.leftLargeArcRadius + " 0 0 0 " + se.circularPathData.leftInnerExtent + " " + se.circularPathData.verticalFullExtent + " L" + se.circularPathData.rightInnerExtent + " " + se.circularPathData.verticalFullExtent + " A" + se.circularPathData.rightLargeArcRadius + " " + se.circularPathData.rightLargeArcRadius + " 0 0 0 " + se.circularPathData.rightFullExtent + " " + se.circularPathData.verticalRightInnerExtent + " L" + se.circularPathData.rightFullExtent + " " + (se.circularPathData.targetY - se.circularPathData.rightSmallArcRadius) + " A" + se.circularPathData.rightLargeArcRadius + " " + se.circularPathData.rightSmallArcRadius + " 0 0 0 " + se.circularPathData.rightInnerExtent + " " + se.circularPathData.targetY + " L" + se.circularPathData.targetX + " " + se.circularPathData.targetY : "M" + se.circularPathData.sourceX + " " + se.circularPathData.sourceY + " L" + se.circularPathData.leftInnerExtent + " " + se.circularPathData.sourceY + " A" + se.circularPathData.leftLargeArcRadius + " " + se.circularPathData.leftSmallArcRadius + " 0 0 1 " + se.circularPathData.leftFullExtent + " " + (se.circularPathData.sourceY + se.circularPathData.leftSmallArcRadius) + " L" + se.circularPathData.leftFullExtent + " " + se.circularPathData.verticalLeftInnerExtent + " A" + se.circularPathData.leftLargeArcRadius + " " + se.circularPathData.leftLargeArcRadius + " 0 0 1 " + se.circularPathData.leftInnerExtent + " " + se.circularPathData.verticalFullExtent + " L" + se.circularPathData.rightInnerExtent + " " + se.circularPathData.verticalFullExtent + " A" + se.circularPathData.rightLargeArcRadius + " " + se.circularPathData.rightLargeArcRadius + " 0 0 1 " + se.circularPathData.rightFullExtent + " " + se.circularPathData.verticalRightInnerExtent + " L" + se.circularPathData.rightFullExtent + " " + (se.circularPathData.targetY + se.circularPathData.rightSmallArcRadius) + " A" + se.circularPathData.rightLargeArcRadius + " " + se.circularPathData.rightSmallArcRadius + " 0 0 1 " + se.circularPathData.rightInnerExtent + " " + se.circularPathData.targetY + " L" + se.circularPathData.targetX + " " + se.circularPathData.targetY, de;
              }(ue);
            else {
              var we = x.linkHorizontal().source(function(se) {
                return [se.source.x0 + (se.source.x1 - se.source.x0), se.y0];
              }).target(function(se) {
                return [se.target.x0, se.y1];
              });
              ue.path = we(ue);
            }
          });
        }
        function S(te, ie) {
          return H(te) == H(ie) ? te.circularLinkType == "bottom" ? R(te, ie) : E(te, ie) : H(ie) - H(te);
        }
        function E(te, ie) {
          return te.y0 - ie.y0;
        }
        function R(te, ie) {
          return ie.y0 - te.y0;
        }
        function z(te, ie) {
          return te.y1 - ie.y1;
        }
        function j(te, ie) {
          return ie.y1 - te.y1;
        }
        function H(te) {
          return te.target.column - te.source.column;
        }
        function Y(te) {
          return te.target.x0 - te.source.x1;
        }
        function J(te, ie) {
          var le = T(te), oe = Y(ie) / Math.tan(le);
          return N(te) == "up" ? te.y1 + oe : te.y1 - oe;
        }
        function W(te, ie) {
          var le = T(te), oe = Y(ie) / Math.tan(le);
          return N(te) == "up" ? te.y1 - oe : te.y1 + oe;
        }
        function Z(te, ie, le, oe) {
          te.links.forEach(function(ve) {
            if (!ve.circular && ve.target.column - ve.source.column > 1) {
              var ue = ve.source.column + 1, ye = ve.target.column - 1, Ae = 1, pe = ye - ue + 1;
              for (Ae = 1; ue <= ye; ue++, Ae++)
                te.nodes.forEach(function(ge) {
                  if (ge.column == ue) {
                    var we, se = Ae / (pe + 1), de = Math.pow(1 - se, 3), Te = 3 * se * Math.pow(1 - se, 2), Ee = 3 * Math.pow(se, 2) * (1 - se), Me = Math.pow(se, 3), ze = de * ve.y0 + Te * ve.y0 + Ee * ve.y1 + Me * ve.y1, Ie = ze - ve.width / 2, Oe = ze + ve.width / 2;
                    Ie > ge.y0 && Ie < ge.y1 ? (we = ge.y1 - Ie + 10, we = ge.circularLinkType == "bottom" ? we : -we, ge = V(ge, we, ie, le), te.nodes.forEach(function(Ze) {
                      _(Ze, oe) != _(ge, oe) && Ze.column == ge.column && re(ge, Ze) && V(Ze, we, ie, le);
                    })) : (Oe > ge.y0 && Oe < ge.y1 || Ie < ge.y0 && Oe > ge.y1) && (we = Oe - ge.y0 + 10, ge = V(ge, we, ie, le), te.nodes.forEach(function(Ze) {
                      _(Ze, oe) != _(ge, oe) && Ze.column == ge.column && Ze.y0 < ge.y1 && Ze.y1 > ge.y1 && V(Ze, we, ie, le);
                    }));
                  }
                });
            }
          });
        }
        function re(te, ie) {
          return te.y0 > ie.y0 && te.y0 < ie.y1 || te.y1 > ie.y0 && te.y1 < ie.y1 || te.y0 < ie.y0 && te.y1 > ie.y1;
        }
        function V(te, ie, le, oe) {
          return te.y0 + ie >= le && te.y1 + ie <= oe && (te.y0 = te.y0 + ie, te.y1 = te.y1 + ie, te.targetLinks.forEach(function(ve) {
            ve.y1 = ve.y1 + ie;
          }), te.sourceLinks.forEach(function(ve) {
            ve.y0 = ve.y0 + ie;
          })), te;
        }
        function B(te, ie, le, oe) {
          te.nodes.forEach(function(ve) {
            oe && ve.y + (ve.y1 - ve.y0) > ie && (ve.y = ve.y - (ve.y + (ve.y1 - ve.y0) - ie));
            var ue = te.links.filter(function(pe) {
              return _(pe.source, le) == _(ve, le);
            }), ye = ue.length;
            ye > 1 && ue.sort(function(pe, ge) {
              if (!pe.circular && !ge.circular) {
                if (pe.target.column == ge.target.column || !ee(pe, ge))
                  return pe.y1 - ge.y1;
                if (pe.target.column > ge.target.column) {
                  var we = W(ge, pe);
                  return pe.y1 - we;
                }
                if (ge.target.column > pe.target.column)
                  return W(pe, ge) - ge.y1;
              }
              return pe.circular && !ge.circular ? pe.circularLinkType == "top" ? -1 : 1 : ge.circular && !pe.circular ? ge.circularLinkType == "top" ? 1 : -1 : pe.circular && ge.circular ? pe.circularLinkType === ge.circularLinkType && pe.circularLinkType == "top" ? pe.target.column === ge.target.column ? pe.target.y1 - ge.target.y1 : ge.target.column - pe.target.column : pe.circularLinkType === ge.circularLinkType && pe.circularLinkType == "bottom" ? pe.target.column === ge.target.column ? ge.target.y1 - pe.target.y1 : pe.target.column - ge.target.column : pe.circularLinkType == "top" ? -1 : 1 : void 0;
            });
            var Ae = ve.y0;
            ue.forEach(function(pe) {
              pe.y0 = Ae + pe.width / 2, Ae += pe.width;
            }), ue.forEach(function(pe, ge) {
              if (pe.circularLinkType == "bottom") {
                for (var we = ge + 1, se = 0; we < ye; we++)
                  se += ue[we].width;
                pe.y0 = ve.y1 - se - pe.width / 2;
              }
            });
          });
        }
        function U(te, ie, le) {
          te.nodes.forEach(function(oe) {
            var ve = te.links.filter(function(Ae) {
              return _(Ae.target, le) == _(oe, le);
            }), ue = ve.length;
            ue > 1 && ve.sort(function(Ae, pe) {
              if (!Ae.circular && !pe.circular) {
                if (Ae.source.column == pe.source.column || !ee(Ae, pe))
                  return Ae.y0 - pe.y0;
                if (pe.source.column < Ae.source.column) {
                  var ge = J(pe, Ae);
                  return Ae.y0 - ge;
                }
                if (Ae.source.column < pe.source.column)
                  return J(Ae, pe) - pe.y0;
              }
              return Ae.circular && !pe.circular ? Ae.circularLinkType == "top" ? -1 : 1 : pe.circular && !Ae.circular ? pe.circularLinkType == "top" ? 1 : -1 : Ae.circular && pe.circular ? Ae.circularLinkType === pe.circularLinkType && Ae.circularLinkType == "top" ? Ae.source.column === pe.source.column ? Ae.source.y1 - pe.source.y1 : Ae.source.column - pe.source.column : Ae.circularLinkType === pe.circularLinkType && Ae.circularLinkType == "bottom" ? Ae.source.column === pe.source.column ? Ae.source.y1 - pe.source.y1 : pe.source.column - Ae.source.column : Ae.circularLinkType == "top" ? -1 : 1 : void 0;
            });
            var ye = oe.y0;
            ve.forEach(function(Ae) {
              Ae.y1 = ye + Ae.width / 2, ye += Ae.width;
            }), ve.forEach(function(Ae, pe) {
              if (Ae.circularLinkType == "bottom") {
                for (var ge = pe + 1, we = 0; ge < ue; ge++)
                  we += ve[ge].width;
                Ae.y1 = oe.y1 - we - Ae.width / 2;
              }
            });
          });
        }
        function ee(te, ie) {
          return N(te) == N(ie);
        }
        function N(te) {
          return te.y0 - te.y1 > 0 ? "up" : "down";
        }
        function K(te, ie) {
          return _(te.source, ie) == _(te.target, ie);
        }
        function X(te, ie, le) {
          var oe = te.nodes, ve = te.links, ue = !1, ye = !1;
          if (ve.forEach(function(ge) {
            ge.circularLinkType == "top" ? ue = !0 : ge.circularLinkType == "bottom" && (ye = !0);
          }), ue == 0 || ye == 0) {
            var Ae = g.min(oe, function(ge) {
              return ge.y0;
            }), pe = (le - ie) / (g.max(oe, function(ge) {
              return ge.y1;
            }) - Ae);
            oe.forEach(function(ge) {
              var we = (ge.y1 - ge.y0) * pe;
              ge.y0 = (ge.y0 - Ae) * pe, ge.y1 = ge.y0 + we;
            }), ve.forEach(function(ge) {
              ge.y0 = (ge.y0 - Ae) * pe, ge.y1 = (ge.y1 - Ae) * pe, ge.width = ge.width * pe;
            });
          }
        }
        m.sankeyCircular = function() {
          var te, ie, le = 0, oe = 0, ve = 1, ue = 1, ye = 24, Ae = c, pe = n, ge = a, we = y, se = 32, de = 2, Te = null;
          function Ee() {
            var Fe = { nodes: ge.apply(null, arguments), links: we.apply(null, arguments) };
            Me(Fe), b(Fe, Ae, Te), ze(Fe), Ie(Fe), w(Fe, Ae), Oe(Fe, se, Ae), Ze(Fe);
            for (var Pe = 4, De = 0; De < Pe; De++)
              B(Fe, ue, Ae), U(Fe, ue, Ae), Z(Fe, oe, ue, Ae), B(Fe, ue, Ae), U(Fe, ue, Ae);
            return X(Fe, oe, ue), P(Fe, de, ue, Ae), Fe;
          }
          function Me(Fe) {
            Fe.nodes.forEach(function(De, Ge) {
              De.index = Ge, De.sourceLinks = [], De.targetLinks = [];
            });
            var Pe = k.map(Fe.nodes, Ae);
            return Fe.links.forEach(function(De, Ge) {
              De.index = Ge;
              var Qe = De.source, ot = De.target;
              (Qe === void 0 ? "undefined" : t(Qe)) !== "object" && (Qe = De.source = f(Pe, Qe)), (ot === void 0 ? "undefined" : t(ot)) !== "object" && (ot = De.target = f(Pe, ot)), Qe.sourceLinks.push(De), ot.targetLinks.push(De);
            }), Fe;
          }
          function ze(Fe) {
            Fe.nodes.forEach(function(Pe) {
              Pe.partOfCycle = !1, Pe.value = Math.max(g.sum(Pe.sourceLinks, h), g.sum(Pe.targetLinks, h)), Pe.sourceLinks.forEach(function(De) {
                De.circular && (Pe.partOfCycle = !0, Pe.circularLinkType = De.circularLinkType);
              }), Pe.targetLinks.forEach(function(De) {
                De.circular && (Pe.partOfCycle = !0, Pe.circularLinkType = De.circularLinkType);
              });
            });
          }
          function Ie(Fe) {
            var Pe, De, Ge;
            for (Pe = Fe.nodes, De = [], Ge = 0; Pe.length; ++Ge, Pe = De, De = [])
              Pe.forEach(function(Qe) {
                Qe.depth = Ge, Qe.sourceLinks.forEach(function(ot) {
                  De.indexOf(ot.target) < 0 && !ot.circular && De.push(ot.target);
                });
              });
            for (Pe = Fe.nodes, De = [], Ge = 0; Pe.length; ++Ge, Pe = De, De = [])
              Pe.forEach(function(Qe) {
                Qe.height = Ge, Qe.targetLinks.forEach(function(ot) {
                  De.indexOf(ot.source) < 0 && !ot.circular && De.push(ot.source);
                });
              });
            Fe.nodes.forEach(function(Qe) {
              Qe.column = Math.floor(pe.call(null, Qe, Ge));
            });
          }
          function Oe(Fe, Pe, De) {
            var Ge = k.nest().key(function(yt) {
              return yt.column;
            }).sortKeys(g.ascending).entries(Fe.nodes).map(function(yt) {
              return yt.values;
            });
            (function(yt) {
              if (ie) {
                var tt = 1 / 0;
                Ge.forEach(function(Vt) {
                  var Xt = ue * ie / (Vt.length + 1);
                  tt = Xt < tt ? Xt : tt;
                }), te = tt;
              }
              var Ke = g.min(Ge, function(Vt) {
                return (ue - oe - (Vt.length - 1) * te) / g.sum(Vt, h);
              });
              Ke *= 0.3, Fe.links.forEach(function(Vt) {
                Vt.width = Vt.value * Ke;
              });
              var mt = function(Vt) {
                var Xt = 0, Gt = 0, nr = 0, It = 0, Be = g.max(Vt.nodes, function(He) {
                  return He.column;
                });
                return Vt.links.forEach(function(He) {
                  He.circular && (He.circularLinkType == "top" ? Xt += He.width : Gt += He.width, He.target.column == 0 && (It += He.width), He.source.column == Be && (nr += He.width));
                }), { top: Xt = Xt > 0 ? Xt + 25 + 10 : Xt, bottom: Gt = Gt > 0 ? Gt + 25 + 10 : Gt, left: It = It > 0 ? It + 25 + 10 : It, right: nr = nr > 0 ? nr + 25 + 10 : nr };
              }(Fe), Ft = function(Vt, Xt) {
                var Gt = g.max(Vt.nodes, function(he) {
                  return he.column;
                }), nr = ve - le, It = ue - oe, Be = nr / (nr + Xt.right + Xt.left), He = It / (It + Xt.top + Xt.bottom);
                return le = le * Be + Xt.left, ve = Xt.right == 0 ? ve : ve * Be, oe = oe * He + Xt.top, ue *= He, Vt.nodes.forEach(function(he) {
                  he.x0 = le + he.column * ((ve - le - ye) / Gt), he.x1 = he.x0 + ye;
                }), He;
              }(Fe, mt);
              Ke *= Ft, Fe.links.forEach(function(Vt) {
                Vt.width = Vt.value * Ke;
              }), Ge.forEach(function(Vt) {
                var Xt = Vt.length;
                Vt.forEach(function(Gt, nr) {
                  Gt.depth == Ge.length - 1 && Xt == 1 || Gt.depth == 0 && Xt == 1 ? (Gt.y0 = ue / 2 - Gt.value * Ke, Gt.y1 = Gt.y0 + Gt.value * Ke) : Gt.partOfCycle ? L(Gt, yt) == 0 ? (Gt.y0 = ue / 2 + nr, Gt.y1 = Gt.y0 + Gt.value * Ke) : Gt.circularLinkType == "top" ? (Gt.y0 = oe + nr, Gt.y1 = Gt.y0 + Gt.value * Ke) : (Gt.y0 = ue - Gt.value * Ke - nr, Gt.y1 = Gt.y0 + Gt.value * Ke) : mt.top == 0 || mt.bottom == 0 ? (Gt.y0 = (ue - oe) / Xt * nr, Gt.y1 = Gt.y0 + Gt.value * Ke) : (Gt.y0 = (ue - oe) / 2 - Xt / 2 + nr, Gt.y1 = Gt.y0 + Gt.value * Ke);
                });
              });
            })(De), bt();
            for (var Qe = 1, ot = Pe; ot > 0; --ot)
              vt(Qe *= 0.99, De), bt();
            function vt(yt, tt) {
              var Ke = Ge.length;
              Ge.forEach(function(mt) {
                var Ft = mt.length, Vt = mt[0].depth;
                mt.forEach(function(Xt) {
                  var Gt;
                  if ((Xt.sourceLinks.length || Xt.targetLinks.length) && !(Xt.partOfCycle && L(Xt, tt) > 0))
                    if (Vt == 0 && Ft == 1)
                      Gt = Xt.y1 - Xt.y0, Xt.y0 = ue / 2 - Gt / 2, Xt.y1 = ue / 2 + Gt / 2;
                    else if (Vt == Ke - 1 && Ft == 1)
                      Gt = Xt.y1 - Xt.y0, Xt.y0 = ue / 2 - Gt / 2, Xt.y1 = ue / 2 + Gt / 2;
                    else {
                      var nr = g.mean(Xt.sourceLinks, p), It = g.mean(Xt.targetLinks, i), Be = ((nr && It ? (nr + It) / 2 : nr || It) - l(Xt)) * yt;
                      Xt.y0 += Be, Xt.y1 += Be;
                    }
                });
              });
            }
            function bt() {
              Ge.forEach(function(yt) {
                var tt, Ke, mt, Ft = oe, Vt = yt.length;
                for (yt.sort(o), mt = 0; mt < Vt; ++mt)
                  (Ke = Ft - (tt = yt[mt]).y0) > 0 && (tt.y0 += Ke, tt.y1 += Ke), Ft = tt.y1 + te;
                if ((Ke = Ft - te - ue) > 0)
                  for (Ft = tt.y0 -= Ke, tt.y1 -= Ke, mt = Vt - 2; mt >= 0; --mt)
                    (Ke = (tt = yt[mt]).y1 + te - Ft) > 0 && (tt.y0 -= Ke, tt.y1 -= Ke), Ft = tt.y0;
              });
            }
          }
          function Ze(Fe) {
            Fe.nodes.forEach(function(Pe) {
              Pe.sourceLinks.sort(u), Pe.targetLinks.sort(d);
            }), Fe.nodes.forEach(function(Pe) {
              var De = Pe.y0, Ge = De, Qe = Pe.y1, ot = Qe;
              Pe.sourceLinks.forEach(function(vt) {
                vt.circular ? (vt.y0 = Qe - vt.width / 2, Qe -= vt.width) : (vt.y0 = De + vt.width / 2, De += vt.width);
              }), Pe.targetLinks.forEach(function(vt) {
                vt.circular ? (vt.y1 = ot - vt.width / 2, ot -= vt.width) : (vt.y1 = Ge + vt.width / 2, Ge += vt.width);
              });
            });
          }
          return Ee.nodeId = function(Fe) {
            return arguments.length ? (Ae = typeof Fe == "function" ? Fe : s(Fe), Ee) : Ae;
          }, Ee.nodeAlign = function(Fe) {
            return arguments.length ? (pe = typeof Fe == "function" ? Fe : s(Fe), Ee) : pe;
          }, Ee.nodeWidth = function(Fe) {
            return arguments.length ? (ye = +Fe, Ee) : ye;
          }, Ee.nodePadding = function(Fe) {
            return arguments.length ? (te = +Fe, Ee) : te;
          }, Ee.nodes = function(Fe) {
            return arguments.length ? (ge = typeof Fe == "function" ? Fe : s(Fe), Ee) : ge;
          }, Ee.links = function(Fe) {
            return arguments.length ? (we = typeof Fe == "function" ? Fe : s(Fe), Ee) : we;
          }, Ee.size = function(Fe) {
            return arguments.length ? (le = oe = 0, ve = +Fe[0], ue = +Fe[1], Ee) : [ve - le, ue - oe];
          }, Ee.extent = function(Fe) {
            return arguments.length ? (le = +Fe[0][0], ve = +Fe[1][0], oe = +Fe[0][1], ue = +Fe[1][1], Ee) : [[le, oe], [ve, ue]];
          }, Ee.iterations = function(Fe) {
            return arguments.length ? (se = +Fe, Ee) : se;
          }, Ee.circularLinkGap = function(Fe) {
            return arguments.length ? (de = +Fe, Ee) : de;
          }, Ee.nodePaddingRatio = function(Fe) {
            return arguments.length ? (ie = +Fe, Ee) : ie;
          }, Ee.sortNodes = function(Fe) {
            return arguments.length ? (Te = Fe, Ee) : Te;
          }, Ee.update = function(Fe) {
            return w(Fe, Ae), Ze(Fe), Fe.links.forEach(function(Pe) {
              Pe.circular && (Pe.circularLinkType = Pe.y0 + Pe.y1 < ue ? "top" : "bottom", Pe.source.circularLinkType = Pe.circularLinkType, Pe.target.circularLinkType = Pe.circularLinkType);
            }), B(Fe, ue, Ae, !1), U(Fe, ue, Ae), P(Fe, de, ue, Ae), Fe;
          }, Ee;
        }, m.sankeyCenter = function(te) {
          return te.targetLinks.length ? te.depth : te.sourceLinks.length ? g.min(te.sourceLinks, r) - 1 : 0;
        }, m.sankeyLeft = function(te) {
          return te.depth;
        }, m.sankeyRight = function(te, ie) {
          return ie - 1 - te.height;
        }, m.sankeyJustify = n, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-array": 107, "d3-collection": 108, "d3-shape": 119, "elementary-circuits-directed-graph": 130 }], 57: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-array"), v("d3-collection"), v("d3-shape")) : g(m.d3 = m.d3 || {}, m.d3, m.d3, m.d3);
      })(this, function(m, g, k, x) {
        function e(_) {
          return _.target.depth;
        }
        function r(_, b) {
          return _.sourceLinks.length ? _.depth : b - 1;
        }
        function n(_) {
          return function() {
            return _;
          };
        }
        function s(_, b) {
          return d(_.source, b.source) || _.index - b.index;
        }
        function t(_, b) {
          return d(_.target, b.target) || _.index - b.index;
        }
        function d(_, b) {
          return _.y0 - b.y0;
        }
        function u(_) {
          return _.value;
        }
        function o(_) {
          return (_.y0 + _.y1) / 2;
        }
        function h(_) {
          return o(_.source) * _.value;
        }
        function l(_) {
          return o(_.target) * _.value;
        }
        function i(_) {
          return _.index;
        }
        function p(_) {
          return _.nodes;
        }
        function c(_) {
          return _.links;
        }
        function a(_, b) {
          var w = _.get(b);
          if (!w)
            throw new Error("missing: " + b);
          return w;
        }
        function y(_) {
          return [_.source.x1, _.y0];
        }
        function f(_) {
          return [_.target.x0, _.y1];
        }
        m.sankey = function() {
          var _ = 0, b = 0, w = 1, T = 1, L = 24, A = 8, I = i, P = r, S = p, E = c, R = 32;
          function z() {
            var Z = { nodes: S.apply(null, arguments), links: E.apply(null, arguments) };
            return j(Z), H(Z), Y(Z), J(Z), W(Z), Z;
          }
          function j(Z) {
            Z.nodes.forEach(function(V, B) {
              V.index = B, V.sourceLinks = [], V.targetLinks = [];
            });
            var re = k.map(Z.nodes, I);
            Z.links.forEach(function(V, B) {
              V.index = B;
              var U = V.source, ee = V.target;
              typeof U != "object" && (U = V.source = a(re, U)), typeof ee != "object" && (ee = V.target = a(re, ee)), U.sourceLinks.push(V), ee.targetLinks.push(V);
            });
          }
          function H(Z) {
            Z.nodes.forEach(function(re) {
              re.value = Math.max(g.sum(re.sourceLinks, u), g.sum(re.targetLinks, u));
            });
          }
          function Y(Z) {
            var re, V, B;
            for (re = Z.nodes, V = [], B = 0; re.length; ++B, re = V, V = [])
              re.forEach(function(ee) {
                ee.depth = B, ee.sourceLinks.forEach(function(N) {
                  V.indexOf(N.target) < 0 && V.push(N.target);
                });
              });
            for (re = Z.nodes, V = [], B = 0; re.length; ++B, re = V, V = [])
              re.forEach(function(ee) {
                ee.height = B, ee.targetLinks.forEach(function(N) {
                  V.indexOf(N.source) < 0 && V.push(N.source);
                });
              });
            var U = (w - _ - L) / (B - 1);
            Z.nodes.forEach(function(ee) {
              ee.x1 = (ee.x0 = _ + Math.max(0, Math.min(B - 1, Math.floor(P.call(null, ee, B)))) * U) + L;
            });
          }
          function J(Z) {
            var re = k.nest().key(function(K) {
              return K.x0;
            }).sortKeys(g.ascending).entries(Z.nodes).map(function(K) {
              return K.values;
            });
            (function() {
              var K = g.max(re, function(ie) {
                return ie.length;
              }), X = 2 / 3 * (T - b) / (K - 1);
              A > X && (A = X);
              var te = g.min(re, function(ie) {
                return (T - b - (ie.length - 1) * A) / g.sum(ie, u);
              });
              re.forEach(function(ie) {
                ie.forEach(function(le, oe) {
                  le.y1 = (le.y0 = oe) + le.value * te;
                });
              }), Z.links.forEach(function(ie) {
                ie.width = ie.value * te;
              });
            })(), N();
            for (var V = 1, B = R; B > 0; --B)
              ee(V *= 0.99), N(), U(V), N();
            function U(K) {
              re.forEach(function(X) {
                X.forEach(function(te) {
                  if (te.targetLinks.length) {
                    var ie = (g.sum(te.targetLinks, h) / g.sum(te.targetLinks, u) - o(te)) * K;
                    te.y0 += ie, te.y1 += ie;
                  }
                });
              });
            }
            function ee(K) {
              re.slice().reverse().forEach(function(X) {
                X.forEach(function(te) {
                  if (te.sourceLinks.length) {
                    var ie = (g.sum(te.sourceLinks, l) / g.sum(te.sourceLinks, u) - o(te)) * K;
                    te.y0 += ie, te.y1 += ie;
                  }
                });
              });
            }
            function N() {
              re.forEach(function(K) {
                var X, te, ie, le = b, oe = K.length;
                for (K.sort(d), ie = 0; ie < oe; ++ie)
                  (te = le - (X = K[ie]).y0) > 0 && (X.y0 += te, X.y1 += te), le = X.y1 + A;
                if ((te = le - A - T) > 0)
                  for (le = X.y0 -= te, X.y1 -= te, ie = oe - 2; ie >= 0; --ie)
                    (te = (X = K[ie]).y1 + A - le) > 0 && (X.y0 -= te, X.y1 -= te), le = X.y0;
              });
            }
          }
          function W(Z) {
            Z.nodes.forEach(function(re) {
              re.sourceLinks.sort(t), re.targetLinks.sort(s);
            }), Z.nodes.forEach(function(re) {
              var V = re.y0, B = V;
              re.sourceLinks.forEach(function(U) {
                U.y0 = V + U.width / 2, V += U.width;
              }), re.targetLinks.forEach(function(U) {
                U.y1 = B + U.width / 2, B += U.width;
              });
            });
          }
          return z.update = function(Z) {
            return W(Z), Z;
          }, z.nodeId = function(Z) {
            return arguments.length ? (I = typeof Z == "function" ? Z : n(Z), z) : I;
          }, z.nodeAlign = function(Z) {
            return arguments.length ? (P = typeof Z == "function" ? Z : n(Z), z) : P;
          }, z.nodeWidth = function(Z) {
            return arguments.length ? (L = +Z, z) : L;
          }, z.nodePadding = function(Z) {
            return arguments.length ? (A = +Z, z) : A;
          }, z.nodes = function(Z) {
            return arguments.length ? (S = typeof Z == "function" ? Z : n(Z), z) : S;
          }, z.links = function(Z) {
            return arguments.length ? (E = typeof Z == "function" ? Z : n(Z), z) : E;
          }, z.size = function(Z) {
            return arguments.length ? (_ = b = 0, w = +Z[0], T = +Z[1], z) : [w - _, T - b];
          }, z.extent = function(Z) {
            return arguments.length ? (_ = +Z[0][0], w = +Z[1][0], b = +Z[0][1], T = +Z[1][1], z) : [[_, b], [w, T]];
          }, z.iterations = function(Z) {
            return arguments.length ? (R = +Z, z) : R;
          }, z;
        }, m.sankeyCenter = function(_) {
          return _.targetLinks.length ? _.depth : _.sourceLinks.length ? g.min(_.sourceLinks, e) - 1 : 0;
        }, m.sankeyLeft = function(_) {
          return _.depth;
        }, m.sankeyRight = function(_, b) {
          return b - 1 - _.height;
        }, m.sankeyJustify = r, m.sankeyLinkHorizontal = function() {
          return x.linkHorizontal().source(y).target(f);
        }, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-array": 107, "d3-collection": 108, "d3-shape": 119 }], 58: [function(v, Q, $) {
      (function() {
        var m = { version: "3.8.0" }, g = [].slice, k = function(ce) {
          return g.call(ce);
        }, x = self.document;
        function e(ce) {
          return ce && (ce.ownerDocument || ce.document || ce).documentElement;
        }
        function r(ce) {
          return ce && (ce.ownerDocument && ce.ownerDocument.defaultView || ce.document && ce || ce.defaultView);
        }
        if (x)
          try {
            k(x.documentElement.childNodes)[0].nodeType;
          } catch {
            k = function(C) {
              for (var D = C.length, F = new Array(D); D--; )
                F[D] = C[D];
              return F;
            };
          }
        if (Date.now || (Date.now = function() {
          return +new Date();
        }), x)
          try {
            x.createElement("DIV").style.setProperty("opacity", 0, "");
          } catch {
            var n = this.Element.prototype, s = n.setAttribute, t = n.setAttributeNS, d = this.CSSStyleDeclaration.prototype, u = d.setProperty;
            n.setAttribute = function(C, D) {
              s.call(this, C, D + "");
            }, n.setAttributeNS = function(C, D, F) {
              t.call(this, C, D, F + "");
            }, d.setProperty = function(C, D, F) {
              u.call(this, C, D + "", F);
            };
          }
        function o(ce, C) {
          return ce < C ? -1 : ce > C ? 1 : ce >= C ? 0 : NaN;
        }
        function h(ce) {
          return ce === null ? NaN : +ce;
        }
        function l(ce) {
          return !isNaN(ce);
        }
        function i(ce) {
          return { left: function(C, D, F, q) {
            for (arguments.length < 3 && (F = 0), arguments.length < 4 && (q = C.length); F < q; ) {
              var ae = F + q >>> 1;
              ce(C[ae], D) < 0 ? F = ae + 1 : q = ae;
            }
            return F;
          }, right: function(C, D, F, q) {
            for (arguments.length < 3 && (F = 0), arguments.length < 4 && (q = C.length); F < q; ) {
              var ae = F + q >>> 1;
              ce(C[ae], D) > 0 ? q = ae : F = ae + 1;
            }
            return F;
          } };
        }
        m.ascending = o, m.descending = function(ce, C) {
          return C < ce ? -1 : C > ce ? 1 : C >= ce ? 0 : NaN;
        }, m.min = function(ce, C) {
          var D, F, q = -1, ae = ce.length;
          if (arguments.length === 1) {
            for (; ++q < ae; )
              if ((F = ce[q]) != null && F >= F) {
                D = F;
                break;
              }
            for (; ++q < ae; )
              (F = ce[q]) != null && D > F && (D = F);
          } else {
            for (; ++q < ae; )
              if ((F = C.call(ce, ce[q], q)) != null && F >= F) {
                D = F;
                break;
              }
            for (; ++q < ae; )
              (F = C.call(ce, ce[q], q)) != null && D > F && (D = F);
          }
          return D;
        }, m.max = function(ce, C) {
          var D, F, q = -1, ae = ce.length;
          if (arguments.length === 1) {
            for (; ++q < ae; )
              if ((F = ce[q]) != null && F >= F) {
                D = F;
                break;
              }
            for (; ++q < ae; )
              (F = ce[q]) != null && F > D && (D = F);
          } else {
            for (; ++q < ae; )
              if ((F = C.call(ce, ce[q], q)) != null && F >= F) {
                D = F;
                break;
              }
            for (; ++q < ae; )
              (F = C.call(ce, ce[q], q)) != null && F > D && (D = F);
          }
          return D;
        }, m.extent = function(ce, C) {
          var D, F, q, ae = -1, fe = ce.length;
          if (arguments.length === 1) {
            for (; ++ae < fe; )
              if ((F = ce[ae]) != null && F >= F) {
                D = q = F;
                break;
              }
            for (; ++ae < fe; )
              (F = ce[ae]) != null && (D > F && (D = F), q < F && (q = F));
          } else {
            for (; ++ae < fe; )
              if ((F = C.call(ce, ce[ae], ae)) != null && F >= F) {
                D = q = F;
                break;
              }
            for (; ++ae < fe; )
              (F = C.call(ce, ce[ae], ae)) != null && (D > F && (D = F), q < F && (q = F));
          }
          return [D, q];
        }, m.sum = function(ce, C) {
          var D, F = 0, q = ce.length, ae = -1;
          if (arguments.length === 1)
            for (; ++ae < q; )
              l(D = +ce[ae]) && (F += D);
          else
            for (; ++ae < q; )
              l(D = +C.call(ce, ce[ae], ae)) && (F += D);
          return F;
        }, m.mean = function(ce, C) {
          var D, F = 0, q = ce.length, ae = -1, fe = q;
          if (arguments.length === 1)
            for (; ++ae < q; )
              l(D = h(ce[ae])) ? F += D : --fe;
          else
            for (; ++ae < q; )
              l(D = h(C.call(ce, ce[ae], ae))) ? F += D : --fe;
          if (fe)
            return F / fe;
        }, m.quantile = function(ce, C) {
          var D = (ce.length - 1) * C + 1, F = Math.floor(D), q = +ce[F - 1], ae = D - F;
          return ae ? q + ae * (ce[F] - q) : q;
        }, m.median = function(ce, C) {
          var D, F = [], q = ce.length, ae = -1;
          if (arguments.length === 1)
            for (; ++ae < q; )
              l(D = h(ce[ae])) && F.push(D);
          else
            for (; ++ae < q; )
              l(D = h(C.call(ce, ce[ae], ae))) && F.push(D);
          if (F.length)
            return m.quantile(F.sort(o), 0.5);
        }, m.variance = function(ce, C) {
          var D, F, q = ce.length, ae = 0, fe = 0, xe = -1, ke = 0;
          if (arguments.length === 1)
            for (; ++xe < q; )
              l(D = h(ce[xe])) && (fe += (F = D - ae) * (D - (ae += F / ++ke)));
          else
            for (; ++xe < q; )
              l(D = h(C.call(ce, ce[xe], xe))) && (fe += (F = D - ae) * (D - (ae += F / ++ke)));
          if (ke > 1)
            return fe / (ke - 1);
        }, m.deviation = function() {
          var ce = m.variance.apply(this, arguments);
          return ce && Math.sqrt(ce);
        };
        var p = i(o);
        function c(ce) {
          return ce.length;
        }
        m.bisectLeft = p.left, m.bisect = m.bisectRight = p.right, m.bisector = function(ce) {
          return i(ce.length === 1 ? function(C, D) {
            return o(ce(C), D);
          } : ce);
        }, m.shuffle = function(ce, C, D) {
          (ae = arguments.length) < 3 && (D = ce.length, ae < 2 && (C = 0));
          for (var F, q, ae = D - C; ae; )
            q = Math.random() * ae-- | 0, F = ce[ae + C], ce[ae + C] = ce[q + C], ce[q + C] = F;
          return ce;
        }, m.permute = function(ce, C) {
          for (var D = C.length, F = new Array(D); D--; )
            F[D] = ce[C[D]];
          return F;
        }, m.pairs = function(ce) {
          for (var C = 0, D = ce.length - 1, F = ce[0], q = new Array(D < 0 ? 0 : D); C < D; )
            q[C] = [F, F = ce[++C]];
          return q;
        }, m.transpose = function(ce) {
          if (!(q = ce.length))
            return [];
          for (var C = -1, D = m.min(ce, c), F = new Array(D); ++C < D; )
            for (var q, ae = -1, fe = F[C] = new Array(q); ++ae < q; )
              fe[ae] = ce[ae][C];
          return F;
        }, m.zip = function() {
          return m.transpose(arguments);
        }, m.keys = function(ce) {
          var C = [];
          for (var D in ce)
            C.push(D);
          return C;
        }, m.values = function(ce) {
          var C = [];
          for (var D in ce)
            C.push(ce[D]);
          return C;
        }, m.entries = function(ce) {
          var C = [];
          for (var D in ce)
            C.push({ key: D, value: ce[D] });
          return C;
        }, m.merge = function(ce) {
          for (var C, D, F, q = ce.length, ae = -1, fe = 0; ++ae < q; )
            fe += ce[ae].length;
          for (D = new Array(fe); --q >= 0; )
            for (C = (F = ce[q]).length; --C >= 0; )
              D[--fe] = F[C];
          return D;
        };
        var a = Math.abs;
        function y(ce) {
          for (var C = 1; ce * C % 1; )
            C *= 10;
          return C;
        }
        function f(ce, C) {
          for (var D in C)
            Object.defineProperty(ce.prototype, D, { value: C[D], enumerable: !1 });
        }
        function _() {
          this._ = /* @__PURE__ */ Object.create(null);
        }
        m.range = function(ce, C, D) {
          if (arguments.length < 3 && (D = 1, arguments.length < 2 && (C = ce, ce = 0)), (C - ce) / D == 1 / 0)
            throw new Error("infinite range");
          var F, q = [], ae = y(a(D)), fe = -1;
          if (ce *= ae, C *= ae, (D *= ae) < 0)
            for (; (F = ce + D * ++fe) > C; )
              q.push(F / ae);
          else
            for (; (F = ce + D * ++fe) < C; )
              q.push(F / ae);
          return q;
        }, m.map = function(ce, C) {
          var D = new _();
          if (ce instanceof _)
            ce.forEach(function(xe, ke) {
              D.set(xe, ke);
            });
          else if (Array.isArray(ce)) {
            var F, q = -1, ae = ce.length;
            if (arguments.length === 1)
              for (; ++q < ae; )
                D.set(q, ce[q]);
            else
              for (; ++q < ae; )
                D.set(C.call(ce, F = ce[q], q), F);
          } else
            for (var fe in ce)
              D.set(fe, ce[fe]);
          return D;
        };
        function b(ce) {
          return (ce += "") == "__proto__" || ce[0] === "\0" ? "\0" + ce : ce;
        }
        function w(ce) {
          return (ce += "")[0] === "\0" ? ce.slice(1) : ce;
        }
        function T(ce) {
          return b(ce) in this._;
        }
        function L(ce) {
          return (ce = b(ce)) in this._ && delete this._[ce];
        }
        function A() {
          var ce = [];
          for (var C in this._)
            ce.push(w(C));
          return ce;
        }
        function I() {
          var ce = 0;
          for (var C in this._)
            ++ce;
          return ce;
        }
        function P() {
          for (var ce in this._)
            return !1;
          return !0;
        }
        function S() {
          this._ = /* @__PURE__ */ Object.create(null);
        }
        function E(ce) {
          return ce;
        }
        function R(ce, C, D) {
          return function() {
            var F = D.apply(C, arguments);
            return F === C ? ce : F;
          };
        }
        function z(ce, C) {
          if (C in ce)
            return C;
          C = C.charAt(0).toUpperCase() + C.slice(1);
          for (var D = 0, F = j.length; D < F; ++D) {
            var q = j[D] + C;
            if (q in ce)
              return q;
          }
        }
        f(_, { has: T, get: function(ce) {
          return this._[b(ce)];
        }, set: function(ce, C) {
          return this._[b(ce)] = C;
        }, remove: L, keys: A, values: function() {
          var ce = [];
          for (var C in this._)
            ce.push(this._[C]);
          return ce;
        }, entries: function() {
          var ce = [];
          for (var C in this._)
            ce.push({ key: w(C), value: this._[C] });
          return ce;
        }, size: I, empty: P, forEach: function(ce) {
          for (var C in this._)
            ce.call(this, w(C), this._[C]);
        } }), m.nest = function() {
          var ce, C, D = {}, F = [], q = [];
          function ae(fe, xe, ke) {
            if (ke >= F.length)
              return C ? C.call(D, xe) : ce ? xe.sort(ce) : xe;
            for (var Le, Ve, Je, at, _t = -1, Et = xe.length, kt = F[ke++], At = new _(); ++_t < Et; )
              (at = At.get(Le = kt(Ve = xe[_t]))) ? at.push(Ve) : At.set(Le, [Ve]);
            return fe ? (Ve = fe(), Je = function(xt, Dt) {
              Ve.set(xt, ae(fe, Dt, ke));
            }) : (Ve = {}, Je = function(xt, Dt) {
              Ve[xt] = ae(fe, Dt, ke);
            }), At.forEach(Je), Ve;
          }
          return D.map = function(fe, xe) {
            return ae(xe, fe, 0);
          }, D.entries = function(fe) {
            return function xe(ke, Le) {
              if (Le >= F.length)
                return ke;
              var Ve = [], Je = q[Le++];
              return ke.forEach(function(at, _t) {
                Ve.push({ key: at, values: xe(_t, Le) });
              }), Je ? Ve.sort(function(at, _t) {
                return Je(at.key, _t.key);
              }) : Ve;
            }(ae(m.map, fe, 0), 0);
          }, D.key = function(fe) {
            return F.push(fe), D;
          }, D.sortKeys = function(fe) {
            return q[F.length - 1] = fe, D;
          }, D.sortValues = function(fe) {
            return ce = fe, D;
          }, D.rollup = function(fe) {
            return C = fe, D;
          }, D;
        }, m.set = function(ce) {
          var C = new S();
          if (ce)
            for (var D = 0, F = ce.length; D < F; ++D)
              C.add(ce[D]);
          return C;
        }, f(S, { has: T, add: function(ce) {
          return this._[b(ce += "")] = !0, ce;
        }, remove: L, values: A, size: I, empty: P, forEach: function(ce) {
          for (var C in this._)
            ce.call(this, w(C));
        } }), m.behavior = {}, m.rebind = function(ce, C) {
          for (var D, F = 1, q = arguments.length; ++F < q; )
            ce[D = arguments[F]] = R(ce, C, C[D]);
          return ce;
        };
        var j = ["webkit", "ms", "moz", "Moz", "o", "O"];
        function H() {
        }
        function Y() {
        }
        function J(ce) {
          var C = [], D = new _();
          function F() {
            for (var q, ae = C, fe = -1, xe = ae.length; ++fe < xe; )
              (q = ae[fe].on) && q.apply(this, arguments);
            return ce;
          }
          return F.on = function(q, ae) {
            var fe, xe = D.get(q);
            return arguments.length < 2 ? xe && xe.on : (xe && (xe.on = null, C = C.slice(0, fe = C.indexOf(xe)).concat(C.slice(fe + 1)), D.remove(q)), ae && C.push(D.set(q, { on: ae })), ce);
          }, F;
        }
        function W() {
          m.event.preventDefault();
        }
        function Z() {
          for (var ce, C = m.event; ce = C.sourceEvent; )
            C = ce;
          return C;
        }
        function re(ce) {
          for (var C = new Y(), D = 0, F = arguments.length; ++D < F; )
            C[arguments[D]] = J(C);
          return C.of = function(q, ae) {
            return function(fe) {
              try {
                var xe = fe.sourceEvent = m.event;
                fe.target = ce, m.event = fe, C[fe.type].apply(q, ae);
              } finally {
                m.event = xe;
              }
            };
          }, C;
        }
        m.dispatch = function() {
          for (var ce = new Y(), C = -1, D = arguments.length; ++C < D; )
            ce[arguments[C]] = J(ce);
          return ce;
        }, Y.prototype.on = function(ce, C) {
          var D = ce.indexOf("."), F = "";
          if (D >= 0 && (F = ce.slice(D + 1), ce = ce.slice(0, D)), ce)
            return arguments.length < 2 ? this[ce].on(F) : this[ce].on(F, C);
          if (arguments.length === 2) {
            if (C == null)
              for (ce in this)
                this.hasOwnProperty(ce) && this[ce].on(F, null);
            return this;
          }
        }, m.event = null, m.requote = function(ce) {
          return ce.replace(V, "\\$&");
        };
        var V = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g, B = {}.__proto__ ? function(ce, C) {
          ce.__proto__ = C;
        } : function(ce, C) {
          for (var D in C)
            ce[D] = C[D];
        };
        function U(ce) {
          return B(ce, X), ce;
        }
        var ee = function(ce, C) {
          return C.querySelector(ce);
        }, N = function(ce, C) {
          return C.querySelectorAll(ce);
        }, K = function(ce, C) {
          var D = ce.matches || ce[z(ce, "matchesSelector")];
          return (K = function(F, q) {
            return D.call(F, q);
          })(ce, C);
        };
        typeof Sizzle == "function" && (ee = function(ce, C) {
          return Sizzle(ce, C)[0] || null;
        }, N = Sizzle, K = Sizzle.matchesSelector), m.selection = function() {
          return m.select(x.documentElement);
        };
        var X = m.selection.prototype = [];
        function te(ce) {
          return typeof ce == "function" ? ce : function() {
            return ee(ce, this);
          };
        }
        function ie(ce) {
          return typeof ce == "function" ? ce : function() {
            return N(ce, this);
          };
        }
        X.select = function(ce) {
          var C, D, F, q, ae = [];
          ce = te(ce);
          for (var fe = -1, xe = this.length; ++fe < xe; ) {
            ae.push(C = []), C.parentNode = (F = this[fe]).parentNode;
            for (var ke = -1, Le = F.length; ++ke < Le; )
              (q = F[ke]) ? (C.push(D = ce.call(q, q.__data__, ke, fe)), D && "__data__" in q && (D.__data__ = q.__data__)) : C.push(null);
          }
          return U(ae);
        }, X.selectAll = function(ce) {
          var C, D, F = [];
          ce = ie(ce);
          for (var q = -1, ae = this.length; ++q < ae; )
            for (var fe = this[q], xe = -1, ke = fe.length; ++xe < ke; )
              (D = fe[xe]) && (F.push(C = k(ce.call(D, D.__data__, xe, q))), C.parentNode = D);
          return U(F);
        };
        var le = "http://www.w3.org/1999/xhtml", oe = { svg: "http://www.w3.org/2000/svg", xhtml: le, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" };
        function ve(ce, C) {
          return ce = m.ns.qualify(ce), C == null ? ce.local ? function() {
            this.removeAttributeNS(ce.space, ce.local);
          } : function() {
            this.removeAttribute(ce);
          } : typeof C == "function" ? ce.local ? function() {
            var D = C.apply(this, arguments);
            D == null ? this.removeAttributeNS(ce.space, ce.local) : this.setAttributeNS(ce.space, ce.local, D);
          } : function() {
            var D = C.apply(this, arguments);
            D == null ? this.removeAttribute(ce) : this.setAttribute(ce, D);
          } : ce.local ? function() {
            this.setAttributeNS(ce.space, ce.local, C);
          } : function() {
            this.setAttribute(ce, C);
          };
        }
        function ue(ce) {
          return ce.trim().replace(/\s+/g, " ");
        }
        function ye(ce) {
          return new RegExp("(?:^|\\s+)" + m.requote(ce) + "(?:\\s+|$)", "g");
        }
        function Ae(ce) {
          return (ce + "").trim().split(/^|\s+/);
        }
        function pe(ce, C) {
          var D = (ce = Ae(ce).map(ge)).length;
          return typeof C == "function" ? function() {
            for (var F = -1, q = C.apply(this, arguments); ++F < D; )
              ce[F](this, q);
          } : function() {
            for (var F = -1; ++F < D; )
              ce[F](this, C);
          };
        }
        function ge(ce) {
          var C = ye(ce);
          return function(D, F) {
            if (q = D.classList)
              return F ? q.add(ce) : q.remove(ce);
            var q = D.getAttribute("class") || "";
            F ? (C.lastIndex = 0, C.test(q) || D.setAttribute("class", ue(q + " " + ce))) : D.setAttribute("class", ue(q.replace(C, " ")));
          };
        }
        function we(ce, C, D) {
          return C == null ? function() {
            this.style.removeProperty(ce);
          } : typeof C == "function" ? function() {
            var F = C.apply(this, arguments);
            F == null ? this.style.removeProperty(ce) : this.style.setProperty(ce, F, D);
          } : function() {
            this.style.setProperty(ce, C, D);
          };
        }
        function se(ce, C) {
          return C == null ? function() {
            delete this[ce];
          } : typeof C == "function" ? function() {
            var D = C.apply(this, arguments);
            D == null ? delete this[ce] : this[ce] = D;
          } : function() {
            this[ce] = C;
          };
        }
        function de(ce) {
          return typeof ce == "function" ? ce : (ce = m.ns.qualify(ce)).local ? function() {
            return this.ownerDocument.createElementNS(ce.space, ce.local);
          } : function() {
            var C = this.ownerDocument, D = this.namespaceURI;
            return D === le && C.documentElement.namespaceURI === le ? C.createElement(ce) : C.createElementNS(D, ce);
          };
        }
        function Te() {
          var ce = this.parentNode;
          ce && ce.removeChild(this);
        }
        function Ee(ce) {
          return { __data__: ce };
        }
        function Me(ce) {
          return function() {
            return K(this, ce);
          };
        }
        function ze(ce) {
          return arguments.length || (ce = o), function(C, D) {
            return C && D ? ce(C.__data__, D.__data__) : !C - !D;
          };
        }
        function Ie(ce, C) {
          for (var D = 0, F = ce.length; D < F; D++)
            for (var q, ae = ce[D], fe = 0, xe = ae.length; fe < xe; fe++)
              (q = ae[fe]) && C(q, fe, D);
          return ce;
        }
        function Oe(ce) {
          return B(ce, Ze), ce;
        }
        m.ns = { prefix: oe, qualify: function(ce) {
          var C = ce.indexOf(":"), D = ce;
          return C >= 0 && (D = ce.slice(0, C)) !== "xmlns" && (ce = ce.slice(C + 1)), oe.hasOwnProperty(D) ? { space: oe[D], local: ce } : ce;
        } }, X.attr = function(ce, C) {
          if (arguments.length < 2) {
            if (typeof ce == "string") {
              var D = this.node();
              return (ce = m.ns.qualify(ce)).local ? D.getAttributeNS(ce.space, ce.local) : D.getAttribute(ce);
            }
            for (C in ce)
              this.each(ve(C, ce[C]));
            return this;
          }
          return this.each(ve(ce, C));
        }, X.classed = function(ce, C) {
          if (arguments.length < 2) {
            if (typeof ce == "string") {
              var D = this.node(), F = (ce = Ae(ce)).length, q = -1;
              if (C = D.classList) {
                for (; ++q < F; )
                  if (!C.contains(ce[q]))
                    return !1;
              } else
                for (C = D.getAttribute("class"); ++q < F; )
                  if (!ye(ce[q]).test(C))
                    return !1;
              return !0;
            }
            for (C in ce)
              this.each(pe(C, ce[C]));
            return this;
          }
          return this.each(pe(ce, C));
        }, X.style = function(ce, C, D) {
          var F = arguments.length;
          if (F < 3) {
            if (typeof ce != "string") {
              for (D in F < 2 && (C = ""), ce)
                this.each(we(D, ce[D], C));
              return this;
            }
            if (F < 2) {
              var q = this.node();
              return r(q).getComputedStyle(q, null).getPropertyValue(ce);
            }
            D = "";
          }
          return this.each(we(ce, C, D));
        }, X.property = function(ce, C) {
          if (arguments.length < 2) {
            if (typeof ce == "string")
              return this.node()[ce];
            for (C in ce)
              this.each(se(C, ce[C]));
            return this;
          }
          return this.each(se(ce, C));
        }, X.text = function(ce) {
          return arguments.length ? this.each(typeof ce == "function" ? function() {
            var C = ce.apply(this, arguments);
            this.textContent = C == null ? "" : C;
          } : ce == null ? function() {
            this.textContent = "";
          } : function() {
            this.textContent = ce;
          }) : this.node().textContent;
        }, X.html = function(ce) {
          return arguments.length ? this.each(typeof ce == "function" ? function() {
            var C = ce.apply(this, arguments);
            this.innerHTML = C == null ? "" : C;
          } : ce == null ? function() {
            this.innerHTML = "";
          } : function() {
            this.innerHTML = ce;
          }) : this.node().innerHTML;
        }, X.append = function(ce) {
          return ce = de(ce), this.select(function() {
            return this.appendChild(ce.apply(this, arguments));
          });
        }, X.insert = function(ce, C) {
          return ce = de(ce), C = te(C), this.select(function() {
            return this.insertBefore(ce.apply(this, arguments), C.apply(this, arguments) || null);
          });
        }, X.remove = function() {
          return this.each(Te);
        }, X.data = function(ce, C) {
          var D, F, q = -1, ae = this.length;
          if (!arguments.length) {
            for (ce = new Array(ae = (D = this[0]).length); ++q < ae; )
              (F = D[q]) && (ce[q] = F.__data__);
            return ce;
          }
          function fe(Ve, Je) {
            var at, _t, Et, kt = Ve.length, At = Je.length, xt = Math.min(kt, At), Dt = new Array(At), Ot = new Array(At), jt = new Array(kt);
            if (C) {
              var rr, dr = new _(), Sr = new Array(kt);
              for (at = -1; ++at < kt; )
                (_t = Ve[at]) && (dr.has(rr = C.call(_t, _t.__data__, at)) ? jt[at] = _t : dr.set(rr, _t), Sr[at] = rr);
              for (at = -1; ++at < At; )
                (_t = dr.get(rr = C.call(Je, Et = Je[at], at))) ? _t !== !0 && (Dt[at] = _t, _t.__data__ = Et) : Ot[at] = Ee(Et), dr.set(rr, !0);
              for (at = -1; ++at < kt; )
                at in Sr && dr.get(Sr[at]) !== !0 && (jt[at] = Ve[at]);
            } else {
              for (at = -1; ++at < xt; )
                _t = Ve[at], Et = Je[at], _t ? (_t.__data__ = Et, Dt[at] = _t) : Ot[at] = Ee(Et);
              for (; at < At; ++at)
                Ot[at] = Ee(Je[at]);
              for (; at < kt; ++at)
                jt[at] = Ve[at];
            }
            Ot.update = Dt, Ot.parentNode = Dt.parentNode = jt.parentNode = Ve.parentNode, xe.push(Ot), ke.push(Dt), Le.push(jt);
          }
          var xe = Oe([]), ke = U([]), Le = U([]);
          if (typeof ce == "function")
            for (; ++q < ae; )
              fe(D = this[q], ce.call(D, D.parentNode.__data__, q));
          else
            for (; ++q < ae; )
              fe(D = this[q], ce);
          return ke.enter = function() {
            return xe;
          }, ke.exit = function() {
            return Le;
          }, ke;
        }, X.datum = function(ce) {
          return arguments.length ? this.property("__data__", ce) : this.property("__data__");
        }, X.filter = function(ce) {
          var C, D, F, q = [];
          typeof ce != "function" && (ce = Me(ce));
          for (var ae = 0, fe = this.length; ae < fe; ae++) {
            q.push(C = []), C.parentNode = (D = this[ae]).parentNode;
            for (var xe = 0, ke = D.length; xe < ke; xe++)
              (F = D[xe]) && ce.call(F, F.__data__, xe, ae) && C.push(F);
          }
          return U(q);
        }, X.order = function() {
          for (var ce = -1, C = this.length; ++ce < C; )
            for (var D, F = this[ce], q = F.length - 1, ae = F[q]; --q >= 0; )
              (D = F[q]) && (ae && ae !== D.nextSibling && ae.parentNode.insertBefore(D, ae), ae = D);
          return this;
        }, X.sort = function(ce) {
          ce = ze.apply(this, arguments);
          for (var C = -1, D = this.length; ++C < D; )
            this[C].sort(ce);
          return this.order();
        }, X.each = function(ce) {
          return Ie(this, function(C, D, F) {
            ce.call(C, C.__data__, D, F);
          });
        }, X.call = function(ce) {
          var C = k(arguments);
          return ce.apply(C[0] = this, C), this;
        }, X.empty = function() {
          return !this.node();
        }, X.node = function() {
          for (var ce = 0, C = this.length; ce < C; ce++)
            for (var D = this[ce], F = 0, q = D.length; F < q; F++) {
              var ae = D[F];
              if (ae)
                return ae;
            }
          return null;
        }, X.size = function() {
          var ce = 0;
          return Ie(this, function() {
            ++ce;
          }), ce;
        };
        var Ze = [];
        function Fe(ce) {
          var C, D;
          return function(F, q, ae) {
            var fe, xe = ce[ae].update, ke = xe.length;
            for (ae != D && (D = ae, C = 0), q >= C && (C = q + 1); !(fe = xe[C]) && ++C < ke; )
              ;
            return fe;
          };
        }
        function Pe(ce, C, D) {
          var F = "__on" + ce, q = ce.indexOf("."), ae = Ge;
          q > 0 && (ce = ce.slice(0, q));
          var fe = De.get(ce);
          function xe() {
            var ke = this[F];
            ke && (this.removeEventListener(ce, ke, ke.$), delete this[F]);
          }
          return fe && (ce = fe, ae = Qe), q ? C ? function() {
            var ke = ae(C, k(arguments));
            xe.call(this), this.addEventListener(ce, this[F] = ke, ke.$ = D), ke._ = C;
          } : xe : C ? H : function() {
            var ke, Le = new RegExp("^__on([^.]+)" + m.requote(ce) + "$");
            for (var Ve in this)
              if (ke = Ve.match(Le)) {
                var Je = this[Ve];
                this.removeEventListener(ke[1], Je, Je.$), delete this[Ve];
              }
          };
        }
        m.selection.enter = Oe, m.selection.enter.prototype = Ze, Ze.append = X.append, Ze.empty = X.empty, Ze.node = X.node, Ze.call = X.call, Ze.size = X.size, Ze.select = function(ce) {
          for (var C, D, F, q, ae, fe = [], xe = -1, ke = this.length; ++xe < ke; ) {
            F = (q = this[xe]).update, fe.push(C = []), C.parentNode = q.parentNode;
            for (var Le = -1, Ve = q.length; ++Le < Ve; )
              (ae = q[Le]) ? (C.push(F[Le] = D = ce.call(q.parentNode, ae.__data__, Le, xe)), D.__data__ = ae.__data__) : C.push(null);
          }
          return U(fe);
        }, Ze.insert = function(ce, C) {
          return arguments.length < 2 && (C = Fe(this)), X.insert.call(this, ce, C);
        }, m.select = function(ce) {
          var C;
          return typeof ce == "string" ? (C = [ee(ce, x)]).parentNode = x.documentElement : (C = [ce]).parentNode = e(ce), U([C]);
        }, m.selectAll = function(ce) {
          var C;
          return typeof ce == "string" ? (C = k(N(ce, x))).parentNode = x.documentElement : (C = k(ce)).parentNode = null, U([C]);
        }, X.on = function(ce, C, D) {
          var F = arguments.length;
          if (F < 3) {
            if (typeof ce != "string") {
              for (D in F < 2 && (C = !1), ce)
                this.each(Pe(D, ce[D], C));
              return this;
            }
            if (F < 2)
              return (F = this.node()["__on" + ce]) && F._;
            D = !1;
          }
          return this.each(Pe(ce, C, D));
        };
        var De = m.map({ mouseenter: "mouseover", mouseleave: "mouseout" });
        function Ge(ce, C) {
          return function(D) {
            var F = m.event;
            m.event = D, C[0] = this.__data__;
            try {
              ce.apply(this, C);
            } finally {
              m.event = F;
            }
          };
        }
        function Qe(ce, C) {
          var D = Ge(ce, C);
          return function(F) {
            var q = F.relatedTarget;
            q && (q === this || 8 & q.compareDocumentPosition(this)) || D.call(this, F);
          };
        }
        x && De.forEach(function(ce) {
          "on" + ce in x && De.remove(ce);
        });
        var ot, vt = 0;
        function bt(ce) {
          var C = ".dragsuppress-" + ++vt, D = "click" + C, F = m.select(r(ce)).on("touchmove" + C, W).on("dragstart" + C, W).on("selectstart" + C, W);
          if (ot == null && (ot = !("onselectstart" in ce) && z(ce.style, "userSelect")), ot) {
            var q = e(ce).style, ae = q[ot];
            q[ot] = "none";
          }
          return function(fe) {
            if (F.on(C, null), ot && (q[ot] = ae), fe) {
              var xe = function() {
                F.on(D, null);
              };
              F.on(D, function() {
                W(), xe();
              }, !0), setTimeout(xe, 0);
            }
          };
        }
        m.mouse = function(ce) {
          return tt(ce, Z());
        };
        var yt = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
        function tt(ce, C) {
          C.changedTouches && (C = C.changedTouches[0]);
          var D = ce.ownerSVGElement || ce;
          if (D.createSVGPoint) {
            var F = D.createSVGPoint();
            if (yt < 0) {
              var q = r(ce);
              if (q.scrollX || q.scrollY) {
                var ae = (D = m.select("body").append("svg").style({ position: "absolute", top: 0, left: 0, margin: 0, padding: 0, border: "none" }, "important"))[0][0].getScreenCTM();
                yt = !(ae.f || ae.e), D.remove();
              }
            }
            return yt ? (F.x = C.pageX, F.y = C.pageY) : (F.x = C.clientX, F.y = C.clientY), [(F = F.matrixTransform(ce.getScreenCTM().inverse())).x, F.y];
          }
          var fe = ce.getBoundingClientRect();
          return [C.clientX - fe.left - ce.clientLeft, C.clientY - fe.top - ce.clientTop];
        }
        function Ke() {
          return m.event.changedTouches[0].identifier;
        }
        m.touch = function(ce, C, D) {
          if (arguments.length < 3 && (D = C, C = Z().changedTouches), C) {
            for (var F, q = 0, ae = C.length; q < ae; ++q)
              if ((F = C[q]).identifier === D)
                return tt(ce, F);
          }
        }, m.behavior.drag = function() {
          var ce = re(q, "drag", "dragstart", "dragend"), C = null, D = ae(H, m.mouse, r, "mousemove", "mouseup"), F = ae(Ke, m.touch, E, "touchmove", "touchend");
          function q() {
            this.on("mousedown.drag", D).on("touchstart.drag", F);
          }
          function ae(fe, xe, ke, Le, Ve) {
            return function() {
              var Je, at = this, _t = m.event.target.correspondingElement || m.event.target, Et = at.parentNode, kt = ce.of(at, arguments), At = 0, xt = fe(), Dt = ".drag" + (xt == null ? "" : "-" + xt), Ot = m.select(ke(_t)).on(Le + Dt, dr).on(Ve + Dt, Sr), jt = bt(_t), rr = xe(Et, xt);
              function dr() {
                var kr, Jr, Xr = xe(Et, xt);
                Xr && (kr = Xr[0] - rr[0], Jr = Xr[1] - rr[1], At |= kr | Jr, rr = Xr, kt({ type: "drag", x: Xr[0] + Je[0], y: Xr[1] + Je[1], dx: kr, dy: Jr }));
              }
              function Sr() {
                xe(Et, xt) && (Ot.on(Le + Dt, null).on(Ve + Dt, null), jt(At), kt({ type: "dragend" }));
              }
              Je = C ? [(Je = C.apply(at, arguments)).x - rr[0], Je.y - rr[1]] : [0, 0], kt({ type: "dragstart" });
            };
          }
          return q.origin = function(fe) {
            return arguments.length ? (C = fe, q) : C;
          }, m.rebind(q, ce, "on");
        }, m.touches = function(ce, C) {
          return arguments.length < 2 && (C = Z().touches), C ? k(C).map(function(D) {
            var F = tt(ce, D);
            return F.identifier = D.identifier, F;
          }) : [];
        };
        var mt = 1e-6, Ft = Math.PI, Vt = 2 * Ft, Xt = Vt - mt, Gt = Ft / 2, nr = Ft / 180, It = 180 / Ft;
        function Be(ce) {
          return ce > 1 ? Gt : ce < -1 ? -Gt : Math.asin(ce);
        }
        function He(ce) {
          return ((ce = Math.exp(ce)) + 1 / ce) / 2;
        }
        var he = Math.SQRT2;
        m.interpolateZoom = function(ce, C) {
          var D, F, q = ce[0], ae = ce[1], fe = ce[2], xe = C[0], ke = C[1], Le = C[2], Ve = xe - q, Je = ke - ae, at = Ve * Ve + Je * Je;
          if (at < 1e-12)
            F = Math.log(Le / fe) / he, D = function(Dt) {
              return [q + Dt * Ve, ae + Dt * Je, fe * Math.exp(he * Dt * F)];
            };
          else {
            var _t = Math.sqrt(at), Et = (Le * Le - fe * fe + 4 * at) / (2 * fe * 2 * _t), kt = (Le * Le - fe * fe - 4 * at) / (2 * Le * 2 * _t), At = Math.log(Math.sqrt(Et * Et + 1) - Et), xt = Math.log(Math.sqrt(kt * kt + 1) - kt);
            F = (xt - At) / he, D = function(Dt) {
              var Ot, jt = Dt * F, rr = He(At), dr = fe / (2 * _t) * (rr * (Ot = he * jt + At, ((Ot = Math.exp(2 * Ot)) - 1) / (Ot + 1)) - function(Sr) {
                return ((Sr = Math.exp(Sr)) - 1 / Sr) / 2;
              }(At));
              return [q + dr * Ve, ae + dr * Je, fe * rr / He(he * jt + At)];
            };
          }
          return D.duration = 1e3 * F, D;
        }, m.behavior.zoom = function() {
          var ce, C, D, F, q, ae, fe, xe, ke, Le = { x: 0, y: 0, k: 1 }, Ve = [960, 500], Je = Ue, at = 250, _t = 0, Et = "mousedown.zoom", kt = "mousemove.zoom", At = "mouseup.zoom", xt = "touchstart.zoom", Dt = re(Ot, "zoomstart", "zoom", "zoomend");
          function Ot(qr) {
            qr.on(Et, on).on(Re + ".zoom", Wn).on("dblclick.zoom", ua).on(xt, jn);
          }
          function jt(qr) {
            return [(qr[0] - Le.x) / Le.k, (qr[1] - Le.y) / Le.k];
          }
          function rr(qr) {
            Le.k = Math.max(Je[0], Math.min(Je[1], qr));
          }
          function dr(qr, Mn) {
            Mn = function(Zn) {
              return [Zn[0] * Le.k + Le.x, Zn[1] * Le.k + Le.y];
            }(Mn), Le.x += qr[0] - Mn[0], Le.y += qr[1] - Mn[1];
          }
          function Sr(qr, Mn, Zn, qn) {
            qr.__chart__ = { x: Le.x, y: Le.y, k: Le.k }, rr(Math.pow(2, qn)), dr(C = Mn, Zn), qr = m.select(qr), at > 0 && (qr = qr.transition().duration(at)), qr.call(Ot.event);
          }
          function kr() {
            fe && fe.domain(ae.range().map(function(qr) {
              return (qr - Le.x) / Le.k;
            }).map(ae.invert)), ke && ke.domain(xe.range().map(function(qr) {
              return (qr - Le.y) / Le.k;
            }).map(xe.invert));
          }
          function Jr(qr) {
            _t++ || qr({ type: "zoomstart" });
          }
          function Xr(qr) {
            kr(), qr({ type: "zoom", scale: Le.k, translate: [Le.x, Le.y] });
          }
          function hn(qr) {
            --_t || (qr({ type: "zoomend" }), C = null);
          }
          function on() {
            var qr = this, Mn = Dt.of(qr, arguments), Zn = 0, qn = m.select(r(qr)).on(kt, Sa).on(At, Qn), na = jt(m.mouse(qr)), ha = bt(qr);
            function Sa() {
              Zn = 1, dr(m.mouse(qr), na), Xr(Mn);
            }
            function Qn() {
              qn.on(kt, null).on(At, null), ha(Zn), hn(Mn);
            }
            ws.call(qr), Jr(Mn);
          }
          function jn() {
            var qr, Mn = this, Zn = Dt.of(Mn, arguments), qn = {}, na = 0, ha = ".zoom-" + m.event.changedTouches[0].identifier, Sa = "touchmove" + ha, Qn = "touchend" + ha, xa = [], ga = m.select(Mn), Ca = bt(Mn);
            function ba() {
              var Ci = m.touches(Mn);
              return qr = Le.k, Ci.forEach(function(Pi) {
                Pi.identifier in qn && (qn[Pi.identifier] = jt(Pi));
              }), Ci;
            }
            function Pa() {
              var Ci = m.event.target;
              m.select(Ci).on(Sa, Ua).on(Qn, ci), xa.push(Ci);
              for (var Pi = m.event.changedTouches, li = 0, Ti = Pi.length; li < Ti; ++li)
                qn[Pi[li].identifier] = null;
              var mi = ba(), yo = Date.now();
              if (mi.length === 1) {
                if (yo - q < 500) {
                  var qi = mi[0];
                  Sr(Mn, qi, qn[qi.identifier], Math.floor(Math.log(Le.k) / Math.LN2) + 1), W();
                }
                q = yo;
              } else if (mi.length > 1) {
                qi = mi[0];
                var zo = mi[1], vs = qi[0] - zo[0], Fs = qi[1] - zo[1];
                na = vs * vs + Fs * Fs;
              }
            }
            function Ua() {
              var Ci, Pi, li, Ti, mi = m.touches(Mn);
              ws.call(Mn);
              for (var yo = 0, qi = mi.length; yo < qi; ++yo, Ti = null)
                if (li = mi[yo], Ti = qn[li.identifier]) {
                  if (Pi)
                    break;
                  Ci = li, Pi = Ti;
                }
              if (Ti) {
                var zo = (zo = li[0] - Ci[0]) * zo + (zo = li[1] - Ci[1]) * zo, vs = na && Math.sqrt(zo / na);
                Ci = [(Ci[0] + li[0]) / 2, (Ci[1] + li[1]) / 2], Pi = [(Pi[0] + Ti[0]) / 2, (Pi[1] + Ti[1]) / 2], rr(vs * qr);
              }
              q = null, dr(Ci, Pi), Xr(Zn);
            }
            function ci() {
              if (m.event.touches.length) {
                for (var Ci = m.event.changedTouches, Pi = 0, li = Ci.length; Pi < li; ++Pi)
                  delete qn[Ci[Pi].identifier];
                for (var Ti in qn)
                  return void ba();
              }
              m.selectAll(xa).on(ha, null), ga.on(Et, on).on(xt, jn), Ca(), hn(Zn);
            }
            Pa(), Jr(Zn), ga.on(Et, null).on(xt, Pa);
          }
          function Wn() {
            var qr = Dt.of(this, arguments);
            F ? clearTimeout(F) : (ws.call(this), ce = jt(C = D || m.mouse(this)), Jr(qr)), F = setTimeout(function() {
              F = null, hn(qr);
            }, 50), W(), rr(Math.pow(2, 2e-3 * be()) * Le.k), dr(C, ce), Xr(qr);
          }
          function ua() {
            var qr = m.mouse(this), Mn = Math.log(Le.k) / Math.LN2;
            Sr(this, qr, jt(qr), m.event.shiftKey ? Math.ceil(Mn) - 1 : Math.floor(Mn) + 1);
          }
          return Re || (Re = "onwheel" in x ? (be = function() {
            return -m.event.deltaY * (m.event.deltaMode ? 120 : 1);
          }, "wheel") : "onmousewheel" in x ? (be = function() {
            return m.event.wheelDelta;
          }, "mousewheel") : (be = function() {
            return -m.event.detail;
          }, "MozMousePixelScroll")), Ot.event = function(qr) {
            qr.each(function() {
              var Mn = Dt.of(this, arguments), Zn = Le;
              fs ? m.select(this).transition().each("start.zoom", function() {
                Le = this.__chart__ || { x: 0, y: 0, k: 1 }, Jr(Mn);
              }).tween("zoom:zoom", function() {
                var qn = Ve[0], na = Ve[1], ha = C ? C[0] : qn / 2, Sa = C ? C[1] : na / 2, Qn = m.interpolateZoom([(ha - Le.x) / Le.k, (Sa - Le.y) / Le.k, qn / Le.k], [(ha - Zn.x) / Zn.k, (Sa - Zn.y) / Zn.k, qn / Zn.k]);
                return function(xa) {
                  var ga = Qn(xa), Ca = qn / ga[2];
                  this.__chart__ = Le = { x: ha - ga[0] * Ca, y: Sa - ga[1] * Ca, k: Ca }, Xr(Mn);
                };
              }).each("interrupt.zoom", function() {
                hn(Mn);
              }).each("end.zoom", function() {
                hn(Mn);
              }) : (this.__chart__ = Le, Jr(Mn), Xr(Mn), hn(Mn));
            });
          }, Ot.translate = function(qr) {
            return arguments.length ? (Le = { x: +qr[0], y: +qr[1], k: Le.k }, kr(), Ot) : [Le.x, Le.y];
          }, Ot.scale = function(qr) {
            return arguments.length ? (Le = { x: Le.x, y: Le.y, k: null }, rr(+qr), kr(), Ot) : Le.k;
          }, Ot.scaleExtent = function(qr) {
            return arguments.length ? (Je = qr == null ? Ue : [+qr[0], +qr[1]], Ot) : Je;
          }, Ot.center = function(qr) {
            return arguments.length ? (D = qr && [+qr[0], +qr[1]], Ot) : D;
          }, Ot.size = function(qr) {
            return arguments.length ? (Ve = qr && [+qr[0], +qr[1]], Ot) : Ve;
          }, Ot.duration = function(qr) {
            return arguments.length ? (at = +qr, Ot) : at;
          }, Ot.x = function(qr) {
            return arguments.length ? (fe = qr, ae = qr.copy(), Le = { x: 0, y: 0, k: 1 }, Ot) : fe;
          }, Ot.y = function(qr) {
            return arguments.length ? (ke = qr, xe = qr.copy(), Le = { x: 0, y: 0, k: 1 }, Ot) : ke;
          }, m.rebind(Ot, Dt, "on");
        };
        var be, Re, Ue = [0, 1 / 0];
        function Xe() {
        }
        function qe(ce, C, D) {
          return this instanceof qe ? (this.h = +ce, this.s = +C, void (this.l = +D)) : arguments.length < 2 ? ce instanceof qe ? new qe(ce.h, ce.s, ce.l) : Tr("" + ce, ur, qe) : new qe(ce, C, D);
        }
        m.color = Xe, Xe.prototype.toString = function() {
          return this.rgb() + "";
        }, m.hsl = qe;
        var st = qe.prototype = new Xe();
        function it(ce, C, D) {
          var F, q;
          function ae(fe) {
            return Math.round(255 * function(xe) {
              return xe > 360 ? xe -= 360 : xe < 0 && (xe += 360), xe < 60 ? F + (q - F) * xe / 60 : xe < 180 ? q : xe < 240 ? F + (q - F) * (240 - xe) / 60 : F;
            }(fe));
          }
          return ce = isNaN(ce) ? 0 : (ce %= 360) < 0 ? ce + 360 : ce, C = isNaN(C) || C < 0 ? 0 : C > 1 ? 1 : C, F = 2 * (D = D < 0 ? 0 : D > 1 ? 1 : D) - (q = D <= 0.5 ? D * (1 + C) : D + C - D * C), new Mt(ae(ce + 120), ae(ce), ae(ce - 120));
        }
        function Tt(ce, C, D) {
          return this instanceof Tt ? (this.h = +ce, this.c = +C, void (this.l = +D)) : arguments.length < 2 ? ce instanceof Tt ? new Tt(ce.h, ce.c, ce.l) : Se(ce instanceof ut ? ce.l : (ce = Kt((ce = m.rgb(ce)).r, ce.g, ce.b)).l, ce.a, ce.b) : new Tt(ce, C, D);
        }
        st.brighter = function(ce) {
          return ce = Math.pow(0.7, arguments.length ? ce : 1), new qe(this.h, this.s, this.l / ce);
        }, st.darker = function(ce) {
          return ce = Math.pow(0.7, arguments.length ? ce : 1), new qe(this.h, this.s, ce * this.l);
        }, st.rgb = function() {
          return it(this.h, this.s, this.l);
        }, m.hcl = Tt;
        var Pt = Tt.prototype = new Xe();
        function rt(ce, C, D) {
          return isNaN(ce) && (ce = 0), isNaN(C) && (C = 0), new ut(D, Math.cos(ce *= nr) * C, Math.sin(ce) * C);
        }
        function ut(ce, C, D) {
          return this instanceof ut ? (this.l = +ce, this.a = +C, void (this.b = +D)) : arguments.length < 2 ? ce instanceof ut ? new ut(ce.l, ce.a, ce.b) : ce instanceof Tt ? rt(ce.h, ce.c, ce.l) : Kt((ce = Mt(ce)).r, ce.g, ce.b) : new ut(ce, C, D);
        }
        Pt.brighter = function(ce) {
          return new Tt(this.h, this.c, Math.min(100, this.l + Bt * (arguments.length ? ce : 1)));
        }, Pt.darker = function(ce) {
          return new Tt(this.h, this.c, Math.max(0, this.l - Bt * (arguments.length ? ce : 1)));
        }, Pt.rgb = function() {
          return rt(this.h, this.c, this.l).rgb();
        }, m.lab = ut;
        var Bt = 18, wt = ut.prototype = new Xe();
        function Lt(ce, C, D) {
          var F = (ce + 16) / 116, q = F + C / 500, ae = F - D / 200;
          return new Mt(ft(3.2404542 * (q = 0.95047 * We(q)) - 1.5371385 * (F = 1 * We(F)) - 0.4985314 * (ae = 1.08883 * We(ae))), ft(-0.969266 * q + 1.8760108 * F + 0.041556 * ae), ft(0.0556434 * q - 0.2040259 * F + 1.0572252 * ae));
        }
        function Se(ce, C, D) {
          return ce > 0 ? new Tt(Math.atan2(D, C) * It, Math.sqrt(C * C + D * D), ce) : new Tt(NaN, NaN, ce);
        }
        function We(ce) {
          return ce > 0.206893034 ? ce * ce * ce : (ce - 4 / 29) / 7.787037;
        }
        function nt(ce) {
          return ce > 8856e-6 ? Math.pow(ce, 1 / 3) : 7.787037 * ce + 4 / 29;
        }
        function ft(ce) {
          return Math.round(255 * (ce <= 304e-5 ? 12.92 * ce : 1.055 * Math.pow(ce, 1 / 2.4) - 0.055));
        }
        function Mt(ce, C, D) {
          return this instanceof Mt ? (this.r = ~~ce, this.g = ~~C, void (this.b = ~~D)) : arguments.length < 2 ? ce instanceof Mt ? new Mt(ce.r, ce.g, ce.b) : Tr("" + ce, Mt, it) : new Mt(ce, C, D);
        }
        function Nt(ce) {
          return new Mt(ce >> 16, ce >> 8 & 255, 255 & ce);
        }
        function Zt(ce) {
          return Nt(ce) + "";
        }
        wt.brighter = function(ce) {
          return new ut(Math.min(100, this.l + Bt * (arguments.length ? ce : 1)), this.a, this.b);
        }, wt.darker = function(ce) {
          return new ut(Math.max(0, this.l - Bt * (arguments.length ? ce : 1)), this.a, this.b);
        }, wt.rgb = function() {
          return Lt(this.l, this.a, this.b);
        }, m.rgb = Mt;
        var Ut = Mt.prototype = new Xe();
        function fr(ce) {
          return ce < 16 ? "0" + Math.max(0, ce).toString(16) : Math.min(255, ce).toString(16);
        }
        function Tr(ce, C, D) {
          var F, q, ae, fe = 0, xe = 0, ke = 0;
          if (F = /([a-z]+)\((.*)\)/.exec(ce = ce.toLowerCase()))
            switch (q = F[2].split(","), F[1]) {
              case "hsl":
                return D(parseFloat(q[0]), parseFloat(q[1]) / 100, parseFloat(q[2]) / 100);
              case "rgb":
                return C(er(q[0]), er(q[1]), er(q[2]));
            }
          return (ae = cr.get(ce)) ? C(ae.r, ae.g, ae.b) : (ce == null || ce.charAt(0) !== "#" || isNaN(ae = parseInt(ce.slice(1), 16)) || (ce.length === 4 ? (fe = (3840 & ae) >> 4, fe |= fe >> 4, xe = 240 & ae, xe |= xe >> 4, ke = 15 & ae, ke |= ke << 4) : ce.length === 7 && (fe = (16711680 & ae) >> 16, xe = (65280 & ae) >> 8, ke = 255 & ae)), C(fe, xe, ke));
        }
        function ur(ce, C, D) {
          var F, q, ae = Math.min(ce /= 255, C /= 255, D /= 255), fe = Math.max(ce, C, D), xe = fe - ae, ke = (fe + ae) / 2;
          return xe ? (q = ke < 0.5 ? xe / (fe + ae) : xe / (2 - fe - ae), F = ce == fe ? (C - D) / xe + (C < D ? 6 : 0) : C == fe ? (D - ce) / xe + 2 : (ce - C) / xe + 4, F *= 60) : (F = NaN, q = ke > 0 && ke < 1 ? 0 : F), new qe(F, q, ke);
        }
        function Kt(ce, C, D) {
          var F = nt((0.4124564 * (ce = $t(ce)) + 0.3575761 * (C = $t(C)) + 0.1804375 * (D = $t(D))) / 0.95047), q = nt((0.2126729 * ce + 0.7151522 * C + 0.072175 * D) / 1);
          return ut(116 * q - 16, 500 * (F - q), 200 * (q - nt((0.0193339 * ce + 0.119192 * C + 0.9503041 * D) / 1.08883)));
        }
        function $t(ce) {
          return (ce /= 255) <= 0.04045 ? ce / 12.92 : Math.pow((ce + 0.055) / 1.055, 2.4);
        }
        function er(ce) {
          var C = parseFloat(ce);
          return ce.charAt(ce.length - 1) === "%" ? Math.round(2.55 * C) : C;
        }
        Ut.brighter = function(ce) {
          ce = Math.pow(0.7, arguments.length ? ce : 1);
          var C = this.r, D = this.g, F = this.b, q = 30;
          return C || D || F ? (C && C < q && (C = q), D && D < q && (D = q), F && F < q && (F = q), new Mt(Math.min(255, C / ce), Math.min(255, D / ce), Math.min(255, F / ce))) : new Mt(q, q, q);
        }, Ut.darker = function(ce) {
          return new Mt((ce = Math.pow(0.7, arguments.length ? ce : 1)) * this.r, ce * this.g, ce * this.b);
        }, Ut.hsl = function() {
          return ur(this.r, this.g, this.b);
        }, Ut.toString = function() {
          return "#" + fr(this.r) + fr(this.g) + fr(this.b);
        };
        var cr = m.map({ aliceblue: 15792383, antiquewhite: 16444375, aqua: 65535, aquamarine: 8388564, azure: 15794175, beige: 16119260, bisque: 16770244, black: 0, blanchedalmond: 16772045, blue: 255, blueviolet: 9055202, brown: 10824234, burlywood: 14596231, cadetblue: 6266528, chartreuse: 8388352, chocolate: 13789470, coral: 16744272, cornflowerblue: 6591981, cornsilk: 16775388, crimson: 14423100, cyan: 65535, darkblue: 139, darkcyan: 35723, darkgoldenrod: 12092939, darkgray: 11119017, darkgreen: 25600, darkgrey: 11119017, darkkhaki: 12433259, darkmagenta: 9109643, darkolivegreen: 5597999, darkorange: 16747520, darkorchid: 10040012, darkred: 9109504, darksalmon: 15308410, darkseagreen: 9419919, darkslateblue: 4734347, darkslategray: 3100495, darkslategrey: 3100495, darkturquoise: 52945, darkviolet: 9699539, deeppink: 16716947, deepskyblue: 49151, dimgray: 6908265, dimgrey: 6908265, dodgerblue: 2003199, firebrick: 11674146, floralwhite: 16775920, forestgreen: 2263842, fuchsia: 16711935, gainsboro: 14474460, ghostwhite: 16316671, gold: 16766720, goldenrod: 14329120, gray: 8421504, green: 32768, greenyellow: 11403055, grey: 8421504, honeydew: 15794160, hotpink: 16738740, indianred: 13458524, indigo: 4915330, ivory: 16777200, khaki: 15787660, lavender: 15132410, lavenderblush: 16773365, lawngreen: 8190976, lemonchiffon: 16775885, lightblue: 11393254, lightcoral: 15761536, lightcyan: 14745599, lightgoldenrodyellow: 16448210, lightgray: 13882323, lightgreen: 9498256, lightgrey: 13882323, lightpink: 16758465, lightsalmon: 16752762, lightseagreen: 2142890, lightskyblue: 8900346, lightslategray: 7833753, lightslategrey: 7833753, lightsteelblue: 11584734, lightyellow: 16777184, lime: 65280, limegreen: 3329330, linen: 16445670, magenta: 16711935, maroon: 8388608, mediumaquamarine: 6737322, mediumblue: 205, mediumorchid: 12211667, mediumpurple: 9662683, mediumseagreen: 3978097, mediumslateblue: 8087790, mediumspringgreen: 64154, mediumturquoise: 4772300, mediumvioletred: 13047173, midnightblue: 1644912, mintcream: 16121850, mistyrose: 16770273, moccasin: 16770229, navajowhite: 16768685, navy: 128, oldlace: 16643558, olive: 8421376, olivedrab: 7048739, orange: 16753920, orangered: 16729344, orchid: 14315734, palegoldenrod: 15657130, palegreen: 10025880, paleturquoise: 11529966, palevioletred: 14381203, papayawhip: 16773077, peachpuff: 16767673, peru: 13468991, pink: 16761035, plum: 14524637, powderblue: 11591910, purple: 8388736, rebeccapurple: 6697881, red: 16711680, rosybrown: 12357519, royalblue: 4286945, saddlebrown: 9127187, salmon: 16416882, sandybrown: 16032864, seagreen: 3050327, seashell: 16774638, sienna: 10506797, silver: 12632256, skyblue: 8900331, slateblue: 6970061, slategray: 7372944, slategrey: 7372944, snow: 16775930, springgreen: 65407, steelblue: 4620980, tan: 13808780, teal: 32896, thistle: 14204888, tomato: 16737095, turquoise: 4251856, violet: 15631086, wheat: 16113331, white: 16777215, whitesmoke: 16119285, yellow: 16776960, yellowgreen: 10145074 });
        function gr(ce) {
          return typeof ce == "function" ? ce : function() {
            return ce;
          };
        }
        function Mr(ce) {
          return function(C, D, F) {
            return arguments.length === 2 && typeof D == "function" && (F = D, D = null), Ir(C, D, ce, F);
          };
        }
        function Ir(ce, C, D, F) {
          var q = {}, ae = m.dispatch("beforesend", "progress", "load", "error"), fe = {}, xe = new XMLHttpRequest(), ke = null;
          function Le() {
            var Ve, Je = xe.status;
            if (!Je && function(at) {
              var _t = at.responseType;
              return _t && _t !== "text" ? at.response : at.responseText;
            }(xe) || Je >= 200 && Je < 300 || Je === 304) {
              try {
                Ve = D.call(q, xe);
              } catch (at) {
                return void ae.error.call(q, at);
              }
              ae.load.call(q, Ve);
            } else
              ae.error.call(q, xe);
          }
          return self.XDomainRequest && !("withCredentials" in xe) && /^(http(s)?:)?\/\//.test(ce) && (xe = new XDomainRequest()), "onload" in xe ? xe.onload = xe.onerror = Le : xe.onreadystatechange = function() {
            xe.readyState > 3 && Le();
          }, xe.onprogress = function(Ve) {
            var Je = m.event;
            m.event = Ve;
            try {
              ae.progress.call(q, xe);
            } finally {
              m.event = Je;
            }
          }, q.header = function(Ve, Je) {
            return Ve = (Ve + "").toLowerCase(), arguments.length < 2 ? fe[Ve] : (Je == null ? delete fe[Ve] : fe[Ve] = Je + "", q);
          }, q.mimeType = function(Ve) {
            return arguments.length ? (C = Ve == null ? null : Ve + "", q) : C;
          }, q.responseType = function(Ve) {
            return arguments.length ? (ke = Ve, q) : ke;
          }, q.response = function(Ve) {
            return D = Ve, q;
          }, ["get", "post"].forEach(function(Ve) {
            q[Ve] = function() {
              return q.send.apply(q, [Ve].concat(k(arguments)));
            };
          }), q.send = function(Ve, Je, at) {
            if (arguments.length === 2 && typeof Je == "function" && (at = Je, Je = null), xe.open(Ve, ce, !0), C == null || "accept" in fe || (fe.accept = C + ",*/*"), xe.setRequestHeader)
              for (var _t in fe)
                xe.setRequestHeader(_t, fe[_t]);
            return C != null && xe.overrideMimeType && xe.overrideMimeType(C), ke != null && (xe.responseType = ke), at != null && q.on("error", at).on("load", function(Et) {
              at(null, Et);
            }), ae.beforesend.call(q, xe), xe.send(Je == null ? null : Je), q;
          }, q.abort = function() {
            return xe.abort(), q;
          }, m.rebind(q, ae, "on"), F == null ? q : q.get(function(Ve) {
            return Ve.length === 1 ? function(Je, at) {
              Ve(Je == null ? at : null);
            } : Ve;
          }(F));
        }
        cr.forEach(function(ce, C) {
          cr.set(ce, Nt(C));
        }), m.functor = gr, m.xhr = Mr(E), m.dsv = function(ce, C) {
          var D = new RegExp('["' + ce + `
]`), F = ce.charCodeAt(0);
          function q(Le, Ve, Je) {
            arguments.length < 3 && (Je = Ve, Ve = null);
            var at = Ir(Le, C, Ve == null ? ae : fe(Ve), Je);
            return at.row = function(_t) {
              return arguments.length ? at.response((Ve = _t) == null ? ae : fe(_t)) : Ve;
            }, at;
          }
          function ae(Le) {
            return q.parse(Le.responseText);
          }
          function fe(Le) {
            return function(Ve) {
              return q.parse(Ve.responseText, Le);
            };
          }
          function xe(Le) {
            return Le.map(ke).join(ce);
          }
          function ke(Le) {
            return D.test(Le) ? '"' + Le.replace(/\"/g, '""') + '"' : Le;
          }
          return q.parse = function(Le, Ve) {
            var Je;
            return q.parseRows(Le, function(at, _t) {
              if (Je)
                return Je(at, _t - 1);
              var Et = function(kt) {
                for (var At = {}, xt = at.length, Dt = 0; Dt < xt; ++Dt)
                  At[at[Dt]] = kt[Dt];
                return At;
              };
              Je = Ve ? function(kt, At) {
                return Ve(Et(kt), At);
              } : Et;
            });
          }, q.parseRows = function(Le, Ve) {
            var Je, at, _t = {}, Et = {}, kt = [], At = Le.length, xt = 0, Dt = 0;
            function Ot() {
              if (xt >= At)
                return Et;
              if (at)
                return at = !1, _t;
              var rr = xt;
              if (Le.charCodeAt(rr) === 34) {
                for (var dr = rr; dr++ < At; )
                  if (Le.charCodeAt(dr) === 34) {
                    if (Le.charCodeAt(dr + 1) !== 34)
                      break;
                    ++dr;
                  }
                return xt = dr + 2, (Sr = Le.charCodeAt(dr + 1)) === 13 ? (at = !0, Le.charCodeAt(dr + 2) === 10 && ++xt) : Sr === 10 && (at = !0), Le.slice(rr + 1, dr).replace(/""/g, '"');
              }
              for (; xt < At; ) {
                var Sr, kr = 1;
                if ((Sr = Le.charCodeAt(xt++)) === 10)
                  at = !0;
                else if (Sr === 13)
                  at = !0, Le.charCodeAt(xt) === 10 && (++xt, ++kr);
                else if (Sr !== F)
                  continue;
                return Le.slice(rr, xt - kr);
              }
              return Le.slice(rr);
            }
            for (; (Je = Ot()) !== Et; ) {
              for (var jt = []; Je !== _t && Je !== Et; )
                jt.push(Je), Je = Ot();
              Ve && (jt = Ve(jt, Dt++)) == null || kt.push(jt);
            }
            return kt;
          }, q.format = function(Le) {
            if (Array.isArray(Le[0]))
              return q.formatRows(Le);
            var Ve = new S(), Je = [];
            return Le.forEach(function(at) {
              for (var _t in at)
                Ve.has(_t) || Je.push(Ve.add(_t));
            }), [Je.map(ke).join(ce)].concat(Le.map(function(at) {
              return Je.map(function(_t) {
                return ke(at[_t]);
              }).join(ce);
            })).join(`
`);
          }, q.formatRows = function(Le) {
            return Le.map(xe).join(`
`);
          }, q;
        }, m.csv = m.dsv(",", "text/csv"), m.tsv = m.dsv("	", "text/tab-separated-values");
        var Fr, Gr, un, $r, Dn = this[z(this, "requestAnimationFrame")] || function(ce) {
          setTimeout(ce, 17);
        };
        function rn(ce, C, D) {
          var F = arguments.length;
          F < 2 && (C = 0), F < 3 && (D = Date.now());
          var q = D + C, ae = { c: ce, t: q, n: null };
          return Gr ? Gr.n = ae : Fr = ae, Gr = ae, un || ($r = clearTimeout($r), un = 1, Dn(vn)), ae;
        }
        function vn() {
          var ce = xn(), C = $n() - ce;
          C > 24 ? (isFinite(C) && (clearTimeout($r), $r = setTimeout(vn, C)), un = 0) : (un = 1, Dn(vn));
        }
        function xn() {
          for (var ce = Date.now(), C = Fr; C; )
            ce >= C.t && C.c(ce - C.t) && (C.c = null), C = C.n;
          return ce;
        }
        function $n() {
          for (var ce, C = Fr, D = 1 / 0; C; )
            C.c ? (C.t < D && (D = C.t), C = (ce = C).n) : C = ce ? ce.n = C.n : Fr = C.n;
          return Gr = ce, D;
        }
        function Br(ce) {
          return ce[0];
        }
        function tn(ce) {
          return ce[1];
        }
        function mn(ce) {
          for (var C, D, F, q = ce.length, ae = [0, 1], fe = 2, xe = 2; xe < q; xe++) {
            for (; fe > 1 && (C = ce[ae[fe - 2]], D = ce[ae[fe - 1]], F = ce[xe], (D[0] - C[0]) * (F[1] - C[1]) - (D[1] - C[1]) * (F[0] - C[0]) <= 0); )
              --fe;
            ae[fe++] = xe;
          }
          return ae.slice(0, fe);
        }
        function Qr(ce, C) {
          return ce[0] - C[0] || ce[1] - C[1];
        }
        m.timer = function() {
          rn.apply(this, arguments);
        }, m.timer.flush = function() {
          xn(), $n();
        }, m.round = function(ce, C) {
          return C ? Math.round(ce * (C = Math.pow(10, C))) / C : Math.round(ce);
        }, m.geom = {}, m.geom.hull = function(ce) {
          var C = Br, D = tn;
          if (arguments.length)
            return F(ce);
          function F(q) {
            if (q.length < 3)
              return [];
            var ae, fe = gr(C), xe = gr(D), ke = q.length, Le = [], Ve = [];
            for (ae = 0; ae < ke; ae++)
              Le.push([+fe.call(this, q[ae], ae), +xe.call(this, q[ae], ae), ae]);
            for (Le.sort(Qr), ae = 0; ae < ke; ae++)
              Ve.push([Le[ae][0], -Le[ae][1]]);
            var Je = mn(Le), at = mn(Ve), _t = at[0] === Je[0], Et = at[at.length - 1] === Je[Je.length - 1], kt = [];
            for (ae = Je.length - 1; ae >= 0; --ae)
              kt.push(q[Le[Je[ae]][2]]);
            for (ae = +_t; ae < at.length - Et; ++ae)
              kt.push(q[Le[at[ae]][2]]);
            return kt;
          }
          return F.x = function(q) {
            return arguments.length ? (C = q, F) : C;
          }, F.y = function(q) {
            return arguments.length ? (D = q, F) : D;
          }, F;
        }, m.geom.polygon = function(ce) {
          return B(ce, cn), ce;
        };
        var cn = m.geom.polygon.prototype = [];
        function Hn(ce, C, D) {
          return (D[0] - C[0]) * (ce[1] - C[1]) < (D[1] - C[1]) * (ce[0] - C[0]);
        }
        function _n(ce, C, D, F) {
          var q = ce[0], ae = D[0], fe = C[0] - q, xe = F[0] - ae, ke = ce[1], Le = D[1], Ve = C[1] - ke, Je = F[1] - Le, at = (xe * (ke - Le) - Je * (q - ae)) / (Je * fe - xe * Ve);
          return [q + at * fe, ke + at * Ve];
        }
        function En(ce) {
          var C = ce[0], D = ce[ce.length - 1];
          return !(C[0] - D[0] || C[1] - D[1]);
        }
        cn.area = function() {
          for (var ce, C = -1, D = this.length, F = this[D - 1], q = 0; ++C < D; )
            ce = F, F = this[C], q += ce[1] * F[0] - ce[0] * F[1];
          return 0.5 * q;
        }, cn.centroid = function(ce) {
          var C, D, F = -1, q = this.length, ae = 0, fe = 0, xe = this[q - 1];
          for (arguments.length || (ce = -1 / (6 * this.area())); ++F < q; )
            C = xe, xe = this[F], D = C[0] * xe[1] - xe[0] * C[1], ae += (C[0] + xe[0]) * D, fe += (C[1] + xe[1]) * D;
          return [ae * ce, fe * ce];
        }, cn.clip = function(ce) {
          for (var C, D, F, q, ae, fe, xe = En(ce), ke = -1, Le = this.length - En(this), Ve = this[Le - 1]; ++ke < Le; ) {
            for (C = ce.slice(), ce.length = 0, q = this[ke], ae = C[(F = C.length - xe) - 1], D = -1; ++D < F; )
              Hn(fe = C[D], Ve, q) ? (Hn(ae, Ve, q) || ce.push(_n(ae, fe, Ve, q)), ce.push(fe)) : Hn(ae, Ve, q) && ce.push(_n(ae, fe, Ve, q)), ae = fe;
            xe && ce.push(ce[0]), Ve = q;
          }
          return ce;
        };
        var aa, tr, mr, Ct, or, hr = [], Rr = [];
        function Dr() {
          An(this), this.edge = this.site = this.circle = null;
        }
        function Or(ce) {
          var C = hr.pop() || new Dr();
          return C.site = ce, C;
        }
        function Ar(ce) {
          gn(ce), mr.remove(ce), hr.push(ce), An(ce);
        }
        function vr(ce) {
          var C = ce.circle, D = C.x, F = C.cy, q = { x: D, y: F }, ae = ce.P, fe = ce.N, xe = [ce];
          Ar(ce);
          for (var ke = ae; ke.circle && a(D - ke.circle.x) < mt && a(F - ke.circle.cy) < mt; )
            ae = ke.P, xe.unshift(ke), Ar(ke), ke = ae;
          xe.unshift(ke), gn(ke);
          for (var Le = fe; Le.circle && a(D - Le.circle.x) < mt && a(F - Le.circle.cy) < mt; )
            fe = Le.N, xe.push(Le), Ar(Le), Le = fe;
          xe.push(Le), gn(Le);
          var Ve, Je = xe.length;
          for (Ve = 1; Ve < Je; ++Ve)
            Le = xe[Ve], ke = xe[Ve - 1], Yn(Le.edge, ke.site, Le.site, q);
          ke = xe[0], (Le = xe[Je - 1]).edge = Ln(ke.site, Le.site, null, q), en(ke), en(Le);
        }
        function xr(ce) {
          for (var C, D, F, q, ae = ce.x, fe = ce.y, xe = mr._; xe; )
            if ((F = wr(xe, fe) - ae) > mt)
              xe = xe.L;
            else {
              if (!((q = ae - Er(xe, fe)) > mt)) {
                F > -mt ? (C = xe.P, D = xe) : q > -mt ? (C = xe, D = xe.N) : C = D = xe;
                break;
              }
              if (!xe.R) {
                C = xe;
                break;
              }
              xe = xe.R;
            }
          var ke = Or(ce);
          if (mr.insert(C, ke), C || D) {
            if (C === D)
              return gn(C), D = Or(C.site), mr.insert(ke, D), ke.edge = D.edge = Ln(C.site, ke.site), en(C), void en(D);
            if (D) {
              gn(C), gn(D);
              var Le = C.site, Ve = Le.x, Je = Le.y, at = ce.x - Ve, _t = ce.y - Je, Et = D.site, kt = Et.x - Ve, At = Et.y - Je, xt = 2 * (at * At - _t * kt), Dt = at * at + _t * _t, Ot = kt * kt + At * At, jt = { x: (At * Dt - _t * Ot) / xt + Ve, y: (at * Ot - kt * Dt) / xt + Je };
              Yn(D.edge, Le, Et, jt), ke.edge = Ln(Le, ce, null, jt), D.edge = Ln(ce, Et, null, jt), en(C), en(D);
            } else
              ke.edge = Ln(C.site, ke.site);
          }
        }
        function wr(ce, C) {
          var D = ce.site, F = D.x, q = D.y, ae = q - C;
          if (!ae)
            return F;
          var fe = ce.P;
          if (!fe)
            return -1 / 0;
          var xe = (D = fe.site).x, ke = D.y, Le = ke - C;
          if (!Le)
            return xe;
          var Ve = xe - F, Je = 1 / ae - 1 / Le, at = Ve / Le;
          return Je ? (-at + Math.sqrt(at * at - 2 * Je * (Ve * Ve / (-2 * Le) - ke + Le / 2 + q - ae / 2))) / Je + F : (F + xe) / 2;
        }
        function Er(ce, C) {
          var D = ce.N;
          if (D)
            return wr(D, C);
          var F = ce.site;
          return F.y === C ? F.x : 1 / 0;
        }
        function Hr(ce) {
          this.site = ce, this.edges = [];
        }
        function Vr(ce, C) {
          return C.angle - ce.angle;
        }
        function Kr() {
          An(this), this.x = this.y = this.arc = this.site = this.cy = null;
        }
        function en(ce) {
          var C = ce.P, D = ce.N;
          if (C && D) {
            var F = C.site, q = ce.site, ae = D.site;
            if (F !== ae) {
              var fe = q.x, xe = q.y, ke = F.x - fe, Le = F.y - xe, Ve = ae.x - fe, Je = 2 * (ke * (At = ae.y - xe) - Le * Ve);
              if (!(Je >= -1e-12)) {
                var at = ke * ke + Le * Le, _t = Ve * Ve + At * At, Et = (At * at - Le * _t) / Je, kt = (ke * _t - Ve * at) / Je, At = kt + xe, xt = Rr.pop() || new Kr();
                xt.arc = ce, xt.site = q, xt.x = Et + fe, xt.y = At + Math.sqrt(Et * Et + kt * kt), xt.cy = At, ce.circle = xt;
                for (var Dt = null, Ot = or._; Ot; )
                  if (xt.y < Ot.y || xt.y === Ot.y && xt.x <= Ot.x) {
                    if (!Ot.L) {
                      Dt = Ot.P;
                      break;
                    }
                    Ot = Ot.L;
                  } else {
                    if (!Ot.R) {
                      Dt = Ot;
                      break;
                    }
                    Ot = Ot.R;
                  }
                or.insert(Dt, xt), Dt || (Ct = xt);
              }
            }
          }
        }
        function gn(ce) {
          var C = ce.circle;
          C && (C.P || (Ct = C.N), or.remove(C), Rr.push(C), An(C), ce.circle = null);
        }
        function bn(ce, C) {
          var D = ce.b;
          if (D)
            return !0;
          var F, q, ae = ce.a, fe = C[0][0], xe = C[1][0], ke = C[0][1], Le = C[1][1], Ve = ce.l, Je = ce.r, at = Ve.x, _t = Ve.y, Et = Je.x, kt = Je.y, At = (at + Et) / 2, xt = (_t + kt) / 2;
          if (kt === _t) {
            if (At < fe || At >= xe)
              return;
            if (at > Et) {
              if (ae) {
                if (ae.y >= Le)
                  return;
              } else
                ae = { x: At, y: ke };
              D = { x: At, y: Le };
            } else {
              if (ae) {
                if (ae.y < ke)
                  return;
              } else
                ae = { x: At, y: Le };
              D = { x: At, y: ke };
            }
          } else if (q = xt - (F = (at - Et) / (kt - _t)) * At, F < -1 || F > 1)
            if (at > Et) {
              if (ae) {
                if (ae.y >= Le)
                  return;
              } else
                ae = { x: (ke - q) / F, y: ke };
              D = { x: (Le - q) / F, y: Le };
            } else {
              if (ae) {
                if (ae.y < ke)
                  return;
              } else
                ae = { x: (Le - q) / F, y: Le };
              D = { x: (ke - q) / F, y: ke };
            }
          else if (_t < kt) {
            if (ae) {
              if (ae.x >= xe)
                return;
            } else
              ae = { x: fe, y: F * fe + q };
            D = { x: xe, y: F * xe + q };
          } else {
            if (ae) {
              if (ae.x < fe)
                return;
            } else
              ae = { x: xe, y: F * xe + q };
            D = { x: fe, y: F * fe + q };
          }
          return ce.a = ae, ce.b = D, !0;
        }
        function wn(ce, C) {
          this.l = ce, this.r = C, this.a = this.b = null;
        }
        function Ln(ce, C, D, F) {
          var q = new wn(ce, C);
          return aa.push(q), D && Yn(q, ce, C, D), F && Yn(q, C, ce, F), tr[ce.i].edges.push(new ka(q, ce, C)), tr[C.i].edges.push(new ka(q, C, ce)), q;
        }
        function In(ce, C, D) {
          var F = new wn(ce, null);
          return F.a = C, F.b = D, aa.push(F), F;
        }
        function Yn(ce, C, D, F) {
          ce.a || ce.b ? ce.l === D ? ce.b = F : ce.a = F : (ce.a = F, ce.l = C, ce.r = D);
        }
        function ka(ce, C, D) {
          var F = ce.a, q = ce.b;
          this.edge = ce, this.site = C, this.angle = D ? Math.atan2(D.y - C.y, D.x - C.x) : ce.l === C ? Math.atan2(q.x - F.x, F.y - q.y) : Math.atan2(F.x - q.x, q.y - F.y);
        }
        function Ta() {
          this._ = null;
        }
        function An(ce) {
          ce.U = ce.C = ce.L = ce.R = ce.P = ce.N = null;
        }
        function Kn(ce, C) {
          var D = C, F = C.R, q = D.U;
          q ? q.L === D ? q.L = F : q.R = F : ce._ = F, F.U = q, D.U = F, D.R = F.L, D.R && (D.R.U = D), F.L = D;
        }
        function Xn(ce, C) {
          var D = C, F = C.L, q = D.U;
          q ? q.L === D ? q.L = F : q.R = F : ce._ = F, F.U = q, D.U = F, D.L = F.R, D.L && (D.L.U = D), F.R = D;
        }
        function Ia(ce) {
          for (; ce.L; )
            ce = ce.L;
          return ce;
        }
        function hi(ce, C) {
          var D, F, q, ae = ce.sort(Ii).pop();
          for (aa = [], tr = new Array(ce.length), mr = new Ta(), or = new Ta(); ; )
            if (q = Ct, ae && (!q || ae.y < q.y || ae.y === q.y && ae.x < q.x))
              ae.x === D && ae.y === F || (tr[ae.i] = new Hr(ae), xr(ae), D = ae.x, F = ae.y), ae = ce.pop();
            else {
              if (!q)
                break;
              vr(q.arc);
            }
          C && (function(xe) {
            for (var ke, Le, Ve, Je, at, _t = aa, Et = (Le = xe[0][0], Ve = xe[0][1], Je = xe[1][0], at = xe[1][1], function(At) {
              var xt, Dt = At.a, Ot = At.b, jt = Dt.x, rr = Dt.y, dr = 0, Sr = 1, kr = Ot.x - jt, Jr = Ot.y - rr;
              if (xt = Le - jt, kr || !(xt > 0)) {
                if (xt /= kr, kr < 0) {
                  if (xt < dr)
                    return;
                  xt < Sr && (Sr = xt);
                } else if (kr > 0) {
                  if (xt > Sr)
                    return;
                  xt > dr && (dr = xt);
                }
                if (xt = Je - jt, kr || !(xt < 0)) {
                  if (xt /= kr, kr < 0) {
                    if (xt > Sr)
                      return;
                    xt > dr && (dr = xt);
                  } else if (kr > 0) {
                    if (xt < dr)
                      return;
                    xt < Sr && (Sr = xt);
                  }
                  if (xt = Ve - rr, Jr || !(xt > 0)) {
                    if (xt /= Jr, Jr < 0) {
                      if (xt < dr)
                        return;
                      xt < Sr && (Sr = xt);
                    } else if (Jr > 0) {
                      if (xt > Sr)
                        return;
                      xt > dr && (dr = xt);
                    }
                    if (xt = at - rr, Jr || !(xt < 0)) {
                      if (xt /= Jr, Jr < 0) {
                        if (xt > Sr)
                          return;
                        xt > dr && (dr = xt);
                      } else if (Jr > 0) {
                        if (xt < dr)
                          return;
                        xt < Sr && (Sr = xt);
                      }
                      return dr > 0 && (At.a = { x: jt + dr * kr, y: rr + dr * Jr }), Sr < 1 && (At.b = { x: jt + Sr * kr, y: rr + Sr * Jr }), At;
                    }
                  }
                }
              }
            }), kt = _t.length; kt--; )
              (!bn(ke = _t[kt], xe) || !Et(ke) || a(ke.a.x - ke.b.x) < mt && a(ke.a.y - ke.b.y) < mt) && (ke.a = ke.b = null, _t.splice(kt, 1));
          }(C), function(xe) {
            for (var ke, Le, Ve, Je, at, _t, Et, kt, At, xt, Dt = xe[0][0], Ot = xe[1][0], jt = xe[0][1], rr = xe[1][1], dr = tr, Sr = dr.length; Sr--; )
              if ((at = dr[Sr]) && at.prepare())
                for (kt = (Et = at.edges).length, _t = 0; _t < kt; )
                  Ve = (xt = Et[_t].end()).x, Je = xt.y, ke = (At = Et[++_t % kt].start()).x, Le = At.y, (a(Ve - ke) > mt || a(Je - Le) > mt) && (Et.splice(_t, 0, new ka(In(at.site, xt, a(Ve - Dt) < mt && rr - Je > mt ? { x: Dt, y: a(ke - Dt) < mt ? Le : rr } : a(Je - rr) < mt && Ot - Ve > mt ? { x: a(Le - rr) < mt ? ke : Ot, y: rr } : a(Ve - Ot) < mt && Je - jt > mt ? { x: Ot, y: a(ke - Ot) < mt ? Le : jt } : a(Je - jt) < mt && Ve - Dt > mt ? { x: a(Le - jt) < mt ? ke : Dt, y: jt } : null), at.site, null)), ++kt);
          }(C));
          var fe = { cells: tr, edges: aa };
          return mr = or = aa = tr = null, fe;
        }
        function Ii(ce, C) {
          return C.y - ce.y || C.x - ce.x;
        }
        Hr.prototype.prepare = function() {
          for (var ce, C = this.edges, D = C.length; D--; )
            (ce = C[D].edge).b && ce.a || C.splice(D, 1);
          return C.sort(Vr), C.length;
        }, ka.prototype = { start: function() {
          return this.edge.l === this.site ? this.edge.a : this.edge.b;
        }, end: function() {
          return this.edge.l === this.site ? this.edge.b : this.edge.a;
        } }, Ta.prototype = { insert: function(ce, C) {
          var D, F, q;
          if (ce) {
            if (C.P = ce, C.N = ce.N, ce.N && (ce.N.P = C), ce.N = C, ce.R) {
              for (ce = ce.R; ce.L; )
                ce = ce.L;
              ce.L = C;
            } else
              ce.R = C;
            D = ce;
          } else
            this._ ? (ce = Ia(this._), C.P = null, C.N = ce, ce.P = ce.L = C, D = ce) : (C.P = C.N = null, this._ = C, D = null);
          for (C.L = C.R = null, C.U = D, C.C = !0, ce = C; D && D.C; )
            D === (F = D.U).L ? (q = F.R) && q.C ? (D.C = q.C = !1, F.C = !0, ce = F) : (ce === D.R && (Kn(this, D), D = (ce = D).U), D.C = !1, F.C = !0, Xn(this, F)) : (q = F.L) && q.C ? (D.C = q.C = !1, F.C = !0, ce = F) : (ce === D.L && (Xn(this, D), D = (ce = D).U), D.C = !1, F.C = !0, Kn(this, F)), D = ce.U;
          this._.C = !1;
        }, remove: function(ce) {
          ce.N && (ce.N.P = ce.P), ce.P && (ce.P.N = ce.N), ce.N = ce.P = null;
          var C, D, F, q = ce.U, ae = ce.L, fe = ce.R;
          if (D = ae ? fe ? Ia(fe) : ae : fe, q ? q.L === ce ? q.L = D : q.R = D : this._ = D, ae && fe ? (F = D.C, D.C = ce.C, D.L = ae, ae.U = D, D !== fe ? (q = D.U, D.U = ce.U, ce = D.R, q.L = ce, D.R = fe, fe.U = D) : (D.U = q, q = D, ce = D.R)) : (F = ce.C, ce = D), ce && (ce.U = q), !F)
            if (ce && ce.C)
              ce.C = !1;
            else {
              do {
                if (ce === this._)
                  break;
                if (ce === q.L) {
                  if ((C = q.R).C && (C.C = !1, q.C = !0, Kn(this, q), C = q.R), C.L && C.L.C || C.R && C.R.C) {
                    C.R && C.R.C || (C.L.C = !1, C.C = !0, Xn(this, C), C = q.R), C.C = q.C, q.C = C.R.C = !1, Kn(this, q), ce = this._;
                    break;
                  }
                } else if ((C = q.L).C && (C.C = !1, q.C = !0, Xn(this, q), C = q.L), C.L && C.L.C || C.R && C.R.C) {
                  C.L && C.L.C || (C.R.C = !1, C.C = !0, Kn(this, C), C = q.L), C.C = q.C, q.C = C.L.C = !1, Xn(this, q), ce = this._;
                  break;
                }
                C.C = !0, ce = q, q = q.U;
              } while (!ce.C);
              ce && (ce.C = !1);
            }
        } }, m.geom.voronoi = function(ce) {
          var C = Br, D = tn, F = C, q = D, ae = so;
          if (ce)
            return fe(ce);
          function fe(ke) {
            var Le = new Array(ke.length), Ve = ae[0][0], Je = ae[0][1], at = ae[1][0], _t = ae[1][1];
            return hi(xe(ke), ae).cells.forEach(function(Et, kt) {
              var At = Et.edges, xt = Et.site;
              (Le[kt] = At.length ? At.map(function(Dt) {
                var Ot = Dt.start();
                return [Ot.x, Ot.y];
              }) : xt.x >= Ve && xt.x <= at && xt.y >= Je && xt.y <= _t ? [[Ve, _t], [at, _t], [at, Je], [Ve, Je]] : []).point = ke[kt];
            }), Le;
          }
          function xe(ke) {
            return ke.map(function(Le, Ve) {
              return { x: Math.round(F(Le, Ve) / mt) * mt, y: Math.round(q(Le, Ve) / mt) * mt, i: Ve };
            });
          }
          return fe.links = function(ke) {
            return hi(xe(ke)).edges.filter(function(Le) {
              return Le.l && Le.r;
            }).map(function(Le) {
              return { source: ke[Le.l.i], target: ke[Le.r.i] };
            });
          }, fe.triangles = function(ke) {
            var Le = [];
            return hi(xe(ke)).cells.forEach(function(Ve, Je) {
              for (var at, _t, Et, kt, At = Ve.site, xt = Ve.edges.sort(Vr), Dt = -1, Ot = xt.length, jt = xt[Ot - 1].edge, rr = jt.l === At ? jt.r : jt.l; ++Dt < Ot; )
                at = rr, rr = (jt = xt[Dt].edge).l === At ? jt.r : jt.l, Je < at.i && Je < rr.i && (Et = at, kt = rr, ((_t = At).x - kt.x) * (Et.y - _t.y) - (_t.x - Et.x) * (kt.y - _t.y) < 0) && Le.push([ke[Je], ke[at.i], ke[rr.i]]);
            }), Le;
          }, fe.x = function(ke) {
            return arguments.length ? (F = gr(C = ke), fe) : C;
          }, fe.y = function(ke) {
            return arguments.length ? (q = gr(D = ke), fe) : D;
          }, fe.clipExtent = function(ke) {
            return arguments.length ? (ae = ke == null ? so : ke, fe) : ae === so ? null : ae;
          }, fe.size = function(ke) {
            return arguments.length ? fe.clipExtent(ke && [[0, 0], ke]) : ae === so ? null : ae && ae[1];
          }, fe;
        };
        var so = [[-1e6, -1e6], [1e6, 1e6]];
        function Ga(ce) {
          return ce.x;
        }
        function Ya(ce) {
          return ce.y;
        }
        function Zi(ce, C, D, F, q, ae) {
          if (!ce(C, D, F, q, ae)) {
            var fe = 0.5 * (D + q), xe = 0.5 * (F + ae), ke = C.nodes;
            ke[0] && Zi(ce, ke[0], D, F, fe, xe), ke[1] && Zi(ce, ke[1], fe, F, q, xe), ke[2] && Zi(ce, ke[2], D, xe, fe, ae), ke[3] && Zi(ce, ke[3], fe, xe, q, ae);
          }
        }
        function Fa(ce, C, D, F, q, ae, fe) {
          var xe, ke = 1 / 0;
          return function Le(Ve, Je, at, _t, Et) {
            if (!(Je > ae || at > fe || _t < F || Et < q)) {
              if (kt = Ve.point) {
                var kt, At = C - Ve.x, xt = D - Ve.y, Dt = At * At + xt * xt;
                if (Dt < ke) {
                  var Ot = Math.sqrt(ke = Dt);
                  F = C - Ot, q = D - Ot, ae = C + Ot, fe = D + Ot, xe = kt;
                }
              }
              for (var jt = Ve.nodes, rr = 0.5 * (Je + _t), dr = 0.5 * (at + Et), Sr = (D >= dr) << 1 | C >= rr, kr = Sr + 4; Sr < kr; ++Sr)
                if (Ve = jt[3 & Sr])
                  switch (3 & Sr) {
                    case 0:
                      Le(Ve, Je, at, rr, dr);
                      break;
                    case 1:
                      Le(Ve, rr, at, _t, dr);
                      break;
                    case 2:
                      Le(Ve, Je, dr, rr, Et);
                      break;
                    case 3:
                      Le(Ve, rr, dr, _t, Et);
                  }
            }
          }(ce, F, q, ae, fe), xe;
        }
        function lo(ce, C) {
          ce = m.rgb(ce), C = m.rgb(C);
          var D = ce.r, F = ce.g, q = ce.b, ae = C.r - D, fe = C.g - F, xe = C.b - q;
          return function(ke) {
            return "#" + fr(Math.round(D + ae * ke)) + fr(Math.round(F + fe * ke)) + fr(Math.round(q + xe * ke));
          };
        }
        function ho(ce, C) {
          var D, F = {}, q = {};
          for (D in ce)
            D in C ? F[D] = Ri(ce[D], C[D]) : q[D] = ce[D];
          for (D in C)
            D in ce || (q[D] = C[D]);
          return function(ae) {
            for (D in F)
              q[D] = F[D](ae);
            return q;
          };
        }
        function bi(ce, C) {
          return ce = +ce, C = +C, function(D) {
            return ce * (1 - D) + C * D;
          };
        }
        function Xi(ce, C) {
          var D, F, q, ae = po.lastIndex = To.lastIndex = 0, fe = -1, xe = [], ke = [];
          for (ce += "", C += ""; (D = po.exec(ce)) && (F = To.exec(C)); )
            (q = F.index) > ae && (q = C.slice(ae, q), xe[fe] ? xe[fe] += q : xe[++fe] = q), (D = D[0]) === (F = F[0]) ? xe[fe] ? xe[fe] += F : xe[++fe] = F : (xe[++fe] = null, ke.push({ i: fe, x: bi(D, F) })), ae = To.lastIndex;
          return ae < C.length && (q = C.slice(ae), xe[fe] ? xe[fe] += q : xe[++fe] = q), xe.length < 2 ? ke[0] ? (C = ke[0].x, function(Le) {
            return C(Le) + "";
          }) : function() {
            return C;
          } : (C = ke.length, function(Le) {
            for (var Ve, Je = 0; Je < C; ++Je)
              xe[(Ve = ke[Je]).i] = Ve.x(Le);
            return xe.join("");
          });
        }
        m.geom.delaunay = function(ce) {
          return m.geom.voronoi().triangles(ce);
        }, m.geom.quadtree = function(ce, C, D, F, q) {
          var ae, fe = Br, xe = tn;
          if (ae = arguments.length)
            return fe = Ga, xe = Ya, ae === 3 && (q = D, F = C, D = C = 0), ke(ce);
          function ke(Le) {
            var Ve, Je, at, _t, Et, kt, At, xt, Dt, Ot = gr(fe), jt = gr(xe);
            if (C != null)
              kt = C, At = D, xt = F, Dt = q;
            else if (xt = Dt = -(kt = At = 1 / 0), Je = [], at = [], Et = Le.length, ae)
              for (_t = 0; _t < Et; ++_t)
                (Ve = Le[_t]).x < kt && (kt = Ve.x), Ve.y < At && (At = Ve.y), Ve.x > xt && (xt = Ve.x), Ve.y > Dt && (Dt = Ve.y), Je.push(Ve.x), at.push(Ve.y);
            else
              for (_t = 0; _t < Et; ++_t) {
                var rr = +Ot(Ve = Le[_t], _t), dr = +jt(Ve, _t);
                rr < kt && (kt = rr), dr < At && (At = dr), rr > xt && (xt = rr), dr > Dt && (Dt = dr), Je.push(rr), at.push(dr);
              }
            var Sr = xt - kt, kr = Dt - At;
            function Jr(on, jn, Wn, ua, qr, Mn, Zn, qn) {
              if (!isNaN(Wn) && !isNaN(ua))
                if (on.leaf) {
                  var na = on.x, ha = on.y;
                  if (na != null)
                    if (a(na - Wn) + a(ha - ua) < 0.01)
                      Xr(on, jn, Wn, ua, qr, Mn, Zn, qn);
                    else {
                      var Sa = on.point;
                      on.x = on.y = on.point = null, Xr(on, Sa, na, ha, qr, Mn, Zn, qn), Xr(on, jn, Wn, ua, qr, Mn, Zn, qn);
                    }
                  else
                    on.x = Wn, on.y = ua, on.point = jn;
                } else
                  Xr(on, jn, Wn, ua, qr, Mn, Zn, qn);
            }
            function Xr(on, jn, Wn, ua, qr, Mn, Zn, qn) {
              var na = 0.5 * (qr + Zn), ha = 0.5 * (Mn + qn), Sa = Wn >= na, Qn = ua >= ha, xa = Qn << 1 | Sa;
              on.leaf = !1, Sa ? qr = na : Zn = na, Qn ? Mn = ha : qn = ha, Jr(on = on.nodes[xa] || (on.nodes[xa] = { leaf: !0, nodes: [], point: null, x: null, y: null }), jn, Wn, ua, qr, Mn, Zn, qn);
            }
            Sr > kr ? Dt = At + Sr : xt = kt + kr;
            var hn = { leaf: !0, nodes: [], point: null, x: null, y: null, add: function(on) {
              Jr(hn, on, +Ot(on, ++_t), +jt(on, _t), kt, At, xt, Dt);
            }, visit: function(on) {
              Zi(on, hn, kt, At, xt, Dt);
            }, find: function(on) {
              return Fa(hn, on[0], on[1], kt, At, xt, Dt);
            } };
            if (_t = -1, C == null) {
              for (; ++_t < Et; )
                Jr(hn, Le[_t], Je[_t], at[_t], kt, At, xt, Dt);
              --_t;
            } else
              Le.forEach(hn.add);
            return Je = at = Le = Ve = null, hn;
          }
          return ke.x = function(Le) {
            return arguments.length ? (fe = Le, ke) : fe;
          }, ke.y = function(Le) {
            return arguments.length ? (xe = Le, ke) : xe;
          }, ke.extent = function(Le) {
            return arguments.length ? (Le == null ? C = D = F = q = null : (C = +Le[0][0], D = +Le[0][1], F = +Le[1][0], q = +Le[1][1]), ke) : C == null ? null : [[C, D], [F, q]];
          }, ke.size = function(Le) {
            return arguments.length ? (Le == null ? C = D = F = q = null : (C = D = 0, F = +Le[0], q = +Le[1]), ke) : C == null ? null : [F - C, q - D];
          }, ke;
        }, m.interpolateRgb = lo, m.interpolateObject = ho, m.interpolateNumber = bi, m.interpolateString = Xi;
        var po = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, To = new RegExp(po.source, "g");
        function Ri(ce, C) {
          for (var D, F = m.interpolators.length; --F >= 0 && !(D = m.interpolators[F](ce, C)); )
            ;
          return D;
        }
        function pi(ce, C) {
          var D, F = [], q = [], ae = ce.length, fe = C.length, xe = Math.min(ce.length, C.length);
          for (D = 0; D < xe; ++D)
            F.push(Ri(ce[D], C[D]));
          for (; D < ae; ++D)
            q[D] = ce[D];
          for (; D < fe; ++D)
            q[D] = C[D];
          return function(ke) {
            for (D = 0; D < xe; ++D)
              q[D] = F[D](ke);
            return q;
          };
        }
        m.interpolate = Ri, m.interpolators = [function(ce, C) {
          var D = typeof C;
          return (D === "string" ? cr.has(C.toLowerCase()) || /^(#|rgb\(|hsl\()/i.test(C) ? lo : Xi : C instanceof Xe ? lo : Array.isArray(C) ? pi : D === "object" && isNaN(C) ? ho : bi)(ce, C);
        }], m.interpolateArray = pi;
        var Yi = function() {
          return E;
        }, ds = m.map({ linear: Yi, poly: function(ce) {
          return function(C) {
            return Math.pow(C, ce);
          };
        }, quad: function() {
          return xs;
        }, cubic: function() {
          return bs;
        }, sin: function() {
          return _s;
        }, exp: function() {
          return Ao;
        }, circle: function() {
          return So;
        }, elastic: function(ce, C) {
          var D;
          return arguments.length < 2 && (C = 0.45), arguments.length ? D = C / Vt * Math.asin(1 / ce) : (ce = 1, D = C / 4), function(F) {
            return 1 + ce * Math.pow(2, -10 * F) * Math.sin((F - D) * Vt / C);
          };
        }, back: function(ce) {
          return ce || (ce = 1.70158), function(C) {
            return C * C * ((ce + 1) * C - ce);
          };
        }, bounce: function() {
          return Bo;
        } }), ys = m.map({ in: E, out: ls, "in-out": Xo, "out-in": function(ce) {
          return Xo(ls(ce));
        } });
        function Wa(ce) {
          return function(C) {
            return C <= 0 ? 0 : C >= 1 ? 1 : ce(C);
          };
        }
        function ls(ce) {
          return function(C) {
            return 1 - ce(1 - C);
          };
        }
        function Xo(ce) {
          return function(C) {
            return 0.5 * (C < 0.5 ? ce(2 * C) : 2 - ce(2 - 2 * C));
          };
        }
        function xs(ce) {
          return ce * ce;
        }
        function bs(ce) {
          return ce * ce * ce;
        }
        function ms(ce) {
          if (ce <= 0)
            return 0;
          if (ce >= 1)
            return 1;
          var C = ce * ce, D = C * ce;
          return 4 * (ce < 0.5 ? D : 3 * (ce - C) + D - 0.75);
        }
        function _s(ce) {
          return 1 - Math.cos(ce * Gt);
        }
        function Ao(ce) {
          return Math.pow(2, 10 * (ce - 1));
        }
        function So(ce) {
          return 1 - Math.sqrt(1 - ce * ce);
        }
        function Bo(ce) {
          return ce < 1 / 2.75 ? 7.5625 * ce * ce : ce < 2 / 2.75 ? 7.5625 * (ce -= 1.5 / 2.75) * ce + 0.75 : ce < 2.5 / 2.75 ? 7.5625 * (ce -= 2.25 / 2.75) * ce + 0.9375 : 7.5625 * (ce -= 2.625 / 2.75) * ce + 0.984375;
        }
        function No(ce, C) {
          return C -= ce, function(D) {
            return Math.round(ce + C * D);
          };
        }
        function jo(ce) {
          var C, D, F, q = [ce.a, ce.b], ae = [ce.c, ce.d], fe = mo(q), xe = Jo(q, ae), ke = mo(((C = ae)[0] += (F = -xe) * (D = q)[0], C[1] += F * D[1], C)) || 0;
          q[0] * ae[1] < ae[0] * q[1] && (q[0] *= -1, q[1] *= -1, fe *= -1, xe *= -1), this.rotate = (fe ? Math.atan2(q[1], q[0]) : Math.atan2(-ae[0], ae[1])) * It, this.translate = [ce.e, ce.f], this.scale = [fe, ke], this.skew = ke ? Math.atan2(xe, ke) * It : 0;
        }
        function Jo(ce, C) {
          return ce[0] * C[0] + ce[1] * C[1];
        }
        function mo(ce) {
          var C = Math.sqrt(Jo(ce, ce));
          return C && (ce[0] /= C, ce[1] /= C), C;
        }
        m.ease = function(ce) {
          var C = ce.indexOf("-"), D = C >= 0 ? ce.slice(0, C) : ce, F = C >= 0 ? ce.slice(C + 1) : "in";
          return D = ds.get(D) || Yi, Wa((F = ys.get(F) || E)(D.apply(null, g.call(arguments, 1))));
        }, m.interpolateHcl = function(ce, C) {
          ce = m.hcl(ce), C = m.hcl(C);
          var D = ce.h, F = ce.c, q = ce.l, ae = C.h - D, fe = C.c - F, xe = C.l - q;
          return isNaN(fe) && (fe = 0, F = isNaN(F) ? C.c : F), isNaN(ae) ? (ae = 0, D = isNaN(D) ? C.h : D) : ae > 180 ? ae -= 360 : ae < -180 && (ae += 360), function(ke) {
            return rt(D + ae * ke, F + fe * ke, q + xe * ke) + "";
          };
        }, m.interpolateHsl = function(ce, C) {
          ce = m.hsl(ce), C = m.hsl(C);
          var D = ce.h, F = ce.s, q = ce.l, ae = C.h - D, fe = C.s - F, xe = C.l - q;
          return isNaN(fe) && (fe = 0, F = isNaN(F) ? C.s : F), isNaN(ae) ? (ae = 0, D = isNaN(D) ? C.h : D) : ae > 180 ? ae -= 360 : ae < -180 && (ae += 360), function(ke) {
            return it(D + ae * ke, F + fe * ke, q + xe * ke) + "";
          };
        }, m.interpolateLab = function(ce, C) {
          ce = m.lab(ce), C = m.lab(C);
          var D = ce.l, F = ce.a, q = ce.b, ae = C.l - D, fe = C.a - F, xe = C.b - q;
          return function(ke) {
            return Lt(D + ae * ke, F + fe * ke, q + xe * ke) + "";
          };
        }, m.interpolateRound = No, m.transform = function(ce) {
          var C = x.createElementNS(m.ns.prefix.svg, "g");
          return (m.transform = function(D) {
            if (D != null) {
              C.setAttribute("transform", D);
              var F = C.transform.baseVal.consolidate();
            }
            return new jo(F ? F.matrix : cs);
          })(ce);
        }, jo.prototype.toString = function() {
          return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
        };
        var cs = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };
        function co(ce) {
          return ce.length ? ce.pop() + "," : "";
        }
        function Uo(ce, C) {
          var D = [], F = [];
          return ce = m.transform(ce), C = m.transform(C), function(q, ae, fe, xe) {
            if (q[0] !== ae[0] || q[1] !== ae[1]) {
              var ke = fe.push("translate(", null, ",", null, ")");
              xe.push({ i: ke - 4, x: bi(q[0], ae[0]) }, { i: ke - 2, x: bi(q[1], ae[1]) });
            } else
              (ae[0] || ae[1]) && fe.push("translate(" + ae + ")");
          }(ce.translate, C.translate, D, F), function(q, ae, fe, xe) {
            q !== ae ? (q - ae > 180 ? ae += 360 : ae - q > 180 && (q += 360), xe.push({ i: fe.push(co(fe) + "rotate(", null, ")") - 2, x: bi(q, ae) })) : ae && fe.push(co(fe) + "rotate(" + ae + ")");
          }(ce.rotate, C.rotate, D, F), function(q, ae, fe, xe) {
            q !== ae ? xe.push({ i: fe.push(co(fe) + "skewX(", null, ")") - 2, x: bi(q, ae) }) : ae && fe.push(co(fe) + "skewX(" + ae + ")");
          }(ce.skew, C.skew, D, F), function(q, ae, fe, xe) {
            if (q[0] !== ae[0] || q[1] !== ae[1]) {
              var ke = fe.push(co(fe) + "scale(", null, ",", null, ")");
              xe.push({ i: ke - 4, x: bi(q[0], ae[0]) }, { i: ke - 2, x: bi(q[1], ae[1]) });
            } else
              ae[0] === 1 && ae[1] === 1 || fe.push(co(fe) + "scale(" + ae + ")");
          }(ce.scale, C.scale, D, F), ce = C = null, function(q) {
            for (var ae, fe = -1, xe = F.length; ++fe < xe; )
              D[(ae = F[fe]).i] = ae.x(q);
            return D.join("");
          };
        }
        function us(ce, C) {
          return C = (C -= ce = +ce) || 1 / C, function(D) {
            return (D - ce) / C;
          };
        }
        function Eo(ce, C) {
          return C = (C -= ce = +ce) || 1 / C, function(D) {
            return Math.max(0, Math.min(1, (D - ce) / C));
          };
        }
        function Ha(ce) {
          for (var C = ce.source, D = ce.target, F = function(fe, xe) {
            if (fe === xe)
              return fe;
            for (var ke = je(fe), Le = je(xe), Ve = ke.pop(), Je = Le.pop(), at = null; Ve === Je; )
              at = Ve, Ve = ke.pop(), Je = Le.pop();
            return at;
          }(C, D), q = [C]; C !== F; )
            C = C.parent, q.push(C);
          for (var ae = q.length; D !== F; )
            q.splice(ae, 0, D), D = D.parent;
          return q;
        }
        function je(ce) {
          for (var C = [], D = ce.parent; D != null; )
            C.push(ce), ce = D, D = D.parent;
          return C.push(ce), C;
        }
        function Ye(ce) {
          ce.fixed |= 2;
        }
        function et(ce) {
          ce.fixed &= -7;
        }
        function lt(ce) {
          ce.fixed |= 4, ce.px = ce.x, ce.py = ce.y;
        }
        function gt(ce) {
          ce.fixed &= -5;
        }
        m.interpolateTransform = Uo, m.layout = {}, m.layout.bundle = function() {
          return function(ce) {
            for (var C = [], D = -1, F = ce.length; ++D < F; )
              C.push(Ha(ce[D]));
            return C;
          };
        }, m.layout.chord = function() {
          var ce, C, D, F, q, ae, fe, xe = {}, ke = 0;
          function Le() {
            var Je, at, _t, Et, kt, At = {}, xt = [], Dt = m.range(F), Ot = [];
            for (ce = [], C = [], Je = 0, Et = -1; ++Et < F; ) {
              for (at = 0, kt = -1; ++kt < F; )
                at += D[Et][kt];
              xt.push(at), Ot.push(m.range(F)), Je += at;
            }
            for (q && Dt.sort(function(hn, on) {
              return q(xt[hn], xt[on]);
            }), ae && Ot.forEach(function(hn, on) {
              hn.sort(function(jn, Wn) {
                return ae(D[on][jn], D[on][Wn]);
              });
            }), Je = (Vt - ke * F) / Je, at = 0, Et = -1; ++Et < F; ) {
              for (_t = at, kt = -1; ++kt < F; ) {
                var jt = Dt[Et], rr = Ot[jt][kt], dr = D[jt][rr], Sr = at, kr = at += dr * Je;
                At[jt + "-" + rr] = { index: jt, subindex: rr, startAngle: Sr, endAngle: kr, value: dr };
              }
              C[jt] = { index: jt, startAngle: _t, endAngle: at, value: xt[jt] }, at += ke;
            }
            for (Et = -1; ++Et < F; )
              for (kt = Et - 1; ++kt < F; ) {
                var Jr = At[Et + "-" + kt], Xr = At[kt + "-" + Et];
                (Jr.value || Xr.value) && ce.push(Jr.value < Xr.value ? { source: Xr, target: Jr } : { source: Jr, target: Xr });
              }
            fe && Ve();
          }
          function Ve() {
            ce.sort(function(Je, at) {
              return fe((Je.source.value + Je.target.value) / 2, (at.source.value + at.target.value) / 2);
            });
          }
          return xe.matrix = function(Je) {
            return arguments.length ? (F = (D = Je) && D.length, ce = C = null, xe) : D;
          }, xe.padding = function(Je) {
            return arguments.length ? (ke = Je, ce = C = null, xe) : ke;
          }, xe.sortGroups = function(Je) {
            return arguments.length ? (q = Je, ce = C = null, xe) : q;
          }, xe.sortSubgroups = function(Je) {
            return arguments.length ? (ae = Je, ce = null, xe) : ae;
          }, xe.sortChords = function(Je) {
            return arguments.length ? (fe = Je, ce && Ve(), xe) : fe;
          }, xe.chords = function() {
            return ce || Le(), ce;
          }, xe.groups = function() {
            return C || Le(), C;
          }, xe;
        }, m.layout.force = function() {
          var ce, C, D, F, q, ae, fe = {}, xe = m.dispatch("start", "tick", "end"), ke = [1, 1], Le = 0.9, Ve = pt, Je = St, at = -30, _t = Jt, Et = 0.1, kt = 0.64, At = [], xt = [];
          function Dt(jt) {
            return function(rr, dr, Sr, kr) {
              if (rr.point !== jt) {
                var Jr = rr.cx - jt.x, Xr = rr.cy - jt.y, hn = kr - dr, on = Jr * Jr + Xr * Xr;
                if (hn * hn / kt < on) {
                  if (on < _t) {
                    var jn = rr.charge / on;
                    jt.px -= Jr * jn, jt.py -= Xr * jn;
                  }
                  return !0;
                }
                rr.point && on && on < _t && (jn = rr.pointCharge / on, jt.px -= Jr * jn, jt.py -= Xr * jn);
              }
              return !rr.charge;
            };
          }
          function Ot(jt) {
            jt.px = m.event.x, jt.py = m.event.y, fe.resume();
          }
          return fe.tick = function() {
            if ((D *= 0.99) < 5e-3)
              return ce = null, xe.end({ type: "end", alpha: D = 0 }), !0;
            var jt, rr, dr, Sr, kr, Jr, Xr, hn, on, jn = At.length, Wn = xt.length;
            for (rr = 0; rr < Wn; ++rr)
              Sr = (dr = xt[rr]).source, (Jr = (hn = (kr = dr.target).x - Sr.x) * hn + (on = kr.y - Sr.y) * on) && (hn *= Jr = D * q[rr] * ((Jr = Math.sqrt(Jr)) - F[rr]) / Jr, on *= Jr, kr.x -= hn * (Xr = Sr.weight + kr.weight ? Sr.weight / (Sr.weight + kr.weight) : 0.5), kr.y -= on * Xr, Sr.x += hn * (Xr = 1 - Xr), Sr.y += on * Xr);
            if ((Xr = D * Et) && (hn = ke[0] / 2, on = ke[1] / 2, rr = -1, Xr))
              for (; ++rr < jn; )
                (dr = At[rr]).x += (hn - dr.x) * Xr, dr.y += (on - dr.y) * Xr;
            if (at)
              for (function ua(qr, Mn, Zn) {
                var qn = 0, na = 0;
                if (qr.charge = 0, !qr.leaf)
                  for (var ha, Sa = qr.nodes, Qn = Sa.length, xa = -1; ++xa < Qn; )
                    (ha = Sa[xa]) != null && (ua(ha, Mn, Zn), qr.charge += ha.charge, qn += ha.charge * ha.cx, na += ha.charge * ha.cy);
                if (qr.point) {
                  qr.leaf || (qr.point.x += Math.random() - 0.5, qr.point.y += Math.random() - 0.5);
                  var ga = Mn * Zn[qr.point.index];
                  qr.charge += qr.pointCharge = ga, qn += ga * qr.point.x, na += ga * qr.point.y;
                }
                qr.cx = qn / qr.charge, qr.cy = na / qr.charge;
              }(jt = m.geom.quadtree(At), D, ae), rr = -1; ++rr < jn; )
                (dr = At[rr]).fixed || jt.visit(Dt(dr));
            for (rr = -1; ++rr < jn; )
              (dr = At[rr]).fixed ? (dr.x = dr.px, dr.y = dr.py) : (dr.x -= (dr.px - (dr.px = dr.x)) * Le, dr.y -= (dr.py - (dr.py = dr.y)) * Le);
            xe.tick({ type: "tick", alpha: D });
          }, fe.nodes = function(jt) {
            return arguments.length ? (At = jt, fe) : At;
          }, fe.links = function(jt) {
            return arguments.length ? (xt = jt, fe) : xt;
          }, fe.size = function(jt) {
            return arguments.length ? (ke = jt, fe) : ke;
          }, fe.linkDistance = function(jt) {
            return arguments.length ? (Ve = typeof jt == "function" ? jt : +jt, fe) : Ve;
          }, fe.distance = fe.linkDistance, fe.linkStrength = function(jt) {
            return arguments.length ? (Je = typeof jt == "function" ? jt : +jt, fe) : Je;
          }, fe.friction = function(jt) {
            return arguments.length ? (Le = +jt, fe) : Le;
          }, fe.charge = function(jt) {
            return arguments.length ? (at = typeof jt == "function" ? jt : +jt, fe) : at;
          }, fe.chargeDistance = function(jt) {
            return arguments.length ? (_t = jt * jt, fe) : Math.sqrt(_t);
          }, fe.gravity = function(jt) {
            return arguments.length ? (Et = +jt, fe) : Et;
          }, fe.theta = function(jt) {
            return arguments.length ? (kt = jt * jt, fe) : Math.sqrt(kt);
          }, fe.alpha = function(jt) {
            return arguments.length ? (jt = +jt, D ? jt > 0 ? D = jt : (ce.c = null, ce.t = NaN, ce = null, xe.end({ type: "end", alpha: D = 0 })) : jt > 0 && (xe.start({ type: "start", alpha: D = jt }), ce = rn(fe.tick)), fe) : D;
          }, fe.start = function() {
            var jt, rr, dr, Sr = At.length, kr = xt.length, Jr = ke[0], Xr = ke[1];
            for (jt = 0; jt < Sr; ++jt)
              (dr = At[jt]).index = jt, dr.weight = 0;
            for (jt = 0; jt < kr; ++jt)
              typeof (dr = xt[jt]).source == "number" && (dr.source = At[dr.source]), typeof dr.target == "number" && (dr.target = At[dr.target]), ++dr.source.weight, ++dr.target.weight;
            for (jt = 0; jt < Sr; ++jt)
              dr = At[jt], isNaN(dr.x) && (dr.x = hn("x", Jr)), isNaN(dr.y) && (dr.y = hn("y", Xr)), isNaN(dr.px) && (dr.px = dr.x), isNaN(dr.py) && (dr.py = dr.y);
            if (F = [], typeof Ve == "function")
              for (jt = 0; jt < kr; ++jt)
                F[jt] = +Ve.call(this, xt[jt], jt);
            else
              for (jt = 0; jt < kr; ++jt)
                F[jt] = Ve;
            if (q = [], typeof Je == "function")
              for (jt = 0; jt < kr; ++jt)
                q[jt] = +Je.call(this, xt[jt], jt);
            else
              for (jt = 0; jt < kr; ++jt)
                q[jt] = Je;
            if (ae = [], typeof at == "function")
              for (jt = 0; jt < Sr; ++jt)
                ae[jt] = +at.call(this, At[jt], jt);
            else
              for (jt = 0; jt < Sr; ++jt)
                ae[jt] = at;
            function hn(on, jn) {
              if (!rr) {
                for (rr = new Array(Sr), Mn = 0; Mn < Sr; ++Mn)
                  rr[Mn] = [];
                for (Mn = 0; Mn < kr; ++Mn) {
                  var Wn = xt[Mn];
                  rr[Wn.source.index].push(Wn.target), rr[Wn.target.index].push(Wn.source);
                }
              }
              for (var ua, qr = rr[jt], Mn = -1, Zn = qr.length; ++Mn < Zn; )
                if (!isNaN(ua = qr[Mn][on]))
                  return ua;
              return Math.random() * jn;
            }
            return fe.resume();
          }, fe.resume = function() {
            return fe.alpha(0.1);
          }, fe.stop = function() {
            return fe.alpha(0);
          }, fe.drag = function() {
            if (C || (C = m.behavior.drag().origin(E).on("dragstart.force", Ye).on("drag.force", Ot).on("dragend.force", et)), !arguments.length)
              return C;
            this.on("mouseover.force", lt).on("mouseout.force", gt).call(C);
          }, m.rebind(fe, xe, "on");
        };
        var pt = 20, St = 1, Jt = 1 / 0;
        function Qt(ce, C) {
          return m.rebind(ce, C, "sort", "children", "value"), ce.nodes = ce, ce.links = zr, ce;
        }
        function Yt(ce, C) {
          for (var D = [ce]; (ce = D.pop()) != null; )
            if (C(ce), (q = ce.children) && (F = q.length))
              for (var F, q; --F >= 0; )
                D.push(q[F]);
        }
        function ar(ce, C) {
          for (var D = [ce], F = []; (ce = D.pop()) != null; )
            if (F.push(ce), (ae = ce.children) && (q = ae.length))
              for (var q, ae, fe = -1; ++fe < q; )
                D.push(ae[fe]);
          for (; (ce = F.pop()) != null; )
            C(ce);
        }
        function pr(ce) {
          return ce.children;
        }
        function br(ce) {
          return ce.value;
        }
        function _r(ce, C) {
          return C.value - ce.value;
        }
        function zr(ce) {
          return m.merge(ce.map(function(C) {
            return (C.children || []).map(function(D) {
              return { source: C, target: D };
            });
          }));
        }
        m.layout.hierarchy = function() {
          var ce = _r, C = pr, D = br;
          function F(q) {
            var ae, fe = [q], xe = [];
            for (q.depth = 0; (ae = fe.pop()) != null; )
              if (xe.push(ae), (Le = C.call(F, ae, ae.depth)) && (ke = Le.length)) {
                for (var ke, Le, Ve; --ke >= 0; )
                  fe.push(Ve = Le[ke]), Ve.parent = ae, Ve.depth = ae.depth + 1;
                D && (ae.value = 0), ae.children = Le;
              } else
                D && (ae.value = +D.call(F, ae, ae.depth) || 0), delete ae.children;
            return ar(q, function(Je) {
              var at, _t;
              ce && (at = Je.children) && at.sort(ce), D && (_t = Je.parent) && (_t.value += Je.value);
            }), xe;
          }
          return F.sort = function(q) {
            return arguments.length ? (ce = q, F) : ce;
          }, F.children = function(q) {
            return arguments.length ? (C = q, F) : C;
          }, F.value = function(q) {
            return arguments.length ? (D = q, F) : D;
          }, F.revalue = function(q) {
            return D && (Yt(q, function(ae) {
              ae.children && (ae.value = 0);
            }), ar(q, function(ae) {
              var fe;
              ae.children || (ae.value = +D.call(F, ae, ae.depth) || 0), (fe = ae.parent) && (fe.value += ae.value);
            })), q;
          }, F;
        }, m.layout.partition = function() {
          var ce = m.layout.hierarchy(), C = [1, 1];
          function D(F, q) {
            var ae = ce.call(this, F, q);
            return function fe(xe, ke, Le, Ve) {
              var Je = xe.children;
              if (xe.x = ke, xe.y = xe.depth * Ve, xe.dx = Le, xe.dy = Ve, Je && (at = Je.length)) {
                var at, _t, Et, kt = -1;
                for (Le = xe.value ? Le / xe.value : 0; ++kt < at; )
                  fe(_t = Je[kt], ke, Et = _t.value * Le, Ve), ke += Et;
              }
            }(ae[0], 0, C[0], C[1] / function fe(xe) {
              var ke = xe.children, Le = 0;
              if (ke && (Ve = ke.length))
                for (var Ve, Je = -1; ++Je < Ve; )
                  Le = Math.max(Le, fe(ke[Je]));
              return 1 + Le;
            }(ae[0])), ae;
          }
          return D.size = function(F) {
            return arguments.length ? (C = F, D) : C;
          }, Qt(D, ce);
        }, m.layout.pie = function() {
          var ce = Number, C = nn, D = 0, F = Vt, q = 0;
          function ae(fe) {
            var xe, ke = fe.length, Le = fe.map(function(Dt, Ot) {
              return +ce.call(ae, Dt, Ot);
            }), Ve = +(typeof D == "function" ? D.apply(this, arguments) : D), Je = (typeof F == "function" ? F.apply(this, arguments) : F) - Ve, at = Math.min(Math.abs(Je) / ke, +(typeof q == "function" ? q.apply(this, arguments) : q)), _t = at * (Je < 0 ? -1 : 1), Et = m.sum(Le), kt = Et ? (Je - ke * _t) / Et : 0, At = m.range(ke), xt = [];
            return C != null && At.sort(C === nn ? function(Dt, Ot) {
              return Le[Ot] - Le[Dt];
            } : function(Dt, Ot) {
              return C(fe[Dt], fe[Ot]);
            }), At.forEach(function(Dt) {
              xt[Dt] = { data: fe[Dt], value: xe = Le[Dt], startAngle: Ve, endAngle: Ve += xe * kt + _t, padAngle: at };
            }), xt;
          }
          return ae.value = function(fe) {
            return arguments.length ? (ce = fe, ae) : ce;
          }, ae.sort = function(fe) {
            return arguments.length ? (C = fe, ae) : C;
          }, ae.startAngle = function(fe) {
            return arguments.length ? (D = fe, ae) : D;
          }, ae.endAngle = function(fe) {
            return arguments.length ? (F = fe, ae) : F;
          }, ae.padAngle = function(fe) {
            return arguments.length ? (q = fe, ae) : q;
          }, ae;
        };
        var nn = {};
        function pn(ce) {
          return ce.x;
        }
        function Cn(ce) {
          return ce.y;
        }
        function On(ce, C, D) {
          ce.y0 = C, ce.y = D;
        }
        m.layout.stack = function() {
          var ce = E, C = ma, D = Ma, F = On, q = pn, ae = Cn;
          function fe(xe, ke) {
            if (!(at = xe.length))
              return xe;
            var Le = xe.map(function(Dt, Ot) {
              return ce.call(fe, Dt, Ot);
            }), Ve = Le.map(function(Dt) {
              return Dt.map(function(Ot, jt) {
                return [q.call(fe, Ot, jt), ae.call(fe, Ot, jt)];
              });
            }), Je = C.call(fe, Ve, ke);
            Le = m.permute(Le, Je), Ve = m.permute(Ve, Je);
            var at, _t, Et, kt, At = D.call(fe, Ve, ke), xt = Le[0].length;
            for (Et = 0; Et < xt; ++Et)
              for (F.call(fe, Le[0][Et], kt = At[Et], Ve[0][Et][1]), _t = 1; _t < at; ++_t)
                F.call(fe, Le[_t][Et], kt += Ve[_t - 1][Et][1], Ve[_t][Et][1]);
            return xe;
          }
          return fe.values = function(xe) {
            return arguments.length ? (ce = xe, fe) : ce;
          }, fe.order = function(xe) {
            return arguments.length ? (C = typeof xe == "function" ? xe : Vn.get(xe) || ma, fe) : C;
          }, fe.offset = function(xe) {
            return arguments.length ? (D = typeof xe == "function" ? xe : zn.get(xe) || Ma, fe) : D;
          }, fe.x = function(xe) {
            return arguments.length ? (q = xe, fe) : q;
          }, fe.y = function(xe) {
            return arguments.length ? (ae = xe, fe) : ae;
          }, fe.out = function(xe) {
            return arguments.length ? (F = xe, fe) : F;
          }, fe;
        };
        var Vn = m.map({ "inside-out": function(ce) {
          var C, D, F = ce.length, q = ce.map(Na), ae = ce.map(Ba), fe = m.range(F).sort(function(Je, at) {
            return q[Je] - q[at];
          }), xe = 0, ke = 0, Le = [], Ve = [];
          for (C = 0; C < F; ++C)
            D = fe[C], xe < ke ? (xe += ae[D], Le.push(D)) : (ke += ae[D], Ve.push(D));
          return Ve.reverse().concat(Le);
        }, reverse: function(ce) {
          return m.range(ce.length).reverse();
        }, default: ma }), zn = m.map({ silhouette: function(ce) {
          var C, D, F, q = ce.length, ae = ce[0].length, fe = [], xe = 0, ke = [];
          for (D = 0; D < ae; ++D) {
            for (C = 0, F = 0; C < q; C++)
              F += ce[C][D][1];
            F > xe && (xe = F), fe.push(F);
          }
          for (D = 0; D < ae; ++D)
            ke[D] = (xe - fe[D]) / 2;
          return ke;
        }, wiggle: function(ce) {
          var C, D, F, q, ae, fe, xe, ke, Le, Ve = ce.length, Je = ce[0], at = Je.length, _t = [];
          for (_t[0] = ke = Le = 0, D = 1; D < at; ++D) {
            for (C = 0, q = 0; C < Ve; ++C)
              q += ce[C][D][1];
            for (C = 0, ae = 0, xe = Je[D][0] - Je[D - 1][0]; C < Ve; ++C) {
              for (F = 0, fe = (ce[C][D][1] - ce[C][D - 1][1]) / (2 * xe); F < C; ++F)
                fe += (ce[F][D][1] - ce[F][D - 1][1]) / xe;
              ae += fe * ce[C][D][1];
            }
            _t[D] = ke -= q ? ae / q * xe : 0, ke < Le && (Le = ke);
          }
          for (D = 0; D < at; ++D)
            _t[D] -= Le;
          return _t;
        }, expand: function(ce) {
          var C, D, F, q = ce.length, ae = ce[0].length, fe = 1 / q, xe = [];
          for (D = 0; D < ae; ++D) {
            for (C = 0, F = 0; C < q; C++)
              F += ce[C][D][1];
            if (F)
              for (C = 0; C < q; C++)
                ce[C][D][1] /= F;
            else
              for (C = 0; C < q; C++)
                ce[C][D][1] = fe;
          }
          for (D = 0; D < ae; ++D)
            xe[D] = 0;
          return xe;
        }, zero: Ma });
        function ma(ce) {
          return m.range(ce.length);
        }
        function Ma(ce) {
          for (var C = -1, D = ce[0].length, F = []; ++C < D; )
            F[C] = 0;
          return F;
        }
        function Na(ce) {
          for (var C, D = 1, F = 0, q = ce[0][1], ae = ce.length; D < ae; ++D)
            (C = ce[D][1]) > q && (F = D, q = C);
          return F;
        }
        function Ba(ce) {
          return ce.reduce(ja, 0);
        }
        function ja(ce, C) {
          return ce + C[1];
        }
        function _i(ce, C) {
          return yi(ce, Math.ceil(Math.log(C.length) / Math.LN2 + 1));
        }
        function yi(ce, C) {
          for (var D = -1, F = +ce[0], q = (ce[1] - F) / C, ae = []; ++D <= C; )
            ae[D] = q * D + F;
          return ae;
        }
        function ii(ce) {
          return [m.min(ce), m.max(ce)];
        }
        function oi(ce, C) {
          return ce.value - C.value;
        }
        function xi(ce, C) {
          var D = ce._pack_next;
          ce._pack_next = C, C._pack_prev = ce, C._pack_next = D, D._pack_prev = C;
        }
        function Fi(ce, C) {
          ce._pack_next = C, C._pack_prev = ce;
        }
        function Ji(ce, C) {
          var D = C.x - ce.x, F = C.y - ce.y, q = ce.r + C.r;
          return 0.999 * q * q > D * D + F * F;
        }
        function Ki(ce) {
          if ((C = ce.children) && (ke = C.length)) {
            var C, D, F, q, ae, fe, xe, ke, Le = 1 / 0, Ve = -1 / 0, Je = 1 / 0, at = -1 / 0;
            if (C.forEach(Qi), (D = C[0]).x = -D.r, D.y = 0, Ot(D), ke > 1 && ((F = C[1]).x = F.r, F.y = 0, Ot(F), ke > 2))
              for (Oa(D, F, q = C[2]), Ot(q), xi(D, q), D._pack_prev = q, xi(q, F), F = D._pack_next, ae = 3; ae < ke; ae++) {
                Oa(D, F, q = C[ae]);
                var _t = 0, Et = 1, kt = 1;
                for (fe = F._pack_next; fe !== F; fe = fe._pack_next, Et++)
                  if (Ji(fe, q)) {
                    _t = 1;
                    break;
                  }
                if (_t == 1)
                  for (xe = D._pack_prev; xe !== fe._pack_prev && !Ji(xe, q); xe = xe._pack_prev, kt++)
                    ;
                _t ? (Et < kt || Et == kt && F.r < D.r ? Fi(D, F = fe) : Fi(D = xe, F), ae--) : (xi(D, q), F = q, Ot(q));
              }
            var At = (Le + Ve) / 2, xt = (Je + at) / 2, Dt = 0;
            for (ae = 0; ae < ke; ae++)
              (q = C[ae]).x -= At, q.y -= xt, Dt = Math.max(Dt, q.r + Math.sqrt(q.x * q.x + q.y * q.y));
            ce.r = Dt, C.forEach($i);
          }
          function Ot(jt) {
            Le = Math.min(jt.x - jt.r, Le), Ve = Math.max(jt.x + jt.r, Ve), Je = Math.min(jt.y - jt.r, Je), at = Math.max(jt.y + jt.r, at);
          }
        }
        function Qi(ce) {
          ce._pack_next = ce._pack_prev = ce;
        }
        function $i(ce) {
          delete ce._pack_next, delete ce._pack_prev;
        }
        function Oa(ce, C, D) {
          var F = ce.r + D.r, q = C.x - ce.x, ae = C.y - ce.y;
          if (F && (q || ae)) {
            var fe = C.r + D.r, xe = q * q + ae * ae, ke = 0.5 + ((F *= F) - (fe *= fe)) / (2 * xe), Le = Math.sqrt(Math.max(0, 2 * fe * (F + xe) - (F -= xe) * F - fe * fe)) / (2 * xe);
            D.x = ce.x + ke * q + Le * ae, D.y = ce.y + ke * ae - Le * q;
          } else
            D.x = ce.x + F, D.y = ce.y;
        }
        function ht(ce, C) {
          return ce.parent == C.parent ? 1 : 2;
        }
        function zt(ce) {
          var C = ce.children;
          return C.length ? C[0] : ce.t;
        }
        function sr(ce) {
          var C, D = ce.children;
          return (C = D.length) ? D[C - 1] : ce.t;
        }
        function Ht(ce, C, D) {
          var F = D / (C.i - ce.i);
          C.c -= F, C.s += D, ce.c += F, C.z += D, C.m += D;
        }
        function lr(ce, C, D) {
          return ce.a.parent === C.parent ? ce.a : D;
        }
        function Pr(ce) {
          return { x: ce.x, y: ce.y, dx: ce.dx, dy: ce.dy };
        }
        function Nr(ce, C) {
          var D = ce.x + C[3], F = ce.y + C[0], q = ce.dx - C[1] - C[3], ae = ce.dy - C[0] - C[2];
          return q < 0 && (D += q / 2, q = 0), ae < 0 && (F += ae / 2, ae = 0), { x: D, y: F, dx: q, dy: ae };
        }
        function Wr(ce) {
          var C = ce[0], D = ce[ce.length - 1];
          return C < D ? [C, D] : [D, C];
        }
        function sn(ce) {
          return ce.rangeExtent ? ce.rangeExtent() : Wr(ce.range());
        }
        function an(ce, C, D, F) {
          var q = D(ce[0], ce[1]), ae = F(C[0], C[1]);
          return function(fe) {
            return ae(q(fe));
          };
        }
        function dn(ce, C) {
          var D, F = 0, q = ce.length - 1, ae = ce[F], fe = ce[q];
          return fe < ae && (D = F, F = q, q = D, D = ae, ae = fe, fe = D), ce[F] = C.floor(ae), ce[q] = C.ceil(fe), ce;
        }
        function Tn(ce) {
          return ce ? { floor: function(C) {
            return Math.floor(C / ce) * ce;
          }, ceil: function(C) {
            return Math.ceil(C / ce) * ce;
          } } : ln;
        }
        m.layout.histogram = function() {
          var ce = !0, C = Number, D = ii, F = _i;
          function q(ae, fe) {
            for (var xe, ke, Le = [], Ve = ae.map(C, this), Je = D.call(this, Ve, fe), at = F.call(this, Je, Ve, fe), _t = (fe = -1, Ve.length), Et = at.length - 1, kt = ce ? 1 : 1 / _t; ++fe < Et; )
              (xe = Le[fe] = []).dx = at[fe + 1] - (xe.x = at[fe]), xe.y = 0;
            if (Et > 0)
              for (fe = -1; ++fe < _t; )
                (ke = Ve[fe]) >= Je[0] && ke <= Je[1] && ((xe = Le[m.bisect(at, ke, 1, Et) - 1]).y += kt, xe.push(ae[fe]));
            return Le;
          }
          return q.value = function(ae) {
            return arguments.length ? (C = ae, q) : C;
          }, q.range = function(ae) {
            return arguments.length ? (D = gr(ae), q) : D;
          }, q.bins = function(ae) {
            return arguments.length ? (F = typeof ae == "number" ? function(fe) {
              return yi(fe, ae);
            } : gr(ae), q) : F;
          }, q.frequency = function(ae) {
            return arguments.length ? (ce = !!ae, q) : ce;
          }, q;
        }, m.layout.pack = function() {
          var ce, C = m.layout.hierarchy().sort(oi), D = 0, F = [1, 1];
          function q(ae, fe) {
            var xe = C.call(this, ae, fe), ke = xe[0], Le = F[0], Ve = F[1], Je = ce == null ? Math.sqrt : typeof ce == "function" ? ce : function() {
              return ce;
            };
            if (ke.x = ke.y = 0, ar(ke, function(_t) {
              _t.r = +Je(_t.value);
            }), ar(ke, Ki), D) {
              var at = D * (ce ? 1 : Math.max(2 * ke.r / Le, 2 * ke.r / Ve)) / 2;
              ar(ke, function(_t) {
                _t.r += at;
              }), ar(ke, Ki), ar(ke, function(_t) {
                _t.r -= at;
              });
            }
            return function _t(Et, kt, At, xt) {
              var Dt = Et.children;
              if (Et.x = kt += xt * Et.x, Et.y = At += xt * Et.y, Et.r *= xt, Dt)
                for (var Ot = -1, jt = Dt.length; ++Ot < jt; )
                  _t(Dt[Ot], kt, At, xt);
            }(ke, Le / 2, Ve / 2, ce ? 1 : 1 / Math.max(2 * ke.r / Le, 2 * ke.r / Ve)), xe;
          }
          return q.size = function(ae) {
            return arguments.length ? (F = ae, q) : F;
          }, q.radius = function(ae) {
            return arguments.length ? (ce = ae == null || typeof ae == "function" ? ae : +ae, q) : ce;
          }, q.padding = function(ae) {
            return arguments.length ? (D = +ae, q) : D;
          }, Qt(q, C);
        }, m.layout.tree = function() {
          var ce = m.layout.hierarchy().sort(null).value(null), C = ht, D = [1, 1], F = null;
          function q(ke, Le) {
            var Ve = ce.call(this, ke, Le), Je = Ve[0], at = function(Ot) {
              for (var jt, rr = { A: null, children: [Ot] }, dr = [rr]; (jt = dr.pop()) != null; )
                for (var Sr, kr = jt.children, Jr = 0, Xr = kr.length; Jr < Xr; ++Jr)
                  dr.push((kr[Jr] = Sr = { _: kr[Jr], parent: jt, children: (Sr = kr[Jr].children) && Sr.slice() || [], A: null, a: null, z: 0, m: 0, c: 0, s: 0, t: null, i: Jr }).a = Sr);
              return rr.children[0];
            }(Je);
            if (ar(at, ae), at.parent.m = -at.z, Yt(at, fe), F)
              Yt(Je, xe);
            else {
              var _t = Je, Et = Je, kt = Je;
              Yt(Je, function(Ot) {
                Ot.x < _t.x && (_t = Ot), Ot.x > Et.x && (Et = Ot), Ot.depth > kt.depth && (kt = Ot);
              });
              var At = C(_t, Et) / 2 - _t.x, xt = D[0] / (Et.x + C(Et, _t) / 2 + At), Dt = D[1] / (kt.depth || 1);
              Yt(Je, function(Ot) {
                Ot.x = (Ot.x + At) * xt, Ot.y = Ot.depth * Dt;
              });
            }
            return Ve;
          }
          function ae(ke) {
            var Le = ke.children, Ve = ke.parent.children, Je = ke.i ? Ve[ke.i - 1] : null;
            if (Le.length) {
              (function(_t) {
                for (var Et, kt = 0, At = 0, xt = _t.children, Dt = xt.length; --Dt >= 0; )
                  (Et = xt[Dt]).z += kt, Et.m += kt, kt += Et.s + (At += Et.c);
              })(ke);
              var at = (Le[0].z + Le[Le.length - 1].z) / 2;
              Je ? (ke.z = Je.z + C(ke._, Je._), ke.m = ke.z - at) : ke.z = at;
            } else
              Je && (ke.z = Je.z + C(ke._, Je._));
            ke.parent.A = function(_t, Et, kt) {
              if (Et) {
                for (var At, xt = _t, Dt = _t, Ot = Et, jt = xt.parent.children[0], rr = xt.m, dr = Dt.m, Sr = Ot.m, kr = jt.m; Ot = sr(Ot), xt = zt(xt), Ot && xt; )
                  jt = zt(jt), (Dt = sr(Dt)).a = _t, (At = Ot.z + Sr - xt.z - rr + C(Ot._, xt._)) > 0 && (Ht(lr(Ot, _t, kt), _t, At), rr += At, dr += At), Sr += Ot.m, rr += xt.m, kr += jt.m, dr += Dt.m;
                Ot && !sr(Dt) && (Dt.t = Ot, Dt.m += Sr - dr), xt && !zt(jt) && (jt.t = xt, jt.m += rr - kr, kt = _t);
              }
              return kt;
            }(ke, Je, ke.parent.A || Ve[0]);
          }
          function fe(ke) {
            ke._.x = ke.z + ke.parent.m, ke.m += ke.parent.m;
          }
          function xe(ke) {
            ke.x *= D[0], ke.y = ke.depth * D[1];
          }
          return q.separation = function(ke) {
            return arguments.length ? (C = ke, q) : C;
          }, q.size = function(ke) {
            return arguments.length ? (F = (D = ke) == null ? xe : null, q) : F ? null : D;
          }, q.nodeSize = function(ke) {
            return arguments.length ? (F = (D = ke) == null ? null : xe, q) : F ? D : null;
          }, Qt(q, ce);
        }, m.layout.cluster = function() {
          var ce = m.layout.hierarchy().sort(null).value(null), C = ht, D = [1, 1], F = !1;
          function q(ae, fe) {
            var xe, ke = ce.call(this, ae, fe), Le = ke[0], Ve = 0;
            ar(Le, function(kt) {
              var At = kt.children;
              At && At.length ? (kt.x = function(xt) {
                return xt.reduce(function(Dt, Ot) {
                  return Dt + Ot.x;
                }, 0) / xt.length;
              }(At), kt.y = function(xt) {
                return 1 + m.max(xt, function(Dt) {
                  return Dt.y;
                });
              }(At)) : (kt.x = xe ? Ve += C(kt, xe) : 0, kt.y = 0, xe = kt);
            });
            var Je = function kt(At) {
              var xt = At.children;
              return xt && xt.length ? kt(xt[0]) : At;
            }(Le), at = function kt(At) {
              var xt, Dt = At.children;
              return Dt && (xt = Dt.length) ? kt(Dt[xt - 1]) : At;
            }(Le), _t = Je.x - C(Je, at) / 2, Et = at.x + C(at, Je) / 2;
            return ar(Le, F ? function(kt) {
              kt.x = (kt.x - Le.x) * D[0], kt.y = (Le.y - kt.y) * D[1];
            } : function(kt) {
              kt.x = (kt.x - _t) / (Et - _t) * D[0], kt.y = (1 - (Le.y ? kt.y / Le.y : 1)) * D[1];
            }), ke;
          }
          return q.separation = function(ae) {
            return arguments.length ? (C = ae, q) : C;
          }, q.size = function(ae) {
            return arguments.length ? (F = (D = ae) == null, q) : F ? null : D;
          }, q.nodeSize = function(ae) {
            return arguments.length ? (F = (D = ae) != null, q) : F ? D : null;
          }, Qt(q, ce);
        }, m.layout.treemap = function() {
          var ce, C = m.layout.hierarchy(), D = Math.round, F = [1, 1], q = null, ae = Pr, fe = !1, xe = "squarify", ke = 0.5 * (1 + Math.sqrt(5));
          function Le(kt, At) {
            for (var xt, Dt, Ot = -1, jt = kt.length; ++Ot < jt; )
              Dt = (xt = kt[Ot]).value * (At < 0 ? 0 : At), xt.area = isNaN(Dt) || Dt <= 0 ? 0 : Dt;
          }
          function Ve(kt) {
            var At = kt.children;
            if (At && At.length) {
              var xt, Dt, Ot, jt = ae(kt), rr = [], dr = At.slice(), Sr = 1 / 0, kr = xe === "slice" ? jt.dx : xe === "dice" ? jt.dy : xe === "slice-dice" ? 1 & kt.depth ? jt.dy : jt.dx : Math.min(jt.dx, jt.dy);
              for (Le(dr, jt.dx * jt.dy / kt.value), rr.area = 0; (Ot = dr.length) > 0; )
                rr.push(xt = dr[Ot - 1]), rr.area += xt.area, xe !== "squarify" || (Dt = at(rr, kr)) <= Sr ? (dr.pop(), Sr = Dt) : (rr.area -= rr.pop().area, _t(rr, kr, jt, !1), kr = Math.min(jt.dx, jt.dy), rr.length = rr.area = 0, Sr = 1 / 0);
              rr.length && (_t(rr, kr, jt, !0), rr.length = rr.area = 0), At.forEach(Ve);
            }
          }
          function Je(kt) {
            var At = kt.children;
            if (At && At.length) {
              var xt, Dt = ae(kt), Ot = At.slice(), jt = [];
              for (Le(Ot, Dt.dx * Dt.dy / kt.value), jt.area = 0; xt = Ot.pop(); )
                jt.push(xt), jt.area += xt.area, xt.z != null && (_t(jt, xt.z ? Dt.dx : Dt.dy, Dt, !Ot.length), jt.length = jt.area = 0);
              At.forEach(Je);
            }
          }
          function at(kt, At) {
            for (var xt, Dt = kt.area, Ot = 0, jt = 1 / 0, rr = -1, dr = kt.length; ++rr < dr; )
              (xt = kt[rr].area) && (xt < jt && (jt = xt), xt > Ot && (Ot = xt));
            return At *= At, (Dt *= Dt) ? Math.max(At * Ot * ke / Dt, Dt / (At * jt * ke)) : 1 / 0;
          }
          function _t(kt, At, xt, Dt) {
            var Ot, jt = -1, rr = kt.length, dr = xt.x, Sr = xt.y, kr = At ? D(kt.area / At) : 0;
            if (At == xt.dx) {
              for ((Dt || kr > xt.dy) && (kr = xt.dy); ++jt < rr; )
                (Ot = kt[jt]).x = dr, Ot.y = Sr, Ot.dy = kr, dr += Ot.dx = Math.min(xt.x + xt.dx - dr, kr ? D(Ot.area / kr) : 0);
              Ot.z = !0, Ot.dx += xt.x + xt.dx - dr, xt.y += kr, xt.dy -= kr;
            } else {
              for ((Dt || kr > xt.dx) && (kr = xt.dx); ++jt < rr; )
                (Ot = kt[jt]).x = dr, Ot.y = Sr, Ot.dx = kr, Sr += Ot.dy = Math.min(xt.y + xt.dy - Sr, kr ? D(Ot.area / kr) : 0);
              Ot.z = !1, Ot.dy += xt.y + xt.dy - Sr, xt.x += kr, xt.dx -= kr;
            }
          }
          function Et(kt) {
            var At = ce || C(kt), xt = At[0];
            return xt.x = xt.y = 0, xt.value ? (xt.dx = F[0], xt.dy = F[1]) : xt.dx = xt.dy = 0, ce && C.revalue(xt), Le([xt], xt.dx * xt.dy / xt.value), (ce ? Je : Ve)(xt), fe && (ce = At), At;
          }
          return Et.size = function(kt) {
            return arguments.length ? (F = kt, Et) : F;
          }, Et.padding = function(kt) {
            if (!arguments.length)
              return q;
            function At(Ot) {
              var jt = kt.call(Et, Ot, Ot.depth);
              return jt == null ? Pr(Ot) : Nr(Ot, typeof jt == "number" ? [jt, jt, jt, jt] : jt);
            }
            function xt(Ot) {
              return Nr(Ot, kt);
            }
            var Dt;
            return ae = (q = kt) == null ? Pr : (Dt = typeof kt) == "function" ? At : (Dt === "number" && (kt = [kt, kt, kt, kt]), xt), Et;
          }, Et.round = function(kt) {
            return arguments.length ? (D = kt ? Math.round : Number, Et) : D != Number;
          }, Et.sticky = function(kt) {
            return arguments.length ? (fe = kt, ce = null, Et) : fe;
          }, Et.ratio = function(kt) {
            return arguments.length ? (ke = kt, Et) : ke;
          }, Et.mode = function(kt) {
            return arguments.length ? (xe = kt + "", Et) : xe;
          }, Qt(Et, C);
        }, m.random = { normal: function(ce, C) {
          var D = arguments.length;
          return D < 2 && (C = 1), D < 1 && (ce = 0), function() {
            var F, q, ae;
            do
              ae = (F = 2 * Math.random() - 1) * F + (q = 2 * Math.random() - 1) * q;
            while (!ae || ae > 1);
            return ce + C * F * Math.sqrt(-2 * Math.log(ae) / ae);
          };
        }, logNormal: function() {
          var ce = m.random.normal.apply(m, arguments);
          return function() {
            return Math.exp(ce());
          };
        }, bates: function(ce) {
          var C = m.random.irwinHall(ce);
          return function() {
            return C() / ce;
          };
        }, irwinHall: function(ce) {
          return function() {
            for (var C = 0, D = 0; D < ce; D++)
              C += Math.random();
            return C;
          };
        } }, m.scale = {};
        var ln = { floor: E, ceil: E };
        function kn(ce, C, D, F) {
          var q = [], ae = [], fe = 0, xe = Math.min(ce.length, C.length) - 1;
          for (ce[xe] < ce[0] && (ce = ce.slice().reverse(), C = C.slice().reverse()); ++fe <= xe; )
            q.push(D(ce[fe - 1], ce[fe])), ae.push(F(C[fe - 1], C[fe]));
          return function(ke) {
            var Le = m.bisect(ce, ke, 1, xe) - 1;
            return ae[Le](q[Le](ke));
          };
        }
        function Rn(ce, C) {
          return m.rebind(ce, C, "range", "rangeRound", "interpolate", "clamp");
        }
        function Un(ce, C) {
          return dn(ce, Tn(ia(ce, C)[2])), dn(ce, Tn(ia(ce, C)[2])), ce;
        }
        function ia(ce, C) {
          C == null && (C = 10);
          var D = Wr(ce), F = D[1] - D[0], q = Math.pow(10, Math.floor(Math.log(F / C) / Math.LN10)), ae = C / F * q;
          return ae <= 0.15 ? q *= 10 : ae <= 0.35 ? q *= 5 : ae <= 0.75 && (q *= 2), D[0] = Math.ceil(D[0] / q) * q, D[1] = Math.floor(D[1] / q) * q + 0.5 * q, D[2] = q, D;
        }
        function Zr(ce, C) {
          return m.range.apply(m, ia(ce, C));
        }
        m.scale.linear = function() {
          return function ce(C, D, F, q) {
            var ae, fe;
            function xe() {
              var Le = Math.min(C.length, D.length) > 2 ? kn : an, Ve = q ? Eo : us;
              return ae = Le(C, D, Ve, F), fe = Le(D, C, Ve, Ri), ke;
            }
            function ke(Le) {
              return ae(Le);
            }
            return ke.invert = function(Le) {
              return fe(Le);
            }, ke.domain = function(Le) {
              return arguments.length ? (C = Le.map(Number), xe()) : C;
            }, ke.range = function(Le) {
              return arguments.length ? (D = Le, xe()) : D;
            }, ke.rangeRound = function(Le) {
              return ke.range(Le).interpolate(No);
            }, ke.clamp = function(Le) {
              return arguments.length ? (q = Le, xe()) : q;
            }, ke.interpolate = function(Le) {
              return arguments.length ? (F = Le, xe()) : F;
            }, ke.ticks = function(Le) {
              return Zr(C, Le);
            }, ke.tickFormat = function(Le, Ve) {
              return d3_scale_linearTickFormat(C, Le, Ve);
            }, ke.nice = function(Le) {
              return Un(C, Le), xe();
            }, ke.copy = function() {
              return ce(C, D, F, q);
            }, xe();
          }([0, 1], [0, 1], Ri, !1);
        }, m.scale.log = function() {
          return function ce(C, D, F, q) {
            function ae(ke) {
              return (F ? Math.log(ke < 0 ? 0 : ke) : -Math.log(ke > 0 ? 0 : -ke)) / Math.log(D);
            }
            function fe(ke) {
              return F ? Math.pow(D, ke) : -Math.pow(D, -ke);
            }
            function xe(ke) {
              return C(ae(ke));
            }
            return xe.invert = function(ke) {
              return fe(C.invert(ke));
            }, xe.domain = function(ke) {
              return arguments.length ? (F = ke[0] >= 0, C.domain((q = ke.map(Number)).map(ae)), xe) : q;
            }, xe.base = function(ke) {
              return arguments.length ? (D = +ke, C.domain(q.map(ae)), xe) : D;
            }, xe.nice = function() {
              var ke = dn(q.map(ae), F ? Math : ta);
              return C.domain(ke), q = ke.map(fe), xe;
            }, xe.ticks = function() {
              var ke = Wr(q), Le = [], Ve = ke[0], Je = ke[1], at = Math.floor(ae(Ve)), _t = Math.ceil(ae(Je)), Et = D % 1 ? 2 : D;
              if (isFinite(_t - at)) {
                if (F) {
                  for (; at < _t; at++)
                    for (var kt = 1; kt < Et; kt++)
                      Le.push(fe(at) * kt);
                  Le.push(fe(at));
                } else
                  for (Le.push(fe(at)); at++ < _t; )
                    for (kt = Et - 1; kt > 0; kt--)
                      Le.push(fe(at) * kt);
                for (at = 0; Le[at] < Ve; at++)
                  ;
                for (_t = Le.length; Le[_t - 1] > Je; _t--)
                  ;
                Le = Le.slice(at, _t);
              }
              return Le;
            }, xe.copy = function() {
              return ce(C.copy(), D, F, q);
            }, Rn(xe, C);
          }(m.scale.linear().domain([0, 1]), 10, !0, [1, 10]);
        };
        var ta = { floor: function(ce) {
          return -Math.ceil(-ce);
        }, ceil: function(ce) {
          return -Math.floor(-ce);
        } };
        function Pn(ce) {
          return function(C) {
            return C < 0 ? -Math.pow(-C, ce) : Math.pow(C, ce);
          };
        }
        m.scale.pow = function() {
          return function ce(C, D, F) {
            var q = Pn(D), ae = Pn(1 / D);
            function fe(xe) {
              return C(q(xe));
            }
            return fe.invert = function(xe) {
              return ae(C.invert(xe));
            }, fe.domain = function(xe) {
              return arguments.length ? (C.domain((F = xe.map(Number)).map(q)), fe) : F;
            }, fe.ticks = function(xe) {
              return Zr(F, xe);
            }, fe.tickFormat = function(xe, ke) {
              return d3_scale_linearTickFormat(F, xe, ke);
            }, fe.nice = function(xe) {
              return fe.domain(Un(F, xe));
            }, fe.exponent = function(xe) {
              return arguments.length ? (q = Pn(D = xe), ae = Pn(1 / D), C.domain(F.map(q)), fe) : D;
            }, fe.copy = function() {
              return ce(C.copy(), D, F);
            }, Rn(fe, C);
          }(m.scale.linear(), 1, [0, 1]);
        }, m.scale.sqrt = function() {
          return m.scale.pow().exponent(0.5);
        }, m.scale.ordinal = function() {
          return function ce(C, D) {
            var F, q, ae;
            function fe(ke) {
              return q[((F.get(ke) || (D.t === "range" ? F.set(ke, C.push(ke)) : NaN)) - 1) % q.length];
            }
            function xe(ke, Le) {
              return m.range(C.length).map(function(Ve) {
                return ke + Le * Ve;
              });
            }
            return fe.domain = function(ke) {
              if (!arguments.length)
                return C;
              C = [], F = new _();
              for (var Le, Ve = -1, Je = ke.length; ++Ve < Je; )
                F.has(Le = ke[Ve]) || F.set(Le, C.push(Le));
              return fe[D.t].apply(fe, D.a);
            }, fe.range = function(ke) {
              return arguments.length ? (q = ke, ae = 0, D = { t: "range", a: arguments }, fe) : q;
            }, fe.rangePoints = function(ke, Le) {
              arguments.length < 2 && (Le = 0);
              var Ve = ke[0], Je = ke[1], at = C.length < 2 ? (Ve = (Ve + Je) / 2, 0) : (Je - Ve) / (C.length - 1 + Le);
              return q = xe(Ve + at * Le / 2, at), ae = 0, D = { t: "rangePoints", a: arguments }, fe;
            }, fe.rangeRoundPoints = function(ke, Le) {
              arguments.length < 2 && (Le = 0);
              var Ve = ke[0], Je = ke[1], at = C.length < 2 ? (Ve = Je = Math.round((Ve + Je) / 2), 0) : (Je - Ve) / (C.length - 1 + Le) | 0;
              return q = xe(Ve + Math.round(at * Le / 2 + (Je - Ve - (C.length - 1 + Le) * at) / 2), at), ae = 0, D = { t: "rangeRoundPoints", a: arguments }, fe;
            }, fe.rangeBands = function(ke, Le, Ve) {
              arguments.length < 2 && (Le = 0), arguments.length < 3 && (Ve = Le);
              var Je = ke[1] < ke[0], at = ke[Je - 0], _t = ke[1 - Je], Et = (_t - at) / (C.length - Le + 2 * Ve);
              return q = xe(at + Et * Ve, Et), Je && q.reverse(), ae = Et * (1 - Le), D = { t: "rangeBands", a: arguments }, fe;
            }, fe.rangeRoundBands = function(ke, Le, Ve) {
              arguments.length < 2 && (Le = 0), arguments.length < 3 && (Ve = Le);
              var Je = ke[1] < ke[0], at = ke[Je - 0], _t = ke[1 - Je], Et = Math.floor((_t - at) / (C.length - Le + 2 * Ve));
              return q = xe(at + Math.round((_t - at - (C.length - Le) * Et) / 2), Et), Je && q.reverse(), ae = Math.round(Et * (1 - Le)), D = { t: "rangeRoundBands", a: arguments }, fe;
            }, fe.rangeBand = function() {
              return ae;
            }, fe.rangeExtent = function() {
              return Wr(D.a[0]);
            }, fe.copy = function() {
              return ce(C, D);
            }, fe.domain(C);
          }([], { t: "range", a: [[]] });
        }, m.scale.category10 = function() {
          return m.scale.ordinal().range(Nn);
        }, m.scale.category20 = function() {
          return m.scale.ordinal().range(ea);
        }, m.scale.category20b = function() {
          return m.scale.ordinal().range(wa);
        }, m.scale.category20c = function() {
          return m.scale.ordinal().range(La);
        };
        var Nn = [2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175].map(Zt), ea = [2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725].map(Zt), wa = [3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654].map(Zt), La = [3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081].map(Zt);
        function Sn() {
          return 0;
        }
        m.scale.quantile = function() {
          return function ce(C, D) {
            var F;
            function q() {
              var fe = 0, xe = D.length;
              for (F = []; ++fe < xe; )
                F[fe - 1] = m.quantile(C, fe / xe);
              return ae;
            }
            function ae(fe) {
              if (!isNaN(fe = +fe))
                return D[m.bisect(F, fe)];
            }
            return ae.domain = function(fe) {
              return arguments.length ? (C = fe.map(h).filter(l).sort(o), q()) : C;
            }, ae.range = function(fe) {
              return arguments.length ? (D = fe, q()) : D;
            }, ae.quantiles = function() {
              return F;
            }, ae.invertExtent = function(fe) {
              return (fe = D.indexOf(fe)) < 0 ? [NaN, NaN] : [fe > 0 ? F[fe - 1] : C[0], fe < F.length ? F[fe] : C[C.length - 1]];
            }, ae.copy = function() {
              return ce(C, D);
            }, q();
          }([], []);
        }, m.scale.quantize = function() {
          return function ce(C, D, F) {
            var q, ae;
            function fe(ke) {
              return F[Math.max(0, Math.min(ae, Math.floor(q * (ke - C))))];
            }
            function xe() {
              return q = F.length / (D - C), ae = F.length - 1, fe;
            }
            return fe.domain = function(ke) {
              return arguments.length ? (C = +ke[0], D = +ke[ke.length - 1], xe()) : [C, D];
            }, fe.range = function(ke) {
              return arguments.length ? (F = ke, xe()) : F;
            }, fe.invertExtent = function(ke) {
              return [ke = (ke = F.indexOf(ke)) < 0 ? NaN : ke / q + C, ke + 1 / q];
            }, fe.copy = function() {
              return ce(C, D, F);
            }, xe();
          }(0, 1, [0, 1]);
        }, m.scale.threshold = function() {
          return function ce(C, D) {
            function F(q) {
              if (q <= q)
                return D[m.bisect(C, q)];
            }
            return F.domain = function(q) {
              return arguments.length ? (C = q, F) : C;
            }, F.range = function(q) {
              return arguments.length ? (D = q, F) : D;
            }, F.invertExtent = function(q) {
              return q = D.indexOf(q), [C[q - 1], C[q]];
            }, F.copy = function() {
              return ce(C, D);
            }, F;
          }([0.5], [0, 1]);
        }, m.scale.identity = function() {
          return function ce(C) {
            function D(F) {
              return +F;
            }
            return D.invert = D, D.domain = D.range = function(F) {
              return arguments.length ? (C = F.map(D), D) : C;
            }, D.ticks = function(F) {
              return Zr(C, F);
            }, D.tickFormat = function(F, q) {
              return d3_scale_linearTickFormat(C, F, q);
            }, D.copy = function() {
              return ce(C);
            }, D;
          }([0, 1]);
        }, m.svg = {}, m.svg.arc = function() {
          var ce = Ea, C = da, D = Sn, F = za, q = Da, ae = Aa, fe = $a;
          function xe() {
            var Le = Math.max(0, +ce.apply(this, arguments)), Ve = Math.max(0, +C.apply(this, arguments)), Je = q.apply(this, arguments) - Gt, at = ae.apply(this, arguments) - Gt, _t = Math.abs(at - Je), Et = Je > at ? 0 : 1;
            if (Ve < Le && (kt = Ve, Ve = Le, Le = kt), _t >= Xt)
              return ke(Ve, Et) + (Le ? ke(Le, 1 - Et) : "") + "Z";
            var kt, At, xt, Dt, Ot, jt, rr, dr, Sr, kr, Jr, Xr, hn = 0, on = 0, jn = [];
            if ((Dt = (+fe.apply(this, arguments) || 0) / 2) && (xt = F === za ? Math.sqrt(Le * Le + Ve * Ve) : +F.apply(this, arguments), Et || (on *= -1), Ve && (on = Be(xt / Ve * Math.sin(Dt))), Le && (hn = Be(xt / Le * Math.sin(Dt)))), Ve) {
              Ot = Ve * Math.cos(Je + on), jt = Ve * Math.sin(Je + on), rr = Ve * Math.cos(at - on), dr = Ve * Math.sin(at - on);
              var Wn = Math.abs(at - Je - 2 * on) <= Ft ? 0 : 1;
              if (on && ra(Ot, jt, rr, dr) === Et ^ Wn) {
                var ua = (Je + at) / 2;
                Ot = Ve * Math.cos(ua), jt = Ve * Math.sin(ua), rr = dr = null;
              }
            } else
              Ot = jt = 0;
            if (Le) {
              Sr = Le * Math.cos(at - hn), kr = Le * Math.sin(at - hn), Jr = Le * Math.cos(Je + hn), Xr = Le * Math.sin(Je + hn);
              var qr = Math.abs(Je - at + 2 * hn) <= Ft ? 0 : 1;
              if (hn && ra(Sr, kr, Jr, Xr) === 1 - Et ^ qr) {
                var Mn = (Je + at) / 2;
                Sr = Le * Math.cos(Mn), kr = Le * Math.sin(Mn), Jr = Xr = null;
              }
            } else
              Sr = kr = 0;
            if (_t > mt && (kt = Math.min(Math.abs(Ve - Le) / 2, +D.apply(this, arguments))) > 1e-3) {
              At = Le < Ve ^ Et ? 0 : 1;
              var Zn = kt, qn = kt;
              if (_t < Ft) {
                var na = Jr == null ? [Sr, kr] : rr == null ? [Ot, jt] : _n([Ot, jt], [Jr, Xr], [rr, dr], [Sr, kr]), ha = Ot - na[0], Sa = jt - na[1], Qn = rr - na[0], xa = dr - na[1], ga = 1 / Math.sin(Math.acos((ha * Qn + Sa * xa) / (Math.sqrt(ha * ha + Sa * Sa) * Math.sqrt(Qn * Qn + xa * xa))) / 2), Ca = Math.sqrt(na[0] * na[0] + na[1] * na[1]);
                qn = Math.min(kt, (Le - Ca) / (ga - 1)), Zn = Math.min(kt, (Ve - Ca) / (ga + 1));
              }
              if (rr != null) {
                var ba = Za(Jr == null ? [Sr, kr] : [Jr, Xr], [Ot, jt], Ve, Zn, Et), Pa = Za([rr, dr], [Sr, kr], Ve, Zn, Et);
                kt === Zn ? jn.push("M", ba[0], "A", Zn, ",", Zn, " 0 0,", At, " ", ba[1], "A", Ve, ",", Ve, " 0 ", 1 - Et ^ ra(ba[1][0], ba[1][1], Pa[1][0], Pa[1][1]), ",", Et, " ", Pa[1], "A", Zn, ",", Zn, " 0 0,", At, " ", Pa[0]) : jn.push("M", ba[0], "A", Zn, ",", Zn, " 0 1,", At, " ", Pa[0]);
              } else
                jn.push("M", Ot, ",", jt);
              if (Jr != null) {
                var Ua = Za([Ot, jt], [Jr, Xr], Le, -qn, Et), ci = Za([Sr, kr], rr == null ? [Ot, jt] : [rr, dr], Le, -qn, Et);
                kt === qn ? jn.push("L", ci[0], "A", qn, ",", qn, " 0 0,", At, " ", ci[1], "A", Le, ",", Le, " 0 ", Et ^ ra(ci[1][0], ci[1][1], Ua[1][0], Ua[1][1]), ",", 1 - Et, " ", Ua[1], "A", qn, ",", qn, " 0 0,", At, " ", Ua[0]) : jn.push("L", ci[0], "A", qn, ",", qn, " 0 0,", At, " ", Ua[0]);
              } else
                jn.push("L", Sr, ",", kr);
            } else
              jn.push("M", Ot, ",", jt), rr != null && jn.push("A", Ve, ",", Ve, " 0 ", Wn, ",", Et, " ", rr, ",", dr), jn.push("L", Sr, ",", kr), Jr != null && jn.push("A", Le, ",", Le, " 0 ", qr, ",", 1 - Et, " ", Jr, ",", Xr);
            return jn.push("Z"), jn.join("");
          }
          function ke(Le, Ve) {
            return "M0," + Le + "A" + Le + "," + Le + " 0 1," + Ve + " 0," + -Le + "A" + Le + "," + Le + " 0 1," + Ve + " 0," + Le;
          }
          return xe.innerRadius = function(Le) {
            return arguments.length ? (ce = gr(Le), xe) : ce;
          }, xe.outerRadius = function(Le) {
            return arguments.length ? (C = gr(Le), xe) : C;
          }, xe.cornerRadius = function(Le) {
            return arguments.length ? (D = gr(Le), xe) : D;
          }, xe.padRadius = function(Le) {
            return arguments.length ? (F = Le == za ? za : gr(Le), xe) : F;
          }, xe.startAngle = function(Le) {
            return arguments.length ? (q = gr(Le), xe) : q;
          }, xe.endAngle = function(Le) {
            return arguments.length ? (ae = gr(Le), xe) : ae;
          }, xe.padAngle = function(Le) {
            return arguments.length ? (fe = gr(Le), xe) : fe;
          }, xe.centroid = function() {
            var Le = (+ce.apply(this, arguments) + +C.apply(this, arguments)) / 2, Ve = (+q.apply(this, arguments) + +ae.apply(this, arguments)) / 2 - Gt;
            return [Math.cos(Ve) * Le, Math.sin(Ve) * Le];
          }, xe;
        };
        var za = "auto";
        function Ea(ce) {
          return ce.innerRadius;
        }
        function da(ce) {
          return ce.outerRadius;
        }
        function Da(ce) {
          return ce.startAngle;
        }
        function Aa(ce) {
          return ce.endAngle;
        }
        function $a(ce) {
          return ce && ce.padAngle;
        }
        function ra(ce, C, D, F) {
          return (ce - D) * C - (C - F) * ce > 0 ? 0 : 1;
        }
        function Za(ce, C, D, F, q) {
          var ae = ce[0] - C[0], fe = ce[1] - C[1], xe = (q ? F : -F) / Math.sqrt(ae * ae + fe * fe), ke = xe * fe, Le = -xe * ae, Ve = ce[0] + ke, Je = ce[1] + Le, at = C[0] + ke, _t = C[1] + Le, Et = (Ve + at) / 2, kt = (Je + _t) / 2, At = at - Ve, xt = _t - Je, Dt = At * At + xt * xt, Ot = D - F, jt = Ve * _t - at * Je, rr = (xt < 0 ? -1 : 1) * Math.sqrt(Math.max(0, Ot * Ot * Dt - jt * jt)), dr = (jt * xt - At * rr) / Dt, Sr = (-jt * At - xt * rr) / Dt, kr = (jt * xt + At * rr) / Dt, Jr = (-jt * At + xt * rr) / Dt, Xr = dr - Et, hn = Sr - kt, on = kr - Et, jn = Jr - kt;
          return Xr * Xr + hn * hn > on * on + jn * jn && (dr = kr, Sr = Jr), [[dr - ke, Sr - Le], [dr * D / Ot, Sr * D / Ot]];
        }
        function Bi() {
          return !0;
        }
        function Go(ce) {
          var C = Br, D = tn, F = Bi, q = go, ae = q.key, fe = 0.7;
          function xe(ke) {
            var Le, Ve = [], Je = [], at = -1, _t = ke.length, Et = gr(C), kt = gr(D);
            function At() {
              Ve.push("M", q(ce(Je), fe));
            }
            for (; ++at < _t; )
              F.call(this, Le = ke[at], at) ? Je.push([+Et.call(this, Le, at), +kt.call(this, Le, at)]) : Je.length && (At(), Je = []);
            return Je.length && At(), Ve.length ? Ve.join("") : null;
          }
          return xe.x = function(ke) {
            return arguments.length ? (C = ke, xe) : C;
          }, xe.y = function(ke) {
            return arguments.length ? (D = ke, xe) : D;
          }, xe.defined = function(ke) {
            return arguments.length ? (F = ke, xe) : F;
          }, xe.interpolate = function(ke) {
            return arguments.length ? (ae = typeof ke == "function" ? q = ke : (q = Oo.get(ke) || go).key, xe) : ae;
          }, xe.tension = function(ke) {
            return arguments.length ? (fe = ke, xe) : fe;
          }, xe;
        }
        m.svg.line = function() {
          return Go(E);
        };
        var Oo = m.map({ linear: go, "linear-closed": va, step: function(ce) {
          for (var C = 0, D = ce.length, F = ce[0], q = [F[0], ",", F[1]]; ++C < D; )
            q.push("H", (F[0] + (F = ce[C])[0]) / 2, "V", F[1]);
          return D > 1 && q.push("H", F[0]), q.join("");
        }, "step-before": di, "step-after": vo, basis: Hi, "basis-open": function(ce) {
          if (ce.length < 4)
            return go(ce);
          for (var C, D = [], F = -1, q = ce.length, ae = [0], fe = [0]; ++F < 3; )
            C = ce[F], ae.push(C[0]), fe.push(C[1]);
          for (D.push(ti(eo, ae) + "," + ti(eo, fe)), --F; ++F < q; )
            C = ce[F], ae.shift(), ae.push(C[0]), fe.shift(), fe.push(C[1]), ns(D, ae, fe);
          return D.join("");
        }, "basis-closed": function(ce) {
          for (var C, D, F = -1, q = ce.length, ae = q + 4, fe = [], xe = []; ++F < 4; )
            D = ce[F % q], fe.push(D[0]), xe.push(D[1]);
          for (C = [ti(eo, fe), ",", ti(eo, xe)], --F; ++F < ae; )
            D = ce[F % q], fe.shift(), fe.push(D[0]), xe.shift(), xe.push(D[1]), ns(C, fe, xe);
          return C.join("");
        }, bundle: function(ce, C) {
          var D = ce.length - 1;
          if (D)
            for (var F, q, ae = ce[0][0], fe = ce[0][1], xe = ce[D][0] - ae, ke = ce[D][1] - fe, Le = -1; ++Le <= D; )
              F = ce[Le], q = Le / D, F[0] = C * F[0] + (1 - C) * (ae + q * xe), F[1] = C * F[1] + (1 - C) * (fe + q * ke);
          return Hi(ce);
        }, cardinal: function(ce, C) {
          return ce.length < 3 ? go(ce) : ce[0] + Xa(ce, wi(ce, C));
        }, "cardinal-open": function(ce, C) {
          return ce.length < 4 ? go(ce) : ce[1] + Xa(ce.slice(1, -1), wi(ce, C));
        }, "cardinal-closed": function(ce, C) {
          return ce.length < 3 ? va(ce) : ce[0] + Xa((ce.push(ce[0]), ce), wi([ce[ce.length - 2]].concat(ce, [ce[1]]), C));
        }, monotone: function(ce) {
          return ce.length < 3 ? go(ce) : ce[0] + Xa(ce, function(C) {
            for (var D, F, q, ae, fe = [], xe = function(Ve) {
              for (var Je = 0, at = Ve.length - 1, _t = [], Et = Ve[0], kt = Ve[1], At = _t[0] = Ko(Et, kt); ++Je < at; )
                _t[Je] = (At + (At = Ko(Et = kt, kt = Ve[Je + 1]))) / 2;
              return _t[Je] = At, _t;
            }(C), ke = -1, Le = C.length - 1; ++ke < Le; )
              D = Ko(C[ke], C[ke + 1]), a(D) < mt ? xe[ke] = xe[ke + 1] = 0 : (F = xe[ke] / D, q = xe[ke + 1] / D, (ae = F * F + q * q) > 9 && (ae = 3 * D / Math.sqrt(ae), xe[ke] = ae * F, xe[ke + 1] = ae * q));
            for (ke = -1; ++ke <= Le; )
              ae = (C[Math.min(Le, ke + 1)][0] - C[Math.max(0, ke - 1)][0]) / (6 * (1 + xe[ke] * xe[ke])), fe.push([ae || 0, xe[ke] * ae || 0]);
            return fe;
          }(ce));
        } });
        function go(ce) {
          return ce.length > 1 ? ce.join("L") : ce + "Z";
        }
        function va(ce) {
          return ce.join("L") + "Z";
        }
        function di(ce) {
          for (var C = 0, D = ce.length, F = ce[0], q = [F[0], ",", F[1]]; ++C < D; )
            q.push("V", (F = ce[C])[1], "H", F[0]);
          return q.join("");
        }
        function vo(ce) {
          for (var C = 0, D = ce.length, F = ce[0], q = [F[0], ",", F[1]]; ++C < D; )
            q.push("H", (F = ce[C])[0], "V", F[1]);
          return q.join("");
        }
        function Xa(ce, C) {
          if (C.length < 1 || ce.length != C.length && ce.length != C.length + 2)
            return go(ce);
          var D = ce.length != C.length, F = "", q = ce[0], ae = ce[1], fe = C[0], xe = fe, ke = 1;
          if (D && (F += "Q" + (ae[0] - 2 * fe[0] / 3) + "," + (ae[1] - 2 * fe[1] / 3) + "," + ae[0] + "," + ae[1], q = ce[1], ke = 2), C.length > 1) {
            xe = C[1], ae = ce[ke], ke++, F += "C" + (q[0] + fe[0]) + "," + (q[1] + fe[1]) + "," + (ae[0] - xe[0]) + "," + (ae[1] - xe[1]) + "," + ae[0] + "," + ae[1];
            for (var Le = 2; Le < C.length; Le++, ke++)
              ae = ce[ke], xe = C[Le], F += "S" + (ae[0] - xe[0]) + "," + (ae[1] - xe[1]) + "," + ae[0] + "," + ae[1];
          }
          if (D) {
            var Ve = ce[ke];
            F += "Q" + (ae[0] + 2 * xe[0] / 3) + "," + (ae[1] + 2 * xe[1] / 3) + "," + Ve[0] + "," + Ve[1];
          }
          return F;
        }
        function wi(ce, C) {
          for (var D, F = [], q = (1 - C) / 2, ae = ce[0], fe = ce[1], xe = 1, ke = ce.length; ++xe < ke; )
            D = ae, ae = fe, fe = ce[xe], F.push([q * (fe[0] - D[0]), q * (fe[1] - D[1])]);
          return F;
        }
        function Hi(ce) {
          if (ce.length < 3)
            return go(ce);
          var C = 1, D = ce.length, F = ce[0], q = F[0], ae = F[1], fe = [q, q, q, (F = ce[1])[0]], xe = [ae, ae, ae, F[1]], ke = [q, ",", ae, "L", ti(eo, fe), ",", ti(eo, xe)];
          for (ce.push(ce[D - 1]); ++C <= D; )
            F = ce[C], fe.shift(), fe.push(F[0]), xe.shift(), xe.push(F[1]), ns(ke, fe, xe);
          return ce.pop(), ke.push("L", F), ke.join("");
        }
        function ti(ce, C) {
          return ce[0] * C[0] + ce[1] * C[1] + ce[2] * C[2] + ce[3] * C[3];
        }
        Oo.forEach(function(ce, C) {
          C.key = ce, C.closed = /-closed$/.test(ce);
        });
        var uo = [0, 2 / 3, 1 / 3, 0], ri = [0, 1 / 3, 2 / 3, 0], eo = [0, 1 / 6, 2 / 3, 1 / 6];
        function ns(ce, C, D) {
          ce.push("C", ti(uo, C), ",", ti(uo, D), ",", ti(ri, C), ",", ti(ri, D), ",", ti(eo, C), ",", ti(eo, D));
        }
        function Ko(ce, C) {
          return (C[1] - ce[1]) / (C[0] - ce[0]);
        }
        function Os(ce) {
          for (var C, D, F, q = -1, ae = ce.length; ++q < ae; )
            D = (C = ce[q])[0], F = C[1] - Gt, C[0] = D * Math.cos(F), C[1] = D * Math.sin(F);
          return ce;
        }
        function Oi(ce) {
          var C = Br, D = Br, F = 0, q = tn, ae = Bi, fe = go, xe = fe.key, ke = fe, Le = "L", Ve = 0.7;
          function Je(at) {
            var _t, Et, kt, At = [], xt = [], Dt = [], Ot = -1, jt = at.length, rr = gr(C), dr = gr(F), Sr = C === D ? function() {
              return Et;
            } : gr(D), kr = F === q ? function() {
              return kt;
            } : gr(q);
            function Jr() {
              At.push("M", fe(ce(Dt), Ve), Le, ke(ce(xt.reverse()), Ve), "Z");
            }
            for (; ++Ot < jt; )
              ae.call(this, _t = at[Ot], Ot) ? (xt.push([Et = +rr.call(this, _t, Ot), kt = +dr.call(this, _t, Ot)]), Dt.push([+Sr.call(this, _t, Ot), +kr.call(this, _t, Ot)])) : xt.length && (Jr(), xt = [], Dt = []);
            return xt.length && Jr(), At.length ? At.join("") : null;
          }
          return Je.x = function(at) {
            return arguments.length ? (C = D = at, Je) : D;
          }, Je.x0 = function(at) {
            return arguments.length ? (C = at, Je) : C;
          }, Je.x1 = function(at) {
            return arguments.length ? (D = at, Je) : D;
          }, Je.y = function(at) {
            return arguments.length ? (F = q = at, Je) : q;
          }, Je.y0 = function(at) {
            return arguments.length ? (F = at, Je) : F;
          }, Je.y1 = function(at) {
            return arguments.length ? (q = at, Je) : q;
          }, Je.defined = function(at) {
            return arguments.length ? (ae = at, Je) : ae;
          }, Je.interpolate = function(at) {
            return arguments.length ? (xe = typeof at == "function" ? fe = at : (fe = Oo.get(at) || go).key, ke = fe.reverse || fe, Le = fe.closed ? "M" : "L", Je) : xe;
          }, Je.tension = function(at) {
            return arguments.length ? (Ve = at, Je) : Ve;
          }, Je;
        }
        function zs(ce) {
          return ce.source;
        }
        function zi(ce) {
          return ce.target;
        }
        function Qo(ce) {
          return ce.radius;
        }
        function ca(ce) {
          return [ce.x, ce.y];
        }
        function ya(ce) {
          return function() {
            var C = ce.apply(this, arguments), D = C[0], F = C[1] - Gt;
            return [D * Math.cos(F), D * Math.sin(F)];
          };
        }
        function Ds() {
          return 64;
        }
        function Rs() {
          return "circle";
        }
        function $o(ce) {
          var C = Math.sqrt(ce / Ft);
          return "M0," + C + "A" + C + "," + C + " 0 1,1 0," + -C + "A" + C + "," + C + " 0 1,1 0," + C + "Z";
        }
        m.svg.line.radial = function() {
          var ce = Go(Os);
          return ce.radius = ce.x, delete ce.x, ce.angle = ce.y, delete ce.y, ce;
        }, di.reverse = vo, vo.reverse = di, m.svg.area = function() {
          return Oi(E);
        }, m.svg.area.radial = function() {
          var ce = Oi(Os);
          return ce.radius = ce.x, delete ce.x, ce.innerRadius = ce.x0, delete ce.x0, ce.outerRadius = ce.x1, delete ce.x1, ce.angle = ce.y, delete ce.y, ce.startAngle = ce.y0, delete ce.y0, ce.endAngle = ce.y1, delete ce.y1, ce;
        }, m.svg.chord = function() {
          var ce = zs, C = zi, D = Qo, F = Da, q = Aa;
          function ae(Le, Ve) {
            var Je, at, _t = fe(this, ce, Le, Ve), Et = fe(this, C, Le, Ve);
            return "M" + _t.p0 + xe(_t.r, _t.p1, _t.a1 - _t.a0) + (at = Et, ((Je = _t).a0 == at.a0 && Je.a1 == at.a1 ? ke(_t.r, _t.p1, _t.r, _t.p0) : ke(_t.r, _t.p1, Et.r, Et.p0) + xe(Et.r, Et.p1, Et.a1 - Et.a0) + ke(Et.r, Et.p1, _t.r, _t.p0)) + "Z");
          }
          function fe(Le, Ve, Je, at) {
            var _t = Ve.call(Le, Je, at), Et = D.call(Le, _t, at), kt = F.call(Le, _t, at) - Gt, At = q.call(Le, _t, at) - Gt;
            return { r: Et, a0: kt, a1: At, p0: [Et * Math.cos(kt), Et * Math.sin(kt)], p1: [Et * Math.cos(At), Et * Math.sin(At)] };
          }
          function xe(Le, Ve, Je) {
            return "A" + Le + "," + Le + " 0 " + +(Je > Ft) + ",1 " + Ve;
          }
          function ke(Le, Ve, Je, at) {
            return "Q 0,0 " + at;
          }
          return ae.radius = function(Le) {
            return arguments.length ? (D = gr(Le), ae) : D;
          }, ae.source = function(Le) {
            return arguments.length ? (ce = gr(Le), ae) : ce;
          }, ae.target = function(Le) {
            return arguments.length ? (C = gr(Le), ae) : C;
          }, ae.startAngle = function(Le) {
            return arguments.length ? (F = gr(Le), ae) : F;
          }, ae.endAngle = function(Le) {
            return arguments.length ? (q = gr(Le), ae) : q;
          }, ae;
        }, m.svg.diagonal = function() {
          var ce = zs, C = zi, D = ca;
          function F(q, ae) {
            var fe = ce.call(this, q, ae), xe = C.call(this, q, ae), ke = (fe.y + xe.y) / 2, Le = [fe, { x: fe.x, y: ke }, { x: xe.x, y: ke }, xe];
            return "M" + (Le = Le.map(D))[0] + "C" + Le[1] + " " + Le[2] + " " + Le[3];
          }
          return F.source = function(q) {
            return arguments.length ? (ce = gr(q), F) : ce;
          }, F.target = function(q) {
            return arguments.length ? (C = gr(q), F) : C;
          }, F.projection = function(q) {
            return arguments.length ? (D = q, F) : D;
          }, F;
        }, m.svg.diagonal.radial = function() {
          var ce = m.svg.diagonal(), C = ca, D = ce.projection;
          return ce.projection = function(F) {
            return arguments.length ? D(ya(C = F)) : C;
          }, ce;
        }, m.svg.symbol = function() {
          var ce = Rs, C = Ds;
          function D(F, q) {
            return (Lo.get(ce.call(this, F, q)) || $o)(C.call(this, F, q));
          }
          return D.type = function(F) {
            return arguments.length ? (ce = gr(F), D) : ce;
          }, D.size = function(F) {
            return arguments.length ? (C = gr(F), D) : C;
          }, D;
        };
        var Lo = m.map({ circle: $o, cross: function(ce) {
          var C = Math.sqrt(ce / 5) / 2;
          return "M" + -3 * C + "," + -C + "H" + -C + "V" + -3 * C + "H" + C + "V" + -C + "H" + 3 * C + "V" + C + "H" + C + "V" + 3 * C + "H" + -C + "V" + C + "H" + -3 * C + "Z";
        }, diamond: function(ce) {
          var C = Math.sqrt(ce / (2 * Xs)), D = C * Xs;
          return "M0," + -C + "L" + D + ",0 0," + C + " " + -D + ",0Z";
        }, square: function(ce) {
          var C = Math.sqrt(ce) / 2;
          return "M" + -C + "," + -C + "L" + C + "," + -C + " " + C + "," + C + " " + -C + "," + C + "Z";
        }, "triangle-down": function(ce) {
          var C = Math.sqrt(ce / Vo), D = C * Vo / 2;
          return "M0," + D + "L" + C + "," + -D + " " + -C + "," + -D + "Z";
        }, "triangle-up": function(ce) {
          var C = Math.sqrt(ce / Vo), D = C * Vo / 2;
          return "M0," + -D + "L" + C + "," + D + " " + -C + "," + D + "Z";
        } });
        m.svg.symbolTypes = Lo.keys();
        var Vo = Math.sqrt(3), Xs = Math.tan(30 * nr);
        X.transition = function(ce) {
          for (var C, D, F = fs || ++hs, q = ks(ce), ae = [], fe = as || { time: Date.now(), ease: ms, delay: 0, duration: 250 }, xe = -1, ke = this.length; ++xe < ke; ) {
            ae.push(C = []);
            for (var Le = this[xe], Ve = -1, Je = Le.length; ++Ve < Je; )
              (D = Le[Ve]) && is(D, Ve, q, F, fe), C.push(D);
          }
          return ni(ae, q, F);
        }, X.interrupt = function(ce) {
          return this.each(ce == null ? ws : Ja(ks(ce)));
        };
        var ws = Ja(ks());
        function Ja(ce) {
          return function() {
            var C, D, F;
            (C = this[ce]) && (F = C[D = C.active]) && (F.timer.c = null, F.timer.t = NaN, --C.count ? delete C[D] : delete this[ce], C.active += 0.5, F.event && F.event.interrupt.call(this, this.__data__, F.index));
          };
        }
        function ni(ce, C, D) {
          return B(ce, Li), ce.namespace = C, ce.id = D, ce;
        }
        var fs, as, Li = [], hs = 0;
        function Ts(ce, C, D, F) {
          var q = ce.id, ae = ce.namespace;
          return Ie(ce, typeof D == "function" ? function(fe, xe, ke) {
            fe[ae][q].tween.set(C, F(D.call(fe, fe.__data__, xe, ke)));
          } : (D = F(D), function(fe) {
            fe[ae][q].tween.set(C, D);
          }));
        }
        function gs(ce) {
          return ce == null && (ce = ""), function() {
            this.textContent = ce;
          };
        }
        function ks(ce) {
          return ce == null ? "__transition__" : "__transition_" + ce + "__";
        }
        function is(ce, C, D, F, q) {
          var ae, fe, xe, ke, Le, Ve = ce[D] || (ce[D] = { active: 0, count: 0 }), Je = Ve[F];
          function at(Et) {
            var kt = Ve.active, At = Ve[kt];
            for (var xt in At && (At.timer.c = null, At.timer.t = NaN, --Ve.count, delete Ve[kt], At.event && At.event.interrupt.call(ce, ce.__data__, At.index)), Ve)
              if (+xt < F) {
                var Dt = Ve[xt];
                Dt.timer.c = null, Dt.timer.t = NaN, --Ve.count, delete Ve[xt];
              }
            fe.c = _t, rn(function() {
              return fe.c && _t(Et || 1) && (fe.c = null, fe.t = NaN), 1;
            }, 0, ae), Ve.active = F, Je.event && Je.event.start.call(ce, ce.__data__, C), Le = [], Je.tween.forEach(function(Ot, jt) {
              (jt = jt.call(ce, ce.__data__, C)) && Le.push(jt);
            }), ke = Je.ease, xe = Je.duration;
          }
          function _t(Et) {
            for (var kt = Et / xe, At = ke(kt), xt = Le.length; xt > 0; )
              Le[--xt].call(ce, At);
            if (kt >= 1)
              return Je.event && Je.event.end.call(ce, ce.__data__, C), --Ve.count ? delete Ve[F] : delete ce[D], 1;
          }
          Je || (ae = q.time, fe = rn(function(Et) {
            var kt = Je.delay;
            if (fe.t = kt + ae, kt <= Et)
              return at(Et - kt);
            fe.c = at;
          }, 0, ae), Je = Ve[F] = { tween: new _(), time: ae, timer: fe, delay: q.delay, duration: q.duration, ease: q.ease, index: C }, q = null, ++Ve.count);
        }
        Li.call = X.call, Li.empty = X.empty, Li.node = X.node, Li.size = X.size, m.transition = function(ce, C) {
          return ce && ce.transition ? fs ? ce.transition(C) : ce : m.selection().transition(ce);
        }, m.transition.prototype = Li, Li.select = function(ce) {
          var C, D, F, q = this.id, ae = this.namespace, fe = [];
          ce = te(ce);
          for (var xe = -1, ke = this.length; ++xe < ke; ) {
            fe.push(C = []);
            for (var Le = this[xe], Ve = -1, Je = Le.length; ++Ve < Je; )
              (F = Le[Ve]) && (D = ce.call(F, F.__data__, Ve, xe)) ? ("__data__" in F && (D.__data__ = F.__data__), is(D, Ve, ae, q, F[ae][q]), C.push(D)) : C.push(null);
          }
          return ni(fe, ae, q);
        }, Li.selectAll = function(ce) {
          var C, D, F, q, ae, fe = this.id, xe = this.namespace, ke = [];
          ce = ie(ce);
          for (var Le = -1, Ve = this.length; ++Le < Ve; )
            for (var Je = this[Le], at = -1, _t = Je.length; ++at < _t; )
              if (F = Je[at]) {
                ae = F[xe][fe], D = ce.call(F, F.__data__, at, Le), ke.push(C = []);
                for (var Et = -1, kt = D.length; ++Et < kt; )
                  (q = D[Et]) && is(q, Et, xe, fe, ae), C.push(q);
              }
          return ni(ke, xe, fe);
        }, Li.filter = function(ce) {
          var C, D, F = [];
          typeof ce != "function" && (ce = Me(ce));
          for (var q = 0, ae = this.length; q < ae; q++) {
            F.push(C = []);
            for (var fe, xe = 0, ke = (fe = this[q]).length; xe < ke; xe++)
              (D = fe[xe]) && ce.call(D, D.__data__, xe, q) && C.push(D);
          }
          return ni(F, this.namespace, this.id);
        }, Li.tween = function(ce, C) {
          var D = this.id, F = this.namespace;
          return arguments.length < 2 ? this.node()[F][D].tween.get(ce) : Ie(this, C == null ? function(q) {
            q[F][D].tween.remove(ce);
          } : function(q) {
            q[F][D].tween.set(ce, C);
          });
        }, Li.attr = function(ce, C) {
          if (arguments.length < 2) {
            for (C in ce)
              this.attr(C, ce[C]);
            return this;
          }
          var D = ce == "transform" ? Uo : Ri, F = m.ns.qualify(ce);
          function q() {
            this.removeAttribute(F);
          }
          function ae() {
            this.removeAttributeNS(F.space, F.local);
          }
          function fe(ke) {
            return ke == null ? q : (ke += "", function() {
              var Le, Ve = this.getAttribute(F);
              return Ve !== ke && (Le = D(Ve, ke), function(Je) {
                this.setAttribute(F, Le(Je));
              });
            });
          }
          function xe(ke) {
            return ke == null ? ae : (ke += "", function() {
              var Le, Ve = this.getAttributeNS(F.space, F.local);
              return Ve !== ke && (Le = D(Ve, ke), function(Je) {
                this.setAttributeNS(F.space, F.local, Le(Je));
              });
            });
          }
          return Ts(this, "attr." + ce, C, F.local ? xe : fe);
        }, Li.attrTween = function(ce, C) {
          var D = m.ns.qualify(ce);
          return this.tween("attr." + ce, D.local ? function(F, q) {
            var ae = C.call(this, F, q, this.getAttributeNS(D.space, D.local));
            return ae && function(fe) {
              this.setAttributeNS(D.space, D.local, ae(fe));
            };
          } : function(F, q) {
            var ae = C.call(this, F, q, this.getAttribute(D));
            return ae && function(fe) {
              this.setAttribute(D, ae(fe));
            };
          });
        }, Li.style = function(ce, C, D) {
          var F = arguments.length;
          if (F < 3) {
            if (typeof ce != "string") {
              for (D in F < 2 && (C = ""), ce)
                this.style(D, ce[D], C);
              return this;
            }
            D = "";
          }
          function q() {
            this.style.removeProperty(ce);
          }
          function ae(fe) {
            return fe == null ? q : (fe += "", function() {
              var xe, ke = r(this).getComputedStyle(this, null).getPropertyValue(ce);
              return ke !== fe && (xe = Ri(ke, fe), function(Le) {
                this.style.setProperty(ce, xe(Le), D);
              });
            });
          }
          return Ts(this, "style." + ce, C, ae);
        }, Li.styleTween = function(ce, C, D) {
          function F(q, ae) {
            var fe = C.call(this, q, ae, r(this).getComputedStyle(this, null).getPropertyValue(ce));
            return fe && function(xe) {
              this.style.setProperty(ce, fe(xe), D);
            };
          }
          return arguments.length < 3 && (D = ""), this.tween("style." + ce, F);
        }, Li.text = function(ce) {
          return Ts(this, "text", ce, gs);
        }, Li.remove = function() {
          var ce = this.namespace;
          return this.each("end.transition", function() {
            var C;
            this[ce].count < 2 && (C = this.parentNode) && C.removeChild(this);
          });
        }, Li.ease = function(ce) {
          var C = this.id, D = this.namespace;
          return arguments.length < 1 ? this.node()[D][C].ease : (typeof ce != "function" && (ce = m.ease.apply(m, arguments)), Ie(this, function(F) {
            F[D][C].ease = ce;
          }));
        }, Li.delay = function(ce) {
          var C = this.id, D = this.namespace;
          return arguments.length < 1 ? this.node()[D][C].delay : Ie(this, typeof ce == "function" ? function(F, q, ae) {
            F[D][C].delay = +ce.call(F, F.__data__, q, ae);
          } : (ce = +ce, function(F) {
            F[D][C].delay = ce;
          }));
        }, Li.duration = function(ce) {
          var C = this.id, D = this.namespace;
          return arguments.length < 1 ? this.node()[D][C].duration : Ie(this, typeof ce == "function" ? function(F, q, ae) {
            F[D][C].duration = Math.max(1, ce.call(F, F.__data__, q, ae));
          } : (ce = Math.max(1, ce), function(F) {
            F[D][C].duration = ce;
          }));
        }, Li.each = function(ce, C) {
          var D = this.id, F = this.namespace;
          if (arguments.length < 2) {
            var q = as, ae = fs;
            try {
              fs = D, Ie(this, function(fe, xe, ke) {
                as = fe[F][D], ce.call(fe, fe.__data__, xe, ke);
              });
            } finally {
              as = q, fs = ae;
            }
          } else
            Ie(this, function(fe) {
              var xe = fe[F][D];
              (xe.event || (xe.event = m.dispatch("start", "end", "interrupt"))).on(ce, C);
            });
          return this;
        }, Li.transition = function() {
          for (var ce, C, D, F = this.id, q = ++hs, ae = this.namespace, fe = [], xe = 0, ke = this.length; xe < ke; xe++) {
            fe.push(ce = []);
            for (var Le, Ve = 0, Je = (Le = this[xe]).length; Ve < Je; Ve++)
              (C = Le[Ve]) && is(C, Ve, ae, q, { time: (D = C[ae][F]).time, ease: D.ease, delay: D.delay + D.duration, duration: D.duration }), ce.push(C);
          }
          return ni(fe, ae, q);
        }, m.svg.axis = function() {
          var ce, C = m.scale.linear(), D = Js, F = 6, q = 6, ae = 3, fe = [10], xe = null;
          function ke(Le) {
            Le.each(function() {
              var Ve, Je = m.select(this), at = this.__chart__ || C, _t = this.__chart__ = C.copy(), Et = xe == null ? _t.ticks ? _t.ticks.apply(_t, fe) : _t.domain() : xe, kt = ce == null ? _t.tickFormat ? _t.tickFormat.apply(_t, fe) : E : ce, At = Je.selectAll(".tick").data(Et, _t), xt = At.enter().insert("g", ".domain").attr("class", "tick").style("opacity", mt), Dt = m.transition(At.exit()).style("opacity", mt).remove(), Ot = m.transition(At.order()).style("opacity", 1), jt = Math.max(F, 0) + ae, rr = sn(_t), dr = Je.selectAll(".domain").data([0]), Sr = (dr.enter().append("path").attr("class", "domain"), m.transition(dr));
              xt.append("line"), xt.append("text");
              var kr, Jr, Xr, hn, on = xt.select("line"), jn = Ot.select("line"), Wn = At.select("text").text(kt), ua = xt.select("text"), qr = Ot.select("text"), Mn = D === "top" || D === "left" ? -1 : 1;
              if (D === "bottom" || D === "top" ? (Ve = ps, kr = "x", Xr = "y", Jr = "x2", hn = "y2", Wn.attr("dy", Mn < 0 ? "0em" : ".71em").style("text-anchor", "middle"), Sr.attr("d", "M" + rr[0] + "," + Mn * q + "V0H" + rr[1] + "V" + Mn * q)) : (Ve = Ks, kr = "y", Xr = "x", Jr = "y2", hn = "x2", Wn.attr("dy", ".32em").style("text-anchor", Mn < 0 ? "end" : "start"), Sr.attr("d", "M" + Mn * q + "," + rr[0] + "H0V" + rr[1] + "H" + Mn * q)), on.attr(hn, Mn * F), ua.attr(Xr, Mn * jt), jn.attr(Jr, 0).attr(hn, Mn * F), qr.attr(kr, 0).attr(Xr, Mn * jt), _t.rangeBand) {
                var Zn = _t, qn = Zn.rangeBand() / 2;
                at = _t = function(na) {
                  return Zn(na) + qn;
                };
              } else
                at.rangeBand ? at = _t : Dt.call(Ve, _t, at);
              xt.call(Ve, at, _t), Ot.call(Ve, _t, _t);
            });
          }
          return ke.scale = function(Le) {
            return arguments.length ? (C = Le, ke) : C;
          }, ke.orient = function(Le) {
            return arguments.length ? (D = Le in il ? Le + "" : Js, ke) : D;
          }, ke.ticks = function() {
            return arguments.length ? (fe = k(arguments), ke) : fe;
          }, ke.tickValues = function(Le) {
            return arguments.length ? (xe = Le, ke) : xe;
          }, ke.tickFormat = function(Le) {
            return arguments.length ? (ce = Le, ke) : ce;
          }, ke.tickSize = function(Le) {
            var Ve = arguments.length;
            return Ve ? (F = +Le, q = +arguments[Ve - 1], ke) : F;
          }, ke.innerTickSize = function(Le) {
            return arguments.length ? (F = +Le, ke) : F;
          }, ke.outerTickSize = function(Le) {
            return arguments.length ? (q = +Le, ke) : q;
          }, ke.tickPadding = function(Le) {
            return arguments.length ? (ae = +Le, ke) : ae;
          }, ke.tickSubdivide = function() {
            return arguments.length && ke;
          }, ke;
        };
        var Js = "bottom", il = { top: 1, right: 1, bottom: 1, left: 1 };
        function ps(ce, C, D) {
          ce.attr("transform", function(F) {
            var q = C(F);
            return "translate(" + (isFinite(q) ? q : D(F)) + ",0)";
          });
        }
        function Ks(ce, C, D) {
          ce.attr("transform", function(F) {
            var q = C(F);
            return "translate(0," + (isFinite(q) ? q : D(F)) + ")";
          });
        }
        m.svg.brush = function() {
          var ce, C, D = re(Ve, "brushstart", "brush", "brushend"), F = null, q = null, ae = [0, 0], fe = [0, 0], xe = !0, ke = !0, Le = to[0];
          function Ve(kt) {
            kt.each(function() {
              var At = m.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", Et).on("touchstart.brush", Et), xt = At.selectAll(".background").data([0]);
              xt.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair"), At.selectAll(".extent").data([0]).enter().append("rect").attr("class", "extent").style("cursor", "move");
              var Dt = At.selectAll(".resize").data(Le, E);
              Dt.exit().remove(), Dt.enter().append("g").attr("class", function(dr) {
                return "resize " + dr;
              }).style("cursor", function(dr) {
                return Ms[dr];
              }).append("rect").attr("x", function(dr) {
                return /[ew]$/.test(dr) ? -3 : null;
              }).attr("y", function(dr) {
                return /^[ns]/.test(dr) ? -3 : null;
              }).attr("width", 6).attr("height", 6).style("visibility", "hidden"), Dt.style("display", Ve.empty() ? "none" : null);
              var Ot, jt = m.transition(At), rr = m.transition(xt);
              F && (Ot = sn(F), rr.attr("x", Ot[0]).attr("width", Ot[1] - Ot[0]), at(jt)), q && (Ot = sn(q), rr.attr("y", Ot[0]).attr("height", Ot[1] - Ot[0]), _t(jt)), Je(jt);
            });
          }
          function Je(kt) {
            kt.selectAll(".resize").attr("transform", function(At) {
              return "translate(" + ae[+/e$/.test(At)] + "," + fe[+/^s/.test(At)] + ")";
            });
          }
          function at(kt) {
            kt.select(".extent").attr("x", ae[0]), kt.selectAll(".extent,.n>rect,.s>rect").attr("width", ae[1] - ae[0]);
          }
          function _t(kt) {
            kt.select(".extent").attr("y", fe[0]), kt.selectAll(".extent,.e>rect,.w>rect").attr("height", fe[1] - fe[0]);
          }
          function Et() {
            var kt, At, xt = this, Dt = m.select(m.event.target), Ot = D.of(xt, arguments), jt = m.select(xt), rr = Dt.datum(), dr = !/^(n|s)$/.test(rr) && F, Sr = !/^(e|w)$/.test(rr) && q, kr = Dt.classed("extent"), Jr = bt(xt), Xr = m.mouse(xt), hn = m.select(r(xt)).on("keydown.brush", Wn).on("keyup.brush", ua);
            if (m.event.changedTouches ? hn.on("touchmove.brush", qr).on("touchend.brush", Zn) : hn.on("mousemove.brush", qr).on("mouseup.brush", Zn), jt.interrupt().selectAll("*").interrupt(), kr)
              Xr[0] = ae[0] - Xr[0], Xr[1] = fe[0] - Xr[1];
            else if (rr) {
              var on = +/w$/.test(rr), jn = +/^n/.test(rr);
              At = [ae[1 - on] - Xr[0], fe[1 - jn] - Xr[1]], Xr[0] = ae[on], Xr[1] = fe[jn];
            } else
              m.event.altKey && (kt = Xr.slice());
            function Wn() {
              m.event.keyCode == 32 && (kr || (kt = null, Xr[0] -= ae[1], Xr[1] -= fe[1], kr = 2), W());
            }
            function ua() {
              m.event.keyCode == 32 && kr == 2 && (Xr[0] += ae[1], Xr[1] += fe[1], kr = 0, W());
            }
            function qr() {
              var qn = m.mouse(xt), na = !1;
              At && (qn[0] += At[0], qn[1] += At[1]), kr || (m.event.altKey ? (kt || (kt = [(ae[0] + ae[1]) / 2, (fe[0] + fe[1]) / 2]), Xr[0] = ae[+(qn[0] < kt[0])], Xr[1] = fe[+(qn[1] < kt[1])]) : kt = null), dr && Mn(qn, F, 0) && (at(jt), na = !0), Sr && Mn(qn, q, 1) && (_t(jt), na = !0), na && (Je(jt), Ot({ type: "brush", mode: kr ? "move" : "resize" }));
            }
            function Mn(qn, na, ha) {
              var Sa, Qn, xa = sn(na), ga = xa[0], Ca = xa[1], ba = Xr[ha], Pa = ha ? fe : ae, Ua = Pa[1] - Pa[0];
              if (kr && (ga -= ba, Ca -= Ua + ba), Sa = (ha ? ke : xe) ? Math.max(ga, Math.min(Ca, qn[ha])) : qn[ha], kr ? Qn = (Sa += ba) + Ua : (kt && (ba = Math.max(ga, Math.min(Ca, 2 * kt[ha] - Sa))), ba < Sa ? (Qn = Sa, Sa = ba) : Qn = ba), Pa[0] != Sa || Pa[1] != Qn)
                return ha ? C = null : ce = null, Pa[0] = Sa, Pa[1] = Qn, !0;
            }
            function Zn() {
              qr(), jt.style("pointer-events", "all").selectAll(".resize").style("display", Ve.empty() ? "none" : null), m.select("body").style("cursor", null), hn.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null), Jr(), Ot({ type: "brushend" });
            }
            jt.style("pointer-events", "none").selectAll(".resize").style("display", null), m.select("body").style("cursor", Dt.style("cursor")), Ot({ type: "brushstart" }), qr();
          }
          return Ve.event = function(kt) {
            kt.each(function() {
              var At = D.of(this, arguments), xt = { x: ae, y: fe, i: ce, j: C }, Dt = this.__chart__ || xt;
              this.__chart__ = xt, fs ? m.select(this).transition().each("start.brush", function() {
                ce = Dt.i, C = Dt.j, ae = Dt.x, fe = Dt.y, At({ type: "brushstart" });
              }).tween("brush:brush", function() {
                var Ot = pi(ae, xt.x), jt = pi(fe, xt.y);
                return ce = C = null, function(rr) {
                  ae = xt.x = Ot(rr), fe = xt.y = jt(rr), At({ type: "brush", mode: "resize" });
                };
              }).each("end.brush", function() {
                ce = xt.i, C = xt.j, At({ type: "brush", mode: "resize" }), At({ type: "brushend" });
              }) : (At({ type: "brushstart" }), At({ type: "brush", mode: "resize" }), At({ type: "brushend" }));
            });
          }, Ve.x = function(kt) {
            return arguments.length ? (Le = to[!(F = kt) << 1 | !q], Ve) : F;
          }, Ve.y = function(kt) {
            return arguments.length ? (Le = to[!F << 1 | !(q = kt)], Ve) : q;
          }, Ve.clamp = function(kt) {
            return arguments.length ? (F && q ? (xe = !!kt[0], ke = !!kt[1]) : F ? xe = !!kt : q && (ke = !!kt), Ve) : F && q ? [xe, ke] : F ? xe : q ? ke : null;
          }, Ve.extent = function(kt) {
            var At, xt, Dt, Ot, jt;
            return arguments.length ? (F && (At = kt[0], xt = kt[1], q && (At = At[0], xt = xt[0]), ce = [At, xt], F.invert && (At = F(At), xt = F(xt)), xt < At && (jt = At, At = xt, xt = jt), At == ae[0] && xt == ae[1] || (ae = [At, xt])), q && (Dt = kt[0], Ot = kt[1], F && (Dt = Dt[1], Ot = Ot[1]), C = [Dt, Ot], q.invert && (Dt = q(Dt), Ot = q(Ot)), Ot < Dt && (jt = Dt, Dt = Ot, Ot = jt), Dt == fe[0] && Ot == fe[1] || (fe = [Dt, Ot])), Ve) : (F && (ce ? (At = ce[0], xt = ce[1]) : (At = ae[0], xt = ae[1], F.invert && (At = F.invert(At), xt = F.invert(xt)), xt < At && (jt = At, At = xt, xt = jt))), q && (C ? (Dt = C[0], Ot = C[1]) : (Dt = fe[0], Ot = fe[1], q.invert && (Dt = q.invert(Dt), Ot = q.invert(Ot)), Ot < Dt && (jt = Dt, Dt = Ot, Ot = jt))), F && q ? [[At, Dt], [xt, Ot]] : F ? [At, xt] : q && [Dt, Ot]);
          }, Ve.clear = function() {
            return Ve.empty() || (ae = [0, 0], fe = [0, 0], ce = C = null), Ve;
          }, Ve.empty = function() {
            return !!F && ae[0] == ae[1] || !!q && fe[0] == fe[1];
          }, m.rebind(Ve, D, "on");
        };
        var Ms = { n: "ns-resize", e: "ew-resize", s: "ns-resize", w: "ew-resize", nw: "nwse-resize", ne: "nesw-resize", se: "nwse-resize", sw: "nesw-resize" }, to = [["n", "e", "s", "w", "nw", "ne", "se", "sw"], ["e", "w"], ["n", "s"], []];
        function ol(ce) {
          return JSON.parse(ce.responseText);
        }
        function sl(ce) {
          var C = x.createRange();
          return C.selectNode(x.body), C.createContextualFragment(ce.responseText);
        }
        m.text = Mr(function(ce) {
          return ce.responseText;
        }), m.json = function(ce, C) {
          return Ir(ce, "application/json", ol, C);
        }, m.html = function(ce, C) {
          return Ir(ce, "text/html", sl, C);
        }, m.xml = Mr(function(ce) {
          return ce.responseXML;
        }), typeof Q == "object" && Q.exports ? Q.exports = m : this.d3 = m;
      }).apply(self);
    }, {}], 59: [function(v, Q, $) {
      Q.exports = v("./quad");
    }, { "./quad": 60 }], 60: [function(v, Q, $) {
      var m = v("binary-search-bounds"), g = v("clamp"), k = v("parse-rect"), x = v("array-bounds"), e = v("pick-by-alias"), r = v("defined"), n = v("flatten-vertex-data"), s = v("is-obj"), t = v("dtype"), d = v("math-log2");
      function u(o, h) {
        for (var l = h[0], i = h[1], p = 1 / (h[2] - l), c = 1 / (h[3] - i), a = new Array(o.length), y = 0, f = o.length / 2; y < f; y++)
          a[2 * y] = g((o[2 * y] - l) * p, 0, 1), a[2 * y + 1] = g((o[2 * y + 1] - i) * c, 0, 1);
        return a;
      }
      Q.exports = function(o, h) {
        h || (h = {}), o = n(o, "float64"), h = e(h, { bounds: "range bounds dataBox databox", maxDepth: "depth maxDepth maxdepth level maxLevel maxlevel levels", dtype: "type dtype format out dst output destination" });
        var l = r(h.maxDepth, 255), i = r(h.bounds, x(o, 2));
        i[0] === i[2] && i[2]++, i[1] === i[3] && i[3]++;
        var p, c = u(o, i), a = o.length >>> 1;
        h.dtype || (h.dtype = "array"), typeof h.dtype == "string" ? p = new (t(h.dtype))(a) : h.dtype && (p = h.dtype, Array.isArray(p) && (p.length = a));
        for (var y = 0; y < a; ++y)
          p[y] = y;
        var f = [], _ = [], b = [], w = [];
        (function z(j, H, Y, J, W, Z) {
          if (!J.length)
            return null;
          var re = f[W] || (f[W] = []), V = b[W] || (b[W] = []), B = _[W] || (_[W] = []), U = re.length;
          if (++W > l || Z > 1073741824) {
            for (var ee = 0; ee < J.length; ee++)
              re.push(J[ee]), V.push(Z), B.push(null, null, null, null);
            return U;
          }
          if (re.push(J[0]), V.push(Z), J.length <= 1)
            return B.push(null, null, null, null), U;
          for (var N = 0.5 * Y, K = j + N, X = H + N, te = [], ie = [], le = [], oe = [], ve = 1, ue = J.length; ve < ue; ve++) {
            var ye = J[ve], Ae = c[2 * ye], pe = c[2 * ye + 1];
            Ae < K ? pe < X ? te.push(ye) : ie.push(ye) : pe < X ? le.push(ye) : oe.push(ye);
          }
          return Z <<= 2, B.push(z(j, H, N, te, W, Z), z(j, X, N, ie, W, Z + 1), z(K, H, N, le, W, Z + 2), z(K, X, N, oe, W, Z + 3)), U;
        })(0, 0, 1, p, 0, 1);
        for (var T = 0, L = 0; L < f.length; L++) {
          var A = f[L];
          if (p.set)
            p.set(A, T);
          else
            for (var I = 0, P = A.length; I < P; I++)
              p[I + T] = A[I];
          var S = T + f[L].length;
          w[L] = [T, S], T = S;
        }
        return p.range = function() {
          for (var z, j = [], H = arguments.length; H--; )
            j[H] = arguments[H];
          if (s(j[j.length - 1])) {
            var Y = j.pop();
            j.length || Y.x == null && Y.l == null && Y.left == null || (j = [Y], z = {}), z = e(Y, { level: "level maxLevel", d: "d diam diameter r radius px pxSize pixel pixelSize maxD size minSize", lod: "lod details ranges offsets" });
          } else
            z = {};
          j.length || (j = i);
          var J = k.apply(void 0, j), W = [Math.min(J.x, J.x + J.width), Math.min(J.y, J.y + J.height), Math.max(J.x, J.x + J.width), Math.max(J.y, J.y + J.height)], Z = W[0], re = W[1], V = W[2], B = W[3], U = u([Z, re, V, B], i), ee = U[0], N = U[1], K = U[2], X = U[3], te = r(z.level, f.length);
          if (z.d != null) {
            var ie;
            typeof z.d == "number" ? ie = [z.d, z.d] : z.d.length && (ie = z.d), te = Math.min(Math.max(Math.ceil(-d(Math.abs(ie[0]) / (i[2] - i[0]))), Math.ceil(-d(Math.abs(ie[1]) / (i[3] - i[1])))), te);
          }
          if (te = Math.min(te, f.length), z.lod)
            return E(ee, N, K, X, te);
          var le = [];
          function oe(ue, ye, Ae, pe, ge, we) {
            if (ge !== null && we !== null && !(ee > ue + Ae || N > ye + Ae || K < ue || X < ye || pe >= te || ge === we)) {
              var se = f[pe];
              we === void 0 && (we = se.length);
              for (var de = ge; de < we; de++) {
                var Te = se[de], Ee = o[2 * Te], Me = o[2 * Te + 1];
                Ee >= Z && Ee <= V && Me >= re && Me <= B && le.push(Te);
              }
              var ze = _[pe], Ie = ze[4 * ge + 0], Oe = ze[4 * ge + 1], Ze = ze[4 * ge + 2], Fe = ze[4 * ge + 3], Pe = ve(ze, ge + 1), De = 0.5 * Ae, Ge = pe + 1;
              oe(ue, ye, De, Ge, Ie, Oe || Ze || Fe || Pe), oe(ue, ye + De, De, Ge, Oe, Ze || Fe || Pe), oe(ue + De, ye, De, Ge, Ze, Fe || Pe), oe(ue + De, ye + De, De, Ge, Fe, Pe);
            }
          }
          function ve(ue, ye) {
            for (var Ae = null, pe = 0; Ae === null; )
              if (Ae = ue[4 * ye + pe], ++pe > ue.length)
                return null;
            return Ae;
          }
          return oe(0, 0, 1, 0, 0, 1), le;
        }, p;
        function E(z, j, H, Y, J) {
          for (var W = [], Z = 0; Z < J; Z++) {
            var re = b[Z], V = w[Z][0], B = R(z, j, Z), U = R(H, Y, Z), ee = m.ge(re, B), N = m.gt(re, U, ee, re.length - 1);
            W[Z] = [ee + V, N + V];
          }
          return W;
        }
        function R(z, j, H) {
          for (var Y = 1, J = 0.5, W = 0.5, Z = 0.5, re = 0; re < H; re++)
            Y <<= 2, Y += z < J ? j < W ? 0 : 1 : j < W ? 2 : 3, Z *= 0.5, J += z < J ? -Z : Z, W += j < W ? -Z : Z;
          return Y;
        }
      };
    }, { "array-bounds": 71, "binary-search-bounds": 80, clamp: 86, defined: 124, dtype: 127, "flatten-vertex-data": 191, "is-obj": 235, "math-log2": 240, "parse-rect": 249, "pick-by-alias": 253 }], 61: [function(v, Q, $) {
      Object.defineProperty($, "__esModule", { value: !0 });
      var m = v("@turf/meta");
      function g(e) {
        var r = 0;
        if (e && e.length > 0) {
          r += Math.abs(k(e[0]));
          for (var n = 1; n < e.length; n++)
            r -= Math.abs(k(e[n]));
        }
        return r;
      }
      function k(e) {
        var r, n, s, t, d, u, o = 0, h = e.length;
        if (h > 2) {
          for (u = 0; u < h; u++)
            u === h - 2 ? (s = h - 2, t = h - 1, d = 0) : u === h - 1 ? (s = h - 1, t = 0, d = 1) : (s = u, t = u + 1, d = u + 2), r = e[s], n = e[t], o += (x(e[d][0]) - x(r[0])) * Math.sin(x(n[1]));
          o = 6378137 * o * 6378137 / 2;
        }
        return o;
      }
      function x(e) {
        return e * Math.PI / 180;
      }
      $.default = function(e) {
        return m.geomReduce(e, function(r, n) {
          return r + function(s) {
            var t, d = 0;
            switch (s.type) {
              case "Polygon":
                return g(s.coordinates);
              case "MultiPolygon":
                for (t = 0; t < s.coordinates.length; t++)
                  d += g(s.coordinates[t]);
                return d;
              case "Point":
              case "MultiPoint":
              case "LineString":
              case "MultiLineString":
                return 0;
            }
            return 0;
          }(n);
        }, 0);
      };
    }, { "@turf/meta": 63 }], 62: [function(v, Q, $) {
      function m(h, l, i) {
        i === void 0 && (i = {});
        var p = { type: "Feature" };
        return (i.id === 0 || i.id) && (p.id = i.id), i.bbox && (p.bbox = i.bbox), p.properties = l || {}, p.geometry = h, p;
      }
      function g(h, l, i) {
        if (i === void 0 && (i = {}), !h)
          throw new Error("coordinates is required");
        if (!Array.isArray(h))
          throw new Error("coordinates must be an Array");
        if (h.length < 2)
          throw new Error("coordinates must be at least 2 numbers long");
        if (!o(h[0]) || !o(h[1]))
          throw new Error("coordinates must contain numbers");
        return m({ type: "Point", coordinates: h }, l, i);
      }
      function k(h, l, i) {
        i === void 0 && (i = {});
        for (var p = 0, c = h; p < c.length; p++) {
          var a = c[p];
          if (a.length < 4)
            throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
          for (var y = 0; y < a[a.length - 1].length; y++)
            if (a[a.length - 1][y] !== a[0][y])
              throw new Error("First and last Position are not equivalent.");
        }
        return m({ type: "Polygon", coordinates: h }, l, i);
      }
      function x(h, l, i) {
        if (i === void 0 && (i = {}), h.length < 2)
          throw new Error("coordinates must be an array of two or more positions");
        return m({ type: "LineString", coordinates: h }, l, i);
      }
      function e(h, l) {
        l === void 0 && (l = {});
        var i = { type: "FeatureCollection" };
        return l.id && (i.id = l.id), l.bbox && (i.bbox = l.bbox), i.features = h, i;
      }
      function r(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "MultiLineString", coordinates: h }, l, i);
      }
      function n(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "MultiPoint", coordinates: h }, l, i);
      }
      function s(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "MultiPolygon", coordinates: h }, l, i);
      }
      function t(h, l) {
        l === void 0 && (l = "kilometers");
        var i = $.factors[l];
        if (!i)
          throw new Error(l + " units is invalid");
        return h * i;
      }
      function d(h, l) {
        l === void 0 && (l = "kilometers");
        var i = $.factors[l];
        if (!i)
          throw new Error(l + " units is invalid");
        return h / i;
      }
      function u(h) {
        return 180 * (h % (2 * Math.PI)) / Math.PI;
      }
      function o(h) {
        return !isNaN(h) && h !== null && !Array.isArray(h);
      }
      Object.defineProperty($, "__esModule", { value: !0 }), $.earthRadius = 63710088e-1, $.factors = { centimeters: 100 * $.earthRadius, centimetres: 100 * $.earthRadius, degrees: $.earthRadius / 111325, feet: 3.28084 * $.earthRadius, inches: 39.37 * $.earthRadius, kilometers: $.earthRadius / 1e3, kilometres: $.earthRadius / 1e3, meters: $.earthRadius, metres: $.earthRadius, miles: $.earthRadius / 1609.344, millimeters: 1e3 * $.earthRadius, millimetres: 1e3 * $.earthRadius, nauticalmiles: $.earthRadius / 1852, radians: 1, yards: 1.0936 * $.earthRadius }, $.unitsFactors = { centimeters: 100, centimetres: 100, degrees: 1 / 111325, feet: 3.28084, inches: 39.37, kilometers: 1e-3, kilometres: 1e-3, meters: 1, metres: 1, miles: 1 / 1609.344, millimeters: 1e3, millimetres: 1e3, nauticalmiles: 1 / 1852, radians: 1 / $.earthRadius, yards: 1.0936133 }, $.areaFactors = { acres: 247105e-9, centimeters: 1e4, centimetres: 1e4, feet: 10.763910417, hectares: 1e-4, inches: 1550.003100006, kilometers: 1e-6, kilometres: 1e-6, meters: 1, metres: 1, miles: 386e-9, millimeters: 1e6, millimetres: 1e6, yards: 1.195990046 }, $.feature = m, $.geometry = function(h, l, i) {
        switch (h) {
          case "Point":
            return g(l).geometry;
          case "LineString":
            return x(l).geometry;
          case "Polygon":
            return k(l).geometry;
          case "MultiPoint":
            return n(l).geometry;
          case "MultiLineString":
            return r(l).geometry;
          case "MultiPolygon":
            return s(l).geometry;
          default:
            throw new Error(h + " is invalid");
        }
      }, $.point = g, $.points = function(h, l, i) {
        return i === void 0 && (i = {}), e(h.map(function(p) {
          return g(p, l);
        }), i);
      }, $.polygon = k, $.polygons = function(h, l, i) {
        return i === void 0 && (i = {}), e(h.map(function(p) {
          return k(p, l);
        }), i);
      }, $.lineString = x, $.lineStrings = function(h, l, i) {
        return i === void 0 && (i = {}), e(h.map(function(p) {
          return x(p, l);
        }), i);
      }, $.featureCollection = e, $.multiLineString = r, $.multiPoint = n, $.multiPolygon = s, $.geometryCollection = function(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "GeometryCollection", geometries: h }, l, i);
      }, $.round = function(h, l) {
        if (l === void 0 && (l = 0), l && !(l >= 0))
          throw new Error("precision must be a positive number");
        var i = Math.pow(10, l || 0);
        return Math.round(h * i) / i;
      }, $.radiansToLength = t, $.lengthToRadians = d, $.lengthToDegrees = function(h, l) {
        return u(d(h, l));
      }, $.bearingToAzimuth = function(h) {
        var l = h % 360;
        return l < 0 && (l += 360), l;
      }, $.radiansToDegrees = u, $.degreesToRadians = function(h) {
        return h % 360 * Math.PI / 180;
      }, $.convertLength = function(h, l, i) {
        if (l === void 0 && (l = "kilometers"), i === void 0 && (i = "kilometers"), !(h >= 0))
          throw new Error("length must be a positive number");
        return t(d(h, l), i);
      }, $.convertArea = function(h, l, i) {
        if (l === void 0 && (l = "meters"), i === void 0 && (i = "kilometers"), !(h >= 0))
          throw new Error("area must be a positive number");
        var p = $.areaFactors[l];
        if (!p)
          throw new Error("invalid original units");
        var c = $.areaFactors[i];
        if (!c)
          throw new Error("invalid final units");
        return h / p * c;
      }, $.isNumber = o, $.isObject = function(h) {
        return !!h && h.constructor === Object;
      }, $.validateBBox = function(h) {
        if (!h)
          throw new Error("bbox is required");
        if (!Array.isArray(h))
          throw new Error("bbox must be an Array");
        if (h.length !== 4 && h.length !== 6)
          throw new Error("bbox must be an Array of 4 or 6 numbers");
        h.forEach(function(l) {
          if (!o(l))
            throw new Error("bbox must only contain numbers");
        });
      }, $.validateId = function(h) {
        if (!h)
          throw new Error("id is required");
        if (["string", "number"].indexOf(typeof h) === -1)
          throw new Error("id must be a number or a string");
      };
    }, {}], 63: [function(v, Q, $) {
      Object.defineProperty($, "__esModule", { value: !0 });
      var m = v("@turf/helpers");
      function g(t, d, u) {
        if (t !== null)
          for (var o, h, l, i, p, c, a, y, f = 0, _ = 0, b = t.type, w = b === "FeatureCollection", T = b === "Feature", L = w ? t.features.length : 1, A = 0; A < L; A++) {
            p = (y = !!(a = w ? t.features[A].geometry : T ? t.geometry : t) && a.type === "GeometryCollection") ? a.geometries.length : 1;
            for (var I = 0; I < p; I++) {
              var P = 0, S = 0;
              if ((i = y ? a.geometries[I] : a) !== null) {
                c = i.coordinates;
                var E = i.type;
                switch (f = !u || E !== "Polygon" && E !== "MultiPolygon" ? 0 : 1, E) {
                  case null:
                    break;
                  case "Point":
                    if (d(c, _, A, P, S) === !1)
                      return !1;
                    _++, P++;
                    break;
                  case "LineString":
                  case "MultiPoint":
                    for (o = 0; o < c.length; o++) {
                      if (d(c[o], _, A, P, S) === !1)
                        return !1;
                      _++, E === "MultiPoint" && P++;
                    }
                    E === "LineString" && P++;
                    break;
                  case "Polygon":
                  case "MultiLineString":
                    for (o = 0; o < c.length; o++) {
                      for (h = 0; h < c[o].length - f; h++) {
                        if (d(c[o][h], _, A, P, S) === !1)
                          return !1;
                        _++;
                      }
                      E === "MultiLineString" && P++, E === "Polygon" && S++;
                    }
                    E === "Polygon" && P++;
                    break;
                  case "MultiPolygon":
                    for (o = 0; o < c.length; o++) {
                      for (S = 0, h = 0; h < c[o].length; h++) {
                        for (l = 0; l < c[o][h].length - f; l++) {
                          if (d(c[o][h][l], _, A, P, S) === !1)
                            return !1;
                          _++;
                        }
                        S++;
                      }
                      P++;
                    }
                    break;
                  case "GeometryCollection":
                    for (o = 0; o < i.geometries.length; o++)
                      if (g(i.geometries[o], d, u) === !1)
                        return !1;
                    break;
                  default:
                    throw new Error("Unknown Geometry Type");
                }
              }
            }
          }
      }
      function k(t, d) {
        var u;
        switch (t.type) {
          case "FeatureCollection":
            for (u = 0; u < t.features.length && d(t.features[u].properties, u) !== !1; u++)
              ;
            break;
          case "Feature":
            d(t.properties, 0);
        }
      }
      function x(t, d) {
        if (t.type === "Feature")
          d(t, 0);
        else if (t.type === "FeatureCollection")
          for (var u = 0; u < t.features.length && d(t.features[u], u) !== !1; u++)
            ;
      }
      function e(t, d) {
        var u, o, h, l, i, p, c, a, y, f, _ = 0, b = t.type === "FeatureCollection", w = t.type === "Feature", T = b ? t.features.length : 1;
        for (u = 0; u < T; u++) {
          for (p = b ? t.features[u].geometry : w ? t.geometry : t, a = b ? t.features[u].properties : w ? t.properties : {}, y = b ? t.features[u].bbox : w ? t.bbox : void 0, f = b ? t.features[u].id : w ? t.id : void 0, i = (c = !!p && p.type === "GeometryCollection") ? p.geometries.length : 1, h = 0; h < i; h++)
            if ((l = c ? p.geometries[h] : p) !== null)
              switch (l.type) {
                case "Point":
                case "LineString":
                case "MultiPoint":
                case "Polygon":
                case "MultiLineString":
                case "MultiPolygon":
                  if (d(l, _, a, y, f) === !1)
                    return !1;
                  break;
                case "GeometryCollection":
                  for (o = 0; o < l.geometries.length; o++)
                    if (d(l.geometries[o], _, a, y, f) === !1)
                      return !1;
                  break;
                default:
                  throw new Error("Unknown Geometry Type");
              }
            else if (d(null, _, a, y, f) === !1)
              return !1;
          _++;
        }
      }
      function r(t, d) {
        e(t, function(u, o, h, l, i) {
          var p, c = u === null ? null : u.type;
          switch (c) {
            case null:
            case "Point":
            case "LineString":
            case "Polygon":
              return d(m.feature(u, h, { bbox: l, id: i }), o, 0) !== !1 && void 0;
          }
          switch (c) {
            case "MultiPoint":
              p = "Point";
              break;
            case "MultiLineString":
              p = "LineString";
              break;
            case "MultiPolygon":
              p = "Polygon";
          }
          for (var a = 0; a < u.coordinates.length; a++) {
            var y = { type: p, coordinates: u.coordinates[a] };
            if (d(m.feature(y, h), o, a) === !1)
              return !1;
          }
        });
      }
      function n(t, d) {
        r(t, function(u, o, h) {
          var l = 0;
          if (u.geometry) {
            var i = u.geometry.type;
            if (i !== "Point" && i !== "MultiPoint") {
              var p, c = 0, a = 0, y = 0;
              return g(u, function(f, _, b, w, T) {
                if (p === void 0 || o > c || w > a || T > y)
                  return p = f, c = o, a = w, y = T, void (l = 0);
                var L = m.lineString([p, f], u.properties);
                if (d(L, o, h, T, l) === !1)
                  return !1;
                l++, p = f;
              }) !== !1 && void 0;
            }
          }
        });
      }
      function s(t, d) {
        if (!t)
          throw new Error("geojson is required");
        r(t, function(u, o, h) {
          if (u.geometry !== null) {
            var l = u.geometry.type, i = u.geometry.coordinates;
            switch (l) {
              case "LineString":
                if (d(u, o, h, 0, 0) === !1)
                  return !1;
                break;
              case "Polygon":
                for (var p = 0; p < i.length; p++)
                  if (d(m.lineString(i[p], u.properties), o, h, p) === !1)
                    return !1;
            }
          }
        });
      }
      $.coordEach = g, $.coordReduce = function(t, d, u, o) {
        var h = u;
        return g(t, function(l, i, p, c, a) {
          h = i === 0 && u === void 0 ? l : d(h, l, i, p, c, a);
        }, o), h;
      }, $.propEach = k, $.propReduce = function(t, d, u) {
        var o = u;
        return k(t, function(h, l) {
          o = l === 0 && u === void 0 ? h : d(o, h, l);
        }), o;
      }, $.featureEach = x, $.featureReduce = function(t, d, u) {
        var o = u;
        return x(t, function(h, l) {
          o = l === 0 && u === void 0 ? h : d(o, h, l);
        }), o;
      }, $.coordAll = function(t) {
        var d = [];
        return g(t, function(u) {
          d.push(u);
        }), d;
      }, $.geomEach = e, $.geomReduce = function(t, d, u) {
        var o = u;
        return e(t, function(h, l, i, p, c) {
          o = l === 0 && u === void 0 ? h : d(o, h, l, i, p, c);
        }), o;
      }, $.flattenEach = r, $.flattenReduce = function(t, d, u) {
        var o = u;
        return r(t, function(h, l, i) {
          o = l === 0 && i === 0 && u === void 0 ? h : d(o, h, l, i);
        }), o;
      }, $.segmentEach = n, $.segmentReduce = function(t, d, u) {
        var o = u, h = !1;
        return n(t, function(l, i, p, c, a) {
          o = h === !1 && u === void 0 ? l : d(o, l, i, p, c, a), h = !0;
        }), o;
      }, $.lineEach = s, $.lineReduce = function(t, d, u) {
        var o = u;
        return s(t, function(h, l, i, p) {
          o = l === 0 && u === void 0 ? h : d(o, h, l, i, p);
        }), o;
      }, $.findSegment = function(t, d) {
        if (d = d || {}, !m.isObject(d))
          throw new Error("options is invalid");
        var u, o = d.featureIndex || 0, h = d.multiFeatureIndex || 0, l = d.geometryIndex || 0, i = d.segmentIndex || 0, p = d.properties;
        switch (t.type) {
          case "FeatureCollection":
            o < 0 && (o = t.features.length + o), p = p || t.features[o].properties, u = t.features[o].geometry;
            break;
          case "Feature":
            p = p || t.properties, u = t.geometry;
            break;
          case "Point":
          case "MultiPoint":
            return null;
          case "LineString":
          case "Polygon":
          case "MultiLineString":
          case "MultiPolygon":
            u = t;
            break;
          default:
            throw new Error("geojson is invalid");
        }
        if (u === null)
          return null;
        var c = u.coordinates;
        switch (u.type) {
          case "Point":
          case "MultiPoint":
            return null;
          case "LineString":
            return i < 0 && (i = c.length + i - 1), m.lineString([c[i], c[i + 1]], p, d);
          case "Polygon":
            return l < 0 && (l = c.length + l), i < 0 && (i = c[l].length + i - 1), m.lineString([c[l][i], c[l][i + 1]], p, d);
          case "MultiLineString":
            return h < 0 && (h = c.length + h), i < 0 && (i = c[h].length + i - 1), m.lineString([c[h][i], c[h][i + 1]], p, d);
          case "MultiPolygon":
            return h < 0 && (h = c.length + h), l < 0 && (l = c[h].length + l), i < 0 && (i = c[h][l].length - i - 1), m.lineString([c[h][l][i], c[h][l][i + 1]], p, d);
        }
        throw new Error("geojson is invalid");
      }, $.findPoint = function(t, d) {
        if (d = d || {}, !m.isObject(d))
          throw new Error("options is invalid");
        var u, o = d.featureIndex || 0, h = d.multiFeatureIndex || 0, l = d.geometryIndex || 0, i = d.coordIndex || 0, p = d.properties;
        switch (t.type) {
          case "FeatureCollection":
            o < 0 && (o = t.features.length + o), p = p || t.features[o].properties, u = t.features[o].geometry;
            break;
          case "Feature":
            p = p || t.properties, u = t.geometry;
            break;
          case "Point":
          case "MultiPoint":
            return null;
          case "LineString":
          case "Polygon":
          case "MultiLineString":
          case "MultiPolygon":
            u = t;
            break;
          default:
            throw new Error("geojson is invalid");
        }
        if (u === null)
          return null;
        var c = u.coordinates;
        switch (u.type) {
          case "Point":
            return m.point(c, p, d);
          case "MultiPoint":
            return h < 0 && (h = c.length + h), m.point(c[h], p, d);
          case "LineString":
            return i < 0 && (i = c.length + i), m.point(c[i], p, d);
          case "Polygon":
            return l < 0 && (l = c.length + l), i < 0 && (i = c[l].length + i), m.point(c[l][i], p, d);
          case "MultiLineString":
            return h < 0 && (h = c.length + h), i < 0 && (i = c[h].length + i), m.point(c[h][i], p, d);
          case "MultiPolygon":
            return h < 0 && (h = c.length + h), l < 0 && (l = c[h].length + l), i < 0 && (i = c[h][l].length - i), m.point(c[h][l][i], p, d);
        }
        throw new Error("geojson is invalid");
      };
    }, { "@turf/helpers": 62 }], 64: [function(v, Q, $) {
      Object.defineProperty($, "__esModule", { value: !0 });
      var m = v("@turf/meta");
      function g(k) {
        var x = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
        return m.coordEach(k, function(e) {
          x[0] > e[0] && (x[0] = e[0]), x[1] > e[1] && (x[1] = e[1]), x[2] < e[0] && (x[2] = e[0]), x[3] < e[1] && (x[3] = e[1]);
        }), x;
      }
      g.default = g, $.default = g;
    }, { "@turf/meta": 66 }], 65: [function(v, Q, $) {
      arguments[4][62][0].apply($, arguments);
    }, { dup: 62 }], 66: [function(v, Q, $) {
      arguments[4][63][0].apply($, arguments);
    }, { "@turf/helpers": 65, dup: 63 }], 67: [function(v, Q, $) {
      Object.defineProperty($, "__esModule", { value: !0 });
      var m = v("@turf/meta"), g = v("@turf/helpers");
      $.default = function(k, x) {
        x === void 0 && (x = {});
        var e = 0, r = 0, n = 0;
        return m.coordEach(k, function(s) {
          e += s[0], r += s[1], n++;
        }), g.point([e / n, r / n], x.properties);
      };
    }, { "@turf/helpers": 68, "@turf/meta": 69 }], 68: [function(v, Q, $) {
      function m(h, l, i) {
        i === void 0 && (i = {});
        var p = { type: "Feature" };
        return (i.id === 0 || i.id) && (p.id = i.id), i.bbox && (p.bbox = i.bbox), p.properties = l || {}, p.geometry = h, p;
      }
      function g(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "Point", coordinates: h }, l, i);
      }
      function k(h, l, i) {
        i === void 0 && (i = {});
        for (var p = 0, c = h; p < c.length; p++) {
          var a = c[p];
          if (a.length < 4)
            throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
          for (var y = 0; y < a[a.length - 1].length; y++)
            if (a[a.length - 1][y] !== a[0][y])
              throw new Error("First and last Position are not equivalent.");
        }
        return m({ type: "Polygon", coordinates: h }, l, i);
      }
      function x(h, l, i) {
        if (i === void 0 && (i = {}), h.length < 2)
          throw new Error("coordinates must be an array of two or more positions");
        return m({ type: "LineString", coordinates: h }, l, i);
      }
      function e(h, l) {
        l === void 0 && (l = {});
        var i = { type: "FeatureCollection" };
        return l.id && (i.id = l.id), l.bbox && (i.bbox = l.bbox), i.features = h, i;
      }
      function r(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "MultiLineString", coordinates: h }, l, i);
      }
      function n(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "MultiPoint", coordinates: h }, l, i);
      }
      function s(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "MultiPolygon", coordinates: h }, l, i);
      }
      function t(h, l) {
        l === void 0 && (l = "kilometers");
        var i = $.factors[l];
        if (!i)
          throw new Error(l + " units is invalid");
        return h * i;
      }
      function d(h, l) {
        l === void 0 && (l = "kilometers");
        var i = $.factors[l];
        if (!i)
          throw new Error(l + " units is invalid");
        return h / i;
      }
      function u(h) {
        return 180 * (h % (2 * Math.PI)) / Math.PI;
      }
      function o(h) {
        return !isNaN(h) && h !== null && !Array.isArray(h) && !/^\s*$/.test(h);
      }
      Object.defineProperty($, "__esModule", { value: !0 }), $.earthRadius = 63710088e-1, $.factors = { centimeters: 100 * $.earthRadius, centimetres: 100 * $.earthRadius, degrees: $.earthRadius / 111325, feet: 3.28084 * $.earthRadius, inches: 39.37 * $.earthRadius, kilometers: $.earthRadius / 1e3, kilometres: $.earthRadius / 1e3, meters: $.earthRadius, metres: $.earthRadius, miles: $.earthRadius / 1609.344, millimeters: 1e3 * $.earthRadius, millimetres: 1e3 * $.earthRadius, nauticalmiles: $.earthRadius / 1852, radians: 1, yards: $.earthRadius / 1.0936 }, $.unitsFactors = { centimeters: 100, centimetres: 100, degrees: 1 / 111325, feet: 3.28084, inches: 39.37, kilometers: 1e-3, kilometres: 1e-3, meters: 1, metres: 1, miles: 1 / 1609.344, millimeters: 1e3, millimetres: 1e3, nauticalmiles: 1 / 1852, radians: 1 / $.earthRadius, yards: 1 / 1.0936 }, $.areaFactors = { acres: 247105e-9, centimeters: 1e4, centimetres: 1e4, feet: 10.763910417, inches: 1550.003100006, kilometers: 1e-6, kilometres: 1e-6, meters: 1, metres: 1, miles: 386e-9, millimeters: 1e6, millimetres: 1e6, yards: 1.195990046 }, $.feature = m, $.geometry = function(h, l, i) {
        switch (h) {
          case "Point":
            return g(l).geometry;
          case "LineString":
            return x(l).geometry;
          case "Polygon":
            return k(l).geometry;
          case "MultiPoint":
            return n(l).geometry;
          case "MultiLineString":
            return r(l).geometry;
          case "MultiPolygon":
            return s(l).geometry;
          default:
            throw new Error(h + " is invalid");
        }
      }, $.point = g, $.points = function(h, l, i) {
        return i === void 0 && (i = {}), e(h.map(function(p) {
          return g(p, l);
        }), i);
      }, $.polygon = k, $.polygons = function(h, l, i) {
        return i === void 0 && (i = {}), e(h.map(function(p) {
          return k(p, l);
        }), i);
      }, $.lineString = x, $.lineStrings = function(h, l, i) {
        return i === void 0 && (i = {}), e(h.map(function(p) {
          return x(p, l);
        }), i);
      }, $.featureCollection = e, $.multiLineString = r, $.multiPoint = n, $.multiPolygon = s, $.geometryCollection = function(h, l, i) {
        return i === void 0 && (i = {}), m({ type: "GeometryCollection", geometries: h }, l, i);
      }, $.round = function(h, l) {
        if (l === void 0 && (l = 0), l && !(l >= 0))
          throw new Error("precision must be a positive number");
        var i = Math.pow(10, l || 0);
        return Math.round(h * i) / i;
      }, $.radiansToLength = t, $.lengthToRadians = d, $.lengthToDegrees = function(h, l) {
        return u(d(h, l));
      }, $.bearingToAzimuth = function(h) {
        var l = h % 360;
        return l < 0 && (l += 360), l;
      }, $.radiansToDegrees = u, $.degreesToRadians = function(h) {
        return h % 360 * Math.PI / 180;
      }, $.convertLength = function(h, l, i) {
        if (l === void 0 && (l = "kilometers"), i === void 0 && (i = "kilometers"), !(h >= 0))
          throw new Error("length must be a positive number");
        return t(d(h, l), i);
      }, $.convertArea = function(h, l, i) {
        if (l === void 0 && (l = "meters"), i === void 0 && (i = "kilometers"), !(h >= 0))
          throw new Error("area must be a positive number");
        var p = $.areaFactors[l];
        if (!p)
          throw new Error("invalid original units");
        var c = $.areaFactors[i];
        if (!c)
          throw new Error("invalid final units");
        return h / p * c;
      }, $.isNumber = o, $.isObject = function(h) {
        return !!h && h.constructor === Object;
      }, $.validateBBox = function(h) {
        if (!h)
          throw new Error("bbox is required");
        if (!Array.isArray(h))
          throw new Error("bbox must be an Array");
        if (h.length !== 4 && h.length !== 6)
          throw new Error("bbox must be an Array of 4 or 6 numbers");
        h.forEach(function(l) {
          if (!o(l))
            throw new Error("bbox must only contain numbers");
        });
      }, $.validateId = function(h) {
        if (!h)
          throw new Error("id is required");
        if (["string", "number"].indexOf(typeof h) === -1)
          throw new Error("id must be a number or a string");
      }, $.radians2degrees = function() {
        throw new Error("method has been renamed to `radiansToDegrees`");
      }, $.degrees2radians = function() {
        throw new Error("method has been renamed to `degreesToRadians`");
      }, $.distanceToDegrees = function() {
        throw new Error("method has been renamed to `lengthToDegrees`");
      }, $.distanceToRadians = function() {
        throw new Error("method has been renamed to `lengthToRadians`");
      }, $.radiansToDistance = function() {
        throw new Error("method has been renamed to `radiansToLength`");
      }, $.bearingToAngle = function() {
        throw new Error("method has been renamed to `bearingToAzimuth`");
      }, $.convertDistance = function() {
        throw new Error("method has been renamed to `convertLength`");
      };
    }, {}], 69: [function(v, Q, $) {
      Object.defineProperty($, "__esModule", { value: !0 });
      var m = v("@turf/helpers");
      function g(t, d, u) {
        if (t !== null)
          for (var o, h, l, i, p, c, a, y, f = 0, _ = 0, b = t.type, w = b === "FeatureCollection", T = b === "Feature", L = w ? t.features.length : 1, A = 0; A < L; A++) {
            p = (y = !!(a = w ? t.features[A].geometry : T ? t.geometry : t) && a.type === "GeometryCollection") ? a.geometries.length : 1;
            for (var I = 0; I < p; I++) {
              var P = 0, S = 0;
              if ((i = y ? a.geometries[I] : a) !== null) {
                c = i.coordinates;
                var E = i.type;
                switch (f = !u || E !== "Polygon" && E !== "MultiPolygon" ? 0 : 1, E) {
                  case null:
                    break;
                  case "Point":
                    if (d(c, _, A, P, S) === !1)
                      return !1;
                    _++, P++;
                    break;
                  case "LineString":
                  case "MultiPoint":
                    for (o = 0; o < c.length; o++) {
                      if (d(c[o], _, A, P, S) === !1)
                        return !1;
                      _++, E === "MultiPoint" && P++;
                    }
                    E === "LineString" && P++;
                    break;
                  case "Polygon":
                  case "MultiLineString":
                    for (o = 0; o < c.length; o++) {
                      for (h = 0; h < c[o].length - f; h++) {
                        if (d(c[o][h], _, A, P, S) === !1)
                          return !1;
                        _++;
                      }
                      E === "MultiLineString" && P++, E === "Polygon" && S++;
                    }
                    E === "Polygon" && P++;
                    break;
                  case "MultiPolygon":
                    for (o = 0; o < c.length; o++) {
                      for (S = 0, h = 0; h < c[o].length; h++) {
                        for (l = 0; l < c[o][h].length - f; l++) {
                          if (d(c[o][h][l], _, A, P, S) === !1)
                            return !1;
                          _++;
                        }
                        S++;
                      }
                      P++;
                    }
                    break;
                  case "GeometryCollection":
                    for (o = 0; o < i.geometries.length; o++)
                      if (g(i.geometries[o], d, u) === !1)
                        return !1;
                    break;
                  default:
                    throw new Error("Unknown Geometry Type");
                }
              }
            }
          }
      }
      function k(t, d) {
        var u;
        switch (t.type) {
          case "FeatureCollection":
            for (u = 0; u < t.features.length && d(t.features[u].properties, u) !== !1; u++)
              ;
            break;
          case "Feature":
            d(t.properties, 0);
        }
      }
      function x(t, d) {
        if (t.type === "Feature")
          d(t, 0);
        else if (t.type === "FeatureCollection")
          for (var u = 0; u < t.features.length && d(t.features[u], u) !== !1; u++)
            ;
      }
      function e(t, d) {
        var u, o, h, l, i, p, c, a, y, f, _ = 0, b = t.type === "FeatureCollection", w = t.type === "Feature", T = b ? t.features.length : 1;
        for (u = 0; u < T; u++) {
          for (p = b ? t.features[u].geometry : w ? t.geometry : t, a = b ? t.features[u].properties : w ? t.properties : {}, y = b ? t.features[u].bbox : w ? t.bbox : void 0, f = b ? t.features[u].id : w ? t.id : void 0, i = (c = !!p && p.type === "GeometryCollection") ? p.geometries.length : 1, h = 0; h < i; h++)
            if ((l = c ? p.geometries[h] : p) !== null)
              switch (l.type) {
                case "Point":
                case "LineString":
                case "MultiPoint":
                case "Polygon":
                case "MultiLineString":
                case "MultiPolygon":
                  if (d(l, _, a, y, f) === !1)
                    return !1;
                  break;
                case "GeometryCollection":
                  for (o = 0; o < l.geometries.length; o++)
                    if (d(l.geometries[o], _, a, y, f) === !1)
                      return !1;
                  break;
                default:
                  throw new Error("Unknown Geometry Type");
              }
            else if (d(null, _, a, y, f) === !1)
              return !1;
          _++;
        }
      }
      function r(t, d) {
        e(t, function(u, o, h, l, i) {
          var p, c = u === null ? null : u.type;
          switch (c) {
            case null:
            case "Point":
            case "LineString":
            case "Polygon":
              return d(m.feature(u, h, { bbox: l, id: i }), o, 0) !== !1 && void 0;
          }
          switch (c) {
            case "MultiPoint":
              p = "Point";
              break;
            case "MultiLineString":
              p = "LineString";
              break;
            case "MultiPolygon":
              p = "Polygon";
          }
          for (var a = 0; a < u.coordinates.length; a++) {
            var y = { type: p, coordinates: u.coordinates[a] };
            if (d(m.feature(y, h), o, a) === !1)
              return !1;
          }
        });
      }
      function n(t, d) {
        r(t, function(u, o, h) {
          var l = 0;
          if (u.geometry) {
            var i = u.geometry.type;
            if (i !== "Point" && i !== "MultiPoint") {
              var p, c = 0, a = 0, y = 0;
              return g(u, function(f, _, b, w, T) {
                if (p === void 0 || o > c || w > a || T > y)
                  return p = f, c = o, a = w, y = T, void (l = 0);
                var L = m.lineString([p, f], u.properties);
                if (d(L, o, h, T, l) === !1)
                  return !1;
                l++, p = f;
              }) !== !1 && void 0;
            }
          }
        });
      }
      function s(t, d) {
        if (!t)
          throw new Error("geojson is required");
        r(t, function(u, o, h) {
          if (u.geometry !== null) {
            var l = u.geometry.type, i = u.geometry.coordinates;
            switch (l) {
              case "LineString":
                if (d(u, o, h, 0, 0) === !1)
                  return !1;
                break;
              case "Polygon":
                for (var p = 0; p < i.length; p++)
                  if (d(m.lineString(i[p], u.properties), o, h, p) === !1)
                    return !1;
            }
          }
        });
      }
      $.coordEach = g, $.coordReduce = function(t, d, u, o) {
        var h = u;
        return g(t, function(l, i, p, c, a) {
          h = i === 0 && u === void 0 ? l : d(h, l, i, p, c, a);
        }, o), h;
      }, $.propEach = k, $.propReduce = function(t, d, u) {
        var o = u;
        return k(t, function(h, l) {
          o = l === 0 && u === void 0 ? h : d(o, h, l);
        }), o;
      }, $.featureEach = x, $.featureReduce = function(t, d, u) {
        var o = u;
        return x(t, function(h, l) {
          o = l === 0 && u === void 0 ? h : d(o, h, l);
        }), o;
      }, $.coordAll = function(t) {
        var d = [];
        return g(t, function(u) {
          d.push(u);
        }), d;
      }, $.geomEach = e, $.geomReduce = function(t, d, u) {
        var o = u;
        return e(t, function(h, l, i, p, c) {
          o = l === 0 && u === void 0 ? h : d(o, h, l, i, p, c);
        }), o;
      }, $.flattenEach = r, $.flattenReduce = function(t, d, u) {
        var o = u;
        return r(t, function(h, l, i) {
          o = l === 0 && i === 0 && u === void 0 ? h : d(o, h, l, i);
        }), o;
      }, $.segmentEach = n, $.segmentReduce = function(t, d, u) {
        var o = u, h = !1;
        return n(t, function(l, i, p, c, a) {
          o = h === !1 && u === void 0 ? l : d(o, l, i, p, c, a), h = !0;
        }), o;
      }, $.lineEach = s, $.lineReduce = function(t, d, u) {
        var o = u;
        return s(t, function(h, l, i, p) {
          o = l === 0 && u === void 0 ? h : d(o, h, l, i, p);
        }), o;
      }, $.findSegment = function(t, d) {
        if (d = d || {}, !m.isObject(d))
          throw new Error("options is invalid");
        var u, o = d.featureIndex || 0, h = d.multiFeatureIndex || 0, l = d.geometryIndex || 0, i = d.segmentIndex || 0, p = d.properties;
        switch (t.type) {
          case "FeatureCollection":
            o < 0 && (o = t.features.length + o), p = p || t.features[o].properties, u = t.features[o].geometry;
            break;
          case "Feature":
            p = p || t.properties, u = t.geometry;
            break;
          case "Point":
          case "MultiPoint":
            return null;
          case "LineString":
          case "Polygon":
          case "MultiLineString":
          case "MultiPolygon":
            u = t;
            break;
          default:
            throw new Error("geojson is invalid");
        }
        if (u === null)
          return null;
        var c = u.coordinates;
        switch (u.type) {
          case "Point":
          case "MultiPoint":
            return null;
          case "LineString":
            return i < 0 && (i = c.length + i - 1), m.lineString([c[i], c[i + 1]], p, d);
          case "Polygon":
            return l < 0 && (l = c.length + l), i < 0 && (i = c[l].length + i - 1), m.lineString([c[l][i], c[l][i + 1]], p, d);
          case "MultiLineString":
            return h < 0 && (h = c.length + h), i < 0 && (i = c[h].length + i - 1), m.lineString([c[h][i], c[h][i + 1]], p, d);
          case "MultiPolygon":
            return h < 0 && (h = c.length + h), l < 0 && (l = c[h].length + l), i < 0 && (i = c[h][l].length - i - 1), m.lineString([c[h][l][i], c[h][l][i + 1]], p, d);
        }
        throw new Error("geojson is invalid");
      }, $.findPoint = function(t, d) {
        if (d = d || {}, !m.isObject(d))
          throw new Error("options is invalid");
        var u, o = d.featureIndex || 0, h = d.multiFeatureIndex || 0, l = d.geometryIndex || 0, i = d.coordIndex || 0, p = d.properties;
        switch (t.type) {
          case "FeatureCollection":
            o < 0 && (o = t.features.length + o), p = p || t.features[o].properties, u = t.features[o].geometry;
            break;
          case "Feature":
            p = p || t.properties, u = t.geometry;
            break;
          case "Point":
          case "MultiPoint":
            return null;
          case "LineString":
          case "Polygon":
          case "MultiLineString":
          case "MultiPolygon":
            u = t;
            break;
          default:
            throw new Error("geojson is invalid");
        }
        if (u === null)
          return null;
        var c = u.coordinates;
        switch (u.type) {
          case "Point":
            return m.point(c, p, d);
          case "MultiPoint":
            return h < 0 && (h = c.length + h), m.point(c[h], p, d);
          case "LineString":
            return i < 0 && (i = c.length + i), m.point(c[i], p, d);
          case "Polygon":
            return l < 0 && (l = c.length + l), i < 0 && (i = c[l].length + i), m.point(c[l][i], p, d);
          case "MultiLineString":
            return h < 0 && (h = c.length + h), i < 0 && (i = c[h].length + i), m.point(c[h][i], p, d);
          case "MultiPolygon":
            return h < 0 && (h = c.length + h), l < 0 && (l = c[h].length + l), i < 0 && (i = c[h][l].length - i), m.point(c[h][l][i], p, d);
        }
        throw new Error("geojson is invalid");
      };
    }, { "@turf/helpers": 68 }], 70: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = 0, k = 0, x = 0, e = 0;
        return m.map(function(r) {
          var n = (r = r.slice())[0], s = n.toUpperCase();
          if (n != s)
            switch (r[0] = s, n) {
              case "a":
                r[6] += x, r[7] += e;
                break;
              case "v":
                r[1] += e;
                break;
              case "h":
                r[1] += x;
                break;
              default:
                for (var t = 1; t < r.length; )
                  r[t++] += x, r[t++] += e;
            }
          switch (s) {
            case "Z":
              x = g, e = k;
              break;
            case "H":
              x = r[1];
              break;
            case "V":
              e = r[1];
              break;
            case "M":
              x = g = r[1], e = k = r[2];
              break;
            default:
              x = r[r.length - 2], e = r[r.length - 1];
          }
          return r;
        });
      };
    }, {}], 71: [function(v, Q, $) {
      Q.exports = function(m, g) {
        if (!m || m.length == null)
          throw Error("Argument should be an array");
        g = g == null ? 1 : Math.floor(g);
        for (var k = Array(2 * g), x = 0; x < g; x++) {
          for (var e = -1 / 0, r = 1 / 0, n = x, s = m.length; n < s; n += g)
            m[n] > e && (e = m[n]), m[n] < r && (r = m[n]);
          k[x] = r, k[g + x] = e;
        }
        return k;
      };
    }, {}], 72: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        if (typeof Array.prototype.findIndex == "function")
          return m.findIndex(g, k);
        if (typeof g != "function")
          throw new TypeError("predicate must be a function");
        var x = Object(m), e = x.length;
        if (e === 0)
          return -1;
        for (var r = 0; r < e; r++)
          if (g.call(k, x[r], r, x))
            return r;
        return -1;
      };
    }, {}], 73: [function(v, Q, $) {
      var m = v("array-bounds");
      Q.exports = function(g, k, x) {
        if (!g || g.length == null)
          throw Error("Argument should be an array");
        k == null && (k = 1), x == null && (x = m(g, k));
        for (var e = 0; e < k; e++) {
          var r = x[k + e], n = x[e], s = e, t = g.length;
          if (r === 1 / 0 && n === -1 / 0)
            for (s = e; s < t; s += k)
              g[s] = g[s] === r ? 1 : g[s] === n ? 0 : 0.5;
          else if (r === 1 / 0)
            for (s = e; s < t; s += k)
              g[s] = g[s] === r ? 1 : 0;
          else if (n === -1 / 0)
            for (s = e; s < t; s += k)
              g[s] = g[s] === n ? 0 : 1;
          else {
            var d = r - n;
            for (s = e; s < t; s += k)
              isNaN(g[s]) || (g[s] = d === 0 ? 0.5 : (g[s] - n) / d);
          }
        }
        return g;
      };
    }, { "array-bounds": 71 }], 74: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = typeof m == "number", x = typeof g == "number";
        k && !x ? (g = m, m = 0) : k || x || (m = 0, g = 0);
        var e = (g |= 0) - (m |= 0);
        if (e < 0)
          throw new Error("array length must be positive");
        for (var r = new Array(e), n = 0, s = m; n < e; n++, s++)
          r[n] = s;
        return r;
      };
    }, {}], 75: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = v("object-assign");
          /*!
           * The buffer module from node.js, for the browser.
           *
           * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
           * @license  MIT
           */
          function k(w, T) {
            if (w === T)
              return 0;
            for (var L = w.length, A = T.length, I = 0, P = Math.min(L, A); I < P; ++I)
              if (w[I] !== T[I]) {
                L = w[I], A = T[I];
                break;
              }
            return L < A ? -1 : A < L ? 1 : 0;
          }
          function x(w) {
            return m.Buffer && typeof m.Buffer.isBuffer == "function" ? m.Buffer.isBuffer(w) : !(w == null || !w._isBuffer);
          }
          var e = v("util/"), r = Object.prototype.hasOwnProperty, n = Array.prototype.slice, s = function() {
          }.name === "foo";
          function t(w) {
            return Object.prototype.toString.call(w);
          }
          function d(w) {
            return !x(w) && typeof m.ArrayBuffer == "function" && (typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(w) : !!w && (w instanceof DataView || !!(w.buffer && w.buffer instanceof ArrayBuffer)));
          }
          var u = Q.exports = c, o = /\s*function\s+([^\(\s]*)\s*/;
          function h(w) {
            if (e.isFunction(w)) {
              if (s)
                return w.name;
              var T = w.toString().match(o);
              return T && T[1];
            }
          }
          function l(w, T) {
            return typeof w == "string" ? w.length < T ? w : w.slice(0, T) : w;
          }
          function i(w) {
            if (s || !e.isFunction(w))
              return e.inspect(w);
            var T = h(w);
            return "[Function" + (T ? ": " + T : "") + "]";
          }
          function p(w, T, L, A, I) {
            throw new u.AssertionError({ message: L, actual: w, expected: T, operator: A, stackStartFunction: I });
          }
          function c(w, T) {
            w || p(w, !0, T, "==", u.ok);
          }
          function a(w, T, L, A) {
            if (w === T)
              return !0;
            if (x(w) && x(T))
              return k(w, T) === 0;
            if (e.isDate(w) && e.isDate(T))
              return w.getTime() === T.getTime();
            if (e.isRegExp(w) && e.isRegExp(T))
              return w.source === T.source && w.global === T.global && w.multiline === T.multiline && w.lastIndex === T.lastIndex && w.ignoreCase === T.ignoreCase;
            if (w !== null && typeof w == "object" || T !== null && typeof T == "object") {
              if (d(w) && d(T) && t(w) === t(T) && !(w instanceof Float32Array || w instanceof Float64Array))
                return k(new Uint8Array(w.buffer), new Uint8Array(T.buffer)) === 0;
              if (x(w) !== x(T))
                return !1;
              var I = (A = A || { actual: [], expected: [] }).actual.indexOf(w);
              return I !== -1 && I === A.expected.indexOf(T) || (A.actual.push(w), A.expected.push(T), function(P, S, E, R) {
                if (P == null || S == null)
                  return !1;
                if (e.isPrimitive(P) || e.isPrimitive(S))
                  return P === S;
                if (E && Object.getPrototypeOf(P) !== Object.getPrototypeOf(S))
                  return !1;
                var z = y(P), j = y(S);
                if (z && !j || !z && j)
                  return !1;
                if (z)
                  return P = n.call(P), S = n.call(S), a(P, S, E);
                var H, Y, J = b(P), W = b(S);
                if (J.length !== W.length)
                  return !1;
                for (J.sort(), W.sort(), Y = J.length - 1; Y >= 0; Y--)
                  if (J[Y] !== W[Y])
                    return !1;
                for (Y = J.length - 1; Y >= 0; Y--)
                  if (H = J[Y], !a(P[H], S[H], E, R))
                    return !1;
                return !0;
              }(w, T, L, A));
            }
            return L ? w === T : w == T;
          }
          function y(w) {
            return Object.prototype.toString.call(w) == "[object Arguments]";
          }
          function f(w, T) {
            if (!w || !T)
              return !1;
            if (Object.prototype.toString.call(T) == "[object RegExp]")
              return T.test(w);
            try {
              if (w instanceof T)
                return !0;
            } catch {
            }
            return !Error.isPrototypeOf(T) && T.call({}, w) === !0;
          }
          function _(w, T, L, A) {
            var I;
            if (typeof T != "function")
              throw new TypeError('"block" argument must be a function');
            typeof L == "string" && (A = L, L = null), I = function(E) {
              var R;
              try {
                E();
              } catch (z) {
                R = z;
              }
              return R;
            }(T), A = (L && L.name ? " (" + L.name + ")." : ".") + (A ? " " + A : "."), w && !I && p(I, L, "Missing expected exception" + A);
            var P = typeof A == "string", S = !w && I && !L;
            if ((!w && e.isError(I) && P && f(I, L) || S) && p(I, L, "Got unwanted exception" + A), w && I && L && !f(I, L) || !w && I)
              throw I;
          }
          u.AssertionError = function(w) {
            this.name = "AssertionError", this.actual = w.actual, this.expected = w.expected, this.operator = w.operator, w.message ? (this.message = w.message, this.generatedMessage = !1) : (this.message = function(E) {
              return l(i(E.actual), 128) + " " + E.operator + " " + l(i(E.expected), 128);
            }(this), this.generatedMessage = !0);
            var T = w.stackStartFunction || p;
            if (Error.captureStackTrace)
              Error.captureStackTrace(this, T);
            else {
              var L = new Error();
              if (L.stack) {
                var A = L.stack, I = h(T), P = A.indexOf(`
` + I);
                if (P >= 0) {
                  var S = A.indexOf(`
`, P + 1);
                  A = A.substring(S + 1);
                }
                this.stack = A;
              }
            }
          }, e.inherits(u.AssertionError, Error), u.fail = p, u.ok = c, u.equal = function(w, T, L) {
            w != T && p(w, T, L, "==", u.equal);
          }, u.notEqual = function(w, T, L) {
            w == T && p(w, T, L, "!=", u.notEqual);
          }, u.deepEqual = function(w, T, L) {
            a(w, T, !1) || p(w, T, L, "deepEqual", u.deepEqual);
          }, u.deepStrictEqual = function(w, T, L) {
            a(w, T, !0) || p(w, T, L, "deepStrictEqual", u.deepStrictEqual);
          }, u.notDeepEqual = function(w, T, L) {
            a(w, T, !1) && p(w, T, L, "notDeepEqual", u.notDeepEqual);
          }, u.notDeepStrictEqual = function w(T, L, A) {
            a(T, L, !0) && p(T, L, A, "notDeepStrictEqual", w);
          }, u.strictEqual = function(w, T, L) {
            w !== T && p(w, T, L, "===", u.strictEqual);
          }, u.notStrictEqual = function(w, T, L) {
            w === T && p(w, T, L, "!==", u.notStrictEqual);
          }, u.throws = function(w, T, L) {
            _(!0, w, T, L);
          }, u.doesNotThrow = function(w, T, L) {
            _(!1, w, T, L);
          }, u.ifError = function(w) {
            if (w)
              throw w;
          }, u.strict = g(function w(T, L) {
            T || p(T, !0, L, "==", w);
          }, u, { equal: u.strictEqual, deepEqual: u.deepStrictEqual, notEqual: u.notStrictEqual, notDeepEqual: u.notDeepStrictEqual }), u.strict.strict = u.strict;
          var b = Object.keys || function(w) {
            var T = [];
            for (var L in w)
              r.call(w, L) && T.push(L);
            return T;
          };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "object-assign": 247, "util/": 78 }], 76: [function(v, Q, $) {
      typeof Object.create == "function" ? Q.exports = function(m, g) {
        m.super_ = g, m.prototype = Object.create(g.prototype, { constructor: { value: m, enumerable: !1, writable: !0, configurable: !0 } });
      } : Q.exports = function(m, g) {
        m.super_ = g;
        var k = function() {
        };
        k.prototype = g.prototype, m.prototype = new k(), m.prototype.constructor = m;
      };
    }, {}], 77: [function(v, Q, $) {
      Q.exports = function(m) {
        return m && typeof m == "object" && typeof m.copy == "function" && typeof m.fill == "function" && typeof m.readUInt8 == "function";
      };
    }, {}], 78: [function(v, Q, $) {
      (function(m, g) {
        (function() {
          var k = /%[sdj%]/g;
          $.format = function(P) {
            if (!p(P)) {
              for (var S = [], E = 0; E < arguments.length; E++)
                S.push(r(arguments[E]));
              return S.join(" ");
            }
            E = 1;
            for (var R = arguments, z = R.length, j = String(P).replace(k, function(Y) {
              if (Y === "%%")
                return "%";
              if (E >= z)
                return Y;
              switch (Y) {
                case "%s":
                  return String(R[E++]);
                case "%d":
                  return Number(R[E++]);
                case "%j":
                  try {
                    return JSON.stringify(R[E++]);
                  } catch {
                    return "[Circular]";
                  }
                default:
                  return Y;
              }
            }), H = R[E]; E < z; H = R[++E])
              l(H) || !y(H) ? j += " " + H : j += " " + r(H);
            return j;
          }, $.deprecate = function(P, S) {
            if (c(g.process))
              return function() {
                return $.deprecate(P, S).apply(this, arguments);
              };
            if (m.noDeprecation === !0)
              return P;
            var E = !1;
            return function() {
              if (!E) {
                if (m.throwDeprecation)
                  throw new Error(S);
                m.traceDeprecation ? console.trace(S) : console.error(S), E = !0;
              }
              return P.apply(this, arguments);
            };
          };
          var x, e = {};
          function r(P, S) {
            var E = { seen: [], stylize: s };
            return arguments.length >= 3 && (E.depth = arguments[2]), arguments.length >= 4 && (E.colors = arguments[3]), h(S) ? E.showHidden = S : S && $._extend(E, S), c(E.showHidden) && (E.showHidden = !1), c(E.depth) && (E.depth = 2), c(E.colors) && (E.colors = !1), c(E.customInspect) && (E.customInspect = !0), E.colors && (E.stylize = n), t(E, P, E.depth);
          }
          function n(P, S) {
            var E = r.styles[S];
            return E ? "\x1B[" + r.colors[E][0] + "m" + P + "\x1B[" + r.colors[E][1] + "m" : P;
          }
          function s(P, S) {
            return P;
          }
          function t(P, S, E) {
            if (P.customInspect && S && b(S.inspect) && S.inspect !== $.inspect && (!S.constructor || S.constructor.prototype !== S)) {
              var R = S.inspect(E, P);
              return p(R) || (R = t(P, R, E)), R;
            }
            var z = function(V, B) {
              if (c(B))
                return V.stylize("undefined", "undefined");
              if (p(B)) {
                var U = "'" + JSON.stringify(B).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
                return V.stylize(U, "string");
              }
              if (i(B))
                return V.stylize("" + B, "number");
              if (h(B))
                return V.stylize("" + B, "boolean");
              if (l(B))
                return V.stylize("null", "null");
            }(P, S);
            if (z)
              return z;
            var j = Object.keys(S), H = function(V) {
              var B = {};
              return V.forEach(function(U, ee) {
                B[U] = !0;
              }), B;
            }(j);
            if (P.showHidden && (j = Object.getOwnPropertyNames(S)), _(S) && (j.indexOf("message") >= 0 || j.indexOf("description") >= 0))
              return d(S);
            if (j.length === 0) {
              if (b(S)) {
                var Y = S.name ? ": " + S.name : "";
                return P.stylize("[Function" + Y + "]", "special");
              }
              if (a(S))
                return P.stylize(RegExp.prototype.toString.call(S), "regexp");
              if (f(S))
                return P.stylize(Date.prototype.toString.call(S), "date");
              if (_(S))
                return d(S);
            }
            var J, W = "", Z = !1, re = ["{", "}"];
            return o(S) && (Z = !0, re = ["[", "]"]), b(S) && (W = " [Function" + (S.name ? ": " + S.name : "") + "]"), a(S) && (W = " " + RegExp.prototype.toString.call(S)), f(S) && (W = " " + Date.prototype.toUTCString.call(S)), _(S) && (W = " " + d(S)), j.length !== 0 || Z && S.length != 0 ? E < 0 ? a(S) ? P.stylize(RegExp.prototype.toString.call(S), "regexp") : P.stylize("[Object]", "special") : (P.seen.push(S), J = Z ? function(V, B, U, ee, N) {
              for (var K = [], X = 0, te = B.length; X < te; ++X)
                I(B, String(X)) ? K.push(u(V, B, U, ee, String(X), !0)) : K.push("");
              return N.forEach(function(ie) {
                ie.match(/^\d+$/) || K.push(u(V, B, U, ee, ie, !0));
              }), K;
            }(P, S, E, H, j) : j.map(function(V) {
              return u(P, S, E, H, V, Z);
            }), P.seen.pop(), function(V, B, U) {
              return V.reduce(function(ee, N) {
                return N.indexOf(`
`) >= 0, ee + N.replace(/\u001b\[\d\d?m/g, "").length + 1;
              }, 0) > 60 ? U[0] + (B === "" ? "" : B + `
 `) + " " + V.join(`,
  `) + " " + U[1] : U[0] + B + " " + V.join(", ") + " " + U[1];
            }(J, W, re)) : re[0] + W + re[1];
          }
          function d(P) {
            return "[" + Error.prototype.toString.call(P) + "]";
          }
          function u(P, S, E, R, z, j) {
            var H, Y, J;
            if ((J = Object.getOwnPropertyDescriptor(S, z) || { value: S[z] }).get ? Y = J.set ? P.stylize("[Getter/Setter]", "special") : P.stylize("[Getter]", "special") : J.set && (Y = P.stylize("[Setter]", "special")), I(R, z) || (H = "[" + z + "]"), Y || (P.seen.indexOf(J.value) < 0 ? (Y = l(E) ? t(P, J.value, null) : t(P, J.value, E - 1)).indexOf(`
`) > -1 && (Y = j ? Y.split(`
`).map(function(W) {
              return "  " + W;
            }).join(`
`).substr(2) : `
` + Y.split(`
`).map(function(W) {
              return "   " + W;
            }).join(`
`)) : Y = P.stylize("[Circular]", "special")), c(H)) {
              if (j && z.match(/^\d+$/))
                return Y;
              (H = JSON.stringify("" + z)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (H = H.substr(1, H.length - 2), H = P.stylize(H, "name")) : (H = H.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), H = P.stylize(H, "string"));
            }
            return H + ": " + Y;
          }
          function o(P) {
            return Array.isArray(P);
          }
          function h(P) {
            return typeof P == "boolean";
          }
          function l(P) {
            return P === null;
          }
          function i(P) {
            return typeof P == "number";
          }
          function p(P) {
            return typeof P == "string";
          }
          function c(P) {
            return P === void 0;
          }
          function a(P) {
            return y(P) && w(P) === "[object RegExp]";
          }
          function y(P) {
            return typeof P == "object" && P !== null;
          }
          function f(P) {
            return y(P) && w(P) === "[object Date]";
          }
          function _(P) {
            return y(P) && (w(P) === "[object Error]" || P instanceof Error);
          }
          function b(P) {
            return typeof P == "function";
          }
          function w(P) {
            return Object.prototype.toString.call(P);
          }
          function T(P) {
            return P < 10 ? "0" + P.toString(10) : P.toString(10);
          }
          $.debuglog = function(P) {
            if (c(x) && (x = m.env.NODE_DEBUG || ""), P = P.toUpperCase(), !e[P])
              if (new RegExp("\\b" + P + "\\b", "i").test(x)) {
                var S = m.pid;
                e[P] = function() {
                  var E = $.format.apply($, arguments);
                  console.error("%s %d: %s", P, S, E);
                };
              } else
                e[P] = function() {
                };
            return e[P];
          }, $.inspect = r, r.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, r.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, $.isArray = o, $.isBoolean = h, $.isNull = l, $.isNullOrUndefined = function(P) {
            return P == null;
          }, $.isNumber = i, $.isString = p, $.isSymbol = function(P) {
            return typeof P == "symbol";
          }, $.isUndefined = c, $.isRegExp = a, $.isObject = y, $.isDate = f, $.isError = _, $.isFunction = b, $.isPrimitive = function(P) {
            return P === null || typeof P == "boolean" || typeof P == "number" || typeof P == "string" || typeof P == "symbol" || P === void 0;
          }, $.isBuffer = v("./support/isBuffer");
          var L = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
          function A() {
            var P = new Date(), S = [T(P.getHours()), T(P.getMinutes()), T(P.getSeconds())].join(":");
            return [P.getDate(), L[P.getMonth()], S].join(" ");
          }
          function I(P, S) {
            return Object.prototype.hasOwnProperty.call(P, S);
          }
          $.log = function() {
            console.log("%s - %s", A(), $.format.apply($, arguments));
          }, $.inherits = v("inherits"), $._extend = function(P, S) {
            if (!S || !y(S))
              return P;
            for (var E = Object.keys(S), R = E.length; R--; )
              P[E[R]] = S[E[R]];
            return P;
          };
        }).call(this);
      }).call(this, v("_process"), typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "./support/isBuffer": 77, _process: 278, inherits: 76 }], 79: [function(v, Q, $) {
      $.byteLength = function(t) {
        var d = n(t), u = d[0], o = d[1];
        return 3 * (u + o) / 4 - o;
      }, $.toByteArray = function(t) {
        var d, u, o = n(t), h = o[0], l = o[1], i = new k(function(a, y, f) {
          return 3 * (y + f) / 4 - f;
        }(0, h, l)), p = 0, c = l > 0 ? h - 4 : h;
        for (u = 0; u < c; u += 4)
          d = g[t.charCodeAt(u)] << 18 | g[t.charCodeAt(u + 1)] << 12 | g[t.charCodeAt(u + 2)] << 6 | g[t.charCodeAt(u + 3)], i[p++] = d >> 16 & 255, i[p++] = d >> 8 & 255, i[p++] = 255 & d;
        return l === 2 && (d = g[t.charCodeAt(u)] << 2 | g[t.charCodeAt(u + 1)] >> 4, i[p++] = 255 & d), l === 1 && (d = g[t.charCodeAt(u)] << 10 | g[t.charCodeAt(u + 1)] << 4 | g[t.charCodeAt(u + 2)] >> 2, i[p++] = d >> 8 & 255, i[p++] = 255 & d), i;
      }, $.fromByteArray = function(t) {
        for (var d, u = t.length, o = u % 3, h = [], l = 0, i = u - o; l < i; l += 16383)
          h.push(s(t, l, l + 16383 > i ? i : l + 16383));
        return o === 1 ? (d = t[u - 1], h.push(m[d >> 2] + m[d << 4 & 63] + "==")) : o === 2 && (d = (t[u - 2] << 8) + t[u - 1], h.push(m[d >> 10] + m[d >> 4 & 63] + m[d << 2 & 63] + "=")), h.join("");
      };
      for (var m = [], g = [], k = typeof Uint8Array < "u" ? Uint8Array : Array, x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = 0, r = x.length; e < r; ++e)
        m[e] = x[e], g[x.charCodeAt(e)] = e;
      function n(t) {
        var d = t.length;
        if (d % 4 > 0)
          throw new Error("Invalid string. Length must be a multiple of 4");
        var u = t.indexOf("=");
        return u === -1 && (u = d), [u, u === d ? 0 : 4 - u % 4];
      }
      function s(t, d, u) {
        for (var o, h, l = [], i = d; i < u; i += 3)
          o = (t[i] << 16 & 16711680) + (t[i + 1] << 8 & 65280) + (255 & t[i + 2]), l.push(m[(h = o) >> 18 & 63] + m[h >> 12 & 63] + m[h >> 6 & 63] + m[63 & h]);
        return l.join("");
      }
      g["-".charCodeAt(0)] = 62, g["_".charCodeAt(0)] = 63;
    }, {}], 80: [function(v, Q, $) {
      function m(n, s, t, d, u) {
        for (var o = u + 1; d <= u; ) {
          var h = d + u >>> 1, l = n[h];
          (t !== void 0 ? t(l, s) : l - s) >= 0 ? (o = h, u = h - 1) : d = h + 1;
        }
        return o;
      }
      function g(n, s, t, d, u) {
        for (var o = u + 1; d <= u; ) {
          var h = d + u >>> 1, l = n[h];
          (t !== void 0 ? t(l, s) : l - s) > 0 ? (o = h, u = h - 1) : d = h + 1;
        }
        return o;
      }
      function k(n, s, t, d, u) {
        for (var o = d - 1; d <= u; ) {
          var h = d + u >>> 1, l = n[h];
          (t !== void 0 ? t(l, s) : l - s) < 0 ? (o = h, d = h + 1) : u = h - 1;
        }
        return o;
      }
      function x(n, s, t, d, u) {
        for (var o = d - 1; d <= u; ) {
          var h = d + u >>> 1, l = n[h];
          (t !== void 0 ? t(l, s) : l - s) <= 0 ? (o = h, d = h + 1) : u = h - 1;
        }
        return o;
      }
      function e(n, s, t, d, u) {
        for (; d <= u; ) {
          var o = d + u >>> 1, h = n[o], l = t !== void 0 ? t(h, s) : h - s;
          if (l === 0)
            return o;
          l <= 0 ? d = o + 1 : u = o - 1;
        }
        return -1;
      }
      function r(n, s, t, d, u, o) {
        return typeof t == "function" ? o(n, s, t, d === void 0 ? 0 : 0 | d, u === void 0 ? n.length - 1 : 0 | u) : o(n, s, void 0, t === void 0 ? 0 : 0 | t, d === void 0 ? n.length - 1 : 0 | d);
      }
      Q.exports = { ge: function(n, s, t, d, u) {
        return r(n, s, t, d, u, m);
      }, gt: function(n, s, t, d, u) {
        return r(n, s, t, d, u, g);
      }, lt: function(n, s, t, d, u) {
        return r(n, s, t, d, u, k);
      }, le: function(n, s, t, d, u) {
        return r(n, s, t, d, u, x);
      }, eq: function(n, s, t, d, u) {
        return r(n, s, t, d, u, e);
      } };
    }, {}], 81: [function(v, Q, $) {
      function m(k) {
        var x = 32;
        return (k &= -k) && x--, 65535 & k && (x -= 16), 16711935 & k && (x -= 8), 252645135 & k && (x -= 4), 858993459 & k && (x -= 2), 1431655765 & k && (x -= 1), x;
      }
      $.INT_BITS = 32, $.INT_MAX = 2147483647, $.INT_MIN = -1 << 31, $.sign = function(k) {
        return (k > 0) - (k < 0);
      }, $.abs = function(k) {
        var x = k >> 31;
        return (k ^ x) - x;
      }, $.min = function(k, x) {
        return x ^ (k ^ x) & -(k < x);
      }, $.max = function(k, x) {
        return k ^ (k ^ x) & -(k < x);
      }, $.isPow2 = function(k) {
        return !(k & k - 1 || !k);
      }, $.log2 = function(k) {
        var x, e;
        return x = (k > 65535) << 4, x |= e = ((k >>>= x) > 255) << 3, x |= e = ((k >>>= e) > 15) << 2, (x |= e = ((k >>>= e) > 3) << 1) | (k >>>= e) >> 1;
      }, $.log10 = function(k) {
        return k >= 1e9 ? 9 : k >= 1e8 ? 8 : k >= 1e7 ? 7 : k >= 1e6 ? 6 : k >= 1e5 ? 5 : k >= 1e4 ? 4 : k >= 1e3 ? 3 : k >= 100 ? 2 : k >= 10 ? 1 : 0;
      }, $.popCount = function(k) {
        return 16843009 * ((k = (858993459 & (k -= k >>> 1 & 1431655765)) + (k >>> 2 & 858993459)) + (k >>> 4) & 252645135) >>> 24;
      }, $.countTrailingZeros = m, $.nextPow2 = function(k) {
        return k += k === 0, --k, k |= k >>> 1, k |= k >>> 2, k |= k >>> 4, k |= k >>> 8, (k |= k >>> 16) + 1;
      }, $.prevPow2 = function(k) {
        return k |= k >>> 1, k |= k >>> 2, k |= k >>> 4, k |= k >>> 8, (k |= k >>> 16) - (k >>> 1);
      }, $.parity = function(k) {
        return k ^= k >>> 16, k ^= k >>> 8, k ^= k >>> 4, 27030 >>> (k &= 15) & 1;
      };
      var g = new Array(256);
      (function(k) {
        for (var x = 0; x < 256; ++x) {
          var e = x, r = x, n = 7;
          for (e >>>= 1; e; e >>>= 1)
            r <<= 1, r |= 1 & e, --n;
          k[x] = r << n & 255;
        }
      })(g), $.reverse = function(k) {
        return g[255 & k] << 24 | g[k >>> 8 & 255] << 16 | g[k >>> 16 & 255] << 8 | g[k >>> 24 & 255];
      }, $.interleave2 = function(k, x) {
        return (k = 1431655765 & ((k = 858993459 & ((k = 252645135 & ((k = 16711935 & ((k &= 65535) | k << 8)) | k << 4)) | k << 2)) | k << 1)) | (x = 1431655765 & ((x = 858993459 & ((x = 252645135 & ((x = 16711935 & ((x &= 65535) | x << 8)) | x << 4)) | x << 2)) | x << 1)) << 1;
      }, $.deinterleave2 = function(k, x) {
        return (k = 65535 & ((k = 16711935 & ((k = 252645135 & ((k = 858993459 & ((k = k >>> x & 1431655765) | k >>> 1)) | k >>> 2)) | k >>> 4)) | k >>> 16)) << 16 >> 16;
      }, $.interleave3 = function(k, x, e) {
        return k = 1227133513 & ((k = 3272356035 & ((k = 251719695 & ((k = 4278190335 & ((k &= 1023) | k << 16)) | k << 8)) | k << 4)) | k << 2), (k |= (x = 1227133513 & ((x = 3272356035 & ((x = 251719695 & ((x = 4278190335 & ((x &= 1023) | x << 16)) | x << 8)) | x << 4)) | x << 2)) << 1) | (e = 1227133513 & ((e = 3272356035 & ((e = 251719695 & ((e = 4278190335 & ((e &= 1023) | e << 16)) | e << 8)) | e << 4)) | e << 2)) << 2;
      }, $.deinterleave3 = function(k, x) {
        return (k = 1023 & ((k = 4278190335 & ((k = 251719695 & ((k = 3272356035 & ((k = k >>> x & 1227133513) | k >>> 2)) | k >>> 4)) | k >>> 8)) | k >>> 16)) << 22 >> 22;
      }, $.nextCombination = function(k) {
        var x = k | k - 1;
        return x + 1 | (~x & -~x) - 1 >>> m(k) + 1;
      };
    }, {}], 82: [function(v, Q, $) {
      var m = v("clamp");
      Q.exports = function(e, r) {
        r || (r = {});
        var n, s, t, d, u, o, h, l, i, p, c, a = r.cutoff == null ? 0.25 : r.cutoff, y = r.radius == null ? 8 : r.radius, f = r.channel || 0;
        if (ArrayBuffer.isView(e) || Array.isArray(e)) {
          if (!r.width || !r.height)
            throw Error("For raw data width and height should be provided by options");
          n = r.width, s = r.height, d = e, o = r.stride ? r.stride : Math.floor(e.length / n / s);
        } else
          window.HTMLCanvasElement && e instanceof window.HTMLCanvasElement ? (h = (l = e).getContext("2d"), n = l.width, s = l.height, i = h.getImageData(0, 0, n, s), d = i.data, o = 4) : window.CanvasRenderingContext2D && e instanceof window.CanvasRenderingContext2D ? (l = e.canvas, h = e, n = l.width, s = l.height, i = h.getImageData(0, 0, n, s), d = i.data, o = 4) : window.ImageData && e instanceof window.ImageData && (i = e, n = e.width, s = e.height, d = i.data, o = 4);
        if (t = Math.max(n, s), window.Uint8ClampedArray && d instanceof window.Uint8ClampedArray || window.Uint8Array && d instanceof window.Uint8Array)
          for (u = d, d = Array(n * s), p = 0, c = u.length; p < c; p++)
            d[p] = u[p * o + f] / 255;
        else if (o !== 1)
          throw Error("Raw data can have only 1 value per pixel");
        var _ = Array(n * s), b = Array(n * s), w = Array(t), T = Array(t), L = Array(t + 1), A = Array(t);
        for (p = 0, c = n * s; p < c; p++) {
          var I = d[p];
          _[p] = I === 1 ? 0 : I === 0 ? g : Math.pow(Math.max(0, 0.5 - I), 2), b[p] = I === 1 ? g : I === 0 ? 0 : Math.pow(Math.max(0, I - 0.5), 2);
        }
        k(_, n, s, w, T, A, L), k(b, n, s, w, T, A, L);
        var P = window.Float32Array ? new Float32Array(n * s) : new Array(n * s);
        for (p = 0, c = n * s; p < c; p++)
          P[p] = m(1 - ((_[p] - b[p]) / y + a), 0, 1);
        return P;
      };
      var g = 1e20;
      function k(e, r, n, s, t, d, u) {
        for (var o = 0; o < r; o++) {
          for (var h = 0; h < n; h++)
            s[h] = e[h * r + o];
          for (x(s, t, d, u, n), h = 0; h < n; h++)
            e[h * r + o] = t[h];
        }
        for (h = 0; h < n; h++) {
          for (o = 0; o < r; o++)
            s[o] = e[h * r + o];
          for (x(s, t, d, u, r), o = 0; o < r; o++)
            e[h * r + o] = Math.sqrt(t[o]);
        }
      }
      function x(e, r, n, s, t) {
        n[0] = 0, s[0] = -g, s[1] = +g;
        for (var d = 1, u = 0; d < t; d++) {
          for (var o = (e[d] + d * d - (e[n[u]] + n[u] * n[u])) / (2 * d - 2 * n[u]); o <= s[u]; )
            u--, o = (e[d] + d * d - (e[n[u]] + n[u] * n[u])) / (2 * d - 2 * n[u]);
          n[++u] = d, s[u] = o, s[u + 1] = +g;
        }
        for (d = 0, u = 0; d < t; d++) {
          for (; s[u + 1] < d; )
            u++;
          r[d] = (d - n[u]) * (d - n[u]) + e[n[u]];
        }
      }
    }, { clamp: 86 }], 83: [function(v, Q, $) {
    }, {}], 84: [function(v, Q, $) {
      var m, g = typeof Reflect == "object" ? Reflect : null, k = g && typeof g.apply == "function" ? g.apply : function(i, p, c) {
        return Function.prototype.apply.call(i, p, c);
      };
      m = g && typeof g.ownKeys == "function" ? g.ownKeys : Object.getOwnPropertySymbols ? function(i) {
        return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i));
      } : function(i) {
        return Object.getOwnPropertyNames(i);
      };
      var x = Number.isNaN || function(i) {
        return i != i;
      };
      function e() {
        e.init.call(this);
      }
      Q.exports = e, Q.exports.once = function(i, p) {
        return new Promise(function(c, a) {
          function y() {
            f !== void 0 && i.removeListener("error", f), c([].slice.call(arguments));
          }
          var f;
          p !== "error" && (f = function(_) {
            i.removeListener(p, y), a(_);
          }, i.once("error", f)), i.once(p, y);
        });
      }, e.EventEmitter = e, e.prototype._events = void 0, e.prototype._eventsCount = 0, e.prototype._maxListeners = void 0;
      var r = 10;
      function n(i) {
        if (typeof i != "function")
          throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof i);
      }
      function s(i) {
        return i._maxListeners === void 0 ? e.defaultMaxListeners : i._maxListeners;
      }
      function t(i, p, c, a) {
        var y, f, _, b;
        if (n(c), (f = i._events) === void 0 ? (f = i._events = /* @__PURE__ */ Object.create(null), i._eventsCount = 0) : (f.newListener !== void 0 && (i.emit("newListener", p, c.listener ? c.listener : c), f = i._events), _ = f[p]), _ === void 0)
          _ = f[p] = c, ++i._eventsCount;
        else if (typeof _ == "function" ? _ = f[p] = a ? [c, _] : [_, c] : a ? _.unshift(c) : _.push(c), (y = s(i)) > 0 && _.length > y && !_.warned) {
          _.warned = !0;
          var w = new Error("Possible EventEmitter memory leak detected. " + _.length + " " + String(p) + " listeners added. Use emitter.setMaxListeners() to increase limit");
          w.name = "MaxListenersExceededWarning", w.emitter = i, w.type = p, w.count = _.length, b = w, console && console.warn && console.warn(b);
        }
        return i;
      }
      function d() {
        if (!this.fired)
          return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
      }
      function u(i, p, c) {
        var a = { fired: !1, wrapFn: void 0, target: i, type: p, listener: c }, y = d.bind(a);
        return y.listener = c, a.wrapFn = y, y;
      }
      function o(i, p, c) {
        var a = i._events;
        if (a === void 0)
          return [];
        var y = a[p];
        return y === void 0 ? [] : typeof y == "function" ? c ? [y.listener || y] : [y] : c ? function(f) {
          for (var _ = new Array(f.length), b = 0; b < _.length; ++b)
            _[b] = f[b].listener || f[b];
          return _;
        }(y) : l(y, y.length);
      }
      function h(i) {
        var p = this._events;
        if (p !== void 0) {
          var c = p[i];
          if (typeof c == "function")
            return 1;
          if (c !== void 0)
            return c.length;
        }
        return 0;
      }
      function l(i, p) {
        for (var c = new Array(p), a = 0; a < p; ++a)
          c[a] = i[a];
        return c;
      }
      Object.defineProperty(e, "defaultMaxListeners", { enumerable: !0, get: function() {
        return r;
      }, set: function(i) {
        if (typeof i != "number" || i < 0 || x(i))
          throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + i + ".");
        r = i;
      } }), e.init = function() {
        this._events !== void 0 && this._events !== Object.getPrototypeOf(this)._events || (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
      }, e.prototype.setMaxListeners = function(i) {
        if (typeof i != "number" || i < 0 || x(i))
          throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + i + ".");
        return this._maxListeners = i, this;
      }, e.prototype.getMaxListeners = function() {
        return s(this);
      }, e.prototype.emit = function(i) {
        for (var p = [], c = 1; c < arguments.length; c++)
          p.push(arguments[c]);
        var a = i === "error", y = this._events;
        if (y !== void 0)
          a = a && y.error === void 0;
        else if (!a)
          return !1;
        if (a) {
          var f;
          if (p.length > 0 && (f = p[0]), f instanceof Error)
            throw f;
          var _ = new Error("Unhandled error." + (f ? " (" + f.message + ")" : ""));
          throw _.context = f, _;
        }
        var b = y[i];
        if (b === void 0)
          return !1;
        if (typeof b == "function")
          k(b, this, p);
        else {
          var w = b.length, T = l(b, w);
          for (c = 0; c < w; ++c)
            k(T[c], this, p);
        }
        return !0;
      }, e.prototype.addListener = function(i, p) {
        return t(this, i, p, !1);
      }, e.prototype.on = e.prototype.addListener, e.prototype.prependListener = function(i, p) {
        return t(this, i, p, !0);
      }, e.prototype.once = function(i, p) {
        return n(p), this.on(i, u(this, i, p)), this;
      }, e.prototype.prependOnceListener = function(i, p) {
        return n(p), this.prependListener(i, u(this, i, p)), this;
      }, e.prototype.removeListener = function(i, p) {
        var c, a, y, f, _;
        if (n(p), (a = this._events) === void 0)
          return this;
        if ((c = a[i]) === void 0)
          return this;
        if (c === p || c.listener === p)
          --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete a[i], a.removeListener && this.emit("removeListener", i, c.listener || p));
        else if (typeof c != "function") {
          for (y = -1, f = c.length - 1; f >= 0; f--)
            if (c[f] === p || c[f].listener === p) {
              _ = c[f].listener, y = f;
              break;
            }
          if (y < 0)
            return this;
          y === 0 ? c.shift() : function(b, w) {
            for (; w + 1 < b.length; w++)
              b[w] = b[w + 1];
            b.pop();
          }(c, y), c.length === 1 && (a[i] = c[0]), a.removeListener !== void 0 && this.emit("removeListener", i, _ || p);
        }
        return this;
      }, e.prototype.off = e.prototype.removeListener, e.prototype.removeAllListeners = function(i) {
        var p, c, a;
        if ((c = this._events) === void 0)
          return this;
        if (c.removeListener === void 0)
          return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : c[i] !== void 0 && (--this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete c[i]), this;
        if (arguments.length === 0) {
          var y, f = Object.keys(c);
          for (a = 0; a < f.length; ++a)
            (y = f[a]) !== "removeListener" && this.removeAllListeners(y);
          return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
        }
        if (typeof (p = c[i]) == "function")
          this.removeListener(i, p);
        else if (p !== void 0)
          for (a = p.length - 1; a >= 0; a--)
            this.removeListener(i, p[a]);
        return this;
      }, e.prototype.listeners = function(i) {
        return o(this, i, !0);
      }, e.prototype.rawListeners = function(i) {
        return o(this, i, !1);
      }, e.listenerCount = function(i, p) {
        return typeof i.listenerCount == "function" ? i.listenerCount(p) : h.call(i, p);
      }, e.prototype.listenerCount = h, e.prototype.eventNames = function() {
        return this._eventsCount > 0 ? m(this._events) : [];
      };
    }, {}], 85: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = v("base64-js"), k = v("ieee754");
          $.Buffer = e, $.SlowBuffer = function(V) {
            return +V != V && (V = 0), e.alloc(+V);
          }, $.INSPECT_MAX_BYTES = 50;
          function x(V) {
            if (V > 2147483647)
              throw new RangeError('The value "' + V + '" is invalid for option "size"');
            var B = new Uint8Array(V);
            return B.__proto__ = e.prototype, B;
          }
          function e(V, B, U) {
            if (typeof V == "number") {
              if (typeof B == "string")
                throw new TypeError('The "string" argument must be of type string. Received type number');
              return s(V);
            }
            return r(V, B, U);
          }
          function r(V, B, U) {
            if (typeof V == "string")
              return function(K, X) {
                if (typeof X == "string" && X !== "" || (X = "utf8"), !e.isEncoding(X))
                  throw new TypeError("Unknown encoding: " + X);
                var te = 0 | u(K, X), ie = x(te), le = ie.write(K, X);
                return le !== te && (ie = ie.slice(0, le)), ie;
              }(V, B);
            if (ArrayBuffer.isView(V))
              return t(V);
            if (V == null)
              throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof V);
            if (Z(V, ArrayBuffer) || V && Z(V.buffer, ArrayBuffer))
              return function(K, X, te) {
                if (X < 0 || K.byteLength < X)
                  throw new RangeError('"offset" is outside of buffer bounds');
                if (K.byteLength < X + (te || 0))
                  throw new RangeError('"length" is outside of buffer bounds');
                var ie;
                return ie = X === void 0 && te === void 0 ? new Uint8Array(K) : te === void 0 ? new Uint8Array(K, X) : new Uint8Array(K, X, te), ie.__proto__ = e.prototype, ie;
              }(V, B, U);
            if (typeof V == "number")
              throw new TypeError('The "value" argument must not be of type number. Received type number');
            var ee = V.valueOf && V.valueOf();
            if (ee != null && ee !== V)
              return e.from(ee, B, U);
            var N = function(K) {
              if (e.isBuffer(K)) {
                var X = 0 | d(K.length), te = x(X);
                return te.length === 0 || K.copy(te, 0, 0, X), te;
              }
              if (K.length !== void 0)
                return typeof K.length != "number" || re(K.length) ? x(0) : t(K);
              if (K.type === "Buffer" && Array.isArray(K.data))
                return t(K.data);
            }(V);
            if (N)
              return N;
            if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof V[Symbol.toPrimitive] == "function")
              return e.from(V[Symbol.toPrimitive]("string"), B, U);
            throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof V);
          }
          function n(V) {
            if (typeof V != "number")
              throw new TypeError('"size" argument must be of type number');
            if (V < 0)
              throw new RangeError('The value "' + V + '" is invalid for option "size"');
          }
          function s(V) {
            return n(V), x(V < 0 ? 0 : 0 | d(V));
          }
          function t(V) {
            for (var B = V.length < 0 ? 0 : 0 | d(V.length), U = x(B), ee = 0; ee < B; ee += 1)
              U[ee] = 255 & V[ee];
            return U;
          }
          function d(V) {
            if (V >= 2147483647)
              throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647 .toString(16) + " bytes");
            return 0 | V;
          }
          function u(V, B) {
            if (e.isBuffer(V))
              return V.length;
            if (ArrayBuffer.isView(V) || Z(V, ArrayBuffer))
              return V.byteLength;
            if (typeof V != "string")
              throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof V);
            var U = V.length, ee = arguments.length > 2 && arguments[2] === !0;
            if (!ee && U === 0)
              return 0;
            for (var N = !1; ; )
              switch (B) {
                case "ascii":
                case "latin1":
                case "binary":
                  return U;
                case "utf8":
                case "utf-8":
                  return Y(V).length;
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return 2 * U;
                case "hex":
                  return U >>> 1;
                case "base64":
                  return J(V).length;
                default:
                  if (N)
                    return ee ? -1 : Y(V).length;
                  B = ("" + B).toLowerCase(), N = !0;
              }
          }
          function o(V, B, U) {
            var ee = !1;
            if ((B === void 0 || B < 0) && (B = 0), B > this.length || ((U === void 0 || U > this.length) && (U = this.length), U <= 0) || (U >>>= 0) <= (B >>>= 0))
              return "";
            for (V || (V = "utf8"); ; )
              switch (V) {
                case "hex":
                  return A(this, B, U);
                case "utf8":
                case "utf-8":
                  return w(this, B, U);
                case "ascii":
                  return T(this, B, U);
                case "latin1":
                case "binary":
                  return L(this, B, U);
                case "base64":
                  return b(this, B, U);
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return I(this, B, U);
                default:
                  if (ee)
                    throw new TypeError("Unknown encoding: " + V);
                  V = (V + "").toLowerCase(), ee = !0;
              }
          }
          function h(V, B, U) {
            var ee = V[B];
            V[B] = V[U], V[U] = ee;
          }
          function l(V, B, U, ee, N) {
            if (V.length === 0)
              return -1;
            if (typeof U == "string" ? (ee = U, U = 0) : U > 2147483647 ? U = 2147483647 : U < -2147483648 && (U = -2147483648), re(U = +U) && (U = N ? 0 : V.length - 1), U < 0 && (U = V.length + U), U >= V.length) {
              if (N)
                return -1;
              U = V.length - 1;
            } else if (U < 0) {
              if (!N)
                return -1;
              U = 0;
            }
            if (typeof B == "string" && (B = e.from(B, ee)), e.isBuffer(B))
              return B.length === 0 ? -1 : i(V, B, U, ee, N);
            if (typeof B == "number")
              return B &= 255, typeof Uint8Array.prototype.indexOf == "function" ? N ? Uint8Array.prototype.indexOf.call(V, B, U) : Uint8Array.prototype.lastIndexOf.call(V, B, U) : i(V, [B], U, ee, N);
            throw new TypeError("val must be string, number or Buffer");
          }
          function i(V, B, U, ee, N) {
            var K, X = 1, te = V.length, ie = B.length;
            if (ee !== void 0 && ((ee = String(ee).toLowerCase()) === "ucs2" || ee === "ucs-2" || ee === "utf16le" || ee === "utf-16le")) {
              if (V.length < 2 || B.length < 2)
                return -1;
              X = 2, te /= 2, ie /= 2, U /= 2;
            }
            function le(ye, Ae) {
              return X === 1 ? ye[Ae] : ye.readUInt16BE(Ae * X);
            }
            if (N) {
              var oe = -1;
              for (K = U; K < te; K++)
                if (le(V, K) === le(B, oe === -1 ? 0 : K - oe)) {
                  if (oe === -1 && (oe = K), K - oe + 1 === ie)
                    return oe * X;
                } else
                  oe !== -1 && (K -= K - oe), oe = -1;
            } else
              for (U + ie > te && (U = te - ie), K = U; K >= 0; K--) {
                for (var ve = !0, ue = 0; ue < ie; ue++)
                  if (le(V, K + ue) !== le(B, ue)) {
                    ve = !1;
                    break;
                  }
                if (ve)
                  return K;
              }
            return -1;
          }
          function p(V, B, U, ee) {
            U = Number(U) || 0;
            var N = V.length - U;
            ee ? (ee = Number(ee)) > N && (ee = N) : ee = N;
            var K = B.length;
            ee > K / 2 && (ee = K / 2);
            for (var X = 0; X < ee; ++X) {
              var te = parseInt(B.substr(2 * X, 2), 16);
              if (re(te))
                return X;
              V[U + X] = te;
            }
            return X;
          }
          function c(V, B, U, ee) {
            return W(Y(B, V.length - U), V, U, ee);
          }
          function a(V, B, U, ee) {
            return W(function(N) {
              for (var K = [], X = 0; X < N.length; ++X)
                K.push(255 & N.charCodeAt(X));
              return K;
            }(B), V, U, ee);
          }
          function y(V, B, U, ee) {
            return a(V, B, U, ee);
          }
          function f(V, B, U, ee) {
            return W(J(B), V, U, ee);
          }
          function _(V, B, U, ee) {
            return W(function(N, K) {
              for (var X, te, ie, le = [], oe = 0; oe < N.length && !((K -= 2) < 0); ++oe)
                X = N.charCodeAt(oe), te = X >> 8, ie = X % 256, le.push(ie), le.push(te);
              return le;
            }(B, V.length - U), V, U, ee);
          }
          function b(V, B, U) {
            return B === 0 && U === V.length ? g.fromByteArray(V) : g.fromByteArray(V.slice(B, U));
          }
          function w(V, B, U) {
            U = Math.min(V.length, U);
            for (var ee = [], N = B; N < U; ) {
              var K, X, te, ie, le = V[N], oe = null, ve = le > 239 ? 4 : le > 223 ? 3 : le > 191 ? 2 : 1;
              if (N + ve <= U)
                switch (ve) {
                  case 1:
                    le < 128 && (oe = le);
                    break;
                  case 2:
                    (192 & (K = V[N + 1])) == 128 && (ie = (31 & le) << 6 | 63 & K) > 127 && (oe = ie);
                    break;
                  case 3:
                    K = V[N + 1], X = V[N + 2], (192 & K) == 128 && (192 & X) == 128 && (ie = (15 & le) << 12 | (63 & K) << 6 | 63 & X) > 2047 && (ie < 55296 || ie > 57343) && (oe = ie);
                    break;
                  case 4:
                    K = V[N + 1], X = V[N + 2], te = V[N + 3], (192 & K) == 128 && (192 & X) == 128 && (192 & te) == 128 && (ie = (15 & le) << 18 | (63 & K) << 12 | (63 & X) << 6 | 63 & te) > 65535 && ie < 1114112 && (oe = ie);
                }
              oe === null ? (oe = 65533, ve = 1) : oe > 65535 && (oe -= 65536, ee.push(oe >>> 10 & 1023 | 55296), oe = 56320 | 1023 & oe), ee.push(oe), N += ve;
            }
            return function(ue) {
              var ye = ue.length;
              if (ye <= 4096)
                return String.fromCharCode.apply(String, ue);
              for (var Ae = "", pe = 0; pe < ye; )
                Ae += String.fromCharCode.apply(String, ue.slice(pe, pe += 4096));
              return Ae;
            }(ee);
          }
          $.kMaxLength = 2147483647, e.TYPED_ARRAY_SUPPORT = function() {
            try {
              var V = new Uint8Array(1);
              return V.__proto__ = { __proto__: Uint8Array.prototype, foo: function() {
                return 42;
              } }, V.foo() === 42;
            } catch {
              return !1;
            }
          }(), e.TYPED_ARRAY_SUPPORT || typeof console > "u" || typeof console.error != "function" || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(e.prototype, "parent", { enumerable: !0, get: function() {
            if (e.isBuffer(this))
              return this.buffer;
          } }), Object.defineProperty(e.prototype, "offset", { enumerable: !0, get: function() {
            if (e.isBuffer(this))
              return this.byteOffset;
          } }), typeof Symbol < "u" && Symbol.species != null && e[Symbol.species] === e && Object.defineProperty(e, Symbol.species, { value: null, configurable: !0, enumerable: !1, writable: !1 }), e.poolSize = 8192, e.from = function(V, B, U) {
            return r(V, B, U);
          }, e.prototype.__proto__ = Uint8Array.prototype, e.__proto__ = Uint8Array, e.alloc = function(V, B, U) {
            return function(ee, N, K) {
              return n(ee), ee <= 0 ? x(ee) : N !== void 0 ? typeof K == "string" ? x(ee).fill(N, K) : x(ee).fill(N) : x(ee);
            }(V, B, U);
          }, e.allocUnsafe = function(V) {
            return s(V);
          }, e.allocUnsafeSlow = function(V) {
            return s(V);
          }, e.isBuffer = function(V) {
            return V != null && V._isBuffer === !0 && V !== e.prototype;
          }, e.compare = function(V, B) {
            if (Z(V, Uint8Array) && (V = e.from(V, V.offset, V.byteLength)), Z(B, Uint8Array) && (B = e.from(B, B.offset, B.byteLength)), !e.isBuffer(V) || !e.isBuffer(B))
              throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
            if (V === B)
              return 0;
            for (var U = V.length, ee = B.length, N = 0, K = Math.min(U, ee); N < K; ++N)
              if (V[N] !== B[N]) {
                U = V[N], ee = B[N];
                break;
              }
            return U < ee ? -1 : ee < U ? 1 : 0;
          }, e.isEncoding = function(V) {
            switch (String(V).toLowerCase()) {
              case "hex":
              case "utf8":
              case "utf-8":
              case "ascii":
              case "latin1":
              case "binary":
              case "base64":
              case "ucs2":
              case "ucs-2":
              case "utf16le":
              case "utf-16le":
                return !0;
              default:
                return !1;
            }
          }, e.concat = function(V, B) {
            if (!Array.isArray(V))
              throw new TypeError('"list" argument must be an Array of Buffers');
            if (V.length === 0)
              return e.alloc(0);
            var U;
            if (B === void 0)
              for (B = 0, U = 0; U < V.length; ++U)
                B += V[U].length;
            var ee = e.allocUnsafe(B), N = 0;
            for (U = 0; U < V.length; ++U) {
              var K = V[U];
              if (Z(K, Uint8Array) && (K = e.from(K)), !e.isBuffer(K))
                throw new TypeError('"list" argument must be an Array of Buffers');
              K.copy(ee, N), N += K.length;
            }
            return ee;
          }, e.byteLength = u, e.prototype._isBuffer = !0, e.prototype.swap16 = function() {
            var V = this.length;
            if (V % 2 != 0)
              throw new RangeError("Buffer size must be a multiple of 16-bits");
            for (var B = 0; B < V; B += 2)
              h(this, B, B + 1);
            return this;
          }, e.prototype.swap32 = function() {
            var V = this.length;
            if (V % 4 != 0)
              throw new RangeError("Buffer size must be a multiple of 32-bits");
            for (var B = 0; B < V; B += 4)
              h(this, B, B + 3), h(this, B + 1, B + 2);
            return this;
          }, e.prototype.swap64 = function() {
            var V = this.length;
            if (V % 8 != 0)
              throw new RangeError("Buffer size must be a multiple of 64-bits");
            for (var B = 0; B < V; B += 8)
              h(this, B, B + 7), h(this, B + 1, B + 6), h(this, B + 2, B + 5), h(this, B + 3, B + 4);
            return this;
          }, e.prototype.toString = function() {
            var V = this.length;
            return V === 0 ? "" : arguments.length === 0 ? w(this, 0, V) : o.apply(this, arguments);
          }, e.prototype.toLocaleString = e.prototype.toString, e.prototype.equals = function(V) {
            if (!e.isBuffer(V))
              throw new TypeError("Argument must be a Buffer");
            return this === V || e.compare(this, V) === 0;
          }, e.prototype.inspect = function() {
            var V = "", B = $.INSPECT_MAX_BYTES;
            return V = this.toString("hex", 0, B).replace(/(.{2})/g, "$1 ").trim(), this.length > B && (V += " ... "), "<Buffer " + V + ">";
          }, e.prototype.compare = function(V, B, U, ee, N) {
            if (Z(V, Uint8Array) && (V = e.from(V, V.offset, V.byteLength)), !e.isBuffer(V))
              throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof V);
            if (B === void 0 && (B = 0), U === void 0 && (U = V ? V.length : 0), ee === void 0 && (ee = 0), N === void 0 && (N = this.length), B < 0 || U > V.length || ee < 0 || N > this.length)
              throw new RangeError("out of range index");
            if (ee >= N && B >= U)
              return 0;
            if (ee >= N)
              return -1;
            if (B >= U)
              return 1;
            if (this === V)
              return 0;
            for (var K = (N >>>= 0) - (ee >>>= 0), X = (U >>>= 0) - (B >>>= 0), te = Math.min(K, X), ie = this.slice(ee, N), le = V.slice(B, U), oe = 0; oe < te; ++oe)
              if (ie[oe] !== le[oe]) {
                K = ie[oe], X = le[oe];
                break;
              }
            return K < X ? -1 : X < K ? 1 : 0;
          }, e.prototype.includes = function(V, B, U) {
            return this.indexOf(V, B, U) !== -1;
          }, e.prototype.indexOf = function(V, B, U) {
            return l(this, V, B, U, !0);
          }, e.prototype.lastIndexOf = function(V, B, U) {
            return l(this, V, B, U, !1);
          }, e.prototype.write = function(V, B, U, ee) {
            if (B === void 0)
              ee = "utf8", U = this.length, B = 0;
            else if (U === void 0 && typeof B == "string")
              ee = B, U = this.length, B = 0;
            else {
              if (!isFinite(B))
                throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
              B >>>= 0, isFinite(U) ? (U >>>= 0, ee === void 0 && (ee = "utf8")) : (ee = U, U = void 0);
            }
            var N = this.length - B;
            if ((U === void 0 || U > N) && (U = N), V.length > 0 && (U < 0 || B < 0) || B > this.length)
              throw new RangeError("Attempt to write outside buffer bounds");
            ee || (ee = "utf8");
            for (var K = !1; ; )
              switch (ee) {
                case "hex":
                  return p(this, V, B, U);
                case "utf8":
                case "utf-8":
                  return c(this, V, B, U);
                case "ascii":
                  return a(this, V, B, U);
                case "latin1":
                case "binary":
                  return y(this, V, B, U);
                case "base64":
                  return f(this, V, B, U);
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return _(this, V, B, U);
                default:
                  if (K)
                    throw new TypeError("Unknown encoding: " + ee);
                  ee = ("" + ee).toLowerCase(), K = !0;
              }
          }, e.prototype.toJSON = function() {
            return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
          };
          function T(V, B, U) {
            var ee = "";
            U = Math.min(V.length, U);
            for (var N = B; N < U; ++N)
              ee += String.fromCharCode(127 & V[N]);
            return ee;
          }
          function L(V, B, U) {
            var ee = "";
            U = Math.min(V.length, U);
            for (var N = B; N < U; ++N)
              ee += String.fromCharCode(V[N]);
            return ee;
          }
          function A(V, B, U) {
            var ee = V.length;
            (!B || B < 0) && (B = 0), (!U || U < 0 || U > ee) && (U = ee);
            for (var N = "", K = B; K < U; ++K)
              N += H(V[K]);
            return N;
          }
          function I(V, B, U) {
            for (var ee = V.slice(B, U), N = "", K = 0; K < ee.length; K += 2)
              N += String.fromCharCode(ee[K] + 256 * ee[K + 1]);
            return N;
          }
          function P(V, B, U) {
            if (V % 1 != 0 || V < 0)
              throw new RangeError("offset is not uint");
            if (V + B > U)
              throw new RangeError("Trying to access beyond buffer length");
          }
          function S(V, B, U, ee, N, K) {
            if (!e.isBuffer(V))
              throw new TypeError('"buffer" argument must be a Buffer instance');
            if (B > N || B < K)
              throw new RangeError('"value" argument is out of bounds');
            if (U + ee > V.length)
              throw new RangeError("Index out of range");
          }
          function E(V, B, U, ee, N, K) {
            if (U + ee > V.length)
              throw new RangeError("Index out of range");
            if (U < 0)
              throw new RangeError("Index out of range");
          }
          function R(V, B, U, ee, N) {
            return B = +B, U >>>= 0, N || E(V, 0, U, 4), k.write(V, B, U, ee, 23, 4), U + 4;
          }
          function z(V, B, U, ee, N) {
            return B = +B, U >>>= 0, N || E(V, 0, U, 8), k.write(V, B, U, ee, 52, 8), U + 8;
          }
          e.prototype.slice = function(V, B) {
            var U = this.length;
            (V = ~~V) < 0 ? (V += U) < 0 && (V = 0) : V > U && (V = U), (B = B === void 0 ? U : ~~B) < 0 ? (B += U) < 0 && (B = 0) : B > U && (B = U), B < V && (B = V);
            var ee = this.subarray(V, B);
            return ee.__proto__ = e.prototype, ee;
          }, e.prototype.readUIntLE = function(V, B, U) {
            V >>>= 0, B >>>= 0, U || P(V, B, this.length);
            for (var ee = this[V], N = 1, K = 0; ++K < B && (N *= 256); )
              ee += this[V + K] * N;
            return ee;
          }, e.prototype.readUIntBE = function(V, B, U) {
            V >>>= 0, B >>>= 0, U || P(V, B, this.length);
            for (var ee = this[V + --B], N = 1; B > 0 && (N *= 256); )
              ee += this[V + --B] * N;
            return ee;
          }, e.prototype.readUInt8 = function(V, B) {
            return V >>>= 0, B || P(V, 1, this.length), this[V];
          }, e.prototype.readUInt16LE = function(V, B) {
            return V >>>= 0, B || P(V, 2, this.length), this[V] | this[V + 1] << 8;
          }, e.prototype.readUInt16BE = function(V, B) {
            return V >>>= 0, B || P(V, 2, this.length), this[V] << 8 | this[V + 1];
          }, e.prototype.readUInt32LE = function(V, B) {
            return V >>>= 0, B || P(V, 4, this.length), (this[V] | this[V + 1] << 8 | this[V + 2] << 16) + 16777216 * this[V + 3];
          }, e.prototype.readUInt32BE = function(V, B) {
            return V >>>= 0, B || P(V, 4, this.length), 16777216 * this[V] + (this[V + 1] << 16 | this[V + 2] << 8 | this[V + 3]);
          }, e.prototype.readIntLE = function(V, B, U) {
            V >>>= 0, B >>>= 0, U || P(V, B, this.length);
            for (var ee = this[V], N = 1, K = 0; ++K < B && (N *= 256); )
              ee += this[V + K] * N;
            return ee >= (N *= 128) && (ee -= Math.pow(2, 8 * B)), ee;
          }, e.prototype.readIntBE = function(V, B, U) {
            V >>>= 0, B >>>= 0, U || P(V, B, this.length);
            for (var ee = B, N = 1, K = this[V + --ee]; ee > 0 && (N *= 256); )
              K += this[V + --ee] * N;
            return K >= (N *= 128) && (K -= Math.pow(2, 8 * B)), K;
          }, e.prototype.readInt8 = function(V, B) {
            return V >>>= 0, B || P(V, 1, this.length), 128 & this[V] ? -1 * (255 - this[V] + 1) : this[V];
          }, e.prototype.readInt16LE = function(V, B) {
            V >>>= 0, B || P(V, 2, this.length);
            var U = this[V] | this[V + 1] << 8;
            return 32768 & U ? 4294901760 | U : U;
          }, e.prototype.readInt16BE = function(V, B) {
            V >>>= 0, B || P(V, 2, this.length);
            var U = this[V + 1] | this[V] << 8;
            return 32768 & U ? 4294901760 | U : U;
          }, e.prototype.readInt32LE = function(V, B) {
            return V >>>= 0, B || P(V, 4, this.length), this[V] | this[V + 1] << 8 | this[V + 2] << 16 | this[V + 3] << 24;
          }, e.prototype.readInt32BE = function(V, B) {
            return V >>>= 0, B || P(V, 4, this.length), this[V] << 24 | this[V + 1] << 16 | this[V + 2] << 8 | this[V + 3];
          }, e.prototype.readFloatLE = function(V, B) {
            return V >>>= 0, B || P(V, 4, this.length), k.read(this, V, !0, 23, 4);
          }, e.prototype.readFloatBE = function(V, B) {
            return V >>>= 0, B || P(V, 4, this.length), k.read(this, V, !1, 23, 4);
          }, e.prototype.readDoubleLE = function(V, B) {
            return V >>>= 0, B || P(V, 8, this.length), k.read(this, V, !0, 52, 8);
          }, e.prototype.readDoubleBE = function(V, B) {
            return V >>>= 0, B || P(V, 8, this.length), k.read(this, V, !1, 52, 8);
          }, e.prototype.writeUIntLE = function(V, B, U, ee) {
            V = +V, B >>>= 0, U >>>= 0, ee || S(this, V, B, U, Math.pow(2, 8 * U) - 1, 0);
            var N = 1, K = 0;
            for (this[B] = 255 & V; ++K < U && (N *= 256); )
              this[B + K] = V / N & 255;
            return B + U;
          }, e.prototype.writeUIntBE = function(V, B, U, ee) {
            V = +V, B >>>= 0, U >>>= 0, ee || S(this, V, B, U, Math.pow(2, 8 * U) - 1, 0);
            var N = U - 1, K = 1;
            for (this[B + N] = 255 & V; --N >= 0 && (K *= 256); )
              this[B + N] = V / K & 255;
            return B + U;
          }, e.prototype.writeUInt8 = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 1, 255, 0), this[B] = 255 & V, B + 1;
          }, e.prototype.writeUInt16LE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 2, 65535, 0), this[B] = 255 & V, this[B + 1] = V >>> 8, B + 2;
          }, e.prototype.writeUInt16BE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 2, 65535, 0), this[B] = V >>> 8, this[B + 1] = 255 & V, B + 2;
          }, e.prototype.writeUInt32LE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 4, 4294967295, 0), this[B + 3] = V >>> 24, this[B + 2] = V >>> 16, this[B + 1] = V >>> 8, this[B] = 255 & V, B + 4;
          }, e.prototype.writeUInt32BE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 4, 4294967295, 0), this[B] = V >>> 24, this[B + 1] = V >>> 16, this[B + 2] = V >>> 8, this[B + 3] = 255 & V, B + 4;
          }, e.prototype.writeIntLE = function(V, B, U, ee) {
            if (V = +V, B >>>= 0, !ee) {
              var N = Math.pow(2, 8 * U - 1);
              S(this, V, B, U, N - 1, -N);
            }
            var K = 0, X = 1, te = 0;
            for (this[B] = 255 & V; ++K < U && (X *= 256); )
              V < 0 && te === 0 && this[B + K - 1] !== 0 && (te = 1), this[B + K] = (V / X >> 0) - te & 255;
            return B + U;
          }, e.prototype.writeIntBE = function(V, B, U, ee) {
            if (V = +V, B >>>= 0, !ee) {
              var N = Math.pow(2, 8 * U - 1);
              S(this, V, B, U, N - 1, -N);
            }
            var K = U - 1, X = 1, te = 0;
            for (this[B + K] = 255 & V; --K >= 0 && (X *= 256); )
              V < 0 && te === 0 && this[B + K + 1] !== 0 && (te = 1), this[B + K] = (V / X >> 0) - te & 255;
            return B + U;
          }, e.prototype.writeInt8 = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 1, 127, -128), V < 0 && (V = 255 + V + 1), this[B] = 255 & V, B + 1;
          }, e.prototype.writeInt16LE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 2, 32767, -32768), this[B] = 255 & V, this[B + 1] = V >>> 8, B + 2;
          }, e.prototype.writeInt16BE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 2, 32767, -32768), this[B] = V >>> 8, this[B + 1] = 255 & V, B + 2;
          }, e.prototype.writeInt32LE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 4, 2147483647, -2147483648), this[B] = 255 & V, this[B + 1] = V >>> 8, this[B + 2] = V >>> 16, this[B + 3] = V >>> 24, B + 4;
          }, e.prototype.writeInt32BE = function(V, B, U) {
            return V = +V, B >>>= 0, U || S(this, V, B, 4, 2147483647, -2147483648), V < 0 && (V = 4294967295 + V + 1), this[B] = V >>> 24, this[B + 1] = V >>> 16, this[B + 2] = V >>> 8, this[B + 3] = 255 & V, B + 4;
          }, e.prototype.writeFloatLE = function(V, B, U) {
            return R(this, V, B, !0, U);
          }, e.prototype.writeFloatBE = function(V, B, U) {
            return R(this, V, B, !1, U);
          }, e.prototype.writeDoubleLE = function(V, B, U) {
            return z(this, V, B, !0, U);
          }, e.prototype.writeDoubleBE = function(V, B, U) {
            return z(this, V, B, !1, U);
          }, e.prototype.copy = function(V, B, U, ee) {
            if (!e.isBuffer(V))
              throw new TypeError("argument should be a Buffer");
            if (U || (U = 0), ee || ee === 0 || (ee = this.length), B >= V.length && (B = V.length), B || (B = 0), ee > 0 && ee < U && (ee = U), ee === U || V.length === 0 || this.length === 0)
              return 0;
            if (B < 0)
              throw new RangeError("targetStart out of bounds");
            if (U < 0 || U >= this.length)
              throw new RangeError("Index out of range");
            if (ee < 0)
              throw new RangeError("sourceEnd out of bounds");
            ee > this.length && (ee = this.length), V.length - B < ee - U && (ee = V.length - B + U);
            var N = ee - U;
            if (this === V && typeof Uint8Array.prototype.copyWithin == "function")
              this.copyWithin(B, U, ee);
            else if (this === V && U < B && B < ee)
              for (var K = N - 1; K >= 0; --K)
                V[K + B] = this[K + U];
            else
              Uint8Array.prototype.set.call(V, this.subarray(U, ee), B);
            return N;
          }, e.prototype.fill = function(V, B, U, ee) {
            if (typeof V == "string") {
              if (typeof B == "string" ? (ee = B, B = 0, U = this.length) : typeof U == "string" && (ee = U, U = this.length), ee !== void 0 && typeof ee != "string")
                throw new TypeError("encoding must be a string");
              if (typeof ee == "string" && !e.isEncoding(ee))
                throw new TypeError("Unknown encoding: " + ee);
              if (V.length === 1) {
                var N = V.charCodeAt(0);
                (ee === "utf8" && N < 128 || ee === "latin1") && (V = N);
              }
            } else
              typeof V == "number" && (V &= 255);
            if (B < 0 || this.length < B || this.length < U)
              throw new RangeError("Out of range index");
            if (U <= B)
              return this;
            var K;
            if (B >>>= 0, U = U === void 0 ? this.length : U >>> 0, V || (V = 0), typeof V == "number")
              for (K = B; K < U; ++K)
                this[K] = V;
            else {
              var X = e.isBuffer(V) ? V : e.from(V, ee), te = X.length;
              if (te === 0)
                throw new TypeError('The value "' + V + '" is invalid for argument "value"');
              for (K = 0; K < U - B; ++K)
                this[K + B] = X[K % te];
            }
            return this;
          };
          var j = /[^+/0-9A-Za-z-_]/g;
          function H(V) {
            return V < 16 ? "0" + V.toString(16) : V.toString(16);
          }
          function Y(V, B) {
            var U;
            B = B || 1 / 0;
            for (var ee = V.length, N = null, K = [], X = 0; X < ee; ++X) {
              if ((U = V.charCodeAt(X)) > 55295 && U < 57344) {
                if (!N) {
                  if (U > 56319) {
                    (B -= 3) > -1 && K.push(239, 191, 189);
                    continue;
                  }
                  if (X + 1 === ee) {
                    (B -= 3) > -1 && K.push(239, 191, 189);
                    continue;
                  }
                  N = U;
                  continue;
                }
                if (U < 56320) {
                  (B -= 3) > -1 && K.push(239, 191, 189), N = U;
                  continue;
                }
                U = 65536 + (N - 55296 << 10 | U - 56320);
              } else
                N && (B -= 3) > -1 && K.push(239, 191, 189);
              if (N = null, U < 128) {
                if ((B -= 1) < 0)
                  break;
                K.push(U);
              } else if (U < 2048) {
                if ((B -= 2) < 0)
                  break;
                K.push(U >> 6 | 192, 63 & U | 128);
              } else if (U < 65536) {
                if ((B -= 3) < 0)
                  break;
                K.push(U >> 12 | 224, U >> 6 & 63 | 128, 63 & U | 128);
              } else {
                if (!(U < 1114112))
                  throw new Error("Invalid code point");
                if ((B -= 4) < 0)
                  break;
                K.push(U >> 18 | 240, U >> 12 & 63 | 128, U >> 6 & 63 | 128, 63 & U | 128);
              }
            }
            return K;
          }
          function J(V) {
            return g.toByteArray(function(B) {
              if ((B = (B = B.split("=")[0]).trim().replace(j, "")).length < 2)
                return "";
              for (; B.length % 4 != 0; )
                B += "=";
              return B;
            }(V));
          }
          function W(V, B, U, ee) {
            for (var N = 0; N < ee && !(N + U >= B.length || N >= V.length); ++N)
              B[N + U] = V[N];
            return N;
          }
          function Z(V, B) {
            return V instanceof B || V != null && V.constructor != null && V.constructor.name != null && V.constructor.name === B.name;
          }
          function re(V) {
            return V != V;
          }
        }).call(this);
      }).call(this, v("buffer").Buffer);
    }, { "base64-js": 79, buffer: 85, ieee754: 230 }], 86: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        return g < k ? m < g ? g : m > k ? k : m : m < k ? k : m > g ? g : m;
      };
    }, {}], 87: [function(v, Q, $) {
      var m = v("clamp");
      function g(k, x) {
        x == null && (x = !0);
        var e = k[0], r = k[1], n = k[2], s = k[3];
        return s == null && (s = x ? 1 : 255), x && (e *= 255, r *= 255, n *= 255, s *= 255), 16777216 * (e = 255 & m(e, 0, 255)) + ((r = 255 & m(r, 0, 255)) << 16) + ((n = 255 & m(n, 0, 255)) << 8) + (s = 255 & m(s, 0, 255));
      }
      Q.exports = g, Q.exports.to = g, Q.exports.from = function(k, x) {
        var e = (k = +k) >>> 24, r = (16711680 & k) >>> 16, n = (65280 & k) >>> 8, s = 255 & k;
        return x === !1 ? [e, r, n, s] : [e / 255, r / 255, n / 255, s / 255];
      };
    }, { clamp: 86 }], 88: [function(v, Q, $) {
      Q.exports = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] };
    }, {}], 89: [function(v, Q, $) {
      var m = v("color-rgba"), g = v("clamp"), k = v("dtype");
      Q.exports = function(x, e) {
        e !== "float" && e || (e = "array"), e === "uint" && (e = "uint8"), e === "uint_clamped" && (e = "uint8_clamped");
        var r = new (k(e))(4), n = e !== "uint8" && e !== "uint8_clamped";
        return x.length && typeof x != "string" || ((x = m(x))[0] /= 255, x[1] /= 255, x[2] /= 255), function(s) {
          return s instanceof Uint8Array || s instanceof Uint8ClampedArray || !!(Array.isArray(s) && (s[0] > 1 || s[0] === 0) && (s[1] > 1 || s[1] === 0) && (s[2] > 1 || s[2] === 0) && (!s[3] || s[3] > 1));
        }(x) ? (r[0] = x[0], r[1] = x[1], r[2] = x[2], r[3] = x[3] != null ? x[3] : 255, n && (r[0] /= 255, r[1] /= 255, r[2] /= 255, r[3] /= 255), r) : (n ? (r[0] = x[0], r[1] = x[1], r[2] = x[2], r[3] = x[3] != null ? x[3] : 1) : (r[0] = g(Math.floor(255 * x[0]), 0, 255), r[1] = g(Math.floor(255 * x[1]), 0, 255), r[2] = g(Math.floor(255 * x[2]), 0, 255), r[3] = x[3] == null ? 255 : g(Math.floor(255 * x[3]), 0, 255)), r);
      };
    }, { clamp: 86, "color-rgba": 91, dtype: 127 }], 90: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = v("color-name"), k = v("is-plain-obj"), x = v("defined");
          Q.exports = function(r) {
            var n, s, t = [], d = 1;
            if (typeof r == "string")
              if (g[r])
                t = g[r].slice(), s = "rgb";
              else if (r === "transparent")
                d = 0, s = "rgb", t = [0, 0, 0];
              else if (/^#[A-Fa-f0-9]+$/.test(r)) {
                var u = (l = r.slice(1)).length;
                d = 1, u <= 4 ? (t = [parseInt(l[0] + l[0], 16), parseInt(l[1] + l[1], 16), parseInt(l[2] + l[2], 16)], u === 4 && (d = parseInt(l[3] + l[3], 16) / 255)) : (t = [parseInt(l[0] + l[1], 16), parseInt(l[2] + l[3], 16), parseInt(l[4] + l[5], 16)], u === 8 && (d = parseInt(l[6] + l[7], 16) / 255)), t[0] || (t[0] = 0), t[1] || (t[1] = 0), t[2] || (t[2] = 0), s = "rgb";
              } else if (n = /^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(r)) {
                var o = n[1], h = o === "rgb", l = o.replace(/a$/, "");
                s = l, u = l === "cmyk" ? 4 : l === "gray" ? 1 : 3, t = n[2].trim().split(/\s*,\s*/).map(function(p, c) {
                  if (/%$/.test(p))
                    return c === u ? parseFloat(p) / 100 : l === "rgb" ? 255 * parseFloat(p) / 100 : parseFloat(p);
                  if (l[c] === "h") {
                    if (/deg$/.test(p))
                      return parseFloat(p);
                    if (e[p] !== void 0)
                      return e[p];
                  }
                  return parseFloat(p);
                }), o === l && t.push(1), d = h || t[u] === void 0 ? 1 : t[u], t = t.slice(0, u);
              } else
                r.length > 10 && /[0-9](?:\s|\/)/.test(r) && (t = r.match(/([0-9]+)/g).map(function(p) {
                  return parseFloat(p);
                }), s = r.match(/([a-z])/gi).join("").toLowerCase());
            else if (isNaN(r))
              if (k(r)) {
                var i = x(r.r, r.red, r.R, null);
                i !== null ? (s = "rgb", t = [i, x(r.g, r.green, r.G), x(r.b, r.blue, r.B)]) : (s = "hsl", t = [x(r.h, r.hue, r.H), x(r.s, r.saturation, r.S), x(r.l, r.lightness, r.L, r.b, r.brightness)]), d = x(r.a, r.alpha, r.opacity, 1), r.opacity != null && (d /= 100);
              } else
                (Array.isArray(r) || m.ArrayBuffer && ArrayBuffer.isView && ArrayBuffer.isView(r)) && (t = [r[0], r[1], r[2]], s = "rgb", d = r.length === 4 ? r[3] : 1);
            else
              s = "rgb", t = [r >>> 16, (65280 & r) >>> 8, 255 & r];
            return { space: s, values: t, alpha: d };
          };
          var e = { red: 0, orange: 60, yellow: 120, green: 180, blue: 240, purple: 300 };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "color-name": 88, defined: 124, "is-plain-obj": 236 }], 91: [function(v, Q, $) {
      var m = v("color-parse"), g = v("color-space/hsl"), k = v("clamp");
      Q.exports = function(x) {
        var e, r = m(x);
        return r.space ? ((e = Array(3))[0] = k(r.values[0], 0, 255), e[1] = k(r.values[1], 0, 255), e[2] = k(r.values[2], 0, 255), r.space[0] === "h" && (e = g.rgb(e)), e.push(k(r.alpha, 0, 1)), e) : [];
      };
    }, { clamp: 86, "color-parse": 90, "color-space/hsl": 92 }], 92: [function(v, Q, $) {
      var m = v("./rgb");
      Q.exports = { name: "hsl", min: [0, 0, 0], max: [360, 100, 100], channel: ["hue", "saturation", "lightness"], alias: ["HSL"], rgb: function(g) {
        var k, x, e, r, n, s = g[0] / 360, t = g[1] / 100, d = g[2] / 100;
        if (t === 0)
          return [n = 255 * d, n, n];
        k = 2 * d - (x = d < 0.5 ? d * (1 + t) : d + t - d * t), r = [0, 0, 0];
        for (var u = 0; u < 3; u++)
          (e = s + 1 / 3 * -(u - 1)) < 0 ? e++ : e > 1 && e--, n = 6 * e < 1 ? k + 6 * (x - k) * e : 2 * e < 1 ? x : 3 * e < 2 ? k + (x - k) * (2 / 3 - e) * 6 : k, r[u] = 255 * n;
        return r;
      } }, m.hsl = function(g) {
        var k, x, e = g[0] / 255, r = g[1] / 255, n = g[2] / 255, s = Math.min(e, r, n), t = Math.max(e, r, n), d = t - s;
        return t === s ? k = 0 : e === t ? k = (r - n) / d : r === t ? k = 2 + (n - e) / d : n === t && (k = 4 + (e - r) / d), (k = Math.min(60 * k, 360)) < 0 && (k += 360), x = (s + t) / 2, [k, 100 * (t === s ? 0 : x <= 0.5 ? d / (t + s) : d / (2 - t - s)), 100 * x];
      };
    }, { "./rgb": 93 }], 93: [function(v, Q, $) {
      Q.exports = { name: "rgb", min: [0, 0, 0], max: [255, 255, 255], channel: ["red", "green", "blue"], alias: ["RGB"] };
    }, {}], 94: [function(v, Q, $) {
      Q.exports = { AFG: "afghan", ALA: "\\b\\wland", ALB: "albania", DZA: "algeria", ASM: "^(?=.*americ).*samoa", AND: "andorra", AGO: "angola", AIA: "anguill?a", ATA: "antarctica", ATG: "antigua", ARG: "argentin", ARM: "armenia", ABW: "^(?!.*bonaire).*\\baruba", AUS: "australia", AUT: "^(?!.*hungary).*austria|\\baustri.*\\bemp", AZE: "azerbaijan", BHS: "bahamas", BHR: "bahrain", BGD: "bangladesh|^(?=.*east).*paki?stan", BRB: "barbados", BLR: "belarus|byelo", BEL: "^(?!.*luxem).*belgium", BLZ: "belize|^(?=.*british).*honduras", BEN: "benin|dahome", BMU: "bermuda", BTN: "bhutan", BOL: "bolivia", BES: "^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands", BIH: "herzegovina|bosnia", BWA: "botswana|bechuana", BVT: "bouvet", BRA: "brazil", IOT: "british.?indian.?ocean", BRN: "brunei", BGR: "bulgaria", BFA: "burkina|\\bfaso|upper.?volta", BDI: "burundi", CPV: "verde", KHM: "cambodia|kampuchea|khmer", CMR: "cameroon", CAN: "canada", CYM: "cayman", CAF: "\\bcentral.african.republic", TCD: "\\bchad", CHL: "\\bchile", CHN: "^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china", CXR: "christmas", CCK: "\\bcocos|keeling", COL: "colombia", COM: "comoro", COG: "^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo", COK: "\\bcook", CRI: "costa.?rica", CIV: "ivoire|ivory", HRV: "croatia", CUB: "\\bcuba", CUW: "^(?!.*bonaire).*\\bcura(c|\xE7)ao", CYP: "cyprus", CSK: "czechoslovakia", CZE: "^(?=.*rep).*czech|czechia|bohemia", COD: "\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc", DNK: "denmark", DJI: "djibouti", DMA: "dominica(?!n)", DOM: "dominican.rep", ECU: "ecuador", EGY: "egypt", SLV: "el.?salvador", GNQ: "guine.*eq|eq.*guine|^(?=.*span).*guinea", ERI: "eritrea", EST: "estonia", ETH: "ethiopia|abyssinia", FLK: "falkland|malvinas", FRO: "faroe|faeroe", FJI: "fiji", FIN: "finland", FRA: "^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul", GUF: "^(?=.*french).*guiana", PYF: "french.?polynesia|tahiti", ATF: "french.?southern", GAB: "gabon", GMB: "gambia", GEO: "^(?!.*south).*georgia", DDR: "german.?democratic.?republic|democratic.?republic.*germany|east.germany", DEU: "^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german", GHA: "ghana|gold.?coast", GIB: "gibraltar", GRC: "greece|hellenic|hellas", GRL: "greenland", GRD: "grenada", GLP: "guadeloupe", GUM: "\\bguam", GTM: "guatemala", GGY: "guernsey", GIN: "^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea", GNB: "bissau|^(?=.*portu).*guinea", GUY: "guyana|british.?guiana", HTI: "haiti", HMD: "heard.*mcdonald", VAT: "holy.?see|vatican|papal.?st", HND: "^(?!.*brit).*honduras", HKG: "hong.?kong", HUN: "^(?!.*austr).*hungary", ISL: "iceland", IND: "india(?!.*ocea)", IDN: "indonesia", IRN: "\\biran|persia", IRQ: "\\biraq|mesopotamia", IRL: "(^ireland)|(^republic.*ireland)", IMN: "^(?=.*isle).*\\bman", ISR: "israel", ITA: "italy", JAM: "jamaica", JPN: "japan", JEY: "jersey", JOR: "jordan", KAZ: "kazak", KEN: "kenya|british.?east.?africa|east.?africa.?prot", KIR: "kiribati", PRK: "^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)", KWT: "kuwait", KGZ: "kyrgyz|kirghiz", LAO: "\\blaos?\\b", LVA: "latvia", LBN: "lebanon", LSO: "lesotho|basuto", LBR: "liberia", LBY: "libya", LIE: "liechtenstein", LTU: "lithuania", LUX: "^(?!.*belg).*luxem", MAC: "maca(o|u)", MDG: "madagascar|malagasy", MWI: "malawi|nyasa", MYS: "malaysia", MDV: "maldive", MLI: "\\bmali\\b", MLT: "\\bmalta", MHL: "marshall", MTQ: "martinique", MRT: "mauritania", MUS: "mauritius", MYT: "\\bmayotte", MEX: "\\bmexic", FSM: "fed.*micronesia|micronesia.*fed", MCO: "monaco", MNG: "mongolia", MNE: "^(?!.*serbia).*montenegro", MSR: "montserrat", MAR: "morocco|\\bmaroc", MOZ: "mozambique", MMR: "myanmar|burma", NAM: "namibia", NRU: "nauru", NPL: "nepal", NLD: "^(?!.*\\bant)(?!.*\\bcarib).*netherlands", ANT: "^(?=.*\\bant).*(nether|dutch)", NCL: "new.?caledonia", NZL: "new.?zealand", NIC: "nicaragua", NER: "\\bniger(?!ia)", NGA: "nigeria", NIU: "niue", NFK: "norfolk", MNP: "mariana", NOR: "norway", OMN: "\\boman|trucial", PAK: "^(?!.*east).*paki?stan", PLW: "palau", PSE: "palestin|\\bgaza|west.?bank", PAN: "panama", PNG: "papua|new.?guinea", PRY: "paraguay", PER: "peru", PHL: "philippines", PCN: "pitcairn", POL: "poland", PRT: "portugal", PRI: "puerto.?rico", QAT: "qatar", KOR: "^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)", MDA: "moldov|b(a|e)ssarabia", REU: "r(e|\xE9)union", ROU: "r(o|u|ou)mania", RUS: "\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics", RWA: "rwanda", BLM: "barth(e|\xE9)lemy", SHN: "helena", KNA: "kitts|\\bnevis", LCA: "\\blucia", MAF: "^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)", SPM: "miquelon", VCT: "vincent", WSM: "^(?!.*amer).*samoa", SMR: "san.?marino", STP: "\\bs(a|\xE3)o.?tom(e|\xE9)", SAU: "\\bsa\\w*.?arabia", SEN: "senegal", SRB: "^(?!.*monte).*serbia", SYC: "seychell", SLE: "sierra", SGP: "singapore", SXM: "^(?!.*martin)(?!.*saba).*maarten", SVK: "^(?!.*cze).*slovak", SVN: "slovenia", SLB: "solomon", SOM: "somali", ZAF: "south.africa|s\\\\..?africa", SGS: "south.?georgia|sandwich", SSD: "\\bs\\w*.?sudan", ESP: "spain", LKA: "sri.?lanka|ceylon", SDN: "^(?!.*\\bs(?!u)).*sudan", SUR: "surinam|dutch.?guiana", SJM: "svalbard", SWZ: "swaziland", SWE: "sweden", CHE: "switz|swiss", SYR: "syria", TWN: "taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china", TJK: "tajik", THA: "thailand|\\bsiam", MKD: "macedonia|fyrom", TLS: "^(?=.*leste).*timor|^(?=.*east).*timor", TGO: "togo", TKL: "tokelau", TON: "tonga", TTO: "trinidad|tobago", TUN: "tunisia", TUR: "turkey", TKM: "turkmen", TCA: "turks", TUV: "tuvalu", UGA: "uganda", UKR: "ukrain", ARE: "emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em", GBR: "united.?kingdom|britain|^u\\.?k\\.?$", TZA: "tanzania", USA: "united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)", UMI: "minor.?outlying.?is", URY: "uruguay", UZB: "uzbek", VUT: "vanuatu|new.?hebrides", VEN: "venezuela", VNM: "^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam", VGB: "^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin", VIR: "^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin", WLF: "futuna|wallis", ESH: "western.sahara", YEM: "^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen", YMD: "^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen", YUG: "yugoslavia", ZMB: "zambia|northern.?rhodesia", EAZ: "zanzibar", ZWE: "zimbabwe|^(?!.*northern).*rhodesia" };
    }, {}], 95: [function(v, Q, $) {
      Q.exports = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"];
    }, {}], 96: [function(v, Q, $) {
      Q.exports = ["normal", "condensed", "semi-condensed", "extra-condensed", "ultra-condensed", "expanded", "semi-expanded", "extra-expanded", "ultra-expanded"];
    }, {}], 97: [function(v, Q, $) {
      Q.exports = ["normal", "italic", "oblique"];
    }, {}], 98: [function(v, Q, $) {
      Q.exports = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
    }, {}], 99: [function(v, Q, $) {
      Q.exports = { parse: v("./parse"), stringify: v("./stringify") };
    }, { "./parse": 101, "./stringify": 102 }], 100: [function(v, Q, $) {
      var m = v("css-font-size-keywords");
      Q.exports = { isSize: function(g) {
        return /^[\d\.]/.test(g) || g.indexOf("/") !== -1 || m.indexOf(g) !== -1;
      } };
    }, { "css-font-size-keywords": 95 }], 101: [function(v, Q, $) {
      var m = v("unquote"), g = v("css-global-keywords"), k = v("css-system-font-keywords"), x = v("css-font-weight-keywords"), e = v("css-font-style-keywords"), r = v("css-font-stretch-keywords"), n = v("string-split-by"), s = v("./lib/util").isSize;
      Q.exports = d;
      var t = d.cache = {};
      function d(o) {
        if (typeof o != "string")
          throw new Error("Font argument must be a string.");
        if (t[o])
          return t[o];
        if (o === "")
          throw new Error("Cannot parse an empty string.");
        if (k.indexOf(o) !== -1)
          return t[o] = { system: o };
        for (var h, l = { style: "normal", variant: "normal", weight: "normal", stretch: "normal", lineHeight: "normal", size: "1rem", family: ["serif"] }, i = n(o, /\s+/); h = i.shift(); ) {
          if (g.indexOf(h) !== -1)
            return ["style", "variant", "weight", "stretch"].forEach(function(c) {
              l[c] = h;
            }), t[o] = l;
          if (e.indexOf(h) === -1)
            if (h !== "normal" && h !== "small-caps")
              if (r.indexOf(h) === -1) {
                if (x.indexOf(h) === -1) {
                  if (s(h)) {
                    var p = n(h, "/");
                    if (l.size = p[0], p[1] != null ? l.lineHeight = u(p[1]) : i[0] === "/" && (i.shift(), l.lineHeight = u(i.shift())), !i.length)
                      throw new Error("Missing required font-family.");
                    return l.family = n(i.join(" "), /\s*,\s*/).map(m), t[o] = l;
                  }
                  throw new Error("Unknown or unsupported font token: " + h);
                }
                l.weight = h;
              } else
                l.stretch = h;
            else
              l.variant = h;
          else
            l.style = h;
        }
        throw new Error("Missing required font-size.");
      }
      function u(o) {
        var h = parseFloat(o);
        return h.toString() === o ? h : o;
      }
    }, { "./lib/util": 100, "css-font-stretch-keywords": 96, "css-font-style-keywords": 97, "css-font-weight-keywords": 98, "css-global-keywords": 103, "css-system-font-keywords": 104, "string-split-by": 306, unquote: 329 }], 102: [function(v, Q, $) {
      var m = v("pick-by-alias"), g = v("./lib/util").isSize, k = h(v("css-global-keywords")), x = h(v("css-system-font-keywords")), e = h(v("css-font-weight-keywords")), r = h(v("css-font-style-keywords")), n = h(v("css-font-stretch-keywords")), s = { normal: 1, "small-caps": 1 }, t = { serif: 1, "sans-serif": 1, monospace: 1, cursive: 1, fantasy: 1, "system-ui": 1 }, d = "1rem", u = "serif";
      function o(l, i) {
        if (l && !i[l] && !k[l])
          throw Error("Unknown keyword `" + l + "`");
        return l;
      }
      function h(l) {
        for (var i = {}, p = 0; p < l.length; p++)
          i[l[p]] = 1;
        return i;
      }
      Q.exports = function(l) {
        if ((l = m(l, { style: "style fontstyle fontStyle font-style slope distinction", variant: "variant font-variant fontVariant fontvariant var capitalization", weight: "weight w font-weight fontWeight fontweight", stretch: "stretch font-stretch fontStretch fontstretch width", size: "size s font-size fontSize fontsize height em emSize", lineHeight: "lh line-height lineHeight lineheight leading", family: "font family fontFamily font-family fontfamily type typeface face", system: "system reserved default global" })).system)
          return l.system && o(l.system, x), l.system;
        if (o(l.style, r), o(l.variant, s), o(l.weight, e), o(l.stretch, n), l.size == null && (l.size = d), typeof l.size == "number" && (l.size += "px"), !g)
          throw Error("Bad size value `" + l.size + "`");
        l.family || (l.family = u), Array.isArray(l.family) && (l.family.length || (l.family = [u]), l.family = l.family.map(function(p) {
          return t[p] ? p : '"' + p + '"';
        }).join(", "));
        var i = [];
        return i.push(l.style), l.variant !== l.style && i.push(l.variant), l.weight !== l.variant && l.weight !== l.style && i.push(l.weight), l.stretch !== l.weight && l.stretch !== l.variant && l.stretch !== l.style && i.push(l.stretch), i.push(l.size + (l.lineHeight == null || l.lineHeight === "normal" || l.lineHeight + "" == "1" ? "" : "/" + l.lineHeight)), i.push(l.family), i.filter(Boolean).join(" ");
      };
    }, { "./lib/util": 100, "css-font-stretch-keywords": 96, "css-font-style-keywords": 97, "css-font-weight-keywords": 98, "css-global-keywords": 103, "css-system-font-keywords": 104, "pick-by-alias": 253 }], 103: [function(v, Q, $) {
      Q.exports = ["inherit", "initial", "unset"];
    }, {}], 104: [function(v, Q, $) {
      Q.exports = ["caption", "icon", "menu", "message-box", "small-caption", "status-bar"];
    }, {}], 105: [function(v, Q, $) {
      var m, g = v("type/value/is"), k = v("type/value/ensure"), x = v("type/plain-function/ensure"), e = v("es5-ext/object/copy"), r = v("es5-ext/object/normalize-options"), n = v("es5-ext/object/map"), s = Function.prototype.bind, t = Object.defineProperty, d = Object.prototype.hasOwnProperty;
      m = function(u, o, h) {
        var l, i = k(o) && x(o.value);
        return delete (l = e(o)).writable, delete l.value, l.get = function() {
          return !h.overwriteDefinition && d.call(this, u) ? i : (o.value = s.call(i, h.resolveContext ? h.resolveContext(this) : this), t(this, u, o), this[u]);
        }, l;
      }, Q.exports = function(u) {
        var o = r(arguments[1]);
        return g(o.resolveContext) && x(o.resolveContext), n(u, function(h, l) {
          return m(l, h, o);
        });
      };
    }, { "es5-ext/object/copy": 147, "es5-ext/object/map": 155, "es5-ext/object/normalize-options": 156, "type/plain-function/ensure": 322, "type/value/ensure": 326, "type/value/is": 327 }], 106: [function(v, Q, $) {
      var m = v("type/value/is"), g = v("type/plain-function/is"), k = v("es5-ext/object/assign"), x = v("es5-ext/object/normalize-options"), e = v("es5-ext/string/#/contains");
      (Q.exports = function(r, n) {
        var s, t, d, u, o;
        return arguments.length < 2 || typeof r != "string" ? (u = n, n = r, r = null) : u = arguments[2], m(r) ? (s = e.call(r, "c"), t = e.call(r, "e"), d = e.call(r, "w")) : (s = d = !0, t = !1), o = { value: n, configurable: s, enumerable: t, writable: d }, u ? k(x(u), o) : o;
      }).gs = function(r, n, s) {
        var t, d, u, o;
        return typeof r != "string" ? (u = s, s = n, n = r, r = null) : u = arguments[3], m(n) ? g(n) ? m(s) ? g(s) || (u = s, s = void 0) : s = void 0 : (u = n, n = s = void 0) : n = void 0, m(r) ? (t = e.call(r, "c"), d = e.call(r, "e")) : (t = !0, d = !1), o = { get: n, set: s, configurable: t, enumerable: d }, u ? k(x(u), o) : o;
      };
    }, { "es5-ext/object/assign": 144, "es5-ext/object/normalize-options": 156, "es5-ext/string/#/contains": 163, "type/plain-function/is": 323, "type/value/is": 327 }], 107: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : m.d3 = m.d3 || {});
      })(this, function(m) {
        function g(P, S) {
          return P < S ? -1 : P > S ? 1 : P >= S ? 0 : NaN;
        }
        function k(P) {
          var S;
          return P.length === 1 && (S = P, P = function(E, R) {
            return g(S(E), R);
          }), { left: function(E, R, z, j) {
            for (z == null && (z = 0), j == null && (j = E.length); z < j; ) {
              var H = z + j >>> 1;
              P(E[H], R) < 0 ? z = H + 1 : j = H;
            }
            return z;
          }, right: function(E, R, z, j) {
            for (z == null && (z = 0), j == null && (j = E.length); z < j; ) {
              var H = z + j >>> 1;
              P(E[H], R) > 0 ? j = H : z = H + 1;
            }
            return z;
          } };
        }
        var x = k(g), e = x.right, r = x.left;
        function n(P, S) {
          return [P, S];
        }
        function s(P) {
          return P === null ? NaN : +P;
        }
        function t(P, S) {
          var E, R, z = P.length, j = 0, H = -1, Y = 0, J = 0;
          if (S == null)
            for (; ++H < z; )
              isNaN(E = s(P[H])) || (J += (R = E - Y) * (E - (Y += R / ++j)));
          else
            for (; ++H < z; )
              isNaN(E = s(S(P[H], H, P))) || (J += (R = E - Y) * (E - (Y += R / ++j)));
          if (j > 1)
            return J / (j - 1);
        }
        function d(P, S) {
          var E = t(P, S);
          return E && Math.sqrt(E);
        }
        function u(P, S) {
          var E, R, z, j = P.length, H = -1;
          if (S == null) {
            for (; ++H < j; )
              if ((E = P[H]) != null && E >= E)
                for (R = z = E; ++H < j; )
                  (E = P[H]) != null && (R > E && (R = E), z < E && (z = E));
          } else
            for (; ++H < j; )
              if ((E = S(P[H], H, P)) != null && E >= E)
                for (R = z = E; ++H < j; )
                  (E = S(P[H], H, P)) != null && (R > E && (R = E), z < E && (z = E));
          return [R, z];
        }
        var o = Array.prototype, h = o.slice, l = o.map;
        function i(P) {
          return function() {
            return P;
          };
        }
        function p(P) {
          return P;
        }
        function c(P, S, E) {
          P = +P, S = +S, E = (z = arguments.length) < 2 ? (S = P, P = 0, 1) : z < 3 ? 1 : +E;
          for (var R = -1, z = 0 | Math.max(0, Math.ceil((S - P) / E)), j = new Array(z); ++R < z; )
            j[R] = P + R * E;
          return j;
        }
        var a = Math.sqrt(50), y = Math.sqrt(10), f = Math.sqrt(2);
        function _(P, S, E) {
          var R = (S - P) / Math.max(0, E), z = Math.floor(Math.log(R) / Math.LN10), j = R / Math.pow(10, z);
          return z >= 0 ? (j >= a ? 10 : j >= y ? 5 : j >= f ? 2 : 1) * Math.pow(10, z) : -Math.pow(10, -z) / (j >= a ? 10 : j >= y ? 5 : j >= f ? 2 : 1);
        }
        function b(P, S, E) {
          var R = Math.abs(S - P) / Math.max(0, E), z = Math.pow(10, Math.floor(Math.log(R) / Math.LN10)), j = R / z;
          return j >= a ? z *= 10 : j >= y ? z *= 5 : j >= f && (z *= 2), S < P ? -z : z;
        }
        function w(P) {
          return Math.ceil(Math.log(P.length) / Math.LN2) + 1;
        }
        function T(P, S, E) {
          if (E == null && (E = s), R = P.length) {
            if ((S = +S) <= 0 || R < 2)
              return +E(P[0], 0, P);
            if (S >= 1)
              return +E(P[R - 1], R - 1, P);
            var R, z = (R - 1) * S, j = Math.floor(z), H = +E(P[j], j, P);
            return H + (+E(P[j + 1], j + 1, P) - H) * (z - j);
          }
        }
        function L(P, S) {
          var E, R, z = P.length, j = -1;
          if (S == null) {
            for (; ++j < z; )
              if ((E = P[j]) != null && E >= E)
                for (R = E; ++j < z; )
                  (E = P[j]) != null && R > E && (R = E);
          } else
            for (; ++j < z; )
              if ((E = S(P[j], j, P)) != null && E >= E)
                for (R = E; ++j < z; )
                  (E = S(P[j], j, P)) != null && R > E && (R = E);
          return R;
        }
        function A(P) {
          if (!(z = P.length))
            return [];
          for (var S = -1, E = L(P, I), R = new Array(E); ++S < E; )
            for (var z, j = -1, H = R[S] = new Array(z); ++j < z; )
              H[j] = P[j][S];
          return R;
        }
        function I(P) {
          return P.length;
        }
        m.bisect = e, m.bisectRight = e, m.bisectLeft = r, m.ascending = g, m.bisector = k, m.cross = function(P, S, E) {
          var R, z, j, H, Y = P.length, J = S.length, W = new Array(Y * J);
          for (E == null && (E = n), R = j = 0; R < Y; ++R)
            for (H = P[R], z = 0; z < J; ++z, ++j)
              W[j] = E(H, S[z]);
          return W;
        }, m.descending = function(P, S) {
          return S < P ? -1 : S > P ? 1 : S >= P ? 0 : NaN;
        }, m.deviation = d, m.extent = u, m.histogram = function() {
          var P = p, S = u, E = w;
          function R(z) {
            var j, H, Y = z.length, J = new Array(Y);
            for (j = 0; j < Y; ++j)
              J[j] = P(z[j], j, z);
            var W = S(J), Z = W[0], re = W[1], V = E(J, Z, re);
            Array.isArray(V) || (V = b(Z, re, V), V = c(Math.ceil(Z / V) * V, re, V));
            for (var B = V.length; V[0] <= Z; )
              V.shift(), --B;
            for (; V[B - 1] > re; )
              V.pop(), --B;
            var U, ee = new Array(B + 1);
            for (j = 0; j <= B; ++j)
              (U = ee[j] = []).x0 = j > 0 ? V[j - 1] : Z, U.x1 = j < B ? V[j] : re;
            for (j = 0; j < Y; ++j)
              Z <= (H = J[j]) && H <= re && ee[e(V, H, 0, B)].push(z[j]);
            return ee;
          }
          return R.value = function(z) {
            return arguments.length ? (P = typeof z == "function" ? z : i(z), R) : P;
          }, R.domain = function(z) {
            return arguments.length ? (S = typeof z == "function" ? z : i([z[0], z[1]]), R) : S;
          }, R.thresholds = function(z) {
            return arguments.length ? (E = typeof z == "function" ? z : Array.isArray(z) ? i(h.call(z)) : i(z), R) : E;
          }, R;
        }, m.thresholdFreedmanDiaconis = function(P, S, E) {
          return P = l.call(P, s).sort(g), Math.ceil((E - S) / (2 * (T(P, 0.75) - T(P, 0.25)) * Math.pow(P.length, -1 / 3)));
        }, m.thresholdScott = function(P, S, E) {
          return Math.ceil((E - S) / (3.5 * d(P) * Math.pow(P.length, -1 / 3)));
        }, m.thresholdSturges = w, m.max = function(P, S) {
          var E, R, z = P.length, j = -1;
          if (S == null) {
            for (; ++j < z; )
              if ((E = P[j]) != null && E >= E)
                for (R = E; ++j < z; )
                  (E = P[j]) != null && E > R && (R = E);
          } else
            for (; ++j < z; )
              if ((E = S(P[j], j, P)) != null && E >= E)
                for (R = E; ++j < z; )
                  (E = S(P[j], j, P)) != null && E > R && (R = E);
          return R;
        }, m.mean = function(P, S) {
          var E, R = P.length, z = R, j = -1, H = 0;
          if (S == null)
            for (; ++j < R; )
              isNaN(E = s(P[j])) ? --z : H += E;
          else
            for (; ++j < R; )
              isNaN(E = s(S(P[j], j, P))) ? --z : H += E;
          if (z)
            return H / z;
        }, m.median = function(P, S) {
          var E, R = P.length, z = -1, j = [];
          if (S == null)
            for (; ++z < R; )
              isNaN(E = s(P[z])) || j.push(E);
          else
            for (; ++z < R; )
              isNaN(E = s(S(P[z], z, P))) || j.push(E);
          return T(j.sort(g), 0.5);
        }, m.merge = function(P) {
          for (var S, E, R, z = P.length, j = -1, H = 0; ++j < z; )
            H += P[j].length;
          for (E = new Array(H); --z >= 0; )
            for (S = (R = P[z]).length; --S >= 0; )
              E[--H] = R[S];
          return E;
        }, m.min = L, m.pairs = function(P, S) {
          S == null && (S = n);
          for (var E = 0, R = P.length - 1, z = P[0], j = new Array(R < 0 ? 0 : R); E < R; )
            j[E] = S(z, z = P[++E]);
          return j;
        }, m.permute = function(P, S) {
          for (var E = S.length, R = new Array(E); E--; )
            R[E] = P[S[E]];
          return R;
        }, m.quantile = T, m.range = c, m.scan = function(P, S) {
          if (E = P.length) {
            var E, R, z = 0, j = 0, H = P[j];
            for (S == null && (S = g); ++z < E; )
              (S(R = P[z], H) < 0 || S(H, H) !== 0) && (H = R, j = z);
            return S(H, H) === 0 ? j : void 0;
          }
        }, m.shuffle = function(P, S, E) {
          for (var R, z, j = (E == null ? P.length : E) - (S = S == null ? 0 : +S); j; )
            z = Math.random() * j-- | 0, R = P[j + S], P[j + S] = P[z + S], P[z + S] = R;
          return P;
        }, m.sum = function(P, S) {
          var E, R = P.length, z = -1, j = 0;
          if (S == null)
            for (; ++z < R; )
              (E = +P[z]) && (j += E);
          else
            for (; ++z < R; )
              (E = +S(P[z], z, P)) && (j += E);
          return j;
        }, m.ticks = function(P, S, E) {
          var R, z, j, H, Y = -1;
          if (E = +E, (P = +P) == (S = +S) && E > 0)
            return [P];
          if ((R = S < P) && (z = P, P = S, S = z), (H = _(P, S, E)) === 0 || !isFinite(H))
            return [];
          if (H > 0)
            for (P = Math.ceil(P / H), S = Math.floor(S / H), j = new Array(z = Math.ceil(S - P + 1)); ++Y < z; )
              j[Y] = (P + Y) * H;
          else
            for (P = Math.floor(P * H), S = Math.ceil(S * H), j = new Array(z = Math.ceil(P - S + 1)); ++Y < z; )
              j[Y] = (P - Y) / H;
          return R && j.reverse(), j;
        }, m.tickIncrement = _, m.tickStep = b, m.transpose = A, m.variance = t, m.zip = function() {
          return A(arguments);
        }, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 108: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : m.d3 = m.d3 || {});
      })(this, function(m) {
        function g() {
        }
        function k(u, o) {
          var h = new g();
          if (u instanceof g)
            u.each(function(a, y) {
              h.set(y, a);
            });
          else if (Array.isArray(u)) {
            var l, i = -1, p = u.length;
            if (o == null)
              for (; ++i < p; )
                h.set(i, u[i]);
            else
              for (; ++i < p; )
                h.set(o(l = u[i], i, u), l);
          } else if (u)
            for (var c in u)
              h.set(c, u[c]);
          return h;
        }
        function x() {
          return {};
        }
        function e(u, o, h) {
          u[o] = h;
        }
        function r() {
          return k();
        }
        function n(u, o, h) {
          u.set(o, h);
        }
        function s() {
        }
        g.prototype = k.prototype = { constructor: g, has: function(u) {
          return "$" + u in this;
        }, get: function(u) {
          return this["$" + u];
        }, set: function(u, o) {
          return this["$" + u] = o, this;
        }, remove: function(u) {
          var o = "$" + u;
          return o in this && delete this[o];
        }, clear: function() {
          for (var u in this)
            u[0] === "$" && delete this[u];
        }, keys: function() {
          var u = [];
          for (var o in this)
            o[0] === "$" && u.push(o.slice(1));
          return u;
        }, values: function() {
          var u = [];
          for (var o in this)
            o[0] === "$" && u.push(this[o]);
          return u;
        }, entries: function() {
          var u = [];
          for (var o in this)
            o[0] === "$" && u.push({ key: o.slice(1), value: this[o] });
          return u;
        }, size: function() {
          var u = 0;
          for (var o in this)
            o[0] === "$" && ++u;
          return u;
        }, empty: function() {
          for (var u in this)
            if (u[0] === "$")
              return !1;
          return !0;
        }, each: function(u) {
          for (var o in this)
            o[0] === "$" && u(this[o], o.slice(1), this);
        } };
        var t = k.prototype;
        function d(u, o) {
          var h = new s();
          if (u instanceof s)
            u.each(function(p) {
              h.add(p);
            });
          else if (u) {
            var l = -1, i = u.length;
            if (o == null)
              for (; ++l < i; )
                h.add(u[l]);
            else
              for (; ++l < i; )
                h.add(o(u[l], l, u));
          }
          return h;
        }
        s.prototype = d.prototype = { constructor: s, has: t.has, add: function(u) {
          return this["$" + (u += "")] = u, this;
        }, remove: t.remove, clear: t.clear, values: t.keys, size: t.size, empty: t.empty, each: t.each }, m.nest = function() {
          var u, o, h, l = [], i = [];
          function p(c, a, y, f) {
            if (a >= l.length)
              return u != null && c.sort(u), o != null ? o(c) : c;
            for (var _, b, w, T = -1, L = c.length, A = l[a++], I = k(), P = y(); ++T < L; )
              (w = I.get(_ = A(b = c[T]) + "")) ? w.push(b) : I.set(_, [b]);
            return I.each(function(S, E) {
              f(P, E, p(S, a, y, f));
            }), P;
          }
          return h = { object: function(c) {
            return p(c, 0, x, e);
          }, map: function(c) {
            return p(c, 0, r, n);
          }, entries: function(c) {
            return function a(y, f) {
              if (++f > l.length)
                return y;
              var _, b = i[f - 1];
              return o != null && f >= l.length ? _ = y.entries() : (_ = [], y.each(function(w, T) {
                _.push({ key: T, values: a(w, f) });
              })), b != null ? _.sort(function(w, T) {
                return b(w.key, T.key);
              }) : _;
            }(p(c, 0, r, n), 0);
          }, key: function(c) {
            return l.push(c), h;
          }, sortKeys: function(c) {
            return i[l.length - 1] = c, h;
          }, sortValues: function(c) {
            return u = c, h;
          }, rollup: function(c) {
            return o = c, h;
          } };
        }, m.set = d, m.map = k, m.keys = function(u) {
          var o = [];
          for (var h in u)
            o.push(h);
          return o;
        }, m.values = function(u) {
          var o = [];
          for (var h in u)
            o.push(u[h]);
          return o;
        }, m.entries = function(u) {
          var o = [];
          for (var h in u)
            o.push({ key: h, value: u[h] });
          return o;
        }, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 109: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        function g(se, de, Te) {
          se.prototype = de.prototype = Te, Te.constructor = se;
        }
        function k(se, de) {
          var Te = Object.create(se.prototype);
          for (var Ee in de)
            Te[Ee] = de[Ee];
          return Te;
        }
        function x() {
        }
        var e = "\\s*([+-]?\\d+)\\s*", r = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", n = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", s = /^#([0-9a-f]{3,8})$/, t = new RegExp("^rgb\\(" + [e, e, e] + "\\)$"), d = new RegExp("^rgb\\(" + [n, n, n] + "\\)$"), u = new RegExp("^rgba\\(" + [e, e, e, r] + "\\)$"), o = new RegExp("^rgba\\(" + [n, n, n, r] + "\\)$"), h = new RegExp("^hsl\\(" + [r, n, n] + "\\)$"), l = new RegExp("^hsla\\(" + [r, n, n, r] + "\\)$"), i = { aliceblue: 15792383, antiquewhite: 16444375, aqua: 65535, aquamarine: 8388564, azure: 15794175, beige: 16119260, bisque: 16770244, black: 0, blanchedalmond: 16772045, blue: 255, blueviolet: 9055202, brown: 10824234, burlywood: 14596231, cadetblue: 6266528, chartreuse: 8388352, chocolate: 13789470, coral: 16744272, cornflowerblue: 6591981, cornsilk: 16775388, crimson: 14423100, cyan: 65535, darkblue: 139, darkcyan: 35723, darkgoldenrod: 12092939, darkgray: 11119017, darkgreen: 25600, darkgrey: 11119017, darkkhaki: 12433259, darkmagenta: 9109643, darkolivegreen: 5597999, darkorange: 16747520, darkorchid: 10040012, darkred: 9109504, darksalmon: 15308410, darkseagreen: 9419919, darkslateblue: 4734347, darkslategray: 3100495, darkslategrey: 3100495, darkturquoise: 52945, darkviolet: 9699539, deeppink: 16716947, deepskyblue: 49151, dimgray: 6908265, dimgrey: 6908265, dodgerblue: 2003199, firebrick: 11674146, floralwhite: 16775920, forestgreen: 2263842, fuchsia: 16711935, gainsboro: 14474460, ghostwhite: 16316671, gold: 16766720, goldenrod: 14329120, gray: 8421504, green: 32768, greenyellow: 11403055, grey: 8421504, honeydew: 15794160, hotpink: 16738740, indianred: 13458524, indigo: 4915330, ivory: 16777200, khaki: 15787660, lavender: 15132410, lavenderblush: 16773365, lawngreen: 8190976, lemonchiffon: 16775885, lightblue: 11393254, lightcoral: 15761536, lightcyan: 14745599, lightgoldenrodyellow: 16448210, lightgray: 13882323, lightgreen: 9498256, lightgrey: 13882323, lightpink: 16758465, lightsalmon: 16752762, lightseagreen: 2142890, lightskyblue: 8900346, lightslategray: 7833753, lightslategrey: 7833753, lightsteelblue: 11584734, lightyellow: 16777184, lime: 65280, limegreen: 3329330, linen: 16445670, magenta: 16711935, maroon: 8388608, mediumaquamarine: 6737322, mediumblue: 205, mediumorchid: 12211667, mediumpurple: 9662683, mediumseagreen: 3978097, mediumslateblue: 8087790, mediumspringgreen: 64154, mediumturquoise: 4772300, mediumvioletred: 13047173, midnightblue: 1644912, mintcream: 16121850, mistyrose: 16770273, moccasin: 16770229, navajowhite: 16768685, navy: 128, oldlace: 16643558, olive: 8421376, olivedrab: 7048739, orange: 16753920, orangered: 16729344, orchid: 14315734, palegoldenrod: 15657130, palegreen: 10025880, paleturquoise: 11529966, palevioletred: 14381203, papayawhip: 16773077, peachpuff: 16767673, peru: 13468991, pink: 16761035, plum: 14524637, powderblue: 11591910, purple: 8388736, rebeccapurple: 6697881, red: 16711680, rosybrown: 12357519, royalblue: 4286945, saddlebrown: 9127187, salmon: 16416882, sandybrown: 16032864, seagreen: 3050327, seashell: 16774638, sienna: 10506797, silver: 12632256, skyblue: 8900331, slateblue: 6970061, slategray: 7372944, slategrey: 7372944, snow: 16775930, springgreen: 65407, steelblue: 4620980, tan: 13808780, teal: 32896, thistle: 14204888, tomato: 16737095, turquoise: 4251856, violet: 15631086, wheat: 16113331, white: 16777215, whitesmoke: 16119285, yellow: 16776960, yellowgreen: 10145074 };
        function p() {
          return this.rgb().formatHex();
        }
        function c() {
          return this.rgb().formatRgb();
        }
        function a(se) {
          var de, Te;
          return se = (se + "").trim().toLowerCase(), (de = s.exec(se)) ? (Te = de[1].length, de = parseInt(de[1], 16), Te === 6 ? y(de) : Te === 3 ? new w(de >> 8 & 15 | de >> 4 & 240, de >> 4 & 15 | 240 & de, (15 & de) << 4 | 15 & de, 1) : Te === 8 ? f(de >> 24 & 255, de >> 16 & 255, de >> 8 & 255, (255 & de) / 255) : Te === 4 ? f(de >> 12 & 15 | de >> 8 & 240, de >> 8 & 15 | de >> 4 & 240, de >> 4 & 15 | 240 & de, ((15 & de) << 4 | 15 & de) / 255) : null) : (de = t.exec(se)) ? new w(de[1], de[2], de[3], 1) : (de = d.exec(se)) ? new w(255 * de[1] / 100, 255 * de[2] / 100, 255 * de[3] / 100, 1) : (de = u.exec(se)) ? f(de[1], de[2], de[3], de[4]) : (de = o.exec(se)) ? f(255 * de[1] / 100, 255 * de[2] / 100, 255 * de[3] / 100, de[4]) : (de = h.exec(se)) ? I(de[1], de[2] / 100, de[3] / 100, 1) : (de = l.exec(se)) ? I(de[1], de[2] / 100, de[3] / 100, de[4]) : i.hasOwnProperty(se) ? y(i[se]) : se === "transparent" ? new w(NaN, NaN, NaN, 0) : null;
        }
        function y(se) {
          return new w(se >> 16 & 255, se >> 8 & 255, 255 & se, 1);
        }
        function f(se, de, Te, Ee) {
          return Ee <= 0 && (se = de = Te = NaN), new w(se, de, Te, Ee);
        }
        function _(se) {
          return se instanceof x || (se = a(se)), se ? new w((se = se.rgb()).r, se.g, se.b, se.opacity) : new w();
        }
        function b(se, de, Te, Ee) {
          return arguments.length === 1 ? _(se) : new w(se, de, Te, Ee == null ? 1 : Ee);
        }
        function w(se, de, Te, Ee) {
          this.r = +se, this.g = +de, this.b = +Te, this.opacity = +Ee;
        }
        function T() {
          return "#" + A(this.r) + A(this.g) + A(this.b);
        }
        function L() {
          var se = this.opacity;
          return ((se = isNaN(se) ? 1 : Math.max(0, Math.min(1, se))) === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (se === 1 ? ")" : ", " + se + ")");
        }
        function A(se) {
          return ((se = Math.max(0, Math.min(255, Math.round(se) || 0))) < 16 ? "0" : "") + se.toString(16);
        }
        function I(se, de, Te, Ee) {
          return Ee <= 0 ? se = de = Te = NaN : Te <= 0 || Te >= 1 ? se = de = NaN : de <= 0 && (se = NaN), new E(se, de, Te, Ee);
        }
        function P(se) {
          if (se instanceof E)
            return new E(se.h, se.s, se.l, se.opacity);
          if (se instanceof x || (se = a(se)), !se)
            return new E();
          if (se instanceof E)
            return se;
          var de = (se = se.rgb()).r / 255, Te = se.g / 255, Ee = se.b / 255, Me = Math.min(de, Te, Ee), ze = Math.max(de, Te, Ee), Ie = NaN, Oe = ze - Me, Ze = (ze + Me) / 2;
          return Oe ? (Ie = de === ze ? (Te - Ee) / Oe + 6 * (Te < Ee) : Te === ze ? (Ee - de) / Oe + 2 : (de - Te) / Oe + 4, Oe /= Ze < 0.5 ? ze + Me : 2 - ze - Me, Ie *= 60) : Oe = Ze > 0 && Ze < 1 ? 0 : Ie, new E(Ie, Oe, Ze, se.opacity);
        }
        function S(se, de, Te, Ee) {
          return arguments.length === 1 ? P(se) : new E(se, de, Te, Ee == null ? 1 : Ee);
        }
        function E(se, de, Te, Ee) {
          this.h = +se, this.s = +de, this.l = +Te, this.opacity = +Ee;
        }
        function R(se, de, Te) {
          return 255 * (se < 60 ? de + (Te - de) * se / 60 : se < 180 ? Te : se < 240 ? de + (Te - de) * (240 - se) / 60 : de);
        }
        g(x, a, { copy: function(se) {
          return Object.assign(new this.constructor(), this, se);
        }, displayable: function() {
          return this.rgb().displayable();
        }, hex: p, formatHex: p, formatHsl: function() {
          return P(this).formatHsl();
        }, formatRgb: c, toString: c }), g(w, b, k(x, { brighter: function(se) {
          return se = se == null ? 1 / 0.7 : Math.pow(1 / 0.7, se), new w(this.r * se, this.g * se, this.b * se, this.opacity);
        }, darker: function(se) {
          return se = se == null ? 0.7 : Math.pow(0.7, se), new w(this.r * se, this.g * se, this.b * se, this.opacity);
        }, rgb: function() {
          return this;
        }, displayable: function() {
          return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
        }, hex: T, formatHex: T, formatRgb: L, toString: L })), g(E, S, k(x, { brighter: function(se) {
          return se = se == null ? 1 / 0.7 : Math.pow(1 / 0.7, se), new E(this.h, this.s, this.l * se, this.opacity);
        }, darker: function(se) {
          return se = se == null ? 0.7 : Math.pow(0.7, se), new E(this.h, this.s, this.l * se, this.opacity);
        }, rgb: function() {
          var se = this.h % 360 + 360 * (this.h < 0), de = isNaN(se) || isNaN(this.s) ? 0 : this.s, Te = this.l, Ee = Te + (Te < 0.5 ? Te : 1 - Te) * de, Me = 2 * Te - Ee;
          return new w(R(se >= 240 ? se - 240 : se + 120, Me, Ee), R(se, Me, Ee), R(se < 120 ? se + 240 : se - 120, Me, Ee), this.opacity);
        }, displayable: function() {
          return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
        }, formatHsl: function() {
          var se = this.opacity;
          return ((se = isNaN(se) ? 1 : Math.max(0, Math.min(1, se))) === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + 100 * (this.s || 0) + "%, " + 100 * (this.l || 0) + "%" + (se === 1 ? ")" : ", " + se + ")");
        } }));
        var z = Math.PI / 180, j = 180 / Math.PI, H = 6 / 29, Y = 3 * H * H;
        function J(se) {
          if (se instanceof Z)
            return new Z(se.l, se.a, se.b, se.opacity);
          if (se instanceof K)
            return X(se);
          se instanceof w || (se = _(se));
          var de, Te, Ee = U(se.r), Me = U(se.g), ze = U(se.b), Ie = re((0.2225045 * Ee + 0.7168786 * Me + 0.0606169 * ze) / 1);
          return Ee === Me && Me === ze ? de = Te = Ie : (de = re((0.4360747 * Ee + 0.3850649 * Me + 0.1430804 * ze) / 0.96422), Te = re((0.0139322 * Ee + 0.0971045 * Me + 0.7141733 * ze) / 0.82521)), new Z(116 * Ie - 16, 500 * (de - Ie), 200 * (Ie - Te), se.opacity);
        }
        function W(se, de, Te, Ee) {
          return arguments.length === 1 ? J(se) : new Z(se, de, Te, Ee == null ? 1 : Ee);
        }
        function Z(se, de, Te, Ee) {
          this.l = +se, this.a = +de, this.b = +Te, this.opacity = +Ee;
        }
        function re(se) {
          return se > 0.008856451679035631 ? Math.pow(se, 1 / 3) : se / Y + 4 / 29;
        }
        function V(se) {
          return se > H ? se * se * se : Y * (se - 4 / 29);
        }
        function B(se) {
          return 255 * (se <= 31308e-7 ? 12.92 * se : 1.055 * Math.pow(se, 1 / 2.4) - 0.055);
        }
        function U(se) {
          return (se /= 255) <= 0.04045 ? se / 12.92 : Math.pow((se + 0.055) / 1.055, 2.4);
        }
        function ee(se) {
          if (se instanceof K)
            return new K(se.h, se.c, se.l, se.opacity);
          if (se instanceof Z || (se = J(se)), se.a === 0 && se.b === 0)
            return new K(NaN, 0 < se.l && se.l < 100 ? 0 : NaN, se.l, se.opacity);
          var de = Math.atan2(se.b, se.a) * j;
          return new K(de < 0 ? de + 360 : de, Math.sqrt(se.a * se.a + se.b * se.b), se.l, se.opacity);
        }
        function N(se, de, Te, Ee) {
          return arguments.length === 1 ? ee(se) : new K(se, de, Te, Ee == null ? 1 : Ee);
        }
        function K(se, de, Te, Ee) {
          this.h = +se, this.c = +de, this.l = +Te, this.opacity = +Ee;
        }
        function X(se) {
          if (isNaN(se.h))
            return new Z(se.l, 0, 0, se.opacity);
          var de = se.h * z;
          return new Z(se.l, Math.cos(de) * se.c, Math.sin(de) * se.c, se.opacity);
        }
        g(Z, W, k(x, { brighter: function(se) {
          return new Z(this.l + 18 * (se == null ? 1 : se), this.a, this.b, this.opacity);
        }, darker: function(se) {
          return new Z(this.l - 18 * (se == null ? 1 : se), this.a, this.b, this.opacity);
        }, rgb: function() {
          var se = (this.l + 16) / 116, de = isNaN(this.a) ? se : se + this.a / 500, Te = isNaN(this.b) ? se : se - this.b / 200;
          return new w(B(3.1338561 * (de = 0.96422 * V(de)) - 1.6168667 * (se = 1 * V(se)) - 0.4906146 * (Te = 0.82521 * V(Te))), B(-0.9787684 * de + 1.9161415 * se + 0.033454 * Te), B(0.0719453 * de - 0.2289914 * se + 1.4052427 * Te), this.opacity);
        } })), g(K, N, k(x, { brighter: function(se) {
          return new K(this.h, this.c, this.l + 18 * (se == null ? 1 : se), this.opacity);
        }, darker: function(se) {
          return new K(this.h, this.c, this.l - 18 * (se == null ? 1 : se), this.opacity);
        }, rgb: function() {
          return X(this).rgb();
        } }));
        var te = -0.14861, ie = 1.78277, le = -0.29227, oe = -0.90649, ve = 1.97294, ue = ve * oe, ye = ve * ie, Ae = ie * le - oe * te;
        function pe(se) {
          if (se instanceof we)
            return new we(se.h, se.s, se.l, se.opacity);
          se instanceof w || (se = _(se));
          var de = se.r / 255, Te = se.g / 255, Ee = se.b / 255, Me = (Ae * Ee + ue * de - ye * Te) / (Ae + ue - ye), ze = Ee - Me, Ie = (ve * (Te - Me) - le * ze) / oe, Oe = Math.sqrt(Ie * Ie + ze * ze) / (ve * Me * (1 - Me)), Ze = Oe ? Math.atan2(Ie, ze) * j - 120 : NaN;
          return new we(Ze < 0 ? Ze + 360 : Ze, Oe, Me, se.opacity);
        }
        function ge(se, de, Te, Ee) {
          return arguments.length === 1 ? pe(se) : new we(se, de, Te, Ee == null ? 1 : Ee);
        }
        function we(se, de, Te, Ee) {
          this.h = +se, this.s = +de, this.l = +Te, this.opacity = +Ee;
        }
        g(we, ge, k(x, { brighter: function(se) {
          return se = se == null ? 1 / 0.7 : Math.pow(1 / 0.7, se), new we(this.h, this.s, this.l * se, this.opacity);
        }, darker: function(se) {
          return se = se == null ? 0.7 : Math.pow(0.7, se), new we(this.h, this.s, this.l * se, this.opacity);
        }, rgb: function() {
          var se = isNaN(this.h) ? 0 : (this.h + 120) * z, de = +this.l, Te = isNaN(this.s) ? 0 : this.s * de * (1 - de), Ee = Math.cos(se), Me = Math.sin(se);
          return new w(255 * (de + Te * (te * Ee + ie * Me)), 255 * (de + Te * (le * Ee + oe * Me)), 255 * (de + Te * (ve * Ee)), this.opacity);
        } })), m.color = a, m.cubehelix = ge, m.gray = function(se, de) {
          return new Z(se, 0, 0, de == null ? 1 : de);
        }, m.hcl = N, m.hsl = S, m.lab = W, m.lch = function(se, de, Te, Ee) {
          return arguments.length === 1 ? ee(se) : new K(Te, de, se, Ee == null ? 1 : Ee);
        }, m.rgb = b, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 110: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        var g = { value: function() {
        } };
        function k() {
          for (var s, t = 0, d = arguments.length, u = {}; t < d; ++t) {
            if (!(s = arguments[t] + "") || s in u || /[\s.]/.test(s))
              throw new Error("illegal type: " + s);
            u[s] = [];
          }
          return new x(u);
        }
        function x(s) {
          this._ = s;
        }
        function e(s, t) {
          return s.trim().split(/^|\s+/).map(function(d) {
            var u = "", o = d.indexOf(".");
            if (o >= 0 && (u = d.slice(o + 1), d = d.slice(0, o)), d && !t.hasOwnProperty(d))
              throw new Error("unknown type: " + d);
            return { type: d, name: u };
          });
        }
        function r(s, t) {
          for (var d, u = 0, o = s.length; u < o; ++u)
            if ((d = s[u]).name === t)
              return d.value;
        }
        function n(s, t, d) {
          for (var u = 0, o = s.length; u < o; ++u)
            if (s[u].name === t) {
              s[u] = g, s = s.slice(0, u).concat(s.slice(u + 1));
              break;
            }
          return d != null && s.push({ name: t, value: d }), s;
        }
        x.prototype = k.prototype = { constructor: x, on: function(s, t) {
          var d, u = this._, o = e(s + "", u), h = -1, l = o.length;
          if (!(arguments.length < 2)) {
            if (t != null && typeof t != "function")
              throw new Error("invalid callback: " + t);
            for (; ++h < l; )
              if (d = (s = o[h]).type)
                u[d] = n(u[d], s.name, t);
              else if (t == null)
                for (d in u)
                  u[d] = n(u[d], s.name, null);
            return this;
          }
          for (; ++h < l; )
            if ((d = (s = o[h]).type) && (d = r(u[d], s.name)))
              return d;
        }, copy: function() {
          var s = {}, t = this._;
          for (var d in t)
            s[d] = t[d].slice();
          return new x(s);
        }, call: function(s, t) {
          if ((d = arguments.length - 2) > 0)
            for (var d, u, o = new Array(d), h = 0; h < d; ++h)
              o[h] = arguments[h + 2];
          if (!this._.hasOwnProperty(s))
            throw new Error("unknown type: " + s);
          for (h = 0, d = (u = this._[s]).length; h < d; ++h)
            u[h].value.apply(t, o);
        }, apply: function(s, t, d) {
          if (!this._.hasOwnProperty(s))
            throw new Error("unknown type: " + s);
          for (var u = this._[s], o = 0, h = u.length; o < h; ++o)
            u[o].value.apply(t, d);
        } }, m.dispatch = k, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 111: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-quadtree"), v("d3-collection"), v("d3-dispatch"), v("d3-timer")) : g(m.d3 = m.d3 || {}, m.d3, m.d3, m.d3, m.d3);
      })(this, function(m, g, k, x, e) {
        function r(i) {
          return function() {
            return i;
          };
        }
        function n() {
          return 1e-6 * (Math.random() - 0.5);
        }
        function s(i) {
          return i.x + i.vx;
        }
        function t(i) {
          return i.y + i.vy;
        }
        function d(i) {
          return i.index;
        }
        function u(i, p) {
          var c = i.get(p);
          if (!c)
            throw new Error("missing: " + p);
          return c;
        }
        function o(i) {
          return i.x;
        }
        function h(i) {
          return i.y;
        }
        var l = Math.PI * (3 - Math.sqrt(5));
        m.forceCenter = function(i, p) {
          var c;
          function a() {
            var y, f, _ = c.length, b = 0, w = 0;
            for (y = 0; y < _; ++y)
              b += (f = c[y]).x, w += f.y;
            for (b = b / _ - i, w = w / _ - p, y = 0; y < _; ++y)
              (f = c[y]).x -= b, f.y -= w;
          }
          return i == null && (i = 0), p == null && (p = 0), a.initialize = function(y) {
            c = y;
          }, a.x = function(y) {
            return arguments.length ? (i = +y, a) : i;
          }, a.y = function(y) {
            return arguments.length ? (p = +y, a) : p;
          }, a;
        }, m.forceCollide = function(i) {
          var p, c, a = 1, y = 1;
          function f() {
            for (var w, T, L, A, I, P, S, E = p.length, R = 0; R < y; ++R)
              for (T = g.quadtree(p, s, t).visitAfter(_), w = 0; w < E; ++w)
                L = p[w], P = c[L.index], S = P * P, A = L.x + L.vx, I = L.y + L.vy, T.visit(z);
            function z(j, H, Y, J, W) {
              var Z = j.data, re = j.r, V = P + re;
              if (!Z)
                return H > A + V || J < A - V || Y > I + V || W < I - V;
              if (Z.index > L.index) {
                var B = A - Z.x - Z.vx, U = I - Z.y - Z.vy, ee = B * B + U * U;
                ee < V * V && (B === 0 && (ee += (B = n()) * B), U === 0 && (ee += (U = n()) * U), ee = (V - (ee = Math.sqrt(ee))) / ee * a, L.vx += (B *= ee) * (V = (re *= re) / (S + re)), L.vy += (U *= ee) * V, Z.vx -= B * (V = 1 - V), Z.vy -= U * V);
              }
            }
          }
          function _(w) {
            if (w.data)
              return w.r = c[w.data.index];
            for (var T = w.r = 0; T < 4; ++T)
              w[T] && w[T].r > w.r && (w.r = w[T].r);
          }
          function b() {
            if (p) {
              var w, T, L = p.length;
              for (c = new Array(L), w = 0; w < L; ++w)
                T = p[w], c[T.index] = +i(T, w, p);
            }
          }
          return typeof i != "function" && (i = r(i == null ? 1 : +i)), f.initialize = function(w) {
            p = w, b();
          }, f.iterations = function(w) {
            return arguments.length ? (y = +w, f) : y;
          }, f.strength = function(w) {
            return arguments.length ? (a = +w, f) : a;
          }, f.radius = function(w) {
            return arguments.length ? (i = typeof w == "function" ? w : r(+w), b(), f) : i;
          }, f;
        }, m.forceLink = function(i) {
          var p, c, a, y, f, _ = d, b = function(S) {
            return 1 / Math.min(y[S.source.index], y[S.target.index]);
          }, w = r(30), T = 1;
          function L(S) {
            for (var E = 0, R = i.length; E < T; ++E)
              for (var z, j, H, Y, J, W, Z, re = 0; re < R; ++re)
                j = (z = i[re]).source, Y = (H = z.target).x + H.vx - j.x - j.vx || n(), J = H.y + H.vy - j.y - j.vy || n(), Y *= W = ((W = Math.sqrt(Y * Y + J * J)) - c[re]) / W * S * p[re], J *= W, H.vx -= Y * (Z = f[re]), H.vy -= J * Z, j.vx += Y * (Z = 1 - Z), j.vy += J * Z;
          }
          function A() {
            if (a) {
              var S, E, R = a.length, z = i.length, j = k.map(a, _);
              for (S = 0, y = new Array(R); S < z; ++S)
                (E = i[S]).index = S, typeof E.source != "object" && (E.source = u(j, E.source)), typeof E.target != "object" && (E.target = u(j, E.target)), y[E.source.index] = (y[E.source.index] || 0) + 1, y[E.target.index] = (y[E.target.index] || 0) + 1;
              for (S = 0, f = new Array(z); S < z; ++S)
                E = i[S], f[S] = y[E.source.index] / (y[E.source.index] + y[E.target.index]);
              p = new Array(z), I(), c = new Array(z), P();
            }
          }
          function I() {
            if (a)
              for (var S = 0, E = i.length; S < E; ++S)
                p[S] = +b(i[S], S, i);
          }
          function P() {
            if (a)
              for (var S = 0, E = i.length; S < E; ++S)
                c[S] = +w(i[S], S, i);
          }
          return i == null && (i = []), L.initialize = function(S) {
            a = S, A();
          }, L.links = function(S) {
            return arguments.length ? (i = S, A(), L) : i;
          }, L.id = function(S) {
            return arguments.length ? (_ = S, L) : _;
          }, L.iterations = function(S) {
            return arguments.length ? (T = +S, L) : T;
          }, L.strength = function(S) {
            return arguments.length ? (b = typeof S == "function" ? S : r(+S), I(), L) : b;
          }, L.distance = function(S) {
            return arguments.length ? (w = typeof S == "function" ? S : r(+S), P(), L) : w;
          }, L;
        }, m.forceManyBody = function() {
          var i, p, c, a, y = r(-30), f = 1, _ = 1 / 0, b = 0.81;
          function w(I) {
            var P, S = i.length, E = g.quadtree(i, o, h).visitAfter(L);
            for (c = I, P = 0; P < S; ++P)
              p = i[P], E.visit(A);
          }
          function T() {
            if (i) {
              var I, P, S = i.length;
              for (a = new Array(S), I = 0; I < S; ++I)
                P = i[I], a[P.index] = +y(P, I, i);
            }
          }
          function L(I) {
            var P, S, E, R, z, j = 0, H = 0;
            if (I.length) {
              for (E = R = z = 0; z < 4; ++z)
                (P = I[z]) && (S = Math.abs(P.value)) && (j += P.value, H += S, E += S * P.x, R += S * P.y);
              I.x = E / H, I.y = R / H;
            } else {
              (P = I).x = P.data.x, P.y = P.data.y;
              do
                j += a[P.data.index];
              while (P = P.next);
            }
            I.value = j;
          }
          function A(I, P, S, E) {
            if (!I.value)
              return !0;
            var R = I.x - p.x, z = I.y - p.y, j = E - P, H = R * R + z * z;
            if (j * j / b < H)
              return H < _ && (R === 0 && (H += (R = n()) * R), z === 0 && (H += (z = n()) * z), H < f && (H = Math.sqrt(f * H)), p.vx += R * I.value * c / H, p.vy += z * I.value * c / H), !0;
            if (!(I.length || H >= _)) {
              (I.data !== p || I.next) && (R === 0 && (H += (R = n()) * R), z === 0 && (H += (z = n()) * z), H < f && (H = Math.sqrt(f * H)));
              do
                I.data !== p && (j = a[I.data.index] * c / H, p.vx += R * j, p.vy += z * j);
              while (I = I.next);
            }
          }
          return w.initialize = function(I) {
            i = I, T();
          }, w.strength = function(I) {
            return arguments.length ? (y = typeof I == "function" ? I : r(+I), T(), w) : y;
          }, w.distanceMin = function(I) {
            return arguments.length ? (f = I * I, w) : Math.sqrt(f);
          }, w.distanceMax = function(I) {
            return arguments.length ? (_ = I * I, w) : Math.sqrt(_);
          }, w.theta = function(I) {
            return arguments.length ? (b = I * I, w) : Math.sqrt(b);
          }, w;
        }, m.forceRadial = function(i, p, c) {
          var a, y, f, _ = r(0.1);
          function b(T) {
            for (var L = 0, A = a.length; L < A; ++L) {
              var I = a[L], P = I.x - p || 1e-6, S = I.y - c || 1e-6, E = Math.sqrt(P * P + S * S), R = (f[L] - E) * y[L] * T / E;
              I.vx += P * R, I.vy += S * R;
            }
          }
          function w() {
            if (a) {
              var T, L = a.length;
              for (y = new Array(L), f = new Array(L), T = 0; T < L; ++T)
                f[T] = +i(a[T], T, a), y[T] = isNaN(f[T]) ? 0 : +_(a[T], T, a);
            }
          }
          return typeof i != "function" && (i = r(+i)), p == null && (p = 0), c == null && (c = 0), b.initialize = function(T) {
            a = T, w();
          }, b.strength = function(T) {
            return arguments.length ? (_ = typeof T == "function" ? T : r(+T), w(), b) : _;
          }, b.radius = function(T) {
            return arguments.length ? (i = typeof T == "function" ? T : r(+T), w(), b) : i;
          }, b.x = function(T) {
            return arguments.length ? (p = +T, b) : p;
          }, b.y = function(T) {
            return arguments.length ? (c = +T, b) : c;
          }, b;
        }, m.forceSimulation = function(i) {
          var p, c = 1, a = 1e-3, y = 1 - Math.pow(a, 1 / 300), f = 0, _ = 0.6, b = k.map(), w = e.timer(L), T = x.dispatch("tick", "end");
          function L() {
            A(), T.call("tick", p), c < a && (w.stop(), T.call("end", p));
          }
          function A(S) {
            var E, R, z = i.length;
            S === void 0 && (S = 1);
            for (var j = 0; j < S; ++j)
              for (c += (f - c) * y, b.each(function(H) {
                H(c);
              }), E = 0; E < z; ++E)
                (R = i[E]).fx == null ? R.x += R.vx *= _ : (R.x = R.fx, R.vx = 0), R.fy == null ? R.y += R.vy *= _ : (R.y = R.fy, R.vy = 0);
            return p;
          }
          function I() {
            for (var S, E = 0, R = i.length; E < R; ++E) {
              if ((S = i[E]).index = E, S.fx != null && (S.x = S.fx), S.fy != null && (S.y = S.fy), isNaN(S.x) || isNaN(S.y)) {
                var z = 10 * Math.sqrt(E), j = E * l;
                S.x = z * Math.cos(j), S.y = z * Math.sin(j);
              }
              (isNaN(S.vx) || isNaN(S.vy)) && (S.vx = S.vy = 0);
            }
          }
          function P(S) {
            return S.initialize && S.initialize(i), S;
          }
          return i == null && (i = []), I(), p = { tick: A, restart: function() {
            return w.restart(L), p;
          }, stop: function() {
            return w.stop(), p;
          }, nodes: function(S) {
            return arguments.length ? (i = S, I(), b.each(P), p) : i;
          }, alpha: function(S) {
            return arguments.length ? (c = +S, p) : c;
          }, alphaMin: function(S) {
            return arguments.length ? (a = +S, p) : a;
          }, alphaDecay: function(S) {
            return arguments.length ? (y = +S, p) : +y;
          }, alphaTarget: function(S) {
            return arguments.length ? (f = +S, p) : f;
          }, velocityDecay: function(S) {
            return arguments.length ? (_ = 1 - S, p) : 1 - _;
          }, force: function(S, E) {
            return arguments.length > 1 ? (E == null ? b.remove(S) : b.set(S, P(E)), p) : b.get(S);
          }, find: function(S, E, R) {
            var z, j, H, Y, J, W = 0, Z = i.length;
            for (R == null ? R = 1 / 0 : R *= R, W = 0; W < Z; ++W)
              (H = (z = S - (Y = i[W]).x) * z + (j = E - Y.y) * j) < R && (J = Y, R = H);
            return J;
          }, on: function(S, E) {
            return arguments.length > 1 ? (T.on(S, E), p) : T.on(S);
          } };
        }, m.forceX = function(i) {
          var p, c, a, y = r(0.1);
          function f(b) {
            for (var w, T = 0, L = p.length; T < L; ++T)
              (w = p[T]).vx += (a[T] - w.x) * c[T] * b;
          }
          function _() {
            if (p) {
              var b, w = p.length;
              for (c = new Array(w), a = new Array(w), b = 0; b < w; ++b)
                c[b] = isNaN(a[b] = +i(p[b], b, p)) ? 0 : +y(p[b], b, p);
            }
          }
          return typeof i != "function" && (i = r(i == null ? 0 : +i)), f.initialize = function(b) {
            p = b, _();
          }, f.strength = function(b) {
            return arguments.length ? (y = typeof b == "function" ? b : r(+b), _(), f) : y;
          }, f.x = function(b) {
            return arguments.length ? (i = typeof b == "function" ? b : r(+b), _(), f) : i;
          }, f;
        }, m.forceY = function(i) {
          var p, c, a, y = r(0.1);
          function f(b) {
            for (var w, T = 0, L = p.length; T < L; ++T)
              (w = p[T]).vy += (a[T] - w.y) * c[T] * b;
          }
          function _() {
            if (p) {
              var b, w = p.length;
              for (c = new Array(w), a = new Array(w), b = 0; b < w; ++b)
                c[b] = isNaN(a[b] = +i(p[b], b, p)) ? 0 : +y(p[b], b, p);
            }
          }
          return typeof i != "function" && (i = r(i == null ? 0 : +i)), f.initialize = function(b) {
            p = b, _();
          }, f.strength = function(b) {
            return arguments.length ? (y = typeof b == "function" ? b : r(+b), _(), f) : y;
          }, f.y = function(b) {
            return arguments.length ? (i = typeof b == "function" ? b : r(+b), _(), f) : i;
          }, f;
        }, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-collection": 108, "d3-dispatch": 110, "d3-quadtree": 118, "d3-timer": 123 }], 112: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = typeof globalThis < "u" ? globalThis : m || self).d3 = m.d3 || {});
      })(this, function(m) {
        function g(p, c) {
          if ((a = (p = c ? p.toExponential(c - 1) : p.toExponential()).indexOf("e")) < 0)
            return null;
          var a, y = p.slice(0, a);
          return [y.length > 1 ? y[0] + y.slice(2) : y, +p.slice(a + 1)];
        }
        function k(p) {
          return (p = g(Math.abs(p))) ? p[1] : NaN;
        }
        var x, e = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
        function r(p) {
          if (!(c = e.exec(p)))
            throw new Error("invalid format: " + p);
          var c;
          return new n({ fill: c[1], align: c[2], sign: c[3], symbol: c[4], zero: c[5], width: c[6], comma: c[7], precision: c[8] && c[8].slice(1), trim: c[9], type: c[10] });
        }
        function n(p) {
          this.fill = p.fill === void 0 ? " " : p.fill + "", this.align = p.align === void 0 ? ">" : p.align + "", this.sign = p.sign === void 0 ? "-" : p.sign + "", this.symbol = p.symbol === void 0 ? "" : p.symbol + "", this.zero = !!p.zero, this.width = p.width === void 0 ? void 0 : +p.width, this.comma = !!p.comma, this.precision = p.precision === void 0 ? void 0 : +p.precision, this.trim = !!p.trim, this.type = p.type === void 0 ? "" : p.type + "";
        }
        function s(p, c) {
          var a = g(p, c);
          if (!a)
            return p + "";
          var y = a[0], f = a[1];
          return f < 0 ? "0." + new Array(-f).join("0") + y : y.length > f + 1 ? y.slice(0, f + 1) + "." + y.slice(f + 1) : y + new Array(f - y.length + 2).join("0");
        }
        r.prototype = n.prototype, n.prototype.toString = function() {
          return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, 0 | this.width)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, 0 | this.precision)) + (this.trim ? "~" : "") + this.type;
        };
        var t = { "%": function(p, c) {
          return (100 * p).toFixed(c);
        }, b: function(p) {
          return Math.round(p).toString(2);
        }, c: function(p) {
          return p + "";
        }, d: function(p) {
          return Math.abs(p = Math.round(p)) >= 1e21 ? p.toLocaleString("en").replace(/,/g, "") : p.toString(10);
        }, e: function(p, c) {
          return p.toExponential(c);
        }, f: function(p, c) {
          return p.toFixed(c);
        }, g: function(p, c) {
          return p.toPrecision(c);
        }, o: function(p) {
          return Math.round(p).toString(8);
        }, p: function(p, c) {
          return s(100 * p, c);
        }, r: s, s: function(p, c) {
          var a = g(p, c);
          if (!a)
            return p + "";
          var y = a[0], f = a[1], _ = f - (x = 3 * Math.max(-8, Math.min(8, Math.floor(f / 3)))) + 1, b = y.length;
          return _ === b ? y : _ > b ? y + new Array(_ - b + 1).join("0") : _ > 0 ? y.slice(0, _) + "." + y.slice(_) : "0." + new Array(1 - _).join("0") + g(p, Math.max(0, c + _ - 1))[0];
        }, X: function(p) {
          return Math.round(p).toString(16).toUpperCase();
        }, x: function(p) {
          return Math.round(p).toString(16);
        } };
        function d(p) {
          return p;
        }
        var u, o = Array.prototype.map, h = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
        function l(p) {
          var c, a, y = p.grouping === void 0 || p.thousands === void 0 ? d : (c = o.call(p.grouping, Number), a = p.thousands + "", function(P, S) {
            for (var E = P.length, R = [], z = 0, j = c[0], H = 0; E > 0 && j > 0 && (H + j + 1 > S && (j = Math.max(1, S - H)), R.push(P.substring(E -= j, E + j)), !((H += j + 1) > S)); )
              j = c[z = (z + 1) % c.length];
            return R.reverse().join(a);
          }), f = p.currency === void 0 ? "" : p.currency[0] + "", _ = p.currency === void 0 ? "" : p.currency[1] + "", b = p.decimal === void 0 ? "." : p.decimal + "", w = p.numerals === void 0 ? d : function(P) {
            return function(S) {
              return S.replace(/[0-9]/g, function(E) {
                return P[+E];
              });
            };
          }(o.call(p.numerals, String)), T = p.percent === void 0 ? "%" : p.percent + "", L = p.minus === void 0 ? "-" : p.minus + "", A = p.nan === void 0 ? "NaN" : p.nan + "";
          function I(P) {
            var S = (P = r(P)).fill, E = P.align, R = P.sign, z = P.symbol, j = P.zero, H = P.width, Y = P.comma, J = P.precision, W = P.trim, Z = P.type;
            Z === "n" ? (Y = !0, Z = "g") : t[Z] || (J === void 0 && (J = 12), W = !0, Z = "g"), (j || S === "0" && E === "=") && (j = !0, S = "0", E = "=");
            var re = z === "$" ? f : z === "#" && /[boxX]/.test(Z) ? "0" + Z.toLowerCase() : "", V = z === "$" ? _ : /[%p]/.test(Z) ? T : "", B = t[Z], U = /[defgprs%]/.test(Z);
            function ee(N) {
              var K, X, te, ie = re, le = V;
              if (Z === "c")
                le = B(N) + le, N = "";
              else {
                var oe = (N = +N) < 0 || 1 / N < 0;
                if (N = isNaN(N) ? A : B(Math.abs(N), J), W && (N = function(ye) {
                  e:
                    for (var Ae, pe = ye.length, ge = 1, we = -1; ge < pe; ++ge)
                      switch (ye[ge]) {
                        case ".":
                          we = Ae = ge;
                          break;
                        case "0":
                          we === 0 && (we = ge), Ae = ge;
                          break;
                        default:
                          if (!+ye[ge])
                            break e;
                          we > 0 && (we = 0);
                      }
                  return we > 0 ? ye.slice(0, we) + ye.slice(Ae + 1) : ye;
                }(N)), oe && +N == 0 && R !== "+" && (oe = !1), ie = (oe ? R === "(" ? R : L : R === "-" || R === "(" ? "" : R) + ie, le = (Z === "s" ? h[8 + x / 3] : "") + le + (oe && R === "(" ? ")" : ""), U) {
                  for (K = -1, X = N.length; ++K < X; )
                    if (48 > (te = N.charCodeAt(K)) || te > 57) {
                      le = (te === 46 ? b + N.slice(K + 1) : N.slice(K)) + le, N = N.slice(0, K);
                      break;
                    }
                }
              }
              Y && !j && (N = y(N, 1 / 0));
              var ve = ie.length + N.length + le.length, ue = ve < H ? new Array(H - ve + 1).join(S) : "";
              switch (Y && j && (N = y(ue + N, ue.length ? H - le.length : 1 / 0), ue = ""), E) {
                case "<":
                  N = ie + N + le + ue;
                  break;
                case "=":
                  N = ie + ue + N + le;
                  break;
                case "^":
                  N = ue.slice(0, ve = ue.length >> 1) + ie + N + le + ue.slice(ve);
                  break;
                default:
                  N = ue + ie + N + le;
              }
              return w(N);
            }
            return J = J === void 0 ? 6 : /[gprs]/.test(Z) ? Math.max(1, Math.min(21, J)) : Math.max(0, Math.min(20, J)), ee.toString = function() {
              return P + "";
            }, ee;
          }
          return { format: I, formatPrefix: function(P, S) {
            var E = I(((P = r(P)).type = "f", P)), R = 3 * Math.max(-8, Math.min(8, Math.floor(k(S) / 3))), z = Math.pow(10, -R), j = h[8 + R / 3];
            return function(H) {
              return E(z * H) + j;
            };
          } };
        }
        function i(p) {
          return u = l(p), m.format = u.format, m.formatPrefix = u.formatPrefix, u;
        }
        i({ decimal: ".", thousands: ",", grouping: [3], currency: ["$", ""], minus: "-" }), m.FormatSpecifier = n, m.formatDefaultLocale = i, m.formatLocale = l, m.formatSpecifier = r, m.precisionFixed = function(p) {
          return Math.max(0, -k(Math.abs(p)));
        }, m.precisionPrefix = function(p, c) {
          return Math.max(0, 3 * Math.max(-8, Math.min(8, Math.floor(k(c) / 3))) - k(Math.abs(p)));
        }, m.precisionRound = function(p, c) {
          return p = Math.abs(p), c = Math.abs(c) - p, Math.max(0, k(c) - k(p)) + 1;
        }, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 113: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-geo"), v("d3-array")) : g(m.d3 = m.d3 || {}, m.d3, m.d3);
      })(this, function(m, g, k) {
        var x = Math.abs, e = Math.atan, r = Math.atan2, n = Math.cos, s = Math.exp, t = Math.floor, d = Math.log, u = Math.max, o = Math.min, h = Math.pow, l = Math.round, i = Math.sign || function(je) {
          return je > 0 ? 1 : je < 0 ? -1 : 0;
        }, p = Math.sin, c = Math.tan, a = 1e-6, y = Math.PI, f = y / 2, _ = y / 4, b = Math.SQRT1_2, w = E(2), T = E(y), L = 2 * y, A = 180 / y, I = y / 180;
        function P(je) {
          return je > 1 ? f : je < -1 ? -f : Math.asin(je);
        }
        function S(je) {
          return je > 1 ? 0 : je < -1 ? y : Math.acos(je);
        }
        function E(je) {
          return je > 0 ? Math.sqrt(je) : 0;
        }
        function R(je) {
          return (s(je) - s(-je)) / 2;
        }
        function z(je) {
          return (s(je) + s(-je)) / 2;
        }
        function j(je) {
          var Ye = c(je / 2), et = 2 * d(n(je / 2)) / (Ye * Ye);
          function lt(gt, pt) {
            var St = n(gt), Jt = n(pt), Qt = p(pt), Yt = Jt * St, ar = -((1 - Yt ? d((1 + Yt) / 2) / (1 - Yt) : -0.5) + et / (1 + Yt));
            return [ar * Jt * p(gt), ar * Qt];
          }
          return lt.invert = function(gt, pt) {
            var St, Jt = E(gt * gt + pt * pt), Qt = -je / 2, Yt = 50;
            if (!Jt)
              return [0, 0];
            do {
              var ar = Qt / 2, pr = n(ar), br = p(ar), _r = br / pr, zr = -d(x(pr));
              Qt -= St = (2 / _r * zr - et * _r - Jt) / (-zr / (br * br) + 1 - et / (2 * pr * pr)) * (pr < 0 ? 0.7 : 1);
            } while (x(St) > a && --Yt > 0);
            var nn = p(Qt);
            return [r(gt * nn, Jt * n(Qt)), P(pt * nn / Jt)];
          }, lt;
        }
        function H(je, Ye) {
          var et = n(Ye), lt = function(gt) {
            return gt ? gt / Math.sin(gt) : 1;
          }(S(et * n(je /= 2)));
          return [2 * et * p(je) * lt, p(Ye) * lt];
        }
        function Y(je) {
          var Ye = p(je), et = n(je), lt = je >= 0 ? 1 : -1, gt = c(lt * je), pt = (1 + Ye - et) / 2;
          function St(Jt, Qt) {
            var Yt = n(Qt), ar = n(Jt /= 2);
            return [(1 + Yt) * p(Jt), (lt * Qt > -r(ar, gt) - 1e-3 ? 0 : 10 * -lt) + pt + p(Qt) * et - (1 + Yt) * Ye * ar];
          }
          return St.invert = function(Jt, Qt) {
            var Yt = 0, ar = 0, pr = 50;
            do {
              var br = n(Yt), _r = p(Yt), zr = n(ar), nn = p(ar), pn = 1 + zr, Cn = pn * _r - Jt, On = pt + nn * et - pn * Ye * br - Qt, Vn = pn * br / 2, zn = -_r * nn, ma = Ye * pn * _r / 2, Ma = et * zr + Ye * br * nn, Na = zn * ma - Ma * Vn, Ba = (On * zn - Cn * Ma) / Na / 2, ja = (Cn * ma - On * Vn) / Na;
              x(ja) > 2 && (ja /= 2), Yt -= Ba, ar -= ja;
            } while ((x(Ba) > a || x(ja) > a) && --pr > 0);
            return lt * ar > -r(n(Yt), gt) - 1e-3 ? [2 * Yt, ar] : null;
          }, St;
        }
        function J(je, Ye) {
          var et = c(Ye / 2), lt = E(1 - et * et), gt = 1 + lt * n(je /= 2), pt = p(je) * lt / gt, St = et / gt, Jt = pt * pt, Qt = St * St;
          return [4 / 3 * pt * (3 + Jt - 3 * Qt), 4 / 3 * St * (3 + 3 * Jt - Qt)];
        }
        H.invert = function(je, Ye) {
          if (!(je * je + 4 * Ye * Ye > y * y + a)) {
            var et = je, lt = Ye, gt = 25;
            do {
              var pt, St = p(et), Jt = p(et / 2), Qt = n(et / 2), Yt = p(lt), ar = n(lt), pr = p(2 * lt), br = Yt * Yt, _r = ar * ar, zr = Jt * Jt, nn = 1 - _r * Qt * Qt, pn = nn ? S(ar * Qt) * E(pt = 1 / nn) : pt = 0, Cn = 2 * pn * ar * Jt - je, On = pn * Yt - Ye, Vn = pt * (_r * zr + pn * ar * Qt * br), zn = pt * (0.5 * St * pr - 2 * pn * Yt * Jt), ma = 0.25 * pt * (pr * Jt - pn * Yt * _r * St), Ma = pt * (br * Qt + pn * zr * ar), Na = zn * ma - Ma * Vn;
              if (!Na)
                break;
              var Ba = (On * zn - Cn * Ma) / Na, ja = (Cn * ma - On * Vn) / Na;
              et -= Ba, lt -= ja;
            } while ((x(Ba) > a || x(ja) > a) && --gt > 0);
            return [et, lt];
          }
        }, J.invert = function(je, Ye) {
          if (Ye *= 3 / 8, !(je *= 3 / 8) && x(Ye) > 1)
            return null;
          var et = 1 + je * je + Ye * Ye, lt = E((et - E(et * et - 4 * Ye * Ye)) / 2), gt = P(lt) / 3, pt = lt ? function(Yt) {
            return d(Yt + E(Yt * Yt - 1));
          }(x(Ye / lt)) / 3 : function(Yt) {
            return d(Yt + E(Yt * Yt + 1));
          }(x(je)) / 3, St = n(gt), Jt = z(pt), Qt = Jt * Jt - St * St;
          return [2 * i(je) * r(R(pt) * St, 0.25 - Qt), 2 * i(Ye) * r(Jt * p(gt), 0.25 + Qt)];
        };
        var W = E(8), Z = d(1 + w);
        function re(je, Ye) {
          var et = x(Ye);
          return et < _ ? [je, d(c(_ + Ye / 2))] : [je * n(et) * (2 * w - 1 / p(et)), i(Ye) * (2 * w * (et - _) - d(c(et / 2)))];
        }
        function V(je) {
          var Ye = 2 * y / je;
          function et(lt, gt) {
            var pt = g.geoAzimuthalEquidistantRaw(lt, gt);
            if (x(lt) > f) {
              var St = r(pt[1], pt[0]), Jt = E(pt[0] * pt[0] + pt[1] * pt[1]), Qt = Ye * l((St - f) / Ye) + f, Yt = r(p(St -= Qt), 2 - n(St));
              St = Qt + P(y / Jt * p(Yt)) - Yt, pt[0] = Jt * n(St), pt[1] = Jt * p(St);
            }
            return pt;
          }
          return et.invert = function(lt, gt) {
            var pt = E(lt * lt + gt * gt);
            if (pt > f) {
              var St = r(gt, lt), Jt = Ye * l((St - f) / Ye) + f, Qt = St > Jt ? -1 : 1, Yt = pt * n(Jt - St), ar = 1 / c(Qt * S((Yt - y) / E(y * (y - 2 * Yt) + pt * pt)));
              St = Jt + 2 * e((ar + Qt * E(ar * ar - 3)) / 3), lt = pt * n(St), gt = pt * p(St);
            }
            return g.geoAzimuthalEquidistantRaw.invert(lt, gt);
          }, et;
        }
        function B(je, Ye) {
          if (arguments.length < 2 && (Ye = je), Ye === 1)
            return g.geoAzimuthalEqualAreaRaw;
          if (Ye === 1 / 0)
            return U;
          function et(lt, gt) {
            var pt = g.geoAzimuthalEqualAreaRaw(lt / Ye, gt);
            return pt[0] *= je, pt;
          }
          return et.invert = function(lt, gt) {
            var pt = g.geoAzimuthalEqualAreaRaw.invert(lt / je, gt);
            return pt[0] *= Ye, pt;
          }, et;
        }
        function U(je, Ye) {
          return [je * n(Ye) / n(Ye /= 2), 2 * p(Ye)];
        }
        function ee(je, Ye, et) {
          var lt, gt, pt, St = 100;
          et = et === void 0 ? 0 : +et, Ye = +Ye;
          do
            (gt = je(et)) === (pt = je(et + a)) && (pt = gt + a), et -= lt = -1 * a * (gt - Ye) / (gt - pt);
          while (St-- > 0 && x(lt) > a);
          return St < 0 ? NaN : et;
        }
        function N(je, Ye, et) {
          return Ye === void 0 && (Ye = 40), et === void 0 && (et = 1e-12), function(lt, gt, pt, St) {
            var Jt, Qt, Yt;
            pt = pt === void 0 ? 0 : +pt, St = St === void 0 ? 0 : +St;
            for (var ar = 0; ar < Ye; ar++) {
              var pr = je(pt, St), br = pr[0] - lt, _r = pr[1] - gt;
              if (x(br) < et && x(_r) < et)
                break;
              var zr = br * br + _r * _r;
              if (zr > Jt)
                pt -= Qt /= 2, St -= Yt /= 2;
              else {
                Jt = zr;
                var nn = (pt > 0 ? -1 : 1) * et, pn = (St > 0 ? -1 : 1) * et, Cn = je(pt + nn, St), On = je(pt, St + pn), Vn = (Cn[0] - pr[0]) / nn, zn = (Cn[1] - pr[1]) / nn, ma = (On[0] - pr[0]) / pn, Ma = (On[1] - pr[1]) / pn, Na = Ma * Vn - zn * ma, Ba = (x(Na) < 0.5 ? 0.5 : 1) / Na;
                if (pt += Qt = (_r * ma - br * Ma) * Ba, St += Yt = (br * zn - _r * Vn) * Ba, x(Qt) < et && x(Yt) < et)
                  break;
              }
            }
            return [pt, St];
          };
        }
        function K() {
          var je = B(1.68, 2);
          function Ye(et, lt) {
            if (et + lt < -1.4) {
              var gt = (et - lt + 1.6) * (et + lt + 1.4) / 8;
              et += gt, lt -= 0.8 * gt * p(lt + y / 2);
            }
            var pt = je(et, lt), St = (1 - n(et * lt)) / 12;
            return pt[1] < 0 && (pt[0] *= 1 + St), pt[1] > 0 && (pt[1] *= 1 + St / 1.5 * pt[0] * pt[0]), pt;
          }
          return Ye.invert = N(Ye), Ye;
        }
        function X(je, Ye) {
          var et, lt = je * p(Ye), gt = 30;
          do
            Ye -= et = (Ye + p(Ye) - lt) / (1 + n(Ye));
          while (x(et) > a && --gt > 0);
          return Ye / 2;
        }
        function te(je, Ye, et) {
          function lt(gt, pt) {
            return [je * gt * n(pt = X(et, pt)), Ye * p(pt)];
          }
          return lt.invert = function(gt, pt) {
            return pt = P(pt / Ye), [gt / (je * n(pt)), P((2 * pt + p(2 * pt)) / et)];
          }, lt;
        }
        re.invert = function(je, Ye) {
          if ((lt = x(Ye)) < Z)
            return [je, 2 * e(s(Ye)) - f];
          var et, lt, gt = _, pt = 25;
          do {
            var St = n(gt / 2), Jt = c(gt / 2);
            gt -= et = (W * (gt - _) - d(Jt) - lt) / (W - St * St / (2 * Jt));
          } while (x(et) > 1e-12 && --pt > 0);
          return [je / (n(gt) * (W - 1 / p(gt))), i(Ye) * gt];
        }, U.invert = function(je, Ye) {
          var et = 2 * P(Ye / 2);
          return [je * n(et / 2) / n(et), et];
        };
        var ie = te(w / f, w, y), le = 2.00276, oe = 1.11072;
        function ve(je, Ye) {
          var et = X(y, Ye);
          return [le * je / (1 / n(Ye) + oe / n(et)), (Ye + w * p(et)) / le];
        }
        function ue(je) {
          var Ye = 0, et = g.geoProjectionMutator(je), lt = et(Ye);
          return lt.parallel = function(gt) {
            return arguments.length ? et(Ye = gt * I) : Ye * A;
          }, lt;
        }
        function ye(je, Ye) {
          return [je * n(Ye), Ye];
        }
        function Ae(je) {
          if (!je)
            return ye;
          var Ye = 1 / c(je);
          function et(lt, gt) {
            var pt = Ye + je - gt, St = pt && lt * n(gt) / pt;
            return [pt * p(St), Ye - pt * n(St)];
          }
          return et.invert = function(lt, gt) {
            var pt = E(lt * lt + (gt = Ye - gt) * gt), St = Ye + je - pt;
            return [pt / n(St) * r(lt, gt), St];
          }, et;
        }
        function pe(je) {
          function Ye(et, lt) {
            var gt = f - lt, pt = gt && et * je * p(gt) / gt;
            return [gt * p(pt) / je, f - gt * n(pt)];
          }
          return Ye.invert = function(et, lt) {
            var gt = et * je, pt = f - lt, St = E(gt * gt + pt * pt), Jt = r(gt, pt);
            return [(St ? St / p(St) : 1) * Jt / je, f - St];
          }, Ye;
        }
        ve.invert = function(je, Ye) {
          var et, lt, gt = le * Ye, pt = Ye < 0 ? -_ : _, St = 25;
          do
            lt = gt - w * p(pt), pt -= et = (p(2 * pt) + 2 * pt - y * p(lt)) / (2 * n(2 * pt) + 2 + y * n(lt) * w * n(pt));
          while (x(et) > a && --St > 0);
          return lt = gt - w * p(pt), [je * (1 / n(lt) + oe / n(pt)) / le, lt];
        }, ye.invert = function(je, Ye) {
          return [je / n(Ye), Ye];
        };
        var ge = te(1, 4 / y, y);
        function we(je, Ye, et, lt, gt, pt) {
          var St, Jt = n(pt);
          if (x(je) > 1 || x(pt) > 1)
            St = S(et * gt + Ye * lt * Jt);
          else {
            var Qt = p(je / 2), Yt = p(pt / 2);
            St = 2 * P(E(Qt * Qt + Ye * lt * Yt * Yt));
          }
          return x(St) > a ? [St, r(lt * p(pt), Ye * gt - et * lt * Jt)] : [0, 0];
        }
        function se(je, Ye, et) {
          return S((je * je + Ye * Ye - et * et) / (2 * je * Ye));
        }
        function de(je) {
          return je - 2 * y * t((je + y) / (2 * y));
        }
        function Te(je, Ye, et) {
          for (var lt, gt = [[je[0], je[1], p(je[1]), n(je[1])], [Ye[0], Ye[1], p(Ye[1]), n(Ye[1])], [et[0], et[1], p(et[1]), n(et[1])]], pt = gt[2], St = 0; St < 3; ++St, pt = lt)
            lt = gt[St], pt.v = we(lt[1] - pt[1], pt[3], pt[2], lt[3], lt[2], lt[0] - pt[0]), pt.point = [0, 0];
          var Jt = se(gt[0].v[0], gt[2].v[0], gt[1].v[0]), Qt = se(gt[0].v[0], gt[1].v[0], gt[2].v[0]), Yt = y - Jt;
          gt[2].point[1] = 0, gt[0].point[0] = -(gt[1].point[0] = gt[0].v[0] / 2);
          var ar = [gt[2].point[0] = gt[0].point[0] + gt[2].v[0] * n(Jt), 2 * (gt[0].point[1] = gt[1].point[1] = gt[2].v[0] * p(Jt))];
          return function(pr, br) {
            var _r, zr = p(br), nn = n(br), pn = new Array(3);
            for (_r = 0; _r < 3; ++_r) {
              var Cn = gt[_r];
              if (pn[_r] = we(br - Cn[1], Cn[3], Cn[2], nn, zr, pr - Cn[0]), !pn[_r][0])
                return Cn.point;
              pn[_r][1] = de(pn[_r][1] - Cn.v[1]);
            }
            var On = ar.slice();
            for (_r = 0; _r < 3; ++_r) {
              var Vn = _r == 2 ? 0 : _r + 1, zn = se(gt[_r].v[0], pn[_r][0], pn[Vn][0]);
              pn[_r][1] < 0 && (zn = -zn), _r ? _r == 1 ? (zn = Qt - zn, On[0] -= pn[_r][0] * n(zn), On[1] -= pn[_r][0] * p(zn)) : (zn = Yt - zn, On[0] += pn[_r][0] * n(zn), On[1] += pn[_r][0] * p(zn)) : (On[0] += pn[_r][0] * n(zn), On[1] -= pn[_r][0] * p(zn));
            }
            return On[0] /= 3, On[1] /= 3, On;
          };
        }
        function Ee(je) {
          return je[0] *= I, je[1] *= I, je;
        }
        function Me(je, Ye, et) {
          var lt = g.geoCentroid({ type: "MultiPoint", coordinates: [je, Ye, et] }), gt = [-lt[0], -lt[1]], pt = g.geoRotation(gt), St = Te(Ee(pt(je)), Ee(pt(Ye)), Ee(pt(et)));
          St.invert = N(St);
          var Jt = g.geoProjection(St).rotate(gt), Qt = Jt.center;
          return delete Jt.rotate, Jt.center = function(Yt) {
            return arguments.length ? Qt(pt(Yt)) : pt.invert(Qt());
          }, Jt.clipAngle(90);
        }
        function ze(je, Ye) {
          var et = E(1 - p(Ye));
          return [2 / T * je * et, T * (1 - et)];
        }
        function Ie(je) {
          var Ye = c(je);
          function et(lt, gt) {
            return [lt, (lt ? lt / p(lt) : 1) * (p(gt) * n(lt) - Ye * n(gt))];
          }
          return et.invert = Ye ? function(lt, gt) {
            lt && (gt *= p(lt) / lt);
            var pt = n(lt);
            return [lt, 2 * r(E(pt * pt + Ye * Ye - gt * gt) - pt, Ye - gt)];
          } : function(lt, gt) {
            return [lt, P(lt ? gt * c(lt) / lt : gt)];
          }, et;
        }
        ze.invert = function(je, Ye) {
          var et = (et = Ye / T - 1) * et;
          return [et > 0 ? je * E(y / et) / 2 : 0, P(1 - et)];
        };
        var Oe = E(3);
        function Ze(je, Ye) {
          return [Oe * je * (2 * n(2 * Ye / 3) - 1) / T, Oe * T * p(Ye / 3)];
        }
        function Fe(je) {
          var Ye = n(je);
          function et(lt, gt) {
            return [lt * Ye, p(gt) / Ye];
          }
          return et.invert = function(lt, gt) {
            return [lt / Ye, P(gt * Ye)];
          }, et;
        }
        function Pe(je) {
          var Ye = n(je);
          function et(lt, gt) {
            return [lt * Ye, (1 + Ye) * c(gt / 2)];
          }
          return et.invert = function(lt, gt) {
            return [lt / Ye, 2 * e(gt / (1 + Ye))];
          }, et;
        }
        function De(je, Ye) {
          var et = E(8 / (3 * y));
          return [et * je * (1 - x(Ye) / y), et * Ye];
        }
        function Ge(je, Ye) {
          var et = E(4 - 3 * p(x(Ye)));
          return [2 / E(6 * y) * je * et, i(Ye) * E(2 * y / 3) * (2 - et)];
        }
        function Qe(je, Ye) {
          var et = E(y * (4 + y));
          return [2 / et * je * (1 + E(1 - 4 * Ye * Ye / (y * y))), 4 / et * Ye];
        }
        function ot(je, Ye) {
          var et = (2 + f) * p(Ye);
          Ye /= 2;
          for (var lt = 0, gt = 1 / 0; lt < 10 && x(gt) > a; lt++) {
            var pt = n(Ye);
            Ye -= gt = (Ye + p(Ye) * (pt + 2) - et) / (2 * pt * (1 + pt));
          }
          return [2 / E(y * (4 + y)) * je * (1 + n(Ye)), 2 * E(y / (4 + y)) * p(Ye)];
        }
        function vt(je, Ye) {
          return [je * (1 + n(Ye)) / E(2 + y), 2 * Ye / E(2 + y)];
        }
        function bt(je, Ye) {
          for (var et = (1 + f) * p(Ye), lt = 0, gt = 1 / 0; lt < 10 && x(gt) > a; lt++)
            Ye -= gt = (Ye + p(Ye) - et) / (1 + n(Ye));
          return et = E(2 + y), [je * (1 + n(Ye)) / et, 2 * Ye / et];
        }
        Ze.invert = function(je, Ye) {
          var et = 3 * P(Ye / (Oe * T));
          return [T * je / (Oe * (2 * n(2 * et / 3) - 1)), et];
        }, De.invert = function(je, Ye) {
          var et = E(8 / (3 * y)), lt = Ye / et;
          return [je / (et * (1 - x(lt) / y)), lt];
        }, Ge.invert = function(je, Ye) {
          var et = 2 - x(Ye) / E(2 * y / 3);
          return [je * E(6 * y) / (2 * et), i(Ye) * P((4 - et * et) / 3)];
        }, Qe.invert = function(je, Ye) {
          var et = E(y * (4 + y)) / 2;
          return [je * et / (1 + E(1 - Ye * Ye * (4 + y) / (4 * y))), Ye * et / 2];
        }, ot.invert = function(je, Ye) {
          var et = Ye * E((4 + y) / y) / 2, lt = P(et), gt = n(lt);
          return [je / (2 / E(y * (4 + y)) * (1 + gt)), P((lt + et * (gt + 2)) / (2 + f))];
        }, vt.invert = function(je, Ye) {
          var et = E(2 + y), lt = Ye * et / 2;
          return [et * je / (1 + n(lt)), lt];
        }, bt.invert = function(je, Ye) {
          var et = 1 + f, lt = E(et / 2);
          return [2 * je * lt / (1 + n(Ye *= lt)), P((Ye + p(Ye)) / et)];
        };
        var yt = 3 + 2 * w;
        function tt(je, Ye) {
          var et = p(je /= 2), lt = n(je), gt = E(n(Ye)), pt = n(Ye /= 2), St = p(Ye) / (pt + w * lt * gt), Jt = E(2 / (1 + St * St)), Qt = E((w * pt + (lt + et) * gt) / (w * pt + (lt - et) * gt));
          return [yt * (Jt * (Qt - 1 / Qt) - 2 * d(Qt)), yt * (Jt * St * (Qt + 1 / Qt) - 2 * e(St))];
        }
        tt.invert = function(je, Ye) {
          if (!(et = J.invert(je / 1.2, 1.065 * Ye)))
            return null;
          var et, lt = et[0], gt = et[1], pt = 20;
          je /= yt, Ye /= yt;
          do {
            var St = lt / 2, Jt = gt / 2, Qt = p(St), Yt = n(St), ar = p(Jt), pr = n(Jt), br = n(gt), _r = E(br), zr = ar / (pr + w * Yt * _r), nn = zr * zr, pn = E(2 / (1 + nn)), Cn = (w * pr + (Yt + Qt) * _r) / (w * pr + (Yt - Qt) * _r), On = E(Cn), Vn = On - 1 / On, zn = On + 1 / On, ma = pn * Vn - 2 * d(On) - je, Ma = pn * zr * zn - 2 * e(zr) - Ye, Na = ar && b * _r * Qt * nn / ar, Ba = (w * Yt * pr + _r) / (2 * (pr + w * Yt * _r) * (pr + w * Yt * _r) * _r), ja = -0.5 * zr * pn * pn * pn, _i = ja * Na, yi = ja * Ba, ii = (ii = 2 * pr + w * _r * (Yt - Qt)) * ii * On, oi = (w * Yt * pr * _r + br) / ii, xi = -w * Qt * ar / (_r * ii), Fi = Vn * _i - 2 * oi / On + pn * (oi + oi / Cn), Ji = Vn * yi - 2 * xi / On + pn * (xi + xi / Cn), Ki = zr * zn * _i - 2 * Na / (1 + nn) + pn * zn * Na + pn * zr * (oi - oi / Cn), Qi = zr * zn * yi - 2 * Ba / (1 + nn) + pn * zn * Ba + pn * zr * (xi - xi / Cn), $i = Ji * Ki - Qi * Fi;
            if (!$i)
              break;
            var Oa = (Ma * Ji - ma * Qi) / $i, ht = (ma * Ki - Ma * Fi) / $i;
            lt -= Oa, gt = u(-f, o(f, gt - ht));
          } while ((x(Oa) > a || x(ht) > a) && --pt > 0);
          return x(x(gt) - f) < a ? [0, gt] : pt && [lt, gt];
        };
        var Ke = n(35 * I);
        function mt(je, Ye) {
          var et = c(Ye / 2);
          return [je * Ke * E(1 - et * et), (1 + Ke) * et];
        }
        function Ft(je, Ye) {
          var et = Ye / 2, lt = n(et);
          return [2 * je / T * n(Ye) * lt * lt, T * c(et)];
        }
        function Vt(je) {
          var Ye = 1 - je, et = gt(y, 0)[0] - gt(-y, 0)[0], lt = E(2 * (gt(0, f)[1] - gt(0, -f)[1]) / et);
          function gt(Jt, Qt) {
            var Yt = n(Qt), ar = p(Qt);
            return [Yt / (Ye + je * Yt) * Jt, Ye * Qt + je * ar];
          }
          function pt(Jt, Qt) {
            var Yt = gt(Jt, Qt);
            return [Yt[0] * lt, Yt[1] / lt];
          }
          function St(Jt) {
            return pt(0, Jt)[1];
          }
          return pt.invert = function(Jt, Qt) {
            var Yt = ee(St, Qt);
            return [Jt / lt * (je + Ye / n(Yt)), Yt];
          }, pt;
        }
        function Xt(je) {
          return [je[0] / 2, P(c(je[1] / 2 * I)) * A];
        }
        function Gt(je) {
          return [2 * je[0], 2 * e(p(je[1] * I)) * A];
        }
        function nr(je, Ye) {
          var et = 2 * y / Ye, lt = je * je;
          function gt(pt, St) {
            var Jt = g.geoAzimuthalEquidistantRaw(pt, St), Qt = Jt[0], Yt = Jt[1], ar = Qt * Qt + Yt * Yt;
            if (ar > lt) {
              var pr = E(ar), br = r(Yt, Qt), _r = et * l(br / et), zr = br - _r, nn = je * n(zr), pn = (je * p(zr) - zr * p(nn)) / (f - nn), Cn = It(zr, pn), On = (y - je) / Be(Cn, nn, y);
              Qt = pr;
              var Vn, zn = 50;
              do
                Qt -= Vn = (je + Be(Cn, nn, Qt) * On - pr) / (Cn(Qt) * On);
              while (x(Vn) > a && --zn > 0);
              Yt = zr * p(Qt), Qt < f && (Yt -= pn * (Qt - f));
              var ma = p(_r), Ma = n(_r);
              Jt[0] = Qt * Ma - Yt * ma, Jt[1] = Qt * ma + Yt * Ma;
            }
            return Jt;
          }
          return gt.invert = function(pt, St) {
            var Jt = pt * pt + St * St;
            if (Jt > lt) {
              var Qt = E(Jt), Yt = r(St, pt), ar = et * l(Yt / et), pr = Yt - ar;
              pt = Qt * n(pr), St = Qt * p(pr);
              for (var br = pt - f, _r = p(pt), zr = St / _r, nn = pt < f ? 1 / 0 : 0, pn = 10; ; ) {
                var Cn = je * p(zr), On = je * n(zr), Vn = p(On), zn = f - On, ma = (Cn - zr * Vn) / zn, Ma = It(zr, ma);
                if (x(nn) < 1e-12 || !--pn)
                  break;
                zr -= nn = (zr * _r - ma * br - St) / (_r - 2 * br * (zn * (On + zr * Cn * n(On) - Vn) - Cn * (Cn - zr * Vn)) / (zn * zn));
              }
              pt = (Qt = je + Be(Ma, On, pt) * (y - je) / Be(Ma, On, y)) * n(Yt = ar + zr), St = Qt * p(Yt);
            }
            return g.geoAzimuthalEquidistantRaw.invert(pt, St);
          }, gt;
        }
        function It(je, Ye) {
          return function(et) {
            var lt = je * n(et);
            return et < f && (lt -= Ye), E(1 + lt * lt);
          };
        }
        function Be(je, Ye, et) {
          for (var lt = (et - Ye) / 50, gt = je(Ye) + je(et), pt = 1, St = Ye; pt < 50; ++pt)
            gt += 2 * je(St += lt);
          return 0.5 * gt * lt;
        }
        function He(je, Ye, et, lt, gt, pt, St, Jt) {
          function Qt(Yt, ar) {
            if (!ar)
              return [je * Yt / y, 0];
            var pr = ar * ar, br = je + pr * (Ye + pr * (et + pr * lt)), _r = ar * (gt - 1 + pr * (pt - Jt + pr * St)), zr = (br * br + _r * _r) / (2 * _r), nn = Yt * P(br / zr) / y;
            return [zr * p(nn), ar * (1 + pr * Jt) + zr * (1 - n(nn))];
          }
          return arguments.length < 8 && (Jt = 0), Qt.invert = function(Yt, ar) {
            var pr, br, _r = y * Yt / je, zr = ar, nn = 50;
            do {
              var pn = zr * zr, Cn = je + pn * (Ye + pn * (et + pn * lt)), On = zr * (gt - 1 + pn * (pt - Jt + pn * St)), Vn = Cn * Cn + On * On, zn = 2 * On, ma = Vn / zn, Ma = ma * ma, Na = P(Cn / ma) / y, Ba = _r * Na, ja = Cn * Cn, _i = (2 * Ye + pn * (4 * et + 6 * pn * lt)) * zr, yi = gt + pn * (3 * pt + 5 * pn * St), ii = (2 * (Cn * _i + On * (yi - 1)) * zn - Vn * (2 * (yi - 1))) / (zn * zn), oi = n(Ba), xi = p(Ba), Fi = ma * oi, Ji = ma * xi, Ki = _r / y * (1 / E(1 - ja / Ma)) * (_i * ma - Cn * ii) / Ma, Qi = Ji - Yt, $i = zr * (1 + pn * Jt) + ma - Fi - ar, Oa = ii * xi + Fi * Ki, ht = Fi * Na, zt = 1 + ii - (ii * oi - Ji * Ki), sr = Ji * Na, Ht = Oa * sr - zt * ht;
              if (!Ht)
                break;
              _r -= pr = ($i * Oa - Qi * zt) / Ht, zr -= br = (Qi * sr - $i * ht) / Ht;
            } while ((x(pr) > a || x(br) > a) && --nn > 0);
            return [_r, zr];
          }, Qt;
        }
        mt.invert = function(je, Ye) {
          var et = Ye / (1 + Ke);
          return [je && je / (Ke * E(1 - et * et)), 2 * e(et)];
        }, Ft.invert = function(je, Ye) {
          var et = e(Ye / T), lt = n(et), gt = 2 * et;
          return [je * T / 2 / (n(gt) * lt * lt), gt];
        };
        var he = He(2.8284, -1.6988, 0.75432, -0.18071, 1.76003, -0.38914, 0.042555), be = He(2.583819, -0.835827, 0.170354, -0.038094, 1.543313, -0.411435, 0.082742), Re = He(5 / 6 * y, -0.62636, -0.0344, 0, 1.3493, -0.05524, 0, 0.045);
        function Ue(je, Ye) {
          var et = je * je, lt = Ye * Ye;
          return [je * (1 - 0.162388 * lt) * (0.87 - 952426e-9 * et * et), Ye * (1 + lt / 12)];
        }
        Ue.invert = function(je, Ye) {
          var et, lt = je, gt = Ye, pt = 50;
          do {
            var St = gt * gt;
            gt -= et = (gt * (1 + St / 12) - Ye) / (1 + St / 4);
          } while (x(et) > a && --pt > 0);
          pt = 50, je /= 1 - 0.162388 * St;
          do {
            var Jt = (Jt = lt * lt) * Jt;
            lt -= et = (lt * (0.87 - 952426e-9 * Jt) - je) / (0.87 - 476213e-8 * Jt);
          } while (x(et) > a && --pt > 0);
          return [lt, gt];
        };
        var Xe = He(2.6516, -0.76534, 0.19123, -0.047094, 1.36289, -0.13965, 0.031762);
        function qe(je) {
          var Ye = je(f, 0)[0] - je(-f, 0)[0];
          function et(lt, gt) {
            var pt = lt > 0 ? -0.5 : 0.5, St = je(lt + pt * y, gt);
            return St[0] -= pt * Ye, St;
          }
          return je.invert && (et.invert = function(lt, gt) {
            var pt = lt > 0 ? -0.5 : 0.5, St = je.invert(lt + pt * Ye, gt), Jt = St[0] - pt * y;
            return Jt < -y ? Jt += 2 * y : Jt > y && (Jt -= 2 * y), St[0] = Jt, St;
          }), et;
        }
        function st(je, Ye) {
          var et = i(je), lt = i(Ye), gt = n(Ye), pt = n(je) * gt, St = p(je) * gt, Jt = p(lt * Ye);
          je = x(r(St, Jt)), Ye = P(pt), x(je - f) > a && (je %= f);
          var Qt = function(Yt, ar) {
            if (ar === f)
              return [0, 0];
            var pr, br, _r = p(ar), zr = _r * _r, nn = zr * zr, pn = 1 + nn, Cn = 1 + 3 * nn, On = 1 - nn, Vn = P(1 / E(pn)), zn = On + zr * pn * Vn, ma = (1 - _r) / zn, Ma = E(ma), Na = ma * pn, Ba = E(Na), ja = Ma * On;
            if (Yt === 0)
              return [0, -(ja + zr * Ba)];
            var _i, yi = n(ar), ii = 1 / yi, oi = 2 * _r * yi, xi = (-zn * yi - (-3 * zr + Vn * Cn) * oi * (1 - _r)) / (zn * zn), Fi = -ii * oi, Ji = -ii * (zr * pn * xi + ma * Cn * oi), Ki = -2 * ii * (On * (0.5 * xi / Ma) - 2 * zr * Ma * oi), Qi = 4 * Yt / y;
            if (Yt > 0.222 * y || ar < y / 4 && Yt > 0.175 * y) {
              if (pr = (ja + zr * E(Na * (1 + nn) - ja * ja)) / (1 + nn), Yt > y / 4)
                return [pr, pr];
              var $i = pr, Oa = 0.5 * pr;
              pr = 0.5 * (Oa + $i), br = 50;
              do {
                var ht = E(Na - pr * pr), zt = pr * (Ki + Fi * ht) + Ji * P(pr / Ba) - Qi;
                if (!zt)
                  break;
                zt < 0 ? Oa = pr : $i = pr, pr = 0.5 * (Oa + $i);
              } while (x($i - Oa) > a && --br > 0);
            } else {
              pr = a, br = 25;
              do {
                var sr = pr * pr, Ht = E(Na - sr), lr = Ki + Fi * Ht, Pr = pr * lr + Ji * P(pr / Ba) - Qi, Nr = lr + (Ji - Fi * sr) / Ht;
                pr -= _i = Ht ? Pr / Nr : 0;
              } while (x(_i) > a && --br > 0);
            }
            return [pr, -ja - zr * E(Na - pr * pr)];
          }(je > y / 4 ? f - je : je, Ye);
          return je > y / 4 && (Jt = Qt[0], Qt[0] = -Qt[1], Qt[1] = -Jt), Qt[0] *= et, Qt[1] *= -lt, Qt;
        }
        function it(je, Ye) {
          var et, lt, gt, pt, St, Jt;
          if (Ye < a)
            return [(pt = p(je)) - (et = Ye * (je - pt * (lt = n(je))) / 4) * lt, lt + et * pt, 1 - Ye * pt * pt / 2, je - et];
          if (Ye >= 1 - a)
            return et = (1 - Ye) / 4, gt = 1 / (lt = z(je)), [(pt = ((Jt = s(2 * (Jt = je))) - 1) / (Jt + 1)) + et * ((St = lt * R(je)) - je) / (lt * lt), gt - et * pt * gt * (St - je), gt + et * pt * gt * (St + je), 2 * e(s(je)) - f + et * (St - je) / lt];
          var Qt = [1, 0, 0, 0, 0, 0, 0, 0, 0], Yt = [E(Ye), 0, 0, 0, 0, 0, 0, 0, 0], ar = 0;
          for (lt = E(1 - Ye), St = 1; x(Yt[ar] / Qt[ar]) > a && ar < 8; )
            et = Qt[ar++], Yt[ar] = (et - lt) / 2, Qt[ar] = (et + lt) / 2, lt = E(et * lt), St *= 2;
          gt = St * Qt[ar] * je;
          do
            gt = (P(pt = Yt[ar] * p(lt = gt) / Qt[ar]) + gt) / 2;
          while (--ar);
          return [p(gt), pt = n(gt), pt / n(gt - lt), gt];
        }
        function Tt(je, Ye) {
          if (!Ye)
            return je;
          if (Ye === 1)
            return d(c(je / 2 + _));
          for (var et = 1, lt = E(1 - Ye), gt = E(Ye), pt = 0; x(gt) > a; pt++) {
            if (je % y) {
              var St = e(lt * c(je) / et);
              St < 0 && (St += y), je += St + ~~(je / y) * y;
            } else
              je += je;
            gt = (et + lt) / 2, lt = E(et * lt), gt = ((et = gt) - lt) / 2;
          }
          return je / (h(2, pt) * et);
        }
        function Pt(je, Ye) {
          var et = (w - 1) / (w + 1), lt = E(1 - et * et), gt = Tt(f, lt * lt), pt = d(c(y / 4 + x(Ye) / 2)), St = s(-1 * pt) / E(et), Jt = function(Yt, ar) {
            var pr = Yt * Yt, br = ar + 1, _r = 1 - pr - ar * ar;
            return [0.5 * ((Yt >= 0 ? f : -f) - r(_r, 2 * Yt)), -0.25 * d(_r * _r + 4 * pr) + 0.5 * d(br * br + pr)];
          }(St * n(-1 * je), St * p(-1 * je)), Qt = function(Yt, ar, pr) {
            var br = x(Yt), _r = R(x(ar));
            if (br) {
              var zr = 1 / p(br), nn = 1 / (c(br) * c(br)), pn = -(nn + pr * (_r * _r * zr * zr) - 1 + pr), Cn = (-pn + E(pn * pn - 4 * ((pr - 1) * nn))) / 2;
              return [Tt(e(1 / E(Cn)), pr) * i(Yt), Tt(e(E((Cn / nn - 1) / pr)), 1 - pr) * i(ar)];
            }
            return [0, Tt(e(_r), 1 - pr) * i(ar)];
          }(Jt[0], Jt[1], lt * lt);
          return [-Qt[1], (Ye >= 0 ? 1 : -1) * (0.5 * gt - Qt[0])];
        }
        function rt(je) {
          var Ye = p(je), et = n(je), lt = ut(je);
          function gt(pt, St) {
            var Jt = lt(pt, St);
            pt = Jt[0], St = Jt[1];
            var Qt = p(St), Yt = n(St), ar = n(pt), pr = S(Ye * Qt + et * Yt * ar), br = p(pr), _r = x(br) > a ? pr / br : 1;
            return [_r * et * p(pt), (x(pt) > f ? _r : -_r) * (Ye * Yt - et * Qt * ar)];
          }
          return lt.invert = ut(-je), gt.invert = function(pt, St) {
            var Jt = E(pt * pt + St * St), Qt = -p(Jt), Yt = n(Jt), ar = Jt * Yt, pr = -St * Qt, br = Jt * Ye, _r = E(ar * ar + pr * pr - br * br), zr = r(ar * br + pr * _r, pr * br - ar * _r), nn = (Jt > f ? -1 : 1) * r(pt * Qt, Jt * n(zr) * Yt + St * p(zr) * Qt);
            return lt.invert(nn, zr);
          }, gt;
        }
        function ut(je) {
          var Ye = p(je), et = n(je);
          return function(lt, gt) {
            var pt = n(gt), St = n(lt) * pt, Jt = p(lt) * pt, Qt = p(gt);
            return [r(Jt, St * et - Qt * Ye), P(Qt * et + St * Ye)];
          };
        }
        st.invert = function(je, Ye) {
          x(je) > 1 && (je = 2 * i(je) - je), x(Ye) > 1 && (Ye = 2 * i(Ye) - Ye);
          var et = i(je), lt = i(Ye), gt = -et * je, pt = -lt * Ye, St = pt / gt < 1, Jt = function(pr, br) {
            for (var _r = 0, zr = 1, nn = 0.5, pn = 50; ; ) {
              var Cn = nn * nn, On = E(nn), Vn = P(1 / E(1 + Cn)), zn = 1 - Cn + nn * (1 + Cn) * Vn, ma = (1 - On) / zn, Ma = E(ma), Na = ma * (1 + Cn), Ba = Ma * (1 - Cn), ja = E(Na - pr * pr), _i = br + Ba + nn * ja;
              if (x(zr - _r) < 1e-12 || --pn == 0 || _i === 0)
                break;
              _i > 0 ? _r = nn : zr = nn, nn = 0.5 * (_r + zr);
            }
            if (!pn)
              return null;
            var yi = P(On), ii = n(yi), oi = 1 / ii, xi = 2 * On * ii, Fi = (-zn * ii - (-3 * nn + Vn * (1 + 3 * Cn)) * xi * (1 - On)) / (zn * zn);
            return [y / 4 * (pr * (-2 * oi * (0.5 * Fi / Ma * (1 - Cn) - 2 * nn * Ma * xi) + -oi * xi * ja) + -oi * (nn * (1 + Cn) * Fi + ma * (1 + 3 * Cn) * xi) * P(pr / E(Na))), yi];
          }(St ? pt : gt, St ? gt : pt), Qt = Jt[0], Yt = Jt[1], ar = n(Yt);
          return St && (Qt = -f - Qt), [et * (r(p(Qt) * ar, -p(Yt)) + y), lt * P(n(Qt) * ar)];
        }, Pt.invert = function(je, Ye) {
          var et, lt, gt, pt, St, Jt, Qt = (w - 1) / (w + 1), Yt = E(1 - Qt * Qt), ar = Tt(f, Yt * Yt), pr = (lt = -je, gt = Yt * Yt, (et = 0.5 * ar - Ye) ? (pt = it(et, gt), lt ? (Jt = (St = it(lt, 1 - gt))[1] * St[1] + gt * pt[0] * pt[0] * St[0] * St[0], [[pt[0] * St[2] / Jt, pt[1] * pt[2] * St[0] * St[1] / Jt], [pt[1] * St[1] / Jt, -pt[0] * pt[2] * St[0] * St[2] / Jt], [pt[2] * St[1] * St[2] / Jt, -gt * pt[0] * pt[1] * St[0] / Jt]]) : [[pt[0], 0], [pt[1], 0], [pt[2], 0]]) : [[0, (St = it(lt, 1 - gt))[0] / St[1]], [1 / St[1], 0], [St[2] / St[1], 0]]), br = function(_r, zr) {
            var nn = zr[0] * zr[0] + zr[1] * zr[1];
            return [(_r[0] * zr[0] + _r[1] * zr[1]) / nn, (_r[1] * zr[0] - _r[0] * zr[1]) / nn];
          }(pr[0], pr[1]);
          return [r(br[1], br[0]) / -1, 2 * e(s(-0.5 * d(Qt * br[0] * br[0] + Qt * br[1] * br[1]))) - f];
        };
        var Bt = P(1 - 1 / 3) * A, wt = Fe(0);
        function Lt(je) {
          var Ye = Bt * I, et = ze(y, Ye)[0] - ze(-y, Ye)[0], lt = wt(0, Ye)[1], gt = ze(0, Ye)[1], pt = T - gt, St = L / je, Jt = 4 / L, Qt = lt + pt * pt * 4 / L;
          function Yt(ar, pr) {
            var br, _r = x(pr);
            if (_r > Ye) {
              var zr = o(je - 1, u(0, t((ar + y) / St)));
              (br = ze(ar += y * (je - 1) / je - zr * St, _r))[0] = br[0] * L / et - L * (je - 1) / (2 * je) + zr * L / je, br[1] = lt + 4 * (br[1] - gt) * pt / L, pr < 0 && (br[1] = -br[1]);
            } else
              br = wt(ar, pr);
            return br[0] *= Jt, br[1] /= Qt, br;
          }
          return Yt.invert = function(ar, pr) {
            ar /= Jt;
            var br = x(pr *= Qt);
            if (br > lt) {
              var _r = o(je - 1, u(0, t((ar + y) / St)));
              ar = (ar + y * (je - 1) / je - _r * St) * et / L;
              var zr = ze.invert(ar, 0.25 * (br - lt) * L / pt + gt);
              return zr[0] -= y * (je - 1) / je - _r * St, pr < 0 && (zr[1] = -zr[1]), zr;
            }
            return wt.invert(ar, pr);
          }, Yt;
        }
        function Se(je, Ye) {
          return [je, 1 & Ye ? 90 - a : Bt];
        }
        function We(je, Ye) {
          return [je, 1 & Ye ? -90 + a : -Bt];
        }
        function nt(je) {
          return [je[0] * (1 - a), je[1]];
        }
        function ft(je) {
          var Ye, et = 1 + je, lt = P(p(1 / et)), gt = 2 * E(y / (Ye = y + 4 * lt * et)), pt = 0.5 * gt * (et + E(je * (2 + je))), St = je * je, Jt = et * et;
          function Qt(Yt, ar) {
            var pr, br, _r = 1 - p(ar);
            if (_r && _r < 2) {
              var zr, nn = f - ar, pn = 25;
              do {
                var Cn = p(nn), On = n(nn), Vn = lt + r(Cn, et - On), zn = 1 + Jt - 2 * et * On;
                nn -= zr = (nn - St * lt - et * Cn + zn * Vn - 0.5 * _r * Ye) / (2 * et * Cn * Vn);
              } while (x(zr) > 1e-12 && --pn > 0);
              pr = gt * E(zn), br = Yt * Vn / y;
            } else
              pr = gt * (je + _r), br = Yt * lt / y;
            return [pr * p(br), pt - pr * n(br)];
          }
          return Qt.invert = function(Yt, ar) {
            var pr = Yt * Yt + (ar -= pt) * ar, br = (1 + Jt - pr / (gt * gt)) / (2 * et), _r = S(br), zr = p(_r), nn = lt + r(zr, et - br);
            return [P(Yt / E(pr)) * y / nn, P(1 - 2 * (_r - St * lt - et * zr + (1 + Jt - 2 * et * br) * nn) / Ye)];
          }, Qt;
        }
        function Mt(je, Ye) {
          return Ye > -0.7109889596207567 ? ((je = ie(je, Ye))[1] += 0.0528035274542, je) : ye(je, Ye);
        }
        function Nt(je, Ye) {
          return x(Ye) > 0.7109889596207567 ? ((je = ie(je, Ye))[1] -= Ye > 0 ? 0.0528035274542 : -0.0528035274542, je) : ye(je, Ye);
        }
        function Zt(je, Ye, et, lt) {
          var gt = E(4 * y / (2 * et + (1 + je - Ye / 2) * p(2 * et) + (je + Ye) / 2 * p(4 * et) + Ye / 2 * p(6 * et))), pt = E(lt * p(et) * E((1 + je * n(2 * et) + Ye * n(4 * et)) / (1 + je + Ye))), St = et * Qt(1);
          function Jt(pr) {
            return E(1 + je * n(2 * pr) + Ye * n(4 * pr));
          }
          function Qt(pr) {
            var br = pr * et;
            return (2 * br + (1 + je - Ye / 2) * p(2 * br) + (je + Ye) / 2 * p(4 * br) + Ye / 2 * p(6 * br)) / et;
          }
          function Yt(pr) {
            return Jt(pr) * p(pr);
          }
          var ar = function(pr, br) {
            var _r = et * ee(Qt, St * p(br) / et, br / y);
            isNaN(_r) && (_r = et * i(br));
            var zr = gt * Jt(_r);
            return [zr * pt * pr / y * n(_r), zr / pt * p(_r)];
          };
          return ar.invert = function(pr, br) {
            var _r = ee(Yt, br * pt / gt);
            return [pr * y / (n(_r) * gt * pt * Jt(_r)), P(et * Qt(_r / et) / St)];
          }, et === 0 && (gt = E(lt / y), (ar = function(pr, br) {
            return [pr * gt, p(br) / gt];
          }).invert = function(pr, br) {
            return [pr / gt, P(br * gt)];
          }), ar;
        }
        function Ut(je, Ye, et, lt, gt) {
          lt === void 0 && (lt = 1e-8), gt === void 0 && (gt = 20);
          var pt = je(Ye), St = je(0.5 * (Ye + et)), Jt = je(et);
          return function Qt(Yt, ar, pr, br, _r, zr, nn, pn, Cn, On, Vn) {
            if (Vn.nanEncountered)
              return NaN;
            var zn, ma, Ma, Na, Ba, ja, _i, yi, ii, oi;
            if (ma = Yt(ar + 0.25 * (zn = pr - ar)), Ma = Yt(pr - 0.25 * zn), isNaN(ma))
              Vn.nanEncountered = !0;
            else {
              if (!isNaN(Ma))
                return oi = ((ja = (Na = zn * (br + 4 * ma + _r) / 12) + (Ba = zn * (_r + 4 * Ma + zr) / 12)) - nn) / 15, On > Cn ? (Vn.maxDepthCount++, ja + oi) : Math.abs(oi) < pn ? ja + oi : (yi = Qt(Yt, ar, _i = ar + 0.5 * zn, br, ma, _r, Na, 0.5 * pn, Cn, On + 1, Vn), isNaN(yi) ? (Vn.nanEncountered = !0, NaN) : (ii = Qt(Yt, _i, pr, _r, Ma, zr, Ba, 0.5 * pn, Cn, On + 1, Vn), isNaN(ii) ? (Vn.nanEncountered = !0, NaN) : yi + ii));
              Vn.nanEncountered = !0;
            }
          }(je, Ye, et, pt, St, Jt, (pt + 4 * St + Jt) * (et - Ye) / 6, lt, gt, 1, { maxDepthCount: 0, nanEncountered: !1 });
        }
        function fr(je, Ye, et) {
          function lt(_r) {
            return je + (1 - je) * h(1 - h(_r, Ye), 1 / Ye);
          }
          function gt(_r) {
            return Ut(lt, 0, _r, 1e-4);
          }
          for (var pt = 1 / gt(1), St = 1e3, Jt = (1 + 1e-8) * pt, Qt = [], Yt = 0; Yt <= St; Yt++)
            Qt.push(gt(Yt / St) * Jt);
          function ar(_r) {
            var zr = 0, nn = St, pn = 500;
            do
              Qt[pn] > _r ? nn = pn : zr = pn, pn = zr + nn >> 1;
            while (pn > zr);
            var Cn = Qt[pn + 1] - Qt[pn];
            return Cn && (Cn = (_r - Qt[pn + 1]) / Cn), (pn + 1 + Cn) / St;
          }
          var pr = 2 * ar(1) / y * pt / et, br = function(_r, zr) {
            var nn = ar(x(p(zr))), pn = lt(nn) * _r;
            return nn /= pr, [pn, zr >= 0 ? nn : -nn];
          };
          return br.invert = function(_r, zr) {
            var nn;
            return x(zr *= pr) < 1 && (nn = i(zr) * P(gt(x(zr)) * pt)), [_r / lt(x(zr)), nn];
          }, br;
        }
        function Tr(je, Ye) {
          return x(je[0] - Ye[0]) < a && x(je[1] - Ye[1]) < a;
        }
        function ur(je, Ye) {
          for (var et, lt, gt, pt = -1, St = je.length, Jt = je[0], Qt = []; ++pt < St; ) {
            lt = ((et = je[pt])[0] - Jt[0]) / Ye, gt = (et[1] - Jt[1]) / Ye;
            for (var Yt = 0; Yt < Ye; ++Yt)
              Qt.push([Jt[0] + Yt * lt, Jt[1] + Yt * gt]);
            Jt = et;
          }
          return Qt.push(et), Qt;
        }
        function Kt(je) {
          var Ye, et, lt, gt, pt, St, Jt, Qt = [], Yt = je[0].length;
          for (Jt = 0; Jt < Yt; ++Jt)
            et = (Ye = je[0][Jt])[0][0], lt = Ye[0][1], gt = Ye[1][1], pt = Ye[2][0], St = Ye[2][1], Qt.push(ur([[et + a, lt + a], [et + a, gt - a], [pt - a, gt - a], [pt - a, St + a]], 30));
          for (Jt = je[1].length - 1; Jt >= 0; --Jt)
            et = (Ye = je[1][Jt])[0][0], lt = Ye[0][1], gt = Ye[1][1], pt = Ye[2][0], St = Ye[2][1], Qt.push(ur([[pt - a, St - a], [pt - a, gt + a], [et + a, gt + a], [et + a, lt - a]], 30));
          return { type: "Polygon", coordinates: [k.merge(Qt)] };
        }
        function $t(je, Ye, et) {
          var lt, gt;
          function pt(Qt, Yt) {
            for (var ar = Yt < 0 ? -1 : 1, pr = Ye[+(Yt < 0)], br = 0, _r = pr.length - 1; br < _r && Qt > pr[br][2][0]; ++br)
              ;
            var zr = je(Qt - pr[br][1][0], Yt);
            return zr[0] += je(pr[br][1][0], ar * Yt > ar * pr[br][0][1] ? pr[br][0][1] : Yt)[0], zr;
          }
          et ? pt.invert = et(pt) : je.invert && (pt.invert = function(Qt, Yt) {
            for (var ar = gt[+(Yt < 0)], pr = Ye[+(Yt < 0)], br = 0, _r = ar.length; br < _r; ++br) {
              var zr = ar[br];
              if (zr[0][0] <= Qt && Qt < zr[1][0] && zr[0][1] <= Yt && Yt < zr[1][1]) {
                var nn = je.invert(Qt - je(pr[br][1][0], 0)[0], Yt);
                return nn[0] += pr[br][1][0], Tr(pt(nn[0], nn[1]), [Qt, Yt]) ? nn : null;
              }
            }
          });
          var St = g.geoProjection(pt), Jt = St.stream;
          return St.stream = function(Qt) {
            var Yt = St.rotate(), ar = Jt(Qt), pr = (St.rotate([0, 0]), Jt(Qt));
            return St.rotate(Yt), ar.sphere = function() {
              g.geoStream(lt, pr);
            }, ar;
          }, St.lobes = function(Qt) {
            return arguments.length ? (lt = Kt(Qt), Ye = Qt.map(function(Yt) {
              return Yt.map(function(ar) {
                return [[ar[0][0] * I, ar[0][1] * I], [ar[1][0] * I, ar[1][1] * I], [ar[2][0] * I, ar[2][1] * I]];
              });
            }), gt = Ye.map(function(Yt) {
              return Yt.map(function(ar) {
                var pr, br = je(ar[0][0], ar[0][1])[0], _r = je(ar[2][0], ar[2][1])[0], zr = je(ar[1][0], ar[0][1])[1], nn = je(ar[1][0], ar[1][1])[1];
                return zr > nn && (pr = zr, zr = nn, nn = pr), [[br, zr], [_r, nn]];
              });
            }), St) : Ye.map(function(Yt) {
              return Yt.map(function(ar) {
                return [[ar[0][0] * A, ar[0][1] * A], [ar[1][0] * A, ar[1][1] * A], [ar[2][0] * A, ar[2][1] * A]];
              });
            });
          }, Ye != null && St.lobes(Ye), St;
        }
        Mt.invert = function(je, Ye) {
          return Ye > -0.7109889596207567 ? ie.invert(je, Ye - 0.0528035274542) : ye.invert(je, Ye);
        }, Nt.invert = function(je, Ye) {
          return x(Ye) > 0.7109889596207567 ? ie.invert(je, Ye + (Ye > 0 ? 0.0528035274542 : -0.0528035274542)) : ye.invert(je, Ye);
        };
        var er = [[[[-180, 0], [-100, 90], [-40, 0]], [[-40, 0], [30, 90], [180, 0]]], [[[-180, 0], [-160, -90], [-100, 0]], [[-100, 0], [-60, -90], [-20, 0]], [[-20, 0], [20, -90], [80, 0]], [[80, 0], [140, -90], [180, 0]]]], cr = [[[[-180, 0], [-100, 90], [-40, 0]], [[-40, 0], [30, 90], [180, 0]]], [[[-180, 0], [-160, -90], [-100, 0]], [[-100, 0], [-60, -90], [-20, 0]], [[-20, 0], [20, -90], [80, 0]], [[80, 0], [140, -90], [180, 0]]]], gr = [[[[-180, 0], [-100, 90], [-40, 0]], [[-40, 0], [30, 90], [180, 0]]], [[[-180, 0], [-160, -90], [-100, 0]], [[-100, 0], [-60, -90], [-20, 0]], [[-20, 0], [20, -90], [80, 0]], [[80, 0], [140, -90], [180, 0]]]], Mr = [[[[-180, 0], [-90, 90], [0, 0]], [[0, 0], [90, 90], [180, 0]]], [[[-180, 0], [-90, -90], [0, 0]], [[0, 0], [90, -90], [180, 0]]]], Ir = [[[[-180, 35], [-30, 90], [0, 35]], [[0, 35], [30, 90], [180, 35]]], [[[-180, -10], [-102, -90], [-65, -10]], [[-65, -10], [5, -90], [77, -10]], [[77, -10], [103, -90], [180, -10]]]], Fr = [[[[-180, 0], [-110, 90], [-40, 0]], [[-40, 0], [0, 90], [40, 0]], [[40, 0], [110, 90], [180, 0]]], [[[-180, 0], [-110, -90], [-40, 0]], [[-40, 0], [0, -90], [40, 0]], [[40, 0], [110, -90], [180, 0]]]];
        function Gr(je, Ye) {
          return [3 / L * je * E(y * y / 3 - Ye * Ye), Ye];
        }
        function un(je) {
          function Ye(et, lt) {
            if (x(x(lt) - f) < a)
              return [0, lt < 0 ? -2 : 2];
            var gt = p(lt), pt = h((1 + gt) / (1 - gt), je / 2), St = 0.5 * (pt + 1 / pt) + n(et *= je);
            return [2 * p(et) / St, (pt - 1 / pt) / St];
          }
          return Ye.invert = function(et, lt) {
            var gt = x(lt);
            if (x(gt - 2) < a)
              return et ? null : [0, i(lt) * f];
            if (gt > 2)
              return null;
            var pt = (et /= 2) * et, St = (lt /= 2) * lt, Jt = 2 * lt / (1 + pt + St);
            return Jt = h((1 + Jt) / (1 - Jt), 1 / je), [r(2 * et, 1 - pt - St) / je, P((Jt - 1) / (Jt + 1))];
          }, Ye;
        }
        Gr.invert = function(je, Ye) {
          return [L / 3 * je / E(y * y / 3 - Ye * Ye), Ye];
        };
        var $r = y / w;
        function Dn(je, Ye) {
          return [je * (1 + E(n(Ye))) / 2, Ye / (n(Ye / 2) * n(je / 6))];
        }
        function rn(je, Ye) {
          var et = je * je, lt = Ye * Ye;
          return [je * (0.975534 + lt * (-0.0143059 * et - 0.119161 + -0.0547009 * lt)), Ye * (1.00384 + et * (0.0802894 + -0.02855 * lt + 199025e-9 * et) + lt * (0.0998909 + -0.0491032 * lt))];
        }
        function vn(je, Ye) {
          return [p(je) / n(Ye), c(Ye) * n(je)];
        }
        function xn(je) {
          var Ye = n(je), et = c(_ + je / 2);
          function lt(gt, pt) {
            var St = pt - je, Jt = x(St) < a ? gt * Ye : x(Jt = _ + pt / 2) < a || x(x(Jt) - f) < a ? 0 : gt * St / d(c(Jt) / et);
            return [Jt, St];
          }
          return lt.invert = function(gt, pt) {
            var St, Jt = pt + je;
            return [x(pt) < a ? gt / Ye : x(St = _ + Jt / 2) < a || x(x(St) - f) < a ? 0 : gt * d(c(St) / et) / pt, Jt];
          }, lt;
        }
        function $n(je, Ye) {
          return [je, 1.25 * d(c(_ + 0.4 * Ye))];
        }
        function Br(je) {
          var Ye = je.length - 1;
          function et(lt, gt) {
            for (var pt, St = n(gt), Jt = 2 / (1 + St * n(lt)), Qt = Jt * St * p(lt), Yt = Jt * p(gt), ar = Ye, pr = je[ar], br = pr[0], _r = pr[1]; --ar >= 0; )
              br = (pr = je[ar])[0] + Qt * (pt = br) - Yt * _r, _r = pr[1] + Qt * _r + Yt * pt;
            return [br = Qt * (pt = br) - Yt * _r, _r = Qt * _r + Yt * pt];
          }
          return et.invert = function(lt, gt) {
            var pt = 20, St = lt, Jt = gt;
            do {
              for (var Qt, Yt = Ye, ar = je[Yt], pr = ar[0], br = ar[1], _r = 0, zr = 0; --Yt >= 0; )
                _r = pr + St * (Qt = _r) - Jt * zr, zr = br + St * zr + Jt * Qt, pr = (ar = je[Yt])[0] + St * (Qt = pr) - Jt * br, br = ar[1] + St * br + Jt * Qt;
              var nn, pn, Cn = (_r = pr + St * (Qt = _r) - Jt * zr) * _r + (zr = br + St * zr + Jt * Qt) * zr;
              St -= nn = ((pr = St * (Qt = pr) - Jt * br - lt) * _r + (br = St * br + Jt * Qt - gt) * zr) / Cn, Jt -= pn = (br * _r - pr * zr) / Cn;
            } while (x(nn) + x(pn) > 1e-12 && --pt > 0);
            if (pt) {
              var On = E(St * St + Jt * Jt), Vn = 2 * e(0.5 * On), zn = p(Vn);
              return [r(St * zn, On * n(Vn)), On ? P(Jt * zn / On) : 0];
            }
          }, et;
        }
        Dn.invert = function(je, Ye) {
          var et = x(je), lt = x(Ye), gt = a, pt = f;
          lt < $r ? pt *= lt / $r : gt += 6 * S($r / lt);
          for (var St = 0; St < 25; St++) {
            var Jt = p(pt), Qt = E(n(pt)), Yt = p(pt / 2), ar = n(pt / 2), pr = p(gt / 6), br = n(gt / 6), _r = 0.5 * gt * (1 + Qt) - et, zr = pt / (ar * br) - lt, nn = Qt ? -0.25 * gt * Jt / Qt : 0, pn = 0.5 * (1 + Qt), Cn = (1 + 0.5 * pt * Yt / ar) / (ar * br), On = pt / ar * (pr / 6) / (br * br), Vn = nn * On - Cn * pn, zn = (_r * On - zr * pn) / Vn, ma = (zr * nn - _r * Cn) / Vn;
            if (pt -= zn, gt -= ma, x(zn) < a && x(ma) < a)
              break;
          }
          return [je < 0 ? -gt : gt, Ye < 0 ? -pt : pt];
        }, rn.invert = function(je, Ye) {
          var et = i(je) * y, lt = Ye / 2, gt = 50;
          do {
            var pt = et * et, St = lt * lt, Jt = et * lt, Qt = et * (0.975534 + St * (-0.0143059 * pt - 0.119161 + -0.0547009 * St)) - je, Yt = lt * (1.00384 + pt * (0.0802894 + -0.02855 * St + 199025e-9 * pt) + St * (0.0998909 + -0.0491032 * St)) - Ye, ar = 0.975534 - St * (0.119161 + 3 * pt * 0.0143059 + 0.0547009 * St), pr = -Jt * (0.238322 + 0.2188036 * St + 0.0286118 * pt), br = Jt * (0.1605788 + 7961e-7 * pt + -0.0571 * St), _r = 1.00384 + pt * (0.0802894 + 199025e-9 * pt) + St * (3 * (0.0998909 - 0.02855 * pt) - 0.245516 * St), zr = pr * br - _r * ar, nn = (Yt * pr - Qt * _r) / zr, pn = (Qt * br - Yt * ar) / zr;
            et -= nn, lt -= pn;
          } while ((x(nn) > a || x(pn) > a) && --gt > 0);
          return gt && [et, lt];
        }, vn.invert = function(je, Ye) {
          var et = je * je, lt = Ye * Ye + 1, gt = et + lt, pt = je ? b * E((gt - E(gt * gt - 4 * et)) / et) : 1 / E(lt);
          return [P(je * pt), i(Ye) * S(pt)];
        }, $n.invert = function(je, Ye) {
          return [je, 2.5 * e(s(0.8 * Ye)) - 0.625 * y];
        };
        var tn = [[0.9972523, 0], [52513e-7, -41175e-7], [74606e-7, 48125e-7], [-0.0153783, -0.1968253], [0.0636871, -0.1408027], [0.3660976, -0.2937382]], mn = [[0.98879, 0], [0, 0], [-0.050909, 0], [0, 0], [0.075528, 0]], Qr = [[0.984299, 0], [0.0211642, 37608e-7], [-0.1036018, -0.0575102], [-0.0329095, -0.0320119], [0.0499471, 0.1223335], [0.026046, 0.0899805], [7388e-7, -0.1435792], [75848e-7, -0.1334108], [-0.0216473, 0.0776645], [-0.0225161, 0.0853673]], cn = [[0.9245, 0], [0, 0], [0.01943, 0]], Hn = [[0.721316, 0], [0, 0], [-881625e-8, -617325e-8]];
        function _n(je, Ye) {
          var et = g.geoProjection(Br(je)).rotate(Ye).clipAngle(90), lt = g.geoRotation(Ye), gt = et.center;
          return delete et.rotate, et.center = function(pt) {
            return arguments.length ? gt(lt(pt)) : lt.invert(gt());
          }, et;
        }
        var En = E(6), aa = E(7);
        function tr(je, Ye) {
          var et = P(7 * p(Ye) / (3 * En));
          return [En * je * (2 * n(2 * et / 3) - 1) / aa, 9 * p(et / 3) / aa];
        }
        function mr(je, Ye) {
          for (var et, lt = (1 + b) * p(Ye), gt = Ye, pt = 0; pt < 25 && (gt -= et = (p(gt / 2) + p(gt) - lt) / (0.5 * n(gt / 2) + n(gt)), !(x(et) < a)); pt++)
            ;
          return [je * (1 + 2 * n(gt) / n(gt / 2)) / (3 * w), 2 * E(3) * p(gt / 2) / E(2 + w)];
        }
        function Ct(je, Ye) {
          for (var et, lt = E(6 / (4 + y)), gt = (1 + y / 4) * p(Ye), pt = Ye / 2, St = 0; St < 25 && (pt -= et = (pt / 2 + p(pt) - gt) / (0.5 + n(pt)), !(x(et) < a)); St++)
            ;
          return [lt * (0.5 + n(pt)) * je / 1.5, lt * pt];
        }
        function or(je, Ye) {
          var et = Ye * Ye, lt = et * et, gt = et * lt;
          return [je * (0.84719 - 0.13063 * et + gt * gt * (0.05494 * et - 0.04515 - 0.02326 * lt + 331e-5 * gt)), Ye * (1.01183 + lt * lt * (0.01926 * et - 0.02625 - 396e-5 * lt))];
        }
        function hr(je, Ye) {
          return [je * (1 + n(Ye)) / 2, 2 * (Ye - c(Ye / 2))];
        }
        tr.invert = function(je, Ye) {
          var et = 3 * P(Ye * aa / 9);
          return [je * aa / (En * (2 * n(2 * et / 3) - 1)), P(3 * p(et) * En / 7)];
        }, mr.invert = function(je, Ye) {
          var et = Ye * E(2 + w) / (2 * E(3)), lt = 2 * P(et);
          return [3 * w * je / (1 + 2 * n(lt) / n(lt / 2)), P((et + p(lt)) / (1 + b))];
        }, Ct.invert = function(je, Ye) {
          var et = E(6 / (4 + y)), lt = Ye / et;
          return x(x(lt) - f) < a && (lt = lt < 0 ? -f : f), [1.5 * je / (et * (0.5 + n(lt))), P((lt / 2 + p(lt)) / (1 + y / 4))];
        }, or.invert = function(je, Ye) {
          var et, lt, gt, pt, St = Ye, Jt = 25;
          do
            St -= et = (St * (1.01183 + (gt = (lt = St * St) * lt) * gt * (0.01926 * lt - 0.02625 - 396e-5 * gt)) - Ye) / (1.01183 + gt * gt * (0.21186 * lt - 0.23625 + -0.05148 * gt));
          while (x(et) > 1e-12 && --Jt > 0);
          return [je / (0.84719 - 0.13063 * (lt = St * St) + (pt = lt * (gt = lt * lt)) * pt * (0.05494 * lt - 0.04515 - 0.02326 * gt + 331e-5 * pt)), St];
        }, hr.invert = function(je, Ye) {
          for (var et = Ye / 2, lt = 0, gt = 1 / 0; lt < 10 && x(gt) > a; ++lt) {
            var pt = n(Ye / 2);
            Ye -= gt = (Ye - c(Ye / 2) - et) / (1 - 0.5 / (pt * pt));
          }
          return [2 * je / (1 + n(Ye)), Ye];
        };
        var Rr = [[[[-180, 0], [-90, 90], [0, 0]], [[0, 0], [90, 90], [180, 0]]], [[[-180, 0], [-90, -90], [0, 0]], [[0, 0], [90, -90], [180, 0]]]];
        function Dr(je, Ye) {
          var et = p(Ye), lt = n(Ye), gt = i(je);
          if (je === 0 || x(Ye) === f)
            return [0, Ye];
          if (Ye === 0)
            return [je, 0];
          if (x(je) === f)
            return [je * lt, f * et];
          var pt = y / (2 * je) - 2 * je / y, St = 2 * Ye / y, Jt = (1 - St * St) / (et - St), Qt = pt * pt, Yt = Jt * Jt, ar = 1 + Qt / Yt, pr = 1 + Yt / Qt, br = (pt * et / Jt - pt / 2) / ar, _r = (Yt * et / Qt + Jt / 2) / pr, zr = _r * _r - (Yt * et * et / Qt + Jt * et - 1) / pr;
          return [f * (br + E(br * br + lt * lt / ar) * gt), f * (_r + E(zr < 0 ? 0 : zr) * i(-Ye * pt) * gt)];
        }
        Dr.invert = function(je, Ye) {
          var et = (je /= f) * je, lt = et + (Ye /= f) * Ye, gt = y * y;
          return [je ? (lt - 1 + E((1 - lt) * (1 - lt) + 4 * et)) / (2 * je) * f : 0, ee(function(pt) {
            return lt * (y * p(pt) - 2 * pt) * y + 4 * pt * pt * (Ye - p(pt)) + 2 * y * pt - gt * Ye;
          }, 0)];
        };
        function Or(je, Ye) {
          var et = Ye * Ye;
          return [je, Ye * (1.0148 + et * et * (0.23185 + et * (0.02406 * et - 0.14499)))];
        }
        function Ar(je, Ye) {
          if (x(Ye) < a)
            return [je, 0];
          var et = c(Ye), lt = je * p(Ye);
          return [p(lt) / et, Ye + (1 - n(lt)) / et];
        }
        function vr(je, Ye) {
          var et = wr(je[1], je[0]), lt = wr(Ye[1], Ye[0]), gt = function(St, Jt) {
            return r(St[0] * Jt[1] - St[1] * Jt[0], St[0] * Jt[0] + St[1] * Jt[1]);
          }(et, lt), pt = Er(et) / Er(lt);
          return xr([1, 0, je[0][0], 0, 1, je[0][1]], xr([pt, 0, 0, 0, pt, 0], xr([n(gt), p(gt), 0, -p(gt), n(gt), 0], [1, 0, -Ye[0][0], 0, 1, -Ye[0][1]])));
        }
        function xr(je, Ye) {
          return [je[0] * Ye[0] + je[1] * Ye[3], je[0] * Ye[1] + je[1] * Ye[4], je[0] * Ye[2] + je[1] * Ye[5] + je[2], je[3] * Ye[0] + je[4] * Ye[3], je[3] * Ye[1] + je[4] * Ye[4], je[3] * Ye[2] + je[4] * Ye[5] + je[5]];
        }
        function wr(je, Ye) {
          return [je[0] - Ye[0], je[1] - Ye[1]];
        }
        function Er(je) {
          return E(je[0] * je[0] + je[1] * je[1]);
        }
        function Hr(je, Ye, et) {
          function lt(St, Jt) {
            var Qt, Yt = Ye(St, Jt), ar = Yt.project([St * A, Jt * A]);
            return (Qt = Yt.transform) ? [Qt[0] * ar[0] + Qt[1] * ar[1] + Qt[2], -(Qt[3] * ar[0] + Qt[4] * ar[1] + Qt[5])] : (ar[1] = -ar[1], ar);
          }
          (function St(Jt, Qt) {
            if (Jt.edges = function(zr) {
              for (var nn = zr.length, pn = [], Cn = zr[nn - 1], On = 0; On < nn; ++On)
                pn.push([Cn, Cn = zr[On]]);
              return pn;
            }(Jt.face), Qt.face) {
              var Yt = Jt.shared = function(zr, nn) {
                for (var pn, Cn, On = zr.length, Vn = null, zn = 0; zn < On; ++zn) {
                  pn = zr[zn];
                  for (var ma = nn.length; --ma >= 0; )
                    if (Cn = nn[ma], pn[0] === Cn[0] && pn[1] === Cn[1]) {
                      if (Vn)
                        return [Vn, pn];
                      Vn = pn;
                    }
                }
              }(Jt.face, Qt.face), ar = vr(Yt.map(Qt.project), Yt.map(Jt.project));
              Jt.transform = Qt.transform ? xr(Qt.transform, ar) : ar;
              for (var pr = Qt.edges, br = 0, _r = pr.length; br < _r; ++br)
                Vr(Yt[0], pr[br][1]) && Vr(Yt[1], pr[br][0]) && (pr[br] = Jt), Vr(Yt[0], pr[br][0]) && Vr(Yt[1], pr[br][1]) && (pr[br] = Jt);
              for (pr = Jt.edges, br = 0, _r = pr.length; br < _r; ++br)
                Vr(Yt[0], pr[br][0]) && Vr(Yt[1], pr[br][1]) && (pr[br] = Qt), Vr(Yt[0], pr[br][1]) && Vr(Yt[1], pr[br][0]) && (pr[br] = Qt);
            } else
              Jt.transform = Qt.transform;
            return Jt.children && Jt.children.forEach(function(zr) {
              St(zr, Jt);
            }), Jt;
          })(je, { transform: null }), Kr(je) && (lt.invert = function(St, Jt) {
            var Qt = function Yt(ar, pr) {
              var br = ar.project.invert, _r = ar.transform, zr = pr;
              if (_r && (_r = function(Vn) {
                var zn = 1 / (Vn[0] * Vn[4] - Vn[1] * Vn[3]);
                return [zn * Vn[4], -zn * Vn[1], zn * (Vn[1] * Vn[5] - Vn[2] * Vn[4]), -zn * Vn[3], zn * Vn[0], zn * (Vn[2] * Vn[3] - Vn[0] * Vn[5])];
              }(_r), zr = [_r[0] * zr[0] + _r[1] * zr[1] + _r[2], _r[3] * zr[0] + _r[4] * zr[1] + _r[5]]), br && ar === function(Vn) {
                return Ye(Vn[0] * I, Vn[1] * I);
              }(nn = br(zr)))
                return nn;
              for (var nn, pn = ar.children, Cn = 0, On = pn && pn.length; Cn < On; ++Cn)
                if (nn = Yt(pn[Cn], pr))
                  return nn;
            }(je, [St, -Jt]);
            return Qt && (Qt[0] *= I, Qt[1] *= I, Qt);
          });
          var gt = g.geoProjection(lt), pt = gt.stream;
          return gt.stream = function(St) {
            var Jt = gt.rotate(), Qt = pt(St), Yt = (gt.rotate([0, 0]), pt(St));
            return gt.rotate(Jt), Qt.sphere = function() {
              Yt.polygonStart(), Yt.lineStart(), function ar(pr, br, _r) {
                var zr, nn, pn = br.edges, Cn = pn.length, On = { type: "MultiPoint", coordinates: br.face }, Vn = br.face.filter(function(_i) {
                  return x(_i[1]) !== 90;
                }), zn = g.geoBounds({ type: "MultiPoint", coordinates: Vn }), ma = !1, Ma = -1, Na = zn[1][0] - zn[0][0], Ba = Na === 180 || Na === 360 ? [(zn[0][0] + zn[1][0]) / 2, (zn[0][1] + zn[1][1]) / 2] : g.geoCentroid(On);
                if (_r)
                  for (; ++Ma < Cn && pn[Ma] !== _r; )
                    ;
                ++Ma;
                for (var ja = 0; ja < Cn; ++ja)
                  nn = pn[(ja + Ma) % Cn], Array.isArray(nn) ? (ma || (pr.point((zr = g.geoInterpolate(nn[0], Ba)(a))[0], zr[1]), ma = !0), pr.point((zr = g.geoInterpolate(nn[1], Ba)(a))[0], zr[1])) : (ma = !1, nn !== _r && ar(pr, nn, br));
              }(Yt, je), Yt.lineEnd(), Yt.polygonEnd();
            }, Qt;
          }, gt.angle(et == null ? -30 : et * A);
        }
        function Vr(je, Ye) {
          return je && Ye && je[0] === Ye[0] && je[1] === Ye[1];
        }
        function Kr(je) {
          return je.project.invert || je.children && je.children.some(Kr);
        }
        Or.invert = function(je, Ye) {
          Ye > 1.790857183 ? Ye = 1.790857183 : Ye < -1.790857183 && (Ye = -1.790857183);
          var et, lt = Ye;
          do {
            var gt = lt * lt;
            lt -= et = (lt * (1.0148 + gt * gt * (0.23185 + gt * (0.02406 * gt - 0.14499))) - Ye) / (1.0148 + gt * gt * (5 * 0.23185 + gt * (0.21654 * gt - 1.01493)));
          } while (x(et) > a);
          return [je, lt];
        }, Ar.invert = function(je, Ye) {
          if (x(Ye) < a)
            return [je, 0];
          var et, lt = je * je + Ye * Ye, gt = 0.5 * Ye, pt = 10;
          do {
            var St = c(gt), Jt = 1 / n(gt), Qt = lt - 2 * Ye * gt + gt * gt;
            gt -= et = (St * Qt + 2 * (gt - Ye)) / (2 + Qt * Jt * Jt + 2 * (gt - Ye) * St);
          } while (x(et) > a && --pt > 0);
          return St = c(gt), [(x(Ye) < x(gt + 1 / St) ? P(je * St) : i(Ye) * i(je) * (S(x(je * St)) + f)) / p(gt), gt];
        };
        var en = [[0, 90], [-90, 0], [0, 0], [90, 0], [180, 0], [0, -90]], gn = [[0, 2, 1], [0, 3, 2], [5, 1, 2], [5, 2, 3], [0, 1, 4], [0, 4, 3], [5, 4, 1], [5, 3, 4]].map(function(je) {
          return je.map(function(Ye) {
            return en[Ye];
          });
        }), bn = 2 / E(3);
        function wn(je, Ye) {
          var et = ze(je, Ye);
          return [et[0] * bn, et[1]];
        }
        function Ln(je, Ye) {
          for (var et = 0, lt = je.length, gt = 0; et < lt; ++et)
            gt += je[et] * Ye[et];
          return gt;
        }
        function In(je) {
          return [r(je[1], je[0]) * A, P(u(-1, o(1, je[2]))) * A];
        }
        function Yn(je) {
          var Ye = je[0] * I, et = je[1] * I, lt = n(et);
          return [lt * n(Ye), lt * p(Ye), p(et)];
        }
        function ka() {
        }
        function Ta(je, Ye) {
          return { type: "FeatureCollection", features: je.features.map(function(et) {
            return An(et, Ye);
          }) };
        }
        function An(je, Ye) {
          return { type: "Feature", id: je.id, properties: je.properties, geometry: Kn(je.geometry, Ye) };
        }
        function Kn(je, Ye) {
          if (!je)
            return null;
          if (je.type === "GeometryCollection")
            return function(lt, gt) {
              return { type: "GeometryCollection", geometries: lt.geometries.map(function(pt) {
                return Kn(pt, gt);
              }) };
            }(je, Ye);
          var et;
          switch (je.type) {
            case "Point":
            case "MultiPoint":
              et = hi;
              break;
            case "LineString":
            case "MultiLineString":
              et = Ii;
              break;
            case "Polygon":
            case "MultiPolygon":
            case "Sphere":
              et = so;
              break;
            default:
              return null;
          }
          return g.geoStream(je, Ye(et)), et.result();
        }
        wn.invert = function(je, Ye) {
          return ze.invert(je / bn, Ye);
        };
        var Xn = [], Ia = [], hi = { point: function(je, Ye) {
          Xn.push([je, Ye]);
        }, result: function() {
          var je = Xn.length ? Xn.length < 2 ? { type: "Point", coordinates: Xn[0] } : { type: "MultiPoint", coordinates: Xn } : null;
          return Xn = [], je;
        } }, Ii = { lineStart: ka, point: function(je, Ye) {
          Xn.push([je, Ye]);
        }, lineEnd: function() {
          Xn.length && (Ia.push(Xn), Xn = []);
        }, result: function() {
          var je = Ia.length ? Ia.length < 2 ? { type: "LineString", coordinates: Ia[0] } : { type: "MultiLineString", coordinates: Ia } : null;
          return Ia = [], je;
        } }, so = { polygonStart: ka, lineStart: ka, point: function(je, Ye) {
          Xn.push([je, Ye]);
        }, lineEnd: function() {
          var je = Xn.length;
          if (je) {
            do
              Xn.push(Xn[0].slice());
            while (++je < 4);
            Ia.push(Xn), Xn = [];
          }
        }, polygonEnd: ka, result: function() {
          if (!Ia.length)
            return null;
          var je = [], Ye = [];
          return Ia.forEach(function(et) {
            (function(lt) {
              if ((gt = lt.length) < 4)
                return !1;
              for (var gt, pt = 0, St = lt[gt - 1][1] * lt[0][0] - lt[gt - 1][0] * lt[0][1]; ++pt < gt; )
                St += lt[pt - 1][1] * lt[pt][0] - lt[pt - 1][0] * lt[pt][1];
              return St <= 0;
            })(et) ? je.push([et]) : Ye.push(et);
          }), Ye.forEach(function(et) {
            var lt = et[0];
            je.some(function(gt) {
              if (function(pt, St) {
                for (var Jt = St[0], Qt = St[1], Yt = !1, ar = 0, pr = pt.length, br = pr - 1; ar < pr; br = ar++) {
                  var _r = pt[ar], zr = _r[0], nn = _r[1], pn = pt[br], Cn = pn[0], On = pn[1];
                  nn > Qt ^ On > Qt && Jt < (Cn - zr) * (Qt - nn) / (On - nn) + zr && (Yt = !Yt);
                }
                return Yt;
              }(gt[0], lt))
                return gt.push(et), !0;
            }) || je.push([et]);
          }), Ia = [], je.length ? je.length > 1 ? { type: "MultiPolygon", coordinates: je } : { type: "Polygon", coordinates: je[0] } : null;
        } };
        function Ga(je) {
          var Ye = je(f, 0)[0] - je(-f, 0)[0];
          function et(lt, gt) {
            var pt = x(lt) < f, St = je(pt ? lt : lt > 0 ? lt - y : lt + y, gt), Jt = (St[0] - St[1]) * b, Qt = (St[0] + St[1]) * b;
            if (pt)
              return [Jt, Qt];
            var Yt = Ye * b, ar = Jt > 0 ^ Qt > 0 ? -1 : 1;
            return [ar * Jt - i(Qt) * Yt, ar * Qt - i(Jt) * Yt];
          }
          return je.invert && (et.invert = function(lt, gt) {
            var pt = (lt + gt) * b, St = (gt - lt) * b, Jt = x(pt) < 0.5 * Ye && x(St) < 0.5 * Ye;
            if (!Jt) {
              var Qt = Ye * b, Yt = pt > 0 ^ St > 0 ? -1 : 1, ar = -Yt * lt + (St > 0 ? 1 : -1) * Qt, pr = -Yt * gt + (pt > 0 ? 1 : -1) * Qt;
              pt = (-ar - pr) * b, St = (ar - pr) * b;
            }
            var br = je.invert(pt, St);
            return Jt || (br[0] += pt > 0 ? y : -y), br;
          }), g.geoProjection(et).rotate([-90, -90, 45]).clipAngle(179.999);
        }
        function Ya() {
          return Ga(Pt).scale(111.48);
        }
        function Zi(je) {
          var Ye = p(je);
          function et(lt, gt) {
            var pt = Ye ? c(lt * Ye / 2) / Ye : lt / 2;
            if (!gt)
              return [2 * pt, -je];
            var St = 2 * e(pt * p(gt)), Jt = 1 / c(gt);
            return [p(St) * Jt, gt + (1 - n(St)) * Jt - je];
          }
          return et.invert = function(lt, gt) {
            if (x(gt += je) < a)
              return [Ye ? 2 * e(Ye * lt / 2) / Ye : lt, 0];
            var pt, St = lt * lt + gt * gt, Jt = 0, Qt = 10;
            do {
              var Yt = c(Jt), ar = 1 / n(Jt), pr = St - 2 * gt * Jt + Jt * Jt;
              Jt -= pt = (Yt * pr + 2 * (Jt - gt)) / (2 + pr * ar * ar + 2 * (Jt - gt) * Yt);
            } while (x(pt) > a && --Qt > 0);
            var br = lt * (Yt = c(Jt)), _r = c(x(gt) < x(Jt + 1 / Yt) ? 0.5 * P(br) : 0.5 * S(br) + y / 4) / p(Jt);
            return [Ye ? 2 * e(Ye * _r) / Ye : 2 * _r, Jt];
          }, et;
        }
        var Fa = [[0.9986, -0.062], [1, 0], [0.9986, 0.062], [0.9954, 0.124], [0.99, 0.186], [0.9822, 0.248], [0.973, 0.31], [0.96, 0.372], [0.9427, 0.434], [0.9216, 0.4958], [0.8962, 0.5571], [0.8679, 0.6176], [0.835, 0.6769], [0.7986, 0.7346], [0.7597, 0.7903], [0.7186, 0.8435], [0.6732, 0.8936], [0.6213, 0.9394], [0.5722, 0.9761], [0.5322, 1]];
        function lo(je, Ye) {
          var et, lt = o(18, 36 * x(Ye) / y), gt = t(lt), pt = lt - gt, St = (et = Fa[gt])[0], Jt = et[1], Qt = (et = Fa[++gt])[0], Yt = et[1], ar = (et = Fa[o(19, ++gt)])[0], pr = et[1];
          return [je * (Qt + pt * (ar - St) / 2 + pt * pt * (ar - 2 * Qt + St) / 2), (Ye > 0 ? f : -f) * (Yt + pt * (pr - Jt) / 2 + pt * pt * (pr - 2 * Yt + Jt) / 2)];
        }
        function ho(je, Ye) {
          var et = function(St) {
            function Jt(Qt, Yt) {
              var ar = n(Yt), pr = (St - 1) / (St - ar * n(Qt));
              return [pr * ar * p(Qt), pr * p(Yt)];
            }
            return Jt.invert = function(Qt, Yt) {
              var ar = Qt * Qt + Yt * Yt, pr = E(ar), br = (St - E(1 - ar * (St + 1) / (St - 1))) / ((St - 1) / pr + pr / (St - 1));
              return [r(Qt * br, pr * E(1 - br * br)), pr ? P(Yt * br / pr) : 0];
            }, Jt;
          }(je);
          if (!Ye)
            return et;
          var lt = n(Ye), gt = p(Ye);
          function pt(St, Jt) {
            var Qt = et(St, Jt), Yt = Qt[1], ar = Yt * gt / (je - 1) + lt;
            return [Qt[0] * lt / ar, Yt / ar];
          }
          return pt.invert = function(St, Jt) {
            var Qt = (je - 1) / (je - 1 - Jt * gt);
            return et.invert(Qt * St, Qt * Jt * lt);
          }, pt;
        }
        Fa.forEach(function(je) {
          je[1] *= 1.0144;
        }), lo.invert = function(je, Ye) {
          var et = Ye / f, lt = 90 * et, gt = o(18, x(lt / 5)), pt = u(0, t(gt));
          do {
            var St = Fa[pt][1], Jt = Fa[pt + 1][1], Qt = Fa[o(19, pt + 2)][1], Yt = Qt - St, ar = Qt - 2 * Jt + St, pr = 2 * (x(et) - Jt) / Yt, br = ar / Yt, _r = pr * (1 - br * pr * (1 - 2 * br * pr));
            if (_r >= 0 || pt === 1) {
              lt = (Ye >= 0 ? 5 : -5) * (_r + gt);
              var zr, nn = 50;
              do
                _r = (gt = o(18, x(lt) / 5)) - (pt = t(gt)), St = Fa[pt][1], Jt = Fa[pt + 1][1], Qt = Fa[o(19, pt + 2)][1], lt -= (zr = (Ye >= 0 ? f : -f) * (Jt + _r * (Qt - St) / 2 + _r * _r * (Qt - 2 * Jt + St) / 2) - Ye) * A;
              while (x(zr) > 1e-12 && --nn > 0);
              break;
            }
          } while (--pt >= 0);
          var pn = Fa[pt][0], Cn = Fa[pt + 1][0], On = Fa[o(19, pt + 2)][0];
          return [je / (Cn + _r * (On - pn) / 2 + _r * _r * (On - 2 * Cn + pn) / 2), lt * I];
        };
        var bi = -179.9999, Xi = 179.9999, po = -89.9999;
        function To(je) {
          return je.length > 0;
        }
        function Ri(je) {
          return je === -90 || je === 90 ? [0, je] : [-180, (Ye = je, Math.floor(1e4 * Ye) / 1e4)];
          var Ye;
        }
        function pi(je) {
          var Ye = je[0], et = je[1], lt = !1;
          return Ye <= bi ? (Ye = -180, lt = !0) : Ye >= Xi && (Ye = 180, lt = !0), et <= po ? (et = -90, lt = !0) : et >= 89.9999 && (et = 90, lt = !0), lt ? [Ye, et] : je;
        }
        function Yi(je) {
          return je.map(pi);
        }
        function ds(je, Ye, et) {
          for (var lt = 0, gt = je.length; lt < gt; ++lt) {
            var pt = je[lt].slice();
            et.push({ index: -1, polygon: Ye, ring: pt });
            for (var St = 0, Jt = pt.length; St < Jt; ++St) {
              var Qt = pt[St], Yt = Qt[0], ar = Qt[1];
              if (Yt <= bi || Yt >= Xi || ar <= po || ar >= 89.9999) {
                pt[St] = pi(Qt);
                for (var pr = St + 1; pr < Jt; ++pr) {
                  var br = pt[pr], _r = br[0], zr = br[1];
                  if (_r > bi && _r < Xi && zr > po && zr < 89.9999)
                    break;
                }
                if (pr === St + 1)
                  continue;
                if (St) {
                  var nn = { index: -1, polygon: Ye, ring: pt.slice(0, St + 1) };
                  nn.ring[nn.ring.length - 1] = Ri(ar), et[et.length - 1] = nn;
                } else
                  et.pop();
                if (pr >= Jt)
                  break;
                et.push({ index: -1, polygon: Ye, ring: pt = pt.slice(pr - 1) }), pt[0] = Ri(pt[0][1]), St = -1, Jt = pt.length;
              }
            }
          }
        }
        function ys(je) {
          var Ye, et, lt, gt, pt, St, Jt = je.length, Qt = {}, Yt = {};
          for (Ye = 0; Ye < Jt; ++Ye)
            lt = (et = je[Ye]).ring[0], pt = et.ring[et.ring.length - 1], lt[0] !== pt[0] || lt[1] !== pt[1] ? (et.index = Ye, Qt[lt] = Yt[pt] = et) : (et.polygon.push(et.ring), je[Ye] = null);
          for (Ye = 0; Ye < Jt; ++Ye)
            if (et = je[Ye]) {
              if (lt = et.ring[0], pt = et.ring[et.ring.length - 1], gt = Yt[lt], St = Qt[pt], delete Qt[lt], delete Yt[pt], lt[0] === pt[0] && lt[1] === pt[1]) {
                et.polygon.push(et.ring);
                continue;
              }
              gt ? (delete Yt[lt], delete Qt[gt.ring[0]], gt.ring.pop(), je[gt.index] = null, et = { index: -1, polygon: gt.polygon, ring: gt.ring.concat(et.ring) }, gt === St ? et.polygon.push(et.ring) : (et.index = Jt++, je.push(Qt[et.ring[0]] = Yt[et.ring[et.ring.length - 1]] = et))) : St ? (delete Qt[pt], delete Yt[St.ring[St.ring.length - 1]], et.ring.pop(), et = { index: Jt++, polygon: St.polygon, ring: et.ring.concat(St.ring) }, je[St.index] = null, je.push(Qt[et.ring[0]] = Yt[et.ring[et.ring.length - 1]] = et)) : (et.ring.push(et.ring[0]), et.polygon.push(et.ring));
            }
        }
        function Wa(je) {
          var Ye = { type: "Feature", geometry: ls(je.geometry) };
          return je.id != null && (Ye.id = je.id), je.bbox != null && (Ye.bbox = je.bbox), je.properties != null && (Ye.properties = je.properties), Ye;
        }
        function ls(je) {
          if (je == null)
            return je;
          var Ye, et, lt, gt;
          switch (je.type) {
            case "GeometryCollection":
              Ye = { type: "GeometryCollection", geometries: je.geometries.map(ls) };
              break;
            case "Point":
              Ye = { type: "Point", coordinates: pi(je.coordinates) };
              break;
            case "MultiPoint":
            case "LineString":
              Ye = { type: je.type, coordinates: Yi(je.coordinates) };
              break;
            case "MultiLineString":
              Ye = { type: "MultiLineString", coordinates: je.coordinates.map(Yi) };
              break;
            case "Polygon":
              var pt = [];
              ds(je.coordinates, pt, et = []), ys(et), Ye = { type: "Polygon", coordinates: pt };
              break;
            case "MultiPolygon":
              et = [], lt = -1, gt = je.coordinates.length;
              for (var St = new Array(gt); ++lt < gt; )
                ds(je.coordinates[lt], St[lt] = [], et);
              ys(et), Ye = { type: "MultiPolygon", coordinates: St.filter(To) };
              break;
            default:
              return je;
          }
          return je.bbox != null && (Ye.bbox = je.bbox), Ye;
        }
        function Xo(je, Ye) {
          var et = c(Ye / 2), lt = p(_ * et);
          return [je * (0.74482 - 0.34588 * lt * lt), 1.70711 * et];
        }
        function xs(je, Ye, et) {
          var lt = g.geoInterpolate(Ye, et), gt = lt(0.5), pt = g.geoRotation([-gt[0], -gt[1]])(Ye), St = lt.distance / 2, Jt = -P(p(pt[1] * I) / p(St)), Qt = [-gt[0], -gt[1], -(pt[0] > 0 ? y - Jt : Jt) * A], Yt = g.geoProjection(je(St)).rotate(Qt), ar = g.geoRotation(Qt), pr = Yt.center;
          return delete Yt.rotate, Yt.center = function(br) {
            return arguments.length ? pr(ar(br)) : ar.invert(pr());
          }, Yt.clipAngle(90);
        }
        function bs(je) {
          var Ye = n(je);
          function et(lt, gt) {
            var pt = g.geoGnomonicRaw(lt, gt);
            return pt[0] *= Ye, pt;
          }
          return et.invert = function(lt, gt) {
            return g.geoGnomonicRaw.invert(lt / Ye, gt);
          }, et;
        }
        function ms(je, Ye) {
          return xs(bs, je, Ye);
        }
        function _s(je) {
          if (!(je *= 2))
            return g.geoAzimuthalEquidistantRaw;
          var Ye = -je / 2, et = -Ye, lt = je * je, gt = c(et), pt = 0.5 / p(et);
          function St(Jt, Qt) {
            var Yt = S(n(Qt) * n(Jt - Ye)), ar = S(n(Qt) * n(Jt - et));
            return [((Yt *= Yt) - (ar *= ar)) / (2 * je), (Qt < 0 ? -1 : 1) * E(4 * lt * ar - (lt - Yt + ar) * (lt - Yt + ar)) / (2 * je)];
          }
          return St.invert = function(Jt, Qt) {
            var Yt, ar, pr = Qt * Qt, br = n(E(pr + (Yt = Jt + Ye) * Yt)), _r = n(E(pr + (Yt = Jt + et) * Yt));
            return [r(ar = br - _r, Yt = (br + _r) * gt), (Qt < 0 ? -1 : 1) * S(E(Yt * Yt + ar * ar) * pt)];
          }, St;
        }
        function Ao(je, Ye) {
          return xs(_s, je, Ye);
        }
        function So(je, Ye) {
          if (x(Ye) < a)
            return [je, 0];
          var et = x(Ye / f), lt = P(et);
          if (x(je) < a || x(x(Ye) - f) < a)
            return [0, i(Ye) * y * c(lt / 2)];
          var gt = n(lt), pt = x(y / je - je / y) / 2, St = pt * pt, Jt = gt / (et + gt - 1), Qt = Jt * (2 / et - 1), Yt = Qt * Qt, ar = Yt + St, pr = Jt - Yt, br = St + Jt;
          return [i(je) * y * (pt * pr + E(St * pr * pr - ar * (Jt * Jt - Yt))) / ar, i(Ye) * y * (Qt * br - pt * E((St + 1) * ar - br * br)) / ar];
        }
        function Bo(je, Ye) {
          if (x(Ye) < a)
            return [je, 0];
          var et = x(Ye / f), lt = P(et);
          if (x(je) < a || x(x(Ye) - f) < a)
            return [0, i(Ye) * y * c(lt / 2)];
          var gt = n(lt), pt = x(y / je - je / y) / 2, St = pt * pt, Jt = gt * (E(1 + St) - pt * gt) / (1 + St * et * et);
          return [i(je) * y * Jt, i(Ye) * y * E(1 - Jt * (2 * pt + Jt))];
        }
        function No(je, Ye) {
          if (x(Ye) < a)
            return [je, 0];
          var et = Ye / f, lt = P(et);
          if (x(je) < a || x(x(Ye) - f) < a)
            return [0, y * c(lt / 2)];
          var gt = (y / je - je / y) / 2, pt = et / (1 + n(lt));
          return [y * (i(je) * E(gt * gt + 1 - pt * pt) - gt), y * pt];
        }
        function jo(je, Ye) {
          if (!Ye)
            return [je, 0];
          var et = x(Ye);
          if (!je || et === f)
            return [0, Ye];
          var lt = et / f, gt = lt * lt, pt = (8 * lt - gt * (gt + 2) - 5) / (2 * gt * (lt - 1)), St = pt * pt, Jt = lt * pt, Qt = gt + St + 2 * Jt, Yt = lt + 3 * pt, ar = je / f, pr = ar + 1 / ar, br = i(x(je) - f) * E(pr * pr - 4), _r = br * br, zr = (br * (Qt + St - 1) + 2 * E(Qt * (gt + St * _r - 1) + (1 - gt) * (gt * (Yt * Yt + 4 * St) + 12 * Jt * St + 4 * St * St))) / (4 * Qt + _r);
          return [i(je) * f * zr, i(Ye) * f * E(1 + br * x(zr) - zr * zr)];
        }
        function Jo(je, Ye, et, lt) {
          var gt = y / 3;
          je = u(je, a), Ye = u(Ye, a), je = o(je, f), Ye = o(Ye, y - a), et = u(et, 0), et = o(et, 100 - a);
          var pt = (lt = u(lt, a)) / 100, St = S((et / 100 + 1) * n(gt)) / gt, Jt = p(je) / p(St * f), Qt = Ye / y, Yt = E(pt * p(je / 2) / p(Ye / 2));
          return function(ar, pr, br, _r, zr) {
            function nn(pn, Cn) {
              var On = br * p(_r * Cn), Vn = E(1 - On * On), zn = E(2 / (1 + Vn * n(pn *= zr)));
              return [ar * Vn * zn * p(pn), pr * On * zn];
            }
            return nn.invert = function(pn, Cn) {
              var On = pn / ar, Vn = Cn / pr, zn = E(On * On + Vn * Vn), ma = 2 * P(zn / 2);
              return [r(pn * c(ma), ar * zn) / zr, zn && P(Cn * p(ma) / (pr * br * zn)) / _r];
            }, nn;
          }(Yt / E(Qt * Jt * St), 1 / (Yt * E(Qt * Jt * St)), Jt, St, Qt);
        }
        function mo() {
          var je = 65 * I, Ye = 60 * I, et = 20, lt = 200, gt = g.geoProjectionMutator(Jo), pt = gt(je, Ye, et, lt);
          return pt.poleline = function(St) {
            return arguments.length ? gt(je = +St * I, Ye, et, lt) : je * A;
          }, pt.parallels = function(St) {
            return arguments.length ? gt(je, Ye = +St * I, et, lt) : Ye * A;
          }, pt.inflation = function(St) {
            return arguments.length ? gt(je, Ye, et = +St, lt) : et;
          }, pt.ratio = function(St) {
            return arguments.length ? gt(je, Ye, et, lt = +St) : lt;
          }, pt.scale(163.775);
        }
        Xo.invert = function(je, Ye) {
          var et = Ye / 1.70711, lt = p(_ * et);
          return [je / (0.74482 - 0.34588 * lt * lt), 2 * e(et)];
        }, So.invert = function(je, Ye) {
          if (x(Ye) < a)
            return [je, 0];
          if (x(je) < a)
            return [0, f * p(2 * e(Ye / y))];
          var et = (je /= y) * je, lt = (Ye /= y) * Ye, gt = et + lt, pt = gt * gt, St = -x(Ye) * (1 + gt), Jt = St - 2 * lt + et, Qt = -2 * St + 1 + 2 * lt + pt, Yt = lt / Qt + (2 * Jt * Jt * Jt / (Qt * Qt * Qt) - 9 * St * Jt / (Qt * Qt)) / 27, ar = (St - Jt * Jt / (3 * Qt)) / Qt, pr = 2 * E(-ar / 3), br = S(3 * Yt / (ar * pr)) / 3;
          return [y * (gt - 1 + E(1 + 2 * (et - lt) + pt)) / (2 * je), i(Ye) * y * (-pr * n(br + y / 3) - Jt / (3 * Qt))];
        }, Bo.invert = function(je, Ye) {
          if (!je)
            return [0, f * p(2 * e(Ye / y))];
          var et = x(je / y), lt = (1 - et * et - (Ye /= y) * Ye) / (2 * et), gt = E(lt * lt + 1);
          return [i(je) * y * (gt - lt), i(Ye) * f * p(2 * r(E((1 - 2 * lt * et) * (lt + gt) - et), E(gt + lt + et)))];
        }, No.invert = function(je, Ye) {
          if (!Ye)
            return [je, 0];
          var et = Ye / y, lt = (y * y * (1 - et * et) - je * je) / (2 * y * je);
          return [je ? y * (i(je) * E(lt * lt + 1) - lt) : 0, f * p(2 * e(et))];
        }, jo.invert = function(je, Ye) {
          var et;
          if (!je || !Ye)
            return [je, Ye];
          Ye /= y;
          var lt = i(je) * je / f, gt = (lt * lt - 1 + 4 * Ye * Ye) / x(lt), pt = gt * gt, St = 2 * Ye, Jt = 50;
          do {
            var Qt = St * St, Yt = (8 * St - Qt * (Qt + 2) - 5) / (2 * Qt * (St - 1)), ar = (3 * St - Qt * St - 10) / (2 * Qt * St), pr = Yt * Yt, br = St * Yt, _r = St + Yt, zr = _r * _r, nn = St + 3 * Yt, pn = -2 * _r * (4 * br * pr + (1 - 4 * Qt + 3 * Qt * Qt) * (1 + ar) + pr * (14 * Qt - 6 - pt + (8 * Qt - 8 - 2 * pt) * ar) + br * (12 * Qt - 8 + (10 * Qt - 10 - pt) * ar)), Cn = E(zr * (Qt + pr * pt - 1) + (1 - Qt) * (Qt * (nn * nn + 4 * pr) + pr * (12 * br + 4 * pr)));
            St -= et = (gt * (zr + pr - 1) + 2 * Cn - lt * (4 * zr + pt)) / (gt * (2 * Yt * ar + 2 * _r * (1 + ar)) + pn / Cn - 8 * _r * (gt * (-1 + pr + zr) + 2 * Cn) * (1 + ar) / (pt + 4 * zr));
          } while (et > a && --Jt > 0);
          return [i(je) * (E(gt * gt + 4) + gt) * y / 4, f * St];
        };
        var cs = 4 * y + 3 * E(3), co = 2 * E(2 * y * E(3) / cs), Uo = te(co * E(3) / y, co, cs / 6);
        function us(je, Ye) {
          return [je * E(1 - 3 * Ye * Ye / (y * y)), Ye];
        }
        function Eo(je, Ye) {
          var et = n(Ye), lt = n(je) * et, gt = 1 - lt, pt = n(je = r(p(je) * et, -p(Ye))), St = p(je);
          return [St * (et = E(1 - lt * lt)) - pt * gt, -pt * et - St * gt];
        }
        function Ha(je, Ye) {
          var et = H(je, Ye);
          return [(et[0] + je / f) / 2, (et[1] + Ye) / 2];
        }
        us.invert = function(je, Ye) {
          return [je / E(1 - 3 * Ye * Ye / (y * y)), Ye];
        }, Eo.invert = function(je, Ye) {
          var et = (je * je + Ye * Ye) / -2, lt = E(-et * (2 + et)), gt = Ye * et + je * lt, pt = je * et - Ye * lt, St = E(pt * pt + gt * gt);
          return [r(lt * gt, St * (1 + et)), St ? -P(lt * pt / St) : 0];
        }, Ha.invert = function(je, Ye) {
          var et = je, lt = Ye, gt = 25;
          do {
            var pt, St = n(lt), Jt = p(lt), Qt = p(2 * lt), Yt = Jt * Jt, ar = St * St, pr = p(et), br = n(et / 2), _r = p(et / 2), zr = _r * _r, nn = 1 - ar * br * br, pn = nn ? S(St * br) * E(pt = 1 / nn) : pt = 0, Cn = 0.5 * (2 * pn * St * _r + et / f) - je, On = 0.5 * (pn * Jt + lt) - Ye, Vn = 0.5 * pt * (ar * zr + pn * St * br * Yt) + 0.5 / f, zn = pt * (pr * Qt / 4 - pn * Jt * _r), ma = 0.125 * pt * (Qt * _r - pn * Jt * ar * pr), Ma = 0.5 * pt * (Yt * br + pn * zr * St) + 0.5, Na = zn * ma - Ma * Vn, Ba = (On * zn - Cn * Ma) / Na, ja = (Cn * ma - On * Vn) / Na;
            et -= Ba, lt -= ja;
          } while ((x(Ba) > a || x(ja) > a) && --gt > 0);
          return [et, lt];
        }, m.geoNaturalEarth = g.geoNaturalEarth1, m.geoNaturalEarthRaw = g.geoNaturalEarth1Raw, m.geoAiry = function() {
          var je = f, Ye = g.geoProjectionMutator(j), et = Ye(je);
          return et.radius = function(lt) {
            return arguments.length ? Ye(je = lt * I) : je * A;
          }, et.scale(179.976).clipAngle(147);
        }, m.geoAiryRaw = j, m.geoAitoff = function() {
          return g.geoProjection(H).scale(152.63);
        }, m.geoAitoffRaw = H, m.geoArmadillo = function() {
          var je = 20 * I, Ye = je >= 0 ? 1 : -1, et = c(Ye * je), lt = g.geoProjectionMutator(Y), gt = lt(je), pt = gt.stream;
          return gt.parallel = function(St) {
            return arguments.length ? (et = c((Ye = (je = St * I) >= 0 ? 1 : -1) * je), lt(je)) : je * A;
          }, gt.stream = function(St) {
            var Jt = gt.rotate(), Qt = pt(St), Yt = (gt.rotate([0, 0]), pt(St)), ar = gt.precision();
            return gt.rotate(Jt), Qt.sphere = function() {
              Yt.polygonStart(), Yt.lineStart();
              for (var pr = -180 * Ye; Ye * pr < 180; pr += 90 * Ye)
                Yt.point(pr, 90 * Ye);
              if (je)
                for (; Ye * (pr -= 3 * Ye * ar) >= -180; )
                  Yt.point(pr, Ye * -r(n(pr * I / 2), et) * A);
              Yt.lineEnd(), Yt.polygonEnd();
            }, Qt;
          }, gt.scale(218.695).center([0, 28.0974]);
        }, m.geoArmadilloRaw = Y, m.geoAugust = function() {
          return g.geoProjection(J).scale(66.1603);
        }, m.geoAugustRaw = J, m.geoBaker = function() {
          return g.geoProjection(re).scale(112.314);
        }, m.geoBakerRaw = re, m.geoBerghaus = function() {
          var je = 5, Ye = g.geoProjectionMutator(V), et = Ye(je), lt = et.stream, gt = -n(0.01 * I), pt = p(0.01 * I);
          return et.lobes = function(St) {
            return arguments.length ? Ye(je = +St) : je;
          }, et.stream = function(St) {
            var Jt = et.rotate(), Qt = lt(St), Yt = (et.rotate([0, 0]), lt(St));
            return et.rotate(Jt), Qt.sphere = function() {
              Yt.polygonStart(), Yt.lineStart();
              for (var ar = 0, pr = 360 / je, br = 2 * y / je, _r = 90 - 180 / je, zr = f; ar < je; ++ar, _r -= pr, zr -= br)
                Yt.point(r(pt * n(zr), gt) * A, P(pt * p(zr)) * A), _r < -90 ? (Yt.point(-90, -180 - _r - 0.01), Yt.point(-90, -180 - _r + 0.01)) : (Yt.point(90, _r + 0.01), Yt.point(90, _r - 0.01));
              Yt.lineEnd(), Yt.polygonEnd();
            }, Qt;
          }, et.scale(87.8076).center([0, 17.1875]).clipAngle(179.999);
        }, m.geoBerghausRaw = V, m.geoBertin1953 = function() {
          return g.geoProjection(K()).rotate([-16.5, -42]).scale(176.57).center([7.93, 0.09]);
        }, m.geoBertin1953Raw = K, m.geoBoggs = function() {
          return g.geoProjection(ve).scale(160.857);
        }, m.geoBoggsRaw = ve, m.geoBonne = function() {
          return ue(Ae).scale(123.082).center([0, 26.1441]).parallel(45);
        }, m.geoBonneRaw = Ae, m.geoBottomley = function() {
          var je = 0.5, Ye = g.geoProjectionMutator(pe), et = Ye(je);
          return et.fraction = function(lt) {
            return arguments.length ? Ye(je = +lt) : je;
          }, et.scale(158.837);
        }, m.geoBottomleyRaw = pe, m.geoBromley = function() {
          return g.geoProjection(ge).scale(152.63);
        }, m.geoBromleyRaw = ge, m.geoChamberlin = Me, m.geoChamberlinRaw = Te, m.geoChamberlinAfrica = function() {
          return Me([0, 22], [45, 22], [22.5, -22]).scale(380).center([22.5, 2]);
        }, m.geoCollignon = function() {
          return g.geoProjection(ze).scale(95.6464).center([0, 30]);
        }, m.geoCollignonRaw = ze, m.geoCraig = function() {
          return ue(Ie).scale(249.828).clipAngle(90);
        }, m.geoCraigRaw = Ie, m.geoCraster = function() {
          return g.geoProjection(Ze).scale(156.19);
        }, m.geoCrasterRaw = Ze, m.geoCylindricalEqualArea = function() {
          return ue(Fe).parallel(38.58).scale(195.044);
        }, m.geoCylindricalEqualAreaRaw = Fe, m.geoCylindricalStereographic = function() {
          return ue(Pe).scale(124.75);
        }, m.geoCylindricalStereographicRaw = Pe, m.geoEckert1 = function() {
          return g.geoProjection(De).scale(165.664);
        }, m.geoEckert1Raw = De, m.geoEckert2 = function() {
          return g.geoProjection(Ge).scale(165.664);
        }, m.geoEckert2Raw = Ge, m.geoEckert3 = function() {
          return g.geoProjection(Qe).scale(180.739);
        }, m.geoEckert3Raw = Qe, m.geoEckert4 = function() {
          return g.geoProjection(ot).scale(180.739);
        }, m.geoEckert4Raw = ot, m.geoEckert5 = function() {
          return g.geoProjection(vt).scale(173.044);
        }, m.geoEckert5Raw = vt, m.geoEckert6 = function() {
          return g.geoProjection(bt).scale(173.044);
        }, m.geoEckert6Raw = bt, m.geoEisenlohr = function() {
          return g.geoProjection(tt).scale(62.5271);
        }, m.geoEisenlohrRaw = tt, m.geoFahey = function() {
          return g.geoProjection(mt).scale(137.152);
        }, m.geoFaheyRaw = mt, m.geoFoucaut = function() {
          return g.geoProjection(Ft).scale(135.264);
        }, m.geoFoucautRaw = Ft, m.geoFoucautSinusoidal = function() {
          var je = 0.5, Ye = g.geoProjectionMutator(Vt), et = Ye(je);
          return et.alpha = function(lt) {
            return arguments.length ? Ye(je = +lt) : je;
          }, et.scale(168.725);
        }, m.geoFoucautSinusoidalRaw = Vt, m.geoGilbert = function(je) {
          je == null && (je = g.geoOrthographic);
          var Ye = je(), et = g.geoEquirectangular().scale(A).precision(0).clipAngle(null).translate([0, 0]);
          function lt(pt) {
            return Ye(Xt(pt));
          }
          function gt(pt) {
            lt[pt] = function() {
              return arguments.length ? (Ye[pt].apply(Ye, arguments), lt) : Ye[pt]();
            };
          }
          return Ye.invert && (lt.invert = function(pt) {
            return Gt(Ye.invert(pt));
          }), lt.stream = function(pt) {
            var St = Ye.stream(pt), Jt = et.stream({ point: function(Qt, Yt) {
              St.point(Qt / 2, P(c(-Yt / 2 * I)) * A);
            }, lineStart: function() {
              St.lineStart();
            }, lineEnd: function() {
              St.lineEnd();
            }, polygonStart: function() {
              St.polygonStart();
            }, polygonEnd: function() {
              St.polygonEnd();
            } });
            return Jt.sphere = St.sphere, Jt;
          }, lt.rotate = function(pt) {
            return arguments.length ? (et.rotate(pt), lt) : et.rotate();
          }, lt.center = function(pt) {
            return arguments.length ? (Ye.center(Xt(pt)), lt) : Gt(Ye.center());
          }, gt("angle"), gt("clipAngle"), gt("clipExtent"), gt("fitExtent"), gt("fitHeight"), gt("fitSize"), gt("fitWidth"), gt("scale"), gt("translate"), gt("precision"), lt.scale(249.5);
        }, m.geoGingery = function() {
          var je = 6, Ye = 30 * I, et = n(Ye), lt = p(Ye), gt = g.geoProjectionMutator(nr), pt = gt(Ye, je), St = pt.stream, Jt = -n(0.01 * I), Qt = p(0.01 * I);
          return pt.radius = function(Yt) {
            return arguments.length ? (et = n(Ye = Yt * I), lt = p(Ye), gt(Ye, je)) : Ye * A;
          }, pt.lobes = function(Yt) {
            return arguments.length ? gt(Ye, je = +Yt) : je;
          }, pt.stream = function(Yt) {
            var ar = pt.rotate(), pr = St(Yt), br = (pt.rotate([0, 0]), St(Yt));
            return pt.rotate(ar), pr.sphere = function() {
              br.polygonStart(), br.lineStart();
              for (var _r = 0, zr = 2 * y / je, nn = 0; _r < je; ++_r, nn -= zr)
                br.point(r(Qt * n(nn), Jt) * A, P(Qt * p(nn)) * A), br.point(r(lt * n(nn - zr / 2), et) * A, P(lt * p(nn - zr / 2)) * A);
              br.lineEnd(), br.polygonEnd();
            }, pr;
          }, pt.rotate([90, -40]).scale(91.7095).clipAngle(179.999);
        }, m.geoGingeryRaw = nr, m.geoGinzburg4 = function() {
          return g.geoProjection(he).scale(149.995);
        }, m.geoGinzburg4Raw = he, m.geoGinzburg5 = function() {
          return g.geoProjection(be).scale(153.93);
        }, m.geoGinzburg5Raw = be, m.geoGinzburg6 = function() {
          return g.geoProjection(Re).scale(130.945);
        }, m.geoGinzburg6Raw = Re, m.geoGinzburg8 = function() {
          return g.geoProjection(Ue).scale(131.747);
        }, m.geoGinzburg8Raw = Ue, m.geoGinzburg9 = function() {
          return g.geoProjection(Xe).scale(131.087);
        }, m.geoGinzburg9Raw = Xe, m.geoGringorten = function() {
          return g.geoProjection(qe(st)).scale(239.75);
        }, m.geoGringortenRaw = st, m.geoGuyou = function() {
          return g.geoProjection(qe(Pt)).scale(151.496);
        }, m.geoGuyouRaw = Pt, m.geoHammer = function() {
          var je = 2, Ye = g.geoProjectionMutator(B), et = Ye(je);
          return et.coefficient = function(lt) {
            return arguments.length ? Ye(je = +lt) : je;
          }, et.scale(169.529);
        }, m.geoHammerRaw = B, m.geoHammerRetroazimuthal = function() {
          var je = 0, Ye = g.geoProjectionMutator(rt), et = Ye(je), lt = et.rotate, gt = et.stream, pt = g.geoCircle();
          return et.parallel = function(St) {
            if (!arguments.length)
              return je * A;
            var Jt = et.rotate();
            return Ye(je = St * I).rotate(Jt);
          }, et.rotate = function(St) {
            return arguments.length ? (lt.call(et, [St[0], St[1] - je * A]), pt.center([-St[0], -St[1]]), et) : ((St = lt.call(et))[1] += je * A, St);
          }, et.stream = function(St) {
            return (St = gt(St)).sphere = function() {
              St.polygonStart();
              var Jt, Qt = pt.radius(89.99)().coordinates[0], Yt = Qt.length - 1, ar = -1;
              for (St.lineStart(); ++ar < Yt; )
                St.point((Jt = Qt[ar])[0], Jt[1]);
              for (St.lineEnd(), Yt = (Qt = pt.radius(90.01)().coordinates[0]).length - 1, St.lineStart(); --ar >= 0; )
                St.point((Jt = Qt[ar])[0], Jt[1]);
              St.lineEnd(), St.polygonEnd();
            }, St;
          }, et.scale(79.4187).parallel(45).clipAngle(179.999);
        }, m.geoHammerRetroazimuthalRaw = rt, m.geoHealpix = function() {
          var je = 4, Ye = g.geoProjectionMutator(Lt), et = Ye(je), lt = et.stream;
          return et.lobes = function(gt) {
            return arguments.length ? Ye(je = +gt) : je;
          }, et.stream = function(gt) {
            var pt = et.rotate(), St = lt(gt), Jt = (et.rotate([0, 0]), lt(gt));
            return et.rotate(pt), St.sphere = function() {
              var Qt, Yt;
              g.geoStream((Qt = 180 / je, Yt = [].concat(k.range(-180, 180 + Qt / 2, Qt).map(Se), k.range(180, -180 - Qt / 2, -Qt).map(We)), { type: "Polygon", coordinates: [Qt === 180 ? Yt.map(nt) : Yt] }), Jt);
            }, St;
          }, et.scale(239.75);
        }, m.geoHealpixRaw = Lt, m.geoHill = function() {
          var je = 1, Ye = g.geoProjectionMutator(ft), et = Ye(je);
          return et.ratio = function(lt) {
            return arguments.length ? Ye(je = +lt) : je;
          }, et.scale(167.774).center([0, 18.67]);
        }, m.geoHillRaw = ft, m.geoHomolosine = function() {
          return g.geoProjection(Nt).scale(152.63);
        }, m.geoHomolosineRaw = Nt, m.geoHufnagel = function() {
          var je = 1, Ye = 0, et = 45 * I, lt = 2, gt = g.geoProjectionMutator(Zt), pt = gt(je, Ye, et, lt);
          return pt.a = function(St) {
            return arguments.length ? gt(je = +St, Ye, et, lt) : je;
          }, pt.b = function(St) {
            return arguments.length ? gt(je, Ye = +St, et, lt) : Ye;
          }, pt.psiMax = function(St) {
            return arguments.length ? gt(je, Ye, et = +St * I, lt) : et * A;
          }, pt.ratio = function(St) {
            return arguments.length ? gt(je, Ye, et, lt = +St) : lt;
          }, pt.scale(180.739);
        }, m.geoHufnagelRaw = Zt, m.geoHyperelliptical = function() {
          var je = 0, Ye = 2.5, et = 1.183136, lt = g.geoProjectionMutator(fr), gt = lt(je, Ye, et);
          return gt.alpha = function(pt) {
            return arguments.length ? lt(je = +pt, Ye, et) : je;
          }, gt.k = function(pt) {
            return arguments.length ? lt(je, Ye = +pt, et) : Ye;
          }, gt.gamma = function(pt) {
            return arguments.length ? lt(je, Ye, et = +pt) : et;
          }, gt.scale(152.63);
        }, m.geoHyperellipticalRaw = fr, m.geoInterrupt = $t, m.geoInterruptedBoggs = function() {
          return $t(ve, er).scale(160.857);
        }, m.geoInterruptedHomolosine = function() {
          return $t(Nt, cr).scale(152.63);
        }, m.geoInterruptedMollweide = function() {
          return $t(ie, gr).scale(169.529);
        }, m.geoInterruptedMollweideHemispheres = function() {
          return $t(ie, Mr).scale(169.529).rotate([20, 0]);
        }, m.geoInterruptedSinuMollweide = function() {
          return $t(Mt, Ir, N).rotate([-20, -55]).scale(164.263).center([0, -5.4036]);
        }, m.geoInterruptedSinusoidal = function() {
          return $t(ye, Fr).scale(152.63).rotate([-20, 0]);
        }, m.geoKavrayskiy7 = function() {
          return g.geoProjection(Gr).scale(158.837);
        }, m.geoKavrayskiy7Raw = Gr, m.geoLagrange = function() {
          var je = 0.5, Ye = g.geoProjectionMutator(un), et = Ye(je);
          return et.spacing = function(lt) {
            return arguments.length ? Ye(je = +lt) : je;
          }, et.scale(124.75);
        }, m.geoLagrangeRaw = un, m.geoLarrivee = function() {
          return g.geoProjection(Dn).scale(97.2672);
        }, m.geoLarriveeRaw = Dn, m.geoLaskowski = function() {
          return g.geoProjection(rn).scale(139.98);
        }, m.geoLaskowskiRaw = rn, m.geoLittrow = function() {
          return g.geoProjection(vn).scale(144.049).clipAngle(89.999);
        }, m.geoLittrowRaw = vn, m.geoLoximuthal = function() {
          return ue(xn).parallel(40).scale(158.837);
        }, m.geoLoximuthalRaw = xn, m.geoMiller = function() {
          return g.geoProjection($n).scale(108.318);
        }, m.geoMillerRaw = $n, m.geoModifiedStereographic = _n, m.geoModifiedStereographicRaw = Br, m.geoModifiedStereographicAlaska = function() {
          return _n(tn, [152, -64]).scale(1400).center([-160.908, 62.4864]).clipAngle(30).angle(7.8);
        }, m.geoModifiedStereographicGs48 = function() {
          return _n(mn, [95, -38]).scale(1e3).clipAngle(55).center([-96.5563, 38.8675]);
        }, m.geoModifiedStereographicGs50 = function() {
          return _n(Qr, [120, -45]).scale(359.513).clipAngle(55).center([-117.474, 53.0628]);
        }, m.geoModifiedStereographicMiller = function() {
          return _n(cn, [-20, -18]).scale(209.091).center([20, 16.7214]).clipAngle(82);
        }, m.geoModifiedStereographicLee = function() {
          return _n(Hn, [165, 10]).scale(250).clipAngle(130).center([-165, -10]);
        }, m.geoMollweide = function() {
          return g.geoProjection(ie).scale(169.529);
        }, m.geoMollweideRaw = ie, m.geoMtFlatPolarParabolic = function() {
          return g.geoProjection(tr).scale(164.859);
        }, m.geoMtFlatPolarParabolicRaw = tr, m.geoMtFlatPolarQuartic = function() {
          return g.geoProjection(mr).scale(188.209);
        }, m.geoMtFlatPolarQuarticRaw = mr, m.geoMtFlatPolarSinusoidal = function() {
          return g.geoProjection(Ct).scale(166.518);
        }, m.geoMtFlatPolarSinusoidalRaw = Ct, m.geoNaturalEarth2 = function() {
          return g.geoProjection(or).scale(175.295);
        }, m.geoNaturalEarth2Raw = or, m.geoNellHammer = function() {
          return g.geoProjection(hr).scale(152.63);
        }, m.geoNellHammerRaw = hr, m.geoInterruptedQuarticAuthalic = function() {
          return $t(B(1 / 0), Rr).rotate([20, 0]).scale(152.63);
        }, m.geoNicolosi = function() {
          return g.geoProjection(Dr).scale(127.267);
        }, m.geoNicolosiRaw = Dr, m.geoPatterson = function() {
          return g.geoProjection(Or).scale(139.319);
        }, m.geoPattersonRaw = Or, m.geoPolyconic = function() {
          return g.geoProjection(Ar).scale(103.74);
        }, m.geoPolyconicRaw = Ar, m.geoPolyhedral = Hr, m.geoPolyhedralButterfly = function(je) {
          je = je || function(et) {
            var lt = g.geoCentroid({ type: "MultiPoint", coordinates: et });
            return g.geoGnomonic().scale(1).translate([0, 0]).rotate([-lt[0], -lt[1]]);
          };
          var Ye = gn.map(function(et) {
            return { face: et, project: je(et) };
          });
          return [-1, 0, 0, 1, 0, 1, 4, 5].forEach(function(et, lt) {
            var gt = Ye[et];
            gt && (gt.children || (gt.children = [])).push(Ye[lt]);
          }), Hr(Ye[0], function(et, lt) {
            return Ye[et < -y / 2 ? lt < 0 ? 6 : 4 : et < 0 ? lt < 0 ? 2 : 0 : et < y / 2 ? lt < 0 ? 3 : 1 : lt < 0 ? 7 : 5];
          }).angle(-30).scale(101.858).center([0, 45]);
        }, m.geoPolyhedralCollignon = function(je) {
          je = je || function(et) {
            var lt = g.geoCentroid({ type: "MultiPoint", coordinates: et });
            return g.geoProjection(wn).translate([0, 0]).scale(1).rotate(lt[1] > 0 ? [-lt[0], 0] : [180 - lt[0], 180]);
          };
          var Ye = gn.map(function(et) {
            return { face: et, project: je(et) };
          });
          return [-1, 0, 0, 1, 0, 1, 4, 5].forEach(function(et, lt) {
            var gt = Ye[et];
            gt && (gt.children || (gt.children = [])).push(Ye[lt]);
          }), Hr(Ye[0], function(et, lt) {
            return Ye[et < -y / 2 ? lt < 0 ? 6 : 4 : et < 0 ? lt < 0 ? 2 : 0 : et < y / 2 ? lt < 0 ? 3 : 1 : lt < 0 ? 7 : 5];
          }).angle(-30).scale(121.906).center([0, 48.5904]);
        }, m.geoPolyhedralWaterman = function(je) {
          je = je || function(pt) {
            var St = pt.length === 6 ? g.geoCentroid({ type: "MultiPoint", coordinates: pt }) : pt[0];
            return g.geoGnomonic().scale(1).translate([0, 0]).rotate([-St[0], -St[1]]);
          };
          var Ye = gn.map(function(pt) {
            for (var St, Jt = pt.map(Yn), Qt = Jt.length, Yt = Jt[Qt - 1], ar = [], pr = 0; pr < Qt; ++pr)
              St = Jt[pr], ar.push(In([0.9486832980505138 * Yt[0] + 0.31622776601683794 * St[0], 0.9486832980505138 * Yt[1] + 0.31622776601683794 * St[1], 0.9486832980505138 * Yt[2] + 0.31622776601683794 * St[2]]), In([0.9486832980505138 * St[0] + 0.31622776601683794 * Yt[0], 0.9486832980505138 * St[1] + 0.31622776601683794 * Yt[1], 0.9486832980505138 * St[2] + 0.31622776601683794 * Yt[2]])), Yt = St;
            return ar;
          }), et = [], lt = [-1, 0, 0, 1, 0, 1, 4, 5];
          Ye.forEach(function(pt, St) {
            for (var Jt, Qt, Yt = gn[St], ar = Yt.length, pr = et[St] = [], br = 0; br < ar; ++br)
              Ye.push([Yt[br], pt[(2 * br + 2) % (2 * ar)], pt[(2 * br + 1) % (2 * ar)]]), lt.push(St), pr.push((Jt = Yn(pt[(2 * br + 2) % (2 * ar)]), Qt = Yn(pt[(2 * br + 1) % (2 * ar)]), [Jt[1] * Qt[2] - Jt[2] * Qt[1], Jt[2] * Qt[0] - Jt[0] * Qt[2], Jt[0] * Qt[1] - Jt[1] * Qt[0]]));
          });
          var gt = Ye.map(function(pt) {
            return { project: je(pt), face: pt };
          });
          return lt.forEach(function(pt, St) {
            var Jt = gt[pt];
            Jt && (Jt.children || (Jt.children = [])).push(gt[St]);
          }), Hr(gt[0], function(pt, St) {
            var Jt = n(St), Qt = [Jt * n(pt), Jt * p(pt), p(St)], Yt = pt < -y / 2 ? St < 0 ? 6 : 4 : pt < 0 ? St < 0 ? 2 : 0 : pt < y / 2 ? St < 0 ? 3 : 1 : St < 0 ? 7 : 5, ar = et[Yt];
            return gt[Ln(ar[0], Qt) < 0 ? 8 + 3 * Yt : Ln(ar[1], Qt) < 0 ? 8 + 3 * Yt + 1 : Ln(ar[2], Qt) < 0 ? 8 + 3 * Yt + 2 : Yt];
          }).angle(-30).scale(110.625).center([0, 45]);
        }, m.geoProject = function(je, Ye) {
          var et, lt = Ye.stream;
          if (!lt)
            throw new Error("invalid projection");
          switch (je && je.type) {
            case "Feature":
              et = An;
              break;
            case "FeatureCollection":
              et = Ta;
              break;
            default:
              et = Kn;
          }
          return et(je, lt);
        }, m.geoGringortenQuincuncial = function() {
          return Ga(st).scale(176.423);
        }, m.geoPeirceQuincuncial = Ya, m.geoPierceQuincuncial = Ya, m.geoQuantize = function(je, Ye) {
          if (!(0 <= (Ye = +Ye) && Ye <= 20))
            throw new Error("invalid digits");
          function et(Yt) {
            var ar = Yt.length, pr = 2, br = new Array(ar);
            for (br[0] = +Yt[0].toFixed(Ye), br[1] = +Yt[1].toFixed(Ye); pr < ar; )
              br[pr] = Yt[pr], ++pr;
            return br;
          }
          function lt(Yt) {
            return Yt.map(et);
          }
          function gt(Yt) {
            for (var ar = et(Yt[0]), pr = [ar], br = 1; br < Yt.length; br++) {
              var _r = et(Yt[br]);
              (_r.length > 2 || _r[0] != ar[0] || _r[1] != ar[1]) && (pr.push(_r), ar = _r);
            }
            return pr.length === 1 && Yt.length > 1 && pr.push(et(Yt[Yt.length - 1])), pr;
          }
          function pt(Yt) {
            return Yt.map(gt);
          }
          function St(Yt) {
            if (Yt == null)
              return Yt;
            var ar;
            switch (Yt.type) {
              case "GeometryCollection":
                ar = { type: "GeometryCollection", geometries: Yt.geometries.map(St) };
                break;
              case "Point":
                ar = { type: "Point", coordinates: et(Yt.coordinates) };
                break;
              case "MultiPoint":
                ar = { type: Yt.type, coordinates: lt(Yt.coordinates) };
                break;
              case "LineString":
                ar = { type: Yt.type, coordinates: gt(Yt.coordinates) };
                break;
              case "MultiLineString":
              case "Polygon":
                ar = { type: Yt.type, coordinates: pt(Yt.coordinates) };
                break;
              case "MultiPolygon":
                ar = { type: "MultiPolygon", coordinates: Yt.coordinates.map(pt) };
                break;
              default:
                return Yt;
            }
            return Yt.bbox != null && (ar.bbox = Yt.bbox), ar;
          }
          function Jt(Yt) {
            var ar = { type: "Feature", properties: Yt.properties, geometry: St(Yt.geometry) };
            return Yt.id != null && (ar.id = Yt.id), Yt.bbox != null && (ar.bbox = Yt.bbox), ar;
          }
          if (je != null)
            switch (je.type) {
              case "Feature":
                return Jt(je);
              case "FeatureCollection":
                var Qt = { type: "FeatureCollection", features: je.features.map(Jt) };
                return je.bbox != null && (Qt.bbox = je.bbox), Qt;
              default:
                return St(je);
            }
          return je;
        }, m.geoQuincuncial = Ga, m.geoRectangularPolyconic = function() {
          return ue(Zi).scale(131.215);
        }, m.geoRectangularPolyconicRaw = Zi, m.geoRobinson = function() {
          return g.geoProjection(lo).scale(152.63);
        }, m.geoRobinsonRaw = lo, m.geoSatellite = function() {
          var je = 2, Ye = 0, et = g.geoProjectionMutator(ho), lt = et(je, Ye);
          return lt.distance = function(gt) {
            return arguments.length ? et(je = +gt, Ye) : je;
          }, lt.tilt = function(gt) {
            return arguments.length ? et(je, Ye = gt * I) : Ye * A;
          }, lt.scale(432.147).clipAngle(S(1 / je) * A - 1e-6);
        }, m.geoSatelliteRaw = ho, m.geoSinuMollweide = function() {
          return g.geoProjection(Mt).rotate([-20, -55]).scale(164.263).center([0, -5.4036]);
        }, m.geoSinuMollweideRaw = Mt, m.geoSinusoidal = function() {
          return g.geoProjection(ye).scale(152.63);
        }, m.geoSinusoidalRaw = ye, m.geoStitch = function(je) {
          if (je == null)
            return je;
          switch (je.type) {
            case "Feature":
              return Wa(je);
            case "FeatureCollection":
              var Ye = { type: "FeatureCollection", features: je.features.map(Wa) };
              return je.bbox != null && (Ye.bbox = je.bbox), Ye;
            default:
              return ls(je);
          }
        }, m.geoTimes = function() {
          return g.geoProjection(Xo).scale(146.153);
        }, m.geoTimesRaw = Xo, m.geoTwoPointAzimuthal = ms, m.geoTwoPointAzimuthalRaw = bs, m.geoTwoPointAzimuthalUsa = function() {
          return ms([-158, 21.5], [-77, 39]).clipAngle(60).scale(400);
        }, m.geoTwoPointEquidistant = Ao, m.geoTwoPointEquidistantRaw = _s, m.geoTwoPointEquidistantUsa = function() {
          return Ao([-158, 21.5], [-77, 39]).clipAngle(130).scale(122.571);
        }, m.geoVanDerGrinten = function() {
          return g.geoProjection(So).scale(79.4183);
        }, m.geoVanDerGrintenRaw = So, m.geoVanDerGrinten2 = function() {
          return g.geoProjection(Bo).scale(79.4183);
        }, m.geoVanDerGrinten2Raw = Bo, m.geoVanDerGrinten3 = function() {
          return g.geoProjection(No).scale(79.4183);
        }, m.geoVanDerGrinten3Raw = No, m.geoVanDerGrinten4 = function() {
          return g.geoProjection(jo).scale(127.16);
        }, m.geoVanDerGrinten4Raw = jo, m.geoWagner = mo, m.geoWagner7 = function() {
          return mo().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633);
        }, m.geoWagnerRaw = Jo, m.geoWagner4 = function() {
          return g.geoProjection(Uo).scale(176.84);
        }, m.geoWagner4Raw = Uo, m.geoWagner6 = function() {
          return g.geoProjection(us).scale(152.63);
        }, m.geoWagner6Raw = us, m.geoWiechel = function() {
          return g.geoProjection(Eo).rotate([0, -90, 45]).scale(124.75).clipAngle(179.999);
        }, m.geoWiechelRaw = Eo, m.geoWinkel3 = function() {
          return g.geoProjection(Ha).scale(158.837);
        }, m.geoWinkel3Raw = Ha, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-array": 107, "d3-geo": 114 }], 114: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-array")) : g((m = m || self).d3 = m.d3 || {}, m.d3);
      })(this, function(m, g) {
        function k() {
          return new x();
        }
        function x() {
          this.reset();
        }
        x.prototype = { constructor: x, reset: function() {
          this.s = this.t = 0;
        }, add: function(ht) {
          r(e, ht, this.t), r(this, e.s, this.s), this.s ? this.t += e.t : this.s = e.t;
        }, valueOf: function() {
          return this.s;
        } };
        var e = new x();
        function r(ht, zt, sr) {
          var Ht = ht.s = zt + sr, lr = Ht - zt, Pr = Ht - lr;
          ht.t = zt - Pr + (sr - lr);
        }
        var n = 1e-6, s = Math.PI, t = s / 2, d = s / 4, u = 2 * s, o = 180 / s, h = s / 180, l = Math.abs, i = Math.atan, p = Math.atan2, c = Math.cos, a = Math.ceil, y = Math.exp, f = Math.log, _ = Math.pow, b = Math.sin, w = Math.sign || function(ht) {
          return ht > 0 ? 1 : ht < 0 ? -1 : 0;
        }, T = Math.sqrt, L = Math.tan;
        function A(ht) {
          return ht > 1 ? 0 : ht < -1 ? s : Math.acos(ht);
        }
        function I(ht) {
          return ht > 1 ? t : ht < -1 ? -t : Math.asin(ht);
        }
        function P(ht) {
          return (ht = b(ht / 2)) * ht;
        }
        function S() {
        }
        function E(ht, zt) {
          ht && z.hasOwnProperty(ht.type) && z[ht.type](ht, zt);
        }
        var R = { Feature: function(ht, zt) {
          E(ht.geometry, zt);
        }, FeatureCollection: function(ht, zt) {
          for (var sr = ht.features, Ht = -1, lr = sr.length; ++Ht < lr; )
            E(sr[Ht].geometry, zt);
        } }, z = { Sphere: function(ht, zt) {
          zt.sphere();
        }, Point: function(ht, zt) {
          ht = ht.coordinates, zt.point(ht[0], ht[1], ht[2]);
        }, MultiPoint: function(ht, zt) {
          for (var sr = ht.coordinates, Ht = -1, lr = sr.length; ++Ht < lr; )
            ht = sr[Ht], zt.point(ht[0], ht[1], ht[2]);
        }, LineString: function(ht, zt) {
          j(ht.coordinates, zt, 0);
        }, MultiLineString: function(ht, zt) {
          for (var sr = ht.coordinates, Ht = -1, lr = sr.length; ++Ht < lr; )
            j(sr[Ht], zt, 0);
        }, Polygon: function(ht, zt) {
          H(ht.coordinates, zt);
        }, MultiPolygon: function(ht, zt) {
          for (var sr = ht.coordinates, Ht = -1, lr = sr.length; ++Ht < lr; )
            H(sr[Ht], zt);
        }, GeometryCollection: function(ht, zt) {
          for (var sr = ht.geometries, Ht = -1, lr = sr.length; ++Ht < lr; )
            E(sr[Ht], zt);
        } };
        function j(ht, zt, sr) {
          var Ht, lr = -1, Pr = ht.length - sr;
          for (zt.lineStart(); ++lr < Pr; )
            Ht = ht[lr], zt.point(Ht[0], Ht[1], Ht[2]);
          zt.lineEnd();
        }
        function H(ht, zt) {
          var sr = -1, Ht = ht.length;
          for (zt.polygonStart(); ++sr < Ht; )
            j(ht[sr], zt, 1);
          zt.polygonEnd();
        }
        function Y(ht, zt) {
          ht && R.hasOwnProperty(ht.type) ? R[ht.type](ht, zt) : E(ht, zt);
        }
        var J, W, Z, re, V, B = k(), U = k(), ee = { point: S, lineStart: S, lineEnd: S, polygonStart: function() {
          B.reset(), ee.lineStart = N, ee.lineEnd = K;
        }, polygonEnd: function() {
          var ht = +B;
          U.add(ht < 0 ? u + ht : ht), this.lineStart = this.lineEnd = this.point = S;
        }, sphere: function() {
          U.add(u);
        } };
        function N() {
          ee.point = X;
        }
        function K() {
          te(J, W);
        }
        function X(ht, zt) {
          ee.point = te, J = ht, W = zt, Z = ht *= h, re = c(zt = (zt *= h) / 2 + d), V = b(zt);
        }
        function te(ht, zt) {
          var sr = (ht *= h) - Z, Ht = sr >= 0 ? 1 : -1, lr = Ht * sr, Pr = c(zt = (zt *= h) / 2 + d), Nr = b(zt), Wr = V * Nr, sn = re * Pr + Wr * c(lr), an = Wr * Ht * b(lr);
          B.add(p(an, sn)), Z = ht, re = Pr, V = Nr;
        }
        function ie(ht) {
          return [p(ht[1], ht[0]), I(ht[2])];
        }
        function le(ht) {
          var zt = ht[0], sr = ht[1], Ht = c(sr);
          return [Ht * c(zt), Ht * b(zt), b(sr)];
        }
        function oe(ht, zt) {
          return ht[0] * zt[0] + ht[1] * zt[1] + ht[2] * zt[2];
        }
        function ve(ht, zt) {
          return [ht[1] * zt[2] - ht[2] * zt[1], ht[2] * zt[0] - ht[0] * zt[2], ht[0] * zt[1] - ht[1] * zt[0]];
        }
        function ue(ht, zt) {
          ht[0] += zt[0], ht[1] += zt[1], ht[2] += zt[2];
        }
        function ye(ht, zt) {
          return [ht[0] * zt, ht[1] * zt, ht[2] * zt];
        }
        function Ae(ht) {
          var zt = T(ht[0] * ht[0] + ht[1] * ht[1] + ht[2] * ht[2]);
          ht[0] /= zt, ht[1] /= zt, ht[2] /= zt;
        }
        var pe, ge, we, se, de, Te, Ee, Me, ze, Ie, Oe, Ze, Fe, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke, mt, Ft, Vt, Xt = k(), Gt = { point: nr, lineStart: Be, lineEnd: He, polygonStart: function() {
          Gt.point = he, Gt.lineStart = be, Gt.lineEnd = Re, Xt.reset(), ee.polygonStart();
        }, polygonEnd: function() {
          ee.polygonEnd(), Gt.point = nr, Gt.lineStart = Be, Gt.lineEnd = He, B < 0 ? (pe = -(we = 180), ge = -(se = 90)) : Xt > n ? se = 90 : Xt < -n && (ge = -90), Ie[0] = pe, Ie[1] = we;
        }, sphere: function() {
          pe = -(we = 180), ge = -(se = 90);
        } };
        function nr(ht, zt) {
          ze.push(Ie = [pe = ht, we = ht]), zt < ge && (ge = zt), zt > se && (se = zt);
        }
        function It(ht, zt) {
          var sr = le([ht * h, zt * h]);
          if (Me) {
            var Ht = ve(Me, sr), lr = ve([Ht[1], -Ht[0], 0], Ht);
            Ae(lr), lr = ie(lr);
            var Pr, Nr = ht - de, Wr = Nr > 0 ? 1 : -1, sn = lr[0] * o * Wr, an = l(Nr) > 180;
            an ^ (Wr * de < sn && sn < Wr * ht) ? (Pr = lr[1] * o) > se && (se = Pr) : an ^ (Wr * de < (sn = (sn + 360) % 360 - 180) && sn < Wr * ht) ? (Pr = -lr[1] * o) < ge && (ge = Pr) : (zt < ge && (ge = zt), zt > se && (se = zt)), an ? ht < de ? Ue(pe, ht) > Ue(pe, we) && (we = ht) : Ue(ht, we) > Ue(pe, we) && (pe = ht) : we >= pe ? (ht < pe && (pe = ht), ht > we && (we = ht)) : ht > de ? Ue(pe, ht) > Ue(pe, we) && (we = ht) : Ue(ht, we) > Ue(pe, we) && (pe = ht);
          } else
            ze.push(Ie = [pe = ht, we = ht]);
          zt < ge && (ge = zt), zt > se && (se = zt), Me = sr, de = ht;
        }
        function Be() {
          Gt.point = It;
        }
        function He() {
          Ie[0] = pe, Ie[1] = we, Gt.point = nr, Me = null;
        }
        function he(ht, zt) {
          if (Me) {
            var sr = ht - de;
            Xt.add(l(sr) > 180 ? sr + (sr > 0 ? 360 : -360) : sr);
          } else
            Te = ht, Ee = zt;
          ee.point(ht, zt), It(ht, zt);
        }
        function be() {
          ee.lineStart();
        }
        function Re() {
          he(Te, Ee), ee.lineEnd(), l(Xt) > n && (pe = -(we = 180)), Ie[0] = pe, Ie[1] = we, Me = null;
        }
        function Ue(ht, zt) {
          return (zt -= ht) < 0 ? zt + 360 : zt;
        }
        function Xe(ht, zt) {
          return ht[0] - zt[0];
        }
        function qe(ht, zt) {
          return ht[0] <= ht[1] ? ht[0] <= zt && zt <= ht[1] : zt < ht[0] || ht[1] < zt;
        }
        var st = { sphere: S, point: it, lineStart: Pt, lineEnd: Bt, polygonStart: function() {
          st.lineStart = wt, st.lineEnd = Lt;
        }, polygonEnd: function() {
          st.lineStart = Pt, st.lineEnd = Bt;
        } };
        function it(ht, zt) {
          ht *= h;
          var sr = c(zt *= h);
          Tt(sr * c(ht), sr * b(ht), b(zt));
        }
        function Tt(ht, zt, sr) {
          ++Oe, Fe += (ht - Fe) / Oe, Pe += (zt - Pe) / Oe, De += (sr - De) / Oe;
        }
        function Pt() {
          st.point = rt;
        }
        function rt(ht, zt) {
          ht *= h;
          var sr = c(zt *= h);
          mt = sr * c(ht), Ft = sr * b(ht), Vt = b(zt), st.point = ut, Tt(mt, Ft, Vt);
        }
        function ut(ht, zt) {
          ht *= h;
          var sr = c(zt *= h), Ht = sr * c(ht), lr = sr * b(ht), Pr = b(zt), Nr = p(T((Nr = Ft * Pr - Vt * lr) * Nr + (Nr = Vt * Ht - mt * Pr) * Nr + (Nr = mt * lr - Ft * Ht) * Nr), mt * Ht + Ft * lr + Vt * Pr);
          Ze += Nr, Ge += Nr * (mt + (mt = Ht)), Qe += Nr * (Ft + (Ft = lr)), ot += Nr * (Vt + (Vt = Pr)), Tt(mt, Ft, Vt);
        }
        function Bt() {
          st.point = it;
        }
        function wt() {
          st.point = Se;
        }
        function Lt() {
          We(tt, Ke), st.point = it;
        }
        function Se(ht, zt) {
          tt = ht, Ke = zt, ht *= h, zt *= h, st.point = We;
          var sr = c(zt);
          mt = sr * c(ht), Ft = sr * b(ht), Vt = b(zt), Tt(mt, Ft, Vt);
        }
        function We(ht, zt) {
          ht *= h;
          var sr = c(zt *= h), Ht = sr * c(ht), lr = sr * b(ht), Pr = b(zt), Nr = Ft * Pr - Vt * lr, Wr = Vt * Ht - mt * Pr, sn = mt * lr - Ft * Ht, an = T(Nr * Nr + Wr * Wr + sn * sn), dn = I(an), Tn = an && -dn / an;
          vt += Tn * Nr, bt += Tn * Wr, yt += Tn * sn, Ze += dn, Ge += dn * (mt + (mt = Ht)), Qe += dn * (Ft + (Ft = lr)), ot += dn * (Vt + (Vt = Pr)), Tt(mt, Ft, Vt);
        }
        function nt(ht) {
          return function() {
            return ht;
          };
        }
        function ft(ht, zt) {
          function sr(Ht, lr) {
            return Ht = ht(Ht, lr), zt(Ht[0], Ht[1]);
          }
          return ht.invert && zt.invert && (sr.invert = function(Ht, lr) {
            return (Ht = zt.invert(Ht, lr)) && ht.invert(Ht[0], Ht[1]);
          }), sr;
        }
        function Mt(ht, zt) {
          return [l(ht) > s ? ht + Math.round(-ht / u) * u : ht, zt];
        }
        function Nt(ht, zt, sr) {
          return (ht %= u) ? zt || sr ? ft(Ut(ht), fr(zt, sr)) : Ut(ht) : zt || sr ? fr(zt, sr) : Mt;
        }
        function Zt(ht) {
          return function(zt, sr) {
            return [(zt += ht) > s ? zt - u : zt < -s ? zt + u : zt, sr];
          };
        }
        function Ut(ht) {
          var zt = Zt(ht);
          return zt.invert = Zt(-ht), zt;
        }
        function fr(ht, zt) {
          var sr = c(ht), Ht = b(ht), lr = c(zt), Pr = b(zt);
          function Nr(Wr, sn) {
            var an = c(sn), dn = c(Wr) * an, Tn = b(Wr) * an, ln = b(sn), kn = ln * sr + dn * Ht;
            return [p(Tn * lr - kn * Pr, dn * sr - ln * Ht), I(kn * lr + Tn * Pr)];
          }
          return Nr.invert = function(Wr, sn) {
            var an = c(sn), dn = c(Wr) * an, Tn = b(Wr) * an, ln = b(sn), kn = ln * lr - Tn * Pr;
            return [p(Tn * lr + ln * Pr, dn * sr + kn * Ht), I(kn * sr - dn * Ht)];
          }, Nr;
        }
        function Tr(ht) {
          function zt(sr) {
            return (sr = ht(sr[0] * h, sr[1] * h))[0] *= o, sr[1] *= o, sr;
          }
          return ht = Nt(ht[0] * h, ht[1] * h, ht.length > 2 ? ht[2] * h : 0), zt.invert = function(sr) {
            return (sr = ht.invert(sr[0] * h, sr[1] * h))[0] *= o, sr[1] *= o, sr;
          }, zt;
        }
        function ur(ht, zt, sr, Ht, lr, Pr) {
          if (sr) {
            var Nr = c(zt), Wr = b(zt), sn = Ht * sr;
            lr == null ? (lr = zt + Ht * u, Pr = zt - sn / 2) : (lr = Kt(Nr, lr), Pr = Kt(Nr, Pr), (Ht > 0 ? lr < Pr : lr > Pr) && (lr += Ht * u));
            for (var an, dn = lr; Ht > 0 ? dn > Pr : dn < Pr; dn -= sn)
              an = ie([Nr, -Wr * c(dn), -Wr * b(dn)]), ht.point(an[0], an[1]);
          }
        }
        function Kt(ht, zt) {
          (zt = le(zt))[0] -= ht, Ae(zt);
          var sr = A(-zt[1]);
          return ((-zt[2] < 0 ? -sr : sr) + u - n) % u;
        }
        function $t() {
          var ht, zt = [];
          return { point: function(sr, Ht, lr) {
            ht.push([sr, Ht, lr]);
          }, lineStart: function() {
            zt.push(ht = []);
          }, lineEnd: S, rejoin: function() {
            zt.length > 1 && zt.push(zt.pop().concat(zt.shift()));
          }, result: function() {
            var sr = zt;
            return zt = [], ht = null, sr;
          } };
        }
        function er(ht, zt) {
          return l(ht[0] - zt[0]) < n && l(ht[1] - zt[1]) < n;
        }
        function cr(ht, zt, sr, Ht) {
          this.x = ht, this.z = zt, this.o = sr, this.e = Ht, this.v = !1, this.n = this.p = null;
        }
        function gr(ht, zt, sr, Ht, lr) {
          var Pr, Nr, Wr = [], sn = [];
          if (ht.forEach(function(Rn) {
            if (!((Un = Rn.length - 1) <= 0)) {
              var Un, ia, Zr = Rn[0], ta = Rn[Un];
              if (er(Zr, ta)) {
                if (!Zr[2] && !ta[2]) {
                  for (lr.lineStart(), Pr = 0; Pr < Un; ++Pr)
                    lr.point((Zr = Rn[Pr])[0], Zr[1]);
                  return void lr.lineEnd();
                }
                ta[0] += 2 * n;
              }
              Wr.push(ia = new cr(Zr, Rn, null, !0)), sn.push(ia.o = new cr(Zr, null, ia, !1)), Wr.push(ia = new cr(ta, Rn, null, !1)), sn.push(ia.o = new cr(ta, null, ia, !0));
            }
          }), Wr.length) {
            for (sn.sort(zt), Mr(Wr), Mr(sn), Pr = 0, Nr = sn.length; Pr < Nr; ++Pr)
              sn[Pr].e = sr = !sr;
            for (var an, dn, Tn = Wr[0]; ; ) {
              for (var ln = Tn, kn = !0; ln.v; )
                if ((ln = ln.n) === Tn)
                  return;
              an = ln.z, lr.lineStart();
              do {
                if (ln.v = ln.o.v = !0, ln.e) {
                  if (kn)
                    for (Pr = 0, Nr = an.length; Pr < Nr; ++Pr)
                      lr.point((dn = an[Pr])[0], dn[1]);
                  else
                    Ht(ln.x, ln.n.x, 1, lr);
                  ln = ln.n;
                } else {
                  if (kn)
                    for (an = ln.p.z, Pr = an.length - 1; Pr >= 0; --Pr)
                      lr.point((dn = an[Pr])[0], dn[1]);
                  else
                    Ht(ln.x, ln.p.x, -1, lr);
                  ln = ln.p;
                }
                an = (ln = ln.o).z, kn = !kn;
              } while (!ln.v);
              lr.lineEnd();
            }
          }
        }
        function Mr(ht) {
          if (zt = ht.length) {
            for (var zt, sr, Ht = 0, lr = ht[0]; ++Ht < zt; )
              lr.n = sr = ht[Ht], sr.p = lr, lr = sr;
            lr.n = sr = ht[0], sr.p = lr;
          }
        }
        Mt.invert = Mt;
        var Ir = k();
        function Fr(ht) {
          return l(ht[0]) <= s ? ht[0] : w(ht[0]) * ((l(ht[0]) + s) % u - s);
        }
        function Gr(ht, zt) {
          var sr = Fr(zt), Ht = zt[1], lr = b(Ht), Pr = [b(sr), -c(sr), 0], Nr = 0, Wr = 0;
          Ir.reset(), lr === 1 ? Ht = t + n : lr === -1 && (Ht = -t - n);
          for (var sn = 0, an = ht.length; sn < an; ++sn)
            if (Tn = (dn = ht[sn]).length)
              for (var dn, Tn, ln = dn[Tn - 1], kn = Fr(ln), Rn = ln[1] / 2 + d, Un = b(Rn), ia = c(Rn), Zr = 0; Zr < Tn; ++Zr, kn = Pn, Un = ea, ia = wa, ln = ta) {
                var ta = dn[Zr], Pn = Fr(ta), Nn = ta[1] / 2 + d, ea = b(Nn), wa = c(Nn), La = Pn - kn, Sn = La >= 0 ? 1 : -1, za = Sn * La, Ea = za > s, da = Un * ea;
                if (Ir.add(p(da * Sn * b(za), ia * wa + da * c(za))), Nr += Ea ? La + Sn * u : La, Ea ^ kn >= sr ^ Pn >= sr) {
                  var Da = ve(le(ln), le(ta));
                  Ae(Da);
                  var Aa = ve(Pr, Da);
                  Ae(Aa);
                  var $a = (Ea ^ La >= 0 ? -1 : 1) * I(Aa[2]);
                  (Ht > $a || Ht === $a && (Da[0] || Da[1])) && (Wr += Ea ^ La >= 0 ? 1 : -1);
                }
              }
          return (Nr < -n || Nr < n && Ir < -n) ^ 1 & Wr;
        }
        function un(ht, zt, sr, Ht) {
          return function(lr) {
            var Pr, Nr, Wr, sn = zt(lr), an = $t(), dn = zt(an), Tn = !1, ln = { point: kn, lineStart: Un, lineEnd: ia, polygonStart: function() {
              ln.point = Zr, ln.lineStart = ta, ln.lineEnd = Pn, Nr = [], Pr = [];
            }, polygonEnd: function() {
              ln.point = kn, ln.lineStart = Un, ln.lineEnd = ia, Nr = g.merge(Nr);
              var Nn = Gr(Pr, Ht);
              Nr.length ? (Tn || (lr.polygonStart(), Tn = !0), gr(Nr, Dn, Nn, sr, lr)) : Nn && (Tn || (lr.polygonStart(), Tn = !0), lr.lineStart(), sr(null, null, 1, lr), lr.lineEnd()), Tn && (lr.polygonEnd(), Tn = !1), Nr = Pr = null;
            }, sphere: function() {
              lr.polygonStart(), lr.lineStart(), sr(null, null, 1, lr), lr.lineEnd(), lr.polygonEnd();
            } };
            function kn(Nn, ea) {
              ht(Nn, ea) && lr.point(Nn, ea);
            }
            function Rn(Nn, ea) {
              sn.point(Nn, ea);
            }
            function Un() {
              ln.point = Rn, sn.lineStart();
            }
            function ia() {
              ln.point = kn, sn.lineEnd();
            }
            function Zr(Nn, ea) {
              Wr.push([Nn, ea]), dn.point(Nn, ea);
            }
            function ta() {
              dn.lineStart(), Wr = [];
            }
            function Pn() {
              Zr(Wr[0][0], Wr[0][1]), dn.lineEnd();
              var Nn, ea, wa, La, Sn = dn.clean(), za = an.result(), Ea = za.length;
              if (Wr.pop(), Pr.push(Wr), Wr = null, Ea)
                if (1 & Sn) {
                  if ((ea = (wa = za[0]).length - 1) > 0) {
                    for (Tn || (lr.polygonStart(), Tn = !0), lr.lineStart(), Nn = 0; Nn < ea; ++Nn)
                      lr.point((La = wa[Nn])[0], La[1]);
                    lr.lineEnd();
                  }
                } else
                  Ea > 1 && 2 & Sn && za.push(za.pop().concat(za.shift())), Nr.push(za.filter($r));
            }
            return ln;
          };
        }
        function $r(ht) {
          return ht.length > 1;
        }
        function Dn(ht, zt) {
          return ((ht = ht.x)[0] < 0 ? ht[1] - t - n : t - ht[1]) - ((zt = zt.x)[0] < 0 ? zt[1] - t - n : t - zt[1]);
        }
        var rn = un(function() {
          return !0;
        }, function(ht) {
          var zt, sr = NaN, Ht = NaN, lr = NaN;
          return { lineStart: function() {
            ht.lineStart(), zt = 1;
          }, point: function(Pr, Nr) {
            var Wr = Pr > 0 ? s : -s, sn = l(Pr - sr);
            l(sn - s) < n ? (ht.point(sr, Ht = (Ht + Nr) / 2 > 0 ? t : -t), ht.point(lr, Ht), ht.lineEnd(), ht.lineStart(), ht.point(Wr, Ht), ht.point(Pr, Ht), zt = 0) : lr !== Wr && sn >= s && (l(sr - lr) < n && (sr -= lr * n), l(Pr - Wr) < n && (Pr -= Wr * n), Ht = function(an, dn, Tn, ln) {
              var kn, Rn, Un = b(an - Tn);
              return l(Un) > n ? i((b(dn) * (Rn = c(ln)) * b(Tn) - b(ln) * (kn = c(dn)) * b(an)) / (kn * Rn * Un)) : (dn + ln) / 2;
            }(sr, Ht, Pr, Nr), ht.point(lr, Ht), ht.lineEnd(), ht.lineStart(), ht.point(Wr, Ht), zt = 0), ht.point(sr = Pr, Ht = Nr), lr = Wr;
          }, lineEnd: function() {
            ht.lineEnd(), sr = Ht = NaN;
          }, clean: function() {
            return 2 - zt;
          } };
        }, function(ht, zt, sr, Ht) {
          var lr;
          if (ht == null)
            lr = sr * t, Ht.point(-s, lr), Ht.point(0, lr), Ht.point(s, lr), Ht.point(s, 0), Ht.point(s, -lr), Ht.point(0, -lr), Ht.point(-s, -lr), Ht.point(-s, 0), Ht.point(-s, lr);
          else if (l(ht[0] - zt[0]) > n) {
            var Pr = ht[0] < zt[0] ? s : -s;
            lr = sr * Pr / 2, Ht.point(-Pr, lr), Ht.point(0, lr), Ht.point(Pr, lr);
          } else
            Ht.point(zt[0], zt[1]);
        }, [-s, -t]);
        function vn(ht) {
          var zt = c(ht), sr = 6 * h, Ht = zt > 0, lr = l(zt) > n;
          function Pr(sn, an) {
            return c(sn) * c(an) > zt;
          }
          function Nr(sn, an, dn) {
            var Tn = [1, 0, 0], ln = ve(le(sn), le(an)), kn = oe(ln, ln), Rn = ln[0], Un = kn - Rn * Rn;
            if (!Un)
              return !dn && sn;
            var ia = zt * kn / Un, Zr = -zt * Rn / Un, ta = ve(Tn, ln), Pn = ye(Tn, ia);
            ue(Pn, ye(ln, Zr));
            var Nn = ta, ea = oe(Pn, Nn), wa = oe(Nn, Nn), La = ea * ea - wa * (oe(Pn, Pn) - 1);
            if (!(La < 0)) {
              var Sn = T(La), za = ye(Nn, (-ea - Sn) / wa);
              if (ue(za, Pn), za = ie(za), !dn)
                return za;
              var Ea, da = sn[0], Da = an[0], Aa = sn[1], $a = an[1];
              Da < da && (Ea = da, da = Da, Da = Ea);
              var ra = Da - da, Za = l(ra - s) < n;
              if (!Za && $a < Aa && (Ea = Aa, Aa = $a, $a = Ea), Za || ra < n ? Za ? Aa + $a > 0 ^ za[1] < (l(za[0] - da) < n ? Aa : $a) : Aa <= za[1] && za[1] <= $a : ra > s ^ (da <= za[0] && za[0] <= Da)) {
                var Bi = ye(Nn, (-ea + Sn) / wa);
                return ue(Bi, Pn), [za, ie(Bi)];
              }
            }
          }
          function Wr(sn, an) {
            var dn = Ht ? ht : s - ht, Tn = 0;
            return sn < -dn ? Tn |= 1 : sn > dn && (Tn |= 2), an < -dn ? Tn |= 4 : an > dn && (Tn |= 8), Tn;
          }
          return un(Pr, function(sn) {
            var an, dn, Tn, ln, kn;
            return { lineStart: function() {
              ln = Tn = !1, kn = 1;
            }, point: function(Rn, Un) {
              var ia, Zr = [Rn, Un], ta = Pr(Rn, Un), Pn = Ht ? ta ? 0 : Wr(Rn, Un) : ta ? Wr(Rn + (Rn < 0 ? s : -s), Un) : 0;
              if (!an && (ln = Tn = ta) && sn.lineStart(), ta !== Tn && (!(ia = Nr(an, Zr)) || er(an, ia) || er(Zr, ia)) && (Zr[2] = 1), ta !== Tn)
                kn = 0, ta ? (sn.lineStart(), ia = Nr(Zr, an), sn.point(ia[0], ia[1])) : (ia = Nr(an, Zr), sn.point(ia[0], ia[1], 2), sn.lineEnd()), an = ia;
              else if (lr && an && Ht ^ ta) {
                var Nn;
                Pn & dn || !(Nn = Nr(Zr, an, !0)) || (kn = 0, Ht ? (sn.lineStart(), sn.point(Nn[0][0], Nn[0][1]), sn.point(Nn[1][0], Nn[1][1]), sn.lineEnd()) : (sn.point(Nn[1][0], Nn[1][1]), sn.lineEnd(), sn.lineStart(), sn.point(Nn[0][0], Nn[0][1], 3)));
              }
              !ta || an && er(an, Zr) || sn.point(Zr[0], Zr[1]), an = Zr, Tn = ta, dn = Pn;
            }, lineEnd: function() {
              Tn && sn.lineEnd(), an = null;
            }, clean: function() {
              return kn | (ln && Tn) << 1;
            } };
          }, function(sn, an, dn, Tn) {
            ur(Tn, ht, sr, dn, sn, an);
          }, Ht ? [0, -ht] : [-s, ht - s]);
        }
        function xn(ht, zt, sr, Ht) {
          function lr(an, dn) {
            return ht <= an && an <= sr && zt <= dn && dn <= Ht;
          }
          function Pr(an, dn, Tn, ln) {
            var kn = 0, Rn = 0;
            if (an == null || (kn = Nr(an, Tn)) !== (Rn = Nr(dn, Tn)) || sn(an, dn) < 0 ^ Tn > 0)
              do
                ln.point(kn === 0 || kn === 3 ? ht : sr, kn > 1 ? Ht : zt);
              while ((kn = (kn + Tn + 4) % 4) !== Rn);
            else
              ln.point(dn[0], dn[1]);
          }
          function Nr(an, dn) {
            return l(an[0] - ht) < n ? dn > 0 ? 0 : 3 : l(an[0] - sr) < n ? dn > 0 ? 2 : 1 : l(an[1] - zt) < n ? dn > 0 ? 1 : 0 : dn > 0 ? 3 : 2;
          }
          function Wr(an, dn) {
            return sn(an.x, dn.x);
          }
          function sn(an, dn) {
            var Tn = Nr(an, 1), ln = Nr(dn, 1);
            return Tn !== ln ? Tn - ln : Tn === 0 ? dn[1] - an[1] : Tn === 1 ? an[0] - dn[0] : Tn === 2 ? an[1] - dn[1] : dn[0] - an[0];
          }
          return function(an) {
            var dn, Tn, ln, kn, Rn, Un, ia, Zr, ta, Pn, Nn, ea = an, wa = $t(), La = { point: Sn, lineStart: function() {
              La.point = za, Tn && Tn.push(ln = []), Pn = !0, ta = !1, ia = Zr = NaN;
            }, lineEnd: function() {
              dn && (za(kn, Rn), Un && ta && wa.rejoin(), dn.push(wa.result())), La.point = Sn, ta && ea.lineEnd();
            }, polygonStart: function() {
              ea = wa, dn = [], Tn = [], Nn = !0;
            }, polygonEnd: function() {
              var Ea = function() {
                for (var Aa = 0, $a = 0, ra = Tn.length; $a < ra; ++$a)
                  for (var Za, Bi, Go = Tn[$a], Oo = 1, go = Go.length, va = Go[0], di = va[0], vo = va[1]; Oo < go; ++Oo)
                    Za = di, Bi = vo, va = Go[Oo], di = va[0], vo = va[1], Bi <= Ht ? vo > Ht && (di - Za) * (Ht - Bi) > (vo - Bi) * (ht - Za) && ++Aa : vo <= Ht && (di - Za) * (Ht - Bi) < (vo - Bi) * (ht - Za) && --Aa;
                return Aa;
              }(), da = Nn && Ea, Da = (dn = g.merge(dn)).length;
              (da || Da) && (an.polygonStart(), da && (an.lineStart(), Pr(null, null, 1, an), an.lineEnd()), Da && gr(dn, Wr, Ea, Pr, an), an.polygonEnd()), ea = an, dn = Tn = ln = null;
            } };
            function Sn(Ea, da) {
              lr(Ea, da) && ea.point(Ea, da);
            }
            function za(Ea, da) {
              var Da = lr(Ea, da);
              if (Tn && ln.push([Ea, da]), Pn)
                kn = Ea, Rn = da, Un = Da, Pn = !1, Da && (ea.lineStart(), ea.point(Ea, da));
              else if (Da && ta)
                ea.point(Ea, da);
              else {
                var Aa = [ia = Math.max(-1e9, Math.min(1e9, ia)), Zr = Math.max(-1e9, Math.min(1e9, Zr))], $a = [Ea = Math.max(-1e9, Math.min(1e9, Ea)), da = Math.max(-1e9, Math.min(1e9, da))];
                (function(ra, Za, Bi, Go, Oo, go) {
                  var va, di = ra[0], vo = ra[1], Xa = 0, wi = 1, Hi = Za[0] - di, ti = Za[1] - vo;
                  if (va = Bi - di, Hi || !(va > 0)) {
                    if (va /= Hi, Hi < 0) {
                      if (va < Xa)
                        return;
                      va < wi && (wi = va);
                    } else if (Hi > 0) {
                      if (va > wi)
                        return;
                      va > Xa && (Xa = va);
                    }
                    if (va = Oo - di, Hi || !(va < 0)) {
                      if (va /= Hi, Hi < 0) {
                        if (va > wi)
                          return;
                        va > Xa && (Xa = va);
                      } else if (Hi > 0) {
                        if (va < Xa)
                          return;
                        va < wi && (wi = va);
                      }
                      if (va = Go - vo, ti || !(va > 0)) {
                        if (va /= ti, ti < 0) {
                          if (va < Xa)
                            return;
                          va < wi && (wi = va);
                        } else if (ti > 0) {
                          if (va > wi)
                            return;
                          va > Xa && (Xa = va);
                        }
                        if (va = go - vo, ti || !(va < 0)) {
                          if (va /= ti, ti < 0) {
                            if (va > wi)
                              return;
                            va > Xa && (Xa = va);
                          } else if (ti > 0) {
                            if (va < Xa)
                              return;
                            va < wi && (wi = va);
                          }
                          return Xa > 0 && (ra[0] = di + Xa * Hi, ra[1] = vo + Xa * ti), wi < 1 && (Za[0] = di + wi * Hi, Za[1] = vo + wi * ti), !0;
                        }
                      }
                    }
                  }
                })(Aa, $a, ht, zt, sr, Ht) ? (ta || (ea.lineStart(), ea.point(Aa[0], Aa[1])), ea.point($a[0], $a[1]), Da || ea.lineEnd(), Nn = !1) : Da && (ea.lineStart(), ea.point(Ea, da), Nn = !1);
              }
              ia = Ea, Zr = da, ta = Da;
            }
            return La;
          };
        }
        var $n, Br, tn, mn = k(), Qr = { sphere: S, point: S, lineStart: function() {
          Qr.point = Hn, Qr.lineEnd = cn;
        }, lineEnd: S, polygonStart: S, polygonEnd: S };
        function cn() {
          Qr.point = Qr.lineEnd = S;
        }
        function Hn(ht, zt) {
          $n = ht *= h, Br = b(zt *= h), tn = c(zt), Qr.point = _n;
        }
        function _n(ht, zt) {
          ht *= h;
          var sr = b(zt *= h), Ht = c(zt), lr = l(ht - $n), Pr = c(lr), Nr = Ht * b(lr), Wr = tn * sr - Br * Ht * Pr, sn = Br * sr + tn * Ht * Pr;
          mn.add(p(T(Nr * Nr + Wr * Wr), sn)), $n = ht, Br = sr, tn = Ht;
        }
        function En(ht) {
          return mn.reset(), Y(ht, Qr), +mn;
        }
        var aa = [null, null], tr = { type: "LineString", coordinates: aa };
        function mr(ht, zt) {
          return aa[0] = ht, aa[1] = zt, En(tr);
        }
        var Ct = { Feature: function(ht, zt) {
          return hr(ht.geometry, zt);
        }, FeatureCollection: function(ht, zt) {
          for (var sr = ht.features, Ht = -1, lr = sr.length; ++Ht < lr; )
            if (hr(sr[Ht].geometry, zt))
              return !0;
          return !1;
        } }, or = { Sphere: function() {
          return !0;
        }, Point: function(ht, zt) {
          return Rr(ht.coordinates, zt);
        }, MultiPoint: function(ht, zt) {
          for (var sr = ht.coordinates, Ht = -1, lr = sr.length; ++Ht < lr; )
            if (Rr(sr[Ht], zt))
              return !0;
          return !1;
        }, LineString: function(ht, zt) {
          return Dr(ht.coordinates, zt);
        }, MultiLineString: function(ht, zt) {
          for (var sr = ht.coordinates, Ht = -1, lr = sr.length; ++Ht < lr; )
            if (Dr(sr[Ht], zt))
              return !0;
          return !1;
        }, Polygon: function(ht, zt) {
          return Or(ht.coordinates, zt);
        }, MultiPolygon: function(ht, zt) {
          for (var sr = ht.coordinates, Ht = -1, lr = sr.length; ++Ht < lr; )
            if (Or(sr[Ht], zt))
              return !0;
          return !1;
        }, GeometryCollection: function(ht, zt) {
          for (var sr = ht.geometries, Ht = -1, lr = sr.length; ++Ht < lr; )
            if (hr(sr[Ht], zt))
              return !0;
          return !1;
        } };
        function hr(ht, zt) {
          return !(!ht || !or.hasOwnProperty(ht.type)) && or[ht.type](ht, zt);
        }
        function Rr(ht, zt) {
          return mr(ht, zt) === 0;
        }
        function Dr(ht, zt) {
          for (var sr, Ht, lr, Pr = 0, Nr = ht.length; Pr < Nr; Pr++) {
            if ((Ht = mr(ht[Pr], zt)) === 0 || Pr > 0 && (lr = mr(ht[Pr], ht[Pr - 1])) > 0 && sr <= lr && Ht <= lr && (sr + Ht - lr) * (1 - Math.pow((sr - Ht) / lr, 2)) < 1e-12 * lr)
              return !0;
            sr = Ht;
          }
          return !1;
        }
        function Or(ht, zt) {
          return !!Gr(ht.map(Ar), vr(zt));
        }
        function Ar(ht) {
          return (ht = ht.map(vr)).pop(), ht;
        }
        function vr(ht) {
          return [ht[0] * h, ht[1] * h];
        }
        function xr(ht, zt, sr) {
          var Ht = g.range(ht, zt - n, sr).concat(zt);
          return function(lr) {
            return Ht.map(function(Pr) {
              return [lr, Pr];
            });
          };
        }
        function wr(ht, zt, sr) {
          var Ht = g.range(ht, zt - n, sr).concat(zt);
          return function(lr) {
            return Ht.map(function(Pr) {
              return [Pr, lr];
            });
          };
        }
        function Er() {
          var ht, zt, sr, Ht, lr, Pr, Nr, Wr, sn, an, dn, Tn, ln = 10, kn = ln, Rn = 90, Un = 360, ia = 2.5;
          function Zr() {
            return { type: "MultiLineString", coordinates: ta() };
          }
          function ta() {
            return g.range(a(Ht / Rn) * Rn, sr, Rn).map(dn).concat(g.range(a(Wr / Un) * Un, Nr, Un).map(Tn)).concat(g.range(a(zt / ln) * ln, ht, ln).filter(function(Pn) {
              return l(Pn % Rn) > n;
            }).map(sn)).concat(g.range(a(Pr / kn) * kn, lr, kn).filter(function(Pn) {
              return l(Pn % Un) > n;
            }).map(an));
          }
          return Zr.lines = function() {
            return ta().map(function(Pn) {
              return { type: "LineString", coordinates: Pn };
            });
          }, Zr.outline = function() {
            return { type: "Polygon", coordinates: [dn(Ht).concat(Tn(Nr).slice(1), dn(sr).reverse().slice(1), Tn(Wr).reverse().slice(1))] };
          }, Zr.extent = function(Pn) {
            return arguments.length ? Zr.extentMajor(Pn).extentMinor(Pn) : Zr.extentMinor();
          }, Zr.extentMajor = function(Pn) {
            return arguments.length ? (Ht = +Pn[0][0], sr = +Pn[1][0], Wr = +Pn[0][1], Nr = +Pn[1][1], Ht > sr && (Pn = Ht, Ht = sr, sr = Pn), Wr > Nr && (Pn = Wr, Wr = Nr, Nr = Pn), Zr.precision(ia)) : [[Ht, Wr], [sr, Nr]];
          }, Zr.extentMinor = function(Pn) {
            return arguments.length ? (zt = +Pn[0][0], ht = +Pn[1][0], Pr = +Pn[0][1], lr = +Pn[1][1], zt > ht && (Pn = zt, zt = ht, ht = Pn), Pr > lr && (Pn = Pr, Pr = lr, lr = Pn), Zr.precision(ia)) : [[zt, Pr], [ht, lr]];
          }, Zr.step = function(Pn) {
            return arguments.length ? Zr.stepMajor(Pn).stepMinor(Pn) : Zr.stepMinor();
          }, Zr.stepMajor = function(Pn) {
            return arguments.length ? (Rn = +Pn[0], Un = +Pn[1], Zr) : [Rn, Un];
          }, Zr.stepMinor = function(Pn) {
            return arguments.length ? (ln = +Pn[0], kn = +Pn[1], Zr) : [ln, kn];
          }, Zr.precision = function(Pn) {
            return arguments.length ? (ia = +Pn, sn = xr(Pr, lr, 90), an = wr(zt, ht, ia), dn = xr(Wr, Nr, 90), Tn = wr(Ht, sr, ia), Zr) : ia;
          }, Zr.extentMajor([[-180, -90 + n], [180, 90 - n]]).extentMinor([[-180, -80 - n], [180, 80 + n]]);
        }
        function Hr(ht) {
          return ht;
        }
        var Vr, Kr, en, gn, bn = k(), wn = k(), Ln = { point: S, lineStart: S, lineEnd: S, polygonStart: function() {
          Ln.lineStart = In, Ln.lineEnd = Ta;
        }, polygonEnd: function() {
          Ln.lineStart = Ln.lineEnd = Ln.point = S, bn.add(l(wn)), wn.reset();
        }, result: function() {
          var ht = bn / 2;
          return bn.reset(), ht;
        } };
        function In() {
          Ln.point = Yn;
        }
        function Yn(ht, zt) {
          Ln.point = ka, Vr = en = ht, Kr = gn = zt;
        }
        function ka(ht, zt) {
          wn.add(gn * ht - en * zt), en = ht, gn = zt;
        }
        function Ta() {
          ka(Vr, Kr);
        }
        var An = 1 / 0, Kn = An, Xn = -An, Ia = Xn, hi = { point: function(ht, zt) {
          ht < An && (An = ht), ht > Xn && (Xn = ht), zt < Kn && (Kn = zt), zt > Ia && (Ia = zt);
        }, lineStart: S, lineEnd: S, polygonStart: S, polygonEnd: S, result: function() {
          var ht = [[An, Kn], [Xn, Ia]];
          return Xn = Ia = -(Kn = An = 1 / 0), ht;
        } }, Ii, so, Ga, Ya, Zi = 0, Fa = 0, lo = 0, ho = 0, bi = 0, Xi = 0, po = 0, To = 0, Ri = 0, pi = { point: Yi, lineStart: ds, lineEnd: ls, polygonStart: function() {
          pi.lineStart = Xo, pi.lineEnd = xs;
        }, polygonEnd: function() {
          pi.point = Yi, pi.lineStart = ds, pi.lineEnd = ls;
        }, result: function() {
          var ht = Ri ? [po / Ri, To / Ri] : Xi ? [ho / Xi, bi / Xi] : lo ? [Zi / lo, Fa / lo] : [NaN, NaN];
          return Zi = Fa = lo = ho = bi = Xi = po = To = Ri = 0, ht;
        } };
        function Yi(ht, zt) {
          Zi += ht, Fa += zt, ++lo;
        }
        function ds() {
          pi.point = ys;
        }
        function ys(ht, zt) {
          pi.point = Wa, Yi(Ga = ht, Ya = zt);
        }
        function Wa(ht, zt) {
          var sr = ht - Ga, Ht = zt - Ya, lr = T(sr * sr + Ht * Ht);
          ho += lr * (Ga + ht) / 2, bi += lr * (Ya + zt) / 2, Xi += lr, Yi(Ga = ht, Ya = zt);
        }
        function ls() {
          pi.point = Yi;
        }
        function Xo() {
          pi.point = bs;
        }
        function xs() {
          ms(Ii, so);
        }
        function bs(ht, zt) {
          pi.point = ms, Yi(Ii = Ga = ht, so = Ya = zt);
        }
        function ms(ht, zt) {
          var sr = ht - Ga, Ht = zt - Ya, lr = T(sr * sr + Ht * Ht);
          ho += lr * (Ga + ht) / 2, bi += lr * (Ya + zt) / 2, Xi += lr, po += (lr = Ya * ht - Ga * zt) * (Ga + ht), To += lr * (Ya + zt), Ri += 3 * lr, Yi(Ga = ht, Ya = zt);
        }
        function _s(ht) {
          this._context = ht;
        }
        _s.prototype = { _radius: 4.5, pointRadius: function(ht) {
          return this._radius = ht, this;
        }, polygonStart: function() {
          this._line = 0;
        }, polygonEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._point = 0;
        }, lineEnd: function() {
          this._line === 0 && this._context.closePath(), this._point = NaN;
        }, point: function(ht, zt) {
          switch (this._point) {
            case 0:
              this._context.moveTo(ht, zt), this._point = 1;
              break;
            case 1:
              this._context.lineTo(ht, zt);
              break;
            default:
              this._context.moveTo(ht + this._radius, zt), this._context.arc(ht, zt, this._radius, 0, u);
          }
        }, result: S };
        var Ao, So, Bo, No, jo, Jo = k(), mo = { point: S, lineStart: function() {
          mo.point = cs;
        }, lineEnd: function() {
          Ao && co(So, Bo), mo.point = S;
        }, polygonStart: function() {
          Ao = !0;
        }, polygonEnd: function() {
          Ao = null;
        }, result: function() {
          var ht = +Jo;
          return Jo.reset(), ht;
        } };
        function cs(ht, zt) {
          mo.point = co, So = No = ht, Bo = jo = zt;
        }
        function co(ht, zt) {
          No -= ht, jo -= zt, Jo.add(T(No * No + jo * jo)), No = ht, jo = zt;
        }
        function Uo() {
          this._string = [];
        }
        function us(ht) {
          return "m0," + ht + "a" + ht + "," + ht + " 0 1,1 0," + -2 * ht + "a" + ht + "," + ht + " 0 1,1 0," + 2 * ht + "z";
        }
        function Eo(ht) {
          return function(zt) {
            var sr = new Ha();
            for (var Ht in ht)
              sr[Ht] = ht[Ht];
            return sr.stream = zt, sr;
          };
        }
        function Ha() {
        }
        function je(ht, zt, sr) {
          var Ht = ht.clipExtent && ht.clipExtent();
          return ht.scale(150).translate([0, 0]), Ht != null && ht.clipExtent(null), Y(sr, ht.stream(hi)), zt(hi.result()), Ht != null && ht.clipExtent(Ht), ht;
        }
        function Ye(ht, zt, sr) {
          return je(ht, function(Ht) {
            var lr = zt[1][0] - zt[0][0], Pr = zt[1][1] - zt[0][1], Nr = Math.min(lr / (Ht[1][0] - Ht[0][0]), Pr / (Ht[1][1] - Ht[0][1])), Wr = +zt[0][0] + (lr - Nr * (Ht[1][0] + Ht[0][0])) / 2, sn = +zt[0][1] + (Pr - Nr * (Ht[1][1] + Ht[0][1])) / 2;
            ht.scale(150 * Nr).translate([Wr, sn]);
          }, sr);
        }
        function et(ht, zt, sr) {
          return Ye(ht, [[0, 0], zt], sr);
        }
        function lt(ht, zt, sr) {
          return je(ht, function(Ht) {
            var lr = +zt, Pr = lr / (Ht[1][0] - Ht[0][0]), Nr = (lr - Pr * (Ht[1][0] + Ht[0][0])) / 2, Wr = -Pr * Ht[0][1];
            ht.scale(150 * Pr).translate([Nr, Wr]);
          }, sr);
        }
        function gt(ht, zt, sr) {
          return je(ht, function(Ht) {
            var lr = +zt, Pr = lr / (Ht[1][1] - Ht[0][1]), Nr = -Pr * Ht[0][0], Wr = (lr - Pr * (Ht[1][1] + Ht[0][1])) / 2;
            ht.scale(150 * Pr).translate([Nr, Wr]);
          }, sr);
        }
        Uo.prototype = { _radius: 4.5, _circle: us(4.5), pointRadius: function(ht) {
          return (ht = +ht) !== this._radius && (this._radius = ht, this._circle = null), this;
        }, polygonStart: function() {
          this._line = 0;
        }, polygonEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._point = 0;
        }, lineEnd: function() {
          this._line === 0 && this._string.push("Z"), this._point = NaN;
        }, point: function(ht, zt) {
          switch (this._point) {
            case 0:
              this._string.push("M", ht, ",", zt), this._point = 1;
              break;
            case 1:
              this._string.push("L", ht, ",", zt);
              break;
            default:
              this._circle == null && (this._circle = us(this._radius)), this._string.push("M", ht, ",", zt, this._circle);
          }
        }, result: function() {
          if (this._string.length) {
            var ht = this._string.join("");
            return this._string = [], ht;
          }
          return null;
        } }, Ha.prototype = { constructor: Ha, point: function(ht, zt) {
          this.stream.point(ht, zt);
        }, sphere: function() {
          this.stream.sphere();
        }, lineStart: function() {
          this.stream.lineStart();
        }, lineEnd: function() {
          this.stream.lineEnd();
        }, polygonStart: function() {
          this.stream.polygonStart();
        }, polygonEnd: function() {
          this.stream.polygonEnd();
        } };
        var pt = c(30 * h);
        function St(ht, zt) {
          return +zt ? function(sr, Ht) {
            function lr(Pr, Nr, Wr, sn, an, dn, Tn, ln, kn, Rn, Un, ia, Zr, ta) {
              var Pn = Tn - Pr, Nn = ln - Nr, ea = Pn * Pn + Nn * Nn;
              if (ea > 4 * Ht && Zr--) {
                var wa = sn + Rn, La = an + Un, Sn = dn + ia, za = T(wa * wa + La * La + Sn * Sn), Ea = I(Sn /= za), da = l(l(Sn) - 1) < n || l(Wr - kn) < n ? (Wr + kn) / 2 : p(La, wa), Da = sr(da, Ea), Aa = Da[0], $a = Da[1], ra = Aa - Pr, Za = $a - Nr, Bi = Nn * ra - Pn * Za;
                (Bi * Bi / ea > Ht || l((Pn * ra + Nn * Za) / ea - 0.5) > 0.3 || sn * Rn + an * Un + dn * ia < pt) && (lr(Pr, Nr, Wr, sn, an, dn, Aa, $a, da, wa /= za, La /= za, Sn, Zr, ta), ta.point(Aa, $a), lr(Aa, $a, da, wa, La, Sn, Tn, ln, kn, Rn, Un, ia, Zr, ta));
              }
            }
            return function(Pr) {
              var Nr, Wr, sn, an, dn, Tn, ln, kn, Rn, Un, ia, Zr, ta = { point: Pn, lineStart: Nn, lineEnd: wa, polygonStart: function() {
                Pr.polygonStart(), ta.lineStart = La;
              }, polygonEnd: function() {
                Pr.polygonEnd(), ta.lineStart = Nn;
              } };
              function Pn(Ea, da) {
                Ea = sr(Ea, da), Pr.point(Ea[0], Ea[1]);
              }
              function Nn() {
                kn = NaN, ta.point = ea, Pr.lineStart();
              }
              function ea(Ea, da) {
                var Da = le([Ea, da]), Aa = sr(Ea, da);
                lr(kn, Rn, ln, Un, ia, Zr, kn = Aa[0], Rn = Aa[1], ln = Ea, Un = Da[0], ia = Da[1], Zr = Da[2], 16, Pr), Pr.point(kn, Rn);
              }
              function wa() {
                ta.point = Pn, Pr.lineEnd();
              }
              function La() {
                Nn(), ta.point = Sn, ta.lineEnd = za;
              }
              function Sn(Ea, da) {
                ea(Nr = Ea, da), Wr = kn, sn = Rn, an = Un, dn = ia, Tn = Zr, ta.point = ea;
              }
              function za() {
                lr(kn, Rn, ln, Un, ia, Zr, Wr, sn, Nr, an, dn, Tn, 16, Pr), ta.lineEnd = wa, wa();
              }
              return ta;
            };
          }(ht, zt) : function(sr) {
            return Eo({ point: function(Ht, lr) {
              Ht = sr(Ht, lr), this.stream.point(Ht[0], Ht[1]);
            } });
          }(ht);
        }
        var Jt = Eo({ point: function(ht, zt) {
          this.stream.point(ht * h, zt * h);
        } });
        function Qt(ht, zt, sr, Ht, lr) {
          function Pr(Nr, Wr) {
            return [zt + ht * (Nr *= Ht), sr - ht * (Wr *= lr)];
          }
          return Pr.invert = function(Nr, Wr) {
            return [(Nr - zt) / ht * Ht, (sr - Wr) / ht * lr];
          }, Pr;
        }
        function Yt(ht, zt, sr, Ht, lr, Pr) {
          var Nr = c(Pr), Wr = b(Pr), sn = Nr * ht, an = Wr * ht, dn = Nr / ht, Tn = Wr / ht, ln = (Wr * sr - Nr * zt) / ht, kn = (Wr * zt + Nr * sr) / ht;
          function Rn(Un, ia) {
            return [sn * (Un *= Ht) - an * (ia *= lr) + zt, sr - an * Un - sn * ia];
          }
          return Rn.invert = function(Un, ia) {
            return [Ht * (dn * Un - Tn * ia + ln), lr * (kn - Tn * Un - dn * ia)];
          }, Rn;
        }
        function ar(ht) {
          return pr(function() {
            return ht;
          })();
        }
        function pr(ht) {
          var zt, sr, Ht, lr, Pr, Nr, Wr, sn, an, dn, Tn = 150, ln = 480, kn = 250, Rn = 0, Un = 0, ia = 0, Zr = 0, ta = 0, Pn = 0, Nn = 1, ea = 1, wa = null, La = rn, Sn = null, za = Hr, Ea = 0.5;
          function da(ra) {
            return sn(ra[0] * h, ra[1] * h);
          }
          function Da(ra) {
            return (ra = sn.invert(ra[0], ra[1])) && [ra[0] * o, ra[1] * o];
          }
          function Aa() {
            var ra = Yt(Tn, 0, 0, Nn, ea, Pn).apply(null, zt(Rn, Un)), Za = (Pn ? Yt : Qt)(Tn, ln - ra[0], kn - ra[1], Nn, ea, Pn);
            return sr = Nt(ia, Zr, ta), Wr = ft(zt, Za), sn = ft(sr, Wr), Nr = St(Wr, Ea), $a();
          }
          function $a() {
            return an = dn = null, da;
          }
          return da.stream = function(ra) {
            return an && dn === ra ? an : an = Jt(function(Za) {
              return Eo({ point: function(Bi, Go) {
                var Oo = Za(Bi, Go);
                return this.stream.point(Oo[0], Oo[1]);
              } });
            }(sr)(La(Nr(za(dn = ra)))));
          }, da.preclip = function(ra) {
            return arguments.length ? (La = ra, wa = void 0, $a()) : La;
          }, da.postclip = function(ra) {
            return arguments.length ? (za = ra, Sn = Ht = lr = Pr = null, $a()) : za;
          }, da.clipAngle = function(ra) {
            return arguments.length ? (La = +ra ? vn(wa = ra * h) : (wa = null, rn), $a()) : wa * o;
          }, da.clipExtent = function(ra) {
            return arguments.length ? (za = ra == null ? (Sn = Ht = lr = Pr = null, Hr) : xn(Sn = +ra[0][0], Ht = +ra[0][1], lr = +ra[1][0], Pr = +ra[1][1]), $a()) : Sn == null ? null : [[Sn, Ht], [lr, Pr]];
          }, da.scale = function(ra) {
            return arguments.length ? (Tn = +ra, Aa()) : Tn;
          }, da.translate = function(ra) {
            return arguments.length ? (ln = +ra[0], kn = +ra[1], Aa()) : [ln, kn];
          }, da.center = function(ra) {
            return arguments.length ? (Rn = ra[0] % 360 * h, Un = ra[1] % 360 * h, Aa()) : [Rn * o, Un * o];
          }, da.rotate = function(ra) {
            return arguments.length ? (ia = ra[0] % 360 * h, Zr = ra[1] % 360 * h, ta = ra.length > 2 ? ra[2] % 360 * h : 0, Aa()) : [ia * o, Zr * o, ta * o];
          }, da.angle = function(ra) {
            return arguments.length ? (Pn = ra % 360 * h, Aa()) : Pn * o;
          }, da.reflectX = function(ra) {
            return arguments.length ? (Nn = ra ? -1 : 1, Aa()) : Nn < 0;
          }, da.reflectY = function(ra) {
            return arguments.length ? (ea = ra ? -1 : 1, Aa()) : ea < 0;
          }, da.precision = function(ra) {
            return arguments.length ? (Nr = St(Wr, Ea = ra * ra), $a()) : T(Ea);
          }, da.fitExtent = function(ra, Za) {
            return Ye(da, ra, Za);
          }, da.fitSize = function(ra, Za) {
            return et(da, ra, Za);
          }, da.fitWidth = function(ra, Za) {
            return lt(da, ra, Za);
          }, da.fitHeight = function(ra, Za) {
            return gt(da, ra, Za);
          }, function() {
            return zt = ht.apply(this, arguments), da.invert = zt.invert && Da, Aa();
          };
        }
        function br(ht) {
          var zt = 0, sr = s / 3, Ht = pr(ht), lr = Ht(zt, sr);
          return lr.parallels = function(Pr) {
            return arguments.length ? Ht(zt = Pr[0] * h, sr = Pr[1] * h) : [zt * o, sr * o];
          }, lr;
        }
        function _r(ht, zt) {
          var sr = b(ht), Ht = (sr + b(zt)) / 2;
          if (l(Ht) < n)
            return function(Wr) {
              var sn = c(Wr);
              function an(dn, Tn) {
                return [dn * sn, b(Tn) / sn];
              }
              return an.invert = function(dn, Tn) {
                return [dn / sn, I(Tn * sn)];
              }, an;
            }(ht);
          var lr = 1 + sr * (2 * Ht - sr), Pr = T(lr) / Ht;
          function Nr(Wr, sn) {
            var an = T(lr - 2 * Ht * b(sn)) / Ht;
            return [an * b(Wr *= Ht), Pr - an * c(Wr)];
          }
          return Nr.invert = function(Wr, sn) {
            var an = Pr - sn, dn = p(Wr, l(an)) * w(an);
            return an * Ht < 0 && (dn -= s * w(Wr) * w(an)), [dn / Ht, I((lr - (Wr * Wr + an * an) * Ht * Ht) / (2 * Ht))];
          }, Nr;
        }
        function zr() {
          return br(_r).scale(155.424).center([0, 33.6442]);
        }
        function nn() {
          return zr().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-0.6, 38.7]);
        }
        function pn(ht) {
          return function(zt, sr) {
            var Ht = c(zt), lr = c(sr), Pr = ht(Ht * lr);
            return [Pr * lr * b(zt), Pr * b(sr)];
          };
        }
        function Cn(ht) {
          return function(zt, sr) {
            var Ht = T(zt * zt + sr * sr), lr = ht(Ht), Pr = b(lr), Nr = c(lr);
            return [p(zt * Pr, Ht * Nr), I(Ht && sr * Pr / Ht)];
          };
        }
        var On = pn(function(ht) {
          return T(2 / (1 + ht));
        });
        On.invert = Cn(function(ht) {
          return 2 * I(ht / 2);
        });
        var Vn = pn(function(ht) {
          return (ht = A(ht)) && ht / b(ht);
        });
        function zn(ht, zt) {
          return [ht, f(L((t + zt) / 2))];
        }
        function ma(ht) {
          var zt, sr, Ht, lr = ar(ht), Pr = lr.center, Nr = lr.scale, Wr = lr.translate, sn = lr.clipExtent, an = null;
          function dn() {
            var Tn = s * Nr(), ln = lr(Tr(lr.rotate()).invert([0, 0]));
            return sn(an == null ? [[ln[0] - Tn, ln[1] - Tn], [ln[0] + Tn, ln[1] + Tn]] : ht === zn ? [[Math.max(ln[0] - Tn, an), zt], [Math.min(ln[0] + Tn, sr), Ht]] : [[an, Math.max(ln[1] - Tn, zt)], [sr, Math.min(ln[1] + Tn, Ht)]]);
          }
          return lr.scale = function(Tn) {
            return arguments.length ? (Nr(Tn), dn()) : Nr();
          }, lr.translate = function(Tn) {
            return arguments.length ? (Wr(Tn), dn()) : Wr();
          }, lr.center = function(Tn) {
            return arguments.length ? (Pr(Tn), dn()) : Pr();
          }, lr.clipExtent = function(Tn) {
            return arguments.length ? (Tn == null ? an = zt = sr = Ht = null : (an = +Tn[0][0], zt = +Tn[0][1], sr = +Tn[1][0], Ht = +Tn[1][1]), dn()) : an == null ? null : [[an, zt], [sr, Ht]];
          }, dn();
        }
        function Ma(ht) {
          return L((t + ht) / 2);
        }
        function Na(ht, zt) {
          var sr = c(ht), Ht = ht === zt ? b(ht) : f(sr / c(zt)) / f(Ma(zt) / Ma(ht)), lr = sr * _(Ma(ht), Ht) / Ht;
          if (!Ht)
            return zn;
          function Pr(Nr, Wr) {
            lr > 0 ? Wr < -t + n && (Wr = -t + n) : Wr > t - n && (Wr = t - n);
            var sn = lr / _(Ma(Wr), Ht);
            return [sn * b(Ht * Nr), lr - sn * c(Ht * Nr)];
          }
          return Pr.invert = function(Nr, Wr) {
            var sn = lr - Wr, an = w(Ht) * T(Nr * Nr + sn * sn), dn = p(Nr, l(sn)) * w(sn);
            return sn * Ht < 0 && (dn -= s * w(Nr) * w(sn)), [dn / Ht, 2 * i(_(lr / an, 1 / Ht)) - t];
          }, Pr;
        }
        function Ba(ht, zt) {
          return [ht, zt];
        }
        function ja(ht, zt) {
          var sr = c(ht), Ht = ht === zt ? b(ht) : (sr - c(zt)) / (zt - ht), lr = sr / Ht + ht;
          if (l(Ht) < n)
            return Ba;
          function Pr(Nr, Wr) {
            var sn = lr - Wr, an = Ht * Nr;
            return [sn * b(an), lr - sn * c(an)];
          }
          return Pr.invert = function(Nr, Wr) {
            var sn = lr - Wr, an = p(Nr, l(sn)) * w(sn);
            return sn * Ht < 0 && (an -= s * w(Nr) * w(sn)), [an / Ht, lr - w(Ht) * T(Nr * Nr + sn * sn)];
          }, Pr;
        }
        Vn.invert = Cn(function(ht) {
          return ht;
        }), zn.invert = function(ht, zt) {
          return [ht, 2 * i(y(zt)) - t];
        }, Ba.invert = Ba;
        var _i = 1.340264, yi = -0.081106, ii = 893e-6, oi = 3796e-6, xi = T(3) / 2;
        function Fi(ht, zt) {
          var sr = I(xi * b(zt)), Ht = sr * sr, lr = Ht * Ht * Ht;
          return [ht * c(sr) / (xi * (_i + 3 * yi * Ht + lr * (7 * ii + 9 * oi * Ht))), sr * (_i + yi * Ht + lr * (ii + oi * Ht))];
        }
        function Ji(ht, zt) {
          var sr = c(zt), Ht = c(ht) * sr;
          return [sr * b(ht) / Ht, b(zt) / Ht];
        }
        function Ki(ht, zt) {
          var sr = zt * zt, Ht = sr * sr;
          return [ht * (0.8707 - 0.131979 * sr + Ht * (Ht * (3971e-6 * sr - 1529e-6 * Ht) - 0.013791)), zt * (1.007226 + sr * (0.015085 + Ht * (0.028874 * sr - 0.044475 - 5916e-6 * Ht)))];
        }
        function Qi(ht, zt) {
          return [c(zt) * b(ht), b(zt)];
        }
        function $i(ht, zt) {
          var sr = c(zt), Ht = 1 + c(ht) * sr;
          return [sr * b(ht) / Ht, b(zt) / Ht];
        }
        function Oa(ht, zt) {
          return [f(L((t + zt) / 2)), -ht];
        }
        Fi.invert = function(ht, zt) {
          for (var sr, Ht = zt, lr = Ht * Ht, Pr = lr * lr * lr, Nr = 0; Nr < 12 && (Pr = (lr = (Ht -= sr = (Ht * (_i + yi * lr + Pr * (ii + oi * lr)) - zt) / (_i + 3 * yi * lr + Pr * (7 * ii + 9 * oi * lr))) * Ht) * lr * lr, !(l(sr) < 1e-12)); ++Nr)
            ;
          return [xi * ht * (_i + 3 * yi * lr + Pr * (7 * ii + 9 * oi * lr)) / c(Ht), I(b(Ht) / xi)];
        }, Ji.invert = Cn(i), Ki.invert = function(ht, zt) {
          var sr, Ht = zt, lr = 25;
          do {
            var Pr = Ht * Ht, Nr = Pr * Pr;
            Ht -= sr = (Ht * (1.007226 + Pr * (0.015085 + Nr * (0.028874 * Pr - 0.044475 - 5916e-6 * Nr))) - zt) / (1.007226 + Pr * (0.045255 + Nr * (0.259866 * Pr - 0.311325 - 5916e-6 * 11 * Nr)));
          } while (l(sr) > n && --lr > 0);
          return [ht / (0.8707 + (Pr = Ht * Ht) * (Pr * (Pr * Pr * Pr * (3971e-6 - 1529e-6 * Pr) - 0.013791) - 0.131979)), Ht];
        }, Qi.invert = Cn(I), $i.invert = Cn(function(ht) {
          return 2 * i(ht);
        }), Oa.invert = function(ht, zt) {
          return [-zt, 2 * i(y(ht)) - t];
        }, m.geoAlbers = nn, m.geoAlbersUsa = function() {
          var ht, zt, sr, Ht, lr, Pr, Nr = nn(), Wr = zr().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), sn = zr().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), an = { point: function(ln, kn) {
            Pr = [ln, kn];
          } };
          function dn(ln) {
            var kn = ln[0], Rn = ln[1];
            return Pr = null, sr.point(kn, Rn), Pr || (Ht.point(kn, Rn), Pr) || (lr.point(kn, Rn), Pr);
          }
          function Tn() {
            return ht = zt = null, dn;
          }
          return dn.invert = function(ln) {
            var kn = Nr.scale(), Rn = Nr.translate(), Un = (ln[0] - Rn[0]) / kn, ia = (ln[1] - Rn[1]) / kn;
            return (ia >= 0.12 && ia < 0.234 && Un >= -0.425 && Un < -0.214 ? Wr : ia >= 0.166 && ia < 0.234 && Un >= -0.214 && Un < -0.115 ? sn : Nr).invert(ln);
          }, dn.stream = function(ln) {
            return ht && zt === ln ? ht : (kn = [Nr.stream(zt = ln), Wr.stream(ln), sn.stream(ln)], Rn = kn.length, ht = { point: function(Un, ia) {
              for (var Zr = -1; ++Zr < Rn; )
                kn[Zr].point(Un, ia);
            }, sphere: function() {
              for (var Un = -1; ++Un < Rn; )
                kn[Un].sphere();
            }, lineStart: function() {
              for (var Un = -1; ++Un < Rn; )
                kn[Un].lineStart();
            }, lineEnd: function() {
              for (var Un = -1; ++Un < Rn; )
                kn[Un].lineEnd();
            }, polygonStart: function() {
              for (var Un = -1; ++Un < Rn; )
                kn[Un].polygonStart();
            }, polygonEnd: function() {
              for (var Un = -1; ++Un < Rn; )
                kn[Un].polygonEnd();
            } });
            var kn, Rn;
          }, dn.precision = function(ln) {
            return arguments.length ? (Nr.precision(ln), Wr.precision(ln), sn.precision(ln), Tn()) : Nr.precision();
          }, dn.scale = function(ln) {
            return arguments.length ? (Nr.scale(ln), Wr.scale(0.35 * ln), sn.scale(ln), dn.translate(Nr.translate())) : Nr.scale();
          }, dn.translate = function(ln) {
            if (!arguments.length)
              return Nr.translate();
            var kn = Nr.scale(), Rn = +ln[0], Un = +ln[1];
            return sr = Nr.translate(ln).clipExtent([[Rn - 0.455 * kn, Un - 0.238 * kn], [Rn + 0.455 * kn, Un + 0.238 * kn]]).stream(an), Ht = Wr.translate([Rn - 0.307 * kn, Un + 0.201 * kn]).clipExtent([[Rn - 0.425 * kn + n, Un + 0.12 * kn + n], [Rn - 0.214 * kn - n, Un + 0.234 * kn - n]]).stream(an), lr = sn.translate([Rn - 0.205 * kn, Un + 0.212 * kn]).clipExtent([[Rn - 0.214 * kn + n, Un + 0.166 * kn + n], [Rn - 0.115 * kn - n, Un + 0.234 * kn - n]]).stream(an), Tn();
          }, dn.fitExtent = function(ln, kn) {
            return Ye(dn, ln, kn);
          }, dn.fitSize = function(ln, kn) {
            return et(dn, ln, kn);
          }, dn.fitWidth = function(ln, kn) {
            return lt(dn, ln, kn);
          }, dn.fitHeight = function(ln, kn) {
            return gt(dn, ln, kn);
          }, dn.scale(1070);
        }, m.geoArea = function(ht) {
          return U.reset(), Y(ht, ee), 2 * U;
        }, m.geoAzimuthalEqualArea = function() {
          return ar(On).scale(124.75).clipAngle(179.999);
        }, m.geoAzimuthalEqualAreaRaw = On, m.geoAzimuthalEquidistant = function() {
          return ar(Vn).scale(79.4188).clipAngle(179.999);
        }, m.geoAzimuthalEquidistantRaw = Vn, m.geoBounds = function(ht) {
          var zt, sr, Ht, lr, Pr, Nr, Wr;
          if (se = we = -(pe = ge = 1 / 0), ze = [], Y(ht, Gt), sr = ze.length) {
            for (ze.sort(Xe), zt = 1, Pr = [Ht = ze[0]]; zt < sr; ++zt)
              qe(Ht, (lr = ze[zt])[0]) || qe(Ht, lr[1]) ? (Ue(Ht[0], lr[1]) > Ue(Ht[0], Ht[1]) && (Ht[1] = lr[1]), Ue(lr[0], Ht[1]) > Ue(Ht[0], Ht[1]) && (Ht[0] = lr[0])) : Pr.push(Ht = lr);
            for (Nr = -1 / 0, zt = 0, Ht = Pr[sr = Pr.length - 1]; zt <= sr; Ht = lr, ++zt)
              lr = Pr[zt], (Wr = Ue(Ht[1], lr[0])) > Nr && (Nr = Wr, pe = lr[0], we = Ht[1]);
          }
          return ze = Ie = null, pe === 1 / 0 || ge === 1 / 0 ? [[NaN, NaN], [NaN, NaN]] : [[pe, ge], [we, se]];
        }, m.geoCentroid = function(ht) {
          Oe = Ze = Fe = Pe = De = Ge = Qe = ot = vt = bt = yt = 0, Y(ht, st);
          var zt = vt, sr = bt, Ht = yt, lr = zt * zt + sr * sr + Ht * Ht;
          return lr < 1e-12 && (zt = Ge, sr = Qe, Ht = ot, Ze < n && (zt = Fe, sr = Pe, Ht = De), (lr = zt * zt + sr * sr + Ht * Ht) < 1e-12) ? [NaN, NaN] : [p(sr, zt) * o, I(Ht / T(lr)) * o];
        }, m.geoCircle = function() {
          var ht, zt, sr = nt([0, 0]), Ht = nt(90), lr = nt(6), Pr = { point: function(Wr, sn) {
            ht.push(Wr = zt(Wr, sn)), Wr[0] *= o, Wr[1] *= o;
          } };
          function Nr() {
            var Wr = sr.apply(this, arguments), sn = Ht.apply(this, arguments) * h, an = lr.apply(this, arguments) * h;
            return ht = [], zt = Nt(-Wr[0] * h, -Wr[1] * h, 0).invert, ur(Pr, sn, an, 1), Wr = { type: "Polygon", coordinates: [ht] }, ht = zt = null, Wr;
          }
          return Nr.center = function(Wr) {
            return arguments.length ? (sr = typeof Wr == "function" ? Wr : nt([+Wr[0], +Wr[1]]), Nr) : sr;
          }, Nr.radius = function(Wr) {
            return arguments.length ? (Ht = typeof Wr == "function" ? Wr : nt(+Wr), Nr) : Ht;
          }, Nr.precision = function(Wr) {
            return arguments.length ? (lr = typeof Wr == "function" ? Wr : nt(+Wr), Nr) : lr;
          }, Nr;
        }, m.geoClipAntimeridian = rn, m.geoClipCircle = vn, m.geoClipExtent = function() {
          var ht, zt, sr, Ht = 0, lr = 0, Pr = 960, Nr = 500;
          return sr = { stream: function(Wr) {
            return ht && zt === Wr ? ht : ht = xn(Ht, lr, Pr, Nr)(zt = Wr);
          }, extent: function(Wr) {
            return arguments.length ? (Ht = +Wr[0][0], lr = +Wr[0][1], Pr = +Wr[1][0], Nr = +Wr[1][1], ht = zt = null, sr) : [[Ht, lr], [Pr, Nr]];
          } };
        }, m.geoClipRectangle = xn, m.geoConicConformal = function() {
          return br(Na).scale(109.5).parallels([30, 30]);
        }, m.geoConicConformalRaw = Na, m.geoConicEqualArea = zr, m.geoConicEqualAreaRaw = _r, m.geoConicEquidistant = function() {
          return br(ja).scale(131.154).center([0, 13.9389]);
        }, m.geoConicEquidistantRaw = ja, m.geoContains = function(ht, zt) {
          return (ht && Ct.hasOwnProperty(ht.type) ? Ct[ht.type] : hr)(ht, zt);
        }, m.geoDistance = mr, m.geoEqualEarth = function() {
          return ar(Fi).scale(177.158);
        }, m.geoEqualEarthRaw = Fi, m.geoEquirectangular = function() {
          return ar(Ba).scale(152.63);
        }, m.geoEquirectangularRaw = Ba, m.geoGnomonic = function() {
          return ar(Ji).scale(144.049).clipAngle(60);
        }, m.geoGnomonicRaw = Ji, m.geoGraticule = Er, m.geoGraticule10 = function() {
          return Er()();
        }, m.geoIdentity = function() {
          var ht, zt, sr, Ht, lr, Pr, Nr, Wr = 1, sn = 0, an = 0, dn = 1, Tn = 1, ln = 0, kn = null, Rn = 1, Un = 1, ia = Eo({ point: function(Nn, ea) {
            var wa = Pn([Nn, ea]);
            this.stream.point(wa[0], wa[1]);
          } }), Zr = Hr;
          function ta() {
            return Rn = Wr * dn, Un = Wr * Tn, Pr = Nr = null, Pn;
          }
          function Pn(Nn) {
            var ea = Nn[0] * Rn, wa = Nn[1] * Un;
            if (ln) {
              var La = wa * ht - ea * zt;
              ea = ea * ht + wa * zt, wa = La;
            }
            return [ea + sn, wa + an];
          }
          return Pn.invert = function(Nn) {
            var ea = Nn[0] - sn, wa = Nn[1] - an;
            if (ln) {
              var La = wa * ht + ea * zt;
              ea = ea * ht - wa * zt, wa = La;
            }
            return [ea / Rn, wa / Un];
          }, Pn.stream = function(Nn) {
            return Pr && Nr === Nn ? Pr : Pr = ia(Zr(Nr = Nn));
          }, Pn.postclip = function(Nn) {
            return arguments.length ? (Zr = Nn, kn = sr = Ht = lr = null, ta()) : Zr;
          }, Pn.clipExtent = function(Nn) {
            return arguments.length ? (Zr = Nn == null ? (kn = sr = Ht = lr = null, Hr) : xn(kn = +Nn[0][0], sr = +Nn[0][1], Ht = +Nn[1][0], lr = +Nn[1][1]), ta()) : kn == null ? null : [[kn, sr], [Ht, lr]];
          }, Pn.scale = function(Nn) {
            return arguments.length ? (Wr = +Nn, ta()) : Wr;
          }, Pn.translate = function(Nn) {
            return arguments.length ? (sn = +Nn[0], an = +Nn[1], ta()) : [sn, an];
          }, Pn.angle = function(Nn) {
            return arguments.length ? (zt = b(ln = Nn % 360 * h), ht = c(ln), ta()) : ln * o;
          }, Pn.reflectX = function(Nn) {
            return arguments.length ? (dn = Nn ? -1 : 1, ta()) : dn < 0;
          }, Pn.reflectY = function(Nn) {
            return arguments.length ? (Tn = Nn ? -1 : 1, ta()) : Tn < 0;
          }, Pn.fitExtent = function(Nn, ea) {
            return Ye(Pn, Nn, ea);
          }, Pn.fitSize = function(Nn, ea) {
            return et(Pn, Nn, ea);
          }, Pn.fitWidth = function(Nn, ea) {
            return lt(Pn, Nn, ea);
          }, Pn.fitHeight = function(Nn, ea) {
            return gt(Pn, Nn, ea);
          }, Pn;
        }, m.geoInterpolate = function(ht, zt) {
          var sr = ht[0] * h, Ht = ht[1] * h, lr = zt[0] * h, Pr = zt[1] * h, Nr = c(Ht), Wr = b(Ht), sn = c(Pr), an = b(Pr), dn = Nr * c(sr), Tn = Nr * b(sr), ln = sn * c(lr), kn = sn * b(lr), Rn = 2 * I(T(P(Pr - Ht) + Nr * sn * P(lr - sr))), Un = b(Rn), ia = Rn ? function(Zr) {
            var ta = b(Zr *= Rn) / Un, Pn = b(Rn - Zr) / Un, Nn = Pn * dn + ta * ln, ea = Pn * Tn + ta * kn, wa = Pn * Wr + ta * an;
            return [p(ea, Nn) * o, p(wa, T(Nn * Nn + ea * ea)) * o];
          } : function() {
            return [sr * o, Ht * o];
          };
          return ia.distance = Rn, ia;
        }, m.geoLength = En, m.geoMercator = function() {
          return ma(zn).scale(961 / u);
        }, m.geoMercatorRaw = zn, m.geoNaturalEarth1 = function() {
          return ar(Ki).scale(175.295);
        }, m.geoNaturalEarth1Raw = Ki, m.geoOrthographic = function() {
          return ar(Qi).scale(249.5).clipAngle(90 + n);
        }, m.geoOrthographicRaw = Qi, m.geoPath = function(ht, zt) {
          var sr, Ht, lr = 4.5;
          function Pr(Nr) {
            return Nr && (typeof lr == "function" && Ht.pointRadius(+lr.apply(this, arguments)), Y(Nr, sr(Ht))), Ht.result();
          }
          return Pr.area = function(Nr) {
            return Y(Nr, sr(Ln)), Ln.result();
          }, Pr.measure = function(Nr) {
            return Y(Nr, sr(mo)), mo.result();
          }, Pr.bounds = function(Nr) {
            return Y(Nr, sr(hi)), hi.result();
          }, Pr.centroid = function(Nr) {
            return Y(Nr, sr(pi)), pi.result();
          }, Pr.projection = function(Nr) {
            return arguments.length ? (sr = Nr == null ? (ht = null, Hr) : (ht = Nr).stream, Pr) : ht;
          }, Pr.context = function(Nr) {
            return arguments.length ? (Ht = Nr == null ? (zt = null, new Uo()) : new _s(zt = Nr), typeof lr != "function" && Ht.pointRadius(lr), Pr) : zt;
          }, Pr.pointRadius = function(Nr) {
            return arguments.length ? (lr = typeof Nr == "function" ? Nr : (Ht.pointRadius(+Nr), +Nr), Pr) : lr;
          }, Pr.projection(ht).context(zt);
        }, m.geoProjection = ar, m.geoProjectionMutator = pr, m.geoRotation = Tr, m.geoStereographic = function() {
          return ar($i).scale(250).clipAngle(142);
        }, m.geoStereographicRaw = $i, m.geoStream = Y, m.geoTransform = function(ht) {
          return { stream: Eo(ht) };
        }, m.geoTransverseMercator = function() {
          var ht = ma(Oa), zt = ht.center, sr = ht.rotate;
          return ht.center = function(Ht) {
            return arguments.length ? zt([-Ht[1], Ht[0]]) : [(Ht = zt())[1], -Ht[0]];
          }, ht.rotate = function(Ht) {
            return arguments.length ? sr([Ht[0], Ht[1], Ht.length > 2 ? Ht[2] + 90 : 90]) : [(Ht = sr())[0], Ht[1], Ht[2] - 90];
          }, sr([0, 0, 90]).scale(159.155);
        }, m.geoTransverseMercatorRaw = Oa, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-array": 107 }], 115: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        function g(oe, ve) {
          return oe.parent === ve.parent ? 1 : 2;
        }
        function k(oe, ve) {
          return oe + ve.x;
        }
        function x(oe, ve) {
          return Math.max(oe, ve.y);
        }
        function e(oe) {
          var ve = 0, ue = oe.children, ye = ue && ue.length;
          if (ye)
            for (; --ye >= 0; )
              ve += ue[ye].value;
          else
            ve = 1;
          oe.value = ve;
        }
        function r(oe, ve) {
          var ue, ye, Ae, pe, ge, we = new d(oe), se = +oe.value && (we.value = oe.value), de = [we];
          for (ve == null && (ve = n); ue = de.pop(); )
            if (se && (ue.value = +ue.data.value), (Ae = ve(ue.data)) && (ge = Ae.length))
              for (ue.children = new Array(ge), pe = ge - 1; pe >= 0; --pe)
                de.push(ye = ue.children[pe] = new d(Ae[pe])), ye.parent = ue, ye.depth = ue.depth + 1;
          return we.eachBefore(t);
        }
        function n(oe) {
          return oe.children;
        }
        function s(oe) {
          oe.data = oe.data.data;
        }
        function t(oe) {
          var ve = 0;
          do
            oe.height = ve;
          while ((oe = oe.parent) && oe.height < ++ve);
        }
        function d(oe) {
          this.data = oe, this.depth = this.height = 0, this.parent = null;
        }
        d.prototype = r.prototype = { constructor: d, count: function() {
          return this.eachAfter(e);
        }, each: function(oe) {
          var ve, ue, ye, Ae, pe = this, ge = [pe];
          do
            for (ve = ge.reverse(), ge = []; pe = ve.pop(); )
              if (oe(pe), ue = pe.children)
                for (ye = 0, Ae = ue.length; ye < Ae; ++ye)
                  ge.push(ue[ye]);
          while (ge.length);
          return this;
        }, eachAfter: function(oe) {
          for (var ve, ue, ye, Ae = this, pe = [Ae], ge = []; Ae = pe.pop(); )
            if (ge.push(Ae), ve = Ae.children)
              for (ue = 0, ye = ve.length; ue < ye; ++ue)
                pe.push(ve[ue]);
          for (; Ae = ge.pop(); )
            oe(Ae);
          return this;
        }, eachBefore: function(oe) {
          for (var ve, ue, ye = this, Ae = [ye]; ye = Ae.pop(); )
            if (oe(ye), ve = ye.children)
              for (ue = ve.length - 1; ue >= 0; --ue)
                Ae.push(ve[ue]);
          return this;
        }, sum: function(oe) {
          return this.eachAfter(function(ve) {
            for (var ue = +oe(ve.data) || 0, ye = ve.children, Ae = ye && ye.length; --Ae >= 0; )
              ue += ye[Ae].value;
            ve.value = ue;
          });
        }, sort: function(oe) {
          return this.eachBefore(function(ve) {
            ve.children && ve.children.sort(oe);
          });
        }, path: function(oe) {
          for (var ve = this, ue = function(pe, ge) {
            if (pe === ge)
              return pe;
            var we = pe.ancestors(), se = ge.ancestors(), de = null;
            for (pe = we.pop(), ge = se.pop(); pe === ge; )
              de = pe, pe = we.pop(), ge = se.pop();
            return de;
          }(ve, oe), ye = [ve]; ve !== ue; )
            ve = ve.parent, ye.push(ve);
          for (var Ae = ye.length; oe !== ue; )
            ye.splice(Ae, 0, oe), oe = oe.parent;
          return ye;
        }, ancestors: function() {
          for (var oe = this, ve = [oe]; oe = oe.parent; )
            ve.push(oe);
          return ve;
        }, descendants: function() {
          var oe = [];
          return this.each(function(ve) {
            oe.push(ve);
          }), oe;
        }, leaves: function() {
          var oe = [];
          return this.eachBefore(function(ve) {
            ve.children || oe.push(ve);
          }), oe;
        }, links: function() {
          var oe = this, ve = [];
          return oe.each(function(ue) {
            ue !== oe && ve.push({ source: ue.parent, target: ue });
          }), ve;
        }, copy: function() {
          return r(this).eachBefore(s);
        } };
        var u = Array.prototype.slice;
        function o(oe) {
          for (var ve, ue, ye = 0, Ae = (oe = function(ge) {
            for (var we, se, de = ge.length; de; )
              se = Math.random() * de-- | 0, we = ge[de], ge[de] = ge[se], ge[se] = we;
            return ge;
          }(u.call(oe))).length, pe = []; ye < Ae; )
            ve = oe[ye], ue && i(ue, ve) ? ++ye : (ue = c(pe = h(pe, ve)), ye = 0);
          return ue;
        }
        function h(oe, ve) {
          var ue, ye;
          if (p(ve, oe))
            return [ve];
          for (ue = 0; ue < oe.length; ++ue)
            if (l(ve, oe[ue]) && p(a(oe[ue], ve), oe))
              return [oe[ue], ve];
          for (ue = 0; ue < oe.length - 1; ++ue)
            for (ye = ue + 1; ye < oe.length; ++ye)
              if (l(a(oe[ue], oe[ye]), ve) && l(a(oe[ue], ve), oe[ye]) && l(a(oe[ye], ve), oe[ue]) && p(y(oe[ue], oe[ye], ve), oe))
                return [oe[ue], oe[ye], ve];
          throw new Error();
        }
        function l(oe, ve) {
          var ue = oe.r - ve.r, ye = ve.x - oe.x, Ae = ve.y - oe.y;
          return ue < 0 || ue * ue < ye * ye + Ae * Ae;
        }
        function i(oe, ve) {
          var ue = oe.r - ve.r + 1e-6, ye = ve.x - oe.x, Ae = ve.y - oe.y;
          return ue > 0 && ue * ue > ye * ye + Ae * Ae;
        }
        function p(oe, ve) {
          for (var ue = 0; ue < ve.length; ++ue)
            if (!i(oe, ve[ue]))
              return !1;
          return !0;
        }
        function c(oe) {
          switch (oe.length) {
            case 1:
              return { x: (ve = oe[0]).x, y: ve.y, r: ve.r };
            case 2:
              return a(oe[0], oe[1]);
            case 3:
              return y(oe[0], oe[1], oe[2]);
          }
          var ve;
        }
        function a(oe, ve) {
          var ue = oe.x, ye = oe.y, Ae = oe.r, pe = ve.x, ge = ve.y, we = ve.r, se = pe - ue, de = ge - ye, Te = we - Ae, Ee = Math.sqrt(se * se + de * de);
          return { x: (ue + pe + se / Ee * Te) / 2, y: (ye + ge + de / Ee * Te) / 2, r: (Ee + Ae + we) / 2 };
        }
        function y(oe, ve, ue) {
          var ye = oe.x, Ae = oe.y, pe = oe.r, ge = ve.x, we = ve.y, se = ve.r, de = ue.x, Te = ue.y, Ee = ue.r, Me = ye - ge, ze = ye - de, Ie = Ae - we, Oe = Ae - Te, Ze = se - pe, Fe = Ee - pe, Pe = ye * ye + Ae * Ae - pe * pe, De = Pe - ge * ge - we * we + se * se, Ge = Pe - de * de - Te * Te + Ee * Ee, Qe = ze * Ie - Me * Oe, ot = (Ie * Ge - Oe * De) / (2 * Qe) - ye, vt = (Oe * Ze - Ie * Fe) / Qe, bt = (ze * De - Me * Ge) / (2 * Qe) - Ae, yt = (Me * Fe - ze * Ze) / Qe, tt = vt * vt + yt * yt - 1, Ke = 2 * (pe + ot * vt + bt * yt), mt = ot * ot + bt * bt - pe * pe, Ft = -(tt ? (Ke + Math.sqrt(Ke * Ke - 4 * tt * mt)) / (2 * tt) : mt / Ke);
          return { x: ye + ot + vt * Ft, y: Ae + bt + yt * Ft, r: Ft };
        }
        function f(oe, ve, ue) {
          var ye, Ae, pe, ge, we = oe.x - ve.x, se = oe.y - ve.y, de = we * we + se * se;
          de ? (Ae = ve.r + ue.r, Ae *= Ae, ge = oe.r + ue.r, Ae > (ge *= ge) ? (ye = (de + ge - Ae) / (2 * de), pe = Math.sqrt(Math.max(0, ge / de - ye * ye)), ue.x = oe.x - ye * we - pe * se, ue.y = oe.y - ye * se + pe * we) : (ye = (de + Ae - ge) / (2 * de), pe = Math.sqrt(Math.max(0, Ae / de - ye * ye)), ue.x = ve.x + ye * we - pe * se, ue.y = ve.y + ye * se + pe * we)) : (ue.x = ve.x + ue.r, ue.y = ve.y);
        }
        function _(oe, ve) {
          var ue = oe.r + ve.r - 1e-6, ye = ve.x - oe.x, Ae = ve.y - oe.y;
          return ue > 0 && ue * ue > ye * ye + Ae * Ae;
        }
        function b(oe) {
          var ve = oe._, ue = oe.next._, ye = ve.r + ue.r, Ae = (ve.x * ue.r + ue.x * ve.r) / ye, pe = (ve.y * ue.r + ue.y * ve.r) / ye;
          return Ae * Ae + pe * pe;
        }
        function w(oe) {
          this._ = oe, this.next = null, this.previous = null;
        }
        function T(oe) {
          if (!(Ae = oe.length))
            return 0;
          var ve, ue, ye, Ae, pe, ge, we, se, de, Te, Ee;
          if ((ve = oe[0]).x = 0, ve.y = 0, !(Ae > 1))
            return ve.r;
          if (ue = oe[1], ve.x = -ue.r, ue.x = ve.r, ue.y = 0, !(Ae > 2))
            return ve.r + ue.r;
          f(ue, ve, ye = oe[2]), ve = new w(ve), ue = new w(ue), ye = new w(ye), ve.next = ye.previous = ue, ue.next = ve.previous = ye, ye.next = ue.previous = ve;
          e:
            for (we = 3; we < Ae; ++we) {
              f(ve._, ue._, ye = oe[we]), ye = new w(ye), se = ue.next, de = ve.previous, Te = ue._.r, Ee = ve._.r;
              do
                if (Te <= Ee) {
                  if (_(se._, ye._)) {
                    ue = se, ve.next = ue, ue.previous = ve, --we;
                    continue e;
                  }
                  Te += se._.r, se = se.next;
                } else {
                  if (_(de._, ye._)) {
                    (ve = de).next = ue, ue.previous = ve, --we;
                    continue e;
                  }
                  Ee += de._.r, de = de.previous;
                }
              while (se !== de.next);
              for (ye.previous = ve, ye.next = ue, ve.next = ue.previous = ue = ye, pe = b(ve); (ye = ye.next) !== ue; )
                (ge = b(ye)) < pe && (ve = ye, pe = ge);
              ue = ve.next;
            }
          for (ve = [ue._], ye = ue; (ye = ye.next) !== ue; )
            ve.push(ye._);
          for (ye = o(ve), we = 0; we < Ae; ++we)
            (ve = oe[we]).x -= ye.x, ve.y -= ye.y;
          return ye.r;
        }
        function L(oe) {
          return oe == null ? null : A(oe);
        }
        function A(oe) {
          if (typeof oe != "function")
            throw new Error();
          return oe;
        }
        function I() {
          return 0;
        }
        function P(oe) {
          return function() {
            return oe;
          };
        }
        function S(oe) {
          return Math.sqrt(oe.value);
        }
        function E(oe) {
          return function(ve) {
            ve.children || (ve.r = Math.max(0, +oe(ve) || 0));
          };
        }
        function R(oe, ve) {
          return function(ue) {
            if (ye = ue.children) {
              var ye, Ae, pe, ge = ye.length, we = oe(ue) * ve || 0;
              if (we)
                for (Ae = 0; Ae < ge; ++Ae)
                  ye[Ae].r += we;
              if (pe = T(ye), we)
                for (Ae = 0; Ae < ge; ++Ae)
                  ye[Ae].r -= we;
              ue.r = pe + we;
            }
          };
        }
        function z(oe) {
          return function(ve) {
            var ue = ve.parent;
            ve.r *= oe, ue && (ve.x = ue.x + oe * ve.x, ve.y = ue.y + oe * ve.y);
          };
        }
        function j(oe) {
          oe.x0 = Math.round(oe.x0), oe.y0 = Math.round(oe.y0), oe.x1 = Math.round(oe.x1), oe.y1 = Math.round(oe.y1);
        }
        function H(oe, ve, ue, ye, Ae) {
          for (var pe, ge = oe.children, we = -1, se = ge.length, de = oe.value && (ye - ve) / oe.value; ++we < se; )
            (pe = ge[we]).y0 = ue, pe.y1 = Ae, pe.x0 = ve, pe.x1 = ve += pe.value * de;
        }
        var Y = { depth: -1 }, J = {};
        function W(oe) {
          return oe.id;
        }
        function Z(oe) {
          return oe.parentId;
        }
        function re(oe, ve) {
          return oe.parent === ve.parent ? 1 : 2;
        }
        function V(oe) {
          var ve = oe.children;
          return ve ? ve[0] : oe.t;
        }
        function B(oe) {
          var ve = oe.children;
          return ve ? ve[ve.length - 1] : oe.t;
        }
        function U(oe, ve, ue) {
          var ye = ue / (ve.i - oe.i);
          ve.c -= ye, ve.s += ue, oe.c += ye, ve.z += ue, ve.m += ue;
        }
        function ee(oe, ve, ue) {
          return oe.a.parent === ve.parent ? oe.a : ue;
        }
        function N(oe, ve) {
          this._ = oe, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = ve;
        }
        function K(oe, ve, ue, ye, Ae) {
          for (var pe, ge = oe.children, we = -1, se = ge.length, de = oe.value && (Ae - ue) / oe.value; ++we < se; )
            (pe = ge[we]).x0 = ve, pe.x1 = ye, pe.y0 = ue, pe.y1 = ue += pe.value * de;
        }
        N.prototype = Object.create(d.prototype);
        var X = (1 + Math.sqrt(5)) / 2;
        function te(oe, ve, ue, ye, Ae, pe) {
          for (var ge, we, se, de, Te, Ee, Me, ze, Ie, Oe, Ze, Fe = [], Pe = ve.children, De = 0, Ge = 0, Qe = Pe.length, ot = ve.value; De < Qe; ) {
            se = Ae - ue, de = pe - ye;
            do
              Te = Pe[Ge++].value;
            while (!Te && Ge < Qe);
            for (Ee = Me = Te, Ze = Te * Te * (Oe = Math.max(de / se, se / de) / (ot * oe)), Ie = Math.max(Me / Ze, Ze / Ee); Ge < Qe; ++Ge) {
              if (Te += we = Pe[Ge].value, we < Ee && (Ee = we), we > Me && (Me = we), Ze = Te * Te * Oe, (ze = Math.max(Me / Ze, Ze / Ee)) > Ie) {
                Te -= we;
                break;
              }
              Ie = ze;
            }
            Fe.push(ge = { value: Te, dice: se < de, children: Pe.slice(De, Ge) }), ge.dice ? H(ge, ue, ye, Ae, ot ? ye += de * Te / ot : pe) : K(ge, ue, ye, ot ? ue += se * Te / ot : Ae, pe), ot -= Te, De = Ge;
          }
          return Fe;
        }
        var ie = function oe(ve) {
          function ue(ye, Ae, pe, ge, we) {
            te(ve, ye, Ae, pe, ge, we);
          }
          return ue.ratio = function(ye) {
            return oe((ye = +ye) > 1 ? ye : 1);
          }, ue;
        }(X), le = function oe(ve) {
          function ue(ye, Ae, pe, ge, we) {
            if ((se = ye._squarify) && se.ratio === ve)
              for (var se, de, Te, Ee, Me, ze = -1, Ie = se.length, Oe = ye.value; ++ze < Ie; ) {
                for (Te = (de = se[ze]).children, Ee = de.value = 0, Me = Te.length; Ee < Me; ++Ee)
                  de.value += Te[Ee].value;
                de.dice ? H(de, Ae, pe, ge, pe += (we - pe) * de.value / Oe) : K(de, Ae, pe, Ae += (ge - Ae) * de.value / Oe, we), Oe -= de.value;
              }
            else
              ye._squarify = se = te(ve, ye, Ae, pe, ge, we), se.ratio = ve;
          }
          return ue.ratio = function(ye) {
            return oe((ye = +ye) > 1 ? ye : 1);
          }, ue;
        }(X);
        m.cluster = function() {
          var oe = g, ve = 1, ue = 1, ye = !1;
          function Ae(pe) {
            var ge, we = 0;
            pe.eachAfter(function(Me) {
              var ze = Me.children;
              ze ? (Me.x = function(Ie) {
                return Ie.reduce(k, 0) / Ie.length;
              }(ze), Me.y = function(Ie) {
                return 1 + Ie.reduce(x, 0);
              }(ze)) : (Me.x = ge ? we += oe(Me, ge) : 0, Me.y = 0, ge = Me);
            });
            var se = function(Me) {
              for (var ze; ze = Me.children; )
                Me = ze[0];
              return Me;
            }(pe), de = function(Me) {
              for (var ze; ze = Me.children; )
                Me = ze[ze.length - 1];
              return Me;
            }(pe), Te = se.x - oe(se, de) / 2, Ee = de.x + oe(de, se) / 2;
            return pe.eachAfter(ye ? function(Me) {
              Me.x = (Me.x - pe.x) * ve, Me.y = (pe.y - Me.y) * ue;
            } : function(Me) {
              Me.x = (Me.x - Te) / (Ee - Te) * ve, Me.y = (1 - (pe.y ? Me.y / pe.y : 1)) * ue;
            });
          }
          return Ae.separation = function(pe) {
            return arguments.length ? (oe = pe, Ae) : oe;
          }, Ae.size = function(pe) {
            return arguments.length ? (ye = !1, ve = +pe[0], ue = +pe[1], Ae) : ye ? null : [ve, ue];
          }, Ae.nodeSize = function(pe) {
            return arguments.length ? (ye = !0, ve = +pe[0], ue = +pe[1], Ae) : ye ? [ve, ue] : null;
          }, Ae;
        }, m.hierarchy = r, m.pack = function() {
          var oe = null, ve = 1, ue = 1, ye = I;
          function Ae(pe) {
            return pe.x = ve / 2, pe.y = ue / 2, oe ? pe.eachBefore(E(oe)).eachAfter(R(ye, 0.5)).eachBefore(z(1)) : pe.eachBefore(E(S)).eachAfter(R(I, 1)).eachAfter(R(ye, pe.r / Math.min(ve, ue))).eachBefore(z(Math.min(ve, ue) / (2 * pe.r))), pe;
          }
          return Ae.radius = function(pe) {
            return arguments.length ? (oe = L(pe), Ae) : oe;
          }, Ae.size = function(pe) {
            return arguments.length ? (ve = +pe[0], ue = +pe[1], Ae) : [ve, ue];
          }, Ae.padding = function(pe) {
            return arguments.length ? (ye = typeof pe == "function" ? pe : P(+pe), Ae) : ye;
          }, Ae;
        }, m.packEnclose = o, m.packSiblings = function(oe) {
          return T(oe), oe;
        }, m.partition = function() {
          var oe = 1, ve = 1, ue = 0, ye = !1;
          function Ae(pe) {
            var ge = pe.height + 1;
            return pe.x0 = pe.y0 = ue, pe.x1 = oe, pe.y1 = ve / ge, pe.eachBefore(function(we, se) {
              return function(de) {
                de.children && H(de, de.x0, we * (de.depth + 1) / se, de.x1, we * (de.depth + 2) / se);
                var Te = de.x0, Ee = de.y0, Me = de.x1 - ue, ze = de.y1 - ue;
                Me < Te && (Te = Me = (Te + Me) / 2), ze < Ee && (Ee = ze = (Ee + ze) / 2), de.x0 = Te, de.y0 = Ee, de.x1 = Me, de.y1 = ze;
              };
            }(ve, ge)), ye && pe.eachBefore(j), pe;
          }
          return Ae.round = function(pe) {
            return arguments.length ? (ye = !!pe, Ae) : ye;
          }, Ae.size = function(pe) {
            return arguments.length ? (oe = +pe[0], ve = +pe[1], Ae) : [oe, ve];
          }, Ae.padding = function(pe) {
            return arguments.length ? (ue = +pe, Ae) : ue;
          }, Ae;
        }, m.stratify = function() {
          var oe = W, ve = Z;
          function ue(ye) {
            var Ae, pe, ge, we, se, de, Te, Ee = ye.length, Me = new Array(Ee), ze = {};
            for (pe = 0; pe < Ee; ++pe)
              Ae = ye[pe], se = Me[pe] = new d(Ae), (de = oe(Ae, pe, ye)) != null && (de += "") && (ze[Te = "$" + (se.id = de)] = Te in ze ? J : se);
            for (pe = 0; pe < Ee; ++pe)
              if (se = Me[pe], (de = ve(ye[pe], pe, ye)) != null && (de += "")) {
                if (!(we = ze["$" + de]))
                  throw new Error("missing: " + de);
                if (we === J)
                  throw new Error("ambiguous: " + de);
                we.children ? we.children.push(se) : we.children = [se], se.parent = we;
              } else {
                if (ge)
                  throw new Error("multiple roots");
                ge = se;
              }
            if (!ge)
              throw new Error("no root");
            if (ge.parent = Y, ge.eachBefore(function(Ie) {
              Ie.depth = Ie.parent.depth + 1, --Ee;
            }).eachBefore(t), ge.parent = null, Ee > 0)
              throw new Error("cycle");
            return ge;
          }
          return ue.id = function(ye) {
            return arguments.length ? (oe = A(ye), ue) : oe;
          }, ue.parentId = function(ye) {
            return arguments.length ? (ve = A(ye), ue) : ve;
          }, ue;
        }, m.tree = function() {
          var oe = re, ve = 1, ue = 1, ye = null;
          function Ae(se) {
            var de = function(Fe) {
              for (var Pe, De, Ge, Qe, ot, vt = new N(Fe, 0), bt = [vt]; Pe = bt.pop(); )
                if (Ge = Pe._.children)
                  for (Pe.children = new Array(ot = Ge.length), Qe = ot - 1; Qe >= 0; --Qe)
                    bt.push(De = Pe.children[Qe] = new N(Ge[Qe], Qe)), De.parent = Pe;
              return (vt.parent = new N(null, 0)).children = [vt], vt;
            }(se);
            if (de.eachAfter(pe), de.parent.m = -de.z, de.eachBefore(ge), ye)
              se.eachBefore(we);
            else {
              var Te = se, Ee = se, Me = se;
              se.eachBefore(function(Fe) {
                Fe.x < Te.x && (Te = Fe), Fe.x > Ee.x && (Ee = Fe), Fe.depth > Me.depth && (Me = Fe);
              });
              var ze = Te === Ee ? 1 : oe(Te, Ee) / 2, Ie = ze - Te.x, Oe = ve / (Ee.x + ze + Ie), Ze = ue / (Me.depth || 1);
              se.eachBefore(function(Fe) {
                Fe.x = (Fe.x + Ie) * Oe, Fe.y = Fe.depth * Ze;
              });
            }
            return se;
          }
          function pe(se) {
            var de = se.children, Te = se.parent.children, Ee = se.i ? Te[se.i - 1] : null;
            if (de) {
              (function(ze) {
                for (var Ie, Oe = 0, Ze = 0, Fe = ze.children, Pe = Fe.length; --Pe >= 0; )
                  (Ie = Fe[Pe]).z += Oe, Ie.m += Oe, Oe += Ie.s + (Ze += Ie.c);
              })(se);
              var Me = (de[0].z + de[de.length - 1].z) / 2;
              Ee ? (se.z = Ee.z + oe(se._, Ee._), se.m = se.z - Me) : se.z = Me;
            } else
              Ee && (se.z = Ee.z + oe(se._, Ee._));
            se.parent.A = function(ze, Ie, Oe) {
              if (Ie) {
                for (var Ze, Fe = ze, Pe = ze, De = Ie, Ge = Fe.parent.children[0], Qe = Fe.m, ot = Pe.m, vt = De.m, bt = Ge.m; De = B(De), Fe = V(Fe), De && Fe; )
                  Ge = V(Ge), (Pe = B(Pe)).a = ze, (Ze = De.z + vt - Fe.z - Qe + oe(De._, Fe._)) > 0 && (U(ee(De, ze, Oe), ze, Ze), Qe += Ze, ot += Ze), vt += De.m, Qe += Fe.m, bt += Ge.m, ot += Pe.m;
                De && !B(Pe) && (Pe.t = De, Pe.m += vt - ot), Fe && !V(Ge) && (Ge.t = Fe, Ge.m += Qe - bt, Oe = ze);
              }
              return Oe;
            }(se, Ee, se.parent.A || Te[0]);
          }
          function ge(se) {
            se._.x = se.z + se.parent.m, se.m += se.parent.m;
          }
          function we(se) {
            se.x *= ve, se.y = se.depth * ue;
          }
          return Ae.separation = function(se) {
            return arguments.length ? (oe = se, Ae) : oe;
          }, Ae.size = function(se) {
            return arguments.length ? (ye = !1, ve = +se[0], ue = +se[1], Ae) : ye ? null : [ve, ue];
          }, Ae.nodeSize = function(se) {
            return arguments.length ? (ye = !0, ve = +se[0], ue = +se[1], Ae) : ye ? [ve, ue] : null;
          }, Ae;
        }, m.treemap = function() {
          var oe = ie, ve = !1, ue = 1, ye = 1, Ae = [0], pe = I, ge = I, we = I, se = I, de = I;
          function Te(Me) {
            return Me.x0 = Me.y0 = 0, Me.x1 = ue, Me.y1 = ye, Me.eachBefore(Ee), Ae = [0], ve && Me.eachBefore(j), Me;
          }
          function Ee(Me) {
            var ze = Ae[Me.depth], Ie = Me.x0 + ze, Oe = Me.y0 + ze, Ze = Me.x1 - ze, Fe = Me.y1 - ze;
            Ze < Ie && (Ie = Ze = (Ie + Ze) / 2), Fe < Oe && (Oe = Fe = (Oe + Fe) / 2), Me.x0 = Ie, Me.y0 = Oe, Me.x1 = Ze, Me.y1 = Fe, Me.children && (ze = Ae[Me.depth + 1] = pe(Me) / 2, Ie += de(Me) - ze, Oe += ge(Me) - ze, (Ze -= we(Me) - ze) < Ie && (Ie = Ze = (Ie + Ze) / 2), (Fe -= se(Me) - ze) < Oe && (Oe = Fe = (Oe + Fe) / 2), oe(Me, Ie, Oe, Ze, Fe));
          }
          return Te.round = function(Me) {
            return arguments.length ? (ve = !!Me, Te) : ve;
          }, Te.size = function(Me) {
            return arguments.length ? (ue = +Me[0], ye = +Me[1], Te) : [ue, ye];
          }, Te.tile = function(Me) {
            return arguments.length ? (oe = A(Me), Te) : oe;
          }, Te.padding = function(Me) {
            return arguments.length ? Te.paddingInner(Me).paddingOuter(Me) : Te.paddingInner();
          }, Te.paddingInner = function(Me) {
            return arguments.length ? (pe = typeof Me == "function" ? Me : P(+Me), Te) : pe;
          }, Te.paddingOuter = function(Me) {
            return arguments.length ? Te.paddingTop(Me).paddingRight(Me).paddingBottom(Me).paddingLeft(Me) : Te.paddingTop();
          }, Te.paddingTop = function(Me) {
            return arguments.length ? (ge = typeof Me == "function" ? Me : P(+Me), Te) : ge;
          }, Te.paddingRight = function(Me) {
            return arguments.length ? (we = typeof Me == "function" ? Me : P(+Me), Te) : we;
          }, Te.paddingBottom = function(Me) {
            return arguments.length ? (se = typeof Me == "function" ? Me : P(+Me), Te) : se;
          }, Te.paddingLeft = function(Me) {
            return arguments.length ? (de = typeof Me == "function" ? Me : P(+Me), Te) : de;
          }, Te;
        }, m.treemapBinary = function(oe, ve, ue, ye, Ae) {
          var pe, ge, we = oe.children, se = we.length, de = new Array(se + 1);
          for (de[0] = ge = pe = 0; pe < se; ++pe)
            de[pe + 1] = ge += we[pe].value;
          (function Te(Ee, Me, ze, Ie, Oe, Ze, Fe) {
            if (Ee >= Me - 1) {
              var Pe = we[Ee];
              return Pe.x0 = Ie, Pe.y0 = Oe, Pe.x1 = Ze, void (Pe.y1 = Fe);
            }
            for (var De = de[Ee], Ge = ze / 2 + De, Qe = Ee + 1, ot = Me - 1; Qe < ot; ) {
              var vt = Qe + ot >>> 1;
              de[vt] < Ge ? Qe = vt + 1 : ot = vt;
            }
            Ge - de[Qe - 1] < de[Qe] - Ge && Ee + 1 < Qe && --Qe;
            var bt = de[Qe] - De, yt = ze - bt;
            if (Ze - Ie > Fe - Oe) {
              var tt = (Ie * yt + Ze * bt) / ze;
              Te(Ee, Qe, bt, Ie, Oe, tt, Fe), Te(Qe, Me, yt, tt, Oe, Ze, Fe);
            } else {
              var Ke = (Oe * yt + Fe * bt) / ze;
              Te(Ee, Qe, bt, Ie, Oe, Ze, Ke), Te(Qe, Me, yt, Ie, Ke, Ze, Fe);
            }
          })(0, se, oe.value, ve, ue, ye, Ae);
        }, m.treemapDice = H, m.treemapResquarify = le, m.treemapSlice = K, m.treemapSliceDice = function(oe, ve, ue, ye, Ae) {
          (1 & oe.depth ? K : H)(oe, ve, ue, ye, Ae);
        }, m.treemapSquarify = ie, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 116: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-color")) : g((m = m || self).d3 = m.d3 || {}, m.d3);
      })(this, function(m, g) {
        function k(X, te, ie, le, oe) {
          var ve = X * X, ue = ve * X;
          return ((1 - 3 * X + 3 * ve - ue) * te + (4 - 6 * ve + 3 * ue) * ie + (1 + 3 * X + 3 * ve - 3 * ue) * le + ue * oe) / 6;
        }
        function x(X) {
          var te = X.length - 1;
          return function(ie) {
            var le = ie <= 0 ? ie = 0 : ie >= 1 ? (ie = 1, te - 1) : Math.floor(ie * te), oe = X[le], ve = X[le + 1], ue = le > 0 ? X[le - 1] : 2 * oe - ve, ye = le < te - 1 ? X[le + 2] : 2 * ve - oe;
            return k((ie - le / te) * te, ue, oe, ve, ye);
          };
        }
        function e(X) {
          var te = X.length;
          return function(ie) {
            var le = Math.floor(((ie %= 1) < 0 ? ++ie : ie) * te), oe = X[(le + te - 1) % te], ve = X[le % te], ue = X[(le + 1) % te], ye = X[(le + 2) % te];
            return k((ie - le / te) * te, oe, ve, ue, ye);
          };
        }
        function r(X) {
          return function() {
            return X;
          };
        }
        function n(X, te) {
          return function(ie) {
            return X + ie * te;
          };
        }
        function s(X, te) {
          var ie = te - X;
          return ie ? n(X, ie > 180 || ie < -180 ? ie - 360 * Math.round(ie / 360) : ie) : r(isNaN(X) ? te : X);
        }
        function t(X) {
          return (X = +X) == 1 ? d : function(te, ie) {
            return ie - te ? function(le, oe, ve) {
              return le = Math.pow(le, ve), oe = Math.pow(oe, ve) - le, ve = 1 / ve, function(ue) {
                return Math.pow(le + ue * oe, ve);
              };
            }(te, ie, X) : r(isNaN(te) ? ie : te);
          };
        }
        function d(X, te) {
          var ie = te - X;
          return ie ? n(X, ie) : r(isNaN(X) ? te : X);
        }
        var u = function X(te) {
          var ie = t(te);
          function le(oe, ve) {
            var ue = ie((oe = g.rgb(oe)).r, (ve = g.rgb(ve)).r), ye = ie(oe.g, ve.g), Ae = ie(oe.b, ve.b), pe = d(oe.opacity, ve.opacity);
            return function(ge) {
              return oe.r = ue(ge), oe.g = ye(ge), oe.b = Ae(ge), oe.opacity = pe(ge), oe + "";
            };
          }
          return le.gamma = X, le;
        }(1);
        function o(X) {
          return function(te) {
            var ie, le, oe = te.length, ve = new Array(oe), ue = new Array(oe), ye = new Array(oe);
            for (ie = 0; ie < oe; ++ie)
              le = g.rgb(te[ie]), ve[ie] = le.r || 0, ue[ie] = le.g || 0, ye[ie] = le.b || 0;
            return ve = X(ve), ue = X(ue), ye = X(ye), le.opacity = 1, function(Ae) {
              return le.r = ve(Ae), le.g = ue(Ae), le.b = ye(Ae), le + "";
            };
          };
        }
        var h = o(x), l = o(e);
        function i(X, te) {
          te || (te = []);
          var ie, le = X ? Math.min(te.length, X.length) : 0, oe = te.slice();
          return function(ve) {
            for (ie = 0; ie < le; ++ie)
              oe[ie] = X[ie] * (1 - ve) + te[ie] * ve;
            return oe;
          };
        }
        function p(X) {
          return ArrayBuffer.isView(X) && !(X instanceof DataView);
        }
        function c(X, te) {
          var ie, le = te ? te.length : 0, oe = X ? Math.min(le, X.length) : 0, ve = new Array(oe), ue = new Array(le);
          for (ie = 0; ie < oe; ++ie)
            ve[ie] = T(X[ie], te[ie]);
          for (; ie < le; ++ie)
            ue[ie] = te[ie];
          return function(ye) {
            for (ie = 0; ie < oe; ++ie)
              ue[ie] = ve[ie](ye);
            return ue;
          };
        }
        function a(X, te) {
          var ie = new Date();
          return X = +X, te = +te, function(le) {
            return ie.setTime(X * (1 - le) + te * le), ie;
          };
        }
        function y(X, te) {
          return X = +X, te = +te, function(ie) {
            return X * (1 - ie) + te * ie;
          };
        }
        function f(X, te) {
          var ie, le = {}, oe = {};
          for (ie in X !== null && typeof X == "object" || (X = {}), te !== null && typeof te == "object" || (te = {}), te)
            ie in X ? le[ie] = T(X[ie], te[ie]) : oe[ie] = te[ie];
          return function(ve) {
            for (ie in le)
              oe[ie] = le[ie](ve);
            return oe;
          };
        }
        var _ = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, b = new RegExp(_.source, "g");
        function w(X, te) {
          var ie, le, oe, ve = _.lastIndex = b.lastIndex = 0, ue = -1, ye = [], Ae = [];
          for (X += "", te += ""; (ie = _.exec(X)) && (le = b.exec(te)); )
            (oe = le.index) > ve && (oe = te.slice(ve, oe), ye[ue] ? ye[ue] += oe : ye[++ue] = oe), (ie = ie[0]) === (le = le[0]) ? ye[ue] ? ye[ue] += le : ye[++ue] = le : (ye[++ue] = null, Ae.push({ i: ue, x: y(ie, le) })), ve = b.lastIndex;
          return ve < te.length && (oe = te.slice(ve), ye[ue] ? ye[ue] += oe : ye[++ue] = oe), ye.length < 2 ? Ae[0] ? function(pe) {
            return function(ge) {
              return pe(ge) + "";
            };
          }(Ae[0].x) : function(pe) {
            return function() {
              return pe;
            };
          }(te) : (te = Ae.length, function(pe) {
            for (var ge, we = 0; we < te; ++we)
              ye[(ge = Ae[we]).i] = ge.x(pe);
            return ye.join("");
          });
        }
        function T(X, te) {
          var ie, le = typeof te;
          return te == null || le === "boolean" ? r(te) : (le === "number" ? y : le === "string" ? (ie = g.color(te)) ? (te = ie, u) : w : te instanceof g.color ? u : te instanceof Date ? a : p(te) ? i : Array.isArray(te) ? c : typeof te.valueOf != "function" && typeof te.toString != "function" || isNaN(te) ? f : y)(X, te);
        }
        var L, A, I, P, S = 180 / Math.PI, E = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 };
        function R(X, te, ie, le, oe, ve) {
          var ue, ye, Ae;
          return (ue = Math.sqrt(X * X + te * te)) && (X /= ue, te /= ue), (Ae = X * ie + te * le) && (ie -= X * Ae, le -= te * Ae), (ye = Math.sqrt(ie * ie + le * le)) && (ie /= ye, le /= ye, Ae /= ye), X * le < te * ie && (X = -X, te = -te, Ae = -Ae, ue = -ue), { translateX: oe, translateY: ve, rotate: Math.atan2(te, X) * S, skewX: Math.atan(Ae) * S, scaleX: ue, scaleY: ye };
        }
        function z(X, te, ie, le) {
          function oe(ve) {
            return ve.length ? ve.pop() + " " : "";
          }
          return function(ve, ue) {
            var ye = [], Ae = [];
            return ve = X(ve), ue = X(ue), function(pe, ge, we, se, de, Te) {
              if (pe !== we || ge !== se) {
                var Ee = de.push("translate(", null, te, null, ie);
                Te.push({ i: Ee - 4, x: y(pe, we) }, { i: Ee - 2, x: y(ge, se) });
              } else
                (we || se) && de.push("translate(" + we + te + se + ie);
            }(ve.translateX, ve.translateY, ue.translateX, ue.translateY, ye, Ae), function(pe, ge, we, se) {
              pe !== ge ? (pe - ge > 180 ? ge += 360 : ge - pe > 180 && (pe += 360), se.push({ i: we.push(oe(we) + "rotate(", null, le) - 2, x: y(pe, ge) })) : ge && we.push(oe(we) + "rotate(" + ge + le);
            }(ve.rotate, ue.rotate, ye, Ae), function(pe, ge, we, se) {
              pe !== ge ? se.push({ i: we.push(oe(we) + "skewX(", null, le) - 2, x: y(pe, ge) }) : ge && we.push(oe(we) + "skewX(" + ge + le);
            }(ve.skewX, ue.skewX, ye, Ae), function(pe, ge, we, se, de, Te) {
              if (pe !== we || ge !== se) {
                var Ee = de.push(oe(de) + "scale(", null, ",", null, ")");
                Te.push({ i: Ee - 4, x: y(pe, we) }, { i: Ee - 2, x: y(ge, se) });
              } else
                we === 1 && se === 1 || de.push(oe(de) + "scale(" + we + "," + se + ")");
            }(ve.scaleX, ve.scaleY, ue.scaleX, ue.scaleY, ye, Ae), ve = ue = null, function(pe) {
              for (var ge, we = -1, se = Ae.length; ++we < se; )
                ye[(ge = Ae[we]).i] = ge.x(pe);
              return ye.join("");
            };
          };
        }
        var j = z(function(X) {
          return X === "none" ? E : (L || (L = document.createElement("DIV"), A = document.documentElement, I = document.defaultView), L.style.transform = X, X = I.getComputedStyle(A.appendChild(L), null).getPropertyValue("transform"), A.removeChild(L), R(+(X = X.slice(7, -1).split(","))[0], +X[1], +X[2], +X[3], +X[4], +X[5]));
        }, "px, ", "px)", "deg)"), H = z(function(X) {
          return X == null ? E : (P || (P = document.createElementNS("http://www.w3.org/2000/svg", "g")), P.setAttribute("transform", X), (X = P.transform.baseVal.consolidate()) ? R((X = X.matrix).a, X.b, X.c, X.d, X.e, X.f) : E);
        }, ", ", ")", ")"), Y = Math.SQRT2;
        function J(X) {
          return ((X = Math.exp(X)) + 1 / X) / 2;
        }
        function W(X) {
          return function(te, ie) {
            var le = X((te = g.hsl(te)).h, (ie = g.hsl(ie)).h), oe = d(te.s, ie.s), ve = d(te.l, ie.l), ue = d(te.opacity, ie.opacity);
            return function(ye) {
              return te.h = le(ye), te.s = oe(ye), te.l = ve(ye), te.opacity = ue(ye), te + "";
            };
          };
        }
        var Z = W(s), re = W(d);
        function V(X) {
          return function(te, ie) {
            var le = X((te = g.hcl(te)).h, (ie = g.hcl(ie)).h), oe = d(te.c, ie.c), ve = d(te.l, ie.l), ue = d(te.opacity, ie.opacity);
            return function(ye) {
              return te.h = le(ye), te.c = oe(ye), te.l = ve(ye), te.opacity = ue(ye), te + "";
            };
          };
        }
        var B = V(s), U = V(d);
        function ee(X) {
          return function te(ie) {
            function le(oe, ve) {
              var ue = X((oe = g.cubehelix(oe)).h, (ve = g.cubehelix(ve)).h), ye = d(oe.s, ve.s), Ae = d(oe.l, ve.l), pe = d(oe.opacity, ve.opacity);
              return function(ge) {
                return oe.h = ue(ge), oe.s = ye(ge), oe.l = Ae(Math.pow(ge, ie)), oe.opacity = pe(ge), oe + "";
              };
            }
            return ie = +ie, le.gamma = te, le;
          }(1);
        }
        var N = ee(s), K = ee(d);
        m.interpolate = T, m.interpolateArray = function(X, te) {
          return (p(te) ? i : c)(X, te);
        }, m.interpolateBasis = x, m.interpolateBasisClosed = e, m.interpolateCubehelix = N, m.interpolateCubehelixLong = K, m.interpolateDate = a, m.interpolateDiscrete = function(X) {
          var te = X.length;
          return function(ie) {
            return X[Math.max(0, Math.min(te - 1, Math.floor(ie * te)))];
          };
        }, m.interpolateHcl = B, m.interpolateHclLong = U, m.interpolateHsl = Z, m.interpolateHslLong = re, m.interpolateHue = function(X, te) {
          var ie = s(+X, +te);
          return function(le) {
            var oe = ie(le);
            return oe - 360 * Math.floor(oe / 360);
          };
        }, m.interpolateLab = function(X, te) {
          var ie = d((X = g.lab(X)).l, (te = g.lab(te)).l), le = d(X.a, te.a), oe = d(X.b, te.b), ve = d(X.opacity, te.opacity);
          return function(ue) {
            return X.l = ie(ue), X.a = le(ue), X.b = oe(ue), X.opacity = ve(ue), X + "";
          };
        }, m.interpolateNumber = y, m.interpolateNumberArray = i, m.interpolateObject = f, m.interpolateRgb = u, m.interpolateRgbBasis = h, m.interpolateRgbBasisClosed = l, m.interpolateRound = function(X, te) {
          return X = +X, te = +te, function(ie) {
            return Math.round(X * (1 - ie) + te * ie);
          };
        }, m.interpolateString = w, m.interpolateTransformCss = j, m.interpolateTransformSvg = H, m.interpolateZoom = function(X, te) {
          var ie, le, oe = X[0], ve = X[1], ue = X[2], ye = te[0], Ae = te[1], pe = te[2], ge = ye - oe, we = Ae - ve, se = ge * ge + we * we;
          if (se < 1e-12)
            le = Math.log(pe / ue) / Y, ie = function(Ie) {
              return [oe + Ie * ge, ve + Ie * we, ue * Math.exp(Y * Ie * le)];
            };
          else {
            var de = Math.sqrt(se), Te = (pe * pe - ue * ue + 4 * se) / (2 * ue * 2 * de), Ee = (pe * pe - ue * ue - 4 * se) / (2 * pe * 2 * de), Me = Math.log(Math.sqrt(Te * Te + 1) - Te), ze = Math.log(Math.sqrt(Ee * Ee + 1) - Ee);
            le = (ze - Me) / Y, ie = function(Ie) {
              var Oe, Ze = Ie * le, Fe = J(Me), Pe = ue / (2 * de) * (Fe * (Oe = Y * Ze + Me, ((Oe = Math.exp(2 * Oe)) - 1) / (Oe + 1)) - function(De) {
                return ((De = Math.exp(De)) - 1 / De) / 2;
              }(Me));
              return [oe + Pe * ge, ve + Pe * we, ue * Fe / J(Y * Ze + Me)];
            };
          }
          return ie.duration = 1e3 * le, ie;
        }, m.piecewise = function(X, te) {
          for (var ie = 0, le = te.length - 1, oe = te[0], ve = new Array(le < 0 ? 0 : le); ie < le; )
            ve[ie] = X(oe, oe = te[++ie]);
          return function(ue) {
            var ye = Math.max(0, Math.min(le - 1, Math.floor(ue *= le)));
            return ve[ye](ue - ye);
          };
        }, m.quantize = function(X, te) {
          for (var ie = new Array(te), le = 0; le < te; ++le)
            ie[le] = X(le / (te - 1));
          return ie;
        }, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-color": 109 }], 117: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        var g = Math.PI, k = 2 * g, x = k - 1e-6;
        function e() {
          this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
        }
        function r() {
          return new e();
        }
        e.prototype = r.prototype = { constructor: e, moveTo: function(n, s) {
          this._ += "M" + (this._x0 = this._x1 = +n) + "," + (this._y0 = this._y1 = +s);
        }, closePath: function() {
          this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
        }, lineTo: function(n, s) {
          this._ += "L" + (this._x1 = +n) + "," + (this._y1 = +s);
        }, quadraticCurveTo: function(n, s, t, d) {
          this._ += "Q" + +n + "," + +s + "," + (this._x1 = +t) + "," + (this._y1 = +d);
        }, bezierCurveTo: function(n, s, t, d, u, o) {
          this._ += "C" + +n + "," + +s + "," + +t + "," + +d + "," + (this._x1 = +u) + "," + (this._y1 = +o);
        }, arcTo: function(n, s, t, d, u) {
          n = +n, s = +s, t = +t, d = +d, u = +u;
          var o = this._x1, h = this._y1, l = t - n, i = d - s, p = o - n, c = h - s, a = p * p + c * c;
          if (u < 0)
            throw new Error("negative radius: " + u);
          if (this._x1 === null)
            this._ += "M" + (this._x1 = n) + "," + (this._y1 = s);
          else if (a > 1e-6)
            if (Math.abs(c * l - i * p) > 1e-6 && u) {
              var y = t - o, f = d - h, _ = l * l + i * i, b = y * y + f * f, w = Math.sqrt(_), T = Math.sqrt(a), L = u * Math.tan((g - Math.acos((_ + a - b) / (2 * w * T))) / 2), A = L / T, I = L / w;
              Math.abs(A - 1) > 1e-6 && (this._ += "L" + (n + A * p) + "," + (s + A * c)), this._ += "A" + u + "," + u + ",0,0," + +(c * y > p * f) + "," + (this._x1 = n + I * l) + "," + (this._y1 = s + I * i);
            } else
              this._ += "L" + (this._x1 = n) + "," + (this._y1 = s);
        }, arc: function(n, s, t, d, u, o) {
          n = +n, s = +s, o = !!o;
          var h = (t = +t) * Math.cos(d), l = t * Math.sin(d), i = n + h, p = s + l, c = 1 ^ o, a = o ? d - u : u - d;
          if (t < 0)
            throw new Error("negative radius: " + t);
          this._x1 === null ? this._ += "M" + i + "," + p : (Math.abs(this._x1 - i) > 1e-6 || Math.abs(this._y1 - p) > 1e-6) && (this._ += "L" + i + "," + p), t && (a < 0 && (a = a % k + k), a > x ? this._ += "A" + t + "," + t + ",0,1," + c + "," + (n - h) + "," + (s - l) + "A" + t + "," + t + ",0,1," + c + "," + (this._x1 = i) + "," + (this._y1 = p) : a > 1e-6 && (this._ += "A" + t + "," + t + ",0," + +(a >= g) + "," + c + "," + (this._x1 = n + t * Math.cos(u)) + "," + (this._y1 = s + t * Math.sin(u))));
        }, rect: function(n, s, t, d) {
          this._ += "M" + (this._x0 = this._x1 = +n) + "," + (this._y0 = this._y1 = +s) + "h" + +t + "v" + +d + "h" + -t + "Z";
        }, toString: function() {
          return this._;
        } }, m.path = r, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 118: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        function g(d, u, o, h) {
          if (isNaN(u) || isNaN(o))
            return d;
          var l, i, p, c, a, y, f, _, b, w = d._root, T = { data: h }, L = d._x0, A = d._y0, I = d._x1, P = d._y1;
          if (!w)
            return d._root = T, d;
          for (; w.length; )
            if ((y = u >= (i = (L + I) / 2)) ? L = i : I = i, (f = o >= (p = (A + P) / 2)) ? A = p : P = p, l = w, !(w = w[_ = f << 1 | y]))
              return l[_] = T, d;
          if (c = +d._x.call(null, w.data), a = +d._y.call(null, w.data), u === c && o === a)
            return T.next = w, l ? l[_] = T : d._root = T, d;
          do
            l = l ? l[_] = new Array(4) : d._root = new Array(4), (y = u >= (i = (L + I) / 2)) ? L = i : I = i, (f = o >= (p = (A + P) / 2)) ? A = p : P = p;
          while ((_ = f << 1 | y) == (b = (a >= p) << 1 | c >= i));
          return l[b] = w, l[_] = T, d;
        }
        function k(d, u, o, h, l) {
          this.node = d, this.x0 = u, this.y0 = o, this.x1 = h, this.y1 = l;
        }
        function x(d) {
          return d[0];
        }
        function e(d) {
          return d[1];
        }
        function r(d, u, o) {
          var h = new n(u == null ? x : u, o == null ? e : o, NaN, NaN, NaN, NaN);
          return d == null ? h : h.addAll(d);
        }
        function n(d, u, o, h, l, i) {
          this._x = d, this._y = u, this._x0 = o, this._y0 = h, this._x1 = l, this._y1 = i, this._root = void 0;
        }
        function s(d) {
          for (var u = { data: d.data }, o = u; d = d.next; )
            o = o.next = { data: d.data };
          return u;
        }
        var t = r.prototype = n.prototype;
        t.copy = function() {
          var d, u, o = new n(this._x, this._y, this._x0, this._y0, this._x1, this._y1), h = this._root;
          if (!h)
            return o;
          if (!h.length)
            return o._root = s(h), o;
          for (d = [{ source: h, target: o._root = new Array(4) }]; h = d.pop(); )
            for (var l = 0; l < 4; ++l)
              (u = h.source[l]) && (u.length ? d.push({ source: u, target: h.target[l] = new Array(4) }) : h.target[l] = s(u));
          return o;
        }, t.add = function(d) {
          var u = +this._x.call(null, d), o = +this._y.call(null, d);
          return g(this.cover(u, o), u, o, d);
        }, t.addAll = function(d) {
          var u, o, h, l, i = d.length, p = new Array(i), c = new Array(i), a = 1 / 0, y = 1 / 0, f = -1 / 0, _ = -1 / 0;
          for (o = 0; o < i; ++o)
            isNaN(h = +this._x.call(null, u = d[o])) || isNaN(l = +this._y.call(null, u)) || (p[o] = h, c[o] = l, h < a && (a = h), h > f && (f = h), l < y && (y = l), l > _ && (_ = l));
          if (a > f || y > _)
            return this;
          for (this.cover(a, y).cover(f, _), o = 0; o < i; ++o)
            g(this, p[o], c[o], d[o]);
          return this;
        }, t.cover = function(d, u) {
          if (isNaN(d = +d) || isNaN(u = +u))
            return this;
          var o = this._x0, h = this._y0, l = this._x1, i = this._y1;
          if (isNaN(o))
            l = (o = Math.floor(d)) + 1, i = (h = Math.floor(u)) + 1;
          else {
            for (var p, c, a = l - o, y = this._root; o > d || d >= l || h > u || u >= i; )
              switch (c = (u < h) << 1 | d < o, (p = new Array(4))[c] = y, y = p, a *= 2, c) {
                case 0:
                  l = o + a, i = h + a;
                  break;
                case 1:
                  o = l - a, i = h + a;
                  break;
                case 2:
                  l = o + a, h = i - a;
                  break;
                case 3:
                  o = l - a, h = i - a;
              }
            this._root && this._root.length && (this._root = y);
          }
          return this._x0 = o, this._y0 = h, this._x1 = l, this._y1 = i, this;
        }, t.data = function() {
          var d = [];
          return this.visit(function(u) {
            if (!u.length)
              do
                d.push(u.data);
              while (u = u.next);
          }), d;
        }, t.extent = function(d) {
          return arguments.length ? this.cover(+d[0][0], +d[0][1]).cover(+d[1][0], +d[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
        }, t.find = function(d, u, o) {
          var h, l, i, p, c, a, y, f = this._x0, _ = this._y0, b = this._x1, w = this._y1, T = [], L = this._root;
          for (L && T.push(new k(L, f, _, b, w)), o == null ? o = 1 / 0 : (f = d - o, _ = u - o, b = d + o, w = u + o, o *= o); a = T.pop(); )
            if (!(!(L = a.node) || (l = a.x0) > b || (i = a.y0) > w || (p = a.x1) < f || (c = a.y1) < _))
              if (L.length) {
                var A = (l + p) / 2, I = (i + c) / 2;
                T.push(new k(L[3], A, I, p, c), new k(L[2], l, I, A, c), new k(L[1], A, i, p, I), new k(L[0], l, i, A, I)), (y = (u >= I) << 1 | d >= A) && (a = T[T.length - 1], T[T.length - 1] = T[T.length - 1 - y], T[T.length - 1 - y] = a);
              } else {
                var P = d - +this._x.call(null, L.data), S = u - +this._y.call(null, L.data), E = P * P + S * S;
                if (E < o) {
                  var R = Math.sqrt(o = E);
                  f = d - R, _ = u - R, b = d + R, w = u + R, h = L.data;
                }
              }
          return h;
        }, t.remove = function(d) {
          if (isNaN(i = +this._x.call(null, d)) || isNaN(p = +this._y.call(null, d)))
            return this;
          var u, o, h, l, i, p, c, a, y, f, _, b, w = this._root, T = this._x0, L = this._y0, A = this._x1, I = this._y1;
          if (!w)
            return this;
          if (w.length)
            for (; ; ) {
              if ((y = i >= (c = (T + A) / 2)) ? T = c : A = c, (f = p >= (a = (L + I) / 2)) ? L = a : I = a, u = w, !(w = w[_ = f << 1 | y]))
                return this;
              if (!w.length)
                break;
              (u[_ + 1 & 3] || u[_ + 2 & 3] || u[_ + 3 & 3]) && (o = u, b = _);
            }
          for (; w.data !== d; )
            if (h = w, !(w = w.next))
              return this;
          return (l = w.next) && delete w.next, h ? (l ? h.next = l : delete h.next, this) : u ? (l ? u[_] = l : delete u[_], (w = u[0] || u[1] || u[2] || u[3]) && w === (u[3] || u[2] || u[1] || u[0]) && !w.length && (o ? o[b] = w : this._root = w), this) : (this._root = l, this);
        }, t.removeAll = function(d) {
          for (var u = 0, o = d.length; u < o; ++u)
            this.remove(d[u]);
          return this;
        }, t.root = function() {
          return this._root;
        }, t.size = function() {
          var d = 0;
          return this.visit(function(u) {
            if (!u.length)
              do
                ++d;
              while (u = u.next);
          }), d;
        }, t.visit = function(d) {
          var u, o, h, l, i, p, c = [], a = this._root;
          for (a && c.push(new k(a, this._x0, this._y0, this._x1, this._y1)); u = c.pop(); )
            if (!d(a = u.node, h = u.x0, l = u.y0, i = u.x1, p = u.y1) && a.length) {
              var y = (h + i) / 2, f = (l + p) / 2;
              (o = a[3]) && c.push(new k(o, y, f, i, p)), (o = a[2]) && c.push(new k(o, h, f, y, p)), (o = a[1]) && c.push(new k(o, y, l, i, f)), (o = a[0]) && c.push(new k(o, h, l, y, f));
            }
          return this;
        }, t.visitAfter = function(d) {
          var u, o = [], h = [];
          for (this._root && o.push(new k(this._root, this._x0, this._y0, this._x1, this._y1)); u = o.pop(); ) {
            var l = u.node;
            if (l.length) {
              var i, p = u.x0, c = u.y0, a = u.x1, y = u.y1, f = (p + a) / 2, _ = (c + y) / 2;
              (i = l[0]) && o.push(new k(i, p, c, f, _)), (i = l[1]) && o.push(new k(i, f, c, a, _)), (i = l[2]) && o.push(new k(i, p, _, f, y)), (i = l[3]) && o.push(new k(i, f, _, a, y));
            }
            h.push(u);
          }
          for (; u = h.pop(); )
            d(u.node, u.x0, u.y0, u.x1, u.y1);
          return this;
        }, t.x = function(d) {
          return arguments.length ? (this._x = d, this) : this._x;
        }, t.y = function(d) {
          return arguments.length ? (this._y = d, this) : this._y;
        }, m.quadtree = r, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 119: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-path")) : g((m = m || self).d3 = m.d3 || {}, m.d3);
      })(this, function(m, g) {
        function k(Se) {
          return function() {
            return Se;
          };
        }
        var x = Math.abs, e = Math.atan2, r = Math.cos, n = Math.max, s = Math.min, t = Math.sin, d = Math.sqrt, u = Math.PI, o = u / 2, h = 2 * u;
        function l(Se) {
          return Se > 1 ? 0 : Se < -1 ? u : Math.acos(Se);
        }
        function i(Se) {
          return Se >= 1 ? o : Se <= -1 ? -o : Math.asin(Se);
        }
        function p(Se) {
          return Se.innerRadius;
        }
        function c(Se) {
          return Se.outerRadius;
        }
        function a(Se) {
          return Se.startAngle;
        }
        function y(Se) {
          return Se.endAngle;
        }
        function f(Se) {
          return Se && Se.padAngle;
        }
        function _(Se, We, nt, ft, Mt, Nt, Zt, Ut) {
          var fr = nt - Se, Tr = ft - We, ur = Zt - Mt, Kt = Ut - Nt, $t = Kt * fr - ur * Tr;
          if (!($t * $t < 1e-12))
            return [Se + ($t = (ur * (We - Nt) - Kt * (Se - Mt)) / $t) * fr, We + $t * Tr];
        }
        function b(Se, We, nt, ft, Mt, Nt, Zt) {
          var Ut = Se - nt, fr = We - ft, Tr = (Zt ? Nt : -Nt) / d(Ut * Ut + fr * fr), ur = Tr * fr, Kt = -Tr * Ut, $t = Se + ur, er = We + Kt, cr = nt + ur, gr = ft + Kt, Mr = ($t + cr) / 2, Ir = (er + gr) / 2, Fr = cr - $t, Gr = gr - er, un = Fr * Fr + Gr * Gr, $r = Mt - Nt, Dn = $t * gr - cr * er, rn = (Gr < 0 ? -1 : 1) * d(n(0, $r * $r * un - Dn * Dn)), vn = (Dn * Gr - Fr * rn) / un, xn = (-Dn * Fr - Gr * rn) / un, $n = (Dn * Gr + Fr * rn) / un, Br = (-Dn * Fr + Gr * rn) / un, tn = vn - Mr, mn = xn - Ir, Qr = $n - Mr, cn = Br - Ir;
          return tn * tn + mn * mn > Qr * Qr + cn * cn && (vn = $n, xn = Br), { cx: vn, cy: xn, x01: -ur, y01: -Kt, x11: vn * (Mt / $r - 1), y11: xn * (Mt / $r - 1) };
        }
        function w(Se) {
          this._context = Se;
        }
        function T(Se) {
          return new w(Se);
        }
        function L(Se) {
          return Se[0];
        }
        function A(Se) {
          return Se[1];
        }
        function I() {
          var Se = L, We = A, nt = k(!0), ft = null, Mt = T, Nt = null;
          function Zt(Ut) {
            var fr, Tr, ur, Kt = Ut.length, $t = !1;
            for (ft == null && (Nt = Mt(ur = g.path())), fr = 0; fr <= Kt; ++fr)
              !(fr < Kt && nt(Tr = Ut[fr], fr, Ut)) === $t && (($t = !$t) ? Nt.lineStart() : Nt.lineEnd()), $t && Nt.point(+Se(Tr, fr, Ut), +We(Tr, fr, Ut));
            if (ur)
              return Nt = null, ur + "" || null;
          }
          return Zt.x = function(Ut) {
            return arguments.length ? (Se = typeof Ut == "function" ? Ut : k(+Ut), Zt) : Se;
          }, Zt.y = function(Ut) {
            return arguments.length ? (We = typeof Ut == "function" ? Ut : k(+Ut), Zt) : We;
          }, Zt.defined = function(Ut) {
            return arguments.length ? (nt = typeof Ut == "function" ? Ut : k(!!Ut), Zt) : nt;
          }, Zt.curve = function(Ut) {
            return arguments.length ? (Mt = Ut, ft != null && (Nt = Mt(ft)), Zt) : Mt;
          }, Zt.context = function(Ut) {
            return arguments.length ? (Ut == null ? ft = Nt = null : Nt = Mt(ft = Ut), Zt) : ft;
          }, Zt;
        }
        function P() {
          var Se = L, We = null, nt = k(0), ft = A, Mt = k(!0), Nt = null, Zt = T, Ut = null;
          function fr(ur) {
            var Kt, $t, er, cr, gr, Mr = ur.length, Ir = !1, Fr = new Array(Mr), Gr = new Array(Mr);
            for (Nt == null && (Ut = Zt(gr = g.path())), Kt = 0; Kt <= Mr; ++Kt) {
              if (!(Kt < Mr && Mt(cr = ur[Kt], Kt, ur)) === Ir)
                if (Ir = !Ir)
                  $t = Kt, Ut.areaStart(), Ut.lineStart();
                else {
                  for (Ut.lineEnd(), Ut.lineStart(), er = Kt - 1; er >= $t; --er)
                    Ut.point(Fr[er], Gr[er]);
                  Ut.lineEnd(), Ut.areaEnd();
                }
              Ir && (Fr[Kt] = +Se(cr, Kt, ur), Gr[Kt] = +nt(cr, Kt, ur), Ut.point(We ? +We(cr, Kt, ur) : Fr[Kt], ft ? +ft(cr, Kt, ur) : Gr[Kt]));
            }
            if (gr)
              return Ut = null, gr + "" || null;
          }
          function Tr() {
            return I().defined(Mt).curve(Zt).context(Nt);
          }
          return fr.x = function(ur) {
            return arguments.length ? (Se = typeof ur == "function" ? ur : k(+ur), We = null, fr) : Se;
          }, fr.x0 = function(ur) {
            return arguments.length ? (Se = typeof ur == "function" ? ur : k(+ur), fr) : Se;
          }, fr.x1 = function(ur) {
            return arguments.length ? (We = ur == null ? null : typeof ur == "function" ? ur : k(+ur), fr) : We;
          }, fr.y = function(ur) {
            return arguments.length ? (nt = typeof ur == "function" ? ur : k(+ur), ft = null, fr) : nt;
          }, fr.y0 = function(ur) {
            return arguments.length ? (nt = typeof ur == "function" ? ur : k(+ur), fr) : nt;
          }, fr.y1 = function(ur) {
            return arguments.length ? (ft = ur == null ? null : typeof ur == "function" ? ur : k(+ur), fr) : ft;
          }, fr.lineX0 = fr.lineY0 = function() {
            return Tr().x(Se).y(nt);
          }, fr.lineY1 = function() {
            return Tr().x(Se).y(ft);
          }, fr.lineX1 = function() {
            return Tr().x(We).y(nt);
          }, fr.defined = function(ur) {
            return arguments.length ? (Mt = typeof ur == "function" ? ur : k(!!ur), fr) : Mt;
          }, fr.curve = function(ur) {
            return arguments.length ? (Zt = ur, Nt != null && (Ut = Zt(Nt)), fr) : Zt;
          }, fr.context = function(ur) {
            return arguments.length ? (ur == null ? Nt = Ut = null : Ut = Zt(Nt = ur), fr) : Nt;
          }, fr;
        }
        function S(Se, We) {
          return We < Se ? -1 : We > Se ? 1 : We >= Se ? 0 : NaN;
        }
        function E(Se) {
          return Se;
        }
        w.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._point = 0;
        }, lineEnd: function() {
          (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1, this._line ? this._context.lineTo(Se, We) : this._context.moveTo(Se, We);
              break;
            case 1:
              this._point = 2;
            default:
              this._context.lineTo(Se, We);
          }
        } };
        var R = j(T);
        function z(Se) {
          this._curve = Se;
        }
        function j(Se) {
          function We(nt) {
            return new z(Se(nt));
          }
          return We._curve = Se, We;
        }
        function H(Se) {
          var We = Se.curve;
          return Se.angle = Se.x, delete Se.x, Se.radius = Se.y, delete Se.y, Se.curve = function(nt) {
            return arguments.length ? We(j(nt)) : We()._curve;
          }, Se;
        }
        function Y() {
          return H(I().curve(R));
        }
        function J() {
          var Se = P().curve(R), We = Se.curve, nt = Se.lineX0, ft = Se.lineX1, Mt = Se.lineY0, Nt = Se.lineY1;
          return Se.angle = Se.x, delete Se.x, Se.startAngle = Se.x0, delete Se.x0, Se.endAngle = Se.x1, delete Se.x1, Se.radius = Se.y, delete Se.y, Se.innerRadius = Se.y0, delete Se.y0, Se.outerRadius = Se.y1, delete Se.y1, Se.lineStartAngle = function() {
            return H(nt());
          }, delete Se.lineX0, Se.lineEndAngle = function() {
            return H(ft());
          }, delete Se.lineX1, Se.lineInnerRadius = function() {
            return H(Mt());
          }, delete Se.lineY0, Se.lineOuterRadius = function() {
            return H(Nt());
          }, delete Se.lineY1, Se.curve = function(Zt) {
            return arguments.length ? We(j(Zt)) : We()._curve;
          }, Se;
        }
        function W(Se, We) {
          return [(We = +We) * Math.cos(Se -= Math.PI / 2), We * Math.sin(Se)];
        }
        z.prototype = { areaStart: function() {
          this._curve.areaStart();
        }, areaEnd: function() {
          this._curve.areaEnd();
        }, lineStart: function() {
          this._curve.lineStart();
        }, lineEnd: function() {
          this._curve.lineEnd();
        }, point: function(Se, We) {
          this._curve.point(We * Math.sin(Se), We * -Math.cos(Se));
        } };
        var Z = Array.prototype.slice;
        function re(Se) {
          return Se.source;
        }
        function V(Se) {
          return Se.target;
        }
        function B(Se) {
          var We = re, nt = V, ft = L, Mt = A, Nt = null;
          function Zt() {
            var Ut, fr = Z.call(arguments), Tr = We.apply(this, fr), ur = nt.apply(this, fr);
            if (Nt || (Nt = Ut = g.path()), Se(Nt, +ft.apply(this, (fr[0] = Tr, fr)), +Mt.apply(this, fr), +ft.apply(this, (fr[0] = ur, fr)), +Mt.apply(this, fr)), Ut)
              return Nt = null, Ut + "" || null;
          }
          return Zt.source = function(Ut) {
            return arguments.length ? (We = Ut, Zt) : We;
          }, Zt.target = function(Ut) {
            return arguments.length ? (nt = Ut, Zt) : nt;
          }, Zt.x = function(Ut) {
            return arguments.length ? (ft = typeof Ut == "function" ? Ut : k(+Ut), Zt) : ft;
          }, Zt.y = function(Ut) {
            return arguments.length ? (Mt = typeof Ut == "function" ? Ut : k(+Ut), Zt) : Mt;
          }, Zt.context = function(Ut) {
            return arguments.length ? (Nt = Ut == null ? null : Ut, Zt) : Nt;
          }, Zt;
        }
        function U(Se, We, nt, ft, Mt) {
          Se.moveTo(We, nt), Se.bezierCurveTo(We = (We + ft) / 2, nt, We, Mt, ft, Mt);
        }
        function ee(Se, We, nt, ft, Mt) {
          Se.moveTo(We, nt), Se.bezierCurveTo(We, nt = (nt + Mt) / 2, ft, nt, ft, Mt);
        }
        function N(Se, We, nt, ft, Mt) {
          var Nt = W(We, nt), Zt = W(We, nt = (nt + Mt) / 2), Ut = W(ft, nt), fr = W(ft, Mt);
          Se.moveTo(Nt[0], Nt[1]), Se.bezierCurveTo(Zt[0], Zt[1], Ut[0], Ut[1], fr[0], fr[1]);
        }
        var K = { draw: function(Se, We) {
          var nt = Math.sqrt(We / u);
          Se.moveTo(nt, 0), Se.arc(0, 0, nt, 0, h);
        } }, X = { draw: function(Se, We) {
          var nt = Math.sqrt(We / 5) / 2;
          Se.moveTo(-3 * nt, -nt), Se.lineTo(-nt, -nt), Se.lineTo(-nt, -3 * nt), Se.lineTo(nt, -3 * nt), Se.lineTo(nt, -nt), Se.lineTo(3 * nt, -nt), Se.lineTo(3 * nt, nt), Se.lineTo(nt, nt), Se.lineTo(nt, 3 * nt), Se.lineTo(-nt, 3 * nt), Se.lineTo(-nt, nt), Se.lineTo(-3 * nt, nt), Se.closePath();
        } }, te = Math.sqrt(1 / 3), ie = 2 * te, le = { draw: function(Se, We) {
          var nt = Math.sqrt(We / ie), ft = nt * te;
          Se.moveTo(0, -nt), Se.lineTo(ft, 0), Se.lineTo(0, nt), Se.lineTo(-ft, 0), Se.closePath();
        } }, oe = Math.sin(u / 10) / Math.sin(7 * u / 10), ve = Math.sin(h / 10) * oe, ue = -Math.cos(h / 10) * oe, ye = { draw: function(Se, We) {
          var nt = Math.sqrt(0.8908130915292852 * We), ft = ve * nt, Mt = ue * nt;
          Se.moveTo(0, -nt), Se.lineTo(ft, Mt);
          for (var Nt = 1; Nt < 5; ++Nt) {
            var Zt = h * Nt / 5, Ut = Math.cos(Zt), fr = Math.sin(Zt);
            Se.lineTo(fr * nt, -Ut * nt), Se.lineTo(Ut * ft - fr * Mt, fr * ft + Ut * Mt);
          }
          Se.closePath();
        } }, Ae = { draw: function(Se, We) {
          var nt = Math.sqrt(We), ft = -nt / 2;
          Se.rect(ft, ft, nt, nt);
        } }, pe = Math.sqrt(3), ge = { draw: function(Se, We) {
          var nt = -Math.sqrt(We / (3 * pe));
          Se.moveTo(0, 2 * nt), Se.lineTo(-pe * nt, -nt), Se.lineTo(pe * nt, -nt), Se.closePath();
        } }, we = -0.5, se = Math.sqrt(3) / 2, de = 1 / Math.sqrt(12), Te = 3 * (de / 2 + 1), Ee = { draw: function(Se, We) {
          var nt = Math.sqrt(We / Te), ft = nt / 2, Mt = nt * de, Nt = ft, Zt = nt * de + nt, Ut = -Nt, fr = Zt;
          Se.moveTo(ft, Mt), Se.lineTo(Nt, Zt), Se.lineTo(Ut, fr), Se.lineTo(we * ft - se * Mt, se * ft + we * Mt), Se.lineTo(we * Nt - se * Zt, se * Nt + we * Zt), Se.lineTo(we * Ut - se * fr, se * Ut + we * fr), Se.lineTo(we * ft + se * Mt, we * Mt - se * ft), Se.lineTo(we * Nt + se * Zt, we * Zt - se * Nt), Se.lineTo(we * Ut + se * fr, we * fr - se * Ut), Se.closePath();
        } }, Me = [K, X, le, Ae, ye, ge, Ee];
        function ze() {
        }
        function Ie(Se, We, nt) {
          Se._context.bezierCurveTo((2 * Se._x0 + Se._x1) / 3, (2 * Se._y0 + Se._y1) / 3, (Se._x0 + 2 * Se._x1) / 3, (Se._y0 + 2 * Se._y1) / 3, (Se._x0 + 4 * Se._x1 + We) / 6, (Se._y0 + 4 * Se._y1 + nt) / 6);
        }
        function Oe(Se) {
          this._context = Se;
        }
        function Ze(Se) {
          this._context = Se;
        }
        function Fe(Se) {
          this._context = Se;
        }
        function Pe(Se, We) {
          this._basis = new Oe(Se), this._beta = We;
        }
        Oe.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 3:
              Ie(this, this._x1, this._y1);
            case 2:
              this._context.lineTo(this._x1, this._y1);
          }
          (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1, this._line ? this._context.lineTo(Se, We) : this._context.moveTo(Se, We);
              break;
            case 1:
              this._point = 2;
              break;
            case 2:
              this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
            default:
              Ie(this, Se, We);
          }
          this._x0 = this._x1, this._x1 = Se, this._y0 = this._y1, this._y1 = We;
        } }, Ze.prototype = { areaStart: ze, areaEnd: ze, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 1:
              this._context.moveTo(this._x2, this._y2), this._context.closePath();
              break;
            case 2:
              this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
              break;
            case 3:
              this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
          }
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1, this._x2 = Se, this._y2 = We;
              break;
            case 1:
              this._point = 2, this._x3 = Se, this._y3 = We;
              break;
            case 2:
              this._point = 3, this._x4 = Se, this._y4 = We, this._context.moveTo((this._x0 + 4 * this._x1 + Se) / 6, (this._y0 + 4 * this._y1 + We) / 6);
              break;
            default:
              Ie(this, Se, We);
          }
          this._x0 = this._x1, this._x1 = Se, this._y0 = this._y1, this._y1 = We;
        } }, Fe.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
        }, lineEnd: function() {
          (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1;
              break;
            case 1:
              this._point = 2;
              break;
            case 2:
              this._point = 3;
              var nt = (this._x0 + 4 * this._x1 + Se) / 6, ft = (this._y0 + 4 * this._y1 + We) / 6;
              this._line ? this._context.lineTo(nt, ft) : this._context.moveTo(nt, ft);
              break;
            case 3:
              this._point = 4;
            default:
              Ie(this, Se, We);
          }
          this._x0 = this._x1, this._x1 = Se, this._y0 = this._y1, this._y1 = We;
        } }, Pe.prototype = { lineStart: function() {
          this._x = [], this._y = [], this._basis.lineStart();
        }, lineEnd: function() {
          var Se = this._x, We = this._y, nt = Se.length - 1;
          if (nt > 0)
            for (var ft, Mt = Se[0], Nt = We[0], Zt = Se[nt] - Mt, Ut = We[nt] - Nt, fr = -1; ++fr <= nt; )
              ft = fr / nt, this._basis.point(this._beta * Se[fr] + (1 - this._beta) * (Mt + ft * Zt), this._beta * We[fr] + (1 - this._beta) * (Nt + ft * Ut));
          this._x = this._y = null, this._basis.lineEnd();
        }, point: function(Se, We) {
          this._x.push(+Se), this._y.push(+We);
        } };
        var De = function Se(We) {
          function nt(ft) {
            return We === 1 ? new Oe(ft) : new Pe(ft, We);
          }
          return nt.beta = function(ft) {
            return Se(+ft);
          }, nt;
        }(0.85);
        function Ge(Se, We, nt) {
          Se._context.bezierCurveTo(Se._x1 + Se._k * (Se._x2 - Se._x0), Se._y1 + Se._k * (Se._y2 - Se._y0), Se._x2 + Se._k * (Se._x1 - We), Se._y2 + Se._k * (Se._y1 - nt), Se._x2, Se._y2);
        }
        function Qe(Se, We) {
          this._context = Se, this._k = (1 - We) / 6;
        }
        Qe.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 2:
              this._context.lineTo(this._x2, this._y2);
              break;
            case 3:
              Ge(this, this._x1, this._y1);
          }
          (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1, this._line ? this._context.lineTo(Se, We) : this._context.moveTo(Se, We);
              break;
            case 1:
              this._point = 2, this._x1 = Se, this._y1 = We;
              break;
            case 2:
              this._point = 3;
            default:
              Ge(this, Se, We);
          }
          this._x0 = this._x1, this._x1 = this._x2, this._x2 = Se, this._y0 = this._y1, this._y1 = this._y2, this._y2 = We;
        } };
        var ot = function Se(We) {
          function nt(ft) {
            return new Qe(ft, We);
          }
          return nt.tension = function(ft) {
            return Se(+ft);
          }, nt;
        }(0);
        function vt(Se, We) {
          this._context = Se, this._k = (1 - We) / 6;
        }
        vt.prototype = { areaStart: ze, areaEnd: ze, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 1:
              this._context.moveTo(this._x3, this._y3), this._context.closePath();
              break;
            case 2:
              this._context.lineTo(this._x3, this._y3), this._context.closePath();
              break;
            case 3:
              this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
          }
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1, this._x3 = Se, this._y3 = We;
              break;
            case 1:
              this._point = 2, this._context.moveTo(this._x4 = Se, this._y4 = We);
              break;
            case 2:
              this._point = 3, this._x5 = Se, this._y5 = We;
              break;
            default:
              Ge(this, Se, We);
          }
          this._x0 = this._x1, this._x1 = this._x2, this._x2 = Se, this._y0 = this._y1, this._y1 = this._y2, this._y2 = We;
        } };
        var bt = function Se(We) {
          function nt(ft) {
            return new vt(ft, We);
          }
          return nt.tension = function(ft) {
            return Se(+ft);
          }, nt;
        }(0);
        function yt(Se, We) {
          this._context = Se, this._k = (1 - We) / 6;
        }
        yt.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
        }, lineEnd: function() {
          (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1;
              break;
            case 1:
              this._point = 2;
              break;
            case 2:
              this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
              break;
            case 3:
              this._point = 4;
            default:
              Ge(this, Se, We);
          }
          this._x0 = this._x1, this._x1 = this._x2, this._x2 = Se, this._y0 = this._y1, this._y1 = this._y2, this._y2 = We;
        } };
        var tt = function Se(We) {
          function nt(ft) {
            return new yt(ft, We);
          }
          return nt.tension = function(ft) {
            return Se(+ft);
          }, nt;
        }(0);
        function Ke(Se, We, nt) {
          var ft = Se._x1, Mt = Se._y1, Nt = Se._x2, Zt = Se._y2;
          if (Se._l01_a > 1e-12) {
            var Ut = 2 * Se._l01_2a + 3 * Se._l01_a * Se._l12_a + Se._l12_2a, fr = 3 * Se._l01_a * (Se._l01_a + Se._l12_a);
            ft = (ft * Ut - Se._x0 * Se._l12_2a + Se._x2 * Se._l01_2a) / fr, Mt = (Mt * Ut - Se._y0 * Se._l12_2a + Se._y2 * Se._l01_2a) / fr;
          }
          if (Se._l23_a > 1e-12) {
            var Tr = 2 * Se._l23_2a + 3 * Se._l23_a * Se._l12_a + Se._l12_2a, ur = 3 * Se._l23_a * (Se._l23_a + Se._l12_a);
            Nt = (Nt * Tr + Se._x1 * Se._l23_2a - We * Se._l12_2a) / ur, Zt = (Zt * Tr + Se._y1 * Se._l23_2a - nt * Se._l12_2a) / ur;
          }
          Se._context.bezierCurveTo(ft, Mt, Nt, Zt, Se._x2, Se._y2);
        }
        function mt(Se, We) {
          this._context = Se, this._alpha = We;
        }
        mt.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 2:
              this._context.lineTo(this._x2, this._y2);
              break;
            case 3:
              this.point(this._x2, this._y2);
          }
          (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          if (Se = +Se, We = +We, this._point) {
            var nt = this._x2 - Se, ft = this._y2 - We;
            this._l23_a = Math.sqrt(this._l23_2a = Math.pow(nt * nt + ft * ft, this._alpha));
          }
          switch (this._point) {
            case 0:
              this._point = 1, this._line ? this._context.lineTo(Se, We) : this._context.moveTo(Se, We);
              break;
            case 1:
              this._point = 2;
              break;
            case 2:
              this._point = 3;
            default:
              Ke(this, Se, We);
          }
          this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = Se, this._y0 = this._y1, this._y1 = this._y2, this._y2 = We;
        } };
        var Ft = function Se(We) {
          function nt(ft) {
            return We ? new mt(ft, We) : new Qe(ft, 0);
          }
          return nt.alpha = function(ft) {
            return Se(+ft);
          }, nt;
        }(0.5);
        function Vt(Se, We) {
          this._context = Se, this._alpha = We;
        }
        Vt.prototype = { areaStart: ze, areaEnd: ze, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 1:
              this._context.moveTo(this._x3, this._y3), this._context.closePath();
              break;
            case 2:
              this._context.lineTo(this._x3, this._y3), this._context.closePath();
              break;
            case 3:
              this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
          }
        }, point: function(Se, We) {
          if (Se = +Se, We = +We, this._point) {
            var nt = this._x2 - Se, ft = this._y2 - We;
            this._l23_a = Math.sqrt(this._l23_2a = Math.pow(nt * nt + ft * ft, this._alpha));
          }
          switch (this._point) {
            case 0:
              this._point = 1, this._x3 = Se, this._y3 = We;
              break;
            case 1:
              this._point = 2, this._context.moveTo(this._x4 = Se, this._y4 = We);
              break;
            case 2:
              this._point = 3, this._x5 = Se, this._y5 = We;
              break;
            default:
              Ke(this, Se, We);
          }
          this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = Se, this._y0 = this._y1, this._y1 = this._y2, this._y2 = We;
        } };
        var Xt = function Se(We) {
          function nt(ft) {
            return We ? new Vt(ft, We) : new vt(ft, 0);
          }
          return nt.alpha = function(ft) {
            return Se(+ft);
          }, nt;
        }(0.5);
        function Gt(Se, We) {
          this._context = Se, this._alpha = We;
        }
        Gt.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
        }, lineEnd: function() {
          (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          if (Se = +Se, We = +We, this._point) {
            var nt = this._x2 - Se, ft = this._y2 - We;
            this._l23_a = Math.sqrt(this._l23_2a = Math.pow(nt * nt + ft * ft, this._alpha));
          }
          switch (this._point) {
            case 0:
              this._point = 1;
              break;
            case 1:
              this._point = 2;
              break;
            case 2:
              this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
              break;
            case 3:
              this._point = 4;
            default:
              Ke(this, Se, We);
          }
          this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = Se, this._y0 = this._y1, this._y1 = this._y2, this._y2 = We;
        } };
        var nr = function Se(We) {
          function nt(ft) {
            return We ? new Gt(ft, We) : new yt(ft, 0);
          }
          return nt.alpha = function(ft) {
            return Se(+ft);
          }, nt;
        }(0.5);
        function It(Se) {
          this._context = Se;
        }
        function Be(Se) {
          return Se < 0 ? -1 : 1;
        }
        function He(Se, We, nt) {
          var ft = Se._x1 - Se._x0, Mt = We - Se._x1, Nt = (Se._y1 - Se._y0) / (ft || Mt < 0 && -0), Zt = (nt - Se._y1) / (Mt || ft < 0 && -0), Ut = (Nt * Mt + Zt * ft) / (ft + Mt);
          return (Be(Nt) + Be(Zt)) * Math.min(Math.abs(Nt), Math.abs(Zt), 0.5 * Math.abs(Ut)) || 0;
        }
        function he(Se, We) {
          var nt = Se._x1 - Se._x0;
          return nt ? (3 * (Se._y1 - Se._y0) / nt - We) / 2 : We;
        }
        function be(Se, We, nt) {
          var ft = Se._x0, Mt = Se._y0, Nt = Se._x1, Zt = Se._y1, Ut = (Nt - ft) / 3;
          Se._context.bezierCurveTo(ft + Ut, Mt + Ut * We, Nt - Ut, Zt - Ut * nt, Nt, Zt);
        }
        function Re(Se) {
          this._context = Se;
        }
        function Ue(Se) {
          this._context = new Xe(Se);
        }
        function Xe(Se) {
          this._context = Se;
        }
        function qe(Se) {
          this._context = Se;
        }
        function st(Se) {
          var We, nt, ft = Se.length - 1, Mt = new Array(ft), Nt = new Array(ft), Zt = new Array(ft);
          for (Mt[0] = 0, Nt[0] = 2, Zt[0] = Se[0] + 2 * Se[1], We = 1; We < ft - 1; ++We)
            Mt[We] = 1, Nt[We] = 4, Zt[We] = 4 * Se[We] + 2 * Se[We + 1];
          for (Mt[ft - 1] = 2, Nt[ft - 1] = 7, Zt[ft - 1] = 8 * Se[ft - 1] + Se[ft], We = 1; We < ft; ++We)
            nt = Mt[We] / Nt[We - 1], Nt[We] -= nt, Zt[We] -= nt * Zt[We - 1];
          for (Mt[ft - 1] = Zt[ft - 1] / Nt[ft - 1], We = ft - 2; We >= 0; --We)
            Mt[We] = (Zt[We] - Mt[We + 1]) / Nt[We];
          for (Nt[ft - 1] = (Se[ft] + Mt[ft - 1]) / 2, We = 0; We < ft - 1; ++We)
            Nt[We] = 2 * Se[We + 1] - Mt[We + 1];
          return [Mt, Nt];
        }
        function it(Se, We) {
          this._context = Se, this._t = We;
        }
        function Tt(Se, We) {
          if ((Mt = Se.length) > 1)
            for (var nt, ft, Mt, Nt = 1, Zt = Se[We[0]], Ut = Zt.length; Nt < Mt; ++Nt)
              for (ft = Zt, Zt = Se[We[Nt]], nt = 0; nt < Ut; ++nt)
                Zt[nt][1] += Zt[nt][0] = isNaN(ft[nt][1]) ? ft[nt][0] : ft[nt][1];
        }
        function Pt(Se) {
          for (var We = Se.length, nt = new Array(We); --We >= 0; )
            nt[We] = We;
          return nt;
        }
        function rt(Se, We) {
          return Se[We];
        }
        function ut(Se) {
          var We = Se.map(Bt);
          return Pt(Se).sort(function(nt, ft) {
            return We[nt] - We[ft];
          });
        }
        function Bt(Se) {
          for (var We, nt = -1, ft = 0, Mt = Se.length, Nt = -1 / 0; ++nt < Mt; )
            (We = +Se[nt][1]) > Nt && (Nt = We, ft = nt);
          return ft;
        }
        function wt(Se) {
          var We = Se.map(Lt);
          return Pt(Se).sort(function(nt, ft) {
            return We[nt] - We[ft];
          });
        }
        function Lt(Se) {
          for (var We, nt = 0, ft = -1, Mt = Se.length; ++ft < Mt; )
            (We = +Se[ft][1]) && (nt += We);
          return nt;
        }
        It.prototype = { areaStart: ze, areaEnd: ze, lineStart: function() {
          this._point = 0;
        }, lineEnd: function() {
          this._point && this._context.closePath();
        }, point: function(Se, We) {
          Se = +Se, We = +We, this._point ? this._context.lineTo(Se, We) : (this._point = 1, this._context.moveTo(Se, We));
        } }, Re.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
        }, lineEnd: function() {
          switch (this._point) {
            case 2:
              this._context.lineTo(this._x1, this._y1);
              break;
            case 3:
              be(this, this._t0, he(this, this._t0));
          }
          (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
        }, point: function(Se, We) {
          var nt = NaN;
          if (We = +We, (Se = +Se) !== this._x1 || We !== this._y1) {
            switch (this._point) {
              case 0:
                this._point = 1, this._line ? this._context.lineTo(Se, We) : this._context.moveTo(Se, We);
                break;
              case 1:
                this._point = 2;
                break;
              case 2:
                this._point = 3, be(this, he(this, nt = He(this, Se, We)), nt);
                break;
              default:
                be(this, this._t0, nt = He(this, Se, We));
            }
            this._x0 = this._x1, this._x1 = Se, this._y0 = this._y1, this._y1 = We, this._t0 = nt;
          }
        } }, (Ue.prototype = Object.create(Re.prototype)).point = function(Se, We) {
          Re.prototype.point.call(this, We, Se);
        }, Xe.prototype = { moveTo: function(Se, We) {
          this._context.moveTo(We, Se);
        }, closePath: function() {
          this._context.closePath();
        }, lineTo: function(Se, We) {
          this._context.lineTo(We, Se);
        }, bezierCurveTo: function(Se, We, nt, ft, Mt, Nt) {
          this._context.bezierCurveTo(We, Se, ft, nt, Nt, Mt);
        } }, qe.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x = [], this._y = [];
        }, lineEnd: function() {
          var Se = this._x, We = this._y, nt = Se.length;
          if (nt)
            if (this._line ? this._context.lineTo(Se[0], We[0]) : this._context.moveTo(Se[0], We[0]), nt === 2)
              this._context.lineTo(Se[1], We[1]);
            else
              for (var ft = st(Se), Mt = st(We), Nt = 0, Zt = 1; Zt < nt; ++Nt, ++Zt)
                this._context.bezierCurveTo(ft[0][Nt], Mt[0][Nt], ft[1][Nt], Mt[1][Nt], Se[Zt], We[Zt]);
          (this._line || this._line !== 0 && nt === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
        }, point: function(Se, We) {
          this._x.push(+Se), this._y.push(+We);
        } }, it.prototype = { areaStart: function() {
          this._line = 0;
        }, areaEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._x = this._y = NaN, this._point = 0;
        }, lineEnd: function() {
          0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
        }, point: function(Se, We) {
          switch (Se = +Se, We = +We, this._point) {
            case 0:
              this._point = 1, this._line ? this._context.lineTo(Se, We) : this._context.moveTo(Se, We);
              break;
            case 1:
              this._point = 2;
            default:
              if (this._t <= 0)
                this._context.lineTo(this._x, We), this._context.lineTo(Se, We);
              else {
                var nt = this._x * (1 - this._t) + Se * this._t;
                this._context.lineTo(nt, this._y), this._context.lineTo(nt, We);
              }
          }
          this._x = Se, this._y = We;
        } }, m.arc = function() {
          var Se = p, We = c, nt = k(0), ft = null, Mt = a, Nt = y, Zt = f, Ut = null;
          function fr() {
            var Tr, ur, Kt = +Se.apply(this, arguments), $t = +We.apply(this, arguments), er = Mt.apply(this, arguments) - o, cr = Nt.apply(this, arguments) - o, gr = x(cr - er), Mr = cr > er;
            if (Ut || (Ut = Tr = g.path()), $t < Kt && (ur = $t, $t = Kt, Kt = ur), $t > 1e-12)
              if (gr > h - 1e-12)
                Ut.moveTo($t * r(er), $t * t(er)), Ut.arc(0, 0, $t, er, cr, !Mr), Kt > 1e-12 && (Ut.moveTo(Kt * r(cr), Kt * t(cr)), Ut.arc(0, 0, Kt, cr, er, Mr));
              else {
                var Ir, Fr, Gr = er, un = cr, $r = er, Dn = cr, rn = gr, vn = gr, xn = Zt.apply(this, arguments) / 2, $n = xn > 1e-12 && (ft ? +ft.apply(this, arguments) : d(Kt * Kt + $t * $t)), Br = s(x($t - Kt) / 2, +nt.apply(this, arguments)), tn = Br, mn = Br;
                if ($n > 1e-12) {
                  var Qr = i($n / Kt * t(xn)), cn = i($n / $t * t(xn));
                  (rn -= 2 * Qr) > 1e-12 ? ($r += Qr *= Mr ? 1 : -1, Dn -= Qr) : (rn = 0, $r = Dn = (er + cr) / 2), (vn -= 2 * cn) > 1e-12 ? (Gr += cn *= Mr ? 1 : -1, un -= cn) : (vn = 0, Gr = un = (er + cr) / 2);
                }
                var Hn = $t * r(Gr), _n = $t * t(Gr), En = Kt * r(Dn), aa = Kt * t(Dn);
                if (Br > 1e-12) {
                  var tr, mr = $t * r(un), Ct = $t * t(un), or = Kt * r($r), hr = Kt * t($r);
                  if (gr < u && (tr = _(Hn, _n, or, hr, mr, Ct, En, aa))) {
                    var Rr = Hn - tr[0], Dr = _n - tr[1], Or = mr - tr[0], Ar = Ct - tr[1], vr = 1 / t(l((Rr * Or + Dr * Ar) / (d(Rr * Rr + Dr * Dr) * d(Or * Or + Ar * Ar))) / 2), xr = d(tr[0] * tr[0] + tr[1] * tr[1]);
                    tn = s(Br, (Kt - xr) / (vr - 1)), mn = s(Br, ($t - xr) / (vr + 1));
                  }
                }
                vn > 1e-12 ? mn > 1e-12 ? (Ir = b(or, hr, Hn, _n, $t, mn, Mr), Fr = b(mr, Ct, En, aa, $t, mn, Mr), Ut.moveTo(Ir.cx + Ir.x01, Ir.cy + Ir.y01), mn < Br ? Ut.arc(Ir.cx, Ir.cy, mn, e(Ir.y01, Ir.x01), e(Fr.y01, Fr.x01), !Mr) : (Ut.arc(Ir.cx, Ir.cy, mn, e(Ir.y01, Ir.x01), e(Ir.y11, Ir.x11), !Mr), Ut.arc(0, 0, $t, e(Ir.cy + Ir.y11, Ir.cx + Ir.x11), e(Fr.cy + Fr.y11, Fr.cx + Fr.x11), !Mr), Ut.arc(Fr.cx, Fr.cy, mn, e(Fr.y11, Fr.x11), e(Fr.y01, Fr.x01), !Mr))) : (Ut.moveTo(Hn, _n), Ut.arc(0, 0, $t, Gr, un, !Mr)) : Ut.moveTo(Hn, _n), Kt > 1e-12 && rn > 1e-12 ? tn > 1e-12 ? (Ir = b(En, aa, mr, Ct, Kt, -tn, Mr), Fr = b(Hn, _n, or, hr, Kt, -tn, Mr), Ut.lineTo(Ir.cx + Ir.x01, Ir.cy + Ir.y01), tn < Br ? Ut.arc(Ir.cx, Ir.cy, tn, e(Ir.y01, Ir.x01), e(Fr.y01, Fr.x01), !Mr) : (Ut.arc(Ir.cx, Ir.cy, tn, e(Ir.y01, Ir.x01), e(Ir.y11, Ir.x11), !Mr), Ut.arc(0, 0, Kt, e(Ir.cy + Ir.y11, Ir.cx + Ir.x11), e(Fr.cy + Fr.y11, Fr.cx + Fr.x11), Mr), Ut.arc(Fr.cx, Fr.cy, tn, e(Fr.y11, Fr.x11), e(Fr.y01, Fr.x01), !Mr))) : Ut.arc(0, 0, Kt, Dn, $r, Mr) : Ut.lineTo(En, aa);
              }
            else
              Ut.moveTo(0, 0);
            if (Ut.closePath(), Tr)
              return Ut = null, Tr + "" || null;
          }
          return fr.centroid = function() {
            var Tr = (+Se.apply(this, arguments) + +We.apply(this, arguments)) / 2, ur = (+Mt.apply(this, arguments) + +Nt.apply(this, arguments)) / 2 - u / 2;
            return [r(ur) * Tr, t(ur) * Tr];
          }, fr.innerRadius = function(Tr) {
            return arguments.length ? (Se = typeof Tr == "function" ? Tr : k(+Tr), fr) : Se;
          }, fr.outerRadius = function(Tr) {
            return arguments.length ? (We = typeof Tr == "function" ? Tr : k(+Tr), fr) : We;
          }, fr.cornerRadius = function(Tr) {
            return arguments.length ? (nt = typeof Tr == "function" ? Tr : k(+Tr), fr) : nt;
          }, fr.padRadius = function(Tr) {
            return arguments.length ? (ft = Tr == null ? null : typeof Tr == "function" ? Tr : k(+Tr), fr) : ft;
          }, fr.startAngle = function(Tr) {
            return arguments.length ? (Mt = typeof Tr == "function" ? Tr : k(+Tr), fr) : Mt;
          }, fr.endAngle = function(Tr) {
            return arguments.length ? (Nt = typeof Tr == "function" ? Tr : k(+Tr), fr) : Nt;
          }, fr.padAngle = function(Tr) {
            return arguments.length ? (Zt = typeof Tr == "function" ? Tr : k(+Tr), fr) : Zt;
          }, fr.context = function(Tr) {
            return arguments.length ? (Ut = Tr == null ? null : Tr, fr) : Ut;
          }, fr;
        }, m.area = P, m.areaRadial = J, m.curveBasis = function(Se) {
          return new Oe(Se);
        }, m.curveBasisClosed = function(Se) {
          return new Ze(Se);
        }, m.curveBasisOpen = function(Se) {
          return new Fe(Se);
        }, m.curveBundle = De, m.curveCardinal = ot, m.curveCardinalClosed = bt, m.curveCardinalOpen = tt, m.curveCatmullRom = Ft, m.curveCatmullRomClosed = Xt, m.curveCatmullRomOpen = nr, m.curveLinear = T, m.curveLinearClosed = function(Se) {
          return new It(Se);
        }, m.curveMonotoneX = function(Se) {
          return new Re(Se);
        }, m.curveMonotoneY = function(Se) {
          return new Ue(Se);
        }, m.curveNatural = function(Se) {
          return new qe(Se);
        }, m.curveStep = function(Se) {
          return new it(Se, 0.5);
        }, m.curveStepAfter = function(Se) {
          return new it(Se, 1);
        }, m.curveStepBefore = function(Se) {
          return new it(Se, 0);
        }, m.line = I, m.lineRadial = Y, m.linkHorizontal = function() {
          return B(U);
        }, m.linkRadial = function() {
          var Se = B(N);
          return Se.angle = Se.x, delete Se.x, Se.radius = Se.y, delete Se.y, Se;
        }, m.linkVertical = function() {
          return B(ee);
        }, m.pie = function() {
          var Se = E, We = S, nt = null, ft = k(0), Mt = k(h), Nt = k(0);
          function Zt(Ut) {
            var fr, Tr, ur, Kt, $t, er = Ut.length, cr = 0, gr = new Array(er), Mr = new Array(er), Ir = +ft.apply(this, arguments), Fr = Math.min(h, Math.max(-h, Mt.apply(this, arguments) - Ir)), Gr = Math.min(Math.abs(Fr) / er, Nt.apply(this, arguments)), un = Gr * (Fr < 0 ? -1 : 1);
            for (fr = 0; fr < er; ++fr)
              ($t = Mr[gr[fr] = fr] = +Se(Ut[fr], fr, Ut)) > 0 && (cr += $t);
            for (We != null ? gr.sort(function($r, Dn) {
              return We(Mr[$r], Mr[Dn]);
            }) : nt != null && gr.sort(function($r, Dn) {
              return nt(Ut[$r], Ut[Dn]);
            }), fr = 0, ur = cr ? (Fr - er * un) / cr : 0; fr < er; ++fr, Ir = Kt)
              Tr = gr[fr], Kt = Ir + (($t = Mr[Tr]) > 0 ? $t * ur : 0) + un, Mr[Tr] = { data: Ut[Tr], index: fr, value: $t, startAngle: Ir, endAngle: Kt, padAngle: Gr };
            return Mr;
          }
          return Zt.value = function(Ut) {
            return arguments.length ? (Se = typeof Ut == "function" ? Ut : k(+Ut), Zt) : Se;
          }, Zt.sortValues = function(Ut) {
            return arguments.length ? (We = Ut, nt = null, Zt) : We;
          }, Zt.sort = function(Ut) {
            return arguments.length ? (nt = Ut, We = null, Zt) : nt;
          }, Zt.startAngle = function(Ut) {
            return arguments.length ? (ft = typeof Ut == "function" ? Ut : k(+Ut), Zt) : ft;
          }, Zt.endAngle = function(Ut) {
            return arguments.length ? (Mt = typeof Ut == "function" ? Ut : k(+Ut), Zt) : Mt;
          }, Zt.padAngle = function(Ut) {
            return arguments.length ? (Nt = typeof Ut == "function" ? Ut : k(+Ut), Zt) : Nt;
          }, Zt;
        }, m.pointRadial = W, m.radialArea = J, m.radialLine = Y, m.stack = function() {
          var Se = k([]), We = Pt, nt = Tt, ft = rt;
          function Mt(Nt) {
            var Zt, Ut, fr = Se.apply(this, arguments), Tr = Nt.length, ur = fr.length, Kt = new Array(ur);
            for (Zt = 0; Zt < ur; ++Zt) {
              for (var $t, er = fr[Zt], cr = Kt[Zt] = new Array(Tr), gr = 0; gr < Tr; ++gr)
                cr[gr] = $t = [0, +ft(Nt[gr], er, gr, Nt)], $t.data = Nt[gr];
              cr.key = er;
            }
            for (Zt = 0, Ut = We(Kt); Zt < ur; ++Zt)
              Kt[Ut[Zt]].index = Zt;
            return nt(Kt, Ut), Kt;
          }
          return Mt.keys = function(Nt) {
            return arguments.length ? (Se = typeof Nt == "function" ? Nt : k(Z.call(Nt)), Mt) : Se;
          }, Mt.value = function(Nt) {
            return arguments.length ? (ft = typeof Nt == "function" ? Nt : k(+Nt), Mt) : ft;
          }, Mt.order = function(Nt) {
            return arguments.length ? (We = Nt == null ? Pt : typeof Nt == "function" ? Nt : k(Z.call(Nt)), Mt) : We;
          }, Mt.offset = function(Nt) {
            return arguments.length ? (nt = Nt == null ? Tt : Nt, Mt) : nt;
          }, Mt;
        }, m.stackOffsetDiverging = function(Se, We) {
          if ((Ut = Se.length) > 0)
            for (var nt, ft, Mt, Nt, Zt, Ut, fr = 0, Tr = Se[We[0]].length; fr < Tr; ++fr)
              for (Nt = Zt = 0, nt = 0; nt < Ut; ++nt)
                (Mt = (ft = Se[We[nt]][fr])[1] - ft[0]) > 0 ? (ft[0] = Nt, ft[1] = Nt += Mt) : Mt < 0 ? (ft[1] = Zt, ft[0] = Zt += Mt) : (ft[0] = 0, ft[1] = Mt);
        }, m.stackOffsetExpand = function(Se, We) {
          if ((ft = Se.length) > 0) {
            for (var nt, ft, Mt, Nt = 0, Zt = Se[0].length; Nt < Zt; ++Nt) {
              for (Mt = nt = 0; nt < ft; ++nt)
                Mt += Se[nt][Nt][1] || 0;
              if (Mt)
                for (nt = 0; nt < ft; ++nt)
                  Se[nt][Nt][1] /= Mt;
            }
            Tt(Se, We);
          }
        }, m.stackOffsetNone = Tt, m.stackOffsetSilhouette = function(Se, We) {
          if ((nt = Se.length) > 0) {
            for (var nt, ft = 0, Mt = Se[We[0]], Nt = Mt.length; ft < Nt; ++ft) {
              for (var Zt = 0, Ut = 0; Zt < nt; ++Zt)
                Ut += Se[Zt][ft][1] || 0;
              Mt[ft][1] += Mt[ft][0] = -Ut / 2;
            }
            Tt(Se, We);
          }
        }, m.stackOffsetWiggle = function(Se, We) {
          if ((Mt = Se.length) > 0 && (ft = (nt = Se[We[0]]).length) > 0) {
            for (var nt, ft, Mt, Nt = 0, Zt = 1; Zt < ft; ++Zt) {
              for (var Ut = 0, fr = 0, Tr = 0; Ut < Mt; ++Ut) {
                for (var ur = Se[We[Ut]], Kt = ur[Zt][1] || 0, $t = (Kt - (ur[Zt - 1][1] || 0)) / 2, er = 0; er < Ut; ++er) {
                  var cr = Se[We[er]];
                  $t += (cr[Zt][1] || 0) - (cr[Zt - 1][1] || 0);
                }
                fr += Kt, Tr += $t * Kt;
              }
              nt[Zt - 1][1] += nt[Zt - 1][0] = Nt, fr && (Nt -= Tr / fr);
            }
            nt[Zt - 1][1] += nt[Zt - 1][0] = Nt, Tt(Se, We);
          }
        }, m.stackOrderAppearance = ut, m.stackOrderAscending = wt, m.stackOrderDescending = function(Se) {
          return wt(Se).reverse();
        }, m.stackOrderInsideOut = function(Se) {
          var We, nt, ft = Se.length, Mt = Se.map(Lt), Nt = ut(Se), Zt = 0, Ut = 0, fr = [], Tr = [];
          for (We = 0; We < ft; ++We)
            nt = Nt[We], Zt < Ut ? (Zt += Mt[nt], fr.push(nt)) : (Ut += Mt[nt], Tr.push(nt));
          return Tr.reverse().concat(fr);
        }, m.stackOrderNone = Pt, m.stackOrderReverse = function(Se) {
          return Pt(Se).reverse();
        }, m.symbol = function() {
          var Se = k(K), We = k(64), nt = null;
          function ft() {
            var Mt;
            if (nt || (nt = Mt = g.path()), Se.apply(this, arguments).draw(nt, +We.apply(this, arguments)), Mt)
              return nt = null, Mt + "" || null;
          }
          return ft.type = function(Mt) {
            return arguments.length ? (Se = typeof Mt == "function" ? Mt : k(Mt), ft) : Se;
          }, ft.size = function(Mt) {
            return arguments.length ? (We = typeof Mt == "function" ? Mt : k(+Mt), ft) : We;
          }, ft.context = function(Mt) {
            return arguments.length ? (nt = Mt == null ? null : Mt, ft) : nt;
          }, ft;
        }, m.symbolCircle = K, m.symbolCross = X, m.symbolDiamond = le, m.symbolSquare = Ae, m.symbolStar = ye, m.symbolTriangle = ge, m.symbolWye = Ee, m.symbols = Me, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-path": 117 }], 120: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? g($, v("d3-time")) : g((m = m || self).d3 = m.d3 || {}, m.d3);
      })(this, function(m, g) {
        function k(tt) {
          if (0 <= tt.y && tt.y < 100) {
            var Ke = new Date(-1, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L);
            return Ke.setFullYear(tt.y), Ke;
          }
          return new Date(tt.y, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L);
        }
        function x(tt) {
          if (0 <= tt.y && tt.y < 100) {
            var Ke = new Date(Date.UTC(-1, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L));
            return Ke.setUTCFullYear(tt.y), Ke;
          }
          return new Date(Date.UTC(tt.y, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L));
        }
        function e(tt, Ke, mt) {
          return { y: tt, m: Ke, d: mt, H: 0, M: 0, S: 0, L: 0 };
        }
        function r(tt) {
          var Ke = tt.dateTime, mt = tt.date, Ft = tt.time, Vt = tt.periods, Xt = tt.days, Gt = tt.shortDays, nr = tt.months, It = tt.shortMonths, Be = l(Vt), He = i(Vt), he = l(Xt), be = i(Xt), Re = l(Gt), Ue = i(Gt), Xe = l(nr), qe = i(nr), st = l(It), it = i(It), Tt = { a: function(Lt) {
            return Gt[Lt.getDay()];
          }, A: function(Lt) {
            return Xt[Lt.getDay()];
          }, b: function(Lt) {
            return It[Lt.getMonth()];
          }, B: function(Lt) {
            return nr[Lt.getMonth()];
          }, c: null, d: J, e: J, f: B, H: W, I: Z, j: re, L: V, m: U, M: ee, p: function(Lt) {
            return Vt[+(Lt.getHours() >= 12)];
          }, q: function(Lt) {
            return 1 + ~~(Lt.getMonth() / 3);
          }, Q: Qe, s: ot, S: N, u: K, U: X, V: te, w: ie, W: le, x: null, X: null, y: oe, Y: ve, Z: ue, "%": Ge }, Pt = { a: function(Lt) {
            return Gt[Lt.getUTCDay()];
          }, A: function(Lt) {
            return Xt[Lt.getUTCDay()];
          }, b: function(Lt) {
            return It[Lt.getUTCMonth()];
          }, B: function(Lt) {
            return nr[Lt.getUTCMonth()];
          }, c: null, d: ye, e: ye, f: se, H: Ae, I: pe, j: ge, L: we, m: de, M: Te, p: function(Lt) {
            return Vt[+(Lt.getUTCHours() >= 12)];
          }, q: function(Lt) {
            return 1 + ~~(Lt.getUTCMonth() / 3);
          }, Q: Qe, s: ot, S: Ee, u: Me, U: ze, V: Ie, w: Oe, W: Ze, x: null, X: null, y: Fe, Y: Pe, Z: De, "%": Ge }, rt = { a: function(Lt, Se, We) {
            var nt = Re.exec(Se.slice(We));
            return nt ? (Lt.w = Ue[nt[0].toLowerCase()], We + nt[0].length) : -1;
          }, A: function(Lt, Se, We) {
            var nt = he.exec(Se.slice(We));
            return nt ? (Lt.w = be[nt[0].toLowerCase()], We + nt[0].length) : -1;
          }, b: function(Lt, Se, We) {
            var nt = st.exec(Se.slice(We));
            return nt ? (Lt.m = it[nt[0].toLowerCase()], We + nt[0].length) : -1;
          }, B: function(Lt, Se, We) {
            var nt = Xe.exec(Se.slice(We));
            return nt ? (Lt.m = qe[nt[0].toLowerCase()], We + nt[0].length) : -1;
          }, c: function(Lt, Se, We) {
            return wt(Lt, Ke, Se, We);
          }, d: A, e: A, f: z, H: P, I: P, j: I, L: R, m: L, M: S, p: function(Lt, Se, We) {
            var nt = Be.exec(Se.slice(We));
            return nt ? (Lt.p = He[nt[0].toLowerCase()], We + nt[0].length) : -1;
          }, q: T, Q: H, s: Y, S: E, u: c, U: a, V: y, w: p, W: f, x: function(Lt, Se, We) {
            return wt(Lt, mt, Se, We);
          }, X: function(Lt, Se, We) {
            return wt(Lt, Ft, Se, We);
          }, y: b, Y: _, Z: w, "%": j };
          function ut(Lt, Se) {
            return function(We) {
              var nt, ft, Mt, Nt = [], Zt = -1, Ut = 0, fr = Lt.length;
              for (We instanceof Date || (We = new Date(+We)); ++Zt < fr; )
                Lt.charCodeAt(Zt) === 37 && (Nt.push(Lt.slice(Ut, Zt)), (ft = s[nt = Lt.charAt(++Zt)]) != null ? nt = Lt.charAt(++Zt) : ft = nt === "e" ? " " : "0", (Mt = Se[nt]) && (nt = Mt(We, ft)), Nt.push(nt), Ut = Zt + 1);
              return Nt.push(Lt.slice(Ut, Zt)), Nt.join("");
            };
          }
          function Bt(Lt, Se) {
            return function(We) {
              var nt, ft, Mt = e(1900, void 0, 1);
              if (wt(Mt, Lt, We += "", 0) != We.length)
                return null;
              if ("Q" in Mt)
                return new Date(Mt.Q);
              if ("s" in Mt)
                return new Date(1e3 * Mt.s + ("L" in Mt ? Mt.L : 0));
              if (Se && !("Z" in Mt) && (Mt.Z = 0), "p" in Mt && (Mt.H = Mt.H % 12 + 12 * Mt.p), Mt.m === void 0 && (Mt.m = "q" in Mt ? Mt.q : 0), "V" in Mt) {
                if (Mt.V < 1 || Mt.V > 53)
                  return null;
                "w" in Mt || (Mt.w = 1), "Z" in Mt ? (ft = (nt = x(e(Mt.y, 0, 1))).getUTCDay(), nt = ft > 4 || ft === 0 ? g.utcMonday.ceil(nt) : g.utcMonday(nt), nt = g.utcDay.offset(nt, 7 * (Mt.V - 1)), Mt.y = nt.getUTCFullYear(), Mt.m = nt.getUTCMonth(), Mt.d = nt.getUTCDate() + (Mt.w + 6) % 7) : (ft = (nt = k(e(Mt.y, 0, 1))).getDay(), nt = ft > 4 || ft === 0 ? g.timeMonday.ceil(nt) : g.timeMonday(nt), nt = g.timeDay.offset(nt, 7 * (Mt.V - 1)), Mt.y = nt.getFullYear(), Mt.m = nt.getMonth(), Mt.d = nt.getDate() + (Mt.w + 6) % 7);
              } else
                ("W" in Mt || "U" in Mt) && ("w" in Mt || (Mt.w = "u" in Mt ? Mt.u % 7 : "W" in Mt ? 1 : 0), ft = "Z" in Mt ? x(e(Mt.y, 0, 1)).getUTCDay() : k(e(Mt.y, 0, 1)).getDay(), Mt.m = 0, Mt.d = "W" in Mt ? (Mt.w + 6) % 7 + 7 * Mt.W - (ft + 5) % 7 : Mt.w + 7 * Mt.U - (ft + 6) % 7);
              return "Z" in Mt ? (Mt.H += Mt.Z / 100 | 0, Mt.M += Mt.Z % 100, x(Mt)) : k(Mt);
            };
          }
          function wt(Lt, Se, We, nt) {
            for (var ft, Mt, Nt = 0, Zt = Se.length, Ut = We.length; Nt < Zt; ) {
              if (nt >= Ut)
                return -1;
              if ((ft = Se.charCodeAt(Nt++)) === 37) {
                if (ft = Se.charAt(Nt++), !(Mt = rt[ft in s ? Se.charAt(Nt++) : ft]) || (nt = Mt(Lt, We, nt)) < 0)
                  return -1;
              } else if (ft != We.charCodeAt(nt++))
                return -1;
            }
            return nt;
          }
          return Tt.x = ut(mt, Tt), Tt.X = ut(Ft, Tt), Tt.c = ut(Ke, Tt), Pt.x = ut(mt, Pt), Pt.X = ut(Ft, Pt), Pt.c = ut(Ke, Pt), { format: function(Lt) {
            var Se = ut(Lt += "", Tt);
            return Se.toString = function() {
              return Lt;
            }, Se;
          }, parse: function(Lt) {
            var Se = Bt(Lt += "", !1);
            return Se.toString = function() {
              return Lt;
            }, Se;
          }, utcFormat: function(Lt) {
            var Se = ut(Lt += "", Pt);
            return Se.toString = function() {
              return Lt;
            }, Se;
          }, utcParse: function(Lt) {
            var Se = Bt(Lt += "", !0);
            return Se.toString = function() {
              return Lt;
            }, Se;
          } };
        }
        var n, s = { "-": "", _: " ", 0: "0" }, t = /^\s*\d+/, d = /^%/, u = /[\\^$*+?|[\]().{}]/g;
        function o(tt, Ke, mt) {
          var Ft = tt < 0 ? "-" : "", Vt = (Ft ? -tt : tt) + "", Xt = Vt.length;
          return Ft + (Xt < mt ? new Array(mt - Xt + 1).join(Ke) + Vt : Vt);
        }
        function h(tt) {
          return tt.replace(u, "\\$&");
        }
        function l(tt) {
          return new RegExp("^(?:" + tt.map(h).join("|") + ")", "i");
        }
        function i(tt) {
          for (var Ke = {}, mt = -1, Ft = tt.length; ++mt < Ft; )
            Ke[tt[mt].toLowerCase()] = mt;
          return Ke;
        }
        function p(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 1));
          return Ft ? (tt.w = +Ft[0], mt + Ft[0].length) : -1;
        }
        function c(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 1));
          return Ft ? (tt.u = +Ft[0], mt + Ft[0].length) : -1;
        }
        function a(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.U = +Ft[0], mt + Ft[0].length) : -1;
        }
        function y(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.V = +Ft[0], mt + Ft[0].length) : -1;
        }
        function f(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.W = +Ft[0], mt + Ft[0].length) : -1;
        }
        function _(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 4));
          return Ft ? (tt.y = +Ft[0], mt + Ft[0].length) : -1;
        }
        function b(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.y = +Ft[0] + (+Ft[0] > 68 ? 1900 : 2e3), mt + Ft[0].length) : -1;
        }
        function w(tt, Ke, mt) {
          var Ft = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ke.slice(mt, mt + 6));
          return Ft ? (tt.Z = Ft[1] ? 0 : -(Ft[2] + (Ft[3] || "00")), mt + Ft[0].length) : -1;
        }
        function T(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 1));
          return Ft ? (tt.q = 3 * Ft[0] - 3, mt + Ft[0].length) : -1;
        }
        function L(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.m = Ft[0] - 1, mt + Ft[0].length) : -1;
        }
        function A(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.d = +Ft[0], mt + Ft[0].length) : -1;
        }
        function I(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 3));
          return Ft ? (tt.m = 0, tt.d = +Ft[0], mt + Ft[0].length) : -1;
        }
        function P(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.H = +Ft[0], mt + Ft[0].length) : -1;
        }
        function S(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.M = +Ft[0], mt + Ft[0].length) : -1;
        }
        function E(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 2));
          return Ft ? (tt.S = +Ft[0], mt + Ft[0].length) : -1;
        }
        function R(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 3));
          return Ft ? (tt.L = +Ft[0], mt + Ft[0].length) : -1;
        }
        function z(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt, mt + 6));
          return Ft ? (tt.L = Math.floor(Ft[0] / 1e3), mt + Ft[0].length) : -1;
        }
        function j(tt, Ke, mt) {
          var Ft = d.exec(Ke.slice(mt, mt + 1));
          return Ft ? mt + Ft[0].length : -1;
        }
        function H(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt));
          return Ft ? (tt.Q = +Ft[0], mt + Ft[0].length) : -1;
        }
        function Y(tt, Ke, mt) {
          var Ft = t.exec(Ke.slice(mt));
          return Ft ? (tt.s = +Ft[0], mt + Ft[0].length) : -1;
        }
        function J(tt, Ke) {
          return o(tt.getDate(), Ke, 2);
        }
        function W(tt, Ke) {
          return o(tt.getHours(), Ke, 2);
        }
        function Z(tt, Ke) {
          return o(tt.getHours() % 12 || 12, Ke, 2);
        }
        function re(tt, Ke) {
          return o(1 + g.timeDay.count(g.timeYear(tt), tt), Ke, 3);
        }
        function V(tt, Ke) {
          return o(tt.getMilliseconds(), Ke, 3);
        }
        function B(tt, Ke) {
          return V(tt, Ke) + "000";
        }
        function U(tt, Ke) {
          return o(tt.getMonth() + 1, Ke, 2);
        }
        function ee(tt, Ke) {
          return o(tt.getMinutes(), Ke, 2);
        }
        function N(tt, Ke) {
          return o(tt.getSeconds(), Ke, 2);
        }
        function K(tt) {
          var Ke = tt.getDay();
          return Ke === 0 ? 7 : Ke;
        }
        function X(tt, Ke) {
          return o(g.timeSunday.count(g.timeYear(tt) - 1, tt), Ke, 2);
        }
        function te(tt, Ke) {
          var mt = tt.getDay();
          return tt = mt >= 4 || mt === 0 ? g.timeThursday(tt) : g.timeThursday.ceil(tt), o(g.timeThursday.count(g.timeYear(tt), tt) + (g.timeYear(tt).getDay() === 4), Ke, 2);
        }
        function ie(tt) {
          return tt.getDay();
        }
        function le(tt, Ke) {
          return o(g.timeMonday.count(g.timeYear(tt) - 1, tt), Ke, 2);
        }
        function oe(tt, Ke) {
          return o(tt.getFullYear() % 100, Ke, 2);
        }
        function ve(tt, Ke) {
          return o(tt.getFullYear() % 1e4, Ke, 4);
        }
        function ue(tt) {
          var Ke = tt.getTimezoneOffset();
          return (Ke > 0 ? "-" : (Ke *= -1, "+")) + o(Ke / 60 | 0, "0", 2) + o(Ke % 60, "0", 2);
        }
        function ye(tt, Ke) {
          return o(tt.getUTCDate(), Ke, 2);
        }
        function Ae(tt, Ke) {
          return o(tt.getUTCHours(), Ke, 2);
        }
        function pe(tt, Ke) {
          return o(tt.getUTCHours() % 12 || 12, Ke, 2);
        }
        function ge(tt, Ke) {
          return o(1 + g.utcDay.count(g.utcYear(tt), tt), Ke, 3);
        }
        function we(tt, Ke) {
          return o(tt.getUTCMilliseconds(), Ke, 3);
        }
        function se(tt, Ke) {
          return we(tt, Ke) + "000";
        }
        function de(tt, Ke) {
          return o(tt.getUTCMonth() + 1, Ke, 2);
        }
        function Te(tt, Ke) {
          return o(tt.getUTCMinutes(), Ke, 2);
        }
        function Ee(tt, Ke) {
          return o(tt.getUTCSeconds(), Ke, 2);
        }
        function Me(tt) {
          var Ke = tt.getUTCDay();
          return Ke === 0 ? 7 : Ke;
        }
        function ze(tt, Ke) {
          return o(g.utcSunday.count(g.utcYear(tt) - 1, tt), Ke, 2);
        }
        function Ie(tt, Ke) {
          var mt = tt.getUTCDay();
          return tt = mt >= 4 || mt === 0 ? g.utcThursday(tt) : g.utcThursday.ceil(tt), o(g.utcThursday.count(g.utcYear(tt), tt) + (g.utcYear(tt).getUTCDay() === 4), Ke, 2);
        }
        function Oe(tt) {
          return tt.getUTCDay();
        }
        function Ze(tt, Ke) {
          return o(g.utcMonday.count(g.utcYear(tt) - 1, tt), Ke, 2);
        }
        function Fe(tt, Ke) {
          return o(tt.getUTCFullYear() % 100, Ke, 2);
        }
        function Pe(tt, Ke) {
          return o(tt.getUTCFullYear() % 1e4, Ke, 4);
        }
        function De() {
          return "+0000";
        }
        function Ge() {
          return "%";
        }
        function Qe(tt) {
          return +tt;
        }
        function ot(tt) {
          return Math.floor(+tt / 1e3);
        }
        function vt(tt) {
          return n = r(tt), m.timeFormat = n.format, m.timeParse = n.parse, m.utcFormat = n.utcFormat, m.utcParse = n.utcParse, n;
        }
        vt({ dateTime: "%x, %X", date: "%-m/%-d/%Y", time: "%-I:%M:%S %p", periods: ["AM", "PM"], days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] });
        var bt = Date.prototype.toISOString ? function(tt) {
          return tt.toISOString();
        } : m.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"), yt = +new Date("2000-01-01T00:00:00.000Z") ? function(tt) {
          var Ke = new Date(tt);
          return isNaN(Ke) ? null : Ke;
        } : m.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
        m.isoFormat = bt, m.isoParse = yt, m.timeFormatDefaultLocale = vt, m.timeFormatLocale = r, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, { "d3-time": 121 }], 121: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        var g = new Date(), k = new Date();
        function x(de, Te, Ee, Me) {
          function ze(Ie) {
            return de(Ie = arguments.length === 0 ? new Date() : new Date(+Ie)), Ie;
          }
          return ze.floor = function(Ie) {
            return de(Ie = new Date(+Ie)), Ie;
          }, ze.ceil = function(Ie) {
            return de(Ie = new Date(Ie - 1)), Te(Ie, 1), de(Ie), Ie;
          }, ze.round = function(Ie) {
            var Oe = ze(Ie), Ze = ze.ceil(Ie);
            return Ie - Oe < Ze - Ie ? Oe : Ze;
          }, ze.offset = function(Ie, Oe) {
            return Te(Ie = new Date(+Ie), Oe == null ? 1 : Math.floor(Oe)), Ie;
          }, ze.range = function(Ie, Oe, Ze) {
            var Fe, Pe = [];
            if (Ie = ze.ceil(Ie), Ze = Ze == null ? 1 : Math.floor(Ze), !(Ie < Oe && Ze > 0))
              return Pe;
            do
              Pe.push(Fe = new Date(+Ie)), Te(Ie, Ze), de(Ie);
            while (Fe < Ie && Ie < Oe);
            return Pe;
          }, ze.filter = function(Ie) {
            return x(function(Oe) {
              if (Oe >= Oe)
                for (; de(Oe), !Ie(Oe); )
                  Oe.setTime(Oe - 1);
            }, function(Oe, Ze) {
              if (Oe >= Oe)
                if (Ze < 0)
                  for (; ++Ze <= 0; )
                    for (; Te(Oe, -1), !Ie(Oe); )
                      ;
                else
                  for (; --Ze >= 0; )
                    for (; Te(Oe, 1), !Ie(Oe); )
                      ;
            });
          }, Ee && (ze.count = function(Ie, Oe) {
            return g.setTime(+Ie), k.setTime(+Oe), de(g), de(k), Math.floor(Ee(g, k));
          }, ze.every = function(Ie) {
            return Ie = Math.floor(Ie), isFinite(Ie) && Ie > 0 ? Ie > 1 ? ze.filter(Me ? function(Oe) {
              return Me(Oe) % Ie == 0;
            } : function(Oe) {
              return ze.count(0, Oe) % Ie == 0;
            }) : ze : null;
          }), ze;
        }
        var e = x(function() {
        }, function(de, Te) {
          de.setTime(+de + Te);
        }, function(de, Te) {
          return Te - de;
        });
        e.every = function(de) {
          return de = Math.floor(de), isFinite(de) && de > 0 ? de > 1 ? x(function(Te) {
            Te.setTime(Math.floor(Te / de) * de);
          }, function(Te, Ee) {
            Te.setTime(+Te + Ee * de);
          }, function(Te, Ee) {
            return (Ee - Te) / de;
          }) : e : null;
        };
        var r = e.range, n = x(function(de) {
          de.setTime(de - de.getMilliseconds());
        }, function(de, Te) {
          de.setTime(+de + 1e3 * Te);
        }, function(de, Te) {
          return (Te - de) / 1e3;
        }, function(de) {
          return de.getUTCSeconds();
        }), s = n.range, t = x(function(de) {
          de.setTime(de - de.getMilliseconds() - 1e3 * de.getSeconds());
        }, function(de, Te) {
          de.setTime(+de + 6e4 * Te);
        }, function(de, Te) {
          return (Te - de) / 6e4;
        }, function(de) {
          return de.getMinutes();
        }), d = t.range, u = x(function(de) {
          de.setTime(de - de.getMilliseconds() - 1e3 * de.getSeconds() - 6e4 * de.getMinutes());
        }, function(de, Te) {
          de.setTime(+de + 36e5 * Te);
        }, function(de, Te) {
          return (Te - de) / 36e5;
        }, function(de) {
          return de.getHours();
        }), o = u.range, h = x(function(de) {
          de.setHours(0, 0, 0, 0);
        }, function(de, Te) {
          de.setDate(de.getDate() + Te);
        }, function(de, Te) {
          return (Te - de - 6e4 * (Te.getTimezoneOffset() - de.getTimezoneOffset())) / 864e5;
        }, function(de) {
          return de.getDate() - 1;
        }), l = h.range;
        function i(de) {
          return x(function(Te) {
            Te.setDate(Te.getDate() - (Te.getDay() + 7 - de) % 7), Te.setHours(0, 0, 0, 0);
          }, function(Te, Ee) {
            Te.setDate(Te.getDate() + 7 * Ee);
          }, function(Te, Ee) {
            return (Ee - Te - 6e4 * (Ee.getTimezoneOffset() - Te.getTimezoneOffset())) / 6048e5;
          });
        }
        var p = i(0), c = i(1), a = i(2), y = i(3), f = i(4), _ = i(5), b = i(6), w = p.range, T = c.range, L = a.range, A = y.range, I = f.range, P = _.range, S = b.range, E = x(function(de) {
          de.setDate(1), de.setHours(0, 0, 0, 0);
        }, function(de, Te) {
          de.setMonth(de.getMonth() + Te);
        }, function(de, Te) {
          return Te.getMonth() - de.getMonth() + 12 * (Te.getFullYear() - de.getFullYear());
        }, function(de) {
          return de.getMonth();
        }), R = E.range, z = x(function(de) {
          de.setMonth(0, 1), de.setHours(0, 0, 0, 0);
        }, function(de, Te) {
          de.setFullYear(de.getFullYear() + Te);
        }, function(de, Te) {
          return Te.getFullYear() - de.getFullYear();
        }, function(de) {
          return de.getFullYear();
        });
        z.every = function(de) {
          return isFinite(de = Math.floor(de)) && de > 0 ? x(function(Te) {
            Te.setFullYear(Math.floor(Te.getFullYear() / de) * de), Te.setMonth(0, 1), Te.setHours(0, 0, 0, 0);
          }, function(Te, Ee) {
            Te.setFullYear(Te.getFullYear() + Ee * de);
          }) : null;
        };
        var j = z.range, H = x(function(de) {
          de.setUTCSeconds(0, 0);
        }, function(de, Te) {
          de.setTime(+de + 6e4 * Te);
        }, function(de, Te) {
          return (Te - de) / 6e4;
        }, function(de) {
          return de.getUTCMinutes();
        }), Y = H.range, J = x(function(de) {
          de.setUTCMinutes(0, 0, 0);
        }, function(de, Te) {
          de.setTime(+de + 36e5 * Te);
        }, function(de, Te) {
          return (Te - de) / 36e5;
        }, function(de) {
          return de.getUTCHours();
        }), W = J.range, Z = x(function(de) {
          de.setUTCHours(0, 0, 0, 0);
        }, function(de, Te) {
          de.setUTCDate(de.getUTCDate() + Te);
        }, function(de, Te) {
          return (Te - de) / 864e5;
        }, function(de) {
          return de.getUTCDate() - 1;
        }), re = Z.range;
        function V(de) {
          return x(function(Te) {
            Te.setUTCDate(Te.getUTCDate() - (Te.getUTCDay() + 7 - de) % 7), Te.setUTCHours(0, 0, 0, 0);
          }, function(Te, Ee) {
            Te.setUTCDate(Te.getUTCDate() + 7 * Ee);
          }, function(Te, Ee) {
            return (Ee - Te) / 6048e5;
          });
        }
        var B = V(0), U = V(1), ee = V(2), N = V(3), K = V(4), X = V(5), te = V(6), ie = B.range, le = U.range, oe = ee.range, ve = N.range, ue = K.range, ye = X.range, Ae = te.range, pe = x(function(de) {
          de.setUTCDate(1), de.setUTCHours(0, 0, 0, 0);
        }, function(de, Te) {
          de.setUTCMonth(de.getUTCMonth() + Te);
        }, function(de, Te) {
          return Te.getUTCMonth() - de.getUTCMonth() + 12 * (Te.getUTCFullYear() - de.getUTCFullYear());
        }, function(de) {
          return de.getUTCMonth();
        }), ge = pe.range, we = x(function(de) {
          de.setUTCMonth(0, 1), de.setUTCHours(0, 0, 0, 0);
        }, function(de, Te) {
          de.setUTCFullYear(de.getUTCFullYear() + Te);
        }, function(de, Te) {
          return Te.getUTCFullYear() - de.getUTCFullYear();
        }, function(de) {
          return de.getUTCFullYear();
        });
        we.every = function(de) {
          return isFinite(de = Math.floor(de)) && de > 0 ? x(function(Te) {
            Te.setUTCFullYear(Math.floor(Te.getUTCFullYear() / de) * de), Te.setUTCMonth(0, 1), Te.setUTCHours(0, 0, 0, 0);
          }, function(Te, Ee) {
            Te.setUTCFullYear(Te.getUTCFullYear() + Ee * de);
          }) : null;
        };
        var se = we.range;
        m.timeDay = h, m.timeDays = l, m.timeFriday = _, m.timeFridays = P, m.timeHour = u, m.timeHours = o, m.timeInterval = x, m.timeMillisecond = e, m.timeMilliseconds = r, m.timeMinute = t, m.timeMinutes = d, m.timeMonday = c, m.timeMondays = T, m.timeMonth = E, m.timeMonths = R, m.timeSaturday = b, m.timeSaturdays = S, m.timeSecond = n, m.timeSeconds = s, m.timeSunday = p, m.timeSundays = w, m.timeThursday = f, m.timeThursdays = I, m.timeTuesday = a, m.timeTuesdays = L, m.timeWednesday = y, m.timeWednesdays = A, m.timeWeek = p, m.timeWeeks = w, m.timeYear = z, m.timeYears = j, m.utcDay = Z, m.utcDays = re, m.utcFriday = X, m.utcFridays = ye, m.utcHour = J, m.utcHours = W, m.utcMillisecond = e, m.utcMilliseconds = r, m.utcMinute = H, m.utcMinutes = Y, m.utcMonday = U, m.utcMondays = le, m.utcMonth = pe, m.utcMonths = ge, m.utcSaturday = te, m.utcSaturdays = Ae, m.utcSecond = n, m.utcSeconds = s, m.utcSunday = B, m.utcSundays = ie, m.utcThursday = K, m.utcThursdays = ue, m.utcTuesday = ee, m.utcTuesdays = oe, m.utcWednesday = N, m.utcWednesdays = ve, m.utcWeek = B, m.utcWeeks = ie, m.utcYear = we, m.utcYears = se, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 122: [function(v, Q, $) {
      arguments[4][121][0].apply($, arguments);
    }, { dup: 121 }], 123: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).d3 = m.d3 || {});
      })(this, function(m) {
        var g, k, x = 0, e = 0, r = 0, n = 0, s = 0, t = 0, d = typeof performance == "object" && performance.now ? performance : Date, u = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {
          setTimeout(f, 17);
        };
        function o() {
          return s || (u(h), s = d.now() + t);
        }
        function h() {
          s = 0;
        }
        function l() {
          this._call = this._time = this._next = null;
        }
        function i(f, _, b) {
          var w = new l();
          return w.restart(f, _, b), w;
        }
        function p() {
          o(), ++x;
          for (var f, _ = g; _; )
            (f = s - _._time) >= 0 && _._call.call(null, f), _ = _._next;
          --x;
        }
        function c() {
          s = (n = d.now()) + t, x = e = 0;
          try {
            p();
          } finally {
            x = 0, function() {
              for (var f, _, b = g, w = 1 / 0; b; )
                b._call ? (w > b._time && (w = b._time), f = b, b = b._next) : (_ = b._next, b._next = null, b = f ? f._next = _ : g = _);
              k = f, y(w);
            }(), s = 0;
          }
        }
        function a() {
          var f = d.now(), _ = f - n;
          _ > 1e3 && (t -= _, n = f);
        }
        function y(f) {
          x || (e && (e = clearTimeout(e)), f - s > 24 ? (f < 1 / 0 && (e = setTimeout(c, f - d.now() - t)), r && (r = clearInterval(r))) : (r || (n = d.now(), r = setInterval(a, 1e3)), x = 1, u(c)));
        }
        l.prototype = i.prototype = { constructor: l, restart: function(f, _, b) {
          if (typeof f != "function")
            throw new TypeError("callback is not a function");
          b = (b == null ? o() : +b) + (_ == null ? 0 : +_), this._next || k === this || (k ? k._next = this : g = this, k = this), this._call = f, this._time = b, y();
        }, stop: function() {
          this._call && (this._call = null, this._time = 1 / 0, y());
        } }, m.interval = function(f, _, b) {
          var w = new l(), T = _;
          return _ == null ? (w.restart(f, _, b), w) : (_ = +_, b = b == null ? o() : +b, w.restart(function L(A) {
            A += T, w.restart(L, T += _, b), f(A);
          }, _, b), w);
        }, m.now = o, m.timeout = function(f, _, b) {
          var w = new l();
          return _ = _ == null ? 0 : +_, w.restart(function(T) {
            w.stop(), f(T + _);
          }, _, b), w;
        }, m.timer = i, m.timerFlush = p, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 124: [function(v, Q, $) {
      Q.exports = function() {
        for (var m = 0; m < arguments.length; m++)
          if (arguments[m] !== void 0)
            return arguments[m];
      };
    }, {}], 125: [function(v, Q, $) {
      Q.exports = k;
      var m = (k.canvas = document.createElement("canvas")).getContext("2d"), g = x([32, 126]);
      function k(e, r) {
        Array.isArray(e) && (e = e.join(", "));
        var n, s = {}, t = 16, d = 0.05;
        r && (r.length === 2 && typeof r[0] == "number" ? n = x(r) : Array.isArray(r) ? n = r : (r.o ? n = x(r.o) : r.pairs && (n = r.pairs), r.fontSize && (t = r.fontSize), r.threshold != null && (d = r.threshold))), n || (n = g), m.font = t + "px " + e;
        for (var u = 0; u < n.length; u++) {
          var o = n[u], h = m.measureText(o[0]).width + m.measureText(o[1]).width, l = m.measureText(o).width;
          if (Math.abs(h - l) > t * d) {
            var i = (l - h) / t;
            s[o] = 1e3 * i;
          }
        }
        return s;
      }
      function x(e) {
        for (var r = [], n = e[0]; n <= e[1]; n++)
          for (var s = String.fromCharCode(n), t = e[0]; t < e[1]; t++) {
            var d = s + String.fromCharCode(t);
            r.push(d);
          }
        return r;
      }
      k.createPairs = x, k.ascii = g;
    }, {}], 126: [function(v, Q, $) {
      var m = v("abs-svg-path"), g = v("normalize-svg-path"), k = { M: "moveTo", C: "bezierCurveTo" };
      Q.exports = function(x, e) {
        x.beginPath(), g(m(e)).forEach(function(r) {
          var n = r[0], s = r.slice(1);
          x[k[n]].apply(x, s);
        }), x.closePath();
      };
    }, { "abs-svg-path": 70, "normalize-svg-path": 246 }], 127: [function(v, Q, $) {
      Q.exports = function(m) {
        switch (m) {
          case "int8":
            return Int8Array;
          case "int16":
            return Int16Array;
          case "int32":
            return Int32Array;
          case "uint8":
            return Uint8Array;
          case "uint16":
            return Uint16Array;
          case "uint32":
            return Uint32Array;
          case "float32":
            return Float32Array;
          case "float64":
            return Float64Array;
          case "array":
            return Array;
          case "uint8_clamped":
            return Uint8ClampedArray;
        }
      };
    }, {}], 128: [function(v, Q, $) {
      Q.exports = function(m, g) {
        switch (g === void 0 && (g = 0), typeof m) {
          case "number":
            if (m > 0)
              return function(k, x) {
                var e, r;
                for (e = new Array(k), r = 0; r < k; ++r)
                  e[r] = x;
                return e;
              }(0 | m, g);
            break;
          case "object":
            if (typeof m.length == "number")
              return function k(x, e, r) {
                var n = 0 | x[r];
                if (n <= 0)
                  return [];
                var s, t = new Array(n);
                if (r === x.length - 1)
                  for (s = 0; s < n; ++s)
                    t[s] = e;
                else
                  for (s = 0; s < n; ++s)
                    t[s] = k(x, e, r + 1);
                return t;
              }(m, g, 0);
        }
        return [];
      };
    }, {}], 129: [function(v, Q, $) {
      function m(I, P, S) {
        S = S || 2;
        var E, R, z, j, H, Y, J, W = P && P.length, Z = W ? P[0] * S : I.length, re = g(I, 0, Z, S, !0), V = [];
        if (!re || re.next === re.prev)
          return V;
        if (W && (re = function(U, ee, N, K) {
          var X, te, ie, le, oe, ve = [];
          for (X = 0, te = ee.length; X < te; X++)
            ie = ee[X] * K, le = X < te - 1 ? ee[X + 1] * K : U.length, (oe = g(U, ie, le, K, !1)) === oe.next && (oe.steiner = !0), ve.push(h(oe));
          for (ve.sort(t), X = 0; X < ve.length; X++)
            d(ve[X], N), N = k(N, N.next);
          return N;
        }(I, P, re, S)), I.length > 80 * S) {
          E = z = I[0], R = j = I[1];
          for (var B = S; B < Z; B += S)
            (H = I[B]) < E && (E = H), (Y = I[B + 1]) < R && (R = Y), H > z && (z = H), Y > j && (j = Y);
          J = (J = Math.max(z - E, j - R)) !== 0 ? 1 / J : 0;
        }
        return x(re, V, S, E, R, J), V;
      }
      function g(I, P, S, E, R) {
        var z, j;
        if (R === A(I, P, S, E) > 0)
          for (z = P; z < S; z += E)
            j = w(z, I[z], I[z + 1], j);
        else
          for (z = S - E; z >= P; z -= E)
            j = w(z, I[z], I[z + 1], j);
        return j && c(j, j.next) && (T(j), j = j.next), j;
      }
      function k(I, P) {
        if (!I)
          return I;
        P || (P = I);
        var S, E = I;
        do
          if (S = !1, E.steiner || !c(E, E.next) && p(E.prev, E, E.next) !== 0)
            E = E.next;
          else {
            if (T(E), (E = P = E.prev) === E.next)
              break;
            S = !0;
          }
        while (S || E !== P);
        return P;
      }
      function x(I, P, S, E, R, z, j) {
        if (I) {
          !j && z && function(W, Z, re, V) {
            var B = W;
            do
              B.z === null && (B.z = o(B.x, B.y, Z, re, V)), B.prevZ = B.prev, B.nextZ = B.next, B = B.next;
            while (B !== W);
            B.prevZ.nextZ = null, B.prevZ = null, function(U) {
              var ee, N, K, X, te, ie, le, oe, ve = 1;
              do {
                for (N = U, U = null, te = null, ie = 0; N; ) {
                  for (ie++, K = N, le = 0, ee = 0; ee < ve && (le++, K = K.nextZ); ee++)
                    ;
                  for (oe = ve; le > 0 || oe > 0 && K; )
                    le !== 0 && (oe === 0 || !K || N.z <= K.z) ? (X = N, N = N.nextZ, le--) : (X = K, K = K.nextZ, oe--), te ? te.nextZ = X : U = X, X.prevZ = te, te = X;
                  N = K;
                }
                te.nextZ = null, ve *= 2;
              } while (ie > 1);
            }(B);
          }(I, E, R, z);
          for (var H, Y, J = I; I.prev !== I.next; )
            if (H = I.prev, Y = I.next, z ? r(I, E, R, z) : e(I))
              P.push(H.i / S), P.push(I.i / S), P.push(Y.i / S), T(I), I = Y.next, J = Y.next;
            else if ((I = Y) === J) {
              j ? j === 1 ? x(I = n(k(I), P, S), P, S, E, R, z, 2) : j === 2 && s(I, P, S, E, R, z) : x(k(I), P, S, E, R, z, 1);
              break;
            }
        }
      }
      function e(I) {
        var P = I.prev, S = I, E = I.next;
        if (p(P, S, E) >= 0)
          return !1;
        for (var R = I.next.next; R !== I.prev; ) {
          if (l(P.x, P.y, S.x, S.y, E.x, E.y, R.x, R.y) && p(R.prev, R, R.next) >= 0)
            return !1;
          R = R.next;
        }
        return !0;
      }
      function r(I, P, S, E) {
        var R = I.prev, z = I, j = I.next;
        if (p(R, z, j) >= 0)
          return !1;
        for (var H = R.x < z.x ? R.x < j.x ? R.x : j.x : z.x < j.x ? z.x : j.x, Y = R.y < z.y ? R.y < j.y ? R.y : j.y : z.y < j.y ? z.y : j.y, J = R.x > z.x ? R.x > j.x ? R.x : j.x : z.x > j.x ? z.x : j.x, W = R.y > z.y ? R.y > j.y ? R.y : j.y : z.y > j.y ? z.y : j.y, Z = o(H, Y, P, S, E), re = o(J, W, P, S, E), V = I.prevZ, B = I.nextZ; V && V.z >= Z && B && B.z <= re; ) {
          if (V !== I.prev && V !== I.next && l(R.x, R.y, z.x, z.y, j.x, j.y, V.x, V.y) && p(V.prev, V, V.next) >= 0 || (V = V.prevZ, B !== I.prev && B !== I.next && l(R.x, R.y, z.x, z.y, j.x, j.y, B.x, B.y) && p(B.prev, B, B.next) >= 0))
            return !1;
          B = B.nextZ;
        }
        for (; V && V.z >= Z; ) {
          if (V !== I.prev && V !== I.next && l(R.x, R.y, z.x, z.y, j.x, j.y, V.x, V.y) && p(V.prev, V, V.next) >= 0)
            return !1;
          V = V.prevZ;
        }
        for (; B && B.z <= re; ) {
          if (B !== I.prev && B !== I.next && l(R.x, R.y, z.x, z.y, j.x, j.y, B.x, B.y) && p(B.prev, B, B.next) >= 0)
            return !1;
          B = B.nextZ;
        }
        return !0;
      }
      function n(I, P, S) {
        var E = I;
        do {
          var R = E.prev, z = E.next.next;
          !c(R, z) && a(R, E, E.next, z) && _(R, z) && _(z, R) && (P.push(R.i / S), P.push(E.i / S), P.push(z.i / S), T(E), T(E.next), E = I = z), E = E.next;
        } while (E !== I);
        return k(E);
      }
      function s(I, P, S, E, R, z) {
        var j = I;
        do {
          for (var H = j.next.next; H !== j.prev; ) {
            if (j.i !== H.i && i(j, H)) {
              var Y = b(j, H);
              return j = k(j, j.next), Y = k(Y, Y.next), x(j, P, S, E, R, z), void x(Y, P, S, E, R, z);
            }
            H = H.next;
          }
          j = j.next;
        } while (j !== I);
      }
      function t(I, P) {
        return I.x - P.x;
      }
      function d(I, P) {
        if (P = function(E, R) {
          var z, j = R, H = E.x, Y = E.y, J = -1 / 0;
          do {
            if (Y <= j.y && Y >= j.next.y && j.next.y !== j.y) {
              var W = j.x + (Y - j.y) * (j.next.x - j.x) / (j.next.y - j.y);
              if (W <= H && W > J) {
                if (J = W, W === H) {
                  if (Y === j.y)
                    return j;
                  if (Y === j.next.y)
                    return j.next;
                }
                z = j.x < j.next.x ? j : j.next;
              }
            }
            j = j.next;
          } while (j !== R);
          if (!z)
            return null;
          if (H === J)
            return z;
          var Z, re = z, V = z.x, B = z.y, U = 1 / 0;
          j = z;
          do
            H >= j.x && j.x >= V && H !== j.x && l(Y < B ? H : J, Y, V, B, Y < B ? J : H, Y, j.x, j.y) && (Z = Math.abs(Y - j.y) / (H - j.x), _(j, E) && (Z < U || Z === U && (j.x > z.x || j.x === z.x && u(z, j))) && (z = j, U = Z)), j = j.next;
          while (j !== re);
          return z;
        }(I, P)) {
          var S = b(P, I);
          k(P, P.next), k(S, S.next);
        }
      }
      function u(I, P) {
        return p(I.prev, I, P.prev) < 0 && p(P.next, I, I.next) < 0;
      }
      function o(I, P, S, E, R) {
        return (I = 1431655765 & ((I = 858993459 & ((I = 252645135 & ((I = 16711935 & ((I = 32767 * (I - S) * R) | I << 8)) | I << 4)) | I << 2)) | I << 1)) | (P = 1431655765 & ((P = 858993459 & ((P = 252645135 & ((P = 16711935 & ((P = 32767 * (P - E) * R) | P << 8)) | P << 4)) | P << 2)) | P << 1)) << 1;
      }
      function h(I) {
        var P = I, S = I;
        do
          (P.x < S.x || P.x === S.x && P.y < S.y) && (S = P), P = P.next;
        while (P !== I);
        return S;
      }
      function l(I, P, S, E, R, z, j, H) {
        return (R - j) * (P - H) - (I - j) * (z - H) >= 0 && (I - j) * (E - H) - (S - j) * (P - H) >= 0 && (S - j) * (z - H) - (R - j) * (E - H) >= 0;
      }
      function i(I, P) {
        return I.next.i !== P.i && I.prev.i !== P.i && !function(S, E) {
          var R = S;
          do {
            if (R.i !== S.i && R.next.i !== S.i && R.i !== E.i && R.next.i !== E.i && a(R, R.next, S, E))
              return !0;
            R = R.next;
          } while (R !== S);
          return !1;
        }(I, P) && (_(I, P) && _(P, I) && function(S, E) {
          var R = S, z = !1, j = (S.x + E.x) / 2, H = (S.y + E.y) / 2;
          do
            R.y > H != R.next.y > H && R.next.y !== R.y && j < (R.next.x - R.x) * (H - R.y) / (R.next.y - R.y) + R.x && (z = !z), R = R.next;
          while (R !== S);
          return z;
        }(I, P) && (p(I.prev, I, P.prev) || p(I, P.prev, P)) || c(I, P) && p(I.prev, I, I.next) > 0 && p(P.prev, P, P.next) > 0);
      }
      function p(I, P, S) {
        return (P.y - I.y) * (S.x - P.x) - (P.x - I.x) * (S.y - P.y);
      }
      function c(I, P) {
        return I.x === P.x && I.y === P.y;
      }
      function a(I, P, S, E) {
        var R = f(p(I, P, S)), z = f(p(I, P, E)), j = f(p(S, E, I)), H = f(p(S, E, P));
        return R !== z && j !== H || !(R !== 0 || !y(I, S, P)) || !(z !== 0 || !y(I, E, P)) || !(j !== 0 || !y(S, I, E)) || !(H !== 0 || !y(S, P, E));
      }
      function y(I, P, S) {
        return P.x <= Math.max(I.x, S.x) && P.x >= Math.min(I.x, S.x) && P.y <= Math.max(I.y, S.y) && P.y >= Math.min(I.y, S.y);
      }
      function f(I) {
        return I > 0 ? 1 : I < 0 ? -1 : 0;
      }
      function _(I, P) {
        return p(I.prev, I, I.next) < 0 ? p(I, P, I.next) >= 0 && p(I, I.prev, P) >= 0 : p(I, P, I.prev) < 0 || p(I, I.next, P) < 0;
      }
      function b(I, P) {
        var S = new L(I.i, I.x, I.y), E = new L(P.i, P.x, P.y), R = I.next, z = P.prev;
        return I.next = P, P.prev = I, S.next = R, R.prev = S, E.next = S, S.prev = E, z.next = E, E.prev = z, E;
      }
      function w(I, P, S, E) {
        var R = new L(I, P, S);
        return E ? (R.next = E.next, R.prev = E, E.next.prev = R, E.next = R) : (R.prev = R, R.next = R), R;
      }
      function T(I) {
        I.next.prev = I.prev, I.prev.next = I.next, I.prevZ && (I.prevZ.nextZ = I.nextZ), I.nextZ && (I.nextZ.prevZ = I.prevZ);
      }
      function L(I, P, S) {
        this.i = I, this.x = P, this.y = S, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1;
      }
      function A(I, P, S, E) {
        for (var R = 0, z = P, j = S - E; z < S; z += E)
          R += (I[j] - I[z]) * (I[z + 1] + I[j + 1]), j = z;
        return R;
      }
      Q.exports = m, Q.exports.default = m, m.deviation = function(I, P, S, E) {
        var R = P && P.length, z = R ? P[0] * S : I.length, j = Math.abs(A(I, 0, z, S));
        if (R)
          for (var H = 0, Y = P.length; H < Y; H++) {
            var J = P[H] * S, W = H < Y - 1 ? P[H + 1] * S : I.length;
            j -= Math.abs(A(I, J, W, S));
          }
        var Z = 0;
        for (H = 0; H < E.length; H += 3) {
          var re = E[H] * S, V = E[H + 1] * S, B = E[H + 2] * S;
          Z += Math.abs((I[re] - I[B]) * (I[V + 1] - I[re + 1]) - (I[re] - I[V]) * (I[B + 1] - I[re + 1]));
        }
        return j === 0 && Z === 0 ? 0 : Math.abs((Z - j) / j);
      }, m.flatten = function(I) {
        for (var P = I[0][0].length, S = { vertices: [], holes: [], dimensions: P }, E = 0, R = 0; R < I.length; R++) {
          for (var z = 0; z < I[R].length; z++)
            for (var j = 0; j < P; j++)
              S.vertices.push(I[R][z][j]);
          R > 0 && (E += I[R - 1].length, S.holes.push(E));
        }
        return S;
      };
    }, {}], 130: [function(v, Q, $) {
      var m = v("strongly-connected-components");
      Q.exports = function(g, k) {
        var x, e = [], r = [], n = [], s = {}, t = [];
        function d(a) {
          var y, f, _ = !1;
          for (r.push(a), n[a] = !0, y = 0; y < t[a].length; y++)
            (f = t[a][y]) === x ? (u(x, r), _ = !0) : n[f] || (_ = d(f));
          if (_)
            (function w(T) {
              n[T] = !1, s.hasOwnProperty(T) && Object.keys(s[T]).forEach(function(L) {
                delete s[T][L], n[L] && w(L);
              });
            })(a);
          else
            for (y = 0; y < t[a].length; y++) {
              f = t[a][y];
              var b = s[f];
              b || (b = {}, s[f] = b), b[f] = !0;
            }
          return r.pop(), _;
        }
        function u(a, y) {
          var f = [].concat(y).concat(a);
          k ? k(d) : e.push(f);
        }
        function o(a) {
          (function(L) {
            for (var A = 0; A < g.length; A++)
              A < L && (g[A] = []), g[A] = g[A].filter(function(I) {
                return I >= L;
              });
          })(a);
          for (var y, f = m(g).components.filter(function(L) {
            return L.length > 1;
          }), _ = 1 / 0, b = 0; b < f.length; b++)
            for (var w = 0; w < f[b].length; w++)
              f[b][w] < _ && (_ = f[b][w], y = b);
          var T = f[y];
          return !!T && { leastVertex: _, adjList: g.map(function(L, A) {
            return T.indexOf(A) === -1 ? [] : L.filter(function(I) {
              return T.indexOf(I) !== -1;
            });
          }) };
        }
        x = 0;
        for (var h = g.length; x < h; ) {
          var l = o(x);
          if (x = l.leastVertex, t = l.adjList) {
            for (var i = 0; i < t.length; i++)
              for (var p = 0; p < t[i].length; p++) {
                var c = t[i][p];
                n[+c] = !1, s[c] = {};
              }
            d(x), x += 1;
          } else
            x = h;
        }
        return k ? void 0 : e;
      };
    }, { "strongly-connected-components": 307 }], 131: [function(v, Q, $) {
      var m = v("../../object/valid-value");
      Q.exports = function() {
        return m(this).length = 0, this;
      };
    }, { "../../object/valid-value": 162 }], 132: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? Array.from : v("./shim");
    }, { "./is-implemented": 133, "./shim": 134 }], 133: [function(v, Q, $) {
      Q.exports = function() {
        var m, g, k = Array.from;
        return typeof k == "function" && (g = k(m = ["raz", "dwa"]), Boolean(g && g !== m && g[1] === "dwa"));
      };
    }, {}], 134: [function(v, Q, $) {
      var m = v("es6-symbol").iterator, g = v("../../function/is-arguments"), k = v("../../function/is-function"), x = v("../../number/to-pos-integer"), e = v("../../object/valid-callable"), r = v("../../object/valid-value"), n = v("../../object/is-value"), s = v("../../string/is-string"), t = Array.isArray, d = Function.prototype.call, u = { configurable: !0, enumerable: !0, writable: !0, value: null }, o = Object.defineProperty;
      Q.exports = function(h) {
        var l, i, p, c, a, y, f, _, b, w, T = arguments[1], L = arguments[2];
        if (h = Object(r(h)), n(T) && e(T), this && this !== Array && k(this))
          l = this;
        else {
          if (!T) {
            if (g(h))
              return (a = h.length) !== 1 ? Array.apply(null, h) : ((c = new Array(1))[0] = h[0], c);
            if (t(h)) {
              for (c = new Array(a = h.length), i = 0; i < a; ++i)
                c[i] = h[i];
              return c;
            }
          }
          c = [];
        }
        if (!t(h)) {
          if ((b = h[m]) !== void 0) {
            for (f = e(b).call(h), l && (c = new l()), _ = f.next(), i = 0; !_.done; )
              w = T ? d.call(T, L, _.value, i) : _.value, l ? (u.value = w, o(c, i, u)) : c[i] = w, _ = f.next(), ++i;
            a = i;
          } else if (s(h)) {
            for (a = h.length, l && (c = new l()), i = 0, p = 0; i < a; ++i)
              w = h[i], i + 1 < a && (y = w.charCodeAt(0)) >= 55296 && y <= 56319 && (w += h[++i]), w = T ? d.call(T, L, w, p) : w, l ? (u.value = w, o(c, p, u)) : c[p] = w, ++p;
            a = p;
          }
        }
        if (a === void 0)
          for (a = x(h.length), l && (c = new l(a)), i = 0; i < a; ++i)
            w = T ? d.call(T, L, h[i], i) : h[i], l ? (u.value = w, o(c, i, u)) : c[i] = w;
        return l && (u.value = null, c.length = a), c;
      };
    }, { "../../function/is-arguments": 135, "../../function/is-function": 136, "../../number/to-pos-integer": 142, "../../object/is-value": 151, "../../object/valid-callable": 160, "../../object/valid-value": 162, "../../string/is-string": 166, "es6-symbol": 175 }], 135: [function(v, Q, $) {
      var m = Object.prototype.toString, g = m.call(function() {
        return arguments;
      }());
      Q.exports = function(k) {
        return m.call(k) === g;
      };
    }, {}], 136: [function(v, Q, $) {
      var m = Object.prototype.toString, g = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
      Q.exports = function(k) {
        return typeof k == "function" && g(m.call(k));
      };
    }, {}], 137: [function(v, Q, $) {
      Q.exports = function() {
      };
    }, {}], 138: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? Math.sign : v("./shim");
    }, { "./is-implemented": 139, "./shim": 140 }], 139: [function(v, Q, $) {
      Q.exports = function() {
        var m = Math.sign;
        return typeof m == "function" && m(10) === 1 && m(-20) === -1;
      };
    }, {}], 140: [function(v, Q, $) {
      Q.exports = function(m) {
        return m = Number(m), isNaN(m) || m === 0 ? m : m > 0 ? 1 : -1;
      };
    }, {}], 141: [function(v, Q, $) {
      var m = v("../math/sign"), g = Math.abs, k = Math.floor;
      Q.exports = function(x) {
        return isNaN(x) ? 0 : (x = Number(x)) !== 0 && isFinite(x) ? m(x) * k(g(x)) : x;
      };
    }, { "../math/sign": 138 }], 142: [function(v, Q, $) {
      var m = v("./to-integer"), g = Math.max;
      Q.exports = function(k) {
        return g(0, m(k));
      };
    }, { "./to-integer": 141 }], 143: [function(v, Q, $) {
      var m = v("./valid-callable"), g = v("./valid-value"), k = Function.prototype.bind, x = Function.prototype.call, e = Object.keys, r = Object.prototype.propertyIsEnumerable;
      Q.exports = function(n, s) {
        return function(t, d) {
          var u, o = arguments[2], h = arguments[3];
          return t = Object(g(t)), m(d), u = e(t), h && u.sort(typeof h == "function" ? k.call(h, t) : void 0), typeof n != "function" && (n = u[n]), x.call(n, u, function(l, i) {
            return r.call(t, l) ? x.call(d, o, t[l], l, t, i) : s;
          });
        };
      };
    }, { "./valid-callable": 160, "./valid-value": 162 }], 144: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? Object.assign : v("./shim");
    }, { "./is-implemented": 145, "./shim": 146 }], 145: [function(v, Q, $) {
      Q.exports = function() {
        var m, g = Object.assign;
        return typeof g == "function" && (g(m = { foo: "raz" }, { bar: "dwa" }, { trzy: "trzy" }), m.foo + m.bar + m.trzy === "razdwatrzy");
      };
    }, {}], 146: [function(v, Q, $) {
      var m = v("../keys"), g = v("../valid-value"), k = Math.max;
      Q.exports = function(x, e) {
        var r, n, s, t = k(arguments.length, 2);
        for (x = Object(g(x)), s = function(d) {
          try {
            x[d] = e[d];
          } catch (u) {
            r || (r = u);
          }
        }, n = 1; n < t; ++n)
          m(e = arguments[n]).forEach(s);
        if (r !== void 0)
          throw r;
        return x;
      };
    }, { "../keys": 152, "../valid-value": 162 }], 147: [function(v, Q, $) {
      var m = v("../array/from"), g = v("./assign"), k = v("./valid-value");
      Q.exports = function(x) {
        var e = Object(k(x)), r = arguments[1], n = Object(arguments[2]);
        if (e !== x && !r)
          return e;
        var s = {};
        return r ? m(r, function(t) {
          (n.ensure || t in x) && (s[t] = x[t]);
        }) : g(s, x), s;
      };
    }, { "../array/from": 132, "./assign": 144, "./valid-value": 162 }], 148: [function(v, Q, $) {
      var m, g, k, x, e = Object.create;
      v("./set-prototype-of/is-implemented")() || (m = v("./set-prototype-of/shim")), Q.exports = m ? m.level !== 1 ? e : (g = {}, k = {}, x = { configurable: !1, enumerable: !1, writable: !0, value: void 0 }, Object.getOwnPropertyNames(Object.prototype).forEach(function(r) {
        k[r] = r !== "__proto__" ? x : { configurable: !0, enumerable: !1, writable: !0, value: void 0 };
      }), Object.defineProperties(g, k), Object.defineProperty(m, "nullPolyfill", { configurable: !1, enumerable: !1, writable: !1, value: g }), function(r, n) {
        return e(r === null ? g : r, n);
      }) : e;
    }, { "./set-prototype-of/is-implemented": 158, "./set-prototype-of/shim": 159 }], 149: [function(v, Q, $) {
      Q.exports = v("./_iterate")("forEach");
    }, { "./_iterate": 143 }], 150: [function(v, Q, $) {
      var m = v("./is-value"), g = { function: !0, object: !0 };
      Q.exports = function(k) {
        return m(k) && g[typeof k] || !1;
      };
    }, { "./is-value": 151 }], 151: [function(v, Q, $) {
      var m = v("../function/noop")();
      Q.exports = function(g) {
        return g !== m && g !== null;
      };
    }, { "../function/noop": 137 }], 152: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? Object.keys : v("./shim");
    }, { "./is-implemented": 153, "./shim": 154 }], 153: [function(v, Q, $) {
      Q.exports = function() {
        try {
          return Object.keys("primitive"), !0;
        } catch {
          return !1;
        }
      };
    }, {}], 154: [function(v, Q, $) {
      var m = v("../is-value"), g = Object.keys;
      Q.exports = function(k) {
        return g(m(k) ? Object(k) : k);
      };
    }, { "../is-value": 151 }], 155: [function(v, Q, $) {
      var m = v("./valid-callable"), g = v("./for-each"), k = Function.prototype.call;
      Q.exports = function(x, e) {
        var r = {}, n = arguments[2];
        return m(e), g(x, function(s, t, d, u) {
          r[t] = k.call(e, n, s, t, d, u);
        }), r;
      };
    }, { "./for-each": 149, "./valid-callable": 160 }], 156: [function(v, Q, $) {
      var m = v("./is-value"), g = Array.prototype.forEach, k = Object.create, x = function(e, r) {
        var n;
        for (n in e)
          r[n] = e[n];
      };
      Q.exports = function(e) {
        var r = k(null);
        return g.call(arguments, function(n) {
          m(n) && x(Object(n), r);
        }), r;
      };
    }, { "./is-value": 151 }], 157: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? Object.setPrototypeOf : v("./shim");
    }, { "./is-implemented": 158, "./shim": 159 }], 158: [function(v, Q, $) {
      var m = Object.create, g = Object.getPrototypeOf, k = {};
      Q.exports = function() {
        var x = Object.setPrototypeOf, e = arguments[0] || m;
        return typeof x == "function" && g(x(e(null), k)) === k;
      };
    }, {}], 159: [function(v, Q, $) {
      var m, g = v("../is-object"), k = v("../valid-value"), x = Object.prototype.isPrototypeOf, e = Object.defineProperty, r = { configurable: !0, enumerable: !1, writable: !0, value: void 0 };
      m = function(n, s) {
        if (k(n), s === null || g(s))
          return n;
        throw new TypeError("Prototype must be null or an object");
      }, Q.exports = function(n) {
        var s, t;
        return n ? (n.level === 2 ? n.set ? (t = n.set, s = function(d, u) {
          return t.call(m(d, u), u), d;
        }) : s = function(d, u) {
          return m(d, u).__proto__ = u, d;
        } : s = function d(u, o) {
          var h;
          return m(u, o), (h = x.call(d.nullPolyfill, u)) && delete d.nullPolyfill.__proto__, o === null && (o = d.nullPolyfill), u.__proto__ = o, h && e(d.nullPolyfill, "__proto__", r), u;
        }, Object.defineProperty(s, "level", { configurable: !1, enumerable: !1, writable: !1, value: n.level })) : null;
      }(function() {
        var n, s = /* @__PURE__ */ Object.create(null), t = {}, d = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
        if (d) {
          try {
            (n = d.set).call(s, t);
          } catch {
          }
          if (Object.getPrototypeOf(s) === t)
            return { set: n, level: 2 };
        }
        return s.__proto__ = t, Object.getPrototypeOf(s) === t ? { level: 2 } : ((s = {}).__proto__ = t, Object.getPrototypeOf(s) === t && { level: 1 });
      }()), v("../create");
    }, { "../create": 148, "../is-object": 150, "../valid-value": 162 }], 160: [function(v, Q, $) {
      Q.exports = function(m) {
        if (typeof m != "function")
          throw new TypeError(m + " is not a function");
        return m;
      };
    }, {}], 161: [function(v, Q, $) {
      var m = v("./is-object");
      Q.exports = function(g) {
        if (!m(g))
          throw new TypeError(g + " is not an Object");
        return g;
      };
    }, { "./is-object": 150 }], 162: [function(v, Q, $) {
      var m = v("./is-value");
      Q.exports = function(g) {
        if (!m(g))
          throw new TypeError("Cannot use null or undefined");
        return g;
      };
    }, { "./is-value": 151 }], 163: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? String.prototype.contains : v("./shim");
    }, { "./is-implemented": 164, "./shim": 165 }], 164: [function(v, Q, $) {
      var m = "razdwatrzy";
      Q.exports = function() {
        return typeof m.contains == "function" && m.contains("dwa") === !0 && m.contains("foo") === !1;
      };
    }, {}], 165: [function(v, Q, $) {
      var m = String.prototype.indexOf;
      Q.exports = function(g) {
        return m.call(this, g, arguments[1]) > -1;
      };
    }, {}], 166: [function(v, Q, $) {
      var m = Object.prototype.toString, g = m.call("");
      Q.exports = function(k) {
        return typeof k == "string" || k && typeof k == "object" && (k instanceof String || m.call(k) === g) || !1;
      };
    }, {}], 167: [function(v, Q, $) {
      var m = /* @__PURE__ */ Object.create(null), g = Math.random;
      Q.exports = function() {
        var k;
        do
          k = g().toString(36).slice(2);
        while (m[k]);
        return k;
      };
    }, {}], 168: [function(v, Q, $) {
      var m, g = v("es5-ext/object/set-prototype-of"), k = v("es5-ext/string/#/contains"), x = v("d"), e = v("es6-symbol"), r = v("./"), n = Object.defineProperty;
      m = Q.exports = function(s, t) {
        if (!(this instanceof m))
          throw new TypeError("Constructor requires 'new'");
        r.call(this, s), t = t ? k.call(t, "key+value") ? "key+value" : k.call(t, "key") ? "key" : "value" : "value", n(this, "__kind__", x("", t));
      }, g && g(m, r), delete m.prototype.constructor, m.prototype = Object.create(r.prototype, { _resolve: x(function(s) {
        return this.__kind__ === "value" ? this.__list__[s] : this.__kind__ === "key+value" ? [s, this.__list__[s]] : s;
      }) }), n(m.prototype, e.toStringTag, x("c", "Array Iterator"));
    }, { "./": 171, d: 106, "es5-ext/object/set-prototype-of": 157, "es5-ext/string/#/contains": 163, "es6-symbol": 175 }], 169: [function(v, Q, $) {
      var m = v("es5-ext/function/is-arguments"), g = v("es5-ext/object/valid-callable"), k = v("es5-ext/string/is-string"), x = v("./get"), e = Array.isArray, r = Function.prototype.call, n = Array.prototype.some;
      Q.exports = function(s, t) {
        var d, u, o, h, l, i, p, c, a = arguments[2];
        if (e(s) || m(s) ? d = "array" : k(s) ? d = "string" : s = x(s), g(t), o = function() {
          h = !0;
        }, d !== "array")
          if (d !== "string")
            for (u = s.next(); !u.done; ) {
              if (r.call(t, a, u.value, o), h)
                return;
              u = s.next();
            }
          else
            for (i = s.length, l = 0; l < i && (p = s[l], l + 1 < i && (c = p.charCodeAt(0)) >= 55296 && c <= 56319 && (p += s[++l]), r.call(t, a, p, o), !h); ++l)
              ;
        else
          n.call(s, function(y) {
            return r.call(t, a, y, o), h;
          });
      };
    }, { "./get": 170, "es5-ext/function/is-arguments": 135, "es5-ext/object/valid-callable": 160, "es5-ext/string/is-string": 166 }], 170: [function(v, Q, $) {
      var m = v("es5-ext/function/is-arguments"), g = v("es5-ext/string/is-string"), k = v("./array"), x = v("./string"), e = v("./valid-iterable"), r = v("es6-symbol").iterator;
      Q.exports = function(n) {
        return typeof e(n)[r] == "function" ? n[r]() : m(n) ? new k(n) : g(n) ? new x(n) : new k(n);
      };
    }, { "./array": 168, "./string": 173, "./valid-iterable": 174, "es5-ext/function/is-arguments": 135, "es5-ext/string/is-string": 166, "es6-symbol": 175 }], 171: [function(v, Q, $) {
      var m, g = v("es5-ext/array/#/clear"), k = v("es5-ext/object/assign"), x = v("es5-ext/object/valid-callable"), e = v("es5-ext/object/valid-value"), r = v("d"), n = v("d/auto-bind"), s = v("es6-symbol"), t = Object.defineProperty, d = Object.defineProperties;
      Q.exports = m = function(u, o) {
        if (!(this instanceof m))
          throw new TypeError("Constructor requires 'new'");
        d(this, { __list__: r("w", e(u)), __context__: r("w", o), __nextIndex__: r("w", 0) }), o && (x(o.on), o.on("_add", this._onAdd), o.on("_delete", this._onDelete), o.on("_clear", this._onClear));
      }, delete m.prototype.constructor, d(m.prototype, k({ _next: r(function() {
        var u;
        if (this.__list__)
          return this.__redo__ && (u = this.__redo__.shift()) !== void 0 ? u : this.__nextIndex__ < this.__list__.length ? this.__nextIndex__++ : void this._unBind();
      }), next: r(function() {
        return this._createResult(this._next());
      }), _createResult: r(function(u) {
        return u === void 0 ? { done: !0, value: void 0 } : { done: !1, value: this._resolve(u) };
      }), _resolve: r(function(u) {
        return this.__list__[u];
      }), _unBind: r(function() {
        this.__list__ = null, delete this.__redo__, this.__context__ && (this.__context__.off("_add", this._onAdd), this.__context__.off("_delete", this._onDelete), this.__context__.off("_clear", this._onClear), this.__context__ = null);
      }), toString: r(function() {
        return "[object " + (this[s.toStringTag] || "Object") + "]";
      }) }, n({ _onAdd: r(function(u) {
        u >= this.__nextIndex__ || (++this.__nextIndex__, this.__redo__ ? (this.__redo__.forEach(function(o, h) {
          o >= u && (this.__redo__[h] = ++o);
        }, this), this.__redo__.push(u)) : t(this, "__redo__", r("c", [u])));
      }), _onDelete: r(function(u) {
        var o;
        u >= this.__nextIndex__ || (--this.__nextIndex__, this.__redo__ && ((o = this.__redo__.indexOf(u)) !== -1 && this.__redo__.splice(o, 1), this.__redo__.forEach(function(h, l) {
          h > u && (this.__redo__[l] = --h);
        }, this)));
      }), _onClear: r(function() {
        this.__redo__ && g.call(this.__redo__), this.__nextIndex__ = 0;
      }) }))), t(m.prototype, s.iterator, r(function() {
        return this;
      }));
    }, { d: 106, "d/auto-bind": 105, "es5-ext/array/#/clear": 131, "es5-ext/object/assign": 144, "es5-ext/object/valid-callable": 160, "es5-ext/object/valid-value": 162, "es6-symbol": 175 }], 172: [function(v, Q, $) {
      var m = v("es5-ext/function/is-arguments"), g = v("es5-ext/object/is-value"), k = v("es5-ext/string/is-string"), x = v("es6-symbol").iterator, e = Array.isArray;
      Q.exports = function(r) {
        return !!g(r) && (!!e(r) || !!k(r) || !!m(r) || typeof r[x] == "function");
      };
    }, { "es5-ext/function/is-arguments": 135, "es5-ext/object/is-value": 151, "es5-ext/string/is-string": 166, "es6-symbol": 175 }], 173: [function(v, Q, $) {
      var m, g = v("es5-ext/object/set-prototype-of"), k = v("d"), x = v("es6-symbol"), e = v("./"), r = Object.defineProperty;
      m = Q.exports = function(n) {
        if (!(this instanceof m))
          throw new TypeError("Constructor requires 'new'");
        n = String(n), e.call(this, n), r(this, "__length__", k("", n.length));
      }, g && g(m, e), delete m.prototype.constructor, m.prototype = Object.create(e.prototype, { _next: k(function() {
        if (this.__list__)
          return this.__nextIndex__ < this.__length__ ? this.__nextIndex__++ : void this._unBind();
      }), _resolve: k(function(n) {
        var s, t = this.__list__[n];
        return this.__nextIndex__ === this.__length__ ? t : (s = t.charCodeAt(0)) >= 55296 && s <= 56319 ? t + this.__list__[this.__nextIndex__++] : t;
      }) }), r(m.prototype, x.toStringTag, k("c", "String Iterator"));
    }, { "./": 171, d: 106, "es5-ext/object/set-prototype-of": 157, "es6-symbol": 175 }], 174: [function(v, Q, $) {
      var m = v("./is-iterable");
      Q.exports = function(g) {
        if (!m(g))
          throw new TypeError(g + " is not iterable");
        return g;
      };
    }, { "./is-iterable": 172 }], 175: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? v("ext/global-this").Symbol : v("./polyfill");
    }, { "./is-implemented": 176, "./polyfill": 181, "ext/global-this": 188 }], 176: [function(v, Q, $) {
      var m = v("ext/global-this"), g = { object: !0, symbol: !0 };
      Q.exports = function() {
        var k, x = m.Symbol;
        if (typeof x != "function")
          return !1;
        k = x("test symbol");
        try {
          String(k);
        } catch {
          return !1;
        }
        return !!g[typeof x.iterator] && !!g[typeof x.toPrimitive] && !!g[typeof x.toStringTag];
      };
    }, { "ext/global-this": 188 }], 177: [function(v, Q, $) {
      Q.exports = function(m) {
        return !!m && (typeof m == "symbol" || !!m.constructor && m.constructor.name === "Symbol" && m[m.constructor.toStringTag] === "Symbol");
      };
    }, {}], 178: [function(v, Q, $) {
      var m = v("d"), g = Object.create, k = Object.defineProperty, x = Object.prototype, e = g(null);
      Q.exports = function(r) {
        for (var n, s, t = 0; e[r + (t || "")]; )
          ++t;
        return e[r += t || ""] = !0, k(x, n = "@@" + r, m.gs(null, function(d) {
          s || (s = !0, k(this, n, m(d)), s = !1);
        })), n;
      };
    }, { d: 106 }], 179: [function(v, Q, $) {
      var m = v("d"), g = v("ext/global-this").Symbol;
      Q.exports = function(k) {
        return Object.defineProperties(k, { hasInstance: m("", g && g.hasInstance || k("hasInstance")), isConcatSpreadable: m("", g && g.isConcatSpreadable || k("isConcatSpreadable")), iterator: m("", g && g.iterator || k("iterator")), match: m("", g && g.match || k("match")), replace: m("", g && g.replace || k("replace")), search: m("", g && g.search || k("search")), species: m("", g && g.species || k("species")), split: m("", g && g.split || k("split")), toPrimitive: m("", g && g.toPrimitive || k("toPrimitive")), toStringTag: m("", g && g.toStringTag || k("toStringTag")), unscopables: m("", g && g.unscopables || k("unscopables")) });
      };
    }, { d: 106, "ext/global-this": 188 }], 180: [function(v, Q, $) {
      var m = v("d"), g = v("../../../validate-symbol"), k = /* @__PURE__ */ Object.create(null);
      Q.exports = function(x) {
        return Object.defineProperties(x, { for: m(function(e) {
          return k[e] ? k[e] : k[e] = x(String(e));
        }), keyFor: m(function(e) {
          var r;
          for (r in g(e), k)
            if (k[r] === e)
              return r;
        }) });
      };
    }, { "../../../validate-symbol": 182, d: 106 }], 181: [function(v, Q, $) {
      var m, g, k, x = v("d"), e = v("./validate-symbol"), r = v("ext/global-this").Symbol, n = v("./lib/private/generate-name"), s = v("./lib/private/setup/standard-symbols"), t = v("./lib/private/setup/symbol-registry"), d = Object.create, u = Object.defineProperties, o = Object.defineProperty;
      if (typeof r == "function")
        try {
          String(r()), k = !0;
        } catch {
        }
      else
        r = null;
      g = function(h) {
        if (this instanceof g)
          throw new TypeError("Symbol is not a constructor");
        return m(h);
      }, Q.exports = m = function h(l) {
        var i;
        if (this instanceof h)
          throw new TypeError("Symbol is not a constructor");
        return k ? r(l) : (i = d(g.prototype), l = l === void 0 ? "" : String(l), u(i, { __description__: x("", l), __name__: x("", n(l)) }));
      }, s(m), t(m), u(g.prototype, { constructor: x(m), toString: x("", function() {
        return this.__name__;
      }) }), u(m.prototype, { toString: x(function() {
        return "Symbol (" + e(this).__description__ + ")";
      }), valueOf: x(function() {
        return e(this);
      }) }), o(m.prototype, m.toPrimitive, x("", function() {
        var h = e(this);
        return typeof h == "symbol" ? h : h.toString();
      })), o(m.prototype, m.toStringTag, x("c", "Symbol")), o(g.prototype, m.toStringTag, x("c", m.prototype[m.toStringTag])), o(g.prototype, m.toPrimitive, x("c", m.prototype[m.toPrimitive]));
    }, { "./lib/private/generate-name": 178, "./lib/private/setup/standard-symbols": 179, "./lib/private/setup/symbol-registry": 180, "./validate-symbol": 182, d: 106, "ext/global-this": 188 }], 182: [function(v, Q, $) {
      var m = v("./is-symbol");
      Q.exports = function(g) {
        if (!m(g))
          throw new TypeError(g + " is not a symbol");
        return g;
      };
    }, { "./is-symbol": 177 }], 183: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? WeakMap : v("./polyfill");
    }, { "./is-implemented": 184, "./polyfill": 186 }], 184: [function(v, Q, $) {
      Q.exports = function() {
        var m, g;
        if (typeof WeakMap != "function")
          return !1;
        try {
          m = new WeakMap([[g = {}, "one"], [{}, "two"], [{}, "three"]]);
        } catch {
          return !1;
        }
        return String(m) === "[object WeakMap]" && typeof m.set == "function" && m.set({}, 1) === m && typeof m.delete == "function" && typeof m.has == "function" && m.get(g) === "one";
      };
    }, {}], 185: [function(v, Q, $) {
      Q.exports = typeof WeakMap == "function" && Object.prototype.toString.call(/* @__PURE__ */ new WeakMap()) === "[object WeakMap]";
    }, {}], 186: [function(v, Q, $) {
      var m, g = v("es5-ext/object/is-value"), k = v("es5-ext/object/set-prototype-of"), x = v("es5-ext/object/valid-object"), e = v("es5-ext/object/valid-value"), r = v("es5-ext/string/random-uniq"), n = v("d"), s = v("es6-iterator/get"), t = v("es6-iterator/for-of"), d = v("es6-symbol").toStringTag, u = v("./is-native-implemented"), o = Array.isArray, h = Object.defineProperty, l = Object.prototype.hasOwnProperty, i = Object.getPrototypeOf;
      Q.exports = m = function() {
        var p, c = arguments[0];
        if (!(this instanceof m))
          throw new TypeError("Constructor requires 'new'");
        return p = u && k && WeakMap !== m ? k(/* @__PURE__ */ new WeakMap(), i(this)) : this, g(c) && (o(c) || (c = s(c))), h(p, "__weakMapData__", n("c", "$weakMap$" + r())), c && t(c, function(a) {
          e(a), p.set(a[0], a[1]);
        }), p;
      }, u && (k && k(m, WeakMap), m.prototype = Object.create(WeakMap.prototype, { constructor: n(m) })), Object.defineProperties(m.prototype, { delete: n(function(p) {
        return !!l.call(x(p), this.__weakMapData__) && (delete p[this.__weakMapData__], !0);
      }), get: n(function(p) {
        if (l.call(x(p), this.__weakMapData__))
          return p[this.__weakMapData__];
      }), has: n(function(p) {
        return l.call(x(p), this.__weakMapData__);
      }), set: n(function(p, c) {
        return h(x(p), this.__weakMapData__, n("c", c)), this;
      }), toString: n(function() {
        return "[object WeakMap]";
      }) }), h(m.prototype, d, n("c", "WeakMap"));
    }, { "./is-native-implemented": 185, d: 106, "es5-ext/object/is-value": 151, "es5-ext/object/set-prototype-of": 157, "es5-ext/object/valid-object": 161, "es5-ext/object/valid-value": 162, "es5-ext/string/random-uniq": 167, "es6-iterator/for-of": 169, "es6-iterator/get": 170, "es6-symbol": 175 }], 187: [function(v, Q, $) {
      var m = function() {
        if (typeof self == "object" && self)
          return self;
        if (typeof window == "object" && window)
          return window;
        throw new Error("Unable to resolve global `this`");
      };
      Q.exports = function() {
        if (this)
          return this;
        try {
          Object.defineProperty(Object.prototype, "__global__", { get: function() {
            return this;
          }, configurable: !0 });
        } catch {
          return m();
        }
        try {
          return __global__ || m();
        } finally {
          delete Object.prototype.__global__;
        }
      }();
    }, {}], 188: [function(v, Q, $) {
      Q.exports = v("./is-implemented")() ? globalThis : v("./implementation");
    }, { "./implementation": 187, "./is-implemented": 189 }], 189: [function(v, Q, $) {
      Q.exports = function() {
        return typeof globalThis == "object" && !!globalThis && globalThis.Array === Array;
      };
    }, {}], 190: [function(v, Q, $) {
      var m = v("is-string-blank");
      Q.exports = function(g) {
        var k = typeof g;
        if (k === "string") {
          var x = g;
          if ((g = +g) == 0 && m(x))
            return !1;
        } else if (k !== "number")
          return !1;
        return g - g < 1;
      };
    }, { "is-string-blank": 237 }], 191: [function(v, Q, $) {
      var m = v("dtype");
      Q.exports = function(g, k, x) {
        if (!g)
          throw new TypeError("must specify data as first parameter");
        if (x = 0 | +(x || 0), Array.isArray(g) && g[0] && typeof g[0][0] == "number") {
          var e, r, n, s, t = g[0].length, d = g.length * t;
          k && typeof k != "string" || (k = new (m(k || "float32"))(d + x));
          var u = k.length - x;
          if (d !== u)
            throw new Error("source length " + d + " (" + t + "x" + g.length + ") does not match destination length " + u);
          for (e = 0, n = x; e < g.length; e++)
            for (r = 0; r < t; r++)
              k[n++] = g[e][r] === null ? NaN : g[e][r];
        } else if (k && typeof k != "string")
          k.set(g, x);
        else {
          var o = m(k || "float32");
          if (Array.isArray(g) || k === "array")
            for (k = new o(g.length + x), e = 0, n = x, s = k.length; n < s; n++, e++)
              k[n] = g[e] === null ? NaN : g[e];
          else
            x === 0 ? k = new o(g) : (k = new o(g.length + x)).set(g, x);
        }
        return k;
      };
    }, { dtype: 127 }], 192: [function(v, Q, $) {
      var m = v("css-font/stringify"), g = [32, 126];
      Q.exports = function(k) {
        var x = (k = k || {}).shape ? k.shape : k.canvas ? [k.canvas.width, k.canvas.height] : [512, 512], e = k.canvas || document.createElement("canvas"), r = k.font, n = typeof k.step == "number" ? [k.step, k.step] : k.step || [32, 32], s = k.chars || g;
        if (r && typeof r != "string" && (r = m(r)), Array.isArray(s)) {
          if (s.length === 2 && typeof s[0] == "number" && typeof s[1] == "number") {
            for (var t = [], d = s[0], u = 0; d <= s[1]; d++)
              t[u++] = String.fromCharCode(d);
            s = t;
          }
        } else
          s = String(s).split("");
        x = x.slice(), e.width = x[0], e.height = x[1];
        var o = e.getContext("2d");
        o.fillStyle = "#000", o.fillRect(0, 0, e.width, e.height), o.font = r, o.textAlign = "center", o.textBaseline = "middle", o.fillStyle = "#fff";
        var h = n[0] / 2, l = n[1] / 2;
        for (d = 0; d < s.length; d++)
          o.fillText(s[d], h, l), (h += n[0]) > x[0] - n[0] / 2 && (h = n[0] / 2, l += n[1]);
        return e;
      };
    }, { "css-font/stringify": 102 }], 193: [function(v, Q, $) {
      function m(e, r) {
        r || (r = {}), (typeof e == "string" || Array.isArray(e)) && (r.family = e);
        var n = Array.isArray(r.family) ? r.family.join(", ") : r.family;
        if (!n)
          throw Error("`family` must be defined");
        var s = r.size || r.fontSize || r.em || 48, t = r.weight || r.fontWeight || "", d = (e = [r.style || r.fontStyle || "", t, s].join(" ") + "px " + n, r.origin || "top");
        if (m.cache[n] && s <= m.cache[n].em)
          return g(m.cache[n], d);
        var u = r.canvas || m.canvas, o = u.getContext("2d"), h = { upper: r.upper !== void 0 ? r.upper : "H", lower: r.lower !== void 0 ? r.lower : "x", descent: r.descent !== void 0 ? r.descent : "p", ascent: r.ascent !== void 0 ? r.ascent : "h", tittle: r.tittle !== void 0 ? r.tittle : "i", overshoot: r.overshoot !== void 0 ? r.overshoot : "O" }, l = Math.ceil(1.5 * s);
        u.height = l, u.width = 0.5 * l, o.font = e;
        var i = { top: 0 };
        o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillStyle = "black", o.fillText("H", 0, 0);
        var p = k(o.getImageData(0, 0, l, l));
        o.clearRect(0, 0, l, l), o.textBaseline = "bottom", o.fillText("H", 0, l);
        var c = k(o.getImageData(0, 0, l, l));
        i.lineHeight = i.bottom = l - c + p, o.clearRect(0, 0, l, l), o.textBaseline = "alphabetic", o.fillText("H", 0, l);
        var a = l - k(o.getImageData(0, 0, l, l)) - 1 + p;
        i.baseline = i.alphabetic = a, o.clearRect(0, 0, l, l), o.textBaseline = "middle", o.fillText("H", 0, 0.5 * l);
        var y = k(o.getImageData(0, 0, l, l));
        i.median = i.middle = l - y - 1 + p - 0.5 * l, o.clearRect(0, 0, l, l), o.textBaseline = "hanging", o.fillText("H", 0, 0.5 * l);
        var f = k(o.getImageData(0, 0, l, l));
        i.hanging = l - f - 1 + p - 0.5 * l, o.clearRect(0, 0, l, l), o.textBaseline = "ideographic", o.fillText("H", 0, l);
        var _ = k(o.getImageData(0, 0, l, l));
        if (i.ideographic = l - _ - 1 + p, h.upper && (o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillText(h.upper, 0, 0), i.upper = k(o.getImageData(0, 0, l, l)), i.capHeight = i.baseline - i.upper), h.lower && (o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillText(h.lower, 0, 0), i.lower = k(o.getImageData(0, 0, l, l)), i.xHeight = i.baseline - i.lower), h.tittle && (o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillText(h.tittle, 0, 0), i.tittle = k(o.getImageData(0, 0, l, l))), h.ascent && (o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillText(h.ascent, 0, 0), i.ascent = k(o.getImageData(0, 0, l, l))), h.descent && (o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillText(h.descent, 0, 0), i.descent = x(o.getImageData(0, 0, l, l))), h.overshoot) {
          o.clearRect(0, 0, l, l), o.textBaseline = "top", o.fillText(h.overshoot, 0, 0);
          var b = x(o.getImageData(0, 0, l, l));
          i.overshoot = b - a;
        }
        for (var w in i)
          i[w] /= s;
        return i.em = s, m.cache[n] = i, g(i, d);
      }
      function g(e, r) {
        var n = {};
        for (var s in typeof r == "string" && (r = e[r]), e)
          s !== "em" && (n[s] = e[s] - r);
        return n;
      }
      function k(e) {
        for (var r = e.height, n = e.data, s = 3; s < n.length; s += 4)
          if (n[s] !== 0)
            return Math.floor(0.25 * (s - 3) / r);
      }
      function x(e) {
        for (var r = e.height, n = e.data, s = n.length - 1; s > 0; s -= 4)
          if (n[s] !== 0)
            return Math.floor(0.25 * (s - 3) / r);
      }
      Q.exports = m, m.canvas = document.createElement("canvas"), m.cache = {};
    }, {}], 194: [function(v, Q, $) {
      Q.exports = function(m, g) {
        if (typeof m != "string")
          throw new TypeError("must specify type string");
        if (g = g || {}, typeof document > "u" && !g.canvas)
          return null;
        var k = g.canvas || document.createElement("canvas");
        typeof g.width == "number" && (k.width = g.width), typeof g.height == "number" && (k.height = g.height);
        var x, e = g;
        try {
          var r = [m];
          m.indexOf("webgl") === 0 && r.push("experimental-" + m);
          for (var n = 0; n < r.length; n++)
            if (x = k.getContext(r[n], e))
              return x;
        } catch {
          x = null;
        }
        return x || null;
      };
    }, {}], 195: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = g[0], x = g[1], e = g[2], r = g[3], n = g[4], s = g[5], t = g[6], d = g[7], u = g[8], o = g[9], h = g[10], l = g[11], i = g[12], p = g[13], c = g[14], a = g[15];
        return m[0] = s * (h * a - l * c) - o * (t * a - d * c) + p * (t * l - d * h), m[1] = -(x * (h * a - l * c) - o * (e * a - r * c) + p * (e * l - r * h)), m[2] = x * (t * a - d * c) - s * (e * a - r * c) + p * (e * d - r * t), m[3] = -(x * (t * l - d * h) - s * (e * l - r * h) + o * (e * d - r * t)), m[4] = -(n * (h * a - l * c) - u * (t * a - d * c) + i * (t * l - d * h)), m[5] = k * (h * a - l * c) - u * (e * a - r * c) + i * (e * l - r * h), m[6] = -(k * (t * a - d * c) - n * (e * a - r * c) + i * (e * d - r * t)), m[7] = k * (t * l - d * h) - n * (e * l - r * h) + u * (e * d - r * t), m[8] = n * (o * a - l * p) - u * (s * a - d * p) + i * (s * l - d * o), m[9] = -(k * (o * a - l * p) - u * (x * a - r * p) + i * (x * l - r * o)), m[10] = k * (s * a - d * p) - n * (x * a - r * p) + i * (x * d - r * s), m[11] = -(k * (s * l - d * o) - n * (x * l - r * o) + u * (x * d - r * s)), m[12] = -(n * (o * c - h * p) - u * (s * c - t * p) + i * (s * h - t * o)), m[13] = k * (o * c - h * p) - u * (x * c - e * p) + i * (x * h - e * o), m[14] = -(k * (s * c - t * p) - n * (x * c - e * p) + i * (x * t - e * s)), m[15] = k * (s * h - t * o) - n * (x * h - e * o) + u * (x * t - e * s), m;
      };
    }, {}], 196: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = new Float32Array(16);
        return g[0] = m[0], g[1] = m[1], g[2] = m[2], g[3] = m[3], g[4] = m[4], g[5] = m[5], g[6] = m[6], g[7] = m[7], g[8] = m[8], g[9] = m[9], g[10] = m[10], g[11] = m[11], g[12] = m[12], g[13] = m[13], g[14] = m[14], g[15] = m[15], g;
      };
    }, {}], 197: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m[0] = g[0], m[1] = g[1], m[2] = g[2], m[3] = g[3], m[4] = g[4], m[5] = g[5], m[6] = g[6], m[7] = g[7], m[8] = g[8], m[9] = g[9], m[10] = g[10], m[11] = g[11], m[12] = g[12], m[13] = g[13], m[14] = g[14], m[15] = g[15], m;
      };
    }, {}], 198: [function(v, Q, $) {
      Q.exports = function() {
        var m = new Float32Array(16);
        return m[0] = 1, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = 1, m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = 1, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 199: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = m[0], k = m[1], x = m[2], e = m[3], r = m[4], n = m[5], s = m[6], t = m[7], d = m[8], u = m[9], o = m[10], h = m[11], l = m[12], i = m[13], p = m[14], c = m[15];
        return (g * n - k * r) * (o * c - h * p) - (g * s - x * r) * (u * c - h * i) + (g * t - e * r) * (u * p - o * i) + (k * s - x * n) * (d * c - h * l) - (k * t - e * n) * (d * p - o * l) + (x * t - e * s) * (d * i - u * l);
      };
    }, {}], 200: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = g[0], x = g[1], e = g[2], r = g[3], n = k + k, s = x + x, t = e + e, d = k * n, u = x * n, o = x * s, h = e * n, l = e * s, i = e * t, p = r * n, c = r * s, a = r * t;
        return m[0] = 1 - o - i, m[1] = u + a, m[2] = h - c, m[3] = 0, m[4] = u - a, m[5] = 1 - d - i, m[6] = l + p, m[7] = 0, m[8] = h + c, m[9] = l - p, m[10] = 1 - d - o, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 201: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x, e, r, n = k[0], s = k[1], t = k[2], d = Math.sqrt(n * n + s * s + t * t);
        return Math.abs(d) < 1e-6 ? null : (n *= d = 1 / d, s *= d, t *= d, x = Math.sin(g), e = Math.cos(g), r = 1 - e, m[0] = n * n * r + e, m[1] = s * n * r + t * x, m[2] = t * n * r - s * x, m[3] = 0, m[4] = n * s * r - t * x, m[5] = s * s * r + e, m[6] = t * s * r + n * x, m[7] = 0, m[8] = n * t * r + s * x, m[9] = s * t * r - n * x, m[10] = t * t * r + e, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m);
      };
    }, {}], 202: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = g[0], e = g[1], r = g[2], n = g[3], s = x + x, t = e + e, d = r + r, u = x * s, o = x * t, h = x * d, l = e * t, i = e * d, p = r * d, c = n * s, a = n * t, y = n * d;
        return m[0] = 1 - (l + p), m[1] = o + y, m[2] = h - a, m[3] = 0, m[4] = o - y, m[5] = 1 - (u + p), m[6] = i + c, m[7] = 0, m[8] = h + a, m[9] = i - c, m[10] = 1 - (u + l), m[11] = 0, m[12] = k[0], m[13] = k[1], m[14] = k[2], m[15] = 1, m;
      };
    }, {}], 203: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m[0] = g[0], m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = g[1], m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = g[2], m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 204: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m[0] = 1, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = 1, m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = 1, m[11] = 0, m[12] = g[0], m[13] = g[1], m[14] = g[2], m[15] = 1, m;
      };
    }, {}], 205: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = Math.sin(g), x = Math.cos(g);
        return m[0] = 1, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = x, m[6] = k, m[7] = 0, m[8] = 0, m[9] = -k, m[10] = x, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 206: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = Math.sin(g), x = Math.cos(g);
        return m[0] = x, m[1] = 0, m[2] = -k, m[3] = 0, m[4] = 0, m[5] = 1, m[6] = 0, m[7] = 0, m[8] = k, m[9] = 0, m[10] = x, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 207: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = Math.sin(g), x = Math.cos(g);
        return m[0] = x, m[1] = k, m[2] = 0, m[3] = 0, m[4] = -k, m[5] = x, m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = 1, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 208: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e, r, n) {
        var s = 1 / (k - g), t = 1 / (e - x), d = 1 / (r - n);
        return m[0] = 2 * r * s, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = 2 * r * t, m[6] = 0, m[7] = 0, m[8] = (k + g) * s, m[9] = (e + x) * t, m[10] = (n + r) * d, m[11] = -1, m[12] = 0, m[13] = 0, m[14] = n * r * 2 * d, m[15] = 0, m;
      };
    }, {}], 209: [function(v, Q, $) {
      Q.exports = function(m) {
        return m[0] = 1, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = 1, m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = 1, m[11] = 0, m[12] = 0, m[13] = 0, m[14] = 0, m[15] = 1, m;
      };
    }, {}], 210: [function(v, Q, $) {
      Q.exports = { create: v("./create"), clone: v("./clone"), copy: v("./copy"), identity: v("./identity"), transpose: v("./transpose"), invert: v("./invert"), adjoint: v("./adjoint"), determinant: v("./determinant"), multiply: v("./multiply"), translate: v("./translate"), scale: v("./scale"), rotate: v("./rotate"), rotateX: v("./rotateX"), rotateY: v("./rotateY"), rotateZ: v("./rotateZ"), fromRotation: v("./fromRotation"), fromRotationTranslation: v("./fromRotationTranslation"), fromScaling: v("./fromScaling"), fromTranslation: v("./fromTranslation"), fromXRotation: v("./fromXRotation"), fromYRotation: v("./fromYRotation"), fromZRotation: v("./fromZRotation"), fromQuat: v("./fromQuat"), frustum: v("./frustum"), perspective: v("./perspective"), perspectiveFromFieldOfView: v("./perspectiveFromFieldOfView"), ortho: v("./ortho"), lookAt: v("./lookAt"), str: v("./str") };
    }, { "./adjoint": 195, "./clone": 196, "./copy": 197, "./create": 198, "./determinant": 199, "./fromQuat": 200, "./fromRotation": 201, "./fromRotationTranslation": 202, "./fromScaling": 203, "./fromTranslation": 204, "./fromXRotation": 205, "./fromYRotation": 206, "./fromZRotation": 207, "./frustum": 208, "./identity": 209, "./invert": 211, "./lookAt": 212, "./multiply": 213, "./ortho": 214, "./perspective": 215, "./perspectiveFromFieldOfView": 216, "./rotate": 217, "./rotateX": 218, "./rotateY": 219, "./rotateZ": 220, "./scale": 221, "./str": 222, "./translate": 223, "./transpose": 224 }], 211: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = g[0], x = g[1], e = g[2], r = g[3], n = g[4], s = g[5], t = g[6], d = g[7], u = g[8], o = g[9], h = g[10], l = g[11], i = g[12], p = g[13], c = g[14], a = g[15], y = k * s - x * n, f = k * t - e * n, _ = k * d - r * n, b = x * t - e * s, w = x * d - r * s, T = e * d - r * t, L = u * p - o * i, A = u * c - h * i, I = u * a - l * i, P = o * c - h * p, S = o * a - l * p, E = h * a - l * c, R = y * E - f * S + _ * P + b * I - w * A + T * L;
        return R ? (R = 1 / R, m[0] = (s * E - t * S + d * P) * R, m[1] = (e * S - x * E - r * P) * R, m[2] = (p * T - c * w + a * b) * R, m[3] = (h * w - o * T - l * b) * R, m[4] = (t * I - n * E - d * A) * R, m[5] = (k * E - e * I + r * A) * R, m[6] = (c * _ - i * T - a * f) * R, m[7] = (u * T - h * _ + l * f) * R, m[8] = (n * S - s * I + d * L) * R, m[9] = (x * I - k * S - r * L) * R, m[10] = (i * w - p * _ + a * y) * R, m[11] = (o * _ - u * w - l * y) * R, m[12] = (s * A - n * P - t * L) * R, m[13] = (k * P - x * A + e * L) * R, m[14] = (p * f - i * b - c * y) * R, m[15] = (u * b - o * f + h * y) * R, m) : null;
      };
    }, {}], 212: [function(v, Q, $) {
      var m = v("./identity");
      Q.exports = function(g, k, x, e) {
        var r, n, s, t, d, u, o, h, l, i, p = k[0], c = k[1], a = k[2], y = e[0], f = e[1], _ = e[2], b = x[0], w = x[1], T = x[2];
        return Math.abs(p - b) < 1e-6 && Math.abs(c - w) < 1e-6 && Math.abs(a - T) < 1e-6 ? m(g) : (o = p - b, h = c - w, l = a - T, i = 1 / Math.sqrt(o * o + h * h + l * l), r = f * (l *= i) - _ * (h *= i), n = _ * (o *= i) - y * l, s = y * h - f * o, (i = Math.sqrt(r * r + n * n + s * s)) ? (r *= i = 1 / i, n *= i, s *= i) : (r = 0, n = 0, s = 0), t = h * s - l * n, d = l * r - o * s, u = o * n - h * r, (i = Math.sqrt(t * t + d * d + u * u)) ? (t *= i = 1 / i, d *= i, u *= i) : (t = 0, d = 0, u = 0), g[0] = r, g[1] = t, g[2] = o, g[3] = 0, g[4] = n, g[5] = d, g[6] = h, g[7] = 0, g[8] = s, g[9] = u, g[10] = l, g[11] = 0, g[12] = -(r * p + n * c + s * a), g[13] = -(t * p + d * c + u * a), g[14] = -(o * p + h * c + l * a), g[15] = 1, g);
      };
    }, { "./identity": 209 }], 213: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = g[0], e = g[1], r = g[2], n = g[3], s = g[4], t = g[5], d = g[6], u = g[7], o = g[8], h = g[9], l = g[10], i = g[11], p = g[12], c = g[13], a = g[14], y = g[15], f = k[0], _ = k[1], b = k[2], w = k[3];
        return m[0] = f * x + _ * s + b * o + w * p, m[1] = f * e + _ * t + b * h + w * c, m[2] = f * r + _ * d + b * l + w * a, m[3] = f * n + _ * u + b * i + w * y, f = k[4], _ = k[5], b = k[6], w = k[7], m[4] = f * x + _ * s + b * o + w * p, m[5] = f * e + _ * t + b * h + w * c, m[6] = f * r + _ * d + b * l + w * a, m[7] = f * n + _ * u + b * i + w * y, f = k[8], _ = k[9], b = k[10], w = k[11], m[8] = f * x + _ * s + b * o + w * p, m[9] = f * e + _ * t + b * h + w * c, m[10] = f * r + _ * d + b * l + w * a, m[11] = f * n + _ * u + b * i + w * y, f = k[12], _ = k[13], b = k[14], w = k[15], m[12] = f * x + _ * s + b * o + w * p, m[13] = f * e + _ * t + b * h + w * c, m[14] = f * r + _ * d + b * l + w * a, m[15] = f * n + _ * u + b * i + w * y, m;
      };
    }, {}], 214: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e, r, n) {
        var s = 1 / (g - k), t = 1 / (x - e), d = 1 / (r - n);
        return m[0] = -2 * s, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = -2 * t, m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = 2 * d, m[11] = 0, m[12] = (g + k) * s, m[13] = (e + x) * t, m[14] = (n + r) * d, m[15] = 1, m;
      };
    }, {}], 215: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        var r = 1 / Math.tan(g / 2), n = 1 / (x - e);
        return m[0] = r / k, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = r, m[6] = 0, m[7] = 0, m[8] = 0, m[9] = 0, m[10] = (e + x) * n, m[11] = -1, m[12] = 0, m[13] = 0, m[14] = 2 * e * x * n, m[15] = 0, m;
      };
    }, {}], 216: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e = Math.tan(g.upDegrees * Math.PI / 180), r = Math.tan(g.downDegrees * Math.PI / 180), n = Math.tan(g.leftDegrees * Math.PI / 180), s = Math.tan(g.rightDegrees * Math.PI / 180), t = 2 / (n + s), d = 2 / (e + r);
        return m[0] = t, m[1] = 0, m[2] = 0, m[3] = 0, m[4] = 0, m[5] = d, m[6] = 0, m[7] = 0, m[8] = -(n - s) * t * 0.5, m[9] = (e - r) * d * 0.5, m[10] = x / (k - x), m[11] = -1, m[12] = 0, m[13] = 0, m[14] = x * k / (k - x), m[15] = 0, m;
      };
    }, {}], 217: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e, r, n, s, t, d, u, o, h, l, i, p, c, a, y, f, _, b, w, T, L, A, I, P, S = x[0], E = x[1], R = x[2], z = Math.sqrt(S * S + E * E + R * R);
        return Math.abs(z) < 1e-6 ? null : (S *= z = 1 / z, E *= z, R *= z, e = Math.sin(k), r = Math.cos(k), n = 1 - r, s = g[0], t = g[1], d = g[2], u = g[3], o = g[4], h = g[5], l = g[6], i = g[7], p = g[8], c = g[9], a = g[10], y = g[11], f = S * S * n + r, _ = E * S * n + R * e, b = R * S * n - E * e, w = S * E * n - R * e, T = E * E * n + r, L = R * E * n + S * e, A = S * R * n + E * e, I = E * R * n - S * e, P = R * R * n + r, m[0] = s * f + o * _ + p * b, m[1] = t * f + h * _ + c * b, m[2] = d * f + l * _ + a * b, m[3] = u * f + i * _ + y * b, m[4] = s * w + o * T + p * L, m[5] = t * w + h * T + c * L, m[6] = d * w + l * T + a * L, m[7] = u * w + i * T + y * L, m[8] = s * A + o * I + p * P, m[9] = t * A + h * I + c * P, m[10] = d * A + l * I + a * P, m[11] = u * A + i * I + y * P, g !== m && (m[12] = g[12], m[13] = g[13], m[14] = g[14], m[15] = g[15]), m);
      };
    }, {}], 218: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = Math.sin(k), e = Math.cos(k), r = g[4], n = g[5], s = g[6], t = g[7], d = g[8], u = g[9], o = g[10], h = g[11];
        return g !== m && (m[0] = g[0], m[1] = g[1], m[2] = g[2], m[3] = g[3], m[12] = g[12], m[13] = g[13], m[14] = g[14], m[15] = g[15]), m[4] = r * e + d * x, m[5] = n * e + u * x, m[6] = s * e + o * x, m[7] = t * e + h * x, m[8] = d * e - r * x, m[9] = u * e - n * x, m[10] = o * e - s * x, m[11] = h * e - t * x, m;
      };
    }, {}], 219: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = Math.sin(k), e = Math.cos(k), r = g[0], n = g[1], s = g[2], t = g[3], d = g[8], u = g[9], o = g[10], h = g[11];
        return g !== m && (m[4] = g[4], m[5] = g[5], m[6] = g[6], m[7] = g[7], m[12] = g[12], m[13] = g[13], m[14] = g[14], m[15] = g[15]), m[0] = r * e - d * x, m[1] = n * e - u * x, m[2] = s * e - o * x, m[3] = t * e - h * x, m[8] = r * x + d * e, m[9] = n * x + u * e, m[10] = s * x + o * e, m[11] = t * x + h * e, m;
      };
    }, {}], 220: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = Math.sin(k), e = Math.cos(k), r = g[0], n = g[1], s = g[2], t = g[3], d = g[4], u = g[5], o = g[6], h = g[7];
        return g !== m && (m[8] = g[8], m[9] = g[9], m[10] = g[10], m[11] = g[11], m[12] = g[12], m[13] = g[13], m[14] = g[14], m[15] = g[15]), m[0] = r * e + d * x, m[1] = n * e + u * x, m[2] = s * e + o * x, m[3] = t * e + h * x, m[4] = d * e - r * x, m[5] = u * e - n * x, m[6] = o * e - s * x, m[7] = h * e - t * x, m;
      };
    }, {}], 221: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = k[0], e = k[1], r = k[2];
        return m[0] = g[0] * x, m[1] = g[1] * x, m[2] = g[2] * x, m[3] = g[3] * x, m[4] = g[4] * e, m[5] = g[5] * e, m[6] = g[6] * e, m[7] = g[7] * e, m[8] = g[8] * r, m[9] = g[9] * r, m[10] = g[10] * r, m[11] = g[11] * r, m[12] = g[12], m[13] = g[13], m[14] = g[14], m[15] = g[15], m;
      };
    }, {}], 222: [function(v, Q, $) {
      Q.exports = function(m) {
        return "mat4(" + m[0] + ", " + m[1] + ", " + m[2] + ", " + m[3] + ", " + m[4] + ", " + m[5] + ", " + m[6] + ", " + m[7] + ", " + m[8] + ", " + m[9] + ", " + m[10] + ", " + m[11] + ", " + m[12] + ", " + m[13] + ", " + m[14] + ", " + m[15] + ")";
      };
    }, {}], 223: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x, e, r, n, s, t, d, u, o, h, l, i, p = k[0], c = k[1], a = k[2];
        return g === m ? (m[12] = g[0] * p + g[4] * c + g[8] * a + g[12], m[13] = g[1] * p + g[5] * c + g[9] * a + g[13], m[14] = g[2] * p + g[6] * c + g[10] * a + g[14], m[15] = g[3] * p + g[7] * c + g[11] * a + g[15]) : (x = g[0], e = g[1], r = g[2], n = g[3], s = g[4], t = g[5], d = g[6], u = g[7], o = g[8], h = g[9], l = g[10], i = g[11], m[0] = x, m[1] = e, m[2] = r, m[3] = n, m[4] = s, m[5] = t, m[6] = d, m[7] = u, m[8] = o, m[9] = h, m[10] = l, m[11] = i, m[12] = x * p + s * c + o * a + g[12], m[13] = e * p + t * c + h * a + g[13], m[14] = r * p + d * c + l * a + g[14], m[15] = n * p + u * c + i * a + g[15]), m;
      };
    }, {}], 224: [function(v, Q, $) {
      Q.exports = function(m, g) {
        if (m === g) {
          var k = g[1], x = g[2], e = g[3], r = g[6], n = g[7], s = g[11];
          m[1] = g[4], m[2] = g[8], m[3] = g[12], m[4] = k, m[6] = g[9], m[7] = g[13], m[8] = x, m[9] = r, m[11] = g[14], m[12] = e, m[13] = n, m[14] = s;
        } else
          m[0] = g[0], m[1] = g[4], m[2] = g[8], m[3] = g[12], m[4] = g[1], m[5] = g[5], m[6] = g[9], m[7] = g[13], m[8] = g[2], m[9] = g[6], m[10] = g[10], m[11] = g[14], m[12] = g[3], m[13] = g[7], m[14] = g[11], m[15] = g[15];
        return m;
      };
    }, {}], 225: [function(v, Q, $) {
      var m = v("css-font"), g = v("pick-by-alias"), k = v("regl"), x = v("gl-util/context"), e = v("es6-weak-map"), r = v("color-normalize"), n = v("font-atlas"), s = v("typedarray-pool"), t = v("parse-rect"), d = v("is-plain-obj"), u = v("parse-unit"), o = v("to-px"), h = v("detect-kerning"), l = v("object-assign"), i = v("font-measure"), p = v("flatten-vertex-data"), c = v("bit-twiddle").nextPow2, a = new e(), y = !1;
      if (document.body) {
        var f = document.body.appendChild(document.createElement("div"));
        f.style.font = "italic small-caps bold condensed 16px/2 cursive", getComputedStyle(f).fontStretch && (y = !0), document.body.removeChild(f);
      }
      var _ = function(b) {
        (function(w) {
          return typeof w == "function" && w._gl && w.prop && w.texture && w.buffer;
        })(b) ? (b = { regl: b }, this.gl = b.regl._gl) : this.gl = x(b), this.shader = a.get(this.gl), this.shader ? this.regl = this.shader.regl : this.regl = b.regl || k({ gl: this.gl }), this.charBuffer = this.regl.buffer({ type: "uint8", usage: "stream" }), this.sizeBuffer = this.regl.buffer({ type: "float", usage: "stream" }), this.shader || (this.shader = this.createShader(), a.set(this.gl, this.shader)), this.batch = [], this.fontSize = [], this.font = [], this.fontAtlas = [], this.draw = this.shader.draw.bind(this), this.render = function() {
          this.regl._refresh(), this.draw(this.batch);
        }, this.canvas = this.gl.canvas, this.update(d(b) ? b : {});
      };
      _.prototype.createShader = function() {
        var b = this.regl, w = b({ blend: { enable: !0, color: [0, 0, 0, 1], func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, stencil: { enable: !1 }, depth: { enable: !1 }, count: b.prop("count"), offset: b.prop("offset"), attributes: { charOffset: { offset: 4, stride: 8, buffer: b.this("sizeBuffer") }, width: { offset: 0, stride: 8, buffer: b.this("sizeBuffer") }, char: b.this("charBuffer"), position: b.this("position") }, uniforms: { atlasSize: function(T, L) {
          return [L.atlas.width, L.atlas.height];
        }, atlasDim: function(T, L) {
          return [L.atlas.cols, L.atlas.rows];
        }, atlas: function(T, L) {
          return L.atlas.texture;
        }, charStep: function(T, L) {
          return L.atlas.step;
        }, em: function(T, L) {
          return L.atlas.em;
        }, color: b.prop("color"), opacity: b.prop("opacity"), viewport: b.this("viewportArray"), scale: b.this("scale"), align: b.prop("align"), baseline: b.prop("baseline"), translate: b.this("translate"), positionOffset: b.prop("positionOffset") }, primitive: "points", viewport: b.this("viewport"), vert: `
			precision highp float;
			attribute float width, charOffset, char;
			attribute vec2 position;
			uniform float fontSize, charStep, em, align, baseline;
			uniform vec4 viewport;
			uniform vec4 color;
			uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
			varying vec2 charCoord, charId;
			varying float charWidth;
			varying vec4 fontColor;
			void main () {
				vec2 offset = floor(em * (vec2(align + charOffset, baseline)
					+ vec2(positionOffset.x, -positionOffset.y)))
					/ (viewport.zw * scale.xy);

				vec2 position = (position + translate) * scale;
				position += offset * scale;

				charCoord = position * viewport.zw + viewport.xy;

				gl_Position = vec4(position * 2. - 1., 0, 1);

				gl_PointSize = charStep;

				charId.x = mod(char, atlasDim.x);
				charId.y = floor(char / atlasDim.x);

				charWidth = width * em;

				fontColor = color / 255.;
			}`, frag: `
			precision highp float;
			uniform float fontSize, charStep, opacity;
			uniform vec2 atlasSize;
			uniform vec4 viewport;
			uniform sampler2D atlas;
			varying vec4 fontColor;
			varying vec2 charCoord, charId;
			varying float charWidth;

			float lightness(vec4 color) {
				return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
			}

			void main () {
				vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
				float halfCharStep = floor(charStep * .5 + .5);

				// invert y and shift by 1px (FF expecially needs that)
				uv.y = charStep - uv.y;

				// ignore points outside of character bounding box
				float halfCharWidth = ceil(charWidth * .5);
				if (floor(uv.x) > halfCharStep + halfCharWidth ||
					floor(uv.x) < halfCharStep - halfCharWidth) return;

				uv += charId * charStep;
				uv = uv / atlasSize;

				vec4 color = fontColor;
				vec4 mask = texture2D(atlas, uv);

				float maskY = lightness(mask);
				// float colorY = lightness(color);
				color.a *= maskY;
				color.a *= opacity;

				// color.a += .1;

				// antialiasing, see yiq color space y-channel formula
				// color.rgb += (1. - color.rgb) * (1. - mask.rgb);

				gl_FragColor = color;
			}` });
        return { regl: b, draw: w, atlas: {} };
      }, _.prototype.update = function(b) {
        var w = this;
        if (typeof b == "string")
          b = { text: b };
        else if (!b)
          return;
        (b = g(b, { position: "position positions coord coords coordinates", font: "font fontFace fontface typeface cssFont css-font family fontFamily", fontSize: "fontSize fontsize size font-size", text: "text texts chars characters value values symbols", align: "align alignment textAlign textbaseline", baseline: "baseline textBaseline textbaseline", direction: "dir direction textDirection", color: "color colour fill fill-color fillColor textColor textcolor", kerning: "kerning kern", range: "range dataBox", viewport: "vp viewport viewBox viewbox viewPort", opacity: "opacity alpha transparency visible visibility opaque", offset: "offset positionOffset padding shift indent indentation" }, !0)).opacity != null && (Array.isArray(b.opacity) ? this.opacity = b.opacity.map(function(de) {
          return parseFloat(de);
        }) : this.opacity = parseFloat(b.opacity)), b.viewport != null && (this.viewport = t(b.viewport), this.viewportArray = [this.viewport.x, this.viewport.y, this.viewport.width, this.viewport.height]), this.viewport == null && (this.viewport = { x: 0, y: 0, width: this.gl.drawingBufferWidth, height: this.gl.drawingBufferHeight }, this.viewportArray = [this.viewport.x, this.viewport.y, this.viewport.width, this.viewport.height]), b.kerning != null && (this.kerning = b.kerning), b.offset != null && (typeof b.offset == "number" && (b.offset = [b.offset, 0]), this.positionOffset = p(b.offset)), b.direction && (this.direction = b.direction), b.range && (this.range = b.range, this.scale = [1 / (b.range[2] - b.range[0]), 1 / (b.range[3] - b.range[1])], this.translate = [-b.range[0], -b.range[1]]), b.scale && (this.scale = b.scale), b.translate && (this.translate = b.translate), this.scale || (this.scale = [1 / this.viewport.width, 1 / this.viewport.height]), this.translate || (this.translate = [0, 0]), this.font.length || b.font || (b.font = _.baseFontSize + "px sans-serif");
        var T, L = !1, A = !1;
        if (b.font && (Array.isArray(b.font) ? b.font : [b.font]).forEach(function(de, Te) {
          if (typeof de == "string")
            try {
              de = m.parse(de);
            } catch {
              de = m.parse(_.baseFontSize + "px " + de);
            }
          else
            de = m.parse(m.stringify(de));
          var Ee = m.stringify({ size: _.baseFontSize, family: de.family, stretch: y ? de.stretch : void 0, variant: de.variant, weight: de.weight, style: de.style }), Me = u(de.size), ze = Math.round(Me[0] * o(Me[1]));
          if (ze !== w.fontSize[Te] && (A = !0, w.fontSize[Te] = ze), !(w.font[Te] && Ee == w.font[Te].baseString || (L = !0, w.font[Te] = _.fonts[Ee], w.font[Te]))) {
            var Ie = de.family.join(", "), Oe = [de.style];
            de.style != de.variant && Oe.push(de.variant), de.variant != de.weight && Oe.push(de.weight), y && de.weight != de.stretch && Oe.push(de.stretch), w.font[Te] = { baseString: Ee, family: Ie, weight: de.weight, stretch: de.stretch, style: de.style, variant: de.variant, width: {}, kerning: {}, metrics: i(Ie, { origin: "top", fontSize: _.baseFontSize, fontStyle: Oe.join(" ") }) }, _.fonts[Ee] = w.font[Te];
          }
        }), (L || A) && this.font.forEach(function(de, Te) {
          var Ee = m.stringify({ size: w.fontSize[Te], family: de.family, stretch: y ? de.stretch : void 0, variant: de.variant, weight: de.weight, style: de.style });
          if (w.fontAtlas[Te] = w.shader.atlas[Ee], !w.fontAtlas[Te]) {
            var Me = de.metrics;
            w.shader.atlas[Ee] = w.fontAtlas[Te] = { fontString: Ee, step: 2 * Math.ceil(w.fontSize[Te] * Me.bottom * 0.5), em: w.fontSize[Te], cols: 0, rows: 0, height: 0, width: 0, chars: [], ids: {}, texture: w.regl.texture() };
          }
          b.text == null && (b.text = w.text);
        }), typeof b.text == "string" && b.position && b.position.length > 2) {
          for (var I = Array(0.5 * b.position.length), P = 0; P < I.length; P++)
            I[P] = b.text;
          b.text = I;
        }
        if (b.text != null || L) {
          if (this.textOffsets = [0], Array.isArray(b.text)) {
            this.count = b.text[0].length, this.counts = [this.count];
            for (var S = 1; S < b.text.length; S++)
              this.textOffsets[S] = this.textOffsets[S - 1] + b.text[S - 1].length, this.count += b.text[S].length, this.counts.push(b.text[S].length);
            this.text = b.text.join("");
          } else
            this.text = b.text, this.count = this.text.length, this.counts = [this.count];
          T = [], this.font.forEach(function(de, Te) {
            _.atlasContext.font = de.baseString;
            for (var Ee = w.fontAtlas[Te], Me = 0; Me < w.text.length; Me++) {
              var ze = w.text.charAt(Me);
              if (Ee.ids[ze] == null && (Ee.ids[ze] = Ee.chars.length, Ee.chars.push(ze), T.push(ze)), de.width[ze] == null && (de.width[ze] = _.atlasContext.measureText(ze).width / _.baseFontSize, w.kerning)) {
                var Ie = [];
                for (var Oe in de.width)
                  Ie.push(Oe + ze, ze + Oe);
                l(de.kerning, h(de.family, { pairs: Ie }));
              }
            }
          });
        }
        if (b.position)
          if (b.position.length > 2) {
            for (var E = !b.position[0].length, R = s.mallocFloat(2 * this.count), z = 0, j = 0; z < this.counts.length; z++) {
              var H = this.counts[z];
              if (E)
                for (var Y = 0; Y < H; Y++)
                  R[j++] = b.position[2 * z], R[j++] = b.position[2 * z + 1];
              else
                for (var J = 0; J < H; J++)
                  R[j++] = b.position[z][0], R[j++] = b.position[z][1];
            }
            this.position.call ? this.position({ type: "float", data: R }) : this.position = this.regl.buffer({ type: "float", data: R }), s.freeFloat(R);
          } else
            this.position.destroy && this.position.destroy(), this.position = { constant: b.position };
        if (b.text || L) {
          var W = s.mallocUint8(this.count), Z = s.mallocFloat(2 * this.count);
          this.textWidth = [];
          for (var re = 0, V = 0; re < this.counts.length; re++) {
            for (var B = this.counts[re], U = this.font[re] || this.font[0], ee = this.fontAtlas[re] || this.fontAtlas[0], N = 0; N < B; N++) {
              var K = this.text.charAt(V), X = this.text.charAt(V - 1);
              if (W[V] = ee.ids[K], Z[2 * V] = U.width[K], N) {
                var te = Z[2 * V - 2], ie = Z[2 * V], le = Z[2 * V - 1] + 0.5 * te + 0.5 * ie;
                if (this.kerning) {
                  var oe = U.kerning[X + K];
                  oe && (le += 1e-3 * oe);
                }
                Z[2 * V + 1] = le;
              } else
                Z[2 * V + 1] = 0.5 * Z[2 * V];
              V++;
            }
            this.textWidth.push(Z.length ? 0.5 * Z[2 * V - 2] + Z[2 * V - 1] : 0);
          }
          b.align || (b.align = this.align), this.charBuffer({ data: W, type: "uint8", usage: "stream" }), this.sizeBuffer({ data: Z, type: "float", usage: "stream" }), s.freeUint8(W), s.freeFloat(Z), T.length && this.font.forEach(function(de, Te) {
            var Ee = w.fontAtlas[Te], Me = Ee.step, ze = Math.floor(_.maxAtlasSize / Me), Ie = Math.min(ze, Ee.chars.length), Oe = Math.ceil(Ee.chars.length / Ie), Ze = c(Ie * Me), Fe = c(Oe * Me);
            Ee.width = Ze, Ee.height = Fe, Ee.rows = Oe, Ee.cols = Ie, Ee.em && Ee.texture({ data: n({ canvas: _.atlasCanvas, font: Ee.fontString, chars: Ee.chars, shape: [Ze, Fe], step: [Me, Me] }) });
          });
        }
        if (b.align && (this.align = b.align, this.alignOffset = this.textWidth.map(function(de, Te) {
          var Ee = Array.isArray(w.align) ? w.align.length > 1 ? w.align[Te] : w.align[0] : w.align;
          if (typeof Ee == "number")
            return Ee;
          switch (Ee) {
            case "right":
            case "end":
              return -de;
            case "center":
            case "centre":
            case "middle":
              return 0.5 * -de;
          }
          return 0;
        })), this.baseline == null && b.baseline == null && (b.baseline = 0), b.baseline != null && (this.baseline = b.baseline, Array.isArray(this.baseline) || (this.baseline = [this.baseline]), this.baselineOffset = this.baseline.map(function(de, Te) {
          var Ee = (w.font[Te] || w.font[0]).metrics, Me = 0;
          return Me += 0.5 * Ee.bottom, Me += typeof de == "number" ? de - Ee.baseline : -Ee[de], Me *= -1;
        })), b.color != null)
          if (b.color || (b.color = "transparent"), typeof b.color != "string" && isNaN(b.color)) {
            var ve;
            if (typeof b.color[0] == "number" && b.color.length > this.counts.length) {
              var ue = b.color.length;
              ve = s.mallocUint8(ue);
              for (var ye = (b.color.subarray || b.color.slice).bind(b.color), Ae = 0; Ae < ue; Ae += 4)
                ve.set(r(ye(Ae, Ae + 4), "uint8"), Ae);
            } else {
              var pe = b.color.length;
              ve = s.mallocUint8(4 * pe);
              for (var ge = 0; ge < pe; ge++)
                ve.set(r(b.color[ge] || 0, "uint8"), 4 * ge);
            }
            this.color = ve;
          } else
            this.color = r(b.color, "uint8");
        if (b.position || b.text || b.color || b.baseline || b.align || b.font || b.offset || b.opacity)
          if (this.color.length > 4 || this.baselineOffset.length > 1 || this.align && this.align.length > 1 || this.fontAtlas.length > 1 || this.positionOffset.length > 2) {
            var we = Math.max(0.5 * this.position.length || 0, 0.25 * this.color.length || 0, this.baselineOffset.length || 0, this.alignOffset.length || 0, this.font.length || 0, this.opacity.length || 0, 0.5 * this.positionOffset.length || 0);
            this.batch = Array(we);
            for (var se = 0; se < this.batch.length; se++)
              this.batch[se] = { count: this.counts.length > 1 ? this.counts[se] : this.counts[0], offset: this.textOffsets.length > 1 ? this.textOffsets[se] : this.textOffsets[0], color: this.color ? this.color.length <= 4 ? this.color : this.color.subarray(4 * se, 4 * se + 4) : [0, 0, 0, 255], opacity: Array.isArray(this.opacity) ? this.opacity[se] : this.opacity, baseline: this.baselineOffset[se] != null ? this.baselineOffset[se] : this.baselineOffset[0], align: this.align ? this.alignOffset[se] != null ? this.alignOffset[se] : this.alignOffset[0] : 0, atlas: this.fontAtlas[se] || this.fontAtlas[0], positionOffset: this.positionOffset.length > 2 ? this.positionOffset.subarray(2 * se, 2 * se + 2) : this.positionOffset };
          } else
            this.count ? this.batch = [{ count: this.count, offset: 0, color: this.color || [0, 0, 0, 255], opacity: Array.isArray(this.opacity) ? this.opacity[0] : this.opacity, baseline: this.baselineOffset[0], align: this.alignOffset ? this.alignOffset[0] : 0, atlas: this.fontAtlas[0], positionOffset: this.positionOffset }] : this.batch = [];
      }, _.prototype.destroy = function() {
      }, _.prototype.kerning = !0, _.prototype.position = { constant: new Float32Array(2) }, _.prototype.translate = null, _.prototype.scale = null, _.prototype.font = null, _.prototype.text = "", _.prototype.positionOffset = [0, 0], _.prototype.opacity = 1, _.prototype.color = new Uint8Array([0, 0, 0, 255]), _.prototype.alignOffset = [0, 0], _.maxAtlasSize = 1024, _.atlasCanvas = document.createElement("canvas"), _.atlasContext = _.atlasCanvas.getContext("2d", { alpha: !1 }), _.baseFontSize = 64, _.fonts = {}, Q.exports = _;
    }, { "bit-twiddle": 81, "color-normalize": 89, "css-font": 99, "detect-kerning": 125, "es6-weak-map": 183, "flatten-vertex-data": 191, "font-atlas": 192, "font-measure": 193, "gl-util/context": 226, "is-plain-obj": 236, "object-assign": 247, "parse-rect": 249, "parse-unit": 251, "pick-by-alias": 253, regl: 284, "to-px": 315, "typedarray-pool": 328 }], 226: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = v("pick-by-alias");
          function k(r) {
            if (r.container)
              if (r.container == document.body)
                document.body.style.width || (r.canvas.width = r.width || r.pixelRatio * m.innerWidth), document.body.style.height || (r.canvas.height = r.height || r.pixelRatio * m.innerHeight);
              else {
                var n = r.container.getBoundingClientRect();
                r.canvas.width = r.width || n.right - n.left, r.canvas.height = r.height || n.bottom - n.top;
              }
          }
          function x(r) {
            return typeof r.getContext == "function" && "width" in r && "height" in r;
          }
          function e() {
            var r = document.createElement("canvas");
            return r.style.position = "absolute", r.style.top = 0, r.style.left = 0, r;
          }
          Q.exports = function(r) {
            var n;
            if (r ? typeof r == "string" && (r = { container: r }) : r = {}, x(r) ? r = { container: r } : r = typeof (n = r).nodeName == "string" && typeof n.appendChild == "function" && typeof n.getBoundingClientRect == "function" ? { container: r } : function(t) {
              return typeof t.drawArrays == "function" || typeof t.drawElements == "function";
            }(r) ? { gl: r } : g(r, { container: "container target element el canvas holder parent parentNode wrapper use ref root node", gl: "gl context webgl glContext", attrs: "attributes attrs contextAttributes", pixelRatio: "pixelRatio pxRatio px ratio pxratio pixelratio", width: "w width", height: "h height" }, !0), r.pixelRatio || (r.pixelRatio = m.pixelRatio || 1), r.gl)
              return r.gl;
            if (r.canvas && (r.container = r.canvas.parentNode), r.container) {
              if (typeof r.container == "string") {
                var s = document.querySelector(r.container);
                if (!s)
                  throw Error("Element " + r.container + " is not found");
                r.container = s;
              }
              x(r.container) ? (r.canvas = r.container, r.container = r.canvas.parentNode) : r.canvas || (r.canvas = e(), r.container.appendChild(r.canvas), k(r));
            } else if (!r.canvas) {
              if (typeof document > "u")
                throw Error("Not DOM environment. Use headless-gl.");
              r.container = document.body || document.documentElement, r.canvas = e(), r.container.appendChild(r.canvas), k(r);
            }
            return r.gl || ["webgl", "experimental-webgl", "webgl-experimental"].some(function(t) {
              try {
                r.gl = r.canvas.getContext(t, r.attrs);
              } catch {
              }
              return r.gl;
            }), r.gl;
          };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "pick-by-alias": 253 }], 227: [function(v, Q, $) {
      Q.exports = function(m) {
        typeof m == "string" && (m = [m]);
        for (var g = [].slice.call(arguments, 1), k = [], x = 0; x < m.length - 1; x++)
          k.push(m[x], g[x] || "");
        return k.push(m[x]), k.join("");
      };
    }, {}], 228: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g, k = v("is-browser");
          g = typeof m.matchMedia == "function" ? !m.matchMedia("(hover: none)").matches : k, Q.exports = g;
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "is-browser": 232 }], 229: [function(v, Q, $) {
      var m = v("is-browser");
      Q.exports = m && function() {
        var g = !1;
        try {
          var k = Object.defineProperty({}, "passive", { get: function() {
            g = !0;
          } });
          window.addEventListener("test", null, k), window.removeEventListener("test", null, k);
        } catch {
          g = !1;
        }
        return g;
      }();
    }, { "is-browser": 232 }], 230: [function(v, Q, $) {
      $.read = function(m, g, k, x, e) {
        var r, n, s = 8 * e - x - 1, t = (1 << s) - 1, d = t >> 1, u = -7, o = k ? e - 1 : 0, h = k ? -1 : 1, l = m[g + o];
        for (o += h, r = l & (1 << -u) - 1, l >>= -u, u += s; u > 0; r = 256 * r + m[g + o], o += h, u -= 8)
          ;
        for (n = r & (1 << -u) - 1, r >>= -u, u += x; u > 0; n = 256 * n + m[g + o], o += h, u -= 8)
          ;
        if (r === 0)
          r = 1 - d;
        else {
          if (r === t)
            return n ? NaN : 1 / 0 * (l ? -1 : 1);
          n += Math.pow(2, x), r -= d;
        }
        return (l ? -1 : 1) * n * Math.pow(2, r - x);
      }, $.write = function(m, g, k, x, e, r) {
        var n, s, t, d = 8 * r - e - 1, u = (1 << d) - 1, o = u >> 1, h = e === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, l = x ? 0 : r - 1, i = x ? 1 : -1, p = g < 0 || g === 0 && 1 / g < 0 ? 1 : 0;
        for (g = Math.abs(g), isNaN(g) || g === 1 / 0 ? (s = isNaN(g) ? 1 : 0, n = u) : (n = Math.floor(Math.log(g) / Math.LN2), g * (t = Math.pow(2, -n)) < 1 && (n--, t *= 2), (g += n + o >= 1 ? h / t : h * Math.pow(2, 1 - o)) * t >= 2 && (n++, t /= 2), n + o >= u ? (s = 0, n = u) : n + o >= 1 ? (s = (g * t - 1) * Math.pow(2, e), n += o) : (s = g * Math.pow(2, o - 1) * Math.pow(2, e), n = 0)); e >= 8; m[k + l] = 255 & s, l += i, s /= 256, e -= 8)
          ;
        for (n = n << e | s, d += e; d > 0; m[k + l] = 255 & n, l += i, n /= 256, d -= 8)
          ;
        m[k + l - i] |= 128 * p;
      };
    }, {}], 231: [function(v, Q, $) {
      typeof Object.create == "function" ? Q.exports = function(m, g) {
        g && (m.super_ = g, m.prototype = Object.create(g.prototype, { constructor: { value: m, enumerable: !1, writable: !0, configurable: !0 } }));
      } : Q.exports = function(m, g) {
        if (g) {
          m.super_ = g;
          var k = function() {
          };
          k.prototype = g.prototype, m.prototype = new k(), m.prototype.constructor = m;
        }
      };
    }, {}], 232: [function(v, Q, $) {
      Q.exports = !0;
    }, {}], 233: [function(v, Q, $) {
      Q.exports = typeof navigator < "u" && (/MSIE/.test(navigator.userAgent) || /Trident\//.test(navigator.appVersion));
    }, {}], 234: [function(v, Q, $) {
      Q.exports = k, Q.exports.isMobile = k, Q.exports.default = k;
      var m = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, g = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;
      function k(x) {
        x || (x = {});
        var e = x.ua;
        if (e || typeof navigator > "u" || (e = navigator.userAgent), e && e.headers && typeof e.headers["user-agent"] == "string" && (e = e.headers["user-agent"]), typeof e != "string")
          return !1;
        var r = x.tablet ? g.test(e) : m.test(e);
        return !r && x.tablet && x.featureDetect && navigator && navigator.maxTouchPoints > 1 && e.indexOf("Macintosh") !== -1 && e.indexOf("Safari") !== -1 && (r = !0), r;
      }
    }, {}], 235: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = typeof m;
        return m !== null && (g === "object" || g === "function");
      };
    }, {}], 236: [function(v, Q, $) {
      var m = Object.prototype.toString;
      Q.exports = function(g) {
        var k;
        return m.call(g) === "[object Object]" && ((k = Object.getPrototypeOf(g)) === null || k === Object.getPrototypeOf({}));
      };
    }, {}], 237: [function(v, Q, $) {
      Q.exports = function(m) {
        for (var g, k = m.length, x = 0; x < k; x++)
          if (((g = m.charCodeAt(x)) < 9 || g > 13) && g !== 32 && g !== 133 && g !== 160 && g !== 5760 && g !== 6158 && (g < 8192 || g > 8205) && g !== 8232 && g !== 8233 && g !== 8239 && g !== 8287 && g !== 8288 && g !== 12288 && g !== 65279)
            return !1;
        return !0;
      };
    }, {}], 238: [function(v, Q, $) {
      Q.exports = function(m) {
        return typeof m == "string" && (m = m.trim(), !!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(m) && /[\dz]$/i.test(m) && m.length > 4));
      };
    }, {}], 239: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? Q.exports = g() : (m = m || self).mapboxgl = g();
      })(this, function() {
        var m, g, k;
        function x(e, r) {
          if (m)
            if (g) {
              var n = "var sharedChunk = {}; (" + m + ")(sharedChunk); (" + g + ")(sharedChunk);", s = {};
              m(s), (k = r(s)).workerUrl = window.URL.createObjectURL(new Blob([n], { type: "text/javascript" }));
            } else
              g = r;
          else
            m = r;
        }
        return x(0, function(e) {
          function r(M, O) {
            return M(O = { exports: {} }, O.exports), O.exports;
          }
          var n = s;
          function s(M, O, G, ne) {
            this.cx = 3 * M, this.bx = 3 * (G - M) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * O, this.by = 3 * (ne - O) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = M, this.p1y = ne, this.p2x = G, this.p2y = ne;
          }
          s.prototype.sampleCurveX = function(M) {
            return ((this.ax * M + this.bx) * M + this.cx) * M;
          }, s.prototype.sampleCurveY = function(M) {
            return ((this.ay * M + this.by) * M + this.cy) * M;
          }, s.prototype.sampleCurveDerivativeX = function(M) {
            return (3 * this.ax * M + 2 * this.bx) * M + this.cx;
          }, s.prototype.solveCurveX = function(M, O) {
            var G, ne, me, _e, Ce;
            for (O === void 0 && (O = 1e-6), me = M, Ce = 0; Ce < 8; Ce++) {
              if (_e = this.sampleCurveX(me) - M, Math.abs(_e) < O)
                return me;
              var Ne = this.sampleCurveDerivativeX(me);
              if (Math.abs(Ne) < 1e-6)
                break;
              me -= _e / Ne;
            }
            if ((me = M) < (G = 0))
              return G;
            if (me > (ne = 1))
              return ne;
            for (; G < ne; ) {
              if (_e = this.sampleCurveX(me), Math.abs(_e - M) < O)
                return me;
              M > _e ? G = me : ne = me, me = 0.5 * (ne - G) + G;
            }
            return me;
          }, s.prototype.solve = function(M, O) {
            return this.sampleCurveY(this.solveCurveX(M, O));
          };
          var t = d;
          function d(M, O) {
            this.x = M, this.y = O;
          }
          function u(M, O, G, ne) {
            var me = new n(M, O, G, ne);
            return function(_e) {
              return me.solve(_e);
            };
          }
          d.prototype = { clone: function() {
            return new d(this.x, this.y);
          }, add: function(M) {
            return this.clone()._add(M);
          }, sub: function(M) {
            return this.clone()._sub(M);
          }, multByPoint: function(M) {
            return this.clone()._multByPoint(M);
          }, divByPoint: function(M) {
            return this.clone()._divByPoint(M);
          }, mult: function(M) {
            return this.clone()._mult(M);
          }, div: function(M) {
            return this.clone()._div(M);
          }, rotate: function(M) {
            return this.clone()._rotate(M);
          }, rotateAround: function(M, O) {
            return this.clone()._rotateAround(M, O);
          }, matMult: function(M) {
            return this.clone()._matMult(M);
          }, unit: function() {
            return this.clone()._unit();
          }, perp: function() {
            return this.clone()._perp();
          }, round: function() {
            return this.clone()._round();
          }, mag: function() {
            return Math.sqrt(this.x * this.x + this.y * this.y);
          }, equals: function(M) {
            return this.x === M.x && this.y === M.y;
          }, dist: function(M) {
            return Math.sqrt(this.distSqr(M));
          }, distSqr: function(M) {
            var O = M.x - this.x, G = M.y - this.y;
            return O * O + G * G;
          }, angle: function() {
            return Math.atan2(this.y, this.x);
          }, angleTo: function(M) {
            return Math.atan2(this.y - M.y, this.x - M.x);
          }, angleWith: function(M) {
            return this.angleWithSep(M.x, M.y);
          }, angleWithSep: function(M, O) {
            return Math.atan2(this.x * O - this.y * M, this.x * M + this.y * O);
          }, _matMult: function(M) {
            var O = M[0] * this.x + M[1] * this.y, G = M[2] * this.x + M[3] * this.y;
            return this.x = O, this.y = G, this;
          }, _add: function(M) {
            return this.x += M.x, this.y += M.y, this;
          }, _sub: function(M) {
            return this.x -= M.x, this.y -= M.y, this;
          }, _mult: function(M) {
            return this.x *= M, this.y *= M, this;
          }, _div: function(M) {
            return this.x /= M, this.y /= M, this;
          }, _multByPoint: function(M) {
            return this.x *= M.x, this.y *= M.y, this;
          }, _divByPoint: function(M) {
            return this.x /= M.x, this.y /= M.y, this;
          }, _unit: function() {
            return this._div(this.mag()), this;
          }, _perp: function() {
            var M = this.y;
            return this.y = this.x, this.x = -M, this;
          }, _rotate: function(M) {
            var O = Math.cos(M), G = Math.sin(M), ne = O * this.x - G * this.y, me = G * this.x + O * this.y;
            return this.x = ne, this.y = me, this;
          }, _rotateAround: function(M, O) {
            var G = Math.cos(M), ne = Math.sin(M), me = O.x + G * (this.x - O.x) - ne * (this.y - O.y), _e = O.y + ne * (this.x - O.x) + G * (this.y - O.y);
            return this.x = me, this.y = _e, this;
          }, _round: function() {
            return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
          } }, d.convert = function(M) {
            return M instanceof d ? M : Array.isArray(M) ? new d(M[0], M[1]) : M;
          };
          var o = u(0.25, 0.1, 0.25, 1);
          function h(M, O, G) {
            return Math.min(G, Math.max(O, M));
          }
          function l(M, O, G) {
            var ne = G - O, me = ((M - O) % ne + ne) % ne + O;
            return me === O ? G : me;
          }
          function i(M) {
            for (var O = [], G = arguments.length - 1; G-- > 0; )
              O[G] = arguments[G + 1];
            for (var ne = 0, me = O; ne < me.length; ne += 1) {
              var _e = me[ne];
              for (var Ce in _e)
                M[Ce] = _e[Ce];
            }
            return M;
          }
          var p = 1;
          function c() {
            return p++;
          }
          function a() {
            return function M(O) {
              return O ? (O ^ 16 * Math.random() >> O / 4).toString(16) : ([1e7] + -[1e3] + -4e3 + -8e3 + -1e11).replace(/[018]/g, M);
            }();
          }
          function y(M) {
            return !!M && /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(M);
          }
          function f(M, O) {
            M.forEach(function(G) {
              O[G] && (O[G] = O[G].bind(O));
            });
          }
          function _(M, O) {
            return M.indexOf(O, M.length - O.length) !== -1;
          }
          function b(M, O, G) {
            var ne = {};
            for (var me in M)
              ne[me] = O.call(G || this, M[me], me, M);
            return ne;
          }
          function w(M, O, G) {
            var ne = {};
            for (var me in M)
              O.call(G || this, M[me], me, M) && (ne[me] = M[me]);
            return ne;
          }
          function T(M) {
            return Array.isArray(M) ? M.map(T) : typeof M == "object" && M ? b(M, T) : M;
          }
          var L = {};
          function A(M) {
            L[M] || (typeof console < "u" && console.warn(M), L[M] = !0);
          }
          function I(M, O, G) {
            return (G.y - M.y) * (O.x - M.x) > (O.y - M.y) * (G.x - M.x);
          }
          function P(M) {
            for (var O = 0, G = 0, ne = M.length, me = ne - 1, _e = void 0, Ce = void 0; G < ne; me = G++)
              _e = M[G], O += ((Ce = M[me]).x - _e.x) * (_e.y + Ce.y);
            return O;
          }
          function S() {
            return typeof WorkerGlobalScope < "u" && typeof self < "u" && self instanceof WorkerGlobalScope;
          }
          function E(M) {
            var O = {};
            if (M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, function(ne, me, _e, Ce) {
              var Ne = _e || Ce;
              return O[me] = !Ne || Ne.toLowerCase(), "";
            }), O["max-age"]) {
              var G = parseInt(O["max-age"], 10);
              isNaN(G) ? delete O["max-age"] : O["max-age"] = G;
            }
            return O;
          }
          var R = null;
          function z(M) {
            if (R == null) {
              var O = M.navigator ? M.navigator.userAgent : null;
              R = !!M.safari || !(!O || !(/\b(iPad|iPhone|iPod)\b/.test(O) || O.match("Safari") && !O.match("Chrome")));
            }
            return R;
          }
          function j(M) {
            try {
              var O = self[M];
              return O.setItem("_mapbox_test_", 1), O.removeItem("_mapbox_test_"), !0;
            } catch {
              return !1;
            }
          }
          var H, Y, J, W, Z = self.performance && self.performance.now ? self.performance.now.bind(self.performance) : Date.now.bind(Date), re = self.requestAnimationFrame || self.mozRequestAnimationFrame || self.webkitRequestAnimationFrame || self.msRequestAnimationFrame, V = self.cancelAnimationFrame || self.mozCancelAnimationFrame || self.webkitCancelAnimationFrame || self.msCancelAnimationFrame, B = { now: Z, frame: function(M) {
            var O = re(M);
            return { cancel: function() {
              return V(O);
            } };
          }, getImageData: function(M, O) {
            O === void 0 && (O = 0);
            var G = self.document.createElement("canvas"), ne = G.getContext("2d");
            if (!ne)
              throw new Error("failed to create canvas 2d context");
            return G.width = M.width, G.height = M.height, ne.drawImage(M, 0, 0, M.width, M.height), ne.getImageData(-O, -O, M.width + 2 * O, M.height + 2 * O);
          }, resolveURL: function(M) {
            return H || (H = self.document.createElement("a")), H.href = M, H.href;
          }, hardwareConcurrency: self.navigator.hardwareConcurrency || 4, get devicePixelRatio() {
            return self.devicePixelRatio;
          }, get prefersReducedMotion() {
            return !!self.matchMedia && (Y == null && (Y = self.matchMedia("(prefers-reduced-motion: reduce)")), Y.matches);
          } }, U = { API_URL: "https://api.mapbox.com", get EVENTS_URL() {
            return this.API_URL ? this.API_URL.indexOf("https://api.mapbox.cn") === 0 ? "https://events.mapbox.cn/events/v2" : this.API_URL.indexOf("https://api.mapbox.com") === 0 ? "https://events.mapbox.com/events/v2" : null : null;
          }, FEEDBACK_URL: "https://apps.mapbox.com/feedback", REQUIRE_ACCESS_TOKEN: !0, ACCESS_TOKEN: null, MAX_PARALLEL_IMAGE_REQUESTS: 16 }, ee = { supported: !1, testSupport: function(M) {
            N || !W || (K ? X(M) : J = M);
          } }, N = !1, K = !1;
          function X(M) {
            var O = M.createTexture();
            M.bindTexture(M.TEXTURE_2D, O);
            try {
              if (M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, M.RGBA, M.UNSIGNED_BYTE, W), M.isContextLost())
                return;
              ee.supported = !0;
            } catch {
            }
            M.deleteTexture(O), N = !0;
          }
          self.document && ((W = self.document.createElement("img")).onload = function() {
            J && X(J), J = null, K = !0;
          }, W.onerror = function() {
            N = !0, J = null;
          }, W.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");
          var te = "01", ie = function(M, O) {
            this._transformRequestFn = M, this._customAccessToken = O, this._createSkuToken();
          };
          function le(M) {
            return M.indexOf("mapbox:") === 0;
          }
          ie.prototype._createSkuToken = function() {
            var M = function() {
              for (var O = "", G = 0; G < 10; G++)
                O += "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62 * Math.random())];
              return { token: ["1", te, O].join(""), tokenExpiresAt: Date.now() + 432e5 };
            }();
            this._skuToken = M.token, this._skuTokenExpiresAt = M.tokenExpiresAt;
          }, ie.prototype._isSkuTokenExpired = function() {
            return Date.now() > this._skuTokenExpiresAt;
          }, ie.prototype.transformRequest = function(M, O) {
            return this._transformRequestFn && this._transformRequestFn(M, O) || { url: M };
          }, ie.prototype.normalizeStyleURL = function(M, O) {
            if (!le(M))
              return M;
            var G = ye(M);
            return G.path = "/styles/v1" + G.path, this._makeAPIURL(G, this._customAccessToken || O);
          }, ie.prototype.normalizeGlyphsURL = function(M, O) {
            if (!le(M))
              return M;
            var G = ye(M);
            return G.path = "/fonts/v1" + G.path, this._makeAPIURL(G, this._customAccessToken || O);
          }, ie.prototype.normalizeSourceURL = function(M, O) {
            if (!le(M))
              return M;
            var G = ye(M);
            return G.path = "/v4/" + G.authority + ".json", G.params.push("secure"), this._makeAPIURL(G, this._customAccessToken || O);
          }, ie.prototype.normalizeSpriteURL = function(M, O, G, ne) {
            var me = ye(M);
            return le(M) ? (me.path = "/styles/v1" + me.path + "/sprite" + O + G, this._makeAPIURL(me, this._customAccessToken || ne)) : (me.path += "" + O + G, Ae(me));
          }, ie.prototype.normalizeTileURL = function(M, O) {
            if (this._isSkuTokenExpired() && this._createSkuToken(), M && !le(M))
              return M;
            var G = ye(M), ne = B.devicePixelRatio >= 2 || O === 512 ? "@2x" : "", me = ee.supported ? ".webp" : "$1";
            G.path = G.path.replace(/(\.(png|jpg)\d*)(?=$)/, "" + ne + me), G.path = G.path.replace(/^.+\/v4\//, "/"), G.path = "/v4" + G.path;
            var _e = this._customAccessToken || function(Ce) {
              for (var Ne = 0, $e = Ce; Ne < $e.length; Ne += 1) {
                var ct = $e[Ne].match(/^access_token=(.*)$/);
                if (ct)
                  return ct[1];
              }
              return null;
            }(G.params) || U.ACCESS_TOKEN;
            return U.REQUIRE_ACCESS_TOKEN && _e && this._skuToken && G.params.push("sku=" + this._skuToken), this._makeAPIURL(G, _e);
          }, ie.prototype.canonicalizeTileURL = function(M, O) {
            var G = ye(M);
            if (!G.path.match(/(^\/v4\/)/) || !G.path.match(/\.[\w]+$/))
              return M;
            var ne = "mapbox://tiles/";
            ne += G.path.replace("/v4/", "");
            var me = G.params;
            return O && (me = me.filter(function(_e) {
              return !_e.match(/^access_token=/);
            })), me.length && (ne += "?" + me.join("&")), ne;
          }, ie.prototype.canonicalizeTileset = function(M, O) {
            for (var G = !!O && le(O), ne = [], me = 0, _e = M.tiles || []; me < _e.length; me += 1) {
              var Ce = _e[me];
              ve(Ce) ? ne.push(this.canonicalizeTileURL(Ce, G)) : ne.push(Ce);
            }
            return ne;
          }, ie.prototype._makeAPIURL = function(M, O) {
            var G = "See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes", ne = ye(U.API_URL);
            if (M.protocol = ne.protocol, M.authority = ne.authority, ne.path !== "/" && (M.path = "" + ne.path + M.path), !U.REQUIRE_ACCESS_TOKEN)
              return Ae(M);
            if (!(O = O || U.ACCESS_TOKEN))
              throw new Error("An API access token is required to use Mapbox GL. " + G);
            if (O[0] === "s")
              throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). " + G);
            return M.params = M.params.filter(function(me) {
              return me.indexOf("access_token") === -1;
            }), M.params.push("access_token=" + O), Ae(M);
          };
          var oe = /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;
          function ve(M) {
            return oe.test(M);
          }
          var ue = /^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;
          function ye(M) {
            var O = M.match(ue);
            if (!O)
              throw new Error("Unable to parse URL object");
            return { protocol: O[1], authority: O[2], path: O[3] || "/", params: O[4] ? O[4].split("&") : [] };
          }
          function Ae(M) {
            var O = M.params.length ? "?" + M.params.join("&") : "";
            return M.protocol + "://" + M.authority + M.path + O;
          }
          function pe(M) {
            if (!M)
              return null;
            var O, G = M.split(".");
            if (!G || G.length !== 3)
              return null;
            try {
              return JSON.parse((O = G[1], decodeURIComponent(self.atob(O).split("").map(function(ne) {
                return "%" + ("00" + ne.charCodeAt(0).toString(16)).slice(-2);
              }).join(""))));
            } catch {
              return null;
            }
          }
          var ge = function(M) {
            this.type = M, this.anonId = null, this.eventData = {}, this.queue = [], this.pendingRequest = null;
          };
          ge.prototype.getStorageKey = function(M) {
            var O, G = pe(U.ACCESS_TOKEN), ne = "";
            return G && G.u ? (O = G.u, ne = self.btoa(encodeURIComponent(O).replace(/%([0-9A-F]{2})/g, function(me, _e) {
              return String.fromCharCode(Number("0x" + _e));
            }))) : ne = U.ACCESS_TOKEN || "", M ? "mapbox.eventData." + M + ":" + ne : "mapbox.eventData:" + ne;
          }, ge.prototype.fetchEventData = function() {
            var M = j("localStorage"), O = this.getStorageKey(), G = this.getStorageKey("uuid");
            if (M)
              try {
                var ne = self.localStorage.getItem(O);
                ne && (this.eventData = JSON.parse(ne));
                var me = self.localStorage.getItem(G);
                me && (this.anonId = me);
              } catch {
                A("Unable to read from LocalStorage");
              }
          }, ge.prototype.saveEventData = function() {
            var M = j("localStorage"), O = this.getStorageKey(), G = this.getStorageKey("uuid");
            if (M)
              try {
                self.localStorage.setItem(G, this.anonId), Object.keys(this.eventData).length >= 1 && self.localStorage.setItem(O, JSON.stringify(this.eventData));
              } catch {
                A("Unable to write to LocalStorage");
              }
          }, ge.prototype.processRequests = function(M) {
          }, ge.prototype.postEvent = function(M, O, G, ne) {
            var me = this;
            if (U.EVENTS_URL) {
              var _e = ye(U.EVENTS_URL);
              _e.params.push("access_token=" + (ne || U.ACCESS_TOKEN || ""));
              var Ce = { event: this.type, created: new Date(M).toISOString(), sdkIdentifier: "mapbox-gl-js", sdkVersion: "1.10.1", skuId: te, userId: this.anonId }, Ne = O ? i(Ce, O) : Ce, $e = { url: Ae(_e), headers: { "Content-Type": "text/plain" }, body: JSON.stringify([Ne]) };
              this.pendingRequest = Ft($e, function(ct) {
                me.pendingRequest = null, G(ct), me.saveEventData(), me.processRequests(ne);
              });
            }
          }, ge.prototype.queueRequest = function(M, O) {
            this.queue.push(M), this.processRequests(O);
          };
          var we, se, de = function(M) {
            function O() {
              M.call(this, "map.load"), this.success = {}, this.skuToken = "";
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.postMapLoadEvent = function(G, ne, me, _e) {
              this.skuToken = me, (U.EVENTS_URL && _e || U.ACCESS_TOKEN && Array.isArray(G) && G.some(function(Ce) {
                return le(Ce) || ve(Ce);
              })) && this.queueRequest({ id: ne, timestamp: Date.now() }, _e);
            }, O.prototype.processRequests = function(G) {
              var ne = this;
              if (!this.pendingRequest && this.queue.length !== 0) {
                var me = this.queue.shift(), _e = me.id, Ce = me.timestamp;
                _e && this.success[_e] || (this.anonId || this.fetchEventData(), y(this.anonId) || (this.anonId = a()), this.postEvent(Ce, { skuToken: this.skuToken }, function(Ne) {
                  Ne || _e && (ne.success[_e] = !0);
                }, G));
              }
            }, O;
          }(ge), Te = new (function(M) {
            function O(G) {
              M.call(this, "appUserTurnstile"), this._customAccessToken = G;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.postTurnstileEvent = function(G, ne) {
              U.EVENTS_URL && U.ACCESS_TOKEN && Array.isArray(G) && G.some(function(me) {
                return le(me) || ve(me);
              }) && this.queueRequest(Date.now(), ne);
            }, O.prototype.processRequests = function(G) {
              var ne = this;
              if (!this.pendingRequest && this.queue.length !== 0) {
                this.anonId && this.eventData.lastSuccess && this.eventData.tokenU || this.fetchEventData();
                var me = pe(U.ACCESS_TOKEN), _e = me ? me.u : U.ACCESS_TOKEN, Ce = _e !== this.eventData.tokenU;
                y(this.anonId) || (this.anonId = a(), Ce = !0);
                var Ne = this.queue.shift();
                if (this.eventData.lastSuccess) {
                  var $e = new Date(this.eventData.lastSuccess), ct = new Date(Ne), dt = (Ne - this.eventData.lastSuccess) / 864e5;
                  Ce = Ce || dt >= 1 || dt < -1 || $e.getDate() !== ct.getDate();
                } else
                  Ce = !0;
                if (!Ce)
                  return this.processRequests();
                this.postEvent(Ne, { "enabled.telemetry": !1 }, function(Rt) {
                  Rt || (ne.eventData.lastSuccess = Ne, ne.eventData.tokenU = _e);
                }, G);
              }
            }, O;
          }(ge))(), Ee = Te.postTurnstileEvent.bind(Te), Me = new de(), ze = Me.postMapLoadEvent.bind(Me), Ie = 500, Oe = 50;
          function Ze() {
            self.caches && !we && (we = self.caches.open("mapbox-tiles"));
          }
          function Fe(M, O, G) {
            if (Ze(), we) {
              var ne = { status: O.status, statusText: O.statusText, headers: new self.Headers() };
              O.headers.forEach(function(_e, Ce) {
                return ne.headers.set(Ce, _e);
              });
              var me = E(O.headers.get("Cache-Control") || "");
              me["no-store"] || (me["max-age"] && ne.headers.set("Expires", new Date(G + 1e3 * me["max-age"]).toUTCString()), new Date(ne.headers.get("Expires")).getTime() - G < 42e4 || function(_e, Ce) {
                if (se === void 0)
                  try {
                    new Response(new ReadableStream()), se = !0;
                  } catch {
                    se = !1;
                  }
                se ? Ce(_e.body) : _e.blob().then(Ce);
              }(O, function(_e) {
                var Ce = new self.Response(_e, ne);
                Ze(), we && we.then(function(Ne) {
                  return Ne.put(Pe(M.url), Ce);
                }).catch(function(Ne) {
                  return A(Ne.message);
                });
              }));
            }
          }
          function Pe(M) {
            var O = M.indexOf("?");
            return O < 0 ? M : M.slice(0, O);
          }
          function De(M, O) {
            if (Ze(), !we)
              return O(null);
            var G = Pe(M.url);
            we.then(function(ne) {
              ne.match(G).then(function(me) {
                var _e = function(Ce) {
                  if (!Ce)
                    return !1;
                  var Ne = new Date(Ce.headers.get("Expires") || 0), $e = E(Ce.headers.get("Cache-Control") || "");
                  return Ne > Date.now() && !$e["no-cache"];
                }(me);
                ne.delete(G), _e && ne.put(G, me.clone()), O(null, me, _e);
              }).catch(O);
            }).catch(O);
          }
          var Ge, Qe = 1 / 0;
          function ot() {
            return Ge == null && (Ge = self.OffscreenCanvas && new self.OffscreenCanvas(1, 1).getContext("2d") && typeof self.createImageBitmap == "function"), Ge;
          }
          var vt = { Unknown: "Unknown", Style: "Style", Source: "Source", Tile: "Tile", Glyphs: "Glyphs", SpriteImage: "SpriteImage", SpriteJSON: "SpriteJSON", Image: "Image" };
          typeof Object.freeze == "function" && Object.freeze(vt);
          var bt = function(M) {
            function O(G, ne, me) {
              ne === 401 && ve(me) && (G += ": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"), M.call(this, G), this.status = ne, this.url = me, this.name = this.constructor.name, this.message = G;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.toString = function() {
              return this.name + ": " + this.message + " (" + this.status + "): " + this.url;
            }, O;
          }(Error), yt = S() ? function() {
            return self.worker && self.worker.referrer;
          } : function() {
            return (self.location.protocol === "blob:" ? self.parent : self).location.href;
          };
          function tt(M, O) {
            var G, ne = new self.AbortController(), me = new self.Request(M.url, { method: M.method || "GET", body: M.body, credentials: M.credentials, headers: M.headers, referrer: yt(), signal: ne.signal }), _e = !1, Ce = !1, Ne = (G = me.url).indexOf("sku=") > 0 && ve(G);
            M.type === "json" && me.headers.set("Accept", "application/json");
            var $e = function(dt, Rt, Wt) {
              if (!Ce) {
                if (dt && dt.message !== "SecurityError" && A(dt), Rt && Wt)
                  return ct(Rt);
                var qt = Date.now();
                self.fetch(me).then(function(ir) {
                  if (ir.ok) {
                    var yr = Ne ? ir.clone() : null;
                    return ct(ir, yr, qt);
                  }
                  return O(new bt(ir.statusText, ir.status, M.url));
                }).catch(function(ir) {
                  ir.code !== 20 && O(new Error(ir.message));
                });
              }
            }, ct = function(dt, Rt, Wt) {
              (M.type === "arrayBuffer" ? dt.arrayBuffer() : M.type === "json" ? dt.json() : dt.text()).then(function(qt) {
                Ce || (Rt && Wt && Fe(me, Rt, Wt), _e = !0, O(null, qt, dt.headers.get("Cache-Control"), dt.headers.get("Expires")));
              }).catch(function(qt) {
                Ce || O(new Error(qt.message));
              });
            };
            return Ne ? De(me, $e) : $e(null, null), { cancel: function() {
              Ce = !0, _e || ne.abort();
            } };
          }
          var Ke = function(M, O) {
            if (G = M.url, !(/^file:/.test(G) || /^file:/.test(yt()) && !/^\w+:/.test(G))) {
              if (self.fetch && self.Request && self.AbortController && self.Request.prototype.hasOwnProperty("signal"))
                return tt(M, O);
              if (S() && self.worker && self.worker.actor)
                return self.worker.actor.send("getResource", M, O, void 0, !0);
            }
            var G;
            return function(ne, me) {
              var _e = new self.XMLHttpRequest();
              for (var Ce in _e.open(ne.method || "GET", ne.url, !0), ne.type === "arrayBuffer" && (_e.responseType = "arraybuffer"), ne.headers)
                _e.setRequestHeader(Ce, ne.headers[Ce]);
              return ne.type === "json" && (_e.responseType = "text", _e.setRequestHeader("Accept", "application/json")), _e.withCredentials = ne.credentials === "include", _e.onerror = function() {
                me(new Error(_e.statusText));
              }, _e.onload = function() {
                if ((_e.status >= 200 && _e.status < 300 || _e.status === 0) && _e.response !== null) {
                  var Ne = _e.response;
                  if (ne.type === "json")
                    try {
                      Ne = JSON.parse(_e.response);
                    } catch ($e) {
                      return me($e);
                    }
                  me(null, Ne, _e.getResponseHeader("Cache-Control"), _e.getResponseHeader("Expires"));
                } else
                  me(new bt(_e.statusText, _e.status, ne.url));
              }, _e.send(ne.body), { cancel: function() {
                return _e.abort();
              } };
            }(M, O);
          }, mt = function(M, O) {
            return Ke(i(M, { type: "arrayBuffer" }), O);
          }, Ft = function(M, O) {
            return Ke(i(M, { method: "POST" }), O);
          }, Vt, Xt;
          Vt = [], Xt = 0;
          var Gt = function(M, O) {
            if (ee.supported && (M.headers || (M.headers = {}), M.headers.accept = "image/webp,*/*"), Xt >= U.MAX_PARALLEL_IMAGE_REQUESTS) {
              var G = { requestParameters: M, callback: O, cancelled: !1, cancel: function() {
                this.cancelled = !0;
              } };
              return Vt.push(G), G;
            }
            Xt++;
            var ne = !1, me = function() {
              if (!ne)
                for (ne = !0, Xt--; Vt.length && Xt < U.MAX_PARALLEL_IMAGE_REQUESTS; ) {
                  var Ce = Vt.shift(), Ne = Ce.requestParameters, $e = Ce.callback;
                  Ce.cancelled || (Ce.cancel = Gt(Ne, $e).cancel);
                }
            }, _e = mt(M, function(Ce, Ne, $e, ct) {
              me(), Ce ? O(Ce) : Ne && (ot() ? function(dt, Rt) {
                var Wt = new self.Blob([new Uint8Array(dt)], { type: "image/png" });
                self.createImageBitmap(Wt).then(function(qt) {
                  Rt(null, qt);
                }).catch(function(qt) {
                  Rt(new Error("Could not load image because of " + qt.message + ". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
                });
              }(Ne, O) : function(dt, Rt, Wt, qt) {
                var ir = new self.Image(), yr = self.URL;
                ir.onload = function() {
                  Rt(null, ir), yr.revokeObjectURL(ir.src);
                }, ir.onerror = function() {
                  return Rt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
                };
                var Cr = new self.Blob([new Uint8Array(dt)], { type: "image/png" });
                ir.cacheControl = Wt, ir.expires = qt, ir.src = dt.byteLength ? yr.createObjectURL(Cr) : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";
              }(Ne, O, $e, ct));
            });
            return { cancel: function() {
              _e.cancel(), me();
            } };
          };
          function nr(M, O, G) {
            G[M] && G[M].indexOf(O) !== -1 || (G[M] = G[M] || [], G[M].push(O));
          }
          function It(M, O, G) {
            if (G && G[M]) {
              var ne = G[M].indexOf(O);
              ne !== -1 && G[M].splice(ne, 1);
            }
          }
          var Be = function(M, O) {
            O === void 0 && (O = {}), i(this, O), this.type = M;
          }, He = function(M) {
            function O(G, ne) {
              ne === void 0 && (ne = {}), M.call(this, "error", i({ error: G }, ne));
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O;
          }(Be), he = function() {
          };
          he.prototype.on = function(M, O) {
            return this._listeners = this._listeners || {}, nr(M, O, this._listeners), this;
          }, he.prototype.off = function(M, O) {
            return It(M, O, this._listeners), It(M, O, this._oneTimeListeners), this;
          }, he.prototype.once = function(M, O) {
            return this._oneTimeListeners = this._oneTimeListeners || {}, nr(M, O, this._oneTimeListeners), this;
          }, he.prototype.fire = function(M, O) {
            typeof M == "string" && (M = new Be(M, O || {}));
            var G = M.type;
            if (this.listens(G)) {
              M.target = this;
              for (var ne = 0, me = this._listeners && this._listeners[G] ? this._listeners[G].slice() : []; ne < me.length; ne += 1)
                me[ne].call(this, M);
              for (var _e = 0, Ce = this._oneTimeListeners && this._oneTimeListeners[G] ? this._oneTimeListeners[G].slice() : []; _e < Ce.length; _e += 1) {
                var Ne = Ce[_e];
                It(G, Ne, this._oneTimeListeners), Ne.call(this, M);
              }
              var $e = this._eventedParent;
              $e && (i(M, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), $e.fire(M));
            } else
              M instanceof He && console.error(M.error);
            return this;
          }, he.prototype.listens = function(M) {
            return this._listeners && this._listeners[M] && this._listeners[M].length > 0 || this._oneTimeListeners && this._oneTimeListeners[M] && this._oneTimeListeners[M].length > 0 || this._eventedParent && this._eventedParent.listens(M);
          }, he.prototype.setEventedParent = function(M, O) {
            return this._eventedParent = M, this._eventedParentData = O, this;
          };
          var be = { $version: 8, $root: { version: { required: !0, type: "enum", values: [8] }, name: { type: "string" }, metadata: { type: "*" }, center: { type: "array", value: "number" }, zoom: { type: "number" }, bearing: { type: "number", default: 0, period: 360, units: "degrees" }, pitch: { type: "number", default: 0, units: "degrees" }, light: { type: "light" }, sources: { required: !0, type: "sources" }, sprite: { type: "string" }, glyphs: { type: "string" }, transition: { type: "transition" }, layers: { required: !0, type: "array", value: "layer" } }, sources: { "*": { type: "source" } }, source: ["source_vector", "source_raster", "source_raster_dem", "source_geojson", "source_video", "source_image"], source_vector: { type: { required: !0, type: "enum", values: { vector: {} } }, url: { type: "string" }, tiles: { type: "array", value: "string" }, bounds: { type: "array", value: "number", length: 4, default: [-180, -85.051129, 180, 85.051129] }, scheme: { type: "enum", values: { xyz: {}, tms: {} }, default: "xyz" }, minzoom: { type: "number", default: 0 }, maxzoom: { type: "number", default: 22 }, attribution: { type: "string" }, promoteId: { type: "promoteId" }, "*": { type: "*" } }, source_raster: { type: { required: !0, type: "enum", values: { raster: {} } }, url: { type: "string" }, tiles: { type: "array", value: "string" }, bounds: { type: "array", value: "number", length: 4, default: [-180, -85.051129, 180, 85.051129] }, minzoom: { type: "number", default: 0 }, maxzoom: { type: "number", default: 22 }, tileSize: { type: "number", default: 512, units: "pixels" }, scheme: { type: "enum", values: { xyz: {}, tms: {} }, default: "xyz" }, attribution: { type: "string" }, "*": { type: "*" } }, source_raster_dem: { type: { required: !0, type: "enum", values: { "raster-dem": {} } }, url: { type: "string" }, tiles: { type: "array", value: "string" }, bounds: { type: "array", value: "number", length: 4, default: [-180, -85.051129, 180, 85.051129] }, minzoom: { type: "number", default: 0 }, maxzoom: { type: "number", default: 22 }, tileSize: { type: "number", default: 512, units: "pixels" }, attribution: { type: "string" }, encoding: { type: "enum", values: { terrarium: {}, mapbox: {} }, default: "mapbox" }, "*": { type: "*" } }, source_geojson: { type: { required: !0, type: "enum", values: { geojson: {} } }, data: { type: "*" }, maxzoom: { type: "number", default: 18 }, attribution: { type: "string" }, buffer: { type: "number", default: 128, maximum: 512, minimum: 0 }, tolerance: { type: "number", default: 0.375 }, cluster: { type: "boolean", default: !1 }, clusterRadius: { type: "number", default: 50, minimum: 0 }, clusterMaxZoom: { type: "number" }, clusterProperties: { type: "*" }, lineMetrics: { type: "boolean", default: !1 }, generateId: { type: "boolean", default: !1 }, promoteId: { type: "promoteId" } }, source_video: { type: { required: !0, type: "enum", values: { video: {} } }, urls: { required: !0, type: "array", value: "string" }, coordinates: { required: !0, type: "array", length: 4, value: { type: "array", length: 2, value: "number" } } }, source_image: { type: { required: !0, type: "enum", values: { image: {} } }, url: { required: !0, type: "string" }, coordinates: { required: !0, type: "array", length: 4, value: { type: "array", length: 2, value: "number" } } }, layer: { id: { type: "string", required: !0 }, type: { type: "enum", values: { fill: {}, line: {}, symbol: {}, circle: {}, heatmap: {}, "fill-extrusion": {}, raster: {}, hillshade: {}, background: {} }, required: !0 }, metadata: { type: "*" }, source: { type: "string" }, "source-layer": { type: "string" }, minzoom: { type: "number", minimum: 0, maximum: 24 }, maxzoom: { type: "number", minimum: 0, maximum: 24 }, filter: { type: "filter" }, layout: { type: "layout" }, paint: { type: "paint" } }, layout: ["layout_fill", "layout_line", "layout_circle", "layout_heatmap", "layout_fill-extrusion", "layout_symbol", "layout_raster", "layout_hillshade", "layout_background"], layout_background: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_fill: { "fill-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_circle: { "circle-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_heatmap: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, "layout_fill-extrusion": { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_line: { "line-cap": { type: "enum", values: { butt: {}, round: {}, square: {} }, default: "butt", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-join": { type: "enum", values: { bevel: {}, round: {}, miter: {} }, default: "miter", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "line-miter-limit": { type: "number", default: 2, requires: [{ "line-join": "miter" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-round-limit": { type: "number", default: 1.05, requires: [{ "line-join": "round" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_symbol: { "symbol-placement": { type: "enum", values: { point: {}, line: {}, "line-center": {} }, default: "point", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "symbol-spacing": { type: "number", default: 250, minimum: 1, units: "pixels", requires: [{ "symbol-placement": "line" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "symbol-avoid-edges": { type: "boolean", default: !1, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "symbol-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "symbol-z-order": { type: "enum", values: { auto: {}, "viewport-y": {}, source: {} }, default: "auto", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-allow-overlap": { type: "boolean", default: !1, requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-ignore-placement": { type: "boolean", default: !1, requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-optional": { type: "boolean", default: !1, requires: ["icon-image", "text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-rotation-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-size": { type: "number", default: 1, minimum: 0, units: "factor of the original icon size", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-text-fit": { type: "enum", values: { none: {}, width: {}, height: {}, both: {} }, default: "none", requires: ["icon-image", "text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-text-fit-padding": { type: "array", value: "number", length: 4, default: [0, 0, 0, 0], units: "pixels", requires: ["icon-image", "text-field", { "icon-text-fit": ["both", "width", "height"] }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-image": { type: "resolvedImage", tokens: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-rotate": { type: "number", default: 0, period: 360, units: "degrees", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-padding": { type: "number", default: 2, minimum: 0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-keep-upright": { type: "boolean", default: !1, requires: ["icon-image", { "icon-rotation-alignment": "map" }, { "symbol-placement": ["line", "line-center"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-offset": { type: "array", value: "number", length: 2, default: [0, 0], requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-anchor": { type: "enum", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, "top-left": {}, "top-right": {}, "bottom-left": {}, "bottom-right": {} }, default: "center", requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-pitch-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-pitch-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-rotation-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-field": { type: "formatted", default: "", tokens: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-font": { type: "array", value: "string", default: ["Open Sans Regular", "Arial Unicode MS Regular"], requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-size": { type: "number", default: 16, minimum: 0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-max-width": { type: "number", default: 10, minimum: 0, units: "ems", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-line-height": { type: "number", default: 1.2, units: "ems", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-letter-spacing": { type: "number", default: 0, units: "ems", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-justify": { type: "enum", values: { auto: {}, left: {}, center: {}, right: {} }, default: "center", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-radial-offset": { type: "number", units: "ems", default: 0, requires: ["text-field"], "property-type": "data-driven", expression: { interpolated: !0, parameters: ["zoom", "feature"] } }, "text-variable-anchor": { type: "array", value: "enum", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, "top-left": {}, "top-right": {}, "bottom-left": {}, "bottom-right": {} }, requires: ["text-field", { "symbol-placement": ["point"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-anchor": { type: "enum", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, "top-left": {}, "top-right": {}, "bottom-left": {}, "bottom-right": {} }, default: "center", requires: ["text-field", { "!": "text-variable-anchor" }], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-max-angle": { type: "number", default: 45, units: "degrees", requires: ["text-field", { "symbol-placement": ["line", "line-center"] }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-writing-mode": { type: "array", value: "enum", values: { horizontal: {}, vertical: {} }, requires: ["text-field", { "symbol-placement": ["point"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-rotate": { type: "number", default: 0, period: 360, units: "degrees", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-padding": { type: "number", default: 2, minimum: 0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-keep-upright": { type: "boolean", default: !0, requires: ["text-field", { "text-rotation-alignment": "map" }, { "symbol-placement": ["line", "line-center"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-transform": { type: "enum", values: { none: {}, uppercase: {}, lowercase: {} }, default: "none", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-offset": { type: "array", value: "number", units: "ems", length: 2, default: [0, 0], requires: ["text-field", { "!": "text-radial-offset" }], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-allow-overlap": { type: "boolean", default: !1, requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-ignore-placement": { type: "boolean", default: !1, requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-optional": { type: "boolean", default: !1, requires: ["text-field", "icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_raster: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_hillshade: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, filter: { type: "array", value: "*" }, filter_operator: { type: "enum", values: { "==": {}, "!=": {}, ">": {}, ">=": {}, "<": {}, "<=": {}, in: {}, "!in": {}, all: {}, any: {}, none: {}, has: {}, "!has": {}, within: {} } }, geometry_type: { type: "enum", values: { Point: {}, LineString: {}, Polygon: {} } }, function: { expression: { type: "expression" }, stops: { type: "array", value: "function_stop" }, base: { type: "number", default: 1, minimum: 0 }, property: { type: "string", default: "$zoom" }, type: { type: "enum", values: { identity: {}, exponential: {}, interval: {}, categorical: {} }, default: "exponential" }, colorSpace: { type: "enum", values: { rgb: {}, lab: {}, hcl: {} }, default: "rgb" }, default: { type: "*", required: !1 } }, function_stop: { type: "array", minimum: 0, maximum: 24, value: ["number", "color"], length: 2 }, expression: { type: "array", value: "*", minimum: 1 }, expression_name: { type: "enum", values: { let: { group: "Variable binding" }, var: { group: "Variable binding" }, literal: { group: "Types" }, array: { group: "Types" }, at: { group: "Lookup" }, in: { group: "Lookup" }, "index-of": { group: "Lookup" }, slice: { group: "Lookup" }, case: { group: "Decision" }, match: { group: "Decision" }, coalesce: { group: "Decision" }, step: { group: "Ramps, scales, curves" }, interpolate: { group: "Ramps, scales, curves" }, "interpolate-hcl": { group: "Ramps, scales, curves" }, "interpolate-lab": { group: "Ramps, scales, curves" }, ln2: { group: "Math" }, pi: { group: "Math" }, e: { group: "Math" }, typeof: { group: "Types" }, string: { group: "Types" }, number: { group: "Types" }, boolean: { group: "Types" }, object: { group: "Types" }, collator: { group: "Types" }, format: { group: "Types" }, image: { group: "Types" }, "number-format": { group: "Types" }, "to-string": { group: "Types" }, "to-number": { group: "Types" }, "to-boolean": { group: "Types" }, "to-rgba": { group: "Color" }, "to-color": { group: "Types" }, rgb: { group: "Color" }, rgba: { group: "Color" }, get: { group: "Lookup" }, has: { group: "Lookup" }, length: { group: "Lookup" }, properties: { group: "Feature data" }, "feature-state": { group: "Feature data" }, "geometry-type": { group: "Feature data" }, id: { group: "Feature data" }, zoom: { group: "Zoom" }, "heatmap-density": { group: "Heatmap" }, "line-progress": { group: "Feature data" }, accumulated: { group: "Feature data" }, "+": { group: "Math" }, "*": { group: "Math" }, "-": { group: "Math" }, "/": { group: "Math" }, "%": { group: "Math" }, "^": { group: "Math" }, sqrt: { group: "Math" }, log10: { group: "Math" }, ln: { group: "Math" }, log2: { group: "Math" }, sin: { group: "Math" }, cos: { group: "Math" }, tan: { group: "Math" }, asin: { group: "Math" }, acos: { group: "Math" }, atan: { group: "Math" }, min: { group: "Math" }, max: { group: "Math" }, round: { group: "Math" }, abs: { group: "Math" }, ceil: { group: "Math" }, floor: { group: "Math" }, distance: { group: "Math" }, "==": { group: "Decision" }, "!=": { group: "Decision" }, ">": { group: "Decision" }, "<": { group: "Decision" }, ">=": { group: "Decision" }, "<=": { group: "Decision" }, all: { group: "Decision" }, any: { group: "Decision" }, "!": { group: "Decision" }, within: { group: "Decision" }, "is-supported-script": { group: "String" }, upcase: { group: "String" }, downcase: { group: "String" }, concat: { group: "String" }, "resolved-locale": { group: "String" } } }, light: { anchor: { type: "enum", default: "viewport", values: { map: {}, viewport: {} }, "property-type": "data-constant", transition: !1, expression: { interpolated: !1, parameters: ["zoom"] } }, position: { type: "array", default: [1.15, 210, 30], length: 3, value: "number", "property-type": "data-constant", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] } }, color: { type: "color", "property-type": "data-constant", default: "#ffffff", expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, intensity: { type: "number", "property-type": "data-constant", default: 0.5, minimum: 0, maximum: 1, expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 } }, paint: ["paint_fill", "paint_line", "paint_circle", "paint_heatmap", "paint_fill-extrusion", "paint_symbol", "paint_raster", "paint_hillshade", "paint_background"], paint_fill: { "fill-antialias": { type: "boolean", default: !0, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "fill-pattern" }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-outline-color": { type: "color", transition: !0, requires: [{ "!": "fill-pattern" }, { "fill-antialias": !0 }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["fill-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "cross-faded-data-driven" } }, "paint_fill-extrusion": { "fill-extrusion-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-extrusion-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "fill-extrusion-pattern" }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-extrusion-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-extrusion-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["fill-extrusion-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-extrusion-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "cross-faded-data-driven" }, "fill-extrusion-height": { type: "number", default: 0, minimum: 0, units: "meters", transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-extrusion-base": { type: "number", default: 0, minimum: 0, units: "meters", transition: !0, requires: ["fill-extrusion-height"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-extrusion-vertical-gradient": { type: "boolean", default: !0, transition: !1, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_line: { "line-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "line-pattern" }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["line-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-width": { type: "number", default: 1, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-gap-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-offset": { type: "number", default: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-blur": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-dasharray": { type: "array", value: "number", minimum: 0, transition: !0, units: "line widths", requires: [{ "!": "line-pattern" }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "cross-faded" }, "line-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "cross-faded-data-driven" }, "line-gradient": { type: "color", transition: !1, requires: [{ "!": "line-dasharray" }, { "!": "line-pattern" }, { source: "geojson", has: { lineMetrics: !0 } }], expression: { interpolated: !0, parameters: ["line-progress"] }, "property-type": "color-ramp" } }, paint_circle: { "circle-radius": { type: "number", default: 5, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-blur": { type: "number", default: 0, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["circle-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-pitch-scale": { type: "enum", values: { map: {}, viewport: {} }, default: "map", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-pitch-alignment": { type: "enum", values: { map: {}, viewport: {} }, default: "viewport", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-stroke-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-stroke-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-stroke-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" } }, paint_heatmap: { "heatmap-radius": { type: "number", default: 30, minimum: 1, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "heatmap-weight": { type: "number", default: 1, minimum: 0, transition: !1, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "heatmap-intensity": { type: "number", default: 1, minimum: 0, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "heatmap-color": { type: "color", default: ["interpolate", ["linear"], ["heatmap-density"], 0, "rgba(0, 0, 255, 0)", 0.1, "royalblue", 0.3, "cyan", 0.5, "lime", 0.7, "yellow", 1, "red"], transition: !1, expression: { interpolated: !0, parameters: ["heatmap-density"] }, "property-type": "color-ramp" }, "heatmap-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_symbol: { "icon-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-color": { type: "color", default: "#000000", transition: !0, requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-halo-color": { type: "color", default: "rgba(0, 0, 0, 0)", transition: !0, requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-halo-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-halo-blur": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["icon-image", "icon-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-color": { type: "color", default: "#000000", transition: !0, overridable: !0, requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-halo-color": { type: "color", default: "rgba(0, 0, 0, 0)", transition: !0, requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-halo-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-halo-blur": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["text-field", "text-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_raster: { "raster-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-hue-rotate": { type: "number", default: 0, period: 360, transition: !0, units: "degrees", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-brightness-min": { type: "number", default: 0, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-brightness-max": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-saturation": { type: "number", default: 0, minimum: -1, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-contrast": { type: "number", default: 0, minimum: -1, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-resampling": { type: "enum", values: { linear: {}, nearest: {} }, default: "linear", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-fade-duration": { type: "number", default: 300, minimum: 0, transition: !1, units: "milliseconds", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_hillshade: { "hillshade-illumination-direction": { type: "number", default: 335, minimum: 0, maximum: 359, transition: !1, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-illumination-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "viewport", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-exaggeration": { type: "number", default: 0.5, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-shadow-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-highlight-color": { type: "color", default: "#FFFFFF", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-accent-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_background: { "background-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "background-pattern" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "background-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "cross-faded" }, "background-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, transition: { duration: { type: "number", default: 300, minimum: 0, units: "milliseconds" }, delay: { type: "number", default: 0, minimum: 0, units: "milliseconds" } }, "property-type": { "data-driven": { type: "property-type" }, "cross-faded": { type: "property-type" }, "cross-faded-data-driven": { type: "property-type" }, "color-ramp": { type: "property-type" }, "data-constant": { type: "property-type" }, constant: { type: "property-type" } }, promoteId: { "*": { type: "string" } } }, Re = function(M, O, G, ne) {
            this.message = (M ? M + ": " : "") + G, ne && (this.identifier = ne), O != null && O.__line__ && (this.line = O.__line__);
          };
          function Ue(M) {
            var O = M.key, G = M.value;
            return G ? [new Re(O, G, "constants have been deprecated as of v8")] : [];
          }
          function Xe(M) {
            for (var O = [], G = arguments.length - 1; G-- > 0; )
              O[G] = arguments[G + 1];
            for (var ne = 0, me = O; ne < me.length; ne += 1) {
              var _e = me[ne];
              for (var Ce in _e)
                M[Ce] = _e[Ce];
            }
            return M;
          }
          function qe(M) {
            return M instanceof Number || M instanceof String || M instanceof Boolean ? M.valueOf() : M;
          }
          function st(M) {
            if (Array.isArray(M))
              return M.map(st);
            if (M instanceof Object && !(M instanceof Number || M instanceof String || M instanceof Boolean)) {
              var O = {};
              for (var G in M)
                O[G] = st(M[G]);
              return O;
            }
            return qe(M);
          }
          var it = function(M) {
            function O(G, ne) {
              M.call(this, ne), this.message = ne, this.key = G;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O;
          }(Error), Tt = function(M, O) {
            O === void 0 && (O = []), this.parent = M, this.bindings = {};
            for (var G = 0, ne = O; G < ne.length; G += 1) {
              var me = ne[G], _e = me[0], Ce = me[1];
              this.bindings[_e] = Ce;
            }
          };
          Tt.prototype.concat = function(M) {
            return new Tt(this, M);
          }, Tt.prototype.get = function(M) {
            if (this.bindings[M])
              return this.bindings[M];
            if (this.parent)
              return this.parent.get(M);
            throw new Error(M + " not found in scope.");
          }, Tt.prototype.has = function(M) {
            return !!this.bindings[M] || !!this.parent && this.parent.has(M);
          };
          var Pt = { kind: "null" }, rt = { kind: "number" }, ut = { kind: "string" }, Bt = { kind: "boolean" }, wt = { kind: "color" }, Lt = { kind: "object" }, Se = { kind: "value" }, We = { kind: "collator" }, nt = { kind: "formatted" }, ft = { kind: "resolvedImage" };
          function Mt(M, O) {
            return { kind: "array", itemType: M, N: O };
          }
          function Nt(M) {
            if (M.kind === "array") {
              var O = Nt(M.itemType);
              return typeof M.N == "number" ? "array<" + O + ", " + M.N + ">" : M.itemType.kind === "value" ? "array" : "array<" + O + ">";
            }
            return M.kind;
          }
          var Zt = [Pt, rt, ut, Bt, wt, nt, Lt, Mt(Se), ft];
          function Ut(M, O) {
            if (O.kind === "error")
              return null;
            if (M.kind === "array") {
              if (O.kind === "array" && (O.N === 0 && O.itemType.kind === "value" || !Ut(M.itemType, O.itemType)) && (typeof M.N != "number" || M.N === O.N))
                return null;
            } else {
              if (M.kind === O.kind)
                return null;
              if (M.kind === "value") {
                for (var G = 0, ne = Zt; G < ne.length; G += 1)
                  if (!Ut(ne[G], O))
                    return null;
              }
            }
            return "Expected " + Nt(M) + " but found " + Nt(O) + " instead.";
          }
          function fr(M, O) {
            return O.some(function(G) {
              return G.kind === M.kind;
            });
          }
          function Tr(M, O) {
            return O.some(function(G) {
              return G === "null" ? M === null : G === "array" ? Array.isArray(M) : G === "object" ? M && !Array.isArray(M) && typeof M == "object" : G === typeof M;
            });
          }
          var ur = r(function(M, O) {
            var G = { transparent: [0, 0, 0, 0], aliceblue: [240, 248, 255, 1], antiquewhite: [250, 235, 215, 1], aqua: [0, 255, 255, 1], aquamarine: [127, 255, 212, 1], azure: [240, 255, 255, 1], beige: [245, 245, 220, 1], bisque: [255, 228, 196, 1], black: [0, 0, 0, 1], blanchedalmond: [255, 235, 205, 1], blue: [0, 0, 255, 1], blueviolet: [138, 43, 226, 1], brown: [165, 42, 42, 1], burlywood: [222, 184, 135, 1], cadetblue: [95, 158, 160, 1], chartreuse: [127, 255, 0, 1], chocolate: [210, 105, 30, 1], coral: [255, 127, 80, 1], cornflowerblue: [100, 149, 237, 1], cornsilk: [255, 248, 220, 1], crimson: [220, 20, 60, 1], cyan: [0, 255, 255, 1], darkblue: [0, 0, 139, 1], darkcyan: [0, 139, 139, 1], darkgoldenrod: [184, 134, 11, 1], darkgray: [169, 169, 169, 1], darkgreen: [0, 100, 0, 1], darkgrey: [169, 169, 169, 1], darkkhaki: [189, 183, 107, 1], darkmagenta: [139, 0, 139, 1], darkolivegreen: [85, 107, 47, 1], darkorange: [255, 140, 0, 1], darkorchid: [153, 50, 204, 1], darkred: [139, 0, 0, 1], darksalmon: [233, 150, 122, 1], darkseagreen: [143, 188, 143, 1], darkslateblue: [72, 61, 139, 1], darkslategray: [47, 79, 79, 1], darkslategrey: [47, 79, 79, 1], darkturquoise: [0, 206, 209, 1], darkviolet: [148, 0, 211, 1], deeppink: [255, 20, 147, 1], deepskyblue: [0, 191, 255, 1], dimgray: [105, 105, 105, 1], dimgrey: [105, 105, 105, 1], dodgerblue: [30, 144, 255, 1], firebrick: [178, 34, 34, 1], floralwhite: [255, 250, 240, 1], forestgreen: [34, 139, 34, 1], fuchsia: [255, 0, 255, 1], gainsboro: [220, 220, 220, 1], ghostwhite: [248, 248, 255, 1], gold: [255, 215, 0, 1], goldenrod: [218, 165, 32, 1], gray: [128, 128, 128, 1], green: [0, 128, 0, 1], greenyellow: [173, 255, 47, 1], grey: [128, 128, 128, 1], honeydew: [240, 255, 240, 1], hotpink: [255, 105, 180, 1], indianred: [205, 92, 92, 1], indigo: [75, 0, 130, 1], ivory: [255, 255, 240, 1], khaki: [240, 230, 140, 1], lavender: [230, 230, 250, 1], lavenderblush: [255, 240, 245, 1], lawngreen: [124, 252, 0, 1], lemonchiffon: [255, 250, 205, 1], lightblue: [173, 216, 230, 1], lightcoral: [240, 128, 128, 1], lightcyan: [224, 255, 255, 1], lightgoldenrodyellow: [250, 250, 210, 1], lightgray: [211, 211, 211, 1], lightgreen: [144, 238, 144, 1], lightgrey: [211, 211, 211, 1], lightpink: [255, 182, 193, 1], lightsalmon: [255, 160, 122, 1], lightseagreen: [32, 178, 170, 1], lightskyblue: [135, 206, 250, 1], lightslategray: [119, 136, 153, 1], lightslategrey: [119, 136, 153, 1], lightsteelblue: [176, 196, 222, 1], lightyellow: [255, 255, 224, 1], lime: [0, 255, 0, 1], limegreen: [50, 205, 50, 1], linen: [250, 240, 230, 1], magenta: [255, 0, 255, 1], maroon: [128, 0, 0, 1], mediumaquamarine: [102, 205, 170, 1], mediumblue: [0, 0, 205, 1], mediumorchid: [186, 85, 211, 1], mediumpurple: [147, 112, 219, 1], mediumseagreen: [60, 179, 113, 1], mediumslateblue: [123, 104, 238, 1], mediumspringgreen: [0, 250, 154, 1], mediumturquoise: [72, 209, 204, 1], mediumvioletred: [199, 21, 133, 1], midnightblue: [25, 25, 112, 1], mintcream: [245, 255, 250, 1], mistyrose: [255, 228, 225, 1], moccasin: [255, 228, 181, 1], navajowhite: [255, 222, 173, 1], navy: [0, 0, 128, 1], oldlace: [253, 245, 230, 1], olive: [128, 128, 0, 1], olivedrab: [107, 142, 35, 1], orange: [255, 165, 0, 1], orangered: [255, 69, 0, 1], orchid: [218, 112, 214, 1], palegoldenrod: [238, 232, 170, 1], palegreen: [152, 251, 152, 1], paleturquoise: [175, 238, 238, 1], palevioletred: [219, 112, 147, 1], papayawhip: [255, 239, 213, 1], peachpuff: [255, 218, 185, 1], peru: [205, 133, 63, 1], pink: [255, 192, 203, 1], plum: [221, 160, 221, 1], powderblue: [176, 224, 230, 1], purple: [128, 0, 128, 1], rebeccapurple: [102, 51, 153, 1], red: [255, 0, 0, 1], rosybrown: [188, 143, 143, 1], royalblue: [65, 105, 225, 1], saddlebrown: [139, 69, 19, 1], salmon: [250, 128, 114, 1], sandybrown: [244, 164, 96, 1], seagreen: [46, 139, 87, 1], seashell: [255, 245, 238, 1], sienna: [160, 82, 45, 1], silver: [192, 192, 192, 1], skyblue: [135, 206, 235, 1], slateblue: [106, 90, 205, 1], slategray: [112, 128, 144, 1], slategrey: [112, 128, 144, 1], snow: [255, 250, 250, 1], springgreen: [0, 255, 127, 1], steelblue: [70, 130, 180, 1], tan: [210, 180, 140, 1], teal: [0, 128, 128, 1], thistle: [216, 191, 216, 1], tomato: [255, 99, 71, 1], turquoise: [64, 224, 208, 1], violet: [238, 130, 238, 1], wheat: [245, 222, 179, 1], white: [255, 255, 255, 1], whitesmoke: [245, 245, 245, 1], yellow: [255, 255, 0, 1], yellowgreen: [154, 205, 50, 1] };
            function ne($e) {
              return ($e = Math.round($e)) < 0 ? 0 : $e > 255 ? 255 : $e;
            }
            function me($e) {
              return $e < 0 ? 0 : $e > 1 ? 1 : $e;
            }
            function _e($e) {
              return $e[$e.length - 1] === "%" ? ne(parseFloat($e) / 100 * 255) : ne(parseInt($e));
            }
            function Ce($e) {
              return $e[$e.length - 1] === "%" ? me(parseFloat($e) / 100) : me(parseFloat($e));
            }
            function Ne($e, ct, dt) {
              return dt < 0 ? dt += 1 : dt > 1 && (dt -= 1), 6 * dt < 1 ? $e + (ct - $e) * dt * 6 : 2 * dt < 1 ? ct : 3 * dt < 2 ? $e + (ct - $e) * (2 / 3 - dt) * 6 : $e;
            }
            try {
              O.parseCSSColor = function($e) {
                var ct, dt = $e.replace(/ /g, "").toLowerCase();
                if (dt in G)
                  return G[dt].slice();
                if (dt[0] === "#")
                  return dt.length === 4 ? (ct = parseInt(dt.substr(1), 16)) >= 0 && ct <= 4095 ? [(3840 & ct) >> 4 | (3840 & ct) >> 8, 240 & ct | (240 & ct) >> 4, 15 & ct | (15 & ct) << 4, 1] : null : dt.length === 7 && (ct = parseInt(dt.substr(1), 16)) >= 0 && ct <= 16777215 ? [(16711680 & ct) >> 16, (65280 & ct) >> 8, 255 & ct, 1] : null;
                var Rt = dt.indexOf("("), Wt = dt.indexOf(")");
                if (Rt !== -1 && Wt + 1 === dt.length) {
                  var qt = dt.substr(0, Rt), ir = dt.substr(Rt + 1, Wt - (Rt + 1)).split(","), yr = 1;
                  switch (qt) {
                    case "rgba":
                      if (ir.length !== 4)
                        return null;
                      yr = Ce(ir.pop());
                    case "rgb":
                      return ir.length !== 3 ? null : [_e(ir[0]), _e(ir[1]), _e(ir[2]), yr];
                    case "hsla":
                      if (ir.length !== 4)
                        return null;
                      yr = Ce(ir.pop());
                    case "hsl":
                      if (ir.length !== 3)
                        return null;
                      var Cr = (parseFloat(ir[0]) % 360 + 360) % 360 / 360, Lr = Ce(ir[1]), jr = Ce(ir[2]), Ur = jr <= 0.5 ? jr * (Lr + 1) : jr + Lr - jr * Lr, Yr = 2 * jr - Ur;
                      return [ne(255 * Ne(Yr, Ur, Cr + 1 / 3)), ne(255 * Ne(Yr, Ur, Cr)), ne(255 * Ne(Yr, Ur, Cr - 1 / 3)), yr];
                    default:
                      return null;
                  }
                }
                return null;
              };
            } catch {
            }
          }).parseCSSColor, Kt = function(M, O, G, ne) {
            ne === void 0 && (ne = 1), this.r = M, this.g = O, this.b = G, this.a = ne;
          };
          Kt.parse = function(M) {
            if (M) {
              if (M instanceof Kt)
                return M;
              if (typeof M == "string") {
                var O = ur(M);
                if (O)
                  return new Kt(O[0] / 255 * O[3], O[1] / 255 * O[3], O[2] / 255 * O[3], O[3]);
              }
            }
          }, Kt.prototype.toString = function() {
            var M = this.toArray(), O = M[0], G = M[1], ne = M[2], me = M[3];
            return "rgba(" + Math.round(O) + "," + Math.round(G) + "," + Math.round(ne) + "," + me + ")";
          }, Kt.prototype.toArray = function() {
            var M = this.r, O = this.g, G = this.b, ne = this.a;
            return ne === 0 ? [0, 0, 0, 0] : [255 * M / ne, 255 * O / ne, 255 * G / ne, ne];
          }, Kt.black = new Kt(0, 0, 0, 1), Kt.white = new Kt(1, 1, 1, 1), Kt.transparent = new Kt(0, 0, 0, 0), Kt.red = new Kt(1, 0, 0, 1);
          var $t = function(M, O, G) {
            this.sensitivity = M ? O ? "variant" : "case" : O ? "accent" : "base", this.locale = G, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
          };
          $t.prototype.compare = function(M, O) {
            return this.collator.compare(M, O);
          }, $t.prototype.resolvedLocale = function() {
            return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
          };
          var er = function(M, O, G, ne, me) {
            this.text = M, this.image = O, this.scale = G, this.fontStack = ne, this.textColor = me;
          }, cr = function(M) {
            this.sections = M;
          };
          cr.fromString = function(M) {
            return new cr([new er(M, null, null, null, null)]);
          }, cr.prototype.isEmpty = function() {
            return this.sections.length === 0 || !this.sections.some(function(M) {
              return M.text.length !== 0 || M.image && M.image.name.length !== 0;
            });
          }, cr.factory = function(M) {
            return M instanceof cr ? M : cr.fromString(M);
          }, cr.prototype.toString = function() {
            return this.sections.length === 0 ? "" : this.sections.map(function(M) {
              return M.text;
            }).join("");
          }, cr.prototype.serialize = function() {
            for (var M = ["format"], O = 0, G = this.sections; O < G.length; O += 1) {
              var ne = G[O];
              if (ne.image)
                M.push(["image", ne.image.name]);
              else {
                M.push(ne.text);
                var me = {};
                ne.fontStack && (me["text-font"] = ["literal", ne.fontStack.split(",")]), ne.scale && (me["font-scale"] = ne.scale), ne.textColor && (me["text-color"] = ["rgba"].concat(ne.textColor.toArray())), M.push(me);
              }
            }
            return M;
          };
          var gr = function(M) {
            this.name = M.name, this.available = M.available;
          };
          function Mr(M, O, G, ne) {
            return typeof M == "number" && M >= 0 && M <= 255 && typeof O == "number" && O >= 0 && O <= 255 && typeof G == "number" && G >= 0 && G <= 255 ? ne === void 0 || typeof ne == "number" && ne >= 0 && ne <= 1 ? null : "Invalid rgba value [" + [M, O, G, ne].join(", ") + "]: 'a' must be between 0 and 1." : "Invalid rgba value [" + (typeof ne == "number" ? [M, O, G, ne] : [M, O, G]).join(", ") + "]: 'r', 'g', and 'b' must be between 0 and 255.";
          }
          function Ir(M) {
            if (M === null || typeof M == "string" || typeof M == "boolean" || typeof M == "number" || M instanceof Kt || M instanceof $t || M instanceof cr || M instanceof gr)
              return !0;
            if (Array.isArray(M)) {
              for (var O = 0, G = M; O < G.length; O += 1)
                if (!Ir(G[O]))
                  return !1;
              return !0;
            }
            if (typeof M == "object") {
              for (var ne in M)
                if (!Ir(M[ne]))
                  return !1;
              return !0;
            }
            return !1;
          }
          function Fr(M) {
            if (M === null)
              return Pt;
            if (typeof M == "string")
              return ut;
            if (typeof M == "boolean")
              return Bt;
            if (typeof M == "number")
              return rt;
            if (M instanceof Kt)
              return wt;
            if (M instanceof $t)
              return We;
            if (M instanceof cr)
              return nt;
            if (M instanceof gr)
              return ft;
            if (Array.isArray(M)) {
              for (var O, G = M.length, ne = 0, me = M; ne < me.length; ne += 1) {
                var _e = Fr(me[ne]);
                if (O) {
                  if (O === _e)
                    continue;
                  O = Se;
                  break;
                }
                O = _e;
              }
              return Mt(O || Se, G);
            }
            return Lt;
          }
          function Gr(M) {
            var O = typeof M;
            return M === null ? "" : O === "string" || O === "number" || O === "boolean" ? String(M) : M instanceof Kt || M instanceof cr || M instanceof gr ? M.toString() : JSON.stringify(M);
          }
          gr.prototype.toString = function() {
            return this.name;
          }, gr.fromString = function(M) {
            return M ? new gr({ name: M, available: !1 }) : null;
          }, gr.prototype.serialize = function() {
            return ["image", this.name];
          };
          var un = function(M, O) {
            this.type = M, this.value = O;
          };
          un.parse = function(M, O) {
            if (M.length !== 2)
              return O.error("'literal' expression requires exactly one argument, but found " + (M.length - 1) + " instead.");
            if (!Ir(M[1]))
              return O.error("invalid value");
            var G = M[1], ne = Fr(G), me = O.expectedType;
            return ne.kind !== "array" || ne.N !== 0 || !me || me.kind !== "array" || typeof me.N == "number" && me.N !== 0 || (ne = me), new un(ne, G);
          }, un.prototype.evaluate = function() {
            return this.value;
          }, un.prototype.eachChild = function() {
          }, un.prototype.outputDefined = function() {
            return !0;
          }, un.prototype.serialize = function() {
            return this.type.kind === "array" || this.type.kind === "object" ? ["literal", this.value] : this.value instanceof Kt ? ["rgba"].concat(this.value.toArray()) : this.value instanceof cr ? this.value.serialize() : this.value;
          };
          var $r = function(M) {
            this.name = "ExpressionEvaluationError", this.message = M;
          };
          $r.prototype.toJSON = function() {
            return this.message;
          };
          var Dn = { string: ut, number: rt, boolean: Bt, object: Lt }, rn = function(M, O) {
            this.type = M, this.args = O;
          };
          rn.parse = function(M, O) {
            if (M.length < 2)
              return O.error("Expected at least one argument.");
            var G, ne = 1, me = M[0];
            if (me === "array") {
              var _e, Ce;
              if (M.length > 2) {
                var Ne = M[1];
                if (typeof Ne != "string" || !(Ne in Dn) || Ne === "object")
                  return O.error('The item type argument of "array" must be one of string, number, boolean', 1);
                _e = Dn[Ne], ne++;
              } else
                _e = Se;
              if (M.length > 3) {
                if (M[2] !== null && (typeof M[2] != "number" || M[2] < 0 || M[2] !== Math.floor(M[2])))
                  return O.error('The length argument to "array" must be a positive integer literal', 2);
                Ce = M[2], ne++;
              }
              G = Mt(_e, Ce);
            } else
              G = Dn[me];
            for (var $e = []; ne < M.length; ne++) {
              var ct = O.parse(M[ne], ne, Se);
              if (!ct)
                return null;
              $e.push(ct);
            }
            return new rn(G, $e);
          }, rn.prototype.evaluate = function(M) {
            for (var O = 0; O < this.args.length; O++) {
              var G = this.args[O].evaluate(M);
              if (!Ut(this.type, Fr(G)))
                return G;
              if (O === this.args.length - 1)
                throw new $r("Expected value to be of type " + Nt(this.type) + ", but found " + Nt(Fr(G)) + " instead.");
            }
            return null;
          }, rn.prototype.eachChild = function(M) {
            this.args.forEach(M);
          }, rn.prototype.outputDefined = function() {
            return this.args.every(function(M) {
              return M.outputDefined();
            });
          }, rn.prototype.serialize = function() {
            var M = this.type, O = [M.kind];
            if (M.kind === "array") {
              var G = M.itemType;
              if (G.kind === "string" || G.kind === "number" || G.kind === "boolean") {
                O.push(G.kind);
                var ne = M.N;
                (typeof ne == "number" || this.args.length > 1) && O.push(ne);
              }
            }
            return O.concat(this.args.map(function(me) {
              return me.serialize();
            }));
          };
          var vn = function(M) {
            this.type = nt, this.sections = M;
          };
          vn.parse = function(M, O) {
            if (M.length < 2)
              return O.error("Expected at least one argument.");
            var G = M[1];
            if (!Array.isArray(G) && typeof G == "object")
              return O.error("First argument must be an image or text section.");
            for (var ne = [], me = !1, _e = 1; _e <= M.length - 1; ++_e) {
              var Ce = M[_e];
              if (me && typeof Ce == "object" && !Array.isArray(Ce)) {
                me = !1;
                var Ne = null;
                if (Ce["font-scale"] && !(Ne = O.parse(Ce["font-scale"], 1, rt)))
                  return null;
                var $e = null;
                if (Ce["text-font"] && !($e = O.parse(Ce["text-font"], 1, Mt(ut))))
                  return null;
                var ct = null;
                if (Ce["text-color"] && !(ct = O.parse(Ce["text-color"], 1, wt)))
                  return null;
                var dt = ne[ne.length - 1];
                dt.scale = Ne, dt.font = $e, dt.textColor = ct;
              } else {
                var Rt = O.parse(M[_e], 1, Se);
                if (!Rt)
                  return null;
                var Wt = Rt.type.kind;
                if (Wt !== "string" && Wt !== "value" && Wt !== "null" && Wt !== "resolvedImage")
                  return O.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");
                me = !0, ne.push({ content: Rt, scale: null, font: null, textColor: null });
              }
            }
            return new vn(ne);
          }, vn.prototype.evaluate = function(M) {
            return new cr(this.sections.map(function(O) {
              var G = O.content.evaluate(M);
              return Fr(G) === ft ? new er("", G, null, null, null) : new er(Gr(G), null, O.scale ? O.scale.evaluate(M) : null, O.font ? O.font.evaluate(M).join(",") : null, O.textColor ? O.textColor.evaluate(M) : null);
            }));
          }, vn.prototype.eachChild = function(M) {
            for (var O = 0, G = this.sections; O < G.length; O += 1) {
              var ne = G[O];
              M(ne.content), ne.scale && M(ne.scale), ne.font && M(ne.font), ne.textColor && M(ne.textColor);
            }
          }, vn.prototype.outputDefined = function() {
            return !1;
          }, vn.prototype.serialize = function() {
            for (var M = ["format"], O = 0, G = this.sections; O < G.length; O += 1) {
              var ne = G[O];
              M.push(ne.content.serialize());
              var me = {};
              ne.scale && (me["font-scale"] = ne.scale.serialize()), ne.font && (me["text-font"] = ne.font.serialize()), ne.textColor && (me["text-color"] = ne.textColor.serialize()), M.push(me);
            }
            return M;
          };
          var xn = function(M) {
            this.type = ft, this.input = M;
          };
          xn.parse = function(M, O) {
            if (M.length !== 2)
              return O.error("Expected two arguments.");
            var G = O.parse(M[1], 1, ut);
            return G ? new xn(G) : O.error("No image name provided.");
          }, xn.prototype.evaluate = function(M) {
            var O = this.input.evaluate(M), G = gr.fromString(O);
            return G && M.availableImages && (G.available = M.availableImages.indexOf(O) > -1), G;
          }, xn.prototype.eachChild = function(M) {
            M(this.input);
          }, xn.prototype.outputDefined = function() {
            return !1;
          }, xn.prototype.serialize = function() {
            return ["image", this.input.serialize()];
          };
          var $n = { "to-boolean": Bt, "to-color": wt, "to-number": rt, "to-string": ut }, Br = function(M, O) {
            this.type = M, this.args = O;
          };
          Br.parse = function(M, O) {
            if (M.length < 2)
              return O.error("Expected at least one argument.");
            var G = M[0];
            if ((G === "to-boolean" || G === "to-string") && M.length !== 2)
              return O.error("Expected one argument.");
            for (var ne = $n[G], me = [], _e = 1; _e < M.length; _e++) {
              var Ce = O.parse(M[_e], _e, Se);
              if (!Ce)
                return null;
              me.push(Ce);
            }
            return new Br(ne, me);
          }, Br.prototype.evaluate = function(M) {
            if (this.type.kind === "boolean")
              return Boolean(this.args[0].evaluate(M));
            if (this.type.kind === "color") {
              for (var O, G, ne = 0, me = this.args; ne < me.length; ne += 1) {
                if (G = null, (O = me[ne].evaluate(M)) instanceof Kt)
                  return O;
                if (typeof O == "string") {
                  var _e = M.parseColor(O);
                  if (_e)
                    return _e;
                } else if (Array.isArray(O) && !(G = O.length < 3 || O.length > 4 ? "Invalid rbga value " + JSON.stringify(O) + ": expected an array containing either three or four numeric values." : Mr(O[0], O[1], O[2], O[3])))
                  return new Kt(O[0] / 255, O[1] / 255, O[2] / 255, O[3]);
              }
              throw new $r(G || "Could not parse color from value '" + (typeof O == "string" ? O : String(JSON.stringify(O))) + "'");
            }
            if (this.type.kind === "number") {
              for (var Ce = null, Ne = 0, $e = this.args; Ne < $e.length; Ne += 1) {
                if ((Ce = $e[Ne].evaluate(M)) === null)
                  return 0;
                var ct = Number(Ce);
                if (!isNaN(ct))
                  return ct;
              }
              throw new $r("Could not convert " + JSON.stringify(Ce) + " to number.");
            }
            return this.type.kind === "formatted" ? cr.fromString(Gr(this.args[0].evaluate(M))) : this.type.kind === "resolvedImage" ? gr.fromString(Gr(this.args[0].evaluate(M))) : Gr(this.args[0].evaluate(M));
          }, Br.prototype.eachChild = function(M) {
            this.args.forEach(M);
          }, Br.prototype.outputDefined = function() {
            return this.args.every(function(M) {
              return M.outputDefined();
            });
          }, Br.prototype.serialize = function() {
            if (this.type.kind === "formatted")
              return new vn([{ content: this.args[0], scale: null, font: null, textColor: null }]).serialize();
            if (this.type.kind === "resolvedImage")
              return new xn(this.args[0]).serialize();
            var M = ["to-" + this.type.kind];
            return this.eachChild(function(O) {
              M.push(O.serialize());
            }), M;
          };
          var tn = ["Unknown", "Point", "LineString", "Polygon"], mn = function() {
            this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
          };
          mn.prototype.id = function() {
            return this.feature && "id" in this.feature ? this.feature.id : null;
          }, mn.prototype.geometryType = function() {
            return this.feature ? typeof this.feature.type == "number" ? tn[this.feature.type] : this.feature.type : null;
          }, mn.prototype.geometry = function() {
            return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
          }, mn.prototype.canonicalID = function() {
            return this.canonical;
          }, mn.prototype.properties = function() {
            return this.feature && this.feature.properties || {};
          }, mn.prototype.parseColor = function(M) {
            var O = this._parseColorCache[M];
            return O || (O = this._parseColorCache[M] = Kt.parse(M)), O;
          };
          var Qr = function(M, O, G, ne) {
            this.name = M, this.type = O, this._evaluate = G, this.args = ne;
          };
          Qr.prototype.evaluate = function(M) {
            return this._evaluate(M, this.args);
          }, Qr.prototype.eachChild = function(M) {
            this.args.forEach(M);
          }, Qr.prototype.outputDefined = function() {
            return !1;
          }, Qr.prototype.serialize = function() {
            return [this.name].concat(this.args.map(function(M) {
              return M.serialize();
            }));
          }, Qr.parse = function(M, O) {
            var G, ne = M[0], me = Qr.definitions[ne];
            if (!me)
              return O.error('Unknown expression "' + ne + '". If you wanted a literal array, use ["literal", [...]].', 0);
            for (var _e = Array.isArray(me) ? me[0] : me.type, Ce = Array.isArray(me) ? [[me[1], me[2]]] : me.overloads, Ne = Ce.filter(function(sa) {
              var Jn = sa[0];
              return !Array.isArray(Jn) || Jn.length === M.length - 1;
            }), $e = null, ct = 0, dt = Ne; ct < dt.length; ct += 1) {
              var Rt = dt[ct], Wt = Rt[0], qt = Rt[1];
              $e = new en(O.registry, O.path, null, O.scope);
              for (var ir = [], yr = !1, Cr = 1; Cr < M.length; Cr++) {
                var Lr = M[Cr], jr = Array.isArray(Wt) ? Wt[Cr - 1] : Wt.type, Ur = $e.parse(Lr, 1 + ir.length, jr);
                if (!Ur) {
                  yr = !0;
                  break;
                }
                ir.push(Ur);
              }
              if (!yr)
                if (Array.isArray(Wt) && Wt.length !== ir.length)
                  $e.error("Expected " + Wt.length + " arguments, but found " + ir.length + " instead.");
                else {
                  for (var Yr = 0; Yr < ir.length; Yr++) {
                    var fn = Array.isArray(Wt) ? Wt[Yr] : Wt.type, yn = ir[Yr];
                    $e.concat(Yr + 1).checkSubtype(fn, yn.type);
                  }
                  if ($e.errors.length === 0)
                    return new Qr(ne, _e, qt, ir);
                }
            }
            if (Ne.length === 1)
              (G = O.errors).push.apply(G, $e.errors);
            else {
              for (var Bn = (Ne.length ? Ne : Ce).map(function(sa) {
                var Jn, pa = sa[0];
                return Jn = pa, Array.isArray(Jn) ? "(" + Jn.map(Nt).join(", ") + ")" : "(" + Nt(Jn.type) + "...)";
              }).join(" | "), Fn = [], Gn = 1; Gn < M.length; Gn++) {
                var oa = O.parse(M[Gn], 1 + Fn.length);
                if (!oa)
                  return null;
                Fn.push(Nt(oa.type));
              }
              O.error("Expected arguments of type " + Bn + ", but found (" + Fn.join(", ") + ") instead.");
            }
            return null;
          }, Qr.register = function(M, O) {
            for (var G in Qr.definitions = O, O)
              M[G] = Qr;
          };
          var cn = function(M, O, G) {
            this.type = We, this.locale = G, this.caseSensitive = M, this.diacriticSensitive = O;
          };
          cn.parse = function(M, O) {
            if (M.length !== 2)
              return O.error("Expected one argument.");
            var G = M[1];
            if (typeof G != "object" || Array.isArray(G))
              return O.error("Collator options argument must be an object.");
            var ne = O.parse(G["case-sensitive"] !== void 0 && G["case-sensitive"], 1, Bt);
            if (!ne)
              return null;
            var me = O.parse(G["diacritic-sensitive"] !== void 0 && G["diacritic-sensitive"], 1, Bt);
            if (!me)
              return null;
            var _e = null;
            return G.locale && !(_e = O.parse(G.locale, 1, ut)) ? null : new cn(ne, me, _e);
          }, cn.prototype.evaluate = function(M) {
            return new $t(this.caseSensitive.evaluate(M), this.diacriticSensitive.evaluate(M), this.locale ? this.locale.evaluate(M) : null);
          }, cn.prototype.eachChild = function(M) {
            M(this.caseSensitive), M(this.diacriticSensitive), this.locale && M(this.locale);
          }, cn.prototype.outputDefined = function() {
            return !1;
          }, cn.prototype.serialize = function() {
            var M = {};
            return M["case-sensitive"] = this.caseSensitive.serialize(), M["diacritic-sensitive"] = this.diacriticSensitive.serialize(), this.locale && (M.locale = this.locale.serialize()), ["collator", M];
          };
          function Hn(M, O) {
            M[0] = Math.min(M[0], O[0]), M[1] = Math.min(M[1], O[1]), M[2] = Math.max(M[2], O[0]), M[3] = Math.max(M[3], O[1]);
          }
          function _n(M, O) {
            return !(M[0] <= O[0]) && !(M[2] >= O[2]) && !(M[1] <= O[1]) && !(M[3] >= O[3]);
          }
          function En(M, O) {
            var G, ne = (180 + M[0]) / 360, me = (G = M[1], (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + G * Math.PI / 360))) / 360), _e = Math.pow(2, O.z);
            return [Math.round(ne * _e * 8192), Math.round(me * _e * 8192)];
          }
          function aa(M, O, G) {
            return O[1] > M[1] != G[1] > M[1] && M[0] < (G[0] - O[0]) * (M[1] - O[1]) / (G[1] - O[1]) + O[0];
          }
          function tr(M, O) {
            for (var G, ne, me, _e, Ce, Ne, $e, ct = !1, dt = 0, Rt = O.length; dt < Rt; dt++)
              for (var Wt = O[dt], qt = 0, ir = Wt.length; qt < ir - 1; qt++) {
                if (G = M, ne = Wt[qt], me = Wt[qt + 1], _e = void 0, Ce = void 0, Ne = void 0, $e = void 0, _e = G[0] - ne[0], Ce = G[1] - ne[1], Ne = G[0] - me[0], $e = G[1] - me[1], _e * $e - Ne * Ce == 0 && _e * Ne <= 0 && Ce * $e <= 0)
                  return !1;
                aa(M, Wt[qt], Wt[qt + 1]) && (ct = !ct);
              }
            return ct;
          }
          function mr(M, O) {
            for (var G = 0; G < O.length; G++)
              if (tr(M, O[G]))
                return !0;
            return !1;
          }
          function Ct(M, O, G, ne) {
            var me = M[0] - G[0], _e = M[1] - G[1], Ce = O[0] - G[0], Ne = O[1] - G[1], $e = ne[0] - G[0], ct = ne[1] - G[1], dt = me * ct - $e * _e, Rt = Ce * ct - $e * Ne;
            return dt > 0 && Rt < 0 || dt < 0 && Rt > 0;
          }
          function or(M, O, G) {
            for (var ne = 0, me = G; ne < me.length; ne += 1)
              for (var _e = me[ne], Ce = 0; Ce < _e.length - 1; ++Ce)
                if (Ne = M, $e = O, ct = _e[Ce], dt = _e[Ce + 1], Rt = void 0, Wt = void 0, qt = void 0, ir = void 0, qt = [$e[0] - Ne[0], $e[1] - Ne[1]], ir = [dt[0] - ct[0], dt[1] - ct[1]], (Rt = ir)[0] * (Wt = qt)[1] - Rt[1] * Wt[0] != 0 && Ct(Ne, $e, ct, dt) && Ct(ct, dt, Ne, $e))
                  return !0;
            var Ne, $e, ct, dt, Rt, Wt, qt, ir;
            return !1;
          }
          function hr(M, O) {
            for (var G = 0; G < M.length; ++G)
              if (!tr(M[G], O))
                return !1;
            for (var ne = 0; ne < M.length - 1; ++ne)
              if (or(M[ne], M[ne + 1], O))
                return !1;
            return !0;
          }
          function Rr(M, O) {
            for (var G = 0; G < O.length; G++)
              if (hr(M, O[G]))
                return !0;
            return !1;
          }
          function Dr(M, O, G) {
            for (var ne = [], me = 0; me < M.length; me++) {
              for (var _e = [], Ce = 0; Ce < M[me].length; Ce++) {
                var Ne = En(M[me][Ce], G);
                Hn(O, Ne), _e.push(Ne);
              }
              ne.push(_e);
            }
            return ne;
          }
          function Or(M, O, G) {
            for (var ne = [], me = 0; me < M.length; me++) {
              var _e = Dr(M[me], O, G);
              ne.push(_e);
            }
            return ne;
          }
          function Ar(M, O, G, ne) {
            if (M[0] < G[0] || M[0] > G[2]) {
              var me = 0.5 * ne, _e = M[0] - G[0] > me ? -ne : G[0] - M[0] > me ? ne : 0;
              _e === 0 && (_e = M[0] - G[2] > me ? -ne : G[2] - M[0] > me ? ne : 0), M[0] += _e;
            }
            Hn(O, M);
          }
          function vr(M, O, G, ne) {
            for (var me = 8192 * Math.pow(2, ne.z), _e = [8192 * ne.x, 8192 * ne.y], Ce = [], Ne = 0, $e = M; Ne < $e.length; Ne += 1)
              for (var ct = 0, dt = $e[Ne]; ct < dt.length; ct += 1) {
                var Rt = dt[ct], Wt = [Rt.x + _e[0], Rt.y + _e[1]];
                Ar(Wt, O, G, me), Ce.push(Wt);
              }
            return Ce;
          }
          function xr(M, O, G, ne) {
            for (var me, _e = 8192 * Math.pow(2, ne.z), Ce = [8192 * ne.x, 8192 * ne.y], Ne = [], $e = 0, ct = M; $e < ct.length; $e += 1) {
              for (var dt = [], Rt = 0, Wt = ct[$e]; Rt < Wt.length; Rt += 1) {
                var qt = Wt[Rt], ir = [qt.x + Ce[0], qt.y + Ce[1]];
                Hn(O, ir), dt.push(ir);
              }
              Ne.push(dt);
            }
            if (O[2] - O[0] <= _e / 2) {
              (me = O)[0] = me[1] = 1 / 0, me[2] = me[3] = -1 / 0;
              for (var yr = 0, Cr = Ne; yr < Cr.length; yr += 1)
                for (var Lr = 0, jr = Cr[yr]; Lr < jr.length; Lr += 1)
                  Ar(jr[Lr], O, G, _e);
            }
            return Ne;
          }
          var wr = function(M, O) {
            this.type = Bt, this.geojson = M, this.geometries = O;
          };
          function Er(M) {
            if (M instanceof Qr && (M.name === "get" && M.args.length === 1 || M.name === "feature-state" || M.name === "has" && M.args.length === 1 || M.name === "properties" || M.name === "geometry-type" || M.name === "id" || /^filter-/.test(M.name)) || M instanceof wr)
              return !1;
            var O = !0;
            return M.eachChild(function(G) {
              O && !Er(G) && (O = !1);
            }), O;
          }
          function Hr(M) {
            if (M instanceof Qr && M.name === "feature-state")
              return !1;
            var O = !0;
            return M.eachChild(function(G) {
              O && !Hr(G) && (O = !1);
            }), O;
          }
          function Vr(M, O) {
            if (M instanceof Qr && O.indexOf(M.name) >= 0)
              return !1;
            var G = !0;
            return M.eachChild(function(ne) {
              G && !Vr(ne, O) && (G = !1);
            }), G;
          }
          wr.parse = function(M, O) {
            if (M.length !== 2)
              return O.error("'within' expression requires exactly one argument, but found " + (M.length - 1) + " instead.");
            if (Ir(M[1])) {
              var G = M[1];
              if (G.type === "FeatureCollection")
                for (var ne = 0; ne < G.features.length; ++ne) {
                  var me = G.features[ne].geometry.type;
                  if (me === "Polygon" || me === "MultiPolygon")
                    return new wr(G, G.features[ne].geometry);
                }
              else if (G.type === "Feature") {
                var _e = G.geometry.type;
                if (_e === "Polygon" || _e === "MultiPolygon")
                  return new wr(G, G.geometry);
              } else if (G.type === "Polygon" || G.type === "MultiPolygon")
                return new wr(G, G);
            }
            return O.error("'within' expression requires valid geojson object that contains polygon geometry type.");
          }, wr.prototype.evaluate = function(M) {
            if (M.geometry() != null && M.canonicalID() != null) {
              if (M.geometryType() === "Point")
                return function(O, G) {
                  var ne = [1 / 0, 1 / 0, -1 / 0, -1 / 0], me = [1 / 0, 1 / 0, -1 / 0, -1 / 0], _e = O.canonicalID();
                  if (G.type === "Polygon") {
                    var Ce = Dr(G.coordinates, me, _e), Ne = vr(O.geometry(), ne, me, _e);
                    if (!_n(ne, me))
                      return !1;
                    for (var $e = 0, ct = Ne; $e < ct.length; $e += 1)
                      if (!tr(ct[$e], Ce))
                        return !1;
                  }
                  if (G.type === "MultiPolygon") {
                    var dt = Or(G.coordinates, me, _e), Rt = vr(O.geometry(), ne, me, _e);
                    if (!_n(ne, me))
                      return !1;
                    for (var Wt = 0, qt = Rt; Wt < qt.length; Wt += 1)
                      if (!mr(qt[Wt], dt))
                        return !1;
                  }
                  return !0;
                }(M, this.geometries);
              if (M.geometryType() === "LineString")
                return function(O, G) {
                  var ne = [1 / 0, 1 / 0, -1 / 0, -1 / 0], me = [1 / 0, 1 / 0, -1 / 0, -1 / 0], _e = O.canonicalID();
                  if (G.type === "Polygon") {
                    var Ce = Dr(G.coordinates, me, _e), Ne = xr(O.geometry(), ne, me, _e);
                    if (!_n(ne, me))
                      return !1;
                    for (var $e = 0, ct = Ne; $e < ct.length; $e += 1)
                      if (!hr(ct[$e], Ce))
                        return !1;
                  }
                  if (G.type === "MultiPolygon") {
                    var dt = Or(G.coordinates, me, _e), Rt = xr(O.geometry(), ne, me, _e);
                    if (!_n(ne, me))
                      return !1;
                    for (var Wt = 0, qt = Rt; Wt < qt.length; Wt += 1)
                      if (!Rr(qt[Wt], dt))
                        return !1;
                  }
                  return !0;
                }(M, this.geometries);
            }
            return !1;
          }, wr.prototype.eachChild = function() {
          }, wr.prototype.outputDefined = function() {
            return !0;
          }, wr.prototype.serialize = function() {
            return ["within", this.geojson];
          };
          var Kr = function(M, O) {
            this.type = O.type, this.name = M, this.boundExpression = O;
          };
          Kr.parse = function(M, O) {
            if (M.length !== 2 || typeof M[1] != "string")
              return O.error("'var' expression requires exactly one string literal argument.");
            var G = M[1];
            return O.scope.has(G) ? new Kr(G, O.scope.get(G)) : O.error('Unknown variable "' + G + '". Make sure "' + G + '" has been bound in an enclosing "let" expression before using it.', 1);
          }, Kr.prototype.evaluate = function(M) {
            return this.boundExpression.evaluate(M);
          }, Kr.prototype.eachChild = function() {
          }, Kr.prototype.outputDefined = function() {
            return !1;
          }, Kr.prototype.serialize = function() {
            return ["var", this.name];
          };
          var en = function(M, O, G, ne, me) {
            O === void 0 && (O = []), ne === void 0 && (ne = new Tt()), me === void 0 && (me = []), this.registry = M, this.path = O, this.key = O.map(function(_e) {
              return "[" + _e + "]";
            }).join(""), this.scope = ne, this.errors = me, this.expectedType = G;
          };
          function gn(M, O) {
            for (var G, ne, me = M.length - 1, _e = 0, Ce = me, Ne = 0; _e <= Ce; )
              if (G = M[Ne = Math.floor((_e + Ce) / 2)], ne = M[Ne + 1], G <= O) {
                if (Ne === me || O < ne)
                  return Ne;
                _e = Ne + 1;
              } else {
                if (!(G > O))
                  throw new $r("Input is not a number.");
                Ce = Ne - 1;
              }
            return 0;
          }
          en.prototype.parse = function(M, O, G, ne, me) {
            return me === void 0 && (me = {}), O ? this.concat(O, G, ne)._parse(M, me) : this._parse(M, me);
          }, en.prototype._parse = function(M, O) {
            function G(ct, dt, Rt) {
              return Rt === "assert" ? new rn(dt, [ct]) : Rt === "coerce" ? new Br(dt, [ct]) : ct;
            }
            if (M !== null && typeof M != "string" && typeof M != "boolean" && typeof M != "number" || (M = ["literal", M]), Array.isArray(M)) {
              if (M.length === 0)
                return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');
              var ne = M[0];
              if (typeof ne != "string")
                return this.error("Expression name must be a string, but found " + typeof ne + ' instead. If you wanted a literal array, use ["literal", [...]].', 0), null;
              var me = this.registry[ne];
              if (me) {
                var _e = me.parse(M, this);
                if (!_e)
                  return null;
                if (this.expectedType) {
                  var Ce = this.expectedType, Ne = _e.type;
                  if (Ce.kind !== "string" && Ce.kind !== "number" && Ce.kind !== "boolean" && Ce.kind !== "object" && Ce.kind !== "array" || Ne.kind !== "value")
                    if (Ce.kind !== "color" && Ce.kind !== "formatted" && Ce.kind !== "resolvedImage" || Ne.kind !== "value" && Ne.kind !== "string") {
                      if (this.checkSubtype(Ce, Ne))
                        return null;
                    } else
                      _e = G(_e, Ce, O.typeAnnotation || "coerce");
                  else
                    _e = G(_e, Ce, O.typeAnnotation || "assert");
                }
                if (!(_e instanceof un) && _e.type.kind !== "resolvedImage" && function ct(dt) {
                  if (dt instanceof Kr)
                    return ct(dt.boundExpression);
                  if (dt instanceof Qr && dt.name === "error" || dt instanceof cn || dt instanceof wr)
                    return !1;
                  var Rt = dt instanceof Br || dt instanceof rn, Wt = !0;
                  return dt.eachChild(function(qt) {
                    Wt = Rt ? Wt && ct(qt) : Wt && qt instanceof un;
                  }), Wt ? Er(dt) && Vr(dt, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]) : !1;
                }(_e)) {
                  var $e = new mn();
                  try {
                    _e = new un(_e.type, _e.evaluate($e));
                  } catch (ct) {
                    return this.error(ct.message), null;
                  }
                }
                return _e;
              }
              return this.error('Unknown expression "' + ne + '". If you wanted a literal array, use ["literal", [...]].', 0);
            }
            return M === void 0 ? this.error("'undefined' value invalid. Use null instead.") : typeof M == "object" ? this.error('Bare objects invalid. Use ["literal", {...}] instead.') : this.error("Expected an array, but found " + typeof M + " instead.");
          }, en.prototype.concat = function(M, O, G) {
            var ne = typeof M == "number" ? this.path.concat(M) : this.path, me = G ? this.scope.concat(G) : this.scope;
            return new en(this.registry, ne, O || null, me, this.errors);
          }, en.prototype.error = function(M) {
            for (var O = [], G = arguments.length - 1; G-- > 0; )
              O[G] = arguments[G + 1];
            var ne = "" + this.key + O.map(function(me) {
              return "[" + me + "]";
            }).join("");
            this.errors.push(new it(ne, M));
          }, en.prototype.checkSubtype = function(M, O) {
            var G = Ut(M, O);
            return G && this.error(G), G;
          };
          var bn = function(M, O, G) {
            this.type = M, this.input = O, this.labels = [], this.outputs = [];
            for (var ne = 0, me = G; ne < me.length; ne += 1) {
              var _e = me[ne], Ce = _e[0], Ne = _e[1];
              this.labels.push(Ce), this.outputs.push(Ne);
            }
          };
          function wn(M, O, G) {
            return M * (1 - G) + O * G;
          }
          bn.parse = function(M, O) {
            if (M.length - 1 < 4)
              return O.error("Expected at least 4 arguments, but found only " + (M.length - 1) + ".");
            if ((M.length - 1) % 2 != 0)
              return O.error("Expected an even number of arguments.");
            var G = O.parse(M[1], 1, rt);
            if (!G)
              return null;
            var ne = [], me = null;
            O.expectedType && O.expectedType.kind !== "value" && (me = O.expectedType);
            for (var _e = 1; _e < M.length; _e += 2) {
              var Ce = _e === 1 ? -1 / 0 : M[_e], Ne = M[_e + 1], $e = _e, ct = _e + 1;
              if (typeof Ce != "number")
                return O.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', $e);
              if (ne.length && ne[ne.length - 1][0] >= Ce)
                return O.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', $e);
              var dt = O.parse(Ne, ct, me);
              if (!dt)
                return null;
              me = me || dt.type, ne.push([Ce, dt]);
            }
            return new bn(me, G, ne);
          }, bn.prototype.evaluate = function(M) {
            var O = this.labels, G = this.outputs;
            if (O.length === 1)
              return G[0].evaluate(M);
            var ne = this.input.evaluate(M);
            if (ne <= O[0])
              return G[0].evaluate(M);
            var me = O.length;
            return ne >= O[me - 1] ? G[me - 1].evaluate(M) : G[gn(O, ne)].evaluate(M);
          }, bn.prototype.eachChild = function(M) {
            M(this.input);
            for (var O = 0, G = this.outputs; O < G.length; O += 1)
              M(G[O]);
          }, bn.prototype.outputDefined = function() {
            return this.outputs.every(function(M) {
              return M.outputDefined();
            });
          }, bn.prototype.serialize = function() {
            for (var M = ["step", this.input.serialize()], O = 0; O < this.labels.length; O++)
              O > 0 && M.push(this.labels[O]), M.push(this.outputs[O].serialize());
            return M;
          };
          var Ln = Object.freeze({ __proto__: null, number: wn, color: function(M, O, G) {
            return new Kt(wn(M.r, O.r, G), wn(M.g, O.g, G), wn(M.b, O.b, G), wn(M.a, O.a, G));
          }, array: function(M, O, G) {
            return M.map(function(ne, me) {
              return wn(ne, O[me], G);
            });
          } }), In = 6 / 29, Yn = 3 * In * In, ka = Math.PI / 180, Ta = 180 / Math.PI;
          function An(M) {
            return M > 0.008856451679035631 ? Math.pow(M, 1 / 3) : M / Yn + 4 / 29;
          }
          function Kn(M) {
            return M > In ? M * M * M : Yn * (M - 4 / 29);
          }
          function Xn(M) {
            return 255 * (M <= 31308e-7 ? 12.92 * M : 1.055 * Math.pow(M, 1 / 2.4) - 0.055);
          }
          function Ia(M) {
            return (M /= 255) <= 0.04045 ? M / 12.92 : Math.pow((M + 0.055) / 1.055, 2.4);
          }
          function hi(M) {
            var O = Ia(M.r), G = Ia(M.g), ne = Ia(M.b), me = An((0.4124564 * O + 0.3575761 * G + 0.1804375 * ne) / 0.95047), _e = An((0.2126729 * O + 0.7151522 * G + 0.072175 * ne) / 1);
            return { l: 116 * _e - 16, a: 500 * (me - _e), b: 200 * (_e - An((0.0193339 * O + 0.119192 * G + 0.9503041 * ne) / 1.08883)), alpha: M.a };
          }
          function Ii(M) {
            var O = (M.l + 16) / 116, G = isNaN(M.a) ? O : O + M.a / 500, ne = isNaN(M.b) ? O : O - M.b / 200;
            return O = 1 * Kn(O), G = 0.95047 * Kn(G), ne = 1.08883 * Kn(ne), new Kt(Xn(3.2404542 * G - 1.5371385 * O - 0.4985314 * ne), Xn(-0.969266 * G + 1.8760108 * O + 0.041556 * ne), Xn(0.0556434 * G - 0.2040259 * O + 1.0572252 * ne), M.alpha);
          }
          function so(M, O, G) {
            var ne = O - M;
            return M + G * (ne > 180 || ne < -180 ? ne - 360 * Math.round(ne / 360) : ne);
          }
          var Ga = { forward: hi, reverse: Ii, interpolate: function(M, O, G) {
            return { l: wn(M.l, O.l, G), a: wn(M.a, O.a, G), b: wn(M.b, O.b, G), alpha: wn(M.alpha, O.alpha, G) };
          } }, Ya = { forward: function(M) {
            var O = hi(M), G = O.l, ne = O.a, me = O.b, _e = Math.atan2(me, ne) * Ta;
            return { h: _e < 0 ? _e + 360 : _e, c: Math.sqrt(ne * ne + me * me), l: G, alpha: M.a };
          }, reverse: function(M) {
            var O = M.h * ka, G = M.c;
            return Ii({ l: M.l, a: Math.cos(O) * G, b: Math.sin(O) * G, alpha: M.alpha });
          }, interpolate: function(M, O, G) {
            return { h: so(M.h, O.h, G), c: wn(M.c, O.c, G), l: wn(M.l, O.l, G), alpha: wn(M.alpha, O.alpha, G) };
          } }, Zi = Object.freeze({ __proto__: null, lab: Ga, hcl: Ya }), Fa = function(M, O, G, ne, me) {
            this.type = M, this.operator = O, this.interpolation = G, this.input = ne, this.labels = [], this.outputs = [];
            for (var _e = 0, Ce = me; _e < Ce.length; _e += 1) {
              var Ne = Ce[_e], $e = Ne[0], ct = Ne[1];
              this.labels.push($e), this.outputs.push(ct);
            }
          };
          function lo(M, O, G, ne) {
            var me = ne - G, _e = M - G;
            return me === 0 ? 0 : O === 1 ? _e / me : (Math.pow(O, _e) - 1) / (Math.pow(O, me) - 1);
          }
          Fa.interpolationFactor = function(M, O, G, ne) {
            var me = 0;
            if (M.name === "exponential")
              me = lo(O, M.base, G, ne);
            else if (M.name === "linear")
              me = lo(O, 1, G, ne);
            else if (M.name === "cubic-bezier") {
              var _e = M.controlPoints;
              me = new n(_e[0], _e[1], _e[2], _e[3]).solve(lo(O, 1, G, ne));
            }
            return me;
          }, Fa.parse = function(M, O) {
            var G = M[0], ne = M[1], me = M[2], _e = M.slice(3);
            if (!Array.isArray(ne) || ne.length === 0)
              return O.error("Expected an interpolation type expression.", 1);
            if (ne[0] === "linear")
              ne = { name: "linear" };
            else if (ne[0] === "exponential") {
              var Ce = ne[1];
              if (typeof Ce != "number")
                return O.error("Exponential interpolation requires a numeric base.", 1, 1);
              ne = { name: "exponential", base: Ce };
            } else {
              if (ne[0] !== "cubic-bezier")
                return O.error("Unknown interpolation type " + String(ne[0]), 1, 0);
              var Ne = ne.slice(1);
              if (Ne.length !== 4 || Ne.some(function(Cr) {
                return typeof Cr != "number" || Cr < 0 || Cr > 1;
              }))
                return O.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1);
              ne = { name: "cubic-bezier", controlPoints: Ne };
            }
            if (M.length - 1 < 4)
              return O.error("Expected at least 4 arguments, but found only " + (M.length - 1) + ".");
            if ((M.length - 1) % 2 != 0)
              return O.error("Expected an even number of arguments.");
            if (!(me = O.parse(me, 2, rt)))
              return null;
            var $e = [], ct = null;
            G === "interpolate-hcl" || G === "interpolate-lab" ? ct = wt : O.expectedType && O.expectedType.kind !== "value" && (ct = O.expectedType);
            for (var dt = 0; dt < _e.length; dt += 2) {
              var Rt = _e[dt], Wt = _e[dt + 1], qt = dt + 3, ir = dt + 4;
              if (typeof Rt != "number")
                return O.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', qt);
              if ($e.length && $e[$e.length - 1][0] >= Rt)
                return O.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', qt);
              var yr = O.parse(Wt, ir, ct);
              if (!yr)
                return null;
              ct = ct || yr.type, $e.push([Rt, yr]);
            }
            return ct.kind === "number" || ct.kind === "color" || ct.kind === "array" && ct.itemType.kind === "number" && typeof ct.N == "number" ? new Fa(ct, G, ne, me, $e) : O.error("Type " + Nt(ct) + " is not interpolatable.");
          }, Fa.prototype.evaluate = function(M) {
            var O = this.labels, G = this.outputs;
            if (O.length === 1)
              return G[0].evaluate(M);
            var ne = this.input.evaluate(M);
            if (ne <= O[0])
              return G[0].evaluate(M);
            var me = O.length;
            if (ne >= O[me - 1])
              return G[me - 1].evaluate(M);
            var _e = gn(O, ne), Ce = O[_e], Ne = O[_e + 1], $e = Fa.interpolationFactor(this.interpolation, ne, Ce, Ne), ct = G[_e].evaluate(M), dt = G[_e + 1].evaluate(M);
            return this.operator === "interpolate" ? Ln[this.type.kind.toLowerCase()](ct, dt, $e) : this.operator === "interpolate-hcl" ? Ya.reverse(Ya.interpolate(Ya.forward(ct), Ya.forward(dt), $e)) : Ga.reverse(Ga.interpolate(Ga.forward(ct), Ga.forward(dt), $e));
          }, Fa.prototype.eachChild = function(M) {
            M(this.input);
            for (var O = 0, G = this.outputs; O < G.length; O += 1)
              M(G[O]);
          }, Fa.prototype.outputDefined = function() {
            return this.outputs.every(function(M) {
              return M.outputDefined();
            });
          }, Fa.prototype.serialize = function() {
            var M;
            M = this.interpolation.name === "linear" ? ["linear"] : this.interpolation.name === "exponential" ? this.interpolation.base === 1 ? ["linear"] : ["exponential", this.interpolation.base] : ["cubic-bezier"].concat(this.interpolation.controlPoints);
            for (var O = [this.operator, M, this.input.serialize()], G = 0; G < this.labels.length; G++)
              O.push(this.labels[G], this.outputs[G].serialize());
            return O;
          };
          var ho = function(M, O) {
            this.type = M, this.args = O;
          };
          ho.parse = function(M, O) {
            if (M.length < 2)
              return O.error("Expectected at least one argument.");
            var G = null, ne = O.expectedType;
            ne && ne.kind !== "value" && (G = ne);
            for (var me = [], _e = 0, Ce = M.slice(1); _e < Ce.length; _e += 1) {
              var Ne = Ce[_e], $e = O.parse(Ne, 1 + me.length, G, void 0, { typeAnnotation: "omit" });
              if (!$e)
                return null;
              G = G || $e.type, me.push($e);
            }
            var ct = ne && me.some(function(dt) {
              return Ut(ne, dt.type);
            });
            return new ho(ct ? Se : G, me);
          }, ho.prototype.evaluate = function(M) {
            for (var O, G = null, ne = 0, me = 0, _e = this.args; me < _e.length && (ne++, (G = _e[me].evaluate(M)) && G instanceof gr && !G.available && (O || (O = G.name), G = null, ne === this.args.length && (G = O)), G === null); me += 1)
              ;
            return G;
          }, ho.prototype.eachChild = function(M) {
            this.args.forEach(M);
          }, ho.prototype.outputDefined = function() {
            return this.args.every(function(M) {
              return M.outputDefined();
            });
          }, ho.prototype.serialize = function() {
            var M = ["coalesce"];
            return this.eachChild(function(O) {
              M.push(O.serialize());
            }), M;
          };
          var bi = function(M, O) {
            this.type = O.type, this.bindings = [].concat(M), this.result = O;
          };
          bi.prototype.evaluate = function(M) {
            return this.result.evaluate(M);
          }, bi.prototype.eachChild = function(M) {
            for (var O = 0, G = this.bindings; O < G.length; O += 1)
              M(G[O][1]);
            M(this.result);
          }, bi.parse = function(M, O) {
            if (M.length < 4)
              return O.error("Expected at least 3 arguments, but found " + (M.length - 1) + " instead.");
            for (var G = [], ne = 1; ne < M.length - 1; ne += 2) {
              var me = M[ne];
              if (typeof me != "string")
                return O.error("Expected string, but found " + typeof me + " instead.", ne);
              if (/[^a-zA-Z0-9_]/.test(me))
                return O.error("Variable names must contain only alphanumeric characters or '_'.", ne);
              var _e = O.parse(M[ne + 1], ne + 1);
              if (!_e)
                return null;
              G.push([me, _e]);
            }
            var Ce = O.parse(M[M.length - 1], M.length - 1, O.expectedType, G);
            return Ce ? new bi(G, Ce) : null;
          }, bi.prototype.outputDefined = function() {
            return this.result.outputDefined();
          }, bi.prototype.serialize = function() {
            for (var M = ["let"], O = 0, G = this.bindings; O < G.length; O += 1) {
              var ne = G[O], me = ne[0], _e = ne[1];
              M.push(me, _e.serialize());
            }
            return M.push(this.result.serialize()), M;
          };
          var Xi = function(M, O, G) {
            this.type = M, this.index = O, this.input = G;
          };
          Xi.parse = function(M, O) {
            if (M.length !== 3)
              return O.error("Expected 2 arguments, but found " + (M.length - 1) + " instead.");
            var G = O.parse(M[1], 1, rt), ne = O.parse(M[2], 2, Mt(O.expectedType || Se));
            if (!G || !ne)
              return null;
            var me = ne.type;
            return new Xi(me.itemType, G, ne);
          }, Xi.prototype.evaluate = function(M) {
            var O = this.index.evaluate(M), G = this.input.evaluate(M);
            if (O < 0)
              throw new $r("Array index out of bounds: " + O + " < 0.");
            if (O >= G.length)
              throw new $r("Array index out of bounds: " + O + " > " + (G.length - 1) + ".");
            if (O !== Math.floor(O))
              throw new $r("Array index must be an integer, but found " + O + " instead.");
            return G[O];
          }, Xi.prototype.eachChild = function(M) {
            M(this.index), M(this.input);
          }, Xi.prototype.outputDefined = function() {
            return !1;
          }, Xi.prototype.serialize = function() {
            return ["at", this.index.serialize(), this.input.serialize()];
          };
          var po = function(M, O) {
            this.type = Bt, this.needle = M, this.haystack = O;
          };
          po.parse = function(M, O) {
            if (M.length !== 3)
              return O.error("Expected 2 arguments, but found " + (M.length - 1) + " instead.");
            var G = O.parse(M[1], 1, Se), ne = O.parse(M[2], 2, Se);
            return G && ne ? fr(G.type, [Bt, ut, rt, Pt, Se]) ? new po(G, ne) : O.error("Expected first argument to be of type boolean, string, number or null, but found " + Nt(G.type) + " instead") : null;
          }, po.prototype.evaluate = function(M) {
            var O = this.needle.evaluate(M), G = this.haystack.evaluate(M);
            if (!G)
              return !1;
            if (!Tr(O, ["boolean", "string", "number", "null"]))
              throw new $r("Expected first argument to be of type boolean, string, number or null, but found " + Nt(Fr(O)) + " instead.");
            if (!Tr(G, ["string", "array"]))
              throw new $r("Expected second argument to be of type array or string, but found " + Nt(Fr(G)) + " instead.");
            return G.indexOf(O) >= 0;
          }, po.prototype.eachChild = function(M) {
            M(this.needle), M(this.haystack);
          }, po.prototype.outputDefined = function() {
            return !0;
          }, po.prototype.serialize = function() {
            return ["in", this.needle.serialize(), this.haystack.serialize()];
          };
          var To = function(M, O, G) {
            this.type = rt, this.needle = M, this.haystack = O, this.fromIndex = G;
          };
          To.parse = function(M, O) {
            if (M.length <= 2 || M.length >= 5)
              return O.error("Expected 3 or 4 arguments, but found " + (M.length - 1) + " instead.");
            var G = O.parse(M[1], 1, Se), ne = O.parse(M[2], 2, Se);
            if (!G || !ne)
              return null;
            if (!fr(G.type, [Bt, ut, rt, Pt, Se]))
              return O.error("Expected first argument to be of type boolean, string, number or null, but found " + Nt(G.type) + " instead");
            if (M.length === 4) {
              var me = O.parse(M[3], 3, rt);
              return me ? new To(G, ne, me) : null;
            }
            return new To(G, ne);
          }, To.prototype.evaluate = function(M) {
            var O = this.needle.evaluate(M), G = this.haystack.evaluate(M);
            if (!Tr(O, ["boolean", "string", "number", "null"]))
              throw new $r("Expected first argument to be of type boolean, string, number or null, but found " + Nt(Fr(O)) + " instead.");
            if (!Tr(G, ["string", "array"]))
              throw new $r("Expected second argument to be of type array or string, but found " + Nt(Fr(G)) + " instead.");
            if (this.fromIndex) {
              var ne = this.fromIndex.evaluate(M);
              return G.indexOf(O, ne);
            }
            return G.indexOf(O);
          }, To.prototype.eachChild = function(M) {
            M(this.needle), M(this.haystack), this.fromIndex && M(this.fromIndex);
          }, To.prototype.outputDefined = function() {
            return !1;
          }, To.prototype.serialize = function() {
            if (this.fromIndex != null && this.fromIndex !== void 0) {
              var M = this.fromIndex.serialize();
              return ["index-of", this.needle.serialize(), this.haystack.serialize(), M];
            }
            return ["index-of", this.needle.serialize(), this.haystack.serialize()];
          };
          var Ri = function(M, O, G, ne, me, _e) {
            this.inputType = M, this.type = O, this.input = G, this.cases = ne, this.outputs = me, this.otherwise = _e;
          };
          Ri.parse = function(M, O) {
            if (M.length < 5)
              return O.error("Expected at least 4 arguments, but found only " + (M.length - 1) + ".");
            if (M.length % 2 != 1)
              return O.error("Expected an even number of arguments.");
            var G, ne;
            O.expectedType && O.expectedType.kind !== "value" && (ne = O.expectedType);
            for (var me = {}, _e = [], Ce = 2; Ce < M.length - 1; Ce += 2) {
              var Ne = M[Ce], $e = M[Ce + 1];
              Array.isArray(Ne) || (Ne = [Ne]);
              var ct = O.concat(Ce);
              if (Ne.length === 0)
                return ct.error("Expected at least one branch label.");
              for (var dt = 0, Rt = Ne; dt < Rt.length; dt += 1) {
                var Wt = Rt[dt];
                if (typeof Wt != "number" && typeof Wt != "string")
                  return ct.error("Branch labels must be numbers or strings.");
                if (typeof Wt == "number" && Math.abs(Wt) > Number.MAX_SAFE_INTEGER)
                  return ct.error("Branch labels must be integers no larger than " + Number.MAX_SAFE_INTEGER + ".");
                if (typeof Wt == "number" && Math.floor(Wt) !== Wt)
                  return ct.error("Numeric branch labels must be integer values.");
                if (G) {
                  if (ct.checkSubtype(G, Fr(Wt)))
                    return null;
                } else
                  G = Fr(Wt);
                if (me[String(Wt)] !== void 0)
                  return ct.error("Branch labels must be unique.");
                me[String(Wt)] = _e.length;
              }
              var qt = O.parse($e, Ce, ne);
              if (!qt)
                return null;
              ne = ne || qt.type, _e.push(qt);
            }
            var ir = O.parse(M[1], 1, Se);
            if (!ir)
              return null;
            var yr = O.parse(M[M.length - 1], M.length - 1, ne);
            return yr ? ir.type.kind !== "value" && O.concat(1).checkSubtype(G, ir.type) ? null : new Ri(G, ne, ir, me, _e, yr) : null;
          }, Ri.prototype.evaluate = function(M) {
            var O = this.input.evaluate(M);
            return (Fr(O) === this.inputType && this.outputs[this.cases[O]] || this.otherwise).evaluate(M);
          }, Ri.prototype.eachChild = function(M) {
            M(this.input), this.outputs.forEach(M), M(this.otherwise);
          }, Ri.prototype.outputDefined = function() {
            return this.outputs.every(function(M) {
              return M.outputDefined();
            }) && this.otherwise.outputDefined();
          }, Ri.prototype.serialize = function() {
            for (var M = this, O = ["match", this.input.serialize()], G = [], ne = {}, me = 0, _e = Object.keys(this.cases).sort(); me < _e.length; me += 1) {
              var Ce = _e[me];
              (Rt = ne[this.cases[Ce]]) === void 0 ? (ne[this.cases[Ce]] = G.length, G.push([this.cases[Ce], [Ce]])) : G[Rt][1].push(Ce);
            }
            for (var Ne = function(qt) {
              return M.inputType.kind === "number" ? Number(qt) : qt;
            }, $e = 0, ct = G; $e < ct.length; $e += 1) {
              var dt = ct[$e], Rt = dt[0], Wt = dt[1];
              Wt.length === 1 ? O.push(Ne(Wt[0])) : O.push(Wt.map(Ne)), O.push(this.outputs[outputIndex$1].serialize());
            }
            return O.push(this.otherwise.serialize()), O;
          };
          var pi = function(M, O, G) {
            this.type = M, this.branches = O, this.otherwise = G;
          };
          pi.parse = function(M, O) {
            if (M.length < 4)
              return O.error("Expected at least 3 arguments, but found only " + (M.length - 1) + ".");
            if (M.length % 2 != 0)
              return O.error("Expected an odd number of arguments.");
            var G;
            O.expectedType && O.expectedType.kind !== "value" && (G = O.expectedType);
            for (var ne = [], me = 1; me < M.length - 1; me += 2) {
              var _e = O.parse(M[me], me, Bt);
              if (!_e)
                return null;
              var Ce = O.parse(M[me + 1], me + 1, G);
              if (!Ce)
                return null;
              ne.push([_e, Ce]), G = G || Ce.type;
            }
            var Ne = O.parse(M[M.length - 1], M.length - 1, G);
            return Ne ? new pi(G, ne, Ne) : null;
          }, pi.prototype.evaluate = function(M) {
            for (var O = 0, G = this.branches; O < G.length; O += 1) {
              var ne = G[O], me = ne[0], _e = ne[1];
              if (me.evaluate(M))
                return _e.evaluate(M);
            }
            return this.otherwise.evaluate(M);
          }, pi.prototype.eachChild = function(M) {
            for (var O = 0, G = this.branches; O < G.length; O += 1) {
              var ne = G[O], me = ne[0], _e = ne[1];
              M(me), M(_e);
            }
            M(this.otherwise);
          }, pi.prototype.outputDefined = function() {
            return this.branches.every(function(M) {
              return M[0], M[1].outputDefined();
            }) && this.otherwise.outputDefined();
          }, pi.prototype.serialize = function() {
            var M = ["case"];
            return this.eachChild(function(O) {
              M.push(O.serialize());
            }), M;
          };
          var Yi = function(M, O, G, ne) {
            this.type = M, this.input = O, this.beginIndex = G, this.endIndex = ne;
          };
          function ds(M, O) {
            return M === "==" || M === "!=" ? O.kind === "boolean" || O.kind === "string" || O.kind === "number" || O.kind === "null" || O.kind === "value" : O.kind === "string" || O.kind === "number" || O.kind === "value";
          }
          function ys(M, O, G, ne) {
            return ne.compare(O, G) === 0;
          }
          function Wa(M, O, G) {
            var ne = M !== "==" && M !== "!=";
            return function() {
              function me(_e, Ce, Ne) {
                this.type = Bt, this.lhs = _e, this.rhs = Ce, this.collator = Ne, this.hasUntypedArgument = _e.type.kind === "value" || Ce.type.kind === "value";
              }
              return me.parse = function(_e, Ce) {
                if (_e.length !== 3 && _e.length !== 4)
                  return Ce.error("Expected two or three arguments.");
                var Ne = _e[0], $e = Ce.parse(_e[1], 1, Se);
                if (!$e)
                  return null;
                if (!ds(Ne, $e.type))
                  return Ce.concat(1).error('"' + Ne + `" comparisons are not supported for type '` + Nt($e.type) + "'.");
                var ct = Ce.parse(_e[2], 2, Se);
                if (!ct)
                  return null;
                if (!ds(Ne, ct.type))
                  return Ce.concat(2).error('"' + Ne + `" comparisons are not supported for type '` + Nt(ct.type) + "'.");
                if ($e.type.kind !== ct.type.kind && $e.type.kind !== "value" && ct.type.kind !== "value")
                  return Ce.error("Cannot compare types '" + Nt($e.type) + "' and '" + Nt(ct.type) + "'.");
                ne && ($e.type.kind === "value" && ct.type.kind !== "value" ? $e = new rn(ct.type, [$e]) : $e.type.kind !== "value" && ct.type.kind === "value" && (ct = new rn($e.type, [ct])));
                var dt = null;
                if (_e.length === 4) {
                  if ($e.type.kind !== "string" && ct.type.kind !== "string" && $e.type.kind !== "value" && ct.type.kind !== "value")
                    return Ce.error("Cannot use collator to compare non-string types.");
                  if (!(dt = Ce.parse(_e[3], 3, We)))
                    return null;
                }
                return new me($e, ct, dt);
              }, me.prototype.evaluate = function(_e) {
                var Ce = this.lhs.evaluate(_e), Ne = this.rhs.evaluate(_e);
                if (ne && this.hasUntypedArgument) {
                  var $e = Fr(Ce), ct = Fr(Ne);
                  if ($e.kind !== ct.kind || $e.kind !== "string" && $e.kind !== "number")
                    throw new $r('Expected arguments for "' + M + '" to be (string, string) or (number, number), but found (' + $e.kind + ", " + ct.kind + ") instead.");
                }
                if (this.collator && !ne && this.hasUntypedArgument) {
                  var dt = Fr(Ce), Rt = Fr(Ne);
                  if (dt.kind !== "string" || Rt.kind !== "string")
                    return O(_e, Ce, Ne);
                }
                return this.collator ? G(_e, Ce, Ne, this.collator.evaluate(_e)) : O(_e, Ce, Ne);
              }, me.prototype.eachChild = function(_e) {
                _e(this.lhs), _e(this.rhs), this.collator && _e(this.collator);
              }, me.prototype.outputDefined = function() {
                return !0;
              }, me.prototype.serialize = function() {
                var _e = [M];
                return this.eachChild(function(Ce) {
                  _e.push(Ce.serialize());
                }), _e;
              }, me;
            }();
          }
          Yi.parse = function(M, O) {
            if (M.length <= 2 || M.length >= 5)
              return O.error("Expected 3 or 4 arguments, but found " + (M.length - 1) + " instead.");
            var G = O.parse(M[1], 1, Se), ne = O.parse(M[2], 2, rt);
            if (!G || !ne)
              return null;
            if (!fr(G.type, [Mt(Se), ut, Se]))
              return O.error("Expected first argument to be of type array or string, but found " + Nt(G.type) + " instead");
            if (M.length === 4) {
              var me = O.parse(M[3], 3, rt);
              return me ? new Yi(G.type, G, ne, me) : null;
            }
            return new Yi(G.type, G, ne);
          }, Yi.prototype.evaluate = function(M) {
            var O = this.input.evaluate(M), G = this.beginIndex.evaluate(M);
            if (!Tr(O, ["string", "array"]))
              throw new $r("Expected first argument to be of type array or string, but found " + Nt(Fr(O)) + " instead.");
            if (this.endIndex) {
              var ne = this.endIndex.evaluate(M);
              return O.slice(G, ne);
            }
            return O.slice(G);
          }, Yi.prototype.eachChild = function(M) {
            M(this.input), M(this.beginIndex), this.endIndex && M(this.endIndex);
          }, Yi.prototype.outputDefined = function() {
            return !1;
          }, Yi.prototype.serialize = function() {
            if (this.endIndex != null && this.endIndex !== void 0) {
              var M = this.endIndex.serialize();
              return ["slice", this.input.serialize(), this.beginIndex.serialize(), M];
            }
            return ["slice", this.input.serialize(), this.beginIndex.serialize()];
          };
          var ls = Wa("==", function(M, O, G) {
            return O === G;
          }, ys), Xo = Wa("!=", function(M, O, G) {
            return O !== G;
          }, function(M, O, G, ne) {
            return !ys(0, O, G, ne);
          }), xs = Wa("<", function(M, O, G) {
            return O < G;
          }, function(M, O, G, ne) {
            return ne.compare(O, G) < 0;
          }), bs = Wa(">", function(M, O, G) {
            return O > G;
          }, function(M, O, G, ne) {
            return ne.compare(O, G) > 0;
          }), ms = Wa("<=", function(M, O, G) {
            return O <= G;
          }, function(M, O, G, ne) {
            return ne.compare(O, G) <= 0;
          }), _s = Wa(">=", function(M, O, G) {
            return O >= G;
          }, function(M, O, G, ne) {
            return ne.compare(O, G) >= 0;
          }), Ao = function(M, O, G, ne, me) {
            this.type = ut, this.number = M, this.locale = O, this.currency = G, this.minFractionDigits = ne, this.maxFractionDigits = me;
          };
          Ao.parse = function(M, O) {
            if (M.length !== 3)
              return O.error("Expected two arguments.");
            var G = O.parse(M[1], 1, rt);
            if (!G)
              return null;
            var ne = M[2];
            if (typeof ne != "object" || Array.isArray(ne))
              return O.error("NumberFormat options argument must be an object.");
            var me = null;
            if (ne.locale && !(me = O.parse(ne.locale, 1, ut)))
              return null;
            var _e = null;
            if (ne.currency && !(_e = O.parse(ne.currency, 1, ut)))
              return null;
            var Ce = null;
            if (ne["min-fraction-digits"] && !(Ce = O.parse(ne["min-fraction-digits"], 1, rt)))
              return null;
            var Ne = null;
            return ne["max-fraction-digits"] && !(Ne = O.parse(ne["max-fraction-digits"], 1, rt)) ? null : new Ao(G, me, _e, Ce, Ne);
          }, Ao.prototype.evaluate = function(M) {
            return new Intl.NumberFormat(this.locale ? this.locale.evaluate(M) : [], { style: this.currency ? "currency" : "decimal", currency: this.currency ? this.currency.evaluate(M) : void 0, minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(M) : void 0, maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(M) : void 0 }).format(this.number.evaluate(M));
          }, Ao.prototype.eachChild = function(M) {
            M(this.number), this.locale && M(this.locale), this.currency && M(this.currency), this.minFractionDigits && M(this.minFractionDigits), this.maxFractionDigits && M(this.maxFractionDigits);
          }, Ao.prototype.outputDefined = function() {
            return !1;
          }, Ao.prototype.serialize = function() {
            var M = {};
            return this.locale && (M.locale = this.locale.serialize()), this.currency && (M.currency = this.currency.serialize()), this.minFractionDigits && (M["min-fraction-digits"] = this.minFractionDigits.serialize()), this.maxFractionDigits && (M["max-fraction-digits"] = this.maxFractionDigits.serialize()), ["number-format", this.number.serialize(), M];
          };
          var So = function(M) {
            this.type = rt, this.input = M;
          };
          So.parse = function(M, O) {
            if (M.length !== 2)
              return O.error("Expected 1 argument, but found " + (M.length - 1) + " instead.");
            var G = O.parse(M[1], 1);
            return G ? G.type.kind !== "array" && G.type.kind !== "string" && G.type.kind !== "value" ? O.error("Expected argument of type string or array, but found " + Nt(G.type) + " instead.") : new So(G) : null;
          }, So.prototype.evaluate = function(M) {
            var O = this.input.evaluate(M);
            if (typeof O == "string" || Array.isArray(O))
              return O.length;
            throw new $r("Expected value to be of type string or array, but found " + Nt(Fr(O)) + " instead.");
          }, So.prototype.eachChild = function(M) {
            M(this.input);
          }, So.prototype.outputDefined = function() {
            return !1;
          }, So.prototype.serialize = function() {
            var M = ["length"];
            return this.eachChild(function(O) {
              M.push(O.serialize());
            }), M;
          };
          var Bo = { "==": ls, "!=": Xo, ">": bs, "<": xs, ">=": _s, "<=": ms, array: rn, at: Xi, boolean: rn, case: pi, coalesce: ho, collator: cn, format: vn, image: xn, in: po, "index-of": To, interpolate: Fa, "interpolate-hcl": Fa, "interpolate-lab": Fa, length: So, let: bi, literal: un, match: Ri, number: rn, "number-format": Ao, object: rn, slice: Yi, step: bn, string: rn, "to-boolean": Br, "to-color": Br, "to-number": Br, "to-string": Br, var: Kr, within: wr };
          function No(M, O) {
            var G = O[0], ne = O[1], me = O[2], _e = O[3];
            G = G.evaluate(M), ne = ne.evaluate(M), me = me.evaluate(M);
            var Ce = _e ? _e.evaluate(M) : 1, Ne = Mr(G, ne, me, Ce);
            if (Ne)
              throw new $r(Ne);
            return new Kt(G / 255 * Ce, ne / 255 * Ce, me / 255 * Ce, Ce);
          }
          function jo(M, O) {
            return M in O;
          }
          function Jo(M, O) {
            var G = O[M];
            return G === void 0 ? null : G;
          }
          function mo(M) {
            return { type: M };
          }
          function cs(M) {
            return { result: "success", value: M };
          }
          function co(M) {
            return { result: "error", value: M };
          }
          function Uo(M) {
            return M["property-type"] === "data-driven" || M["property-type"] === "cross-faded-data-driven";
          }
          function us(M) {
            return !!M.expression && M.expression.parameters.indexOf("zoom") > -1;
          }
          function Eo(M) {
            return !!M.expression && M.expression.interpolated;
          }
          function Ha(M) {
            return M instanceof Number ? "number" : M instanceof String ? "string" : M instanceof Boolean ? "boolean" : Array.isArray(M) ? "array" : M === null ? "null" : typeof M;
          }
          function je(M) {
            return typeof M == "object" && M !== null && !Array.isArray(M);
          }
          function Ye(M) {
            return M;
          }
          function et(M, O, G) {
            return M !== void 0 ? M : O !== void 0 ? O : G !== void 0 ? G : void 0;
          }
          function lt(M, O, G, ne, me) {
            return et(typeof G === me ? ne[G] : void 0, M.default, O.default);
          }
          function gt(M, O, G) {
            if (Ha(G) !== "number")
              return et(M.default, O.default);
            var ne = M.stops.length;
            if (ne === 1 || G <= M.stops[0][0])
              return M.stops[0][1];
            if (G >= M.stops[ne - 1][0])
              return M.stops[ne - 1][1];
            var me = gn(M.stops.map(function(_e) {
              return _e[0];
            }), G);
            return M.stops[me][1];
          }
          function pt(M, O, G) {
            var ne = M.base !== void 0 ? M.base : 1;
            if (Ha(G) !== "number")
              return et(M.default, O.default);
            var me = M.stops.length;
            if (me === 1 || G <= M.stops[0][0])
              return M.stops[0][1];
            if (G >= M.stops[me - 1][0])
              return M.stops[me - 1][1];
            var _e = gn(M.stops.map(function(Rt) {
              return Rt[0];
            }), G), Ce = function(Rt, Wt, qt, ir) {
              var yr = ir - qt, Cr = Rt - qt;
              return yr === 0 ? 0 : Wt === 1 ? Cr / yr : (Math.pow(Wt, Cr) - 1) / (Math.pow(Wt, yr) - 1);
            }(G, ne, M.stops[_e][0], M.stops[_e + 1][0]), Ne = M.stops[_e][1], $e = M.stops[_e + 1][1], ct = Ln[O.type] || Ye;
            if (M.colorSpace && M.colorSpace !== "rgb") {
              var dt = Zi[M.colorSpace];
              ct = function(Rt, Wt) {
                return dt.reverse(dt.interpolate(dt.forward(Rt), dt.forward(Wt), Ce));
              };
            }
            return typeof Ne.evaluate == "function" ? { evaluate: function() {
              for (var Rt = [], Wt = arguments.length; Wt--; )
                Rt[Wt] = arguments[Wt];
              var qt = Ne.evaluate.apply(void 0, Rt), ir = $e.evaluate.apply(void 0, Rt);
              if (qt !== void 0 && ir !== void 0)
                return ct(qt, ir, Ce);
            } } : ct(Ne, $e, Ce);
          }
          function St(M, O, G) {
            return O.type === "color" ? G = Kt.parse(G) : O.type === "formatted" ? G = cr.fromString(G.toString()) : O.type === "resolvedImage" ? G = gr.fromString(G.toString()) : Ha(G) === O.type || O.type === "enum" && O.values[G] || (G = void 0), et(G, M.default, O.default);
          }
          Qr.register(Bo, { error: [{ kind: "error" }, [ut], function(M, O) {
            var G = O[0];
            throw new $r(G.evaluate(M));
          }], typeof: [ut, [Se], function(M, O) {
            return Nt(Fr(O[0].evaluate(M)));
          }], "to-rgba": [Mt(rt, 4), [wt], function(M, O) {
            return O[0].evaluate(M).toArray();
          }], rgb: [wt, [rt, rt, rt], No], rgba: [wt, [rt, rt, rt, rt], No], has: { type: Bt, overloads: [[[ut], function(M, O) {
            return jo(O[0].evaluate(M), M.properties());
          }], [[ut, Lt], function(M, O) {
            var G = O[0], ne = O[1];
            return jo(G.evaluate(M), ne.evaluate(M));
          }]] }, get: { type: Se, overloads: [[[ut], function(M, O) {
            return Jo(O[0].evaluate(M), M.properties());
          }], [[ut, Lt], function(M, O) {
            var G = O[0], ne = O[1];
            return Jo(G.evaluate(M), ne.evaluate(M));
          }]] }, "feature-state": [Se, [ut], function(M, O) {
            return Jo(O[0].evaluate(M), M.featureState || {});
          }], properties: [Lt, [], function(M) {
            return M.properties();
          }], "geometry-type": [ut, [], function(M) {
            return M.geometryType();
          }], id: [Se, [], function(M) {
            return M.id();
          }], zoom: [rt, [], function(M) {
            return M.globals.zoom;
          }], "heatmap-density": [rt, [], function(M) {
            return M.globals.heatmapDensity || 0;
          }], "line-progress": [rt, [], function(M) {
            return M.globals.lineProgress || 0;
          }], accumulated: [Se, [], function(M) {
            return M.globals.accumulated === void 0 ? null : M.globals.accumulated;
          }], "+": [rt, mo(rt), function(M, O) {
            for (var G = 0, ne = 0, me = O; ne < me.length; ne += 1)
              G += me[ne].evaluate(M);
            return G;
          }], "*": [rt, mo(rt), function(M, O) {
            for (var G = 1, ne = 0, me = O; ne < me.length; ne += 1)
              G *= me[ne].evaluate(M);
            return G;
          }], "-": { type: rt, overloads: [[[rt, rt], function(M, O) {
            var G = O[0], ne = O[1];
            return G.evaluate(M) - ne.evaluate(M);
          }], [[rt], function(M, O) {
            return -O[0].evaluate(M);
          }]] }, "/": [rt, [rt, rt], function(M, O) {
            var G = O[0], ne = O[1];
            return G.evaluate(M) / ne.evaluate(M);
          }], "%": [rt, [rt, rt], function(M, O) {
            var G = O[0], ne = O[1];
            return G.evaluate(M) % ne.evaluate(M);
          }], ln2: [rt, [], function() {
            return Math.LN2;
          }], pi: [rt, [], function() {
            return Math.PI;
          }], e: [rt, [], function() {
            return Math.E;
          }], "^": [rt, [rt, rt], function(M, O) {
            var G = O[0], ne = O[1];
            return Math.pow(G.evaluate(M), ne.evaluate(M));
          }], sqrt: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.sqrt(G.evaluate(M));
          }], log10: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.log(G.evaluate(M)) / Math.LN10;
          }], ln: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.log(G.evaluate(M));
          }], log2: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.log(G.evaluate(M)) / Math.LN2;
          }], sin: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.sin(G.evaluate(M));
          }], cos: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.cos(G.evaluate(M));
          }], tan: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.tan(G.evaluate(M));
          }], asin: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.asin(G.evaluate(M));
          }], acos: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.acos(G.evaluate(M));
          }], atan: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.atan(G.evaluate(M));
          }], min: [rt, mo(rt), function(M, O) {
            return Math.min.apply(Math, O.map(function(G) {
              return G.evaluate(M);
            }));
          }], max: [rt, mo(rt), function(M, O) {
            return Math.max.apply(Math, O.map(function(G) {
              return G.evaluate(M);
            }));
          }], abs: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.abs(G.evaluate(M));
          }], round: [rt, [rt], function(M, O) {
            var G = O[0].evaluate(M);
            return G < 0 ? -Math.round(-G) : Math.round(G);
          }], floor: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.floor(G.evaluate(M));
          }], ceil: [rt, [rt], function(M, O) {
            var G = O[0];
            return Math.ceil(G.evaluate(M));
          }], "filter-==": [Bt, [ut, Se], function(M, O) {
            var G = O[0], ne = O[1];
            return M.properties()[G.value] === ne.value;
          }], "filter-id-==": [Bt, [Se], function(M, O) {
            var G = O[0];
            return M.id() === G.value;
          }], "filter-type-==": [Bt, [ut], function(M, O) {
            var G = O[0];
            return M.geometryType() === G.value;
          }], "filter-<": [Bt, [ut, Se], function(M, O) {
            var G = O[0], ne = O[1], me = M.properties()[G.value], _e = ne.value;
            return typeof me == typeof _e && me < _e;
          }], "filter-id-<": [Bt, [Se], function(M, O) {
            var G = O[0], ne = M.id(), me = G.value;
            return typeof ne == typeof me && ne < me;
          }], "filter->": [Bt, [ut, Se], function(M, O) {
            var G = O[0], ne = O[1], me = M.properties()[G.value], _e = ne.value;
            return typeof me == typeof _e && me > _e;
          }], "filter-id->": [Bt, [Se], function(M, O) {
            var G = O[0], ne = M.id(), me = G.value;
            return typeof ne == typeof me && ne > me;
          }], "filter-<=": [Bt, [ut, Se], function(M, O) {
            var G = O[0], ne = O[1], me = M.properties()[G.value], _e = ne.value;
            return typeof me == typeof _e && me <= _e;
          }], "filter-id-<=": [Bt, [Se], function(M, O) {
            var G = O[0], ne = M.id(), me = G.value;
            return typeof ne == typeof me && ne <= me;
          }], "filter->=": [Bt, [ut, Se], function(M, O) {
            var G = O[0], ne = O[1], me = M.properties()[G.value], _e = ne.value;
            return typeof me == typeof _e && me >= _e;
          }], "filter-id->=": [Bt, [Se], function(M, O) {
            var G = O[0], ne = M.id(), me = G.value;
            return typeof ne == typeof me && ne >= me;
          }], "filter-has": [Bt, [Se], function(M, O) {
            return O[0].value in M.properties();
          }], "filter-has-id": [Bt, [], function(M) {
            return M.id() !== null && M.id() !== void 0;
          }], "filter-type-in": [Bt, [Mt(ut)], function(M, O) {
            return O[0].value.indexOf(M.geometryType()) >= 0;
          }], "filter-id-in": [Bt, [Mt(Se)], function(M, O) {
            return O[0].value.indexOf(M.id()) >= 0;
          }], "filter-in-small": [Bt, [ut, Mt(Se)], function(M, O) {
            var G = O[0];
            return O[1].value.indexOf(M.properties()[G.value]) >= 0;
          }], "filter-in-large": [Bt, [ut, Mt(Se)], function(M, O) {
            var G = O[0], ne = O[1];
            return function(me, _e, Ce, Ne) {
              for (; Ce <= Ne; ) {
                var $e = Ce + Ne >> 1;
                if (_e[$e] === me)
                  return !0;
                _e[$e] > me ? Ne = $e - 1 : Ce = $e + 1;
              }
              return !1;
            }(M.properties()[G.value], ne.value, 0, ne.value.length - 1);
          }], all: { type: Bt, overloads: [[[Bt, Bt], function(M, O) {
            var G = O[0], ne = O[1];
            return G.evaluate(M) && ne.evaluate(M);
          }], [mo(Bt), function(M, O) {
            for (var G = 0, ne = O; G < ne.length; G += 1)
              if (!ne[G].evaluate(M))
                return !1;
            return !0;
          }]] }, any: { type: Bt, overloads: [[[Bt, Bt], function(M, O) {
            var G = O[0], ne = O[1];
            return G.evaluate(M) || ne.evaluate(M);
          }], [mo(Bt), function(M, O) {
            for (var G = 0, ne = O; G < ne.length; G += 1)
              if (ne[G].evaluate(M))
                return !0;
            return !1;
          }]] }, "!": [Bt, [Bt], function(M, O) {
            return !O[0].evaluate(M);
          }], "is-supported-script": [Bt, [ut], function(M, O) {
            var G = O[0], ne = M.globals && M.globals.isSupportedScript;
            return !ne || ne(G.evaluate(M));
          }], upcase: [ut, [ut], function(M, O) {
            return O[0].evaluate(M).toUpperCase();
          }], downcase: [ut, [ut], function(M, O) {
            return O[0].evaluate(M).toLowerCase();
          }], concat: [ut, mo(Se), function(M, O) {
            return O.map(function(G) {
              return Gr(G.evaluate(M));
            }).join("");
          }], "resolved-locale": [ut, [We], function(M, O) {
            return O[0].evaluate(M).resolvedLocale();
          }] });
          var Jt = function(M, O) {
            this.expression = M, this._warningHistory = {}, this._evaluator = new mn(), this._defaultValue = O ? function(G) {
              return G.type === "color" && je(G.default) ? new Kt(0, 0, 0, 0) : G.type === "color" ? Kt.parse(G.default) || null : G.default === void 0 ? null : G.default;
            }(O) : null, this._enumValues = O && O.type === "enum" ? O.values : null;
          };
          function Qt(M) {
            return Array.isArray(M) && M.length > 0 && typeof M[0] == "string" && M[0] in Bo;
          }
          function Yt(M, O) {
            var G = new en(Bo, [], O ? function(me) {
              var _e = { color: wt, string: ut, number: rt, enum: ut, boolean: Bt, formatted: nt, resolvedImage: ft };
              return me.type === "array" ? Mt(_e[me.value] || Se, me.length) : _e[me.type];
            }(O) : void 0), ne = G.parse(M, void 0, void 0, void 0, O && O.type === "string" ? { typeAnnotation: "coerce" } : void 0);
            return ne ? cs(new Jt(ne, O)) : co(G.errors);
          }
          Jt.prototype.evaluateWithoutErrorHandling = function(M, O, G, ne, me, _e) {
            return this._evaluator.globals = M, this._evaluator.feature = O, this._evaluator.featureState = G, this._evaluator.canonical = ne, this._evaluator.availableImages = me || null, this._evaluator.formattedSection = _e, this.expression.evaluate(this._evaluator);
          }, Jt.prototype.evaluate = function(M, O, G, ne, me, _e) {
            this._evaluator.globals = M, this._evaluator.feature = O || null, this._evaluator.featureState = G || null, this._evaluator.canonical = ne, this._evaluator.availableImages = me || null, this._evaluator.formattedSection = _e || null;
            try {
              var Ce = this.expression.evaluate(this._evaluator);
              if (Ce == null || typeof Ce == "number" && Ce != Ce)
                return this._defaultValue;
              if (this._enumValues && !(Ce in this._enumValues))
                throw new $r("Expected value to be one of " + Object.keys(this._enumValues).map(function(Ne) {
                  return JSON.stringify(Ne);
                }).join(", ") + ", but found " + JSON.stringify(Ce) + " instead.");
              return Ce;
            } catch (Ne) {
              return this._warningHistory[Ne.message] || (this._warningHistory[Ne.message] = !0, typeof console < "u" && console.warn(Ne.message)), this._defaultValue;
            }
          };
          var ar = function(M, O) {
            this.kind = M, this._styleExpression = O, this.isStateDependent = M !== "constant" && !Hr(O.expression);
          };
          ar.prototype.evaluateWithoutErrorHandling = function(M, O, G, ne, me, _e) {
            return this._styleExpression.evaluateWithoutErrorHandling(M, O, G, ne, me, _e);
          }, ar.prototype.evaluate = function(M, O, G, ne, me, _e) {
            return this._styleExpression.evaluate(M, O, G, ne, me, _e);
          };
          var pr = function(M, O, G, ne) {
            this.kind = M, this.zoomStops = G, this._styleExpression = O, this.isStateDependent = M !== "camera" && !Hr(O.expression), this.interpolationType = ne;
          };
          function br(M, O) {
            if ((M = Yt(M, O)).result === "error")
              return M;
            var G = M.value.expression, ne = Er(G);
            if (!ne && !Uo(O))
              return co([new it("", "data expressions not supported")]);
            var me = Vr(G, ["zoom"]);
            if (!me && !us(O))
              return co([new it("", "zoom expressions not supported")]);
            var _e = function Ne($e) {
              var ct = null;
              if ($e instanceof bi)
                ct = Ne($e.result);
              else if ($e instanceof ho)
                for (var dt = 0, Rt = $e.args; dt < Rt.length; dt += 1) {
                  var Wt = Rt[dt];
                  if (ct = Ne(Wt))
                    break;
                }
              else
                ($e instanceof bn || $e instanceof Fa) && $e.input instanceof Qr && $e.input.name === "zoom" && (ct = $e);
              return ct instanceof it || $e.eachChild(function(qt) {
                var ir = Ne(qt);
                ir instanceof it ? ct = ir : !ct && ir ? ct = new it("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : ct && ir && ct !== ir && (ct = new it("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
              }), ct;
            }(G);
            if (!_e && !me)
              return co([new it("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
            if (_e instanceof it)
              return co([_e]);
            if (_e instanceof Fa && !Eo(O))
              return co([new it("", '"interpolate" expressions cannot be used with this property')]);
            if (!_e)
              return cs(new ar(ne ? "constant" : "source", M.value));
            var Ce = _e instanceof Fa ? _e.interpolation : void 0;
            return cs(new pr(ne ? "camera" : "composite", M.value, _e.labels, Ce));
          }
          pr.prototype.evaluateWithoutErrorHandling = function(M, O, G, ne, me, _e) {
            return this._styleExpression.evaluateWithoutErrorHandling(M, O, G, ne, me, _e);
          }, pr.prototype.evaluate = function(M, O, G, ne, me, _e) {
            return this._styleExpression.evaluate(M, O, G, ne, me, _e);
          }, pr.prototype.interpolationFactor = function(M, O, G) {
            return this.interpolationType ? Fa.interpolationFactor(this.interpolationType, M, O, G) : 0;
          };
          var _r = function(M, O) {
            this._parameters = M, this._specification = O, Xe(this, function G(ne, me) {
              var _e, Ce, Ne, $e = me.type === "color", ct = ne.stops && typeof ne.stops[0][0] == "object", dt = ct || ne.property !== void 0, Rt = ct || !dt, Wt = ne.type || (Eo(me) ? "exponential" : "interval");
              if ($e && ((ne = Xe({}, ne)).stops && (ne.stops = ne.stops.map(function(sa) {
                return [sa[0], Kt.parse(sa[1])];
              })), ne.default ? ne.default = Kt.parse(ne.default) : ne.default = Kt.parse(me.default)), ne.colorSpace && ne.colorSpace !== "rgb" && !Zi[ne.colorSpace])
                throw new Error("Unknown color space: " + ne.colorSpace);
              if (Wt === "exponential")
                _e = pt;
              else if (Wt === "interval")
                _e = gt;
              else if (Wt === "categorical") {
                _e = lt, Ce = /* @__PURE__ */ Object.create(null);
                for (var qt = 0, ir = ne.stops; qt < ir.length; qt += 1) {
                  var yr = ir[qt];
                  Ce[yr[0]] = yr[1];
                }
                Ne = typeof ne.stops[0][0];
              } else {
                if (Wt !== "identity")
                  throw new Error('Unknown function type "' + Wt + '"');
                _e = St;
              }
              if (ct) {
                for (var Cr = {}, Lr = [], jr = 0; jr < ne.stops.length; jr++) {
                  var Ur = ne.stops[jr], Yr = Ur[0].zoom;
                  Cr[Yr] === void 0 && (Cr[Yr] = { zoom: Yr, type: ne.type, property: ne.property, default: ne.default, stops: [] }, Lr.push(Yr)), Cr[Yr].stops.push([Ur[0].value, Ur[1]]);
                }
                for (var fn = [], yn = 0, Bn = Lr; yn < Bn.length; yn += 1) {
                  var Fn = Bn[yn];
                  fn.push([Cr[Fn].zoom, G(Cr[Fn], me)]);
                }
                var Gn = { name: "linear" };
                return { kind: "composite", interpolationType: Gn, interpolationFactor: Fa.interpolationFactor.bind(void 0, Gn), zoomStops: fn.map(function(sa) {
                  return sa[0];
                }), evaluate: function(sa, Jn) {
                  var pa = sa.zoom;
                  return pt({ stops: fn, base: ne.base }, me, pa).evaluate(pa, Jn);
                } };
              }
              if (Rt) {
                var oa = Wt === "exponential" ? { name: "exponential", base: ne.base !== void 0 ? ne.base : 1 } : null;
                return { kind: "camera", interpolationType: oa, interpolationFactor: Fa.interpolationFactor.bind(void 0, oa), zoomStops: ne.stops.map(function(sa) {
                  return sa[0];
                }), evaluate: function(sa) {
                  var Jn = sa.zoom;
                  return _e(ne, me, Jn, Ce, Ne);
                } };
              }
              return { kind: "source", evaluate: function(sa, Jn) {
                var pa = Jn && Jn.properties ? Jn.properties[ne.property] : void 0;
                return pa === void 0 ? et(ne.default, me.default) : _e(ne, me, pa, Ce, Ne);
              } };
            }(this._parameters, this._specification));
          };
          function zr(M) {
            var O = M.key, G = M.value, ne = M.valueSpec || {}, me = M.objectElementValidators || {}, _e = M.style, Ce = M.styleSpec, Ne = [], $e = Ha(G);
            if ($e !== "object")
              return [new Re(O, G, "object expected, " + $e + " found")];
            for (var ct in G) {
              var dt = ct.split(".")[0], Rt = ne[dt] || ne["*"], Wt = void 0;
              if (me[dt])
                Wt = me[dt];
              else if (ne[dt])
                Wt = sr;
              else if (me["*"])
                Wt = me["*"];
              else {
                if (!ne["*"]) {
                  Ne.push(new Re(O, G[ct], 'unknown property "' + ct + '"'));
                  continue;
                }
                Wt = sr;
              }
              Ne = Ne.concat(Wt({ key: (O && O + ".") + ct, value: G[ct], valueSpec: Rt, style: _e, styleSpec: Ce, object: G, objectKey: ct }, G));
            }
            for (var qt in ne)
              me[qt] || ne[qt].required && ne[qt].default === void 0 && G[qt] === void 0 && Ne.push(new Re(O, G, 'missing required property "' + qt + '"'));
            return Ne;
          }
          function nn(M) {
            var O = M.value, G = M.valueSpec, ne = M.style, me = M.styleSpec, _e = M.key, Ce = M.arrayElementValidator || sr;
            if (Ha(O) !== "array")
              return [new Re(_e, O, "array expected, " + Ha(O) + " found")];
            if (G.length && O.length !== G.length)
              return [new Re(_e, O, "array length " + G.length + " expected, length " + O.length + " found")];
            if (G["min-length"] && O.length < G["min-length"])
              return [new Re(_e, O, "array length at least " + G["min-length"] + " expected, length " + O.length + " found")];
            var Ne = { type: G.value, values: G.values };
            me.$version < 7 && (Ne.function = G.function), Ha(G.value) === "object" && (Ne = G.value);
            for (var $e = [], ct = 0; ct < O.length; ct++)
              $e = $e.concat(Ce({ array: O, arrayIndex: ct, value: O[ct], valueSpec: Ne, style: ne, styleSpec: me, key: _e + "[" + ct + "]" }));
            return $e;
          }
          function pn(M) {
            var O = M.key, G = M.value, ne = M.valueSpec, me = Ha(G);
            return me === "number" && G != G && (me = "NaN"), me !== "number" ? [new Re(O, G, "number expected, " + me + " found")] : "minimum" in ne && G < ne.minimum ? [new Re(O, G, G + " is less than the minimum value " + ne.minimum)] : "maximum" in ne && G > ne.maximum ? [new Re(O, G, G + " is greater than the maximum value " + ne.maximum)] : [];
          }
          function Cn(M) {
            var O, G, ne, me = M.valueSpec, _e = qe(M.value.type), Ce = {}, Ne = _e !== "categorical" && M.value.property === void 0, $e = !Ne, ct = Ha(M.value.stops) === "array" && Ha(M.value.stops[0]) === "array" && Ha(M.value.stops[0][0]) === "object", dt = zr({ key: M.key, value: M.value, valueSpec: M.styleSpec.function, style: M.style, styleSpec: M.styleSpec, objectElementValidators: { stops: function(qt) {
              if (_e === "identity")
                return [new Re(qt.key, qt.value, 'identity function may not have a "stops" property')];
              var ir = [], yr = qt.value;
              return ir = ir.concat(nn({ key: qt.key, value: yr, valueSpec: qt.valueSpec, style: qt.style, styleSpec: qt.styleSpec, arrayElementValidator: Rt })), Ha(yr) === "array" && yr.length === 0 && ir.push(new Re(qt.key, yr, "array must have at least one stop")), ir;
            }, default: function(qt) {
              return sr({ key: qt.key, value: qt.value, valueSpec: me, style: qt.style, styleSpec: qt.styleSpec });
            } } });
            return _e === "identity" && Ne && dt.push(new Re(M.key, M.value, 'missing required property "property"')), _e === "identity" || M.value.stops || dt.push(new Re(M.key, M.value, 'missing required property "stops"')), _e === "exponential" && M.valueSpec.expression && !Eo(M.valueSpec) && dt.push(new Re(M.key, M.value, "exponential functions not supported")), M.styleSpec.$version >= 8 && ($e && !Uo(M.valueSpec) ? dt.push(new Re(M.key, M.value, "property functions not supported")) : Ne && !us(M.valueSpec) && dt.push(new Re(M.key, M.value, "zoom functions not supported"))), _e !== "categorical" && !ct || M.value.property !== void 0 || dt.push(new Re(M.key, M.value, '"property" property is required')), dt;
            function Rt(qt) {
              var ir = [], yr = qt.value, Cr = qt.key;
              if (Ha(yr) !== "array")
                return [new Re(Cr, yr, "array expected, " + Ha(yr) + " found")];
              if (yr.length !== 2)
                return [new Re(Cr, yr, "array length 2 expected, length " + yr.length + " found")];
              if (ct) {
                if (Ha(yr[0]) !== "object")
                  return [new Re(Cr, yr, "object expected, " + Ha(yr[0]) + " found")];
                if (yr[0].zoom === void 0)
                  return [new Re(Cr, yr, "object stop key must have zoom")];
                if (yr[0].value === void 0)
                  return [new Re(Cr, yr, "object stop key must have value")];
                if (ne && ne > qe(yr[0].zoom))
                  return [new Re(Cr, yr[0].zoom, "stop zoom values must appear in ascending order")];
                qe(yr[0].zoom) !== ne && (ne = qe(yr[0].zoom), G = void 0, Ce = {}), ir = ir.concat(zr({ key: Cr + "[0]", value: yr[0], valueSpec: { zoom: {} }, style: qt.style, styleSpec: qt.styleSpec, objectElementValidators: { zoom: pn, value: Wt } }));
              } else
                ir = ir.concat(Wt({ key: Cr + "[0]", value: yr[0], valueSpec: {}, style: qt.style, styleSpec: qt.styleSpec }, yr));
              return Qt(st(yr[1])) ? ir.concat([new Re(Cr + "[1]", yr[1], "expressions are not allowed in function stops.")]) : ir.concat(sr({ key: Cr + "[1]", value: yr[1], valueSpec: me, style: qt.style, styleSpec: qt.styleSpec }));
            }
            function Wt(qt, ir) {
              var yr = Ha(qt.value), Cr = qe(qt.value), Lr = qt.value !== null ? qt.value : ir;
              if (O) {
                if (yr !== O)
                  return [new Re(qt.key, Lr, yr + " stop domain type must match previous stop domain type " + O)];
              } else
                O = yr;
              if (yr !== "number" && yr !== "string" && yr !== "boolean")
                return [new Re(qt.key, Lr, "stop domain value must be a number, string, or boolean")];
              if (yr !== "number" && _e !== "categorical") {
                var jr = "number expected, " + yr + " found";
                return Uo(me) && _e === void 0 && (jr += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new Re(qt.key, Lr, jr)];
              }
              return _e !== "categorical" || yr !== "number" || isFinite(Cr) && Math.floor(Cr) === Cr ? _e !== "categorical" && yr === "number" && G !== void 0 && Cr < G ? [new Re(qt.key, Lr, "stop domain values must appear in ascending order")] : (G = Cr, _e === "categorical" && Cr in Ce ? [new Re(qt.key, Lr, "stop domain values must be unique")] : (Ce[Cr] = !0, [])) : [new Re(qt.key, Lr, "integer expected, found " + Cr)];
            }
          }
          function On(M) {
            var O = (M.expressionContext === "property" ? br : Yt)(st(M.value), M.valueSpec);
            if (O.result === "error")
              return O.value.map(function(ne) {
                return new Re("" + M.key + ne.key, M.value, ne.message);
              });
            var G = O.value.expression || O.value._styleExpression.expression;
            if (M.expressionContext === "property" && M.propertyKey === "text-font" && !G.outputDefined())
              return [new Re(M.key, M.value, 'Invalid data expression for "' + M.propertyKey + '". Output values must be contained as literals within the expression.')];
            if (M.expressionContext === "property" && M.propertyType === "layout" && !Hr(G))
              return [new Re(M.key, M.value, '"feature-state" data expressions are not supported with layout properties.')];
            if (M.expressionContext === "filter" && !Hr(G))
              return [new Re(M.key, M.value, '"feature-state" data expressions are not supported with filters.')];
            if (M.expressionContext && M.expressionContext.indexOf("cluster") === 0) {
              if (!Vr(G, ["zoom", "feature-state"]))
                return [new Re(M.key, M.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
              if (M.expressionContext === "cluster-initial" && !Er(G))
                return [new Re(M.key, M.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
            }
            return [];
          }
          function Vn(M) {
            var O = M.key, G = M.value, ne = M.valueSpec, me = [];
            return Array.isArray(ne.values) ? ne.values.indexOf(qe(G)) === -1 && me.push(new Re(O, G, "expected one of [" + ne.values.join(", ") + "], " + JSON.stringify(G) + " found")) : Object.keys(ne.values).indexOf(qe(G)) === -1 && me.push(new Re(O, G, "expected one of [" + Object.keys(ne.values).join(", ") + "], " + JSON.stringify(G) + " found")), me;
          }
          function zn(M) {
            if (M === !0 || M === !1)
              return !0;
            if (!Array.isArray(M) || M.length === 0)
              return !1;
            switch (M[0]) {
              case "has":
                return M.length >= 2 && M[1] !== "$id" && M[1] !== "$type";
              case "in":
                return M.length >= 3 && (typeof M[1] != "string" || Array.isArray(M[2]));
              case "!in":
              case "!has":
              case "none":
                return !1;
              case "==":
              case "!=":
              case ">":
              case ">=":
              case "<":
              case "<=":
                return M.length !== 3 || Array.isArray(M[1]) || Array.isArray(M[2]);
              case "any":
              case "all":
                for (var O = 0, G = M.slice(1); O < G.length; O += 1) {
                  var ne = G[O];
                  if (!zn(ne) && typeof ne != "boolean")
                    return !1;
                }
                return !0;
              default:
                return !0;
            }
          }
          _r.deserialize = function(M) {
            return new _r(M._parameters, M._specification);
          }, _r.serialize = function(M) {
            return { _parameters: M._parameters, _specification: M._specification };
          };
          var ma = { type: "boolean", default: !1, transition: !1, "property-type": "data-driven", expression: { interpolated: !1, parameters: ["zoom", "feature"] } };
          function Ma(M) {
            if (M == null)
              return { filter: function() {
                return !0;
              }, needGeometry: !1 };
            zn(M) || (M = Ba(M));
            var O = Yt(M, ma);
            if (O.result === "error")
              throw new Error(O.value.map(function(G) {
                return G.key + ": " + G.message;
              }).join(", "));
            return { filter: function(G, ne, me) {
              return O.value.evaluate(G, ne, {}, me);
            }, needGeometry: function G(ne) {
              if (!Array.isArray(ne))
                return !1;
              if (ne[0] === "within")
                return !0;
              for (var me = 1; me < ne.length; me++)
                if (G(ne[me]))
                  return !0;
              return !1;
            }(M) };
          }
          function Na(M, O) {
            return M < O ? -1 : M > O ? 1 : 0;
          }
          function Ba(M) {
            if (!M)
              return !0;
            var O, G = M[0];
            return M.length <= 1 ? G !== "any" : G === "==" ? ja(M[1], M[2], "==") : G === "!=" ? ii(ja(M[1], M[2], "==")) : G === "<" || G === ">" || G === "<=" || G === ">=" ? ja(M[1], M[2], G) : G === "any" ? (O = M.slice(1), ["any"].concat(O.map(Ba))) : G === "all" ? ["all"].concat(M.slice(1).map(Ba)) : G === "none" ? ["all"].concat(M.slice(1).map(Ba).map(ii)) : G === "in" ? _i(M[1], M.slice(2)) : G === "!in" ? ii(_i(M[1], M.slice(2))) : G === "has" ? yi(M[1]) : G === "!has" ? ii(yi(M[1])) : G !== "within" || M;
          }
          function ja(M, O, G) {
            switch (M) {
              case "$type":
                return ["filter-type-" + G, O];
              case "$id":
                return ["filter-id-" + G, O];
              default:
                return ["filter-" + G, M, O];
            }
          }
          function _i(M, O) {
            if (O.length === 0)
              return !1;
            switch (M) {
              case "$type":
                return ["filter-type-in", ["literal", O]];
              case "$id":
                return ["filter-id-in", ["literal", O]];
              default:
                return O.length > 200 && !O.some(function(G) {
                  return typeof G != typeof O[0];
                }) ? ["filter-in-large", M, ["literal", O.sort(Na)]] : ["filter-in-small", M, ["literal", O]];
            }
          }
          function yi(M) {
            switch (M) {
              case "$type":
                return !0;
              case "$id":
                return ["filter-has-id"];
              default:
                return ["filter-has", M];
            }
          }
          function ii(M) {
            return ["!", M];
          }
          function oi(M) {
            return zn(st(M.value)) ? On(Xe({}, M, { expressionContext: "filter", valueSpec: { value: "boolean" } })) : function O(G) {
              var ne = G.value, me = G.key;
              if (Ha(ne) !== "array")
                return [new Re(me, ne, "array expected, " + Ha(ne) + " found")];
              var _e, Ce = G.styleSpec, Ne = [];
              if (ne.length < 1)
                return [new Re(me, ne, "filter array must have at least 1 element")];
              switch (Ne = Ne.concat(Vn({ key: me + "[0]", value: ne[0], valueSpec: Ce.filter_operator, style: G.style, styleSpec: G.styleSpec })), qe(ne[0])) {
                case "<":
                case "<=":
                case ">":
                case ">=":
                  ne.length >= 2 && qe(ne[1]) === "$type" && Ne.push(new Re(me, ne, '"$type" cannot be use with operator "' + ne[0] + '"'));
                case "==":
                case "!=":
                  ne.length !== 3 && Ne.push(new Re(me, ne, 'filter array for operator "' + ne[0] + '" must have 3 elements'));
                case "in":
                case "!in":
                  ne.length >= 2 && (_e = Ha(ne[1])) !== "string" && Ne.push(new Re(me + "[1]", ne[1], "string expected, " + _e + " found"));
                  for (var $e = 2; $e < ne.length; $e++)
                    _e = Ha(ne[$e]), qe(ne[1]) === "$type" ? Ne = Ne.concat(Vn({ key: me + "[" + $e + "]", value: ne[$e], valueSpec: Ce.geometry_type, style: G.style, styleSpec: G.styleSpec })) : _e !== "string" && _e !== "number" && _e !== "boolean" && Ne.push(new Re(me + "[" + $e + "]", ne[$e], "string, number, or boolean expected, " + _e + " found"));
                  break;
                case "any":
                case "all":
                case "none":
                  for (var ct = 1; ct < ne.length; ct++)
                    Ne = Ne.concat(O({ key: me + "[" + ct + "]", value: ne[ct], style: G.style, styleSpec: G.styleSpec }));
                  break;
                case "has":
                case "!has":
                  _e = Ha(ne[1]), ne.length !== 2 ? Ne.push(new Re(me, ne, 'filter array for "' + ne[0] + '" operator must have 2 elements')) : _e !== "string" && Ne.push(new Re(me + "[1]", ne[1], "string expected, " + _e + " found"));
                  break;
                case "within":
                  _e = Ha(ne[1]), ne.length !== 2 ? Ne.push(new Re(me, ne, 'filter array for "' + ne[0] + '" operator must have 2 elements')) : _e !== "object" && Ne.push(new Re(me + "[1]", ne[1], "object expected, " + _e + " found"));
              }
              return Ne;
            }(M);
          }
          function xi(M, O) {
            var G = M.key, ne = M.style, me = M.styleSpec, _e = M.value, Ce = M.objectKey, Ne = me[O + "_" + M.layerType];
            if (!Ne)
              return [];
            var $e = Ce.match(/^(.*)-transition$/);
            if (O === "paint" && $e && Ne[$e[1]] && Ne[$e[1]].transition)
              return sr({ key: G, value: _e, valueSpec: me.transition, style: ne, styleSpec: me });
            var ct, dt = M.valueSpec || Ne[Ce];
            if (!dt)
              return [new Re(G, _e, 'unknown property "' + Ce + '"')];
            if (Ha(_e) === "string" && Uo(dt) && !dt.tokens && (ct = /^{([^}]+)}$/.exec(_e)))
              return [new Re(G, _e, '"' + Ce + '" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": ' + JSON.stringify(ct[1]) + " }`.")];
            var Rt = [];
            return M.layerType === "symbol" && (Ce === "text-field" && ne && !ne.glyphs && Rt.push(new Re(G, _e, 'use of "text-field" requires a style "glyphs" property')), Ce === "text-font" && je(st(_e)) && qe(_e.type) === "identity" && Rt.push(new Re(G, _e, '"text-font" does not support identity functions'))), Rt.concat(sr({ key: M.key, value: _e, valueSpec: dt, style: ne, styleSpec: me, expressionContext: "property", propertyType: O, propertyKey: Ce }));
          }
          function Fi(M) {
            return xi(M, "paint");
          }
          function Ji(M) {
            return xi(M, "layout");
          }
          function Ki(M) {
            var O = [], G = M.value, ne = M.key, me = M.style, _e = M.styleSpec;
            G.type || G.ref || O.push(new Re(ne, G, 'either "type" or "ref" is required'));
            var Ce, Ne = qe(G.type), $e = qe(G.ref);
            if (G.id)
              for (var ct = qe(G.id), dt = 0; dt < M.arrayIndex; dt++) {
                var Rt = me.layers[dt];
                qe(Rt.id) === ct && O.push(new Re(ne, G.id, 'duplicate layer id "' + G.id + '", previously used at line ' + Rt.id.__line__));
              }
            if ("ref" in G)
              ["type", "source", "source-layer", "filter", "layout"].forEach(function(ir) {
                ir in G && O.push(new Re(ne, G[ir], '"' + ir + '" is prohibited for ref layers'));
              }), me.layers.forEach(function(ir) {
                qe(ir.id) === $e && (Ce = ir);
              }), Ce ? Ce.ref ? O.push(new Re(ne, G.ref, "ref cannot reference another ref layer")) : Ne = qe(Ce.type) : O.push(new Re(ne, G.ref, 'ref layer "' + $e + '" not found'));
            else if (Ne !== "background")
              if (G.source) {
                var Wt = me.sources && me.sources[G.source], qt = Wt && qe(Wt.type);
                Wt ? qt === "vector" && Ne === "raster" ? O.push(new Re(ne, G.source, 'layer "' + G.id + '" requires a raster source')) : qt === "raster" && Ne !== "raster" ? O.push(new Re(ne, G.source, 'layer "' + G.id + '" requires a vector source')) : qt !== "vector" || G["source-layer"] ? qt === "raster-dem" && Ne !== "hillshade" ? O.push(new Re(ne, G.source, "raster-dem source can only be used with layer type 'hillshade'.")) : Ne !== "line" || !G.paint || !G.paint["line-gradient"] || qt === "geojson" && Wt.lineMetrics || O.push(new Re(ne, G, 'layer "' + G.id + '" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')) : O.push(new Re(ne, G, 'layer "' + G.id + '" must specify a "source-layer"')) : O.push(new Re(ne, G.source, 'source "' + G.source + '" not found'));
              } else
                O.push(new Re(ne, G, 'missing required property "source"'));
            return O = O.concat(zr({ key: ne, value: G, valueSpec: _e.layer, style: M.style, styleSpec: M.styleSpec, objectElementValidators: { "*": function() {
              return [];
            }, type: function() {
              return sr({ key: ne + ".type", value: G.type, valueSpec: _e.layer.type, style: M.style, styleSpec: M.styleSpec, object: G, objectKey: "type" });
            }, filter: oi, layout: function(ir) {
              return zr({ layer: G, key: ir.key, value: ir.value, style: ir.style, styleSpec: ir.styleSpec, objectElementValidators: { "*": function(yr) {
                return Ji(Xe({ layerType: Ne }, yr));
              } } });
            }, paint: function(ir) {
              return zr({ layer: G, key: ir.key, value: ir.value, style: ir.style, styleSpec: ir.styleSpec, objectElementValidators: { "*": function(yr) {
                return Fi(Xe({ layerType: Ne }, yr));
              } } });
            } } }));
          }
          function Qi(M) {
            var O = M.value, G = M.key, ne = Ha(O);
            return ne !== "string" ? [new Re(G, O, "string expected, " + ne + " found")] : [];
          }
          var $i = { promoteId: function(M) {
            var O = M.key, G = M.value;
            if (Ha(G) === "string")
              return Qi({ key: O, value: G });
            var ne = [];
            for (var me in G)
              ne.push.apply(ne, Qi({ key: O + "." + me, value: G[me] }));
            return ne;
          } };
          function Oa(M) {
            var O = M.value, G = M.key, ne = M.styleSpec, me = M.style;
            if (!O.type)
              return [new Re(G, O, '"type" is required')];
            var _e, Ce = qe(O.type);
            switch (Ce) {
              case "vector":
              case "raster":
              case "raster-dem":
                return _e = zr({ key: G, value: O, valueSpec: ne["source_" + Ce.replace("-", "_")], style: M.style, styleSpec: ne, objectElementValidators: $i });
              case "geojson":
                if (_e = zr({ key: G, value: O, valueSpec: ne.source_geojson, style: me, styleSpec: ne, objectElementValidators: $i }), O.cluster)
                  for (var Ne in O.clusterProperties) {
                    var $e = O.clusterProperties[Ne], ct = $e[0], dt = $e[1], Rt = typeof ct == "string" ? [ct, ["accumulated"], ["get", Ne]] : ct;
                    _e.push.apply(_e, On({ key: G + "." + Ne + ".map", value: dt, expressionContext: "cluster-map" })), _e.push.apply(_e, On({ key: G + "." + Ne + ".reduce", value: Rt, expressionContext: "cluster-reduce" }));
                  }
                return _e;
              case "video":
                return zr({ key: G, value: O, valueSpec: ne.source_video, style: me, styleSpec: ne });
              case "image":
                return zr({ key: G, value: O, valueSpec: ne.source_image, style: me, styleSpec: ne });
              case "canvas":
                return [new Re(G, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
              default:
                return Vn({ key: G + ".type", value: O.type, valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] }, style: me, styleSpec: ne });
            }
          }
          function ht(M) {
            var O = M.value, G = M.styleSpec, ne = G.light, me = M.style, _e = [], Ce = Ha(O);
            if (O === void 0)
              return _e;
            if (Ce !== "object")
              return _e = _e.concat([new Re("light", O, "object expected, " + Ce + " found")]);
            for (var Ne in O) {
              var $e = Ne.match(/^(.*)-transition$/);
              _e = $e && ne[$e[1]] && ne[$e[1]].transition ? _e.concat(sr({ key: Ne, value: O[Ne], valueSpec: G.transition, style: me, styleSpec: G })) : ne[Ne] ? _e.concat(sr({ key: Ne, value: O[Ne], valueSpec: ne[Ne], style: me, styleSpec: G })) : _e.concat([new Re(Ne, O[Ne], 'unknown property "' + Ne + '"')]);
            }
            return _e;
          }
          var zt = { "*": function() {
            return [];
          }, array: nn, boolean: function(M) {
            var O = M.value, G = M.key, ne = Ha(O);
            return ne !== "boolean" ? [new Re(G, O, "boolean expected, " + ne + " found")] : [];
          }, number: pn, color: function(M) {
            var O = M.key, G = M.value, ne = Ha(G);
            return ne !== "string" ? [new Re(O, G, "color expected, " + ne + " found")] : ur(G) === null ? [new Re(O, G, 'color expected, "' + G + '" found')] : [];
          }, constants: Ue, enum: Vn, filter: oi, function: Cn, layer: Ki, object: zr, source: Oa, light: ht, string: Qi, formatted: function(M) {
            return Qi(M).length === 0 ? [] : On(M);
          }, resolvedImage: function(M) {
            return Qi(M).length === 0 ? [] : On(M);
          } };
          function sr(M) {
            var O = M.value, G = M.valueSpec, ne = M.styleSpec;
            return G.expression && je(qe(O)) ? Cn(M) : G.expression && Qt(st(O)) ? On(M) : G.type && zt[G.type] ? zt[G.type](M) : zr(Xe({}, M, { valueSpec: G.type ? ne[G.type] : G }));
          }
          function Ht(M) {
            var O = M.value, G = M.key, ne = Qi(M);
            return ne.length || (O.indexOf("{fontstack}") === -1 && ne.push(new Re(G, O, '"glyphs" url must include a "{fontstack}" token')), O.indexOf("{range}") === -1 && ne.push(new Re(G, O, '"glyphs" url must include a "{range}" token'))), ne;
          }
          function lr(M, O) {
            O === void 0 && (O = be);
            var G = [];
            return G = G.concat(sr({ key: "", value: M, valueSpec: O.$root, styleSpec: O, style: M, objectElementValidators: { glyphs: Ht, "*": function() {
              return [];
            } } })), M.constants && (G = G.concat(Ue({ key: "constants", value: M.constants, style: M, styleSpec: O }))), Pr(G);
          }
          function Pr(M) {
            return [].concat(M).sort(function(O, G) {
              return O.line - G.line;
            });
          }
          function Nr(M) {
            return function() {
              for (var O = [], G = arguments.length; G--; )
                O[G] = arguments[G];
              return Pr(M.apply(this, O));
            };
          }
          lr.source = Nr(Oa), lr.light = Nr(ht), lr.layer = Nr(Ki), lr.filter = Nr(oi), lr.paintProperty = Nr(Fi), lr.layoutProperty = Nr(Ji);
          var Wr = lr, sn = Wr.light, an = Wr.paintProperty, dn = Wr.layoutProperty;
          function Tn(M, O) {
            var G = !1;
            if (O && O.length)
              for (var ne = 0, me = O; ne < me.length; ne += 1) {
                var _e = me[ne];
                M.fire(new He(new Error(_e.message))), G = !0;
              }
            return G;
          }
          var ln = kn;
          function kn(M, O, G) {
            var ne = this.cells = [];
            if (M instanceof ArrayBuffer) {
              this.arrayBuffer = M;
              var me = new Int32Array(this.arrayBuffer);
              M = me[0], O = me[1], G = me[2], this.d = O + 2 * G;
              for (var _e = 0; _e < this.d * this.d; _e++) {
                var Ce = me[3 + _e], Ne = me[3 + _e + 1];
                ne.push(Ce === Ne ? null : me.subarray(Ce, Ne));
              }
              var $e = me[3 + ne.length], ct = me[3 + ne.length + 1];
              this.keys = me.subarray($e, ct), this.bboxes = me.subarray(ct), this.insert = this._insertReadonly;
            } else {
              this.d = O + 2 * G;
              for (var dt = 0; dt < this.d * this.d; dt++)
                ne.push([]);
              this.keys = [], this.bboxes = [];
            }
            this.n = O, this.extent = M, this.padding = G, this.scale = O / M, this.uid = 0;
            var Rt = G / O * M;
            this.min = -Rt, this.max = M + Rt;
          }
          kn.prototype.insert = function(M, O, G, ne, me) {
            this._forEachCell(O, G, ne, me, this._insertCell, this.uid++), this.keys.push(M), this.bboxes.push(O), this.bboxes.push(G), this.bboxes.push(ne), this.bboxes.push(me);
          }, kn.prototype._insertReadonly = function() {
            throw "Cannot insert into a GridIndex created from an ArrayBuffer.";
          }, kn.prototype._insertCell = function(M, O, G, ne, me, _e) {
            this.cells[me].push(_e);
          }, kn.prototype.query = function(M, O, G, ne, me) {
            var _e = this.min, Ce = this.max;
            if (M <= _e && O <= _e && Ce <= G && Ce <= ne && !me)
              return Array.prototype.slice.call(this.keys);
            var Ne = [];
            return this._forEachCell(M, O, G, ne, this._queryCell, Ne, {}, me), Ne;
          }, kn.prototype._queryCell = function(M, O, G, ne, me, _e, Ce, Ne) {
            var $e = this.cells[me];
            if ($e !== null)
              for (var ct = this.keys, dt = this.bboxes, Rt = 0; Rt < $e.length; Rt++) {
                var Wt = $e[Rt];
                if (Ce[Wt] === void 0) {
                  var qt = 4 * Wt;
                  (Ne ? Ne(dt[qt + 0], dt[qt + 1], dt[qt + 2], dt[qt + 3]) : M <= dt[qt + 2] && O <= dt[qt + 3] && G >= dt[qt + 0] && ne >= dt[qt + 1]) ? (Ce[Wt] = !0, _e.push(ct[Wt])) : Ce[Wt] = !1;
                }
              }
          }, kn.prototype._forEachCell = function(M, O, G, ne, me, _e, Ce, Ne) {
            for (var $e = this._convertToCellCoord(M), ct = this._convertToCellCoord(O), dt = this._convertToCellCoord(G), Rt = this._convertToCellCoord(ne), Wt = $e; Wt <= dt; Wt++)
              for (var qt = ct; qt <= Rt; qt++) {
                var ir = this.d * qt + Wt;
                if ((!Ne || Ne(this._convertFromCellCoord(Wt), this._convertFromCellCoord(qt), this._convertFromCellCoord(Wt + 1), this._convertFromCellCoord(qt + 1))) && me.call(this, M, O, G, ne, ir, _e, Ce, Ne))
                  return;
              }
          }, kn.prototype._convertFromCellCoord = function(M) {
            return (M - this.padding) / this.scale;
          }, kn.prototype._convertToCellCoord = function(M) {
            return Math.max(0, Math.min(this.d - 1, Math.floor(M * this.scale) + this.padding));
          }, kn.prototype.toArrayBuffer = function() {
            if (this.arrayBuffer)
              return this.arrayBuffer;
            for (var M = this.cells, O = 3 + this.cells.length + 1 + 1, G = 0, ne = 0; ne < this.cells.length; ne++)
              G += this.cells[ne].length;
            var me = new Int32Array(O + G + this.keys.length + this.bboxes.length);
            me[0] = this.extent, me[1] = this.n, me[2] = this.padding;
            for (var _e = O, Ce = 0; Ce < M.length; Ce++) {
              var Ne = M[Ce];
              me[3 + Ce] = _e, me.set(Ne, _e), _e += Ne.length;
            }
            return me[3 + M.length] = _e, me.set(this.keys, _e), _e += this.keys.length, me[3 + M.length + 1] = _e, me.set(this.bboxes, _e), _e += this.bboxes.length, me.buffer;
          };
          var Rn = self.ImageData, Un = self.ImageBitmap, ia = {};
          function Zr(M, O, G) {
            G === void 0 && (G = {}), Object.defineProperty(O, "_classRegistryKey", { value: M, writeable: !1 }), ia[M] = { klass: O, omit: G.omit || [], shallow: G.shallow || [] };
          }
          for (var ta in Zr("Object", Object), ln.serialize = function(M, O) {
            var G = M.toArrayBuffer();
            return O && O.push(G), { buffer: G };
          }, ln.deserialize = function(M) {
            return new ln(M.buffer);
          }, Zr("Grid", ln), Zr("Color", Kt), Zr("Error", Error), Zr("ResolvedImage", gr), Zr("StylePropertyFunction", _r), Zr("StyleExpression", Jt, { omit: ["_evaluator"] }), Zr("ZoomDependentExpression", pr), Zr("ZoomConstantExpression", ar), Zr("CompoundExpression", Qr, { omit: ["_evaluate"] }), Bo)
            Bo[ta]._classRegistryKey || Zr("Expression_" + ta, Bo[ta]);
          function Pn(M) {
            return M && typeof ArrayBuffer < "u" && (M instanceof ArrayBuffer || M.constructor && M.constructor.name === "ArrayBuffer");
          }
          function Nn(M) {
            return Un && M instanceof Un;
          }
          function ea(M, O) {
            if (M == null || typeof M == "boolean" || typeof M == "number" || typeof M == "string" || M instanceof Boolean || M instanceof Number || M instanceof String || M instanceof Date || M instanceof RegExp)
              return M;
            if (Pn(M) || Nn(M))
              return O && O.push(M), M;
            if (ArrayBuffer.isView(M)) {
              var G = M;
              return O && O.push(G.buffer), G;
            }
            if (M instanceof Rn)
              return O && O.push(M.data.buffer), M;
            if (Array.isArray(M)) {
              for (var ne = [], me = 0, _e = M; me < _e.length; me += 1) {
                var Ce = _e[me];
                ne.push(ea(Ce, O));
              }
              return ne;
            }
            if (typeof M == "object") {
              var Ne = M.constructor, $e = Ne._classRegistryKey;
              if (!$e)
                throw new Error("can't serialize object of unregistered class");
              var ct = Ne.serialize ? Ne.serialize(M, O) : {};
              if (!Ne.serialize) {
                for (var dt in M)
                  if (M.hasOwnProperty(dt) && !(ia[$e].omit.indexOf(dt) >= 0)) {
                    var Rt = M[dt];
                    ct[dt] = ia[$e].shallow.indexOf(dt) >= 0 ? Rt : ea(Rt, O);
                  }
                M instanceof Error && (ct.message = M.message);
              }
              if (ct.$name)
                throw new Error("$name property is reserved for worker serialization logic.");
              return $e !== "Object" && (ct.$name = $e), ct;
            }
            throw new Error("can't serialize object of type " + typeof M);
          }
          function wa(M) {
            if (M == null || typeof M == "boolean" || typeof M == "number" || typeof M == "string" || M instanceof Boolean || M instanceof Number || M instanceof String || M instanceof Date || M instanceof RegExp || Pn(M) || Nn(M) || ArrayBuffer.isView(M) || M instanceof Rn)
              return M;
            if (Array.isArray(M))
              return M.map(wa);
            if (typeof M == "object") {
              var O = M.$name || "Object", G = ia[O].klass;
              if (!G)
                throw new Error("can't deserialize unregistered class " + O);
              if (G.deserialize)
                return G.deserialize(M);
              for (var ne = Object.create(G.prototype), me = 0, _e = Object.keys(M); me < _e.length; me += 1) {
                var Ce = _e[me];
                if (Ce !== "$name") {
                  var Ne = M[Ce];
                  ne[Ce] = ia[O].shallow.indexOf(Ce) >= 0 ? Ne : wa(Ne);
                }
              }
              return ne;
            }
            throw new Error("can't deserialize object of type " + typeof M);
          }
          var La = function() {
            this.first = !0;
          };
          La.prototype.update = function(M, O) {
            var G = Math.floor(M);
            return this.first ? (this.first = !1, this.lastIntegerZoom = G, this.lastIntegerZoomTime = 0, this.lastZoom = M, this.lastFloorZoom = G, !0) : (this.lastFloorZoom > G ? (this.lastIntegerZoom = G + 1, this.lastIntegerZoomTime = O) : this.lastFloorZoom < G && (this.lastIntegerZoom = G, this.lastIntegerZoomTime = O), M !== this.lastZoom && (this.lastZoom = M, this.lastFloorZoom = G, !0));
          };
          var Sn = { "Latin-1 Supplement": function(M) {
            return M >= 128 && M <= 255;
          }, Arabic: function(M) {
            return M >= 1536 && M <= 1791;
          }, "Arabic Supplement": function(M) {
            return M >= 1872 && M <= 1919;
          }, "Arabic Extended-A": function(M) {
            return M >= 2208 && M <= 2303;
          }, "Hangul Jamo": function(M) {
            return M >= 4352 && M <= 4607;
          }, "Unified Canadian Aboriginal Syllabics": function(M) {
            return M >= 5120 && M <= 5759;
          }, Khmer: function(M) {
            return M >= 6016 && M <= 6143;
          }, "Unified Canadian Aboriginal Syllabics Extended": function(M) {
            return M >= 6320 && M <= 6399;
          }, "General Punctuation": function(M) {
            return M >= 8192 && M <= 8303;
          }, "Letterlike Symbols": function(M) {
            return M >= 8448 && M <= 8527;
          }, "Number Forms": function(M) {
            return M >= 8528 && M <= 8591;
          }, "Miscellaneous Technical": function(M) {
            return M >= 8960 && M <= 9215;
          }, "Control Pictures": function(M) {
            return M >= 9216 && M <= 9279;
          }, "Optical Character Recognition": function(M) {
            return M >= 9280 && M <= 9311;
          }, "Enclosed Alphanumerics": function(M) {
            return M >= 9312 && M <= 9471;
          }, "Geometric Shapes": function(M) {
            return M >= 9632 && M <= 9727;
          }, "Miscellaneous Symbols": function(M) {
            return M >= 9728 && M <= 9983;
          }, "Miscellaneous Symbols and Arrows": function(M) {
            return M >= 11008 && M <= 11263;
          }, "CJK Radicals Supplement": function(M) {
            return M >= 11904 && M <= 12031;
          }, "Kangxi Radicals": function(M) {
            return M >= 12032 && M <= 12255;
          }, "Ideographic Description Characters": function(M) {
            return M >= 12272 && M <= 12287;
          }, "CJK Symbols and Punctuation": function(M) {
            return M >= 12288 && M <= 12351;
          }, Hiragana: function(M) {
            return M >= 12352 && M <= 12447;
          }, Katakana: function(M) {
            return M >= 12448 && M <= 12543;
          }, Bopomofo: function(M) {
            return M >= 12544 && M <= 12591;
          }, "Hangul Compatibility Jamo": function(M) {
            return M >= 12592 && M <= 12687;
          }, Kanbun: function(M) {
            return M >= 12688 && M <= 12703;
          }, "Bopomofo Extended": function(M) {
            return M >= 12704 && M <= 12735;
          }, "CJK Strokes": function(M) {
            return M >= 12736 && M <= 12783;
          }, "Katakana Phonetic Extensions": function(M) {
            return M >= 12784 && M <= 12799;
          }, "Enclosed CJK Letters and Months": function(M) {
            return M >= 12800 && M <= 13055;
          }, "CJK Compatibility": function(M) {
            return M >= 13056 && M <= 13311;
          }, "CJK Unified Ideographs Extension A": function(M) {
            return M >= 13312 && M <= 19903;
          }, "Yijing Hexagram Symbols": function(M) {
            return M >= 19904 && M <= 19967;
          }, "CJK Unified Ideographs": function(M) {
            return M >= 19968 && M <= 40959;
          }, "Yi Syllables": function(M) {
            return M >= 40960 && M <= 42127;
          }, "Yi Radicals": function(M) {
            return M >= 42128 && M <= 42191;
          }, "Hangul Jamo Extended-A": function(M) {
            return M >= 43360 && M <= 43391;
          }, "Hangul Syllables": function(M) {
            return M >= 44032 && M <= 55215;
          }, "Hangul Jamo Extended-B": function(M) {
            return M >= 55216 && M <= 55295;
          }, "Private Use Area": function(M) {
            return M >= 57344 && M <= 63743;
          }, "CJK Compatibility Ideographs": function(M) {
            return M >= 63744 && M <= 64255;
          }, "Arabic Presentation Forms-A": function(M) {
            return M >= 64336 && M <= 65023;
          }, "Vertical Forms": function(M) {
            return M >= 65040 && M <= 65055;
          }, "CJK Compatibility Forms": function(M) {
            return M >= 65072 && M <= 65103;
          }, "Small Form Variants": function(M) {
            return M >= 65104 && M <= 65135;
          }, "Arabic Presentation Forms-B": function(M) {
            return M >= 65136 && M <= 65279;
          }, "Halfwidth and Fullwidth Forms": function(M) {
            return M >= 65280 && M <= 65519;
          } };
          function za(M) {
            for (var O = 0, G = M; O < G.length; O += 1)
              if (da(G[O].charCodeAt(0)))
                return !0;
            return !1;
          }
          function Ea(M) {
            return !Sn.Arabic(M) && !Sn["Arabic Supplement"](M) && !Sn["Arabic Extended-A"](M) && !Sn["Arabic Presentation Forms-A"](M) && !Sn["Arabic Presentation Forms-B"](M);
          }
          function da(M) {
            return M === 746 || M === 747 || !(M < 4352) && (!!Sn["Bopomofo Extended"](M) || !!Sn.Bopomofo(M) || !(!Sn["CJK Compatibility Forms"](M) || M >= 65097 && M <= 65103) || !!Sn["CJK Compatibility Ideographs"](M) || !!Sn["CJK Compatibility"](M) || !!Sn["CJK Radicals Supplement"](M) || !!Sn["CJK Strokes"](M) || !(!Sn["CJK Symbols and Punctuation"](M) || M >= 12296 && M <= 12305 || M >= 12308 && M <= 12319 || M === 12336) || !!Sn["CJK Unified Ideographs Extension A"](M) || !!Sn["CJK Unified Ideographs"](M) || !!Sn["Enclosed CJK Letters and Months"](M) || !!Sn["Hangul Compatibility Jamo"](M) || !!Sn["Hangul Jamo Extended-A"](M) || !!Sn["Hangul Jamo Extended-B"](M) || !!Sn["Hangul Jamo"](M) || !!Sn["Hangul Syllables"](M) || !!Sn.Hiragana(M) || !!Sn["Ideographic Description Characters"](M) || !!Sn.Kanbun(M) || !!Sn["Kangxi Radicals"](M) || !!Sn["Katakana Phonetic Extensions"](M) || !(!Sn.Katakana(M) || M === 12540) || !(!Sn["Halfwidth and Fullwidth Forms"](M) || M === 65288 || M === 65289 || M === 65293 || M >= 65306 && M <= 65310 || M === 65339 || M === 65341 || M === 65343 || M >= 65371 && M <= 65503 || M === 65507 || M >= 65512 && M <= 65519) || !(!Sn["Small Form Variants"](M) || M >= 65112 && M <= 65118 || M >= 65123 && M <= 65126) || !!Sn["Unified Canadian Aboriginal Syllabics"](M) || !!Sn["Unified Canadian Aboriginal Syllabics Extended"](M) || !!Sn["Vertical Forms"](M) || !!Sn["Yijing Hexagram Symbols"](M) || !!Sn["Yi Syllables"](M) || !!Sn["Yi Radicals"](M));
          }
          function Da(M) {
            return !(da(M) || function(O) {
              return !(!Sn["Latin-1 Supplement"](O) || O !== 167 && O !== 169 && O !== 174 && O !== 177 && O !== 188 && O !== 189 && O !== 190 && O !== 215 && O !== 247) || !(!Sn["General Punctuation"](O) || O !== 8214 && O !== 8224 && O !== 8225 && O !== 8240 && O !== 8241 && O !== 8251 && O !== 8252 && O !== 8258 && O !== 8263 && O !== 8264 && O !== 8265 && O !== 8273) || !!Sn["Letterlike Symbols"](O) || !!Sn["Number Forms"](O) || !(!Sn["Miscellaneous Technical"](O) || !(O >= 8960 && O <= 8967 || O >= 8972 && O <= 8991 || O >= 8996 && O <= 9e3 || O === 9003 || O >= 9085 && O <= 9114 || O >= 9150 && O <= 9165 || O === 9167 || O >= 9169 && O <= 9179 || O >= 9186 && O <= 9215)) || !(!Sn["Control Pictures"](O) || O === 9251) || !!Sn["Optical Character Recognition"](O) || !!Sn["Enclosed Alphanumerics"](O) || !!Sn["Geometric Shapes"](O) || !(!Sn["Miscellaneous Symbols"](O) || O >= 9754 && O <= 9759) || !(!Sn["Miscellaneous Symbols and Arrows"](O) || !(O >= 11026 && O <= 11055 || O >= 11088 && O <= 11097 || O >= 11192 && O <= 11243)) || !!Sn["CJK Symbols and Punctuation"](O) || !!Sn.Katakana(O) || !!Sn["Private Use Area"](O) || !!Sn["CJK Compatibility Forms"](O) || !!Sn["Small Form Variants"](O) || !!Sn["Halfwidth and Fullwidth Forms"](O) || O === 8734 || O === 8756 || O === 8757 || O >= 9984 && O <= 10087 || O >= 10102 && O <= 10131 || O === 65532 || O === 65533;
            }(M));
          }
          function Aa(M) {
            return M >= 1424 && M <= 2303 || Sn["Arabic Presentation Forms-A"](M) || Sn["Arabic Presentation Forms-B"](M);
          }
          function $a(M, O) {
            return !(!O && Aa(M)) && !(M >= 2304 && M <= 3583 || M >= 3840 && M <= 4255 || Sn.Khmer(M));
          }
          function ra(M) {
            for (var O = 0, G = M; O < G.length; O += 1)
              if (Aa(G[O].charCodeAt(0)))
                return !0;
            return !1;
          }
          var Za = "deferred", Bi = "loading", Go = "loaded", Oo = "error", go = null, va = "unavailable", di = null, vo = function(M) {
            M && typeof M == "string" && M.indexOf("NetworkError") > -1 && (va = Oo), go && go(M);
          };
          function Xa() {
            wi.fire(new Be("pluginStateChange", { pluginStatus: va, pluginURL: di }));
          }
          var wi = new he(), Hi = function() {
            return va;
          }, ti = function() {
            if (va !== Za || !di)
              throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");
            va = Bi, Xa(), di && mt({ url: di }, function(M) {
              M ? vo(M) : (va = Go, Xa());
            });
          }, uo = { applyArabicShaping: null, processBidirectionalText: null, processStyledBidirectionalText: null, isLoaded: function() {
            return va === Go || uo.applyArabicShaping != null;
          }, isLoading: function() {
            return va === Bi;
          }, setState: function(M) {
            va = M.pluginStatus, di = M.pluginURL;
          }, isParsed: function() {
            return uo.applyArabicShaping != null && uo.processBidirectionalText != null && uo.processStyledBidirectionalText != null;
          }, getPluginURL: function() {
            return di;
          } }, ri = function(M, O) {
            this.zoom = M, O ? (this.now = O.now, this.fadeDuration = O.fadeDuration, this.zoomHistory = O.zoomHistory, this.transition = O.transition) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new La(), this.transition = {});
          };
          ri.prototype.isSupportedScript = function(M) {
            return function(O, G) {
              for (var ne = 0, me = O; ne < me.length; ne += 1)
                if (!$a(me[ne].charCodeAt(0), G))
                  return !1;
              return !0;
            }(M, uo.isLoaded());
          }, ri.prototype.crossFadingFactor = function() {
            return this.fadeDuration === 0 ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);
          }, ri.prototype.getCrossfadeParameters = function() {
            var M = this.zoom, O = M - Math.floor(M), G = this.crossFadingFactor();
            return M > this.zoomHistory.lastIntegerZoom ? { fromScale: 2, toScale: 1, t: O + (1 - O) * G } : { fromScale: 0.5, toScale: 1, t: 1 - (1 - G) * O };
          };
          var eo = function(M, O) {
            this.property = M, this.value = O, this.expression = function(G, ne) {
              if (je(G))
                return new _r(G, ne);
              if (Qt(G)) {
                var me = br(G, ne);
                if (me.result === "error")
                  throw new Error(me.value.map(function(Ce) {
                    return Ce.key + ": " + Ce.message;
                  }).join(", "));
                return me.value;
              }
              var _e = G;
              return typeof G == "string" && ne.type === "color" && (_e = Kt.parse(G)), { kind: "constant", evaluate: function() {
                return _e;
              } };
            }(O === void 0 ? M.specification.default : O, M.specification);
          };
          eo.prototype.isDataDriven = function() {
            return this.expression.kind === "source" || this.expression.kind === "composite";
          }, eo.prototype.possiblyEvaluate = function(M, O, G) {
            return this.property.possiblyEvaluate(this, M, O, G);
          };
          var ns = function(M) {
            this.property = M, this.value = new eo(M, void 0);
          };
          ns.prototype.transitioned = function(M, O) {
            return new Os(this.property, this.value, O, i({}, M.transition, this.transition), M.now);
          }, ns.prototype.untransitioned = function() {
            return new Os(this.property, this.value, null, {}, 0);
          };
          var Ko = function(M) {
            this._properties = M, this._values = Object.create(M.defaultTransitionablePropertyValues);
          };
          Ko.prototype.getValue = function(M) {
            return T(this._values[M].value.value);
          }, Ko.prototype.setValue = function(M, O) {
            this._values.hasOwnProperty(M) || (this._values[M] = new ns(this._values[M].property)), this._values[M].value = new eo(this._values[M].property, O === null ? void 0 : T(O));
          }, Ko.prototype.getTransition = function(M) {
            return T(this._values[M].transition);
          }, Ko.prototype.setTransition = function(M, O) {
            this._values.hasOwnProperty(M) || (this._values[M] = new ns(this._values[M].property)), this._values[M].transition = T(O) || void 0;
          }, Ko.prototype.serialize = function() {
            for (var M = {}, O = 0, G = Object.keys(this._values); O < G.length; O += 1) {
              var ne = G[O], me = this.getValue(ne);
              me !== void 0 && (M[ne] = me);
              var _e = this.getTransition(ne);
              _e !== void 0 && (M[ne + "-transition"] = _e);
            }
            return M;
          }, Ko.prototype.transitioned = function(M, O) {
            for (var G = new Oi(this._properties), ne = 0, me = Object.keys(this._values); ne < me.length; ne += 1) {
              var _e = me[ne];
              G._values[_e] = this._values[_e].transitioned(M, O._values[_e]);
            }
            return G;
          }, Ko.prototype.untransitioned = function() {
            for (var M = new Oi(this._properties), O = 0, G = Object.keys(this._values); O < G.length; O += 1) {
              var ne = G[O];
              M._values[ne] = this._values[ne].untransitioned();
            }
            return M;
          };
          var Os = function(M, O, G, ne, me) {
            this.property = M, this.value = O, this.begin = me + ne.delay || 0, this.end = this.begin + ne.duration || 0, M.specification.transition && (ne.delay || ne.duration) && (this.prior = G);
          };
          Os.prototype.possiblyEvaluate = function(M, O, G) {
            var ne = M.now || 0, me = this.value.possiblyEvaluate(M, O, G), _e = this.prior;
            if (_e) {
              if (ne > this.end)
                return this.prior = null, me;
              if (this.value.isDataDriven())
                return this.prior = null, me;
              if (ne < this.begin)
                return _e.possiblyEvaluate(M, O, G);
              var Ce = (ne - this.begin) / (this.end - this.begin);
              return this.property.interpolate(_e.possiblyEvaluate(M, O, G), me, function(Ne) {
                if (Ne <= 0)
                  return 0;
                if (Ne >= 1)
                  return 1;
                var $e = Ne * Ne, ct = $e * Ne;
                return 4 * (Ne < 0.5 ? ct : 3 * (Ne - $e) + ct - 0.75);
              }(Ce));
            }
            return me;
          };
          var Oi = function(M) {
            this._properties = M, this._values = Object.create(M.defaultTransitioningPropertyValues);
          };
          Oi.prototype.possiblyEvaluate = function(M, O, G) {
            for (var ne = new Qo(this._properties), me = 0, _e = Object.keys(this._values); me < _e.length; me += 1) {
              var Ce = _e[me];
              ne._values[Ce] = this._values[Ce].possiblyEvaluate(M, O, G);
            }
            return ne;
          }, Oi.prototype.hasTransition = function() {
            for (var M = 0, O = Object.keys(this._values); M < O.length; M += 1) {
              var G = O[M];
              if (this._values[G].prior)
                return !0;
            }
            return !1;
          };
          var zs = function(M) {
            this._properties = M, this._values = Object.create(M.defaultPropertyValues);
          };
          zs.prototype.getValue = function(M) {
            return T(this._values[M].value);
          }, zs.prototype.setValue = function(M, O) {
            this._values[M] = new eo(this._values[M].property, O === null ? void 0 : T(O));
          }, zs.prototype.serialize = function() {
            for (var M = {}, O = 0, G = Object.keys(this._values); O < G.length; O += 1) {
              var ne = G[O], me = this.getValue(ne);
              me !== void 0 && (M[ne] = me);
            }
            return M;
          }, zs.prototype.possiblyEvaluate = function(M, O, G) {
            for (var ne = new Qo(this._properties), me = 0, _e = Object.keys(this._values); me < _e.length; me += 1) {
              var Ce = _e[me];
              ne._values[Ce] = this._values[Ce].possiblyEvaluate(M, O, G);
            }
            return ne;
          };
          var zi = function(M, O, G) {
            this.property = M, this.value = O, this.parameters = G;
          };
          zi.prototype.isConstant = function() {
            return this.value.kind === "constant";
          }, zi.prototype.constantOr = function(M) {
            return this.value.kind === "constant" ? this.value.value : M;
          }, zi.prototype.evaluate = function(M, O, G, ne) {
            return this.property.evaluate(this.value, this.parameters, M, O, G, ne);
          };
          var Qo = function(M) {
            this._properties = M, this._values = Object.create(M.defaultPossiblyEvaluatedValues);
          };
          Qo.prototype.get = function(M) {
            return this._values[M];
          };
          var ca = function(M) {
            this.specification = M;
          };
          ca.prototype.possiblyEvaluate = function(M, O) {
            return M.expression.evaluate(O);
          }, ca.prototype.interpolate = function(M, O, G) {
            var ne = Ln[this.specification.type];
            return ne ? ne(M, O, G) : M;
          };
          var ya = function(M, O) {
            this.specification = M, this.overrides = O;
          };
          ya.prototype.possiblyEvaluate = function(M, O, G, ne) {
            return M.expression.kind === "constant" || M.expression.kind === "camera" ? new zi(this, { kind: "constant", value: M.expression.evaluate(O, null, {}, G, ne) }, O) : new zi(this, M.expression, O);
          }, ya.prototype.interpolate = function(M, O, G) {
            if (M.value.kind !== "constant" || O.value.kind !== "constant")
              return M;
            if (M.value.value === void 0 || O.value.value === void 0)
              return new zi(this, { kind: "constant", value: void 0 }, M.parameters);
            var ne = Ln[this.specification.type];
            return ne ? new zi(this, { kind: "constant", value: ne(M.value.value, O.value.value, G) }, M.parameters) : M;
          }, ya.prototype.evaluate = function(M, O, G, ne, me, _e) {
            return M.kind === "constant" ? M.value : M.evaluate(O, G, ne, me, _e);
          };
          var Ds = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.possiblyEvaluate = function(G, ne, me, _e) {
              if (G.value === void 0)
                return new zi(this, { kind: "constant", value: void 0 }, ne);
              if (G.expression.kind === "constant") {
                var Ce = G.expression.evaluate(ne, null, {}, me, _e), Ne = G.property.specification.type === "resolvedImage" && typeof Ce != "string" ? Ce.name : Ce, $e = this._calculate(Ne, Ne, Ne, ne);
                return new zi(this, { kind: "constant", value: $e }, ne);
              }
              if (G.expression.kind === "camera") {
                var ct = this._calculate(G.expression.evaluate({ zoom: ne.zoom - 1 }), G.expression.evaluate({ zoom: ne.zoom }), G.expression.evaluate({ zoom: ne.zoom + 1 }), ne);
                return new zi(this, { kind: "constant", value: ct }, ne);
              }
              return new zi(this, G.expression, ne);
            }, O.prototype.evaluate = function(G, ne, me, _e, Ce, Ne) {
              if (G.kind === "source") {
                var $e = G.evaluate(ne, me, _e, Ce, Ne);
                return this._calculate($e, $e, $e, ne);
              }
              return G.kind === "composite" ? this._calculate(G.evaluate({ zoom: Math.floor(ne.zoom) - 1 }, me, _e), G.evaluate({ zoom: Math.floor(ne.zoom) }, me, _e), G.evaluate({ zoom: Math.floor(ne.zoom) + 1 }, me, _e), ne) : G.value;
            }, O.prototype._calculate = function(G, ne, me, _e) {
              return _e.zoom > _e.zoomHistory.lastIntegerZoom ? { from: G, to: ne } : { from: me, to: ne };
            }, O.prototype.interpolate = function(G) {
              return G;
            }, O;
          }(ya), Rs = function(M) {
            this.specification = M;
          };
          Rs.prototype.possiblyEvaluate = function(M, O, G, ne) {
            if (M.value !== void 0) {
              if (M.expression.kind === "constant") {
                var me = M.expression.evaluate(O, null, {}, G, ne);
                return this._calculate(me, me, me, O);
              }
              return this._calculate(M.expression.evaluate(new ri(Math.floor(O.zoom - 1), O)), M.expression.evaluate(new ri(Math.floor(O.zoom), O)), M.expression.evaluate(new ri(Math.floor(O.zoom + 1), O)), O);
            }
          }, Rs.prototype._calculate = function(M, O, G, ne) {
            return ne.zoom > ne.zoomHistory.lastIntegerZoom ? { from: M, to: O } : { from: G, to: O };
          }, Rs.prototype.interpolate = function(M) {
            return M;
          };
          var $o = function(M) {
            this.specification = M;
          };
          $o.prototype.possiblyEvaluate = function(M, O, G, ne) {
            return !!M.expression.evaluate(O, null, {}, G, ne);
          }, $o.prototype.interpolate = function() {
            return !1;
          };
          var Lo = function(M) {
            for (var O in this.properties = M, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = [], M) {
              var G = M[O];
              G.specification.overridable && this.overridableProperties.push(O);
              var ne = this.defaultPropertyValues[O] = new eo(G, void 0), me = this.defaultTransitionablePropertyValues[O] = new ns(G);
              this.defaultTransitioningPropertyValues[O] = me.untransitioned(), this.defaultPossiblyEvaluatedValues[O] = ne.possiblyEvaluate({});
            }
          };
          Zr("DataDrivenProperty", ya), Zr("DataConstantProperty", ca), Zr("CrossFadedDataDrivenProperty", Ds), Zr("CrossFadedProperty", Rs), Zr("ColorRampProperty", $o);
          var Vo = function(M) {
            function O(G, ne) {
              if (M.call(this), this.id = G.id, this.type = G.type, this._featureFilter = { filter: function() {
                return !0;
              }, needGeometry: !1 }, G.type !== "custom" && (G = G, this.metadata = G.metadata, this.minzoom = G.minzoom, this.maxzoom = G.maxzoom, G.type !== "background" && (this.source = G.source, this.sourceLayer = G["source-layer"], this.filter = G.filter), ne.layout && (this._unevaluatedLayout = new zs(ne.layout)), ne.paint)) {
                for (var me in this._transitionablePaint = new Ko(ne.paint), G.paint)
                  this.setPaintProperty(me, G.paint[me], { validate: !1 });
                for (var _e in G.layout)
                  this.setLayoutProperty(_e, G.layout[_e], { validate: !1 });
                this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new Qo(ne.paint);
              }
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.getCrossfadeParameters = function() {
              return this._crossfadeParameters;
            }, O.prototype.getLayoutProperty = function(G) {
              return G === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(G);
            }, O.prototype.setLayoutProperty = function(G, ne, me) {
              if (me === void 0 && (me = {}), ne != null) {
                var _e = "layers." + this.id + ".layout." + G;
                if (this._validate(dn, _e, G, ne, me))
                  return;
              }
              G !== "visibility" ? this._unevaluatedLayout.setValue(G, ne) : this.visibility = ne;
            }, O.prototype.getPaintProperty = function(G) {
              return _(G, "-transition") ? this._transitionablePaint.getTransition(G.slice(0, -11)) : this._transitionablePaint.getValue(G);
            }, O.prototype.setPaintProperty = function(G, ne, me) {
              if (me === void 0 && (me = {}), ne != null) {
                var _e = "layers." + this.id + ".paint." + G;
                if (this._validate(an, _e, G, ne, me))
                  return !1;
              }
              if (_(G, "-transition"))
                return this._transitionablePaint.setTransition(G.slice(0, -11), ne || void 0), !1;
              var Ce = this._transitionablePaint._values[G], Ne = Ce.property.specification["property-type"] === "cross-faded-data-driven", $e = Ce.value.isDataDriven(), ct = Ce.value;
              this._transitionablePaint.setValue(G, ne), this._handleSpecialPaintPropertyUpdate(G);
              var dt = this._transitionablePaint._values[G].value;
              return dt.isDataDriven() || $e || Ne || this._handleOverridablePaintPropertyUpdate(G, ct, dt);
            }, O.prototype._handleSpecialPaintPropertyUpdate = function(G) {
            }, O.prototype._handleOverridablePaintPropertyUpdate = function(G, ne, me) {
              return !1;
            }, O.prototype.isHidden = function(G) {
              return !!(this.minzoom && G < this.minzoom) || !!(this.maxzoom && G >= this.maxzoom) || this.visibility === "none";
            }, O.prototype.updateTransitions = function(G) {
              this._transitioningPaint = this._transitionablePaint.transitioned(G, this._transitioningPaint);
            }, O.prototype.hasTransition = function() {
              return this._transitioningPaint.hasTransition();
            }, O.prototype.recalculate = function(G, ne) {
              G.getCrossfadeParameters && (this._crossfadeParameters = G.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(G, void 0, ne)), this.paint = this._transitioningPaint.possiblyEvaluate(G, void 0, ne);
            }, O.prototype.serialize = function() {
              var G = { id: this.id, type: this.type, source: this.source, "source-layer": this.sourceLayer, metadata: this.metadata, minzoom: this.minzoom, maxzoom: this.maxzoom, filter: this.filter, layout: this._unevaluatedLayout && this._unevaluatedLayout.serialize(), paint: this._transitionablePaint && this._transitionablePaint.serialize() };
              return this.visibility && (G.layout = G.layout || {}, G.layout.visibility = this.visibility), w(G, function(ne, me) {
                return !(ne === void 0 || me === "layout" && !Object.keys(ne).length || me === "paint" && !Object.keys(ne).length);
              });
            }, O.prototype._validate = function(G, ne, me, _e, Ce) {
              return Ce === void 0 && (Ce = {}), (!Ce || Ce.validate !== !1) && Tn(this, G.call(Wr, { key: ne, layerType: this.type, objectKey: me, value: _e, styleSpec: be, style: { glyphs: !0, sprite: !0 } }));
            }, O.prototype.is3D = function() {
              return !1;
            }, O.prototype.isTileClipped = function() {
              return !1;
            }, O.prototype.hasOffscreenPass = function() {
              return !1;
            }, O.prototype.resize = function() {
            }, O.prototype.isStateDependent = function() {
              for (var G in this.paint._values) {
                var ne = this.paint.get(G);
                if (ne instanceof zi && Uo(ne.property.specification) && (ne.value.kind === "source" || ne.value.kind === "composite") && ne.value.isStateDependent)
                  return !0;
              }
              return !1;
            }, O;
          }(he), Xs = { Int8: Int8Array, Uint8: Uint8Array, Int16: Int16Array, Uint16: Uint16Array, Int32: Int32Array, Uint32: Uint32Array, Float32: Float32Array }, ws = function(M, O) {
            this._structArray = M, this._pos1 = O * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8;
          }, Ja = function() {
            this.isTransferred = !1, this.capacity = -1, this.resize(0);
          };
          function ni(M, O) {
            O === void 0 && (O = 1);
            var G = 0, ne = 0;
            return { members: M.map(function(me) {
              var _e, Ce = (_e = me.type, Xs[_e].BYTES_PER_ELEMENT), Ne = G = fs(G, Math.max(O, Ce)), $e = me.components || 1;
              return ne = Math.max(ne, Ce), G += Ce * $e, { name: me.name, type: me.type, components: $e, offset: Ne };
            }), size: fs(G, Math.max(ne, O)), alignment: O };
          }
          function fs(M, O) {
            return Math.ceil(M / O) * O;
          }
          Ja.serialize = function(M, O) {
            return M._trim(), O && (M.isTransferred = !0, O.push(M.arrayBuffer)), { length: M.length, arrayBuffer: M.arrayBuffer };
          }, Ja.deserialize = function(M) {
            var O = Object.create(this.prototype);
            return O.arrayBuffer = M.arrayBuffer, O.length = M.length, O.capacity = M.arrayBuffer.byteLength / O.bytesPerElement, O._refreshViews(), O;
          }, Ja.prototype._trim = function() {
            this.length !== this.capacity && (this.capacity = this.length, this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement), this._refreshViews());
          }, Ja.prototype.clear = function() {
            this.length = 0;
          }, Ja.prototype.resize = function(M) {
            this.reserve(M), this.length = M;
          }, Ja.prototype.reserve = function(M) {
            if (M > this.capacity) {
              this.capacity = Math.max(M, Math.floor(5 * this.capacity), 128), this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);
              var O = this.uint8;
              this._refreshViews(), O && this.uint8.set(O);
            }
          }, Ja.prototype._refreshViews = function() {
            throw new Error("_refreshViews() must be implemented by each concrete StructArray layout");
          };
          var as = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne) {
              var me = this.length;
              return this.resize(me + 1), this.emplace(me, G, ne);
            }, O.prototype.emplace = function(G, ne, me) {
              var _e = 2 * G;
              return this.int16[_e + 0] = ne, this.int16[_e + 1] = me, G;
            }, O;
          }(Ja);
          as.prototype.bytesPerElement = 4, Zr("StructArrayLayout2i4", as);
          var Li = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e) {
              var Ce = this.length;
              return this.resize(Ce + 1), this.emplace(Ce, G, ne, me, _e);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce) {
              var Ne = 4 * G;
              return this.int16[Ne + 0] = ne, this.int16[Ne + 1] = me, this.int16[Ne + 2] = _e, this.int16[Ne + 3] = Ce, G;
            }, O;
          }(Ja);
          Li.prototype.bytesPerElement = 8, Zr("StructArrayLayout4i8", Li);
          var hs = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne) {
              var $e = this.length;
              return this.resize($e + 1), this.emplace($e, G, ne, me, _e, Ce, Ne);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e) {
              var ct = 6 * G;
              return this.int16[ct + 0] = ne, this.int16[ct + 1] = me, this.int16[ct + 2] = _e, this.int16[ct + 3] = Ce, this.int16[ct + 4] = Ne, this.int16[ct + 5] = $e, G;
            }, O;
          }(Ja);
          hs.prototype.bytesPerElement = 12, Zr("StructArrayLayout2i4i12", hs);
          var Ts = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne) {
              var $e = this.length;
              return this.resize($e + 1), this.emplace($e, G, ne, me, _e, Ce, Ne);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e) {
              var ct = 4 * G, dt = 8 * G;
              return this.int16[ct + 0] = ne, this.int16[ct + 1] = me, this.uint8[dt + 4] = _e, this.uint8[dt + 5] = Ce, this.uint8[dt + 6] = Ne, this.uint8[dt + 7] = $e, G;
            }, O;
          }(Ja);
          Ts.prototype.bytesPerElement = 8, Zr("StructArrayLayout2i4ub8", Ts);
          var gs = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt) {
              var Wt = this.length;
              return this.resize(Wt + 1), this.emplace(Wt, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt) {
              var qt = 9 * G, ir = 18 * G;
              return this.uint16[qt + 0] = ne, this.uint16[qt + 1] = me, this.uint16[qt + 2] = _e, this.uint16[qt + 3] = Ce, this.uint16[qt + 4] = Ne, this.uint16[qt + 5] = $e, this.uint16[qt + 6] = ct, this.uint16[qt + 7] = dt, this.uint8[ir + 16] = Rt, this.uint8[ir + 17] = Wt, G;
            }, O;
          }(Ja);
          gs.prototype.bytesPerElement = 18, Zr("StructArrayLayout8ui2ub18", gs);
          var ks = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt) {
              var ir = this.length;
              return this.resize(ir + 1), this.emplace(ir, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir) {
              var yr = 12 * G;
              return this.int16[yr + 0] = ne, this.int16[yr + 1] = me, this.int16[yr + 2] = _e, this.int16[yr + 3] = Ce, this.uint16[yr + 4] = Ne, this.uint16[yr + 5] = $e, this.uint16[yr + 6] = ct, this.uint16[yr + 7] = dt, this.int16[yr + 8] = Rt, this.int16[yr + 9] = Wt, this.int16[yr + 10] = qt, this.int16[yr + 11] = ir, G;
            }, O;
          }(Ja);
          ks.prototype.bytesPerElement = 24, Zr("StructArrayLayout4i4ui4i24", ks);
          var is = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me) {
              var _e = this.length;
              return this.resize(_e + 1), this.emplace(_e, G, ne, me);
            }, O.prototype.emplace = function(G, ne, me, _e) {
              var Ce = 3 * G;
              return this.float32[Ce + 0] = ne, this.float32[Ce + 1] = me, this.float32[Ce + 2] = _e, G;
            }, O;
          }(Ja);
          is.prototype.bytesPerElement = 12, Zr("StructArrayLayout3f12", is);
          var Js = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G) {
              var ne = this.length;
              return this.resize(ne + 1), this.emplace(ne, G);
            }, O.prototype.emplace = function(G, ne) {
              var me = 1 * G;
              return this.uint32[me + 0] = ne, G;
            }, O;
          }(Ja);
          Js.prototype.bytesPerElement = 4, Zr("StructArrayLayout1ul4", Js);
          var il = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne, $e, ct, dt) {
              var Rt = this.length;
              return this.resize(Rt + 1), this.emplace(Rt, G, ne, me, _e, Ce, Ne, $e, ct, dt);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt) {
              var Wt = 10 * G, qt = 5 * G;
              return this.int16[Wt + 0] = ne, this.int16[Wt + 1] = me, this.int16[Wt + 2] = _e, this.int16[Wt + 3] = Ce, this.int16[Wt + 4] = Ne, this.int16[Wt + 5] = $e, this.uint32[qt + 3] = ct, this.uint16[Wt + 8] = dt, this.uint16[Wt + 9] = Rt, G;
            }, O;
          }(Ja);
          il.prototype.bytesPerElement = 20, Zr("StructArrayLayout6i1ul2ui20", il);
          var ps = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne) {
              var $e = this.length;
              return this.resize($e + 1), this.emplace($e, G, ne, me, _e, Ce, Ne);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e) {
              var ct = 6 * G;
              return this.int16[ct + 0] = ne, this.int16[ct + 1] = me, this.int16[ct + 2] = _e, this.int16[ct + 3] = Ce, this.int16[ct + 4] = Ne, this.int16[ct + 5] = $e, G;
            }, O;
          }(Ja);
          ps.prototype.bytesPerElement = 12, Zr("StructArrayLayout2i2i2i12", ps);
          var Ks = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce) {
              var Ne = this.length;
              return this.resize(Ne + 1), this.emplace(Ne, G, ne, me, _e, Ce);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne) {
              var $e = 4 * G, ct = 8 * G;
              return this.float32[$e + 0] = ne, this.float32[$e + 1] = me, this.float32[$e + 2] = _e, this.int16[ct + 6] = Ce, this.int16[ct + 7] = Ne, G;
            }, O;
          }(Ja);
          Ks.prototype.bytesPerElement = 16, Zr("StructArrayLayout2f1f2i16", Ks);
          var Ms = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e) {
              var Ce = this.length;
              return this.resize(Ce + 1), this.emplace(Ce, G, ne, me, _e);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce) {
              var Ne = 12 * G, $e = 3 * G;
              return this.uint8[Ne + 0] = ne, this.uint8[Ne + 1] = me, this.float32[$e + 1] = _e, this.float32[$e + 2] = Ce, G;
            }, O;
          }(Ja);
          Ms.prototype.bytesPerElement = 12, Zr("StructArrayLayout2ub2f12", Ms);
          var to = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me) {
              var _e = this.length;
              return this.resize(_e + 1), this.emplace(_e, G, ne, me);
            }, O.prototype.emplace = function(G, ne, me, _e) {
              var Ce = 3 * G;
              return this.uint16[Ce + 0] = ne, this.uint16[Ce + 1] = me, this.uint16[Ce + 2] = _e, G;
            }, O;
          }(Ja);
          to.prototype.bytesPerElement = 6, Zr("StructArrayLayout3ui6", to);
          var ol = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr, Cr, Lr, jr) {
              var Ur = this.length;
              return this.resize(Ur + 1), this.emplace(Ur, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr, Cr, Lr, jr);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr, Cr, Lr, jr, Ur) {
              var Yr = 24 * G, fn = 12 * G, yn = 48 * G;
              return this.int16[Yr + 0] = ne, this.int16[Yr + 1] = me, this.uint16[Yr + 2] = _e, this.uint16[Yr + 3] = Ce, this.uint32[fn + 2] = Ne, this.uint32[fn + 3] = $e, this.uint32[fn + 4] = ct, this.uint16[Yr + 10] = dt, this.uint16[Yr + 11] = Rt, this.uint16[Yr + 12] = Wt, this.float32[fn + 7] = qt, this.float32[fn + 8] = ir, this.uint8[yn + 36] = yr, this.uint8[yn + 37] = Cr, this.uint8[yn + 38] = Lr, this.uint32[fn + 10] = jr, this.int16[Yr + 22] = Ur, G;
            }, O;
          }(Ja);
          ol.prototype.bytesPerElement = 48, Zr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", ol);
          var sl = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr, Cr, Lr, jr, Ur, Yr, fn, yn, Bn, Fn, Gn, oa, sa, Jn, pa) {
              var fa = this.length;
              return this.resize(fa + 1), this.emplace(fa, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr, Cr, Lr, jr, Ur, Yr, fn, yn, Bn, Fn, Gn, oa, sa, Jn, pa);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr, Cr, Lr, jr, Ur, Yr, fn, yn, Bn, Fn, Gn, oa, sa, Jn, pa, fa) {
              var la = 34 * G, Ka = 17 * G;
              return this.int16[la + 0] = ne, this.int16[la + 1] = me, this.int16[la + 2] = _e, this.int16[la + 3] = Ce, this.int16[la + 4] = Ne, this.int16[la + 5] = $e, this.int16[la + 6] = ct, this.int16[la + 7] = dt, this.uint16[la + 8] = Rt, this.uint16[la + 9] = Wt, this.uint16[la + 10] = qt, this.uint16[la + 11] = ir, this.uint16[la + 12] = yr, this.uint16[la + 13] = Cr, this.uint16[la + 14] = Lr, this.uint16[la + 15] = jr, this.uint16[la + 16] = Ur, this.uint16[la + 17] = Yr, this.uint16[la + 18] = fn, this.uint16[la + 19] = yn, this.uint16[la + 20] = Bn, this.uint16[la + 21] = Fn, this.uint16[la + 22] = Gn, this.uint32[Ka + 12] = oa, this.float32[Ka + 13] = sa, this.float32[Ka + 14] = Jn, this.float32[Ka + 15] = pa, this.float32[Ka + 16] = fa, G;
            }, O;
          }(Ja);
          sl.prototype.bytesPerElement = 68, Zr("StructArrayLayout8i15ui1ul4f68", sl);
          var ce = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G) {
              var ne = this.length;
              return this.resize(ne + 1), this.emplace(ne, G);
            }, O.prototype.emplace = function(G, ne) {
              var me = 1 * G;
              return this.float32[me + 0] = ne, G;
            }, O;
          }(Ja);
          ce.prototype.bytesPerElement = 4, Zr("StructArrayLayout1f4", ce);
          var C = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me) {
              var _e = this.length;
              return this.resize(_e + 1), this.emplace(_e, G, ne, me);
            }, O.prototype.emplace = function(G, ne, me, _e) {
              var Ce = 3 * G;
              return this.int16[Ce + 0] = ne, this.int16[Ce + 1] = me, this.int16[Ce + 2] = _e, G;
            }, O;
          }(Ja);
          C.prototype.bytesPerElement = 6, Zr("StructArrayLayout3i6", C);
          var D = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me) {
              var _e = this.length;
              return this.resize(_e + 1), this.emplace(_e, G, ne, me);
            }, O.prototype.emplace = function(G, ne, me, _e) {
              var Ce = 2 * G, Ne = 4 * G;
              return this.uint32[Ce + 0] = ne, this.uint16[Ne + 2] = me, this.uint16[Ne + 3] = _e, G;
            }, O;
          }(Ja);
          D.prototype.bytesPerElement = 8, Zr("StructArrayLayout1ul2ui8", D);
          var F = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne) {
              var me = this.length;
              return this.resize(me + 1), this.emplace(me, G, ne);
            }, O.prototype.emplace = function(G, ne, me) {
              var _e = 2 * G;
              return this.uint16[_e + 0] = ne, this.uint16[_e + 1] = me, G;
            }, O;
          }(Ja);
          F.prototype.bytesPerElement = 4, Zr("StructArrayLayout2ui4", F);
          var q = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G) {
              var ne = this.length;
              return this.resize(ne + 1), this.emplace(ne, G);
            }, O.prototype.emplace = function(G, ne) {
              var me = 1 * G;
              return this.uint16[me + 0] = ne, G;
            }, O;
          }(Ja);
          q.prototype.bytesPerElement = 2, Zr("StructArrayLayout1ui2", q);
          var ae = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne) {
              var me = this.length;
              return this.resize(me + 1), this.emplace(me, G, ne);
            }, O.prototype.emplace = function(G, ne, me) {
              var _e = 2 * G;
              return this.float32[_e + 0] = ne, this.float32[_e + 1] = me, G;
            }, O;
          }(Ja);
          ae.prototype.bytesPerElement = 8, Zr("StructArrayLayout2f8", ae);
          var fe = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._refreshViews = function() {
              this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
            }, O.prototype.emplaceBack = function(G, ne, me, _e) {
              var Ce = this.length;
              return this.resize(Ce + 1), this.emplace(Ce, G, ne, me, _e);
            }, O.prototype.emplace = function(G, ne, me, _e, Ce) {
              var Ne = 4 * G;
              return this.float32[Ne + 0] = ne, this.float32[Ne + 1] = me, this.float32[Ne + 2] = _e, this.float32[Ne + 3] = Ce, G;
            }, O;
          }(Ja);
          fe.prototype.bytesPerElement = 16, Zr("StructArrayLayout4f16", fe);
          var xe = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O;
            var G = { anchorPointX: { configurable: !0 }, anchorPointY: { configurable: !0 }, x1: { configurable: !0 }, y1: { configurable: !0 }, x2: { configurable: !0 }, y2: { configurable: !0 }, featureIndex: { configurable: !0 }, sourceLayerIndex: { configurable: !0 }, bucketIndex: { configurable: !0 }, anchorPoint: { configurable: !0 } };
            return G.anchorPointX.get = function() {
              return this._structArray.int16[this._pos2 + 0];
            }, G.anchorPointY.get = function() {
              return this._structArray.int16[this._pos2 + 1];
            }, G.x1.get = function() {
              return this._structArray.int16[this._pos2 + 2];
            }, G.y1.get = function() {
              return this._structArray.int16[this._pos2 + 3];
            }, G.x2.get = function() {
              return this._structArray.int16[this._pos2 + 4];
            }, G.y2.get = function() {
              return this._structArray.int16[this._pos2 + 5];
            }, G.featureIndex.get = function() {
              return this._structArray.uint32[this._pos4 + 3];
            }, G.sourceLayerIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 8];
            }, G.bucketIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 9];
            }, G.anchorPoint.get = function() {
              return new t(this.anchorPointX, this.anchorPointY);
            }, Object.defineProperties(O.prototype, G), O;
          }(ws);
          xe.prototype.size = 20;
          var ke = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.get = function(G) {
              return new xe(this, G);
            }, O;
          }(il);
          Zr("CollisionBoxArray", ke);
          var Le = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O;
            var G = { anchorX: { configurable: !0 }, anchorY: { configurable: !0 }, glyphStartIndex: { configurable: !0 }, numGlyphs: { configurable: !0 }, vertexStartIndex: { configurable: !0 }, lineStartIndex: { configurable: !0 }, lineLength: { configurable: !0 }, segment: { configurable: !0 }, lowerSize: { configurable: !0 }, upperSize: { configurable: !0 }, lineOffsetX: { configurable: !0 }, lineOffsetY: { configurable: !0 }, writingMode: { configurable: !0 }, placedOrientation: { configurable: !0 }, hidden: { configurable: !0 }, crossTileID: { configurable: !0 }, associatedIconIndex: { configurable: !0 } };
            return G.anchorX.get = function() {
              return this._structArray.int16[this._pos2 + 0];
            }, G.anchorY.get = function() {
              return this._structArray.int16[this._pos2 + 1];
            }, G.glyphStartIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 2];
            }, G.numGlyphs.get = function() {
              return this._structArray.uint16[this._pos2 + 3];
            }, G.vertexStartIndex.get = function() {
              return this._structArray.uint32[this._pos4 + 2];
            }, G.lineStartIndex.get = function() {
              return this._structArray.uint32[this._pos4 + 3];
            }, G.lineLength.get = function() {
              return this._structArray.uint32[this._pos4 + 4];
            }, G.segment.get = function() {
              return this._structArray.uint16[this._pos2 + 10];
            }, G.lowerSize.get = function() {
              return this._structArray.uint16[this._pos2 + 11];
            }, G.upperSize.get = function() {
              return this._structArray.uint16[this._pos2 + 12];
            }, G.lineOffsetX.get = function() {
              return this._structArray.float32[this._pos4 + 7];
            }, G.lineOffsetY.get = function() {
              return this._structArray.float32[this._pos4 + 8];
            }, G.writingMode.get = function() {
              return this._structArray.uint8[this._pos1 + 36];
            }, G.placedOrientation.get = function() {
              return this._structArray.uint8[this._pos1 + 37];
            }, G.placedOrientation.set = function(ne) {
              this._structArray.uint8[this._pos1 + 37] = ne;
            }, G.hidden.get = function() {
              return this._structArray.uint8[this._pos1 + 38];
            }, G.hidden.set = function(ne) {
              this._structArray.uint8[this._pos1 + 38] = ne;
            }, G.crossTileID.get = function() {
              return this._structArray.uint32[this._pos4 + 10];
            }, G.crossTileID.set = function(ne) {
              this._structArray.uint32[this._pos4 + 10] = ne;
            }, G.associatedIconIndex.get = function() {
              return this._structArray.int16[this._pos2 + 22];
            }, Object.defineProperties(O.prototype, G), O;
          }(ws);
          Le.prototype.size = 48;
          var Ve = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.get = function(G) {
              return new Le(this, G);
            }, O;
          }(ol);
          Zr("PlacedSymbolArray", Ve);
          var Je = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O;
            var G = { anchorX: { configurable: !0 }, anchorY: { configurable: !0 }, rightJustifiedTextSymbolIndex: { configurable: !0 }, centerJustifiedTextSymbolIndex: { configurable: !0 }, leftJustifiedTextSymbolIndex: { configurable: !0 }, verticalPlacedTextSymbolIndex: { configurable: !0 }, placedIconSymbolIndex: { configurable: !0 }, verticalPlacedIconSymbolIndex: { configurable: !0 }, key: { configurable: !0 }, textBoxStartIndex: { configurable: !0 }, textBoxEndIndex: { configurable: !0 }, verticalTextBoxStartIndex: { configurable: !0 }, verticalTextBoxEndIndex: { configurable: !0 }, iconBoxStartIndex: { configurable: !0 }, iconBoxEndIndex: { configurable: !0 }, verticalIconBoxStartIndex: { configurable: !0 }, verticalIconBoxEndIndex: { configurable: !0 }, featureIndex: { configurable: !0 }, numHorizontalGlyphVertices: { configurable: !0 }, numVerticalGlyphVertices: { configurable: !0 }, numIconVertices: { configurable: !0 }, numVerticalIconVertices: { configurable: !0 }, useRuntimeCollisionCircles: { configurable: !0 }, crossTileID: { configurable: !0 }, textBoxScale: { configurable: !0 }, textOffset0: { configurable: !0 }, textOffset1: { configurable: !0 }, collisionCircleDiameter: { configurable: !0 } };
            return G.anchorX.get = function() {
              return this._structArray.int16[this._pos2 + 0];
            }, G.anchorY.get = function() {
              return this._structArray.int16[this._pos2 + 1];
            }, G.rightJustifiedTextSymbolIndex.get = function() {
              return this._structArray.int16[this._pos2 + 2];
            }, G.centerJustifiedTextSymbolIndex.get = function() {
              return this._structArray.int16[this._pos2 + 3];
            }, G.leftJustifiedTextSymbolIndex.get = function() {
              return this._structArray.int16[this._pos2 + 4];
            }, G.verticalPlacedTextSymbolIndex.get = function() {
              return this._structArray.int16[this._pos2 + 5];
            }, G.placedIconSymbolIndex.get = function() {
              return this._structArray.int16[this._pos2 + 6];
            }, G.verticalPlacedIconSymbolIndex.get = function() {
              return this._structArray.int16[this._pos2 + 7];
            }, G.key.get = function() {
              return this._structArray.uint16[this._pos2 + 8];
            }, G.textBoxStartIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 9];
            }, G.textBoxEndIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 10];
            }, G.verticalTextBoxStartIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 11];
            }, G.verticalTextBoxEndIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 12];
            }, G.iconBoxStartIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 13];
            }, G.iconBoxEndIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 14];
            }, G.verticalIconBoxStartIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 15];
            }, G.verticalIconBoxEndIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 16];
            }, G.featureIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 17];
            }, G.numHorizontalGlyphVertices.get = function() {
              return this._structArray.uint16[this._pos2 + 18];
            }, G.numVerticalGlyphVertices.get = function() {
              return this._structArray.uint16[this._pos2 + 19];
            }, G.numIconVertices.get = function() {
              return this._structArray.uint16[this._pos2 + 20];
            }, G.numVerticalIconVertices.get = function() {
              return this._structArray.uint16[this._pos2 + 21];
            }, G.useRuntimeCollisionCircles.get = function() {
              return this._structArray.uint16[this._pos2 + 22];
            }, G.crossTileID.get = function() {
              return this._structArray.uint32[this._pos4 + 12];
            }, G.crossTileID.set = function(ne) {
              this._structArray.uint32[this._pos4 + 12] = ne;
            }, G.textBoxScale.get = function() {
              return this._structArray.float32[this._pos4 + 13];
            }, G.textOffset0.get = function() {
              return this._structArray.float32[this._pos4 + 14];
            }, G.textOffset1.get = function() {
              return this._structArray.float32[this._pos4 + 15];
            }, G.collisionCircleDiameter.get = function() {
              return this._structArray.float32[this._pos4 + 16];
            }, Object.defineProperties(O.prototype, G), O;
          }(ws);
          Je.prototype.size = 68;
          var at = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.get = function(G) {
              return new Je(this, G);
            }, O;
          }(sl);
          Zr("SymbolInstanceArray", at);
          var _t = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.getoffsetX = function(G) {
              return this.float32[1 * G + 0];
            }, O;
          }(ce);
          Zr("GlyphOffsetArray", _t);
          var Et = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.getx = function(G) {
              return this.int16[3 * G + 0];
            }, O.prototype.gety = function(G) {
              return this.int16[3 * G + 1];
            }, O.prototype.gettileUnitDistanceFromAnchor = function(G) {
              return this.int16[3 * G + 2];
            }, O;
          }(C);
          Zr("SymbolLineVertexArray", Et);
          var kt = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O;
            var G = { featureIndex: { configurable: !0 }, sourceLayerIndex: { configurable: !0 }, bucketIndex: { configurable: !0 } };
            return G.featureIndex.get = function() {
              return this._structArray.uint32[this._pos4 + 0];
            }, G.sourceLayerIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 2];
            }, G.bucketIndex.get = function() {
              return this._structArray.uint16[this._pos2 + 3];
            }, Object.defineProperties(O.prototype, G), O;
          }(ws);
          kt.prototype.size = 8;
          var At = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.get = function(G) {
              return new kt(this, G);
            }, O;
          }(D);
          Zr("FeatureIndexArray", At);
          var xt = ni([{ name: "a_pos", components: 2, type: "Int16" }], 4).members, Dt = function(M) {
            M === void 0 && (M = []), this.segments = M;
          };
          function Ot(M, O) {
            return 256 * (M = h(Math.floor(M), 0, 255)) + (O = h(Math.floor(O), 0, 255));
          }
          Dt.prototype.prepareSegment = function(M, O, G, ne) {
            var me = this.segments[this.segments.length - 1];
            return M > Dt.MAX_VERTEX_ARRAY_LENGTH && A("Max vertices per segment is " + Dt.MAX_VERTEX_ARRAY_LENGTH + ": bucket requested " + M), (!me || me.vertexLength + M > Dt.MAX_VERTEX_ARRAY_LENGTH || me.sortKey !== ne) && (me = { vertexOffset: O.length, primitiveOffset: G.length, vertexLength: 0, primitiveLength: 0 }, ne !== void 0 && (me.sortKey = ne), this.segments.push(me)), me;
          }, Dt.prototype.get = function() {
            return this.segments;
          }, Dt.prototype.destroy = function() {
            for (var M = 0, O = this.segments; M < O.length; M += 1) {
              var G = O[M];
              for (var ne in G.vaos)
                G.vaos[ne].destroy();
            }
          }, Dt.simpleSegment = function(M, O, G, ne) {
            return new Dt([{ vertexOffset: M, primitiveOffset: O, vertexLength: G, primitiveLength: ne, vaos: {}, sortKey: 0 }]);
          }, Dt.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Zr("SegmentVector", Dt);
          var jt = ni([{ name: "a_pattern_from", components: 4, type: "Uint16" }, { name: "a_pattern_to", components: 4, type: "Uint16" }, { name: "a_pixel_ratio_from", components: 1, type: "Uint8" }, { name: "a_pixel_ratio_to", components: 1, type: "Uint8" }]), rr = r(function(M) {
            M.exports = function(O, G) {
              var ne, me, _e, Ce, Ne, $e, ct, dt;
              for (ne = 3 & O.length, me = O.length - ne, _e = G, Ne = 3432918353, $e = 461845907, dt = 0; dt < me; )
                ct = 255 & O.charCodeAt(dt) | (255 & O.charCodeAt(++dt)) << 8 | (255 & O.charCodeAt(++dt)) << 16 | (255 & O.charCodeAt(++dt)) << 24, ++dt, _e = 27492 + (65535 & (Ce = 5 * (65535 & (_e = (_e ^= ct = (65535 & (ct = (ct = (65535 & ct) * Ne + (((ct >>> 16) * Ne & 65535) << 16) & 4294967295) << 15 | ct >>> 17)) * $e + (((ct >>> 16) * $e & 65535) << 16) & 4294967295) << 13 | _e >>> 19)) + ((5 * (_e >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (Ce >>> 16) & 65535) << 16);
              switch (ct = 0, ne) {
                case 3:
                  ct ^= (255 & O.charCodeAt(dt + 2)) << 16;
                case 2:
                  ct ^= (255 & O.charCodeAt(dt + 1)) << 8;
                case 1:
                  _e ^= ct = (65535 & (ct = (ct = (65535 & (ct ^= 255 & O.charCodeAt(dt))) * Ne + (((ct >>> 16) * Ne & 65535) << 16) & 4294967295) << 15 | ct >>> 17)) * $e + (((ct >>> 16) * $e & 65535) << 16) & 4294967295;
              }
              return _e ^= O.length, _e = 2246822507 * (65535 & (_e ^= _e >>> 16)) + ((2246822507 * (_e >>> 16) & 65535) << 16) & 4294967295, _e = 3266489909 * (65535 & (_e ^= _e >>> 13)) + ((3266489909 * (_e >>> 16) & 65535) << 16) & 4294967295, (_e ^= _e >>> 16) >>> 0;
            };
          }), dr = r(function(M) {
            M.exports = function(O, G) {
              for (var ne, me = O.length, _e = G ^ me, Ce = 0; me >= 4; )
                ne = 1540483477 * (65535 & (ne = 255 & O.charCodeAt(Ce) | (255 & O.charCodeAt(++Ce)) << 8 | (255 & O.charCodeAt(++Ce)) << 16 | (255 & O.charCodeAt(++Ce)) << 24)) + ((1540483477 * (ne >>> 16) & 65535) << 16), _e = 1540483477 * (65535 & _e) + ((1540483477 * (_e >>> 16) & 65535) << 16) ^ (ne = 1540483477 * (65535 & (ne ^= ne >>> 24)) + ((1540483477 * (ne >>> 16) & 65535) << 16)), me -= 4, ++Ce;
              switch (me) {
                case 3:
                  _e ^= (255 & O.charCodeAt(Ce + 2)) << 16;
                case 2:
                  _e ^= (255 & O.charCodeAt(Ce + 1)) << 8;
                case 1:
                  _e = 1540483477 * (65535 & (_e ^= 255 & O.charCodeAt(Ce))) + ((1540483477 * (_e >>> 16) & 65535) << 16);
              }
              return _e = 1540483477 * (65535 & (_e ^= _e >>> 13)) + ((1540483477 * (_e >>> 16) & 65535) << 16), (_e ^= _e >>> 15) >>> 0;
            };
          }), Sr = rr, kr = rr, Jr = dr;
          Sr.murmur3 = kr, Sr.murmur2 = Jr;
          var Xr = function() {
            this.ids = [], this.positions = [], this.indexed = !1;
          };
          Xr.prototype.add = function(M, O, G, ne) {
            this.ids.push(on(M)), this.positions.push(O, G, ne);
          }, Xr.prototype.getPositions = function(M) {
            for (var O = on(M), G = 0, ne = this.ids.length - 1; G < ne; ) {
              var me = G + ne >> 1;
              this.ids[me] >= O ? ne = me : G = me + 1;
            }
            for (var _e = []; this.ids[G] === O; ) {
              var Ce = this.positions[3 * G], Ne = this.positions[3 * G + 1], $e = this.positions[3 * G + 2];
              _e.push({ index: Ce, start: Ne, end: $e }), G++;
            }
            return _e;
          }, Xr.serialize = function(M, O) {
            var G = new Float64Array(M.ids), ne = new Uint32Array(M.positions);
            return function me(_e, Ce, Ne, $e) {
              for (; Ne < $e; ) {
                for (var ct = _e[Ne + $e >> 1], dt = Ne - 1, Rt = $e + 1; ; ) {
                  do
                    dt++;
                  while (_e[dt] < ct);
                  do
                    Rt--;
                  while (_e[Rt] > ct);
                  if (dt >= Rt)
                    break;
                  jn(_e, dt, Rt), jn(Ce, 3 * dt, 3 * Rt), jn(Ce, 3 * dt + 1, 3 * Rt + 1), jn(Ce, 3 * dt + 2, 3 * Rt + 2);
                }
                Rt - Ne < $e - Rt ? (me(_e, Ce, Ne, Rt), Ne = Rt + 1) : (me(_e, Ce, Rt + 1, $e), $e = Rt);
              }
            }(G, ne, 0, G.length - 1), O && O.push(G.buffer, ne.buffer), { ids: G, positions: ne };
          }, Xr.deserialize = function(M) {
            var O = new Xr();
            return O.ids = M.ids, O.positions = M.positions, O.indexed = !0, O;
          };
          var hn = Math.pow(2, 53) - 1;
          function on(M) {
            var O = +M;
            return !isNaN(O) && O <= hn ? O : Sr(String(M));
          }
          function jn(M, O, G) {
            var ne = M[O];
            M[O] = M[G], M[G] = ne;
          }
          Zr("FeaturePositionMap", Xr);
          var Wn = function(M, O) {
            this.gl = M.gl, this.location = O;
          }, ua = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = 0;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              this.current !== G && (this.current = G, this.gl.uniform1i(this.location, G));
            }, O;
          }(Wn), qr = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = 0;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              this.current !== G && (this.current = G, this.gl.uniform1f(this.location, G));
            }, O;
          }(Wn), Mn = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = [0, 0];
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              G[0] === this.current[0] && G[1] === this.current[1] || (this.current = G, this.gl.uniform2f(this.location, G[0], G[1]));
            }, O;
          }(Wn), Zn = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = [0, 0, 0];
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              G[0] === this.current[0] && G[1] === this.current[1] && G[2] === this.current[2] || (this.current = G, this.gl.uniform3f(this.location, G[0], G[1], G[2]));
            }, O;
          }(Wn), qn = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = [0, 0, 0, 0];
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              G[0] === this.current[0] && G[1] === this.current[1] && G[2] === this.current[2] && G[3] === this.current[3] || (this.current = G, this.gl.uniform4f(this.location, G[0], G[1], G[2], G[3]));
            }, O;
          }(Wn), na = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = Kt.transparent;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              G.r === this.current.r && G.g === this.current.g && G.b === this.current.b && G.a === this.current.a || (this.current = G, this.gl.uniform4f(this.location, G.r, G.g, G.b, G.a));
            }, O;
          }(Wn), ha = new Float32Array(16), Sa = function(M) {
            function O(G, ne) {
              M.call(this, G, ne), this.current = ha;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.set = function(G) {
              if (G[12] !== this.current[12] || G[0] !== this.current[0])
                return this.current = G, void this.gl.uniformMatrix4fv(this.location, !1, G);
              for (var ne = 1; ne < 16; ne++)
                if (G[ne] !== this.current[ne]) {
                  this.current = G, this.gl.uniformMatrix4fv(this.location, !1, G);
                  break;
                }
            }, O;
          }(Wn);
          function Qn(M) {
            return [Ot(255 * M.r, 255 * M.g), Ot(255 * M.b, 255 * M.a)];
          }
          var xa = function(M, O, G) {
            this.value = M, this.uniformNames = O.map(function(ne) {
              return "u_" + ne;
            }), this.type = G;
          };
          xa.prototype.setUniform = function(M, O, G) {
            M.set(G.constantOr(this.value));
          }, xa.prototype.getBinding = function(M, O, G) {
            return this.type === "color" ? new na(M, O) : new qr(M, O);
          };
          var ga = function(M, O) {
            this.uniformNames = O.map(function(G) {
              return "u_" + G;
            }), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1;
          };
          ga.prototype.setConstantPatternPositions = function(M, O) {
            this.pixelRatioFrom = O.pixelRatio, this.pixelRatioTo = M.pixelRatio, this.patternFrom = O.tlbr, this.patternTo = M.tlbr;
          }, ga.prototype.setUniform = function(M, O, G, ne) {
            var me = ne === "u_pattern_to" ? this.patternTo : ne === "u_pattern_from" ? this.patternFrom : ne === "u_pixel_ratio_to" ? this.pixelRatioTo : ne === "u_pixel_ratio_from" ? this.pixelRatioFrom : null;
            me && M.set(me);
          }, ga.prototype.getBinding = function(M, O, G) {
            return G.substr(0, 9) === "u_pattern" ? new qn(M, O) : new qr(M, O);
          };
          var Ca = function(M, O, G, ne) {
            this.expression = M, this.type = G, this.maxValue = 0, this.paintVertexAttributes = O.map(function(me) {
              return { name: "a_" + me, type: "Float32", components: G === "color" ? 2 : 1, offset: 0 };
            }), this.paintVertexArray = new ne();
          };
          Ca.prototype.populatePaintArray = function(M, O, G, ne, me) {
            var _e = this.paintVertexArray.length, Ce = this.expression.evaluate(new ri(0), O, {}, ne, [], me);
            this.paintVertexArray.resize(M), this._setPaintValue(_e, M, Ce);
          }, Ca.prototype.updatePaintArray = function(M, O, G, ne) {
            var me = this.expression.evaluate({ zoom: 0 }, G, ne);
            this._setPaintValue(M, O, me);
          }, Ca.prototype._setPaintValue = function(M, O, G) {
            if (this.type === "color")
              for (var ne = Qn(G), me = M; me < O; me++)
                this.paintVertexArray.emplace(me, ne[0], ne[1]);
            else {
              for (var _e = M; _e < O; _e++)
                this.paintVertexArray.emplace(_e, G);
              this.maxValue = Math.max(this.maxValue, Math.abs(G));
            }
          }, Ca.prototype.upload = function(M) {
            this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = M.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));
          }, Ca.prototype.destroy = function() {
            this.paintVertexBuffer && this.paintVertexBuffer.destroy();
          };
          var ba = function(M, O, G, ne, me, _e) {
            this.expression = M, this.uniformNames = O.map(function(Ce) {
              return "u_" + Ce + "_t";
            }), this.type = G, this.useIntegerZoom = ne, this.zoom = me, this.maxValue = 0, this.paintVertexAttributes = O.map(function(Ce) {
              return { name: "a_" + Ce, type: "Float32", components: G === "color" ? 4 : 2, offset: 0 };
            }), this.paintVertexArray = new _e();
          };
          ba.prototype.populatePaintArray = function(M, O, G, ne, me) {
            var _e = this.expression.evaluate(new ri(this.zoom), O, {}, ne, [], me), Ce = this.expression.evaluate(new ri(this.zoom + 1), O, {}, ne, [], me), Ne = this.paintVertexArray.length;
            this.paintVertexArray.resize(M), this._setPaintValue(Ne, M, _e, Ce);
          }, ba.prototype.updatePaintArray = function(M, O, G, ne) {
            var me = this.expression.evaluate({ zoom: this.zoom }, G, ne), _e = this.expression.evaluate({ zoom: this.zoom + 1 }, G, ne);
            this._setPaintValue(M, O, me, _e);
          }, ba.prototype._setPaintValue = function(M, O, G, ne) {
            if (this.type === "color")
              for (var me = Qn(G), _e = Qn(ne), Ce = M; Ce < O; Ce++)
                this.paintVertexArray.emplace(Ce, me[0], me[1], _e[0], _e[1]);
            else {
              for (var Ne = M; Ne < O; Ne++)
                this.paintVertexArray.emplace(Ne, G, ne);
              this.maxValue = Math.max(this.maxValue, Math.abs(G), Math.abs(ne));
            }
          }, ba.prototype.upload = function(M) {
            this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = M.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));
          }, ba.prototype.destroy = function() {
            this.paintVertexBuffer && this.paintVertexBuffer.destroy();
          }, ba.prototype.setUniform = function(M, O) {
            var G = this.useIntegerZoom ? Math.floor(O.zoom) : O.zoom, ne = h(this.expression.interpolationFactor(G, this.zoom, this.zoom + 1), 0, 1);
            M.set(ne);
          }, ba.prototype.getBinding = function(M, O, G) {
            return new qr(M, O);
          };
          var Pa = function(M, O, G, ne, me, _e) {
            this.expression = M, this.type = O, this.useIntegerZoom = G, this.zoom = ne, this.layerId = _e, this.zoomInPaintVertexArray = new me(), this.zoomOutPaintVertexArray = new me();
          };
          Pa.prototype.populatePaintArray = function(M, O, G) {
            var ne = this.zoomInPaintVertexArray.length;
            this.zoomInPaintVertexArray.resize(M), this.zoomOutPaintVertexArray.resize(M), this._setPaintValues(ne, M, O.patterns && O.patterns[this.layerId], G);
          }, Pa.prototype.updatePaintArray = function(M, O, G, ne, me) {
            this._setPaintValues(M, O, G.patterns && G.patterns[this.layerId], me);
          }, Pa.prototype._setPaintValues = function(M, O, G, ne) {
            if (ne && G) {
              var me = G.min, _e = G.mid, Ce = G.max, Ne = ne[me], $e = ne[_e], ct = ne[Ce];
              if (Ne && $e && ct)
                for (var dt = M; dt < O; dt++)
                  this.zoomInPaintVertexArray.emplace(dt, $e.tl[0], $e.tl[1], $e.br[0], $e.br[1], Ne.tl[0], Ne.tl[1], Ne.br[0], Ne.br[1], $e.pixelRatio, Ne.pixelRatio), this.zoomOutPaintVertexArray.emplace(dt, $e.tl[0], $e.tl[1], $e.br[0], $e.br[1], ct.tl[0], ct.tl[1], ct.br[0], ct.br[1], $e.pixelRatio, ct.pixelRatio);
            }
          }, Pa.prototype.upload = function(M) {
            this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer && (this.zoomInPaintVertexBuffer = M.createVertexBuffer(this.zoomInPaintVertexArray, jt.members, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = M.createVertexBuffer(this.zoomOutPaintVertexArray, jt.members, this.expression.isStateDependent));
          }, Pa.prototype.destroy = function() {
            this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy();
          };
          var Ua = function(M, O, G, ne) {
            this.binders = {}, this.layoutAttributes = ne, this._buffers = [];
            var me = [];
            for (var _e in M.paint._values)
              if (G(_e)) {
                var Ce = M.paint.get(_e);
                if (Ce instanceof zi && Uo(Ce.property.specification)) {
                  var Ne = Ci(_e, M.type), $e = Ce.value, ct = Ce.property.specification.type, dt = Ce.property.useIntegerZoom, Rt = Ce.property.specification["property-type"], Wt = Rt === "cross-faded" || Rt === "cross-faded-data-driven";
                  if ($e.kind === "constant")
                    this.binders[_e] = Wt ? new ga($e.value, Ne) : new xa($e.value, Ne, ct), me.push("/u_" + _e);
                  else if ($e.kind === "source" || Wt) {
                    var qt = Pi(_e, ct, "source");
                    this.binders[_e] = Wt ? new Pa($e, ct, dt, O, qt, M.id) : new Ca($e, Ne, ct, qt), me.push("/a_" + _e);
                  } else {
                    var ir = Pi(_e, ct, "composite");
                    this.binders[_e] = new ba($e, Ne, ct, dt, O, ir), me.push("/z_" + _e);
                  }
                }
              }
            this.cacheKey = me.sort().join("");
          };
          Ua.prototype.getMaxValue = function(M) {
            var O = this.binders[M];
            return O instanceof Ca || O instanceof ba ? O.maxValue : 0;
          }, Ua.prototype.populatePaintArrays = function(M, O, G, ne, me) {
            for (var _e in this.binders) {
              var Ce = this.binders[_e];
              (Ce instanceof Ca || Ce instanceof ba || Ce instanceof Pa) && Ce.populatePaintArray(M, O, G, ne, me);
            }
          }, Ua.prototype.setConstantPatternPositions = function(M, O) {
            for (var G in this.binders) {
              var ne = this.binders[G];
              ne instanceof ga && ne.setConstantPatternPositions(M, O);
            }
          }, Ua.prototype.updatePaintArrays = function(M, O, G, ne, me) {
            var _e = !1;
            for (var Ce in M)
              for (var Ne = 0, $e = O.getPositions(Ce); Ne < $e.length; Ne += 1) {
                var ct = $e[Ne], dt = G.feature(ct.index);
                for (var Rt in this.binders) {
                  var Wt = this.binders[Rt];
                  if ((Wt instanceof Ca || Wt instanceof ba || Wt instanceof Pa) && Wt.expression.isStateDependent === !0) {
                    var qt = ne.paint.get(Rt);
                    Wt.expression = qt.value, Wt.updatePaintArray(ct.start, ct.end, dt, M[Ce], me), _e = !0;
                  }
                }
              }
            return _e;
          }, Ua.prototype.defines = function() {
            var M = [];
            for (var O in this.binders) {
              var G = this.binders[O];
              (G instanceof xa || G instanceof ga) && M.push.apply(M, G.uniformNames.map(function(ne) {
                return "#define HAS_UNIFORM_" + ne;
              }));
            }
            return M;
          }, Ua.prototype.getPaintVertexBuffers = function() {
            return this._buffers;
          }, Ua.prototype.getUniforms = function(M, O) {
            var G = [];
            for (var ne in this.binders) {
              var me = this.binders[ne];
              if (me instanceof xa || me instanceof ga || me instanceof ba)
                for (var _e = 0, Ce = me.uniformNames; _e < Ce.length; _e += 1) {
                  var Ne = Ce[_e];
                  if (O[Ne]) {
                    var $e = me.getBinding(M, O[Ne], Ne);
                    G.push({ name: Ne, property: ne, binding: $e });
                  }
                }
            }
            return G;
          }, Ua.prototype.setUniforms = function(M, O, G, ne) {
            for (var me = 0, _e = O; me < _e.length; me += 1) {
              var Ce = _e[me], Ne = Ce.name, $e = Ce.property, ct = Ce.binding;
              this.binders[$e].setUniform(ct, ne, G.get($e), Ne);
            }
          }, Ua.prototype.updatePaintBuffers = function(M) {
            for (var O in this._buffers = [], this.binders) {
              var G = this.binders[O];
              if (M && G instanceof Pa) {
                var ne = M.fromScale === 2 ? G.zoomInPaintVertexBuffer : G.zoomOutPaintVertexBuffer;
                ne && this._buffers.push(ne);
              } else
                (G instanceof Ca || G instanceof ba) && G.paintVertexBuffer && this._buffers.push(G.paintVertexBuffer);
            }
          }, Ua.prototype.upload = function(M) {
            for (var O in this.binders) {
              var G = this.binders[O];
              (G instanceof Ca || G instanceof ba || G instanceof Pa) && G.upload(M);
            }
            this.updatePaintBuffers();
          }, Ua.prototype.destroy = function() {
            for (var M in this.binders) {
              var O = this.binders[M];
              (O instanceof Ca || O instanceof ba || O instanceof Pa) && O.destroy();
            }
          };
          var ci = function(M, O, G, ne) {
            ne === void 0 && (ne = function() {
              return !0;
            }), this.programConfigurations = {};
            for (var me = 0, _e = O; me < _e.length; me += 1) {
              var Ce = _e[me];
              this.programConfigurations[Ce.id] = new Ua(Ce, G, ne, M);
            }
            this.needsUpload = !1, this._featureMap = new Xr(), this._bufferOffset = 0;
          };
          function Ci(M, O) {
            return { "text-opacity": ["opacity"], "icon-opacity": ["opacity"], "text-color": ["fill_color"], "icon-color": ["fill_color"], "text-halo-color": ["halo_color"], "icon-halo-color": ["halo_color"], "text-halo-blur": ["halo_blur"], "icon-halo-blur": ["halo_blur"], "text-halo-width": ["halo_width"], "icon-halo-width": ["halo_width"], "line-gap-width": ["gapwidth"], "line-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"], "fill-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"], "fill-extrusion-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"] }[M] || [M.replace(O + "-", "").replace(/-/g, "_")];
          }
          function Pi(M, O, G) {
            var ne = { color: { source: ae, composite: fe }, number: { source: ce, composite: ae } }, me = function(_e) {
              return { "line-pattern": { source: gs, composite: gs }, "fill-pattern": { source: gs, composite: gs }, "fill-extrusion-pattern": { source: gs, composite: gs } }[_e];
            }(M);
            return me && me[G] || ne[O][G];
          }
          ci.prototype.populatePaintArrays = function(M, O, G, ne, me, _e) {
            for (var Ce in this.programConfigurations)
              this.programConfigurations[Ce].populatePaintArrays(M, O, ne, me, _e);
            O.id !== void 0 && this._featureMap.add(O.id, G, this._bufferOffset, M), this._bufferOffset = M, this.needsUpload = !0;
          }, ci.prototype.updatePaintArrays = function(M, O, G, ne) {
            for (var me = 0, _e = G; me < _e.length; me += 1) {
              var Ce = _e[me];
              this.needsUpload = this.programConfigurations[Ce.id].updatePaintArrays(M, this._featureMap, O, Ce, ne) || this.needsUpload;
            }
          }, ci.prototype.get = function(M) {
            return this.programConfigurations[M];
          }, ci.prototype.upload = function(M) {
            if (this.needsUpload) {
              for (var O in this.programConfigurations)
                this.programConfigurations[O].upload(M);
              this.needsUpload = !1;
            }
          }, ci.prototype.destroy = function() {
            for (var M in this.programConfigurations)
              this.programConfigurations[M].destroy();
          }, Zr("ConstantBinder", xa), Zr("CrossFadedConstantBinder", ga), Zr("SourceExpressionBinder", Ca), Zr("CrossFadedCompositeBinder", Pa), Zr("CompositeExpressionBinder", ba), Zr("ProgramConfiguration", Ua, { omit: ["_buffers"] }), Zr("ProgramConfigurationSet", ci);
          var li, Ti = (li = 15, { min: -1 * Math.pow(2, li - 1), max: Math.pow(2, li - 1) - 1 });
          function mi(M) {
            for (var O = 8192 / M.extent, G = M.loadGeometry(), ne = 0; ne < G.length; ne++)
              for (var me = G[ne], _e = 0; _e < me.length; _e++) {
                var Ce = me[_e];
                Ce.x = Math.round(Ce.x * O), Ce.y = Math.round(Ce.y * O), (Ce.x < Ti.min || Ce.x > Ti.max || Ce.y < Ti.min || Ce.y > Ti.max) && (A("Geometry exceeds allowed extent, reduce your vector tile buffer size"), Ce.x = h(Ce.x, Ti.min, Ti.max), Ce.y = h(Ce.y, Ti.min, Ti.max));
              }
            return G;
          }
          function yo(M, O, G, ne, me) {
            M.emplaceBack(2 * O + (ne + 1) / 2, 2 * G + (me + 1) / 2);
          }
          var qi = function(M) {
            this.zoom = M.zoom, this.overscaling = M.overscaling, this.layers = M.layers, this.layerIds = this.layers.map(function(O) {
              return O.id;
            }), this.index = M.index, this.hasPattern = !1, this.layoutVertexArray = new as(), this.indexArray = new to(), this.segments = new Dt(), this.programConfigurations = new ci(xt, M.layers, M.zoom), this.stateDependentLayerIds = this.layers.filter(function(O) {
              return O.isStateDependent();
            }).map(function(O) {
              return O.id;
            });
          };
          function zo(M, O) {
            for (var G = 0; G < M.length; G++)
              if (es(O, M[G]))
                return !0;
            for (var ne = 0; ne < O.length; ne++)
              if (es(M, O[ne]))
                return !0;
            return !!Qs(M, O);
          }
          function vs(M, O, G) {
            return !!es(M, O) || !!xo(O, M, G);
          }
          function Fs(M, O) {
            if (M.length === 1)
              return cl(O, M[0]);
            for (var G = 0; G < O.length; G++)
              for (var ne = O[G], me = 0; me < ne.length; me++)
                if (es(M, ne[me]))
                  return !0;
            for (var _e = 0; _e < M.length; _e++)
              if (cl(O, M[_e]))
                return !0;
            for (var Ce = 0; Ce < O.length; Ce++)
              if (Qs(M, O[Ce]))
                return !0;
            return !1;
          }
          function ll(M, O, G) {
            if (M.length > 1) {
              if (Qs(M, O))
                return !0;
              for (var ne = 0; ne < O.length; ne++)
                if (xo(O[ne], M, G))
                  return !0;
            }
            for (var me = 0; me < M.length; me++)
              if (xo(M[me], O, G))
                return !0;
            return !1;
          }
          function Qs(M, O) {
            if (M.length === 0 || O.length === 0)
              return !1;
            for (var G = 0; G < M.length - 1; G++)
              for (var ne = M[G], me = M[G + 1], _e = 0; _e < O.length - 1; _e++)
                if ($s(ne, me, O[_e], O[_e + 1]))
                  return !0;
            return !1;
          }
          function $s(M, O, G, ne) {
            return I(M, G, ne) !== I(O, G, ne) && I(M, O, G) !== I(M, O, ne);
          }
          function xo(M, O, G) {
            var ne = G * G;
            if (O.length === 1)
              return M.distSqr(O[0]) < ne;
            for (var me = 1; me < O.length; me++)
              if (Us(M, O[me - 1], O[me]) < ne)
                return !0;
            return !1;
          }
          function Us(M, O, G) {
            var ne = O.distSqr(G);
            if (ne === 0)
              return M.distSqr(O);
            var me = ((M.x - O.x) * (G.x - O.x) + (M.y - O.y) * (G.y - O.y)) / ne;
            return me < 0 ? M.distSqr(O) : me > 1 ? M.distSqr(G) : M.distSqr(G.sub(O)._mult(me)._add(O));
          }
          function cl(M, O) {
            for (var G, ne, me, _e = !1, Ce = 0; Ce < M.length; Ce++)
              for (var Ne = 0, $e = (G = M[Ce]).length - 1; Ne < G.length; $e = Ne++)
                ne = G[Ne], me = G[$e], ne.y > O.y != me.y > O.y && O.x < (me.x - ne.x) * (O.y - ne.y) / (me.y - ne.y) + ne.x && (_e = !_e);
            return _e;
          }
          function es(M, O) {
            for (var G = !1, ne = 0, me = M.length - 1; ne < M.length; me = ne++) {
              var _e = M[ne], Ce = M[me];
              _e.y > O.y != Ce.y > O.y && O.x < (Ce.x - _e.x) * (O.y - _e.y) / (Ce.y - _e.y) + _e.x && (G = !G);
            }
            return G;
          }
          function ul(M, O, G) {
            var ne = G[0], me = G[2];
            if (M.x < ne.x && O.x < ne.x || M.x > me.x && O.x > me.x || M.y < ne.y && O.y < ne.y || M.y > me.y && O.y > me.y)
              return !1;
            var _e = I(M, O, G[0]);
            return _e !== I(M, O, G[1]) || _e !== I(M, O, G[2]) || _e !== I(M, O, G[3]);
          }
          function ki(M, O, G) {
            var ne = O.paint.get(M).value;
            return ne.kind === "constant" ? ne.value : G.programConfigurations.get(O.id).getMaxValue(M);
          }
          function Co(M) {
            return Math.sqrt(M[0] * M[0] + M[1] * M[1]);
          }
          function Po(M, O, G, ne, me) {
            if (!O[0] && !O[1])
              return M;
            var _e = t.convert(O)._mult(me);
            G === "viewport" && _e._rotate(-ne);
            for (var Ce = [], Ne = 0; Ne < M.length; Ne++) {
              var $e = M[Ne];
              Ce.push($e.sub(_e));
            }
            return Ce;
          }
          qi.prototype.populate = function(M, O, G) {
            var ne = this.layers[0], me = [], _e = null;
            ne.type === "circle" && (_e = ne.layout.get("circle-sort-key"));
            for (var Ce = 0, Ne = M; Ce < Ne.length; Ce += 1) {
              var $e = Ne[Ce], ct = $e.feature, dt = $e.id, Rt = $e.index, Wt = $e.sourceLayerIndex, qt = this.layers[0]._featureFilter.needGeometry, ir = { type: ct.type, id: dt, properties: ct.properties, geometry: qt ? mi(ct) : [] };
              if (this.layers[0]._featureFilter.filter(new ri(this.zoom), ir, G)) {
                qt || (ir.geometry = mi(ct));
                var yr = _e ? _e.evaluate(ir, {}, G) : void 0, Cr = { id: dt, properties: ct.properties, type: ct.type, sourceLayerIndex: Wt, index: Rt, geometry: ir.geometry, patterns: {}, sortKey: yr };
                me.push(Cr);
              }
            }
            _e && me.sort(function(Gn, oa) {
              return Gn.sortKey - oa.sortKey;
            });
            for (var Lr = 0, jr = me; Lr < jr.length; Lr += 1) {
              var Ur = jr[Lr], Yr = Ur, fn = Yr.geometry, yn = Yr.index, Bn = Yr.sourceLayerIndex, Fn = M[yn].feature;
              this.addFeature(Ur, fn, yn, G), O.featureIndex.insert(Fn, fn, yn, Bn, this.index);
            }
          }, qi.prototype.update = function(M, O, G) {
            this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(M, O, this.stateDependentLayers, G);
          }, qi.prototype.isEmpty = function() {
            return this.layoutVertexArray.length === 0;
          }, qi.prototype.uploadPending = function() {
            return !this.uploaded || this.programConfigurations.needsUpload;
          }, qi.prototype.upload = function(M) {
            this.uploaded || (this.layoutVertexBuffer = M.createVertexBuffer(this.layoutVertexArray, xt), this.indexBuffer = M.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(M), this.uploaded = !0;
          }, qi.prototype.destroy = function() {
            this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
          }, qi.prototype.addFeature = function(M, O, G, ne) {
            for (var me = 0, _e = O; me < _e.length; me += 1)
              for (var Ce = 0, Ne = _e[me]; Ce < Ne.length; Ce += 1) {
                var $e = Ne[Ce], ct = $e.x, dt = $e.y;
                if (!(ct < 0 || ct >= 8192 || dt < 0 || dt >= 8192)) {
                  var Rt = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray, M.sortKey), Wt = Rt.vertexLength;
                  yo(this.layoutVertexArray, ct, dt, -1, -1), yo(this.layoutVertexArray, ct, dt, 1, -1), yo(this.layoutVertexArray, ct, dt, 1, 1), yo(this.layoutVertexArray, ct, dt, -1, 1), this.indexArray.emplaceBack(Wt, Wt + 1, Wt + 2), this.indexArray.emplaceBack(Wt, Wt + 3, Wt + 2), Rt.vertexLength += 4, Rt.primitiveLength += 2;
                }
              }
            this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, M, G, {}, ne);
          }, Zr("CircleBucket", qi, { omit: ["layers"] });
          var xl = new Lo({ "circle-sort-key": new ya(be.layout_circle["circle-sort-key"]) }), eu = { paint: new Lo({ "circle-radius": new ya(be.paint_circle["circle-radius"]), "circle-color": new ya(be.paint_circle["circle-color"]), "circle-blur": new ya(be.paint_circle["circle-blur"]), "circle-opacity": new ya(be.paint_circle["circle-opacity"]), "circle-translate": new ca(be.paint_circle["circle-translate"]), "circle-translate-anchor": new ca(be.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new ca(be.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new ca(be.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new ya(be.paint_circle["circle-stroke-width"]), "circle-stroke-color": new ya(be.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new ya(be.paint_circle["circle-stroke-opacity"]) }), layout: xl }, Yo = typeof Float32Array < "u" ? Float32Array : Array;
          function Wl(M) {
            return M[0] = 1, M[1] = 0, M[2] = 0, M[3] = 0, M[4] = 0, M[5] = 1, M[6] = 0, M[7] = 0, M[8] = 0, M[9] = 0, M[10] = 1, M[11] = 0, M[12] = 0, M[13] = 0, M[14] = 0, M[15] = 1, M;
          }
          function fl(M, O, G) {
            var ne = O[0], me = O[1], _e = O[2], Ce = O[3], Ne = O[4], $e = O[5], ct = O[6], dt = O[7], Rt = O[8], Wt = O[9], qt = O[10], ir = O[11], yr = O[12], Cr = O[13], Lr = O[14], jr = O[15], Ur = G[0], Yr = G[1], fn = G[2], yn = G[3];
            return M[0] = Ur * ne + Yr * Ne + fn * Rt + yn * yr, M[1] = Ur * me + Yr * $e + fn * Wt + yn * Cr, M[2] = Ur * _e + Yr * ct + fn * qt + yn * Lr, M[3] = Ur * Ce + Yr * dt + fn * ir + yn * jr, Ur = G[4], Yr = G[5], fn = G[6], yn = G[7], M[4] = Ur * ne + Yr * Ne + fn * Rt + yn * yr, M[5] = Ur * me + Yr * $e + fn * Wt + yn * Cr, M[6] = Ur * _e + Yr * ct + fn * qt + yn * Lr, M[7] = Ur * Ce + Yr * dt + fn * ir + yn * jr, Ur = G[8], Yr = G[9], fn = G[10], yn = G[11], M[8] = Ur * ne + Yr * Ne + fn * Rt + yn * yr, M[9] = Ur * me + Yr * $e + fn * Wt + yn * Cr, M[10] = Ur * _e + Yr * ct + fn * qt + yn * Lr, M[11] = Ur * Ce + Yr * dt + fn * ir + yn * jr, Ur = G[12], Yr = G[13], fn = G[14], yn = G[15], M[12] = Ur * ne + Yr * Ne + fn * Rt + yn * yr, M[13] = Ur * me + Yr * $e + fn * Wt + yn * Cr, M[14] = Ur * _e + Yr * ct + fn * qt + yn * Lr, M[15] = Ur * Ce + Yr * dt + fn * ir + yn * jr, M;
          }
          Math.hypot || (Math.hypot = function() {
            for (var M = arguments, O = 0, G = arguments.length; G--; )
              O += M[G] * M[G];
            return Math.sqrt(O);
          });
          var tu = fl, Vs, ru = function(M, O, G) {
            return M[0] = O[0] - G[0], M[1] = O[1] - G[1], M[2] = O[2] - G[2], M;
          };
          Vs = new Yo(3), Yo != Float32Array && (Vs[0] = 0, Vs[1] = 0, Vs[2] = 0);
          function bl(M, O, G) {
            var ne = O[0], me = O[1], _e = O[2], Ce = O[3];
            return M[0] = G[0] * ne + G[4] * me + G[8] * _e + G[12] * Ce, M[1] = G[1] * ne + G[5] * me + G[9] * _e + G[13] * Ce, M[2] = G[2] * ne + G[6] * me + G[10] * _e + G[14] * Ce, M[3] = G[3] * ne + G[7] * me + G[11] * _e + G[15] * Ce, M;
          }
          (function() {
            (function() {
              var M = new Yo(4);
              return Yo != Float32Array && (M[0] = 0, M[1] = 0, M[2] = 0, M[3] = 0), M;
            })();
          })();
          var Zl = function(M) {
            var O = M[0], G = M[1];
            return O * O + G * G;
          }, hh = (function() {
            (function() {
              var M = new Yo(2);
              return Yo != Float32Array && (M[0] = 0, M[1] = 0), M;
            })();
          }(), function(M) {
            function O(G) {
              M.call(this, G, eu);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.createBucket = function(G) {
              return new qi(G);
            }, O.prototype.queryRadius = function(G) {
              var ne = G;
              return ki("circle-radius", this, ne) + ki("circle-stroke-width", this, ne) + Co(this.paint.get("circle-translate"));
            }, O.prototype.queryIntersectsFeature = function(G, ne, me, _e, Ce, Ne, $e, ct) {
              for (var dt = Po(G, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), Ne.angle, $e), Rt = this.paint.get("circle-radius").evaluate(ne, me) + this.paint.get("circle-stroke-width").evaluate(ne, me), Wt = this.paint.get("circle-pitch-alignment") === "map", qt = Wt ? dt : function(Bn, Fn) {
                return Bn.map(function(Gn) {
                  return Bu(Gn, Fn);
                });
              }(dt, ct), ir = Wt ? Rt * $e : Rt, yr = 0, Cr = _e; yr < Cr.length; yr += 1)
                for (var Lr = 0, jr = Cr[yr]; Lr < jr.length; Lr += 1) {
                  var Ur = jr[Lr], Yr = Wt ? Ur : Bu(Ur, ct), fn = ir, yn = bl([], [Ur.x, Ur.y, 0, 1], ct);
                  if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? fn *= yn[3] / Ne.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (fn *= Ne.cameraToCenterDistance / yn[3]), vs(qt, Yr, fn))
                    return !0;
                }
              return !1;
            }, O;
          }(Vo));
          function Bu(M, O) {
            var G = bl([], [M.x, M.y, 0, 1], O);
            return new t(G[0] / G[3], G[1] / G[3]);
          }
          var Nu = function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O;
          }(qi);
          function nu(M, O, G, ne) {
            var me = O.width, _e = O.height;
            if (ne) {
              if (ne instanceof Uint8ClampedArray)
                ne = new Uint8Array(ne.buffer);
              else if (ne.length !== me * _e * G)
                throw new RangeError("mismatched image size");
            } else
              ne = new Uint8Array(me * _e * G);
            return M.width = me, M.height = _e, M.data = ne, M;
          }
          function ju(M, O, G) {
            var ne = O.width, me = O.height;
            if (ne !== M.width || me !== M.height) {
              var _e = nu({}, { width: ne, height: me }, G);
              au(M, _e, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(M.width, ne), height: Math.min(M.height, me) }, G), M.width = ne, M.height = me, M.data = _e.data;
            }
          }
          function au(M, O, G, ne, me, _e) {
            if (me.width === 0 || me.height === 0)
              return O;
            if (me.width > M.width || me.height > M.height || G.x > M.width - me.width || G.y > M.height - me.height)
              throw new RangeError("out of range source coordinates for image copy");
            if (me.width > O.width || me.height > O.height || ne.x > O.width - me.width || ne.y > O.height - me.height)
              throw new RangeError("out of range destination coordinates for image copy");
            for (var Ce = M.data, Ne = O.data, $e = 0; $e < me.height; $e++)
              for (var ct = ((G.y + $e) * M.width + G.x) * _e, dt = ((ne.y + $e) * O.width + ne.x) * _e, Rt = 0; Rt < me.width * _e; Rt++)
                Ne[dt + Rt] = Ce[ct + Rt];
            return O;
          }
          Zr("HeatmapBucket", Nu, { omit: ["layers"] });
          var hl = function(M, O) {
            nu(this, M, 1, O);
          };
          hl.prototype.resize = function(M) {
            ju(this, M, 1);
          }, hl.prototype.clone = function() {
            return new hl({ width: this.width, height: this.height }, new Uint8Array(this.data));
          }, hl.copy = function(M, O, G, ne, me) {
            au(M, O, G, ne, me, 1);
          };
          var Wo = function(M, O) {
            nu(this, M, 4, O);
          };
          Wo.prototype.resize = function(M) {
            ju(this, M, 4);
          }, Wo.prototype.replace = function(M, O) {
            O ? this.data.set(M) : M instanceof Uint8ClampedArray ? this.data = new Uint8Array(M.buffer) : this.data = M;
          }, Wo.prototype.clone = function() {
            return new Wo({ width: this.width, height: this.height }, new Uint8Array(this.data));
          }, Wo.copy = function(M, O, G, ne, me) {
            au(M, O, G, ne, me, 4);
          }, Zr("AlphaImage", hl), Zr("RGBAImage", Wo);
          var ph = { paint: new Lo({ "heatmap-radius": new ya(be.paint_heatmap["heatmap-radius"]), "heatmap-weight": new ya(be.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new ca(be.paint_heatmap["heatmap-intensity"]), "heatmap-color": new $o(be.paint_heatmap["heatmap-color"]), "heatmap-opacity": new ca(be.paint_heatmap["heatmap-opacity"]) }) };
          function Uu(M, O) {
            for (var G = new Uint8Array(1024), ne = {}, me = 0, _e = 0; me < 256; me++, _e += 4) {
              ne[O] = me / 255;
              var Ce = M.evaluate(ne);
              G[_e + 0] = Math.floor(255 * Ce.r / Ce.a), G[_e + 1] = Math.floor(255 * Ce.g / Ce.a), G[_e + 2] = Math.floor(255 * Ce.b / Ce.a), G[_e + 3] = Math.floor(255 * Ce.a);
            }
            return new Wo({ width: 256, height: 1 }, G);
          }
          var dh = function(M) {
            function O(G) {
              M.call(this, G, ph), this._updateColorRamp();
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.createBucket = function(G) {
              return new Nu(G);
            }, O.prototype._handleSpecialPaintPropertyUpdate = function(G) {
              G === "heatmap-color" && this._updateColorRamp();
            }, O.prototype._updateColorRamp = function() {
              var G = this._transitionablePaint._values["heatmap-color"].value.expression;
              this.colorRamp = Uu(G, "heatmapDensity"), this.colorRampTexture = null;
            }, O.prototype.resize = function() {
              this.heatmapFbo && (this.heatmapFbo.destroy(), this.heatmapFbo = null);
            }, O.prototype.queryRadius = function() {
              return 0;
            }, O.prototype.queryIntersectsFeature = function() {
              return !1;
            }, O.prototype.hasOffscreenPass = function() {
              return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none";
            }, O;
          }(Vo), mh = { paint: new Lo({ "hillshade-illumination-direction": new ca(be.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-anchor": new ca(be.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new ca(be.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new ca(be.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new ca(be.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new ca(be.paint_hillshade["hillshade-accent-color"]) }) }, gh = function(M) {
            function O(G) {
              M.call(this, G, mh);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.hasOffscreenPass = function() {
              return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none";
            }, O;
          }(Vo), Vu = ni([{ name: "a_pos", components: 2, type: "Int16" }], 4).members, iu = gc, vh = gc;
          function gc(M, O, G) {
            G = G || 2;
            var ne, me, _e, Ce, Ne, $e, ct, dt = O && O.length, Rt = dt ? O[0] * G : M.length, Wt = Hu(M, 0, Rt, G, !0), qt = [];
            if (!Wt || Wt.next === Wt.prev)
              return qt;
            if (dt && (Wt = function(yr, Cr, Lr, jr) {
              var Ur, Yr, fn, yn, Bn, Fn = [];
              for (Ur = 0, Yr = Cr.length; Ur < Yr; Ur++)
                fn = Cr[Ur] * jr, yn = Ur < Yr - 1 ? Cr[Ur + 1] * jr : yr.length, (Bn = Hu(yr, fn, yn, jr, !1)) === Bn.next && (Bn.steiner = !0), Fn.push(Mh(Bn));
              for (Fn.sort(wh), Ur = 0; Ur < Fn.length; Ur++)
                Th(Fn[Ur], Lr), Lr = el(Lr, Lr.next);
              return Lr;
            }(M, O, Wt, G)), M.length > 80 * G) {
              ne = _e = M[0], me = Ce = M[1];
              for (var ir = G; ir < Rt; ir += G)
                (Ne = M[ir]) < ne && (ne = Ne), ($e = M[ir + 1]) < me && (me = $e), Ne > _e && (_e = Ne), $e > Ce && (Ce = $e);
              ct = (ct = Math.max(_e - ne, Ce - me)) !== 0 ? 1 / ct : 0;
            }
            return Xl(Wt, qt, G, ne, me, ct), qt;
          }
          function Hu(M, O, G, ne, me) {
            var _e, Ce;
            if (me === lu(M, O, G, ne) > 0)
              for (_e = O; _e < G; _e += ne)
                Ce = Yu(_e, M[_e], M[_e + 1], Ce);
            else
              for (_e = G - ne; _e >= O; _e -= ne)
                Ce = Yu(_e, M[_e], M[_e + 1], Ce);
            return Ce && vc(Ce, Ce.next) && (Kl(Ce), Ce = Ce.next), Ce;
          }
          function el(M, O) {
            if (!M)
              return M;
            O || (O = M);
            var G, ne = M;
            do
              if (G = !1, ne.steiner || !vc(ne, ne.next) && ro(ne.prev, ne, ne.next) !== 0)
                ne = ne.next;
              else {
                if (Kl(ne), (ne = O = ne.prev) === ne.next)
                  break;
                G = !0;
              }
            while (G || ne !== O);
            return O;
          }
          function Xl(M, O, G, ne, me, _e, Ce) {
            if (M) {
              !Ce && _e && function(dt, Rt, Wt, qt) {
                var ir = dt;
                do
                  ir.z === null && (ir.z = ou(ir.x, ir.y, Rt, Wt, qt)), ir.prevZ = ir.prev, ir.nextZ = ir.next, ir = ir.next;
                while (ir !== dt);
                ir.prevZ.nextZ = null, ir.prevZ = null, function(yr) {
                  var Cr, Lr, jr, Ur, Yr, fn, yn, Bn, Fn = 1;
                  do {
                    for (Lr = yr, yr = null, Yr = null, fn = 0; Lr; ) {
                      for (fn++, jr = Lr, yn = 0, Cr = 0; Cr < Fn && (yn++, jr = jr.nextZ); Cr++)
                        ;
                      for (Bn = Fn; yn > 0 || Bn > 0 && jr; )
                        yn !== 0 && (Bn === 0 || !jr || Lr.z <= jr.z) ? (Ur = Lr, Lr = Lr.nextZ, yn--) : (Ur = jr, jr = jr.nextZ, Bn--), Yr ? Yr.nextZ = Ur : yr = Ur, Ur.prevZ = Yr, Yr = Ur;
                      Lr = jr;
                    }
                    Yr.nextZ = null, Fn *= 2;
                  } while (fn > 1);
                }(ir);
              }(M, ne, me, _e);
              for (var Ne, $e, ct = M; M.prev !== M.next; )
                if (Ne = M.prev, $e = M.next, _e ? xh(M, ne, me, _e) : yh(M))
                  O.push(Ne.i / G), O.push(M.i / G), O.push($e.i / G), Kl(M), M = $e.next, ct = $e.next;
                else if ((M = $e) === ct) {
                  Ce ? Ce === 1 ? Xl(M = bh(el(M), O, G), O, G, ne, me, _e, 2) : Ce === 2 && _h(M, O, G, ne, me, _e) : Xl(el(M), O, G, ne, me, _e, 1);
                  break;
                }
            }
          }
          function yh(M) {
            var O = M.prev, G = M, ne = M.next;
            if (ro(O, G, ne) >= 0)
              return !1;
            for (var me = M.next.next; me !== M.prev; ) {
              if (_l(O.x, O.y, G.x, G.y, ne.x, ne.y, me.x, me.y) && ro(me.prev, me, me.next) >= 0)
                return !1;
              me = me.next;
            }
            return !0;
          }
          function xh(M, O, G, ne) {
            var me = M.prev, _e = M, Ce = M.next;
            if (ro(me, _e, Ce) >= 0)
              return !1;
            for (var Ne = me.x < _e.x ? me.x < Ce.x ? me.x : Ce.x : _e.x < Ce.x ? _e.x : Ce.x, $e = me.y < _e.y ? me.y < Ce.y ? me.y : Ce.y : _e.y < Ce.y ? _e.y : Ce.y, ct = me.x > _e.x ? me.x > Ce.x ? me.x : Ce.x : _e.x > Ce.x ? _e.x : Ce.x, dt = me.y > _e.y ? me.y > Ce.y ? me.y : Ce.y : _e.y > Ce.y ? _e.y : Ce.y, Rt = ou(Ne, $e, O, G, ne), Wt = ou(ct, dt, O, G, ne), qt = M.prevZ, ir = M.nextZ; qt && qt.z >= Rt && ir && ir.z <= Wt; ) {
              if (qt !== M.prev && qt !== M.next && _l(me.x, me.y, _e.x, _e.y, Ce.x, Ce.y, qt.x, qt.y) && ro(qt.prev, qt, qt.next) >= 0 || (qt = qt.prevZ, ir !== M.prev && ir !== M.next && _l(me.x, me.y, _e.x, _e.y, Ce.x, Ce.y, ir.x, ir.y) && ro(ir.prev, ir, ir.next) >= 0))
                return !1;
              ir = ir.nextZ;
            }
            for (; qt && qt.z >= Rt; ) {
              if (qt !== M.prev && qt !== M.next && _l(me.x, me.y, _e.x, _e.y, Ce.x, Ce.y, qt.x, qt.y) && ro(qt.prev, qt, qt.next) >= 0)
                return !1;
              qt = qt.prevZ;
            }
            for (; ir && ir.z <= Wt; ) {
              if (ir !== M.prev && ir !== M.next && _l(me.x, me.y, _e.x, _e.y, Ce.x, Ce.y, ir.x, ir.y) && ro(ir.prev, ir, ir.next) >= 0)
                return !1;
              ir = ir.nextZ;
            }
            return !0;
          }
          function bh(M, O, G) {
            var ne = M;
            do {
              var me = ne.prev, _e = ne.next.next;
              !vc(me, _e) && qu(me, ne, ne.next, _e) && Jl(me, _e) && Jl(_e, me) && (O.push(me.i / G), O.push(ne.i / G), O.push(_e.i / G), Kl(ne), Kl(ne.next), ne = M = _e), ne = ne.next;
            } while (ne !== M);
            return el(ne);
          }
          function _h(M, O, G, ne, me, _e) {
            var Ce = M;
            do {
              for (var Ne = Ce.next.next; Ne !== Ce.prev; ) {
                if (Ce.i !== Ne.i && Ah(Ce, Ne)) {
                  var $e = Gu(Ce, Ne);
                  return Ce = el(Ce, Ce.next), $e = el($e, $e.next), Xl(Ce, O, G, ne, me, _e), void Xl($e, O, G, ne, me, _e);
                }
                Ne = Ne.next;
              }
              Ce = Ce.next;
            } while (Ce !== M);
          }
          function wh(M, O) {
            return M.x - O.x;
          }
          function Th(M, O) {
            if (O = function(ne, me) {
              var _e, Ce = me, Ne = ne.x, $e = ne.y, ct = -1 / 0;
              do {
                if ($e <= Ce.y && $e >= Ce.next.y && Ce.next.y !== Ce.y) {
                  var dt = Ce.x + ($e - Ce.y) * (Ce.next.x - Ce.x) / (Ce.next.y - Ce.y);
                  if (dt <= Ne && dt > ct) {
                    if (ct = dt, dt === Ne) {
                      if ($e === Ce.y)
                        return Ce;
                      if ($e === Ce.next.y)
                        return Ce.next;
                    }
                    _e = Ce.x < Ce.next.x ? Ce : Ce.next;
                  }
                }
                Ce = Ce.next;
              } while (Ce !== me);
              if (!_e)
                return null;
              if (Ne === ct)
                return _e;
              var Rt, Wt = _e, qt = _e.x, ir = _e.y, yr = 1 / 0;
              Ce = _e;
              do
                Ne >= Ce.x && Ce.x >= qt && Ne !== Ce.x && _l($e < ir ? Ne : ct, $e, qt, ir, $e < ir ? ct : Ne, $e, Ce.x, Ce.y) && (Rt = Math.abs($e - Ce.y) / (Ne - Ce.x), Jl(Ce, ne) && (Rt < yr || Rt === yr && (Ce.x > _e.x || Ce.x === _e.x && kh(_e, Ce))) && (_e = Ce, yr = Rt)), Ce = Ce.next;
              while (Ce !== Wt);
              return _e;
            }(M, O)) {
              var G = Gu(O, M);
              el(O, O.next), el(G, G.next);
            }
          }
          function kh(M, O) {
            return ro(M.prev, M, O.prev) < 0 && ro(O.next, M, M.next) < 0;
          }
          function ou(M, O, G, ne, me) {
            return (M = 1431655765 & ((M = 858993459 & ((M = 252645135 & ((M = 16711935 & ((M = 32767 * (M - G) * me) | M << 8)) | M << 4)) | M << 2)) | M << 1)) | (O = 1431655765 & ((O = 858993459 & ((O = 252645135 & ((O = 16711935 & ((O = 32767 * (O - ne) * me) | O << 8)) | O << 4)) | O << 2)) | O << 1)) << 1;
          }
          function Mh(M) {
            var O = M, G = M;
            do
              (O.x < G.x || O.x === G.x && O.y < G.y) && (G = O), O = O.next;
            while (O !== M);
            return G;
          }
          function _l(M, O, G, ne, me, _e, Ce, Ne) {
            return (me - Ce) * (O - Ne) - (M - Ce) * (_e - Ne) >= 0 && (M - Ce) * (ne - Ne) - (G - Ce) * (O - Ne) >= 0 && (G - Ce) * (_e - Ne) - (me - Ce) * (ne - Ne) >= 0;
          }
          function Ah(M, O) {
            return M.next.i !== O.i && M.prev.i !== O.i && !function(G, ne) {
              var me = G;
              do {
                if (me.i !== G.i && me.next.i !== G.i && me.i !== ne.i && me.next.i !== ne.i && qu(me, me.next, G, ne))
                  return !0;
                me = me.next;
              } while (me !== G);
              return !1;
            }(M, O) && (Jl(M, O) && Jl(O, M) && function(G, ne) {
              var me = G, _e = !1, Ce = (G.x + ne.x) / 2, Ne = (G.y + ne.y) / 2;
              do
                me.y > Ne != me.next.y > Ne && me.next.y !== me.y && Ce < (me.next.x - me.x) * (Ne - me.y) / (me.next.y - me.y) + me.x && (_e = !_e), me = me.next;
              while (me !== G);
              return _e;
            }(M, O) && (ro(M.prev, M, O.prev) || ro(M, O.prev, O)) || vc(M, O) && ro(M.prev, M, M.next) > 0 && ro(O.prev, O, O.next) > 0);
          }
          function ro(M, O, G) {
            return (O.y - M.y) * (G.x - O.x) - (O.x - M.x) * (G.y - O.y);
          }
          function vc(M, O) {
            return M.x === O.x && M.y === O.y;
          }
          function qu(M, O, G, ne) {
            var me = xc(ro(M, O, G)), _e = xc(ro(M, O, ne)), Ce = xc(ro(G, ne, M)), Ne = xc(ro(G, ne, O));
            return me !== _e && Ce !== Ne || !(me !== 0 || !yc(M, G, O)) || !(_e !== 0 || !yc(M, ne, O)) || !(Ce !== 0 || !yc(G, M, ne)) || !(Ne !== 0 || !yc(G, O, ne));
          }
          function yc(M, O, G) {
            return O.x <= Math.max(M.x, G.x) && O.x >= Math.min(M.x, G.x) && O.y <= Math.max(M.y, G.y) && O.y >= Math.min(M.y, G.y);
          }
          function xc(M) {
            return M > 0 ? 1 : M < 0 ? -1 : 0;
          }
          function Jl(M, O) {
            return ro(M.prev, M, M.next) < 0 ? ro(M, O, M.next) >= 0 && ro(M, M.prev, O) >= 0 : ro(M, O, M.prev) < 0 || ro(M, M.next, O) < 0;
          }
          function Gu(M, O) {
            var G = new su(M.i, M.x, M.y), ne = new su(O.i, O.x, O.y), me = M.next, _e = O.prev;
            return M.next = O, O.prev = M, G.next = me, me.prev = G, ne.next = G, G.prev = ne, _e.next = ne, ne.prev = _e, ne;
          }
          function Yu(M, O, G, ne) {
            var me = new su(M, O, G);
            return ne ? (me.next = ne.next, me.prev = ne, ne.next.prev = me, ne.next = me) : (me.prev = me, me.next = me), me;
          }
          function Kl(M) {
            M.next.prev = M.prev, M.prev.next = M.next, M.prevZ && (M.prevZ.nextZ = M.nextZ), M.nextZ && (M.nextZ.prevZ = M.prevZ);
          }
          function su(M, O, G) {
            this.i = M, this.x = O, this.y = G, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1;
          }
          function lu(M, O, G, ne) {
            for (var me = 0, _e = O, Ce = G - ne; _e < G; _e += ne)
              me += (M[Ce] - M[_e]) * (M[_e + 1] + M[Ce + 1]), Ce = _e;
            return me;
          }
          function Sh(M, O, G, ne, me) {
            (function _e(Ce, Ne, $e, ct, dt) {
              for (; ct > $e; ) {
                if (ct - $e > 600) {
                  var Rt = ct - $e + 1, Wt = Ne - $e + 1, qt = Math.log(Rt), ir = 0.5 * Math.exp(2 * qt / 3), yr = 0.5 * Math.sqrt(qt * ir * (Rt - ir) / Rt) * (Wt - Rt / 2 < 0 ? -1 : 1), Cr = Math.max($e, Math.floor(Ne - Wt * ir / Rt + yr)), Lr = Math.min(ct, Math.floor(Ne + (Rt - Wt) * ir / Rt + yr));
                  _e(Ce, Ne, Cr, Lr, dt);
                }
                var jr = Ce[Ne], Ur = $e, Yr = ct;
                for (Ql(Ce, $e, Ne), dt(Ce[ct], jr) > 0 && Ql(Ce, $e, ct); Ur < Yr; ) {
                  for (Ql(Ce, Ur, Yr), Ur++, Yr--; dt(Ce[Ur], jr) < 0; )
                    Ur++;
                  for (; dt(Ce[Yr], jr) > 0; )
                    Yr--;
                }
                dt(Ce[$e], jr) === 0 ? Ql(Ce, $e, Yr) : (Yr++, Ql(Ce, Yr, ct)), Yr <= Ne && ($e = Yr + 1), Ne <= Yr && (ct = Yr - 1);
              }
            })(M, O, G || 0, ne || M.length - 1, me || Eh);
          }
          function Ql(M, O, G) {
            var ne = M[O];
            M[O] = M[G], M[G] = ne;
          }
          function Eh(M, O) {
            return M < O ? -1 : M > O ? 1 : 0;
          }
          function cu(M, O) {
            var G = M.length;
            if (G <= 1)
              return [M];
            for (var ne, me, _e = [], Ce = 0; Ce < G; Ce++) {
              var Ne = P(M[Ce]);
              Ne !== 0 && (M[Ce].area = Math.abs(Ne), me === void 0 && (me = Ne < 0), me === Ne < 0 ? (ne && _e.push(ne), ne = [M[Ce]]) : ne.push(M[Ce]));
            }
            if (ne && _e.push(ne), O > 1)
              for (var $e = 0; $e < _e.length; $e++)
                _e[$e].length <= O || (Sh(_e[$e], O, 1, _e[$e].length - 1, Lh), _e[$e] = _e[$e].slice(0, O));
            return _e;
          }
          function Lh(M, O) {
            return O.area - M.area;
          }
          function uu(M, O, G) {
            for (var ne = G.patternDependencies, me = !1, _e = 0, Ce = O; _e < Ce.length; _e += 1) {
              var Ne = Ce[_e].paint.get(M + "-pattern");
              Ne.isConstant() || (me = !0);
              var $e = Ne.constantOr(null);
              $e && (me = !0, ne[$e.to] = !0, ne[$e.from] = !0);
            }
            return me;
          }
          function fu(M, O, G, ne, me) {
            for (var _e = me.patternDependencies, Ce = 0, Ne = O; Ce < Ne.length; Ce += 1) {
              var $e = Ne[Ce], ct = $e.paint.get(M + "-pattern").value;
              if (ct.kind !== "constant") {
                var dt = ct.evaluate({ zoom: ne - 1 }, G, {}, me.availableImages), Rt = ct.evaluate({ zoom: ne }, G, {}, me.availableImages), Wt = ct.evaluate({ zoom: ne + 1 }, G, {}, me.availableImages);
                dt = dt && dt.name ? dt.name : dt, Rt = Rt && Rt.name ? Rt.name : Rt, Wt = Wt && Wt.name ? Wt.name : Wt, _e[dt] = !0, _e[Rt] = !0, _e[Wt] = !0, G.patterns[$e.id] = { min: dt, mid: Rt, max: Wt };
              }
            }
            return G;
          }
          gc.deviation = function(M, O, G, ne) {
            var me = O && O.length, _e = me ? O[0] * G : M.length, Ce = Math.abs(lu(M, 0, _e, G));
            if (me)
              for (var Ne = 0, $e = O.length; Ne < $e; Ne++) {
                var ct = O[Ne] * G, dt = Ne < $e - 1 ? O[Ne + 1] * G : M.length;
                Ce -= Math.abs(lu(M, ct, dt, G));
              }
            var Rt = 0;
            for (Ne = 0; Ne < ne.length; Ne += 3) {
              var Wt = ne[Ne] * G, qt = ne[Ne + 1] * G, ir = ne[Ne + 2] * G;
              Rt += Math.abs((M[Wt] - M[ir]) * (M[qt + 1] - M[Wt + 1]) - (M[Wt] - M[qt]) * (M[ir + 1] - M[Wt + 1]));
            }
            return Ce === 0 && Rt === 0 ? 0 : Math.abs((Rt - Ce) / Ce);
          }, gc.flatten = function(M) {
            for (var O = M[0][0].length, G = { vertices: [], holes: [], dimensions: O }, ne = 0, me = 0; me < M.length; me++) {
              for (var _e = 0; _e < M[me].length; _e++)
                for (var Ce = 0; Ce < O; Ce++)
                  G.vertices.push(M[me][_e][Ce]);
              me > 0 && (ne += M[me - 1].length, G.holes.push(ne));
            }
            return G;
          }, iu.default = vh;
          var As = function(M) {
            this.zoom = M.zoom, this.overscaling = M.overscaling, this.layers = M.layers, this.layerIds = this.layers.map(function(O) {
              return O.id;
            }), this.index = M.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new as(), this.indexArray = new to(), this.indexArray2 = new F(), this.programConfigurations = new ci(Vu, M.layers, M.zoom), this.segments = new Dt(), this.segments2 = new Dt(), this.stateDependentLayerIds = this.layers.filter(function(O) {
              return O.isStateDependent();
            }).map(function(O) {
              return O.id;
            });
          };
          As.prototype.populate = function(M, O, G) {
            this.hasPattern = uu("fill", this.layers, O);
            for (var ne = this.layers[0].layout.get("fill-sort-key"), me = [], _e = 0, Ce = M; _e < Ce.length; _e += 1) {
              var Ne = Ce[_e], $e = Ne.feature, ct = Ne.id, dt = Ne.index, Rt = Ne.sourceLayerIndex, Wt = this.layers[0]._featureFilter.needGeometry, qt = { type: $e.type, id: ct, properties: $e.properties, geometry: Wt ? mi($e) : [] };
              if (this.layers[0]._featureFilter.filter(new ri(this.zoom), qt, G)) {
                Wt || (qt.geometry = mi($e));
                var ir = ne ? ne.evaluate(qt, {}, G, O.availableImages) : void 0, yr = { id: ct, properties: $e.properties, type: $e.type, sourceLayerIndex: Rt, index: dt, geometry: qt.geometry, patterns: {}, sortKey: ir };
                me.push(yr);
              }
            }
            ne && me.sort(function(Gn, oa) {
              return Gn.sortKey - oa.sortKey;
            });
            for (var Cr = 0, Lr = me; Cr < Lr.length; Cr += 1) {
              var jr = Lr[Cr], Ur = jr, Yr = Ur.geometry, fn = Ur.index, yn = Ur.sourceLayerIndex;
              if (this.hasPattern) {
                var Bn = fu("fill", this.layers, jr, this.zoom, O);
                this.patternFeatures.push(Bn);
              } else
                this.addFeature(jr, Yr, fn, G, {});
              var Fn = M[fn].feature;
              O.featureIndex.insert(Fn, Yr, fn, yn, this.index);
            }
          }, As.prototype.update = function(M, O, G) {
            this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(M, O, this.stateDependentLayers, G);
          }, As.prototype.addFeatures = function(M, O, G) {
            for (var ne = 0, me = this.patternFeatures; ne < me.length; ne += 1) {
              var _e = me[ne];
              this.addFeature(_e, _e.geometry, _e.index, O, G);
            }
          }, As.prototype.isEmpty = function() {
            return this.layoutVertexArray.length === 0;
          }, As.prototype.uploadPending = function() {
            return !this.uploaded || this.programConfigurations.needsUpload;
          }, As.prototype.upload = function(M) {
            this.uploaded || (this.layoutVertexBuffer = M.createVertexBuffer(this.layoutVertexArray, Vu), this.indexBuffer = M.createIndexBuffer(this.indexArray), this.indexBuffer2 = M.createIndexBuffer(this.indexArray2)), this.programConfigurations.upload(M), this.uploaded = !0;
          }, As.prototype.destroy = function() {
            this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.indexBuffer2.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.segments2.destroy());
          }, As.prototype.addFeature = function(M, O, G, ne, me) {
            for (var _e = 0, Ce = cu(O, 500); _e < Ce.length; _e += 1) {
              for (var Ne = Ce[_e], $e = 0, ct = 0, dt = Ne; ct < dt.length; ct += 1)
                $e += dt[ct].length;
              for (var Rt = this.segments.prepareSegment($e, this.layoutVertexArray, this.indexArray), Wt = Rt.vertexLength, qt = [], ir = [], yr = 0, Cr = Ne; yr < Cr.length; yr += 1) {
                var Lr = Cr[yr];
                if (Lr.length !== 0) {
                  Lr !== Ne[0] && ir.push(qt.length / 2);
                  var jr = this.segments2.prepareSegment(Lr.length, this.layoutVertexArray, this.indexArray2), Ur = jr.vertexLength;
                  this.layoutVertexArray.emplaceBack(Lr[0].x, Lr[0].y), this.indexArray2.emplaceBack(Ur + Lr.length - 1, Ur), qt.push(Lr[0].x), qt.push(Lr[0].y);
                  for (var Yr = 1; Yr < Lr.length; Yr++)
                    this.layoutVertexArray.emplaceBack(Lr[Yr].x, Lr[Yr].y), this.indexArray2.emplaceBack(Ur + Yr - 1, Ur + Yr), qt.push(Lr[Yr].x), qt.push(Lr[Yr].y);
                  jr.vertexLength += Lr.length, jr.primitiveLength += Lr.length;
                }
              }
              for (var fn = iu(qt, ir), yn = 0; yn < fn.length; yn += 3)
                this.indexArray.emplaceBack(Wt + fn[yn], Wt + fn[yn + 1], Wt + fn[yn + 2]);
              Rt.vertexLength += $e, Rt.primitiveLength += fn.length / 3;
            }
            this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, M, G, me, ne);
          }, Zr("FillBucket", As, { omit: ["layers", "patternFeatures"] });
          var Ch = new Lo({ "fill-sort-key": new ya(be.layout_fill["fill-sort-key"]) }), Ph = { paint: new Lo({ "fill-antialias": new ca(be.paint_fill["fill-antialias"]), "fill-opacity": new ya(be.paint_fill["fill-opacity"]), "fill-color": new ya(be.paint_fill["fill-color"]), "fill-outline-color": new ya(be.paint_fill["fill-outline-color"]), "fill-translate": new ca(be.paint_fill["fill-translate"]), "fill-translate-anchor": new ca(be.paint_fill["fill-translate-anchor"]), "fill-pattern": new Ds(be.paint_fill["fill-pattern"]) }), layout: Ch }, Ih = function(M) {
            function O(G) {
              M.call(this, G, Ph);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.recalculate = function(G, ne) {
              M.prototype.recalculate.call(this, G, ne);
              var me = this.paint._values["fill-outline-color"];
              me.value.kind === "constant" && me.value.value === void 0 && (this.paint._values["fill-outline-color"] = this.paint._values["fill-color"]);
            }, O.prototype.createBucket = function(G) {
              return new As(G);
            }, O.prototype.queryRadius = function() {
              return Co(this.paint.get("fill-translate"));
            }, O.prototype.queryIntersectsFeature = function(G, ne, me, _e, Ce, Ne, $e) {
              return Fs(Po(G, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), Ne.angle, $e), _e);
            }, O.prototype.isTileClipped = function() {
              return !0;
            }, O;
          }(Vo), Wu = ni([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_normal_ed", components: 4, type: "Int16" }], 4).members, Zu = wl;
          function wl(M, O, G, ne, me) {
            this.properties = {}, this.extent = G, this.type = 0, this._pbf = M, this._geometry = -1, this._keys = ne, this._values = me, M.readFields(Oh, this, O);
          }
          function Oh(M, O, G) {
            M == 1 ? O.id = G.readVarint() : M == 2 ? function(ne, me) {
              for (var _e = ne.readVarint() + ne.pos; ne.pos < _e; ) {
                var Ce = me._keys[ne.readVarint()], Ne = me._values[ne.readVarint()];
                me.properties[Ce] = Ne;
              }
            }(G, O) : M == 3 ? O.type = G.readVarint() : M == 4 && (O._geometry = G.pos);
          }
          function zh(M) {
            for (var O, G, ne = 0, me = 0, _e = M.length, Ce = _e - 1; me < _e; Ce = me++)
              O = M[me], ne += ((G = M[Ce]).x - O.x) * (O.y + G.y);
            return ne;
          }
          wl.types = ["Unknown", "Point", "LineString", "Polygon"], wl.prototype.loadGeometry = function() {
            var M = this._pbf;
            M.pos = this._geometry;
            for (var O, G = M.readVarint() + M.pos, ne = 1, me = 0, _e = 0, Ce = 0, Ne = []; M.pos < G; ) {
              if (me <= 0) {
                var $e = M.readVarint();
                ne = 7 & $e, me = $e >> 3;
              }
              if (me--, ne === 1 || ne === 2)
                _e += M.readSVarint(), Ce += M.readSVarint(), ne === 1 && (O && Ne.push(O), O = []), O.push(new t(_e, Ce));
              else {
                if (ne !== 7)
                  throw new Error("unknown command " + ne);
                O && O.push(O[0].clone());
              }
            }
            return O && Ne.push(O), Ne;
          }, wl.prototype.bbox = function() {
            var M = this._pbf;
            M.pos = this._geometry;
            for (var O = M.readVarint() + M.pos, G = 1, ne = 0, me = 0, _e = 0, Ce = 1 / 0, Ne = -1 / 0, $e = 1 / 0, ct = -1 / 0; M.pos < O; ) {
              if (ne <= 0) {
                var dt = M.readVarint();
                G = 7 & dt, ne = dt >> 3;
              }
              if (ne--, G === 1 || G === 2)
                (me += M.readSVarint()) < Ce && (Ce = me), me > Ne && (Ne = me), (_e += M.readSVarint()) < $e && ($e = _e), _e > ct && (ct = _e);
              else if (G !== 7)
                throw new Error("unknown command " + G);
            }
            return [Ce, $e, Ne, ct];
          }, wl.prototype.toGeoJSON = function(M, O, G) {
            var ne, me, _e = this.extent * Math.pow(2, G), Ce = this.extent * M, Ne = this.extent * O, $e = this.loadGeometry(), ct = wl.types[this.type];
            function dt(qt) {
              for (var ir = 0; ir < qt.length; ir++) {
                var yr = qt[ir], Cr = 180 - 360 * (yr.y + Ne) / _e;
                qt[ir] = [360 * (yr.x + Ce) / _e - 180, 360 / Math.PI * Math.atan(Math.exp(Cr * Math.PI / 180)) - 90];
              }
            }
            switch (this.type) {
              case 1:
                var Rt = [];
                for (ne = 0; ne < $e.length; ne++)
                  Rt[ne] = $e[ne][0];
                dt($e = Rt);
                break;
              case 2:
                for (ne = 0; ne < $e.length; ne++)
                  dt($e[ne]);
                break;
              case 3:
                for ($e = function(qt) {
                  var ir = qt.length;
                  if (ir <= 1)
                    return [qt];
                  for (var yr, Cr, Lr = [], jr = 0; jr < ir; jr++) {
                    var Ur = zh(qt[jr]);
                    Ur !== 0 && (Cr === void 0 && (Cr = Ur < 0), Cr === Ur < 0 ? (yr && Lr.push(yr), yr = [qt[jr]]) : yr.push(qt[jr]));
                  }
                  return yr && Lr.push(yr), Lr;
                }($e), ne = 0; ne < $e.length; ne++)
                  for (me = 0; me < $e[ne].length; me++)
                    dt($e[ne][me]);
            }
            $e.length === 1 ? $e = $e[0] : ct = "Multi" + ct;
            var Wt = { type: "Feature", geometry: { type: ct, coordinates: $e }, properties: this.properties };
            return "id" in this && (Wt.id = this.id), Wt;
          };
          var Xu = Ju;
          function Ju(M, O) {
            this.version = 1, this.name = null, this.extent = 4096, this.length = 0, this._pbf = M, this._keys = [], this._values = [], this._features = [], M.readFields(Dh, this, O), this.length = this._features.length;
          }
          function Dh(M, O, G) {
            M === 15 ? O.version = G.readVarint() : M === 1 ? O.name = G.readString() : M === 5 ? O.extent = G.readVarint() : M === 2 ? O._features.push(G.pos) : M === 3 ? O._keys.push(G.readString()) : M === 4 && O._values.push(function(ne) {
              for (var me = null, _e = ne.readVarint() + ne.pos; ne.pos < _e; ) {
                var Ce = ne.readVarint() >> 3;
                me = Ce === 1 ? ne.readString() : Ce === 2 ? ne.readFloat() : Ce === 3 ? ne.readDouble() : Ce === 4 ? ne.readVarint64() : Ce === 5 ? ne.readVarint() : Ce === 6 ? ne.readSVarint() : Ce === 7 ? ne.readBoolean() : null;
              }
              return me;
            }(G));
          }
          function Rh(M, O, G) {
            if (M === 3) {
              var ne = new Xu(G, G.readVarint() + G.pos);
              ne.length && (O[ne.name] = ne);
            }
          }
          Ju.prototype.feature = function(M) {
            if (M < 0 || M >= this._features.length)
              throw new Error("feature index out of bounds");
            this._pbf.pos = this._features[M];
            var O = this._pbf.readVarint() + this._pbf.pos;
            return new Zu(this._pbf, O, this.extent, this._keys, this._values);
          };
          var Tl = { VectorTile: function(M, O) {
            this.layers = M.readFields(Rh, {}, O);
          }, VectorTileFeature: Zu, VectorTileLayer: Xu }, Fh = Tl.VectorTileFeature.types, hu = Math.pow(2, 13);
          function $l(M, O, G, ne, me, _e, Ce, Ne) {
            M.emplaceBack(O, G, 2 * Math.floor(ne * hu) + Ce, me * hu * 2, _e * hu * 2, Math.round(Ne));
          }
          var Ss = function(M) {
            this.zoom = M.zoom, this.overscaling = M.overscaling, this.layers = M.layers, this.layerIds = this.layers.map(function(O) {
              return O.id;
            }), this.index = M.index, this.hasPattern = !1, this.layoutVertexArray = new hs(), this.indexArray = new to(), this.programConfigurations = new ci(Wu, M.layers, M.zoom), this.segments = new Dt(), this.stateDependentLayerIds = this.layers.filter(function(O) {
              return O.isStateDependent();
            }).map(function(O) {
              return O.id;
            });
          };
          function Bh(M, O) {
            return M.x === O.x && (M.x < 0 || M.x > 8192) || M.y === O.y && (M.y < 0 || M.y > 8192);
          }
          function Nh(M) {
            return M.every(function(O) {
              return O.x < 0;
            }) || M.every(function(O) {
              return O.x > 8192;
            }) || M.every(function(O) {
              return O.y < 0;
            }) || M.every(function(O) {
              return O.y > 8192;
            });
          }
          Ss.prototype.populate = function(M, O, G) {
            this.features = [], this.hasPattern = uu("fill-extrusion", this.layers, O);
            for (var ne = 0, me = M; ne < me.length; ne += 1) {
              var _e = me[ne], Ce = _e.feature, Ne = _e.id, $e = _e.index, ct = _e.sourceLayerIndex, dt = this.layers[0]._featureFilter.needGeometry, Rt = { type: Ce.type, id: Ne, properties: Ce.properties, geometry: dt ? mi(Ce) : [] };
              if (this.layers[0]._featureFilter.filter(new ri(this.zoom), Rt, G)) {
                var Wt = { id: Ne, sourceLayerIndex: ct, index: $e, geometry: dt ? Rt.geometry : mi(Ce), properties: Ce.properties, type: Ce.type, patterns: {} };
                Ce.id !== void 0 && (Wt.id = Ce.id), this.hasPattern ? this.features.push(fu("fill-extrusion", this.layers, Wt, this.zoom, O)) : this.addFeature(Wt, Wt.geometry, $e, G, {}), O.featureIndex.insert(Ce, Wt.geometry, $e, ct, this.index, !0);
              }
            }
          }, Ss.prototype.addFeatures = function(M, O, G) {
            for (var ne = 0, me = this.features; ne < me.length; ne += 1) {
              var _e = me[ne], Ce = _e.geometry;
              this.addFeature(_e, Ce, _e.index, O, G);
            }
          }, Ss.prototype.update = function(M, O, G) {
            this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(M, O, this.stateDependentLayers, G);
          }, Ss.prototype.isEmpty = function() {
            return this.layoutVertexArray.length === 0;
          }, Ss.prototype.uploadPending = function() {
            return !this.uploaded || this.programConfigurations.needsUpload;
          }, Ss.prototype.upload = function(M) {
            this.uploaded || (this.layoutVertexBuffer = M.createVertexBuffer(this.layoutVertexArray, Wu), this.indexBuffer = M.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(M), this.uploaded = !0;
          }, Ss.prototype.destroy = function() {
            this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
          }, Ss.prototype.addFeature = function(M, O, G, ne, me) {
            for (var _e = 0, Ce = cu(O, 500); _e < Ce.length; _e += 1) {
              for (var Ne = Ce[_e], $e = 0, ct = 0, dt = Ne; ct < dt.length; ct += 1)
                $e += dt[ct].length;
              for (var Rt = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray), Wt = 0, qt = Ne; Wt < qt.length; Wt += 1) {
                var ir = qt[Wt];
                if (ir.length !== 0 && !Nh(ir))
                  for (var yr = 0, Cr = 0; Cr < ir.length; Cr++) {
                    var Lr = ir[Cr];
                    if (Cr >= 1) {
                      var jr = ir[Cr - 1];
                      if (!Bh(Lr, jr)) {
                        Rt.vertexLength + 4 > Dt.MAX_VERTEX_ARRAY_LENGTH && (Rt = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
                        var Ur = Lr.sub(jr)._perp()._unit(), Yr = jr.dist(Lr);
                        yr + Yr > 32768 && (yr = 0), $l(this.layoutVertexArray, Lr.x, Lr.y, Ur.x, Ur.y, 0, 0, yr), $l(this.layoutVertexArray, Lr.x, Lr.y, Ur.x, Ur.y, 0, 1, yr), yr += Yr, $l(this.layoutVertexArray, jr.x, jr.y, Ur.x, Ur.y, 0, 0, yr), $l(this.layoutVertexArray, jr.x, jr.y, Ur.x, Ur.y, 0, 1, yr);
                        var fn = Rt.vertexLength;
                        this.indexArray.emplaceBack(fn, fn + 2, fn + 1), this.indexArray.emplaceBack(fn + 1, fn + 2, fn + 3), Rt.vertexLength += 4, Rt.primitiveLength += 2;
                      }
                    }
                  }
              }
              if (Rt.vertexLength + $e > Dt.MAX_VERTEX_ARRAY_LENGTH && (Rt = this.segments.prepareSegment($e, this.layoutVertexArray, this.indexArray)), Fh[M.type] === "Polygon") {
                for (var yn = [], Bn = [], Fn = Rt.vertexLength, Gn = 0, oa = Ne; Gn < oa.length; Gn += 1) {
                  var sa = oa[Gn];
                  if (sa.length !== 0) {
                    sa !== Ne[0] && Bn.push(yn.length / 2);
                    for (var Jn = 0; Jn < sa.length; Jn++) {
                      var pa = sa[Jn];
                      $l(this.layoutVertexArray, pa.x, pa.y, 0, 0, 1, 1, 0), yn.push(pa.x), yn.push(pa.y);
                    }
                  }
                }
                for (var fa = iu(yn, Bn), la = 0; la < fa.length; la += 3)
                  this.indexArray.emplaceBack(Fn + fa[la], Fn + fa[la + 2], Fn + fa[la + 1]);
                Rt.primitiveLength += fa.length / 3, Rt.vertexLength += $e;
              }
            }
            this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, M, G, me, ne);
          }, Zr("FillExtrusionBucket", Ss, { omit: ["layers", "features"] });
          var jh = { paint: new Lo({ "fill-extrusion-opacity": new ca(be["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new ya(be["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new ca(be["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new ca(be["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new Ds(be["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new ya(be["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new ya(be["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new ca(be["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) }) }, Uh = function(M) {
            function O(G) {
              M.call(this, G, jh);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.createBucket = function(G) {
              return new Ss(G);
            }, O.prototype.queryRadius = function() {
              return Co(this.paint.get("fill-extrusion-translate"));
            }, O.prototype.is3D = function() {
              return !0;
            }, O.prototype.queryIntersectsFeature = function(G, ne, me, _e, Ce, Ne, $e, ct) {
              var dt = Po(G, this.paint.get("fill-extrusion-translate"), this.paint.get("fill-extrusion-translate-anchor"), Ne.angle, $e), Rt = this.paint.get("fill-extrusion-height").evaluate(ne, me), Wt = this.paint.get("fill-extrusion-base").evaluate(ne, me), qt = function(yr, Cr, Lr, jr) {
                for (var Ur = [], Yr = 0, fn = yr; Yr < fn.length; Yr += 1) {
                  var yn = fn[Yr], Bn = [yn.x, yn.y, jr, 1];
                  bl(Bn, Bn, Cr), Ur.push(new t(Bn[0] / Bn[3], Bn[1] / Bn[3]));
                }
                return Ur;
              }(dt, ct, 0, 0), ir = function(yr, Cr, Lr, jr) {
                for (var Ur = [], Yr = [], fn = jr[8] * Cr, yn = jr[9] * Cr, Bn = jr[10] * Cr, Fn = jr[11] * Cr, Gn = jr[8] * Lr, oa = jr[9] * Lr, sa = jr[10] * Lr, Jn = jr[11] * Lr, pa = 0, fa = yr; pa < fa.length; pa += 1) {
                  for (var la = fa[pa], Ka = [], Va = [], ei = 0, _a = la; ei < _a.length; ei += 1) {
                    var qa = _a[ei], vi = qa.x, ui = qa.y, Ai = jr[0] * vi + jr[4] * ui + jr[12], fi = jr[1] * vi + jr[5] * ui + jr[13], io = jr[2] * vi + jr[6] * ui + jr[14], Si = jr[3] * vi + jr[7] * ui + jr[15], Io = io + Bn, _o = Si + Fn, ko = Ai + Gn, Ho = fi + oa, Ro = io + sa, oo = Si + Jn, Mo = new t((Ai + fn) / _o, (fi + yn) / _o);
                    Mo.z = Io / _o, Ka.push(Mo);
                    var Wi = new t(ko / oo, Ho / oo);
                    Wi.z = Ro / oo, Va.push(Wi);
                  }
                  Ur.push(Ka), Yr.push(Va);
                }
                return [Ur, Yr];
              }(_e, Wt, Rt, ct);
              return function(yr, Cr, Lr) {
                var jr = 1 / 0;
                Fs(Lr, Cr) && (jr = Ku(Lr, Cr[0]));
                for (var Ur = 0; Ur < Cr.length; Ur++)
                  for (var Yr = Cr[Ur], fn = yr[Ur], yn = 0; yn < Yr.length - 1; yn++) {
                    var Bn = Yr[yn], Fn = Yr[yn + 1], Gn = fn[yn], oa = fn[yn + 1], sa = [Bn, Fn, oa, Gn, Bn];
                    zo(Lr, sa) && (jr = Math.min(jr, Ku(Lr, sa)));
                  }
                return jr !== 1 / 0 && jr;
              }(ir[0], ir[1], qt);
            }, O;
          }(Vo);
          function ec(M, O) {
            return M.x * O.x + M.y * O.y;
          }
          function Ku(M, O) {
            if (M.length === 1) {
              for (var G, ne = 0, me = O[ne++]; !G || me.equals(G); )
                if (!(G = O[ne++]))
                  return 1 / 0;
              for (; ne < O.length; ne++) {
                var _e = O[ne], Ce = M[0], Ne = G.sub(me), $e = _e.sub(me), ct = Ce.sub(me), dt = ec(Ne, Ne), Rt = ec(Ne, $e), Wt = ec($e, $e), qt = ec(ct, Ne), ir = ec(ct, $e), yr = dt * Wt - Rt * Rt, Cr = (Wt * qt - Rt * ir) / yr, Lr = (dt * ir - Rt * qt) / yr, jr = 1 - Cr - Lr, Ur = me.z * jr + G.z * Cr + _e.z * Lr;
                if (isFinite(Ur))
                  return Ur;
              }
              return 1 / 0;
            }
            for (var Yr = 1 / 0, fn = 0, yn = O; fn < yn.length; fn += 1) {
              var Bn = yn[fn];
              Yr = Math.min(Yr, Bn.z);
            }
            return Yr;
          }
          var Qu = ni([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4).members, Vh = Tl.VectorTileFeature.types, Hh = Math.cos(Math.PI / 180 * 37.5), $u = Math.pow(2, 14) / 0.5, Zo = function(M) {
            this.zoom = M.zoom, this.overscaling = M.overscaling, this.layers = M.layers, this.layerIds = this.layers.map(function(O) {
              return O.id;
            }), this.index = M.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new Ts(), this.indexArray = new to(), this.programConfigurations = new ci(Qu, M.layers, M.zoom), this.segments = new Dt(), this.stateDependentLayerIds = this.layers.filter(function(O) {
              return O.isStateDependent();
            }).map(function(O) {
              return O.id;
            });
          };
          Zo.prototype.populate = function(M, O, G) {
            this.hasPattern = uu("line", this.layers, O);
            for (var ne = this.layers[0].layout.get("line-sort-key"), me = [], _e = 0, Ce = M; _e < Ce.length; _e += 1) {
              var Ne = Ce[_e], $e = Ne.feature, ct = Ne.id, dt = Ne.index, Rt = Ne.sourceLayerIndex, Wt = this.layers[0]._featureFilter.needGeometry, qt = { type: $e.type, id: ct, properties: $e.properties, geometry: Wt ? mi($e) : [] };
              if (this.layers[0]._featureFilter.filter(new ri(this.zoom), qt, G)) {
                Wt || (qt.geometry = mi($e));
                var ir = ne ? ne.evaluate(qt, {}, G) : void 0, yr = { id: ct, properties: $e.properties, type: $e.type, sourceLayerIndex: Rt, index: dt, geometry: qt.geometry, patterns: {}, sortKey: ir };
                me.push(yr);
              }
            }
            ne && me.sort(function(Gn, oa) {
              return Gn.sortKey - oa.sortKey;
            });
            for (var Cr = 0, Lr = me; Cr < Lr.length; Cr += 1) {
              var jr = Lr[Cr], Ur = jr, Yr = Ur.geometry, fn = Ur.index, yn = Ur.sourceLayerIndex;
              if (this.hasPattern) {
                var Bn = fu("line", this.layers, jr, this.zoom, O);
                this.patternFeatures.push(Bn);
              } else
                this.addFeature(jr, Yr, fn, G, {});
              var Fn = M[fn].feature;
              O.featureIndex.insert(Fn, Yr, fn, yn, this.index);
            }
          }, Zo.prototype.update = function(M, O, G) {
            this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(M, O, this.stateDependentLayers, G);
          }, Zo.prototype.addFeatures = function(M, O, G) {
            for (var ne = 0, me = this.patternFeatures; ne < me.length; ne += 1) {
              var _e = me[ne];
              this.addFeature(_e, _e.geometry, _e.index, O, G);
            }
          }, Zo.prototype.isEmpty = function() {
            return this.layoutVertexArray.length === 0;
          }, Zo.prototype.uploadPending = function() {
            return !this.uploaded || this.programConfigurations.needsUpload;
          }, Zo.prototype.upload = function(M) {
            this.uploaded || (this.layoutVertexBuffer = M.createVertexBuffer(this.layoutVertexArray, Qu), this.indexBuffer = M.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(M), this.uploaded = !0;
          }, Zo.prototype.destroy = function() {
            this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
          }, Zo.prototype.addFeature = function(M, O, G, ne, me) {
            for (var _e = this.layers[0].layout, Ce = _e.get("line-join").evaluate(M, {}), Ne = _e.get("line-cap"), $e = _e.get("line-miter-limit"), ct = _e.get("line-round-limit"), dt = 0, Rt = O; dt < Rt.length; dt += 1) {
              var Wt = Rt[dt];
              this.addLine(Wt, M, Ce, Ne, $e, ct);
            }
            this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, M, G, me, ne);
          }, Zo.prototype.addLine = function(M, O, G, ne, me, _e) {
            if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, O.properties && O.properties.hasOwnProperty("mapbox_clip_start") && O.properties.hasOwnProperty("mapbox_clip_end")) {
              this.clipStart = +O.properties.mapbox_clip_start, this.clipEnd = +O.properties.mapbox_clip_end;
              for (var Ce = 0; Ce < M.length - 1; Ce++)
                this.totalDistance += M[Ce].dist(M[Ce + 1]);
              this.updateScaledDistance();
            }
            for (var Ne = Vh[O.type] === "Polygon", $e = M.length; $e >= 2 && M[$e - 1].equals(M[$e - 2]); )
              $e--;
            for (var ct = 0; ct < $e - 1 && M[ct].equals(M[ct + 1]); )
              ct++;
            if (!($e < (Ne ? 3 : 2))) {
              G === "bevel" && (me = 1.05);
              var dt, Rt = this.overscaling <= 16 ? 122880 / (512 * this.overscaling) : 0, Wt = this.segments.prepareSegment(10 * $e, this.layoutVertexArray, this.indexArray), qt = void 0, ir = void 0, yr = void 0, Cr = void 0;
              this.e1 = this.e2 = -1, Ne && (dt = M[$e - 2], Cr = M[ct].sub(dt)._unit()._perp());
              for (var Lr = ct; Lr < $e; Lr++)
                if (!(ir = Lr === $e - 1 ? Ne ? M[ct + 1] : void 0 : M[Lr + 1]) || !M[Lr].equals(ir)) {
                  Cr && (yr = Cr), dt && (qt = dt), dt = M[Lr], Cr = ir ? ir.sub(dt)._unit()._perp() : yr;
                  var jr = (yr = yr || Cr).add(Cr);
                  jr.x === 0 && jr.y === 0 || jr._unit();
                  var Ur = yr.x * Cr.x + yr.y * Cr.y, Yr = jr.x * Cr.x + jr.y * Cr.y, fn = Yr !== 0 ? 1 / Yr : 1 / 0, yn = 2 * Math.sqrt(2 - 2 * Yr), Bn = Yr < Hh && qt && ir, Fn = yr.x * Cr.y - yr.y * Cr.x > 0;
                  if (Bn && Lr > ct) {
                    var Gn = dt.dist(qt);
                    if (Gn > 2 * Rt) {
                      var oa = dt.sub(dt.sub(qt)._mult(Rt / Gn)._round());
                      this.updateDistance(qt, oa), this.addCurrentVertex(oa, yr, 0, 0, Wt), qt = oa;
                    }
                  }
                  var sa = qt && ir, Jn = sa ? G : Ne ? "butt" : ne;
                  if (sa && Jn === "round" && (fn < _e ? Jn = "miter" : fn <= 2 && (Jn = "fakeround")), Jn === "miter" && fn > me && (Jn = "bevel"), Jn === "bevel" && (fn > 2 && (Jn = "flipbevel"), fn < me && (Jn = "miter")), qt && this.updateDistance(qt, dt), Jn === "miter")
                    jr._mult(fn), this.addCurrentVertex(dt, jr, 0, 0, Wt);
                  else if (Jn === "flipbevel") {
                    if (fn > 100)
                      jr = Cr.mult(-1);
                    else {
                      var pa = fn * yr.add(Cr).mag() / yr.sub(Cr).mag();
                      jr._perp()._mult(pa * (Fn ? -1 : 1));
                    }
                    this.addCurrentVertex(dt, jr, 0, 0, Wt), this.addCurrentVertex(dt, jr.mult(-1), 0, 0, Wt);
                  } else if (Jn === "bevel" || Jn === "fakeround") {
                    var fa = -Math.sqrt(fn * fn - 1), la = Fn ? fa : 0, Ka = Fn ? 0 : fa;
                    if (qt && this.addCurrentVertex(dt, yr, la, Ka, Wt), Jn === "fakeround")
                      for (var Va = Math.round(180 * yn / Math.PI / 20), ei = 1; ei < Va; ei++) {
                        var _a = ei / Va;
                        if (_a !== 0.5) {
                          var qa = _a - 0.5;
                          _a += _a * qa * (_a - 1) * ((1.0904 + Ur * (Ur * (3.55645 - 1.43519 * Ur) - 3.2452)) * qa * qa + (0.848013 + Ur * (0.215638 * Ur - 1.06021)));
                        }
                        var vi = Cr.sub(yr)._mult(_a)._add(yr)._unit()._mult(Fn ? -1 : 1);
                        this.addHalfVertex(dt, vi.x, vi.y, !1, Fn, 0, Wt);
                      }
                    ir && this.addCurrentVertex(dt, Cr, -la, -Ka, Wt);
                  } else if (Jn === "butt")
                    this.addCurrentVertex(dt, jr, 0, 0, Wt);
                  else if (Jn === "square") {
                    var ui = qt ? 1 : -1;
                    this.addCurrentVertex(dt, jr, ui, ui, Wt);
                  } else
                    Jn === "round" && (qt && (this.addCurrentVertex(dt, yr, 0, 0, Wt), this.addCurrentVertex(dt, yr, 1, 1, Wt, !0)), ir && (this.addCurrentVertex(dt, Cr, -1, -1, Wt, !0), this.addCurrentVertex(dt, Cr, 0, 0, Wt)));
                  if (Bn && Lr < $e - 1) {
                    var Ai = dt.dist(ir);
                    if (Ai > 2 * Rt) {
                      var fi = dt.add(ir.sub(dt)._mult(Rt / Ai)._round());
                      this.updateDistance(dt, fi), this.addCurrentVertex(fi, Cr, 0, 0, Wt), dt = fi;
                    }
                  }
                }
            }
          }, Zo.prototype.addCurrentVertex = function(M, O, G, ne, me, _e) {
            _e === void 0 && (_e = !1);
            var Ce = O.x + O.y * G, Ne = O.y - O.x * G, $e = -O.x + O.y * ne, ct = -O.y - O.x * ne;
            this.addHalfVertex(M, Ce, Ne, _e, !1, G, me), this.addHalfVertex(M, $e, ct, _e, !0, -ne, me), this.distance > $u / 2 && this.totalDistance === 0 && (this.distance = 0, this.addCurrentVertex(M, O, G, ne, me, _e));
          }, Zo.prototype.addHalfVertex = function(M, O, G, ne, me, _e, Ce) {
            var Ne = M.x, $e = M.y, ct = 0.5 * this.scaledDistance;
            this.layoutVertexArray.emplaceBack((Ne << 1) + (ne ? 1 : 0), ($e << 1) + (me ? 1 : 0), Math.round(63 * O) + 128, Math.round(63 * G) + 128, 1 + (_e === 0 ? 0 : _e < 0 ? -1 : 1) | (63 & ct) << 2, ct >> 6);
            var dt = Ce.vertexLength++;
            this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, this.e2, dt), Ce.primitiveLength++), me ? this.e2 = dt : this.e1 = dt;
          }, Zo.prototype.updateScaledDistance = function() {
            this.scaledDistance = this.totalDistance > 0 ? (this.clipStart + (this.clipEnd - this.clipStart) * this.distance / this.totalDistance) * ($u - 1) : this.distance;
          }, Zo.prototype.updateDistance = function(M, O) {
            this.distance += M.dist(O), this.updateScaledDistance();
          }, Zr("LineBucket", Zo, { omit: ["layers", "patternFeatures"] });
          var qh = new Lo({ "line-cap": new ca(be.layout_line["line-cap"]), "line-join": new ya(be.layout_line["line-join"]), "line-miter-limit": new ca(be.layout_line["line-miter-limit"]), "line-round-limit": new ca(be.layout_line["line-round-limit"]), "line-sort-key": new ya(be.layout_line["line-sort-key"]) }), ef = { paint: new Lo({ "line-opacity": new ya(be.paint_line["line-opacity"]), "line-color": new ya(be.paint_line["line-color"]), "line-translate": new ca(be.paint_line["line-translate"]), "line-translate-anchor": new ca(be.paint_line["line-translate-anchor"]), "line-width": new ya(be.paint_line["line-width"]), "line-gap-width": new ya(be.paint_line["line-gap-width"]), "line-offset": new ya(be.paint_line["line-offset"]), "line-blur": new ya(be.paint_line["line-blur"]), "line-dasharray": new Rs(be.paint_line["line-dasharray"]), "line-pattern": new Ds(be.paint_line["line-pattern"]), "line-gradient": new $o(be.paint_line["line-gradient"]) }), layout: qh }, tf = new (function(M) {
            function O() {
              M.apply(this, arguments);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.possiblyEvaluate = function(G, ne) {
              return ne = new ri(Math.floor(ne.zoom), { now: ne.now, fadeDuration: ne.fadeDuration, zoomHistory: ne.zoomHistory, transition: ne.transition }), M.prototype.possiblyEvaluate.call(this, G, ne);
            }, O.prototype.evaluate = function(G, ne, me, _e) {
              return ne = i({}, ne, { zoom: Math.floor(ne.zoom) }), M.prototype.evaluate.call(this, G, ne, me, _e);
            }, O;
          }(ya))(ef.paint.properties["line-width"].specification);
          tf.useIntegerZoom = !0;
          var Gh = function(M) {
            function O(G) {
              M.call(this, G, ef);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype._handleSpecialPaintPropertyUpdate = function(G) {
              G === "line-gradient" && this._updateGradient();
            }, O.prototype._updateGradient = function() {
              var G = this._transitionablePaint._values["line-gradient"].value.expression;
              this.gradient = Uu(G, "lineProgress"), this.gradientTexture = null;
            }, O.prototype.recalculate = function(G, ne) {
              M.prototype.recalculate.call(this, G, ne), this.paint._values["line-floorwidth"] = tf.possiblyEvaluate(this._transitioningPaint._values["line-width"].value, G);
            }, O.prototype.createBucket = function(G) {
              return new Zo(G);
            }, O.prototype.queryRadius = function(G) {
              var ne = G, me = rf(ki("line-width", this, ne), ki("line-gap-width", this, ne)), _e = ki("line-offset", this, ne);
              return me / 2 + Math.abs(_e) + Co(this.paint.get("line-translate"));
            }, O.prototype.queryIntersectsFeature = function(G, ne, me, _e, Ce, Ne, $e) {
              var ct = Po(G, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), Ne.angle, $e), dt = $e / 2 * rf(this.paint.get("line-width").evaluate(ne, me), this.paint.get("line-gap-width").evaluate(ne, me)), Rt = this.paint.get("line-offset").evaluate(ne, me);
              return Rt && (_e = function(Wt, qt) {
                for (var ir = [], yr = new t(0, 0), Cr = 0; Cr < Wt.length; Cr++) {
                  for (var Lr = Wt[Cr], jr = [], Ur = 0; Ur < Lr.length; Ur++) {
                    var Yr = Lr[Ur - 1], fn = Lr[Ur], yn = Lr[Ur + 1], Bn = Ur === 0 ? yr : fn.sub(Yr)._unit()._perp(), Fn = Ur === Lr.length - 1 ? yr : yn.sub(fn)._unit()._perp(), Gn = Bn._add(Fn)._unit(), oa = Gn.x * Fn.x + Gn.y * Fn.y;
                    Gn._mult(1 / oa), jr.push(Gn._mult(qt)._add(fn));
                  }
                  ir.push(jr);
                }
                return ir;
              }(_e, Rt * $e)), function(Wt, qt, ir) {
                for (var yr = 0; yr < qt.length; yr++) {
                  var Cr = qt[yr];
                  if (Wt.length >= 3) {
                    for (var Lr = 0; Lr < Cr.length; Lr++)
                      if (es(Wt, Cr[Lr]))
                        return !0;
                  }
                  if (ll(Wt, Cr, ir))
                    return !0;
                }
                return !1;
              }(ct, _e, dt);
            }, O.prototype.isTileClipped = function() {
              return !0;
            }, O;
          }(Vo);
          function rf(M, O) {
            return O > 0 ? O + 2 * M : M;
          }
          var pu = ni([{ name: "a_pos_offset", components: 4, type: "Int16" }, { name: "a_data", components: 4, type: "Uint16" }, { name: "a_pixeloffset", components: 4, type: "Int16" }], 4), Yh = ni([{ name: "a_projected_pos", components: 3, type: "Float32" }], 4), Wh = (ni([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4), ni([{ name: "a_placed", components: 2, type: "Uint8" }, { name: "a_shift", components: 2, type: "Float32" }])), nf = (ni([{ type: "Int16", name: "anchorPointX" }, { type: "Int16", name: "anchorPointY" }, { type: "Int16", name: "x1" }, { type: "Int16", name: "y1" }, { type: "Int16", name: "x2" }, { type: "Int16", name: "y2" }, { type: "Uint32", name: "featureIndex" }, { type: "Uint16", name: "sourceLayerIndex" }, { type: "Uint16", name: "bucketIndex" }]), ni([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_anchor_pos", components: 2, type: "Int16" }, { name: "a_extrude", components: 2, type: "Int16" }], 4)), Zh = ni([{ name: "a_pos", components: 2, type: "Float32" }, { name: "a_radius", components: 1, type: "Float32" }, { name: "a_flags", components: 2, type: "Int16" }], 4);
          ni([{ name: "triangle", components: 3, type: "Uint16" }]), ni([{ type: "Int16", name: "anchorX" }, { type: "Int16", name: "anchorY" }, { type: "Uint16", name: "glyphStartIndex" }, { type: "Uint16", name: "numGlyphs" }, { type: "Uint32", name: "vertexStartIndex" }, { type: "Uint32", name: "lineStartIndex" }, { type: "Uint32", name: "lineLength" }, { type: "Uint16", name: "segment" }, { type: "Uint16", name: "lowerSize" }, { type: "Uint16", name: "upperSize" }, { type: "Float32", name: "lineOffsetX" }, { type: "Float32", name: "lineOffsetY" }, { type: "Uint8", name: "writingMode" }, { type: "Uint8", name: "placedOrientation" }, { type: "Uint8", name: "hidden" }, { type: "Uint32", name: "crossTileID" }, { type: "Int16", name: "associatedIconIndex" }]), ni([{ type: "Int16", name: "anchorX" }, { type: "Int16", name: "anchorY" }, { type: "Int16", name: "rightJustifiedTextSymbolIndex" }, { type: "Int16", name: "centerJustifiedTextSymbolIndex" }, { type: "Int16", name: "leftJustifiedTextSymbolIndex" }, { type: "Int16", name: "verticalPlacedTextSymbolIndex" }, { type: "Int16", name: "placedIconSymbolIndex" }, { type: "Int16", name: "verticalPlacedIconSymbolIndex" }, { type: "Uint16", name: "key" }, { type: "Uint16", name: "textBoxStartIndex" }, { type: "Uint16", name: "textBoxEndIndex" }, { type: "Uint16", name: "verticalTextBoxStartIndex" }, { type: "Uint16", name: "verticalTextBoxEndIndex" }, { type: "Uint16", name: "iconBoxStartIndex" }, { type: "Uint16", name: "iconBoxEndIndex" }, { type: "Uint16", name: "verticalIconBoxStartIndex" }, { type: "Uint16", name: "verticalIconBoxEndIndex" }, { type: "Uint16", name: "featureIndex" }, { type: "Uint16", name: "numHorizontalGlyphVertices" }, { type: "Uint16", name: "numVerticalGlyphVertices" }, { type: "Uint16", name: "numIconVertices" }, { type: "Uint16", name: "numVerticalIconVertices" }, { type: "Uint16", name: "useRuntimeCollisionCircles" }, { type: "Uint32", name: "crossTileID" }, { type: "Float32", name: "textBoxScale" }, { type: "Float32", components: 2, name: "textOffset" }, { type: "Float32", name: "collisionCircleDiameter" }]), ni([{ type: "Float32", name: "offsetX" }]), ni([{ type: "Int16", name: "x" }, { type: "Int16", name: "y" }, { type: "Int16", name: "tileUnitDistanceFromAnchor" }]);
          function Xh(M, O, G) {
            return M.sections.forEach(function(ne) {
              ne.text = function(me, _e, Ce) {
                var Ne = _e.layout.get("text-transform").evaluate(Ce, {});
                return Ne === "uppercase" ? me = me.toLocaleUpperCase() : Ne === "lowercase" && (me = me.toLocaleLowerCase()), uo.applyArabicShaping && (me = uo.applyArabicShaping(me)), me;
              }(ne.text, O, G);
            }), M;
          }
          var tc = { "!": "\uFE15", "#": "\uFF03", $: "\uFF04", "%": "\uFF05", "&": "\uFF06", "(": "\uFE35", ")": "\uFE36", "*": "\uFF0A", "+": "\uFF0B", ",": "\uFE10", "-": "\uFE32", ".": "\u30FB", "/": "\uFF0F", ":": "\uFE13", ";": "\uFE14", "<": "\uFE3F", "=": "\uFF1D", ">": "\uFE40", "?": "\uFE16", "@": "\uFF20", "[": "\uFE47", "\\": "\uFF3C", "]": "\uFE48", "^": "\uFF3E", _: "\uFE33", "`": "\uFF40", "{": "\uFE37", "|": "\u2015", "}": "\uFE38", "~": "\uFF5E", "\xA2": "\uFFE0", "\xA3": "\uFFE1", "\xA5": "\uFFE5", "\xA6": "\uFFE4", "\xAC": "\uFFE2", "\xAF": "\uFFE3", "\u2013": "\uFE32", "\u2014": "\uFE31", "\u2018": "\uFE43", "\u2019": "\uFE44", "\u201C": "\uFE41", "\u201D": "\uFE42", "\u2026": "\uFE19", "\u2027": "\u30FB", "\u20A9": "\uFFE6", "\u3001": "\uFE11", "\u3002": "\uFE12", "\u3008": "\uFE3F", "\u3009": "\uFE40", "\u300A": "\uFE3D", "\u300B": "\uFE3E", "\u300C": "\uFE41", "\u300D": "\uFE42", "\u300E": "\uFE43", "\u300F": "\uFE44", "\u3010": "\uFE3B", "\u3011": "\uFE3C", "\u3014": "\uFE39", "\u3015": "\uFE3A", "\u3016": "\uFE17", "\u3017": "\uFE18", "\uFF01": "\uFE15", "\uFF08": "\uFE35", "\uFF09": "\uFE36", "\uFF0C": "\uFE10", "\uFF0D": "\uFE32", "\uFF0E": "\u30FB", "\uFF1A": "\uFE13", "\uFF1B": "\uFE14", "\uFF1C": "\uFE3F", "\uFF1E": "\uFE40", "\uFF1F": "\uFE16", "\uFF3B": "\uFE47", "\uFF3D": "\uFE48", "\uFF3F": "\uFE33", "\uFF5B": "\uFE37", "\uFF5C": "\u2015", "\uFF5D": "\uFE38", "\uFF5F": "\uFE35", "\uFF60": "\uFE36", "\uFF61": "\uFE12", "\uFF62": "\uFE41", "\uFF63": "\uFE42" }, af = function(M, O, G, ne, me) {
            var _e, Ce, Ne = 8 * me - ne - 1, $e = (1 << Ne) - 1, ct = $e >> 1, dt = -7, Rt = G ? me - 1 : 0, Wt = G ? -1 : 1, qt = M[O + Rt];
            for (Rt += Wt, _e = qt & (1 << -dt) - 1, qt >>= -dt, dt += Ne; dt > 0; _e = 256 * _e + M[O + Rt], Rt += Wt, dt -= 8)
              ;
            for (Ce = _e & (1 << -dt) - 1, _e >>= -dt, dt += ne; dt > 0; Ce = 256 * Ce + M[O + Rt], Rt += Wt, dt -= 8)
              ;
            if (_e === 0)
              _e = 1 - ct;
            else {
              if (_e === $e)
                return Ce ? NaN : 1 / 0 * (qt ? -1 : 1);
              Ce += Math.pow(2, ne), _e -= ct;
            }
            return (qt ? -1 : 1) * Ce * Math.pow(2, _e - ne);
          }, of = function(M, O, G, ne, me, _e) {
            var Ce, Ne, $e, ct = 8 * _e - me - 1, dt = (1 << ct) - 1, Rt = dt >> 1, Wt = me === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, qt = ne ? 0 : _e - 1, ir = ne ? 1 : -1, yr = O < 0 || O === 0 && 1 / O < 0 ? 1 : 0;
            for (O = Math.abs(O), isNaN(O) || O === 1 / 0 ? (Ne = isNaN(O) ? 1 : 0, Ce = dt) : (Ce = Math.floor(Math.log(O) / Math.LN2), O * ($e = Math.pow(2, -Ce)) < 1 && (Ce--, $e *= 2), (O += Ce + Rt >= 1 ? Wt / $e : Wt * Math.pow(2, 1 - Rt)) * $e >= 2 && (Ce++, $e /= 2), Ce + Rt >= dt ? (Ne = 0, Ce = dt) : Ce + Rt >= 1 ? (Ne = (O * $e - 1) * Math.pow(2, me), Ce += Rt) : (Ne = O * Math.pow(2, Rt - 1) * Math.pow(2, me), Ce = 0)); me >= 8; M[G + qt] = 255 & Ne, qt += ir, Ne /= 256, me -= 8)
              ;
            for (Ce = Ce << me | Ne, ct += me; ct > 0; M[G + qt] = 255 & Ce, qt += ir, Ce /= 256, ct -= 8)
              ;
            M[G + qt - ir] |= 128 * yr;
          }, bc = gi;
          function gi(M) {
            this.buf = ArrayBuffer.isView && ArrayBuffer.isView(M) ? M : new Uint8Array(M || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
          }
          gi.Varint = 0, gi.Fixed64 = 1, gi.Bytes = 2, gi.Fixed32 = 5;
          var sf = typeof TextDecoder > "u" ? null : new TextDecoder("utf8");
          function Hs(M) {
            return M.type === gi.Bytes ? M.readVarint() + M.pos : M.pos + 1;
          }
          function kl(M, O, G) {
            return G ? 4294967296 * O + (M >>> 0) : 4294967296 * (O >>> 0) + (M >>> 0);
          }
          function lf(M, O, G) {
            var ne = O <= 16383 ? 1 : O <= 2097151 ? 2 : O <= 268435455 ? 3 : Math.floor(Math.log(O) / (7 * Math.LN2));
            G.realloc(ne);
            for (var me = G.pos - 1; me >= M; me--)
              G.buf[me + ne] = G.buf[me];
          }
          function Jh(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeVarint(M[G]);
          }
          function Kh(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeSVarint(M[G]);
          }
          function Qh(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeFloat(M[G]);
          }
          function $h(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeDouble(M[G]);
          }
          function ep(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeBoolean(M[G]);
          }
          function tp(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeFixed32(M[G]);
          }
          function rp(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeSFixed32(M[G]);
          }
          function np(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeFixed64(M[G]);
          }
          function ap(M, O) {
            for (var G = 0; G < M.length; G++)
              O.writeSFixed64(M[G]);
          }
          function _c(M, O) {
            return (M[O] | M[O + 1] << 8 | M[O + 2] << 16) + 16777216 * M[O + 3];
          }
          function Ml(M, O, G) {
            M[G] = O, M[G + 1] = O >>> 8, M[G + 2] = O >>> 16, M[G + 3] = O >>> 24;
          }
          function cf(M, O) {
            return (M[O] | M[O + 1] << 8 | M[O + 2] << 16) + (M[O + 3] << 24);
          }
          gi.prototype = { destroy: function() {
            this.buf = null;
          }, readFields: function(M, O, G) {
            for (G = G || this.length; this.pos < G; ) {
              var ne = this.readVarint(), me = ne >> 3, _e = this.pos;
              this.type = 7 & ne, M(me, O, this), this.pos === _e && this.skip(ne);
            }
            return O;
          }, readMessage: function(M, O) {
            return this.readFields(M, O, this.readVarint() + this.pos);
          }, readFixed32: function() {
            var M = _c(this.buf, this.pos);
            return this.pos += 4, M;
          }, readSFixed32: function() {
            var M = cf(this.buf, this.pos);
            return this.pos += 4, M;
          }, readFixed64: function() {
            var M = _c(this.buf, this.pos) + 4294967296 * _c(this.buf, this.pos + 4);
            return this.pos += 8, M;
          }, readSFixed64: function() {
            var M = _c(this.buf, this.pos) + 4294967296 * cf(this.buf, this.pos + 4);
            return this.pos += 8, M;
          }, readFloat: function() {
            var M = af(this.buf, this.pos, !0, 23, 4);
            return this.pos += 4, M;
          }, readDouble: function() {
            var M = af(this.buf, this.pos, !0, 52, 8);
            return this.pos += 8, M;
          }, readVarint: function(M) {
            var O, G, ne = this.buf;
            return O = 127 & (G = ne[this.pos++]), G < 128 ? O : (O |= (127 & (G = ne[this.pos++])) << 7, G < 128 ? O : (O |= (127 & (G = ne[this.pos++])) << 14, G < 128 ? O : (O |= (127 & (G = ne[this.pos++])) << 21, G < 128 ? O : function(me, _e, Ce) {
              var Ne, $e, ct = Ce.buf;
              if ($e = ct[Ce.pos++], Ne = (112 & $e) >> 4, $e < 128 || ($e = ct[Ce.pos++], Ne |= (127 & $e) << 3, $e < 128) || ($e = ct[Ce.pos++], Ne |= (127 & $e) << 10, $e < 128) || ($e = ct[Ce.pos++], Ne |= (127 & $e) << 17, $e < 128) || ($e = ct[Ce.pos++], Ne |= (127 & $e) << 24, $e < 128) || ($e = ct[Ce.pos++], Ne |= (1 & $e) << 31, $e < 128))
                return kl(me, Ne, _e);
              throw new Error("Expected varint not more than 10 bytes");
            }(O |= (15 & (G = ne[this.pos])) << 28, M, this))));
          }, readVarint64: function() {
            return this.readVarint(!0);
          }, readSVarint: function() {
            var M = this.readVarint();
            return M % 2 == 1 ? (M + 1) / -2 : M / 2;
          }, readBoolean: function() {
            return Boolean(this.readVarint());
          }, readString: function() {
            var M = this.readVarint() + this.pos, O = this.pos;
            return this.pos = M, M - O >= 12 && sf ? function(G, ne, me) {
              return sf.decode(G.subarray(ne, me));
            }(this.buf, O, M) : function(G, ne, me) {
              for (var _e = "", Ce = ne; Ce < me; ) {
                var Ne, $e, ct, dt = G[Ce], Rt = null, Wt = dt > 239 ? 4 : dt > 223 ? 3 : dt > 191 ? 2 : 1;
                if (Ce + Wt > me)
                  break;
                Wt === 1 ? dt < 128 && (Rt = dt) : Wt === 2 ? (192 & (Ne = G[Ce + 1])) == 128 && (Rt = (31 & dt) << 6 | 63 & Ne) <= 127 && (Rt = null) : Wt === 3 ? (Ne = G[Ce + 1], $e = G[Ce + 2], (192 & Ne) == 128 && (192 & $e) == 128 && ((Rt = (15 & dt) << 12 | (63 & Ne) << 6 | 63 & $e) <= 2047 || Rt >= 55296 && Rt <= 57343) && (Rt = null)) : Wt === 4 && (Ne = G[Ce + 1], $e = G[Ce + 2], ct = G[Ce + 3], (192 & Ne) == 128 && (192 & $e) == 128 && (192 & ct) == 128 && ((Rt = (15 & dt) << 18 | (63 & Ne) << 12 | (63 & $e) << 6 | 63 & ct) <= 65535 || Rt >= 1114112) && (Rt = null)), Rt === null ? (Rt = 65533, Wt = 1) : Rt > 65535 && (Rt -= 65536, _e += String.fromCharCode(Rt >>> 10 & 1023 | 55296), Rt = 56320 | 1023 & Rt), _e += String.fromCharCode(Rt), Ce += Wt;
              }
              return _e;
            }(this.buf, O, M);
          }, readBytes: function() {
            var M = this.readVarint() + this.pos, O = this.buf.subarray(this.pos, M);
            return this.pos = M, O;
          }, readPackedVarint: function(M, O) {
            if (this.type !== gi.Bytes)
              return M.push(this.readVarint(O));
            var G = Hs(this);
            for (M = M || []; this.pos < G; )
              M.push(this.readVarint(O));
            return M;
          }, readPackedSVarint: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readSVarint());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readSVarint());
            return M;
          }, readPackedBoolean: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readBoolean());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readBoolean());
            return M;
          }, readPackedFloat: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readFloat());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readFloat());
            return M;
          }, readPackedDouble: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readDouble());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readDouble());
            return M;
          }, readPackedFixed32: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readFixed32());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readFixed32());
            return M;
          }, readPackedSFixed32: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readSFixed32());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readSFixed32());
            return M;
          }, readPackedFixed64: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readFixed64());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readFixed64());
            return M;
          }, readPackedSFixed64: function(M) {
            if (this.type !== gi.Bytes)
              return M.push(this.readSFixed64());
            var O = Hs(this);
            for (M = M || []; this.pos < O; )
              M.push(this.readSFixed64());
            return M;
          }, skip: function(M) {
            var O = 7 & M;
            if (O === gi.Varint)
              for (; this.buf[this.pos++] > 127; )
                ;
            else if (O === gi.Bytes)
              this.pos = this.readVarint() + this.pos;
            else if (O === gi.Fixed32)
              this.pos += 4;
            else {
              if (O !== gi.Fixed64)
                throw new Error("Unimplemented type: " + O);
              this.pos += 8;
            }
          }, writeTag: function(M, O) {
            this.writeVarint(M << 3 | O);
          }, realloc: function(M) {
            for (var O = this.length || 16; O < this.pos + M; )
              O *= 2;
            if (O !== this.length) {
              var G = new Uint8Array(O);
              G.set(this.buf), this.buf = G, this.length = O;
            }
          }, finish: function() {
            return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
          }, writeFixed32: function(M) {
            this.realloc(4), Ml(this.buf, M, this.pos), this.pos += 4;
          }, writeSFixed32: function(M) {
            this.realloc(4), Ml(this.buf, M, this.pos), this.pos += 4;
          }, writeFixed64: function(M) {
            this.realloc(8), Ml(this.buf, -1 & M, this.pos), Ml(this.buf, Math.floor(M * (1 / 4294967296)), this.pos + 4), this.pos += 8;
          }, writeSFixed64: function(M) {
            this.realloc(8), Ml(this.buf, -1 & M, this.pos), Ml(this.buf, Math.floor(M * (1 / 4294967296)), this.pos + 4), this.pos += 8;
          }, writeVarint: function(M) {
            (M = +M || 0) > 268435455 || M < 0 ? function(O, G) {
              var ne, me;
              if (O >= 0 ? (ne = O % 4294967296 | 0, me = O / 4294967296 | 0) : (me = ~(-O / 4294967296), 4294967295 ^ (ne = ~(-O % 4294967296)) ? ne = ne + 1 | 0 : (ne = 0, me = me + 1 | 0)), O >= 18446744073709552e3 || O < -18446744073709552e3)
                throw new Error("Given varint doesn't fit into 10 bytes");
              G.realloc(10), function(_e, Ce, Ne) {
                Ne.buf[Ne.pos++] = 127 & _e | 128, _e >>>= 7, Ne.buf[Ne.pos++] = 127 & _e | 128, _e >>>= 7, Ne.buf[Ne.pos++] = 127 & _e | 128, _e >>>= 7, Ne.buf[Ne.pos++] = 127 & _e | 128, _e >>>= 7, Ne.buf[Ne.pos] = 127 & _e;
              }(ne, 0, G), function(_e, Ce) {
                var Ne = (7 & _e) << 4;
                Ce.buf[Ce.pos++] |= Ne | ((_e >>>= 3) ? 128 : 0), _e && (Ce.buf[Ce.pos++] = 127 & _e | ((_e >>>= 7) ? 128 : 0), _e && (Ce.buf[Ce.pos++] = 127 & _e | ((_e >>>= 7) ? 128 : 0), _e && (Ce.buf[Ce.pos++] = 127 & _e | ((_e >>>= 7) ? 128 : 0), _e && (Ce.buf[Ce.pos++] = 127 & _e | ((_e >>>= 7) ? 128 : 0), _e && (Ce.buf[Ce.pos++] = 127 & _e)))));
              }(me, G);
            }(M, this) : (this.realloc(4), this.buf[this.pos++] = 127 & M | (M > 127 ? 128 : 0), M <= 127 || (this.buf[this.pos++] = 127 & (M >>>= 7) | (M > 127 ? 128 : 0), M <= 127 || (this.buf[this.pos++] = 127 & (M >>>= 7) | (M > 127 ? 128 : 0), M <= 127 || (this.buf[this.pos++] = M >>> 7 & 127))));
          }, writeSVarint: function(M) {
            this.writeVarint(M < 0 ? 2 * -M - 1 : 2 * M);
          }, writeBoolean: function(M) {
            this.writeVarint(Boolean(M));
          }, writeString: function(M) {
            M = String(M), this.realloc(4 * M.length), this.pos++;
            var O = this.pos;
            this.pos = function(ne, me, _e) {
              for (var Ce, Ne, $e = 0; $e < me.length; $e++) {
                if ((Ce = me.charCodeAt($e)) > 55295 && Ce < 57344) {
                  if (!Ne) {
                    Ce > 56319 || $e + 1 === me.length ? (ne[_e++] = 239, ne[_e++] = 191, ne[_e++] = 189) : Ne = Ce;
                    continue;
                  }
                  if (Ce < 56320) {
                    ne[_e++] = 239, ne[_e++] = 191, ne[_e++] = 189, Ne = Ce;
                    continue;
                  }
                  Ce = Ne - 55296 << 10 | Ce - 56320 | 65536, Ne = null;
                } else
                  Ne && (ne[_e++] = 239, ne[_e++] = 191, ne[_e++] = 189, Ne = null);
                Ce < 128 ? ne[_e++] = Ce : (Ce < 2048 ? ne[_e++] = Ce >> 6 | 192 : (Ce < 65536 ? ne[_e++] = Ce >> 12 | 224 : (ne[_e++] = Ce >> 18 | 240, ne[_e++] = Ce >> 12 & 63 | 128), ne[_e++] = Ce >> 6 & 63 | 128), ne[_e++] = 63 & Ce | 128);
              }
              return _e;
            }(this.buf, M, this.pos);
            var G = this.pos - O;
            G >= 128 && lf(O, G, this), this.pos = O - 1, this.writeVarint(G), this.pos += G;
          }, writeFloat: function(M) {
            this.realloc(4), of(this.buf, M, this.pos, !0, 23, 4), this.pos += 4;
          }, writeDouble: function(M) {
            this.realloc(8), of(this.buf, M, this.pos, !0, 52, 8), this.pos += 8;
          }, writeBytes: function(M) {
            var O = M.length;
            this.writeVarint(O), this.realloc(O);
            for (var G = 0; G < O; G++)
              this.buf[this.pos++] = M[G];
          }, writeRawMessage: function(M, O) {
            this.pos++;
            var G = this.pos;
            M(O, this);
            var ne = this.pos - G;
            ne >= 128 && lf(G, ne, this), this.pos = G - 1, this.writeVarint(ne), this.pos += ne;
          }, writeMessage: function(M, O, G) {
            this.writeTag(M, gi.Bytes), this.writeRawMessage(O, G);
          }, writePackedVarint: function(M, O) {
            O.length && this.writeMessage(M, Jh, O);
          }, writePackedSVarint: function(M, O) {
            O.length && this.writeMessage(M, Kh, O);
          }, writePackedBoolean: function(M, O) {
            O.length && this.writeMessage(M, ep, O);
          }, writePackedFloat: function(M, O) {
            O.length && this.writeMessage(M, Qh, O);
          }, writePackedDouble: function(M, O) {
            O.length && this.writeMessage(M, $h, O);
          }, writePackedFixed32: function(M, O) {
            O.length && this.writeMessage(M, tp, O);
          }, writePackedSFixed32: function(M, O) {
            O.length && this.writeMessage(M, rp, O);
          }, writePackedFixed64: function(M, O) {
            O.length && this.writeMessage(M, np, O);
          }, writePackedSFixed64: function(M, O) {
            O.length && this.writeMessage(M, ap, O);
          }, writeBytesField: function(M, O) {
            this.writeTag(M, gi.Bytes), this.writeBytes(O);
          }, writeFixed32Field: function(M, O) {
            this.writeTag(M, gi.Fixed32), this.writeFixed32(O);
          }, writeSFixed32Field: function(M, O) {
            this.writeTag(M, gi.Fixed32), this.writeSFixed32(O);
          }, writeFixed64Field: function(M, O) {
            this.writeTag(M, gi.Fixed64), this.writeFixed64(O);
          }, writeSFixed64Field: function(M, O) {
            this.writeTag(M, gi.Fixed64), this.writeSFixed64(O);
          }, writeVarintField: function(M, O) {
            this.writeTag(M, gi.Varint), this.writeVarint(O);
          }, writeSVarintField: function(M, O) {
            this.writeTag(M, gi.Varint), this.writeSVarint(O);
          }, writeStringField: function(M, O) {
            this.writeTag(M, gi.Bytes), this.writeString(O);
          }, writeFloatField: function(M, O) {
            this.writeTag(M, gi.Fixed32), this.writeFloat(O);
          }, writeDoubleField: function(M, O) {
            this.writeTag(M, gi.Fixed64), this.writeDouble(O);
          }, writeBooleanField: function(M, O) {
            this.writeVarintField(M, Boolean(O));
          } };
          function ip(M, O, G) {
            M === 1 && G.readMessage(op, O);
          }
          function op(M, O, G) {
            if (M === 3) {
              var ne = G.readMessage(sp, {}), me = ne.id, _e = ne.bitmap, Ce = ne.width, Ne = ne.height, $e = ne.left, ct = ne.top, dt = ne.advance;
              O.push({ id: me, bitmap: new hl({ width: Ce + 6, height: Ne + 6 }, _e), metrics: { width: Ce, height: Ne, left: $e, top: ct, advance: dt } });
            }
          }
          function sp(M, O, G) {
            M === 1 ? O.id = G.readVarint() : M === 2 ? O.bitmap = G.readBytes() : M === 3 ? O.width = G.readVarint() : M === 4 ? O.height = G.readVarint() : M === 5 ? O.left = G.readSVarint() : M === 6 ? O.top = G.readSVarint() : M === 7 && (O.advance = G.readVarint());
          }
          function uf(M) {
            for (var O = 0, G = 0, ne = 0, me = M; ne < me.length; ne += 1) {
              var _e = me[ne];
              O += _e.w * _e.h, G = Math.max(G, _e.w);
            }
            M.sort(function(yr, Cr) {
              return Cr.h - yr.h;
            });
            for (var Ce = [{ x: 0, y: 0, w: Math.max(Math.ceil(Math.sqrt(O / 0.95)), G), h: 1 / 0 }], Ne = 0, $e = 0, ct = 0, dt = M; ct < dt.length; ct += 1)
              for (var Rt = dt[ct], Wt = Ce.length - 1; Wt >= 0; Wt--) {
                var qt = Ce[Wt];
                if (!(Rt.w > qt.w || Rt.h > qt.h)) {
                  if (Rt.x = qt.x, Rt.y = qt.y, $e = Math.max($e, Rt.y + Rt.h), Ne = Math.max(Ne, Rt.x + Rt.w), Rt.w === qt.w && Rt.h === qt.h) {
                    var ir = Ce.pop();
                    Wt < Ce.length && (Ce[Wt] = ir);
                  } else
                    Rt.h === qt.h ? (qt.x += Rt.w, qt.w -= Rt.w) : Rt.w === qt.w ? (qt.y += Rt.h, qt.h -= Rt.h) : (Ce.push({ x: qt.x + Rt.w, y: qt.y, w: qt.w - Rt.w, h: Rt.h }), qt.y += Rt.h, qt.h -= Rt.h);
                  break;
                }
              }
            return { w: Ne, h: $e, fill: O / (Ne * $e) || 0 };
          }
          var wc = function(M, O) {
            var G = O.pixelRatio, ne = O.version, me = O.stretchX, _e = O.stretchY, Ce = O.content;
            this.paddedRect = M, this.pixelRatio = G, this.stretchX = me, this.stretchY = _e, this.content = Ce, this.version = ne;
          }, rc = { tl: { configurable: !0 }, br: { configurable: !0 }, tlbr: { configurable: !0 }, displaySize: { configurable: !0 } };
          rc.tl.get = function() {
            return [this.paddedRect.x + 1, this.paddedRect.y + 1];
          }, rc.br.get = function() {
            return [this.paddedRect.x + this.paddedRect.w - 1, this.paddedRect.y + this.paddedRect.h - 1];
          }, rc.tlbr.get = function() {
            return this.tl.concat(this.br);
          }, rc.displaySize.get = function() {
            return [(this.paddedRect.w - 2) / this.pixelRatio, (this.paddedRect.h - 2) / this.pixelRatio];
          }, Object.defineProperties(wc.prototype, rc);
          var nc = function(M, O) {
            var G = {}, ne = {};
            this.haveRenderCallbacks = [];
            var me = [];
            this.addImages(M, G, me), this.addImages(O, ne, me);
            var _e = uf(me), Ce = _e.w, Ne = _e.h, $e = new Wo({ width: Ce || 1, height: Ne || 1 });
            for (var ct in M) {
              var dt = M[ct], Rt = G[ct].paddedRect;
              Wo.copy(dt.data, $e, { x: 0, y: 0 }, { x: Rt.x + 1, y: Rt.y + 1 }, dt.data);
            }
            for (var Wt in O) {
              var qt = O[Wt], ir = ne[Wt].paddedRect, yr = ir.x + 1, Cr = ir.y + 1, Lr = qt.data.width, jr = qt.data.height;
              Wo.copy(qt.data, $e, { x: 0, y: 0 }, { x: yr, y: Cr }, qt.data), Wo.copy(qt.data, $e, { x: 0, y: jr - 1 }, { x: yr, y: Cr - 1 }, { width: Lr, height: 1 }), Wo.copy(qt.data, $e, { x: 0, y: 0 }, { x: yr, y: Cr + jr }, { width: Lr, height: 1 }), Wo.copy(qt.data, $e, { x: Lr - 1, y: 0 }, { x: yr - 1, y: Cr }, { width: 1, height: jr }), Wo.copy(qt.data, $e, { x: 0, y: 0 }, { x: yr + Lr, y: Cr }, { width: 1, height: jr });
            }
            this.image = $e, this.iconPositions = G, this.patternPositions = ne;
          };
          nc.prototype.addImages = function(M, O, G) {
            for (var ne in M) {
              var me = M[ne], _e = { x: 0, y: 0, w: me.data.width + 2, h: me.data.height + 2 };
              G.push(_e), O[ne] = new wc(_e, me), me.hasRenderCallback && this.haveRenderCallbacks.push(ne);
            }
          }, nc.prototype.patchUpdatedImages = function(M, O) {
            for (var G in M.dispatchRenderCallbacks(this.haveRenderCallbacks), M.updatedImages)
              this.patchUpdatedImage(this.iconPositions[G], M.getImage(G), O), this.patchUpdatedImage(this.patternPositions[G], M.getImage(G), O);
          }, nc.prototype.patchUpdatedImage = function(M, O, G) {
            if (M && O && M.version !== O.version) {
              M.version = O.version;
              var ne = M.tl, me = ne[0], _e = ne[1];
              G.update(O.data, void 0, { x: me, y: _e });
            }
          }, Zr("ImagePosition", wc), Zr("ImageAtlas", nc);
          var os = { horizontal: 1, vertical: 2, horizontalOnly: 3 }, Al = function() {
            this.scale = 1, this.fontStack = "", this.imageName = null;
          };
          Al.forText = function(M, O) {
            var G = new Al();
            return G.scale = M || 1, G.fontStack = O, G;
          }, Al.forImage = function(M) {
            var O = new Al();
            return O.imageName = M, O;
          };
          var Do = function() {
            this.text = "", this.sectionIndex = [], this.sections = [], this.imageSectionID = null;
          };
          function Tc(M, O, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr) {
            var Cr, Lr = Do.fromFeature(M, me);
            Rt === os.vertical && Lr.verticalizePunctuation();
            var jr = uo.processBidirectionalText, Ur = uo.processStyledBidirectionalText;
            if (jr && Lr.sections.length === 1) {
              Cr = [];
              for (var Yr = 0, fn = jr(Lr.toString(), du(Lr, ct, _e, O, ne, qt, ir)); Yr < fn.length; Yr += 1) {
                var yn = fn[Yr], Bn = new Do();
                Bn.text = yn, Bn.sections = Lr.sections;
                for (var Fn = 0; Fn < yn.length; Fn++)
                  Bn.sectionIndex.push(0);
                Cr.push(Bn);
              }
            } else if (Ur) {
              Cr = [];
              for (var Gn = 0, oa = Ur(Lr.text, Lr.sectionIndex, du(Lr, ct, _e, O, ne, qt, ir)); Gn < oa.length; Gn += 1) {
                var sa = oa[Gn], Jn = new Do();
                Jn.text = sa[0], Jn.sectionIndex = sa[1], Jn.sections = Lr.sections, Cr.push(Jn);
              }
            } else
              Cr = function(la, Ka) {
                for (var Va = [], ei = la.text, _a = 0, qa = 0, vi = Ka; qa < vi.length; qa += 1) {
                  var ui = vi[qa];
                  Va.push(la.substring(_a, ui)), _a = ui;
                }
                return _a < ei.length && Va.push(la.substring(_a, ei.length)), Va;
              }(Lr, du(Lr, ct, _e, O, ne, qt, ir));
            var pa = [], fa = { positionedLines: pa, text: Lr.toString(), top: dt[1], bottom: dt[1], left: dt[0], right: dt[0], writingMode: Rt, iconsInText: !1, verticalizable: !1 };
            return function(la, Ka, Va, ei, _a, qa, vi, ui, Ai, fi, io, Si) {
              for (var Io = 0, _o = -17, ko = 0, Ho = 0, Ro = ui === "right" ? 1 : ui === "left" ? 0 : 0.5, oo = 0, Mo = 0, Wi = _a; Mo < Wi.length; Mo += 1) {
                var fo = Wi[Mo];
                fo.trim();
                var Ra = fo.getMaxScale(), Qa = 24 * (Ra - 1), Ni = { positionedGlyphs: [], lineOffset: 0 };
                la.positionedLines[oo] = Ni;
                var ji = Ni.positionedGlyphs, Di = 0;
                if (fo.length()) {
                  for (var Ei = 0; Ei < fo.length(); Ei++) {
                    var ai = fo.getSection(Ei), Ui = fo.getSectionIndex(Ei), qo = fo.getCharCode(Ei), rs = 0, Fo = null, Es = null, Ys = null, wo = 24, Ls = !(Ai === os.horizontal || !io && !da(qo) || io && (kc[qo] || (rl = qo, Sn.Arabic(rl) || Sn["Arabic Supplement"](rl) || Sn["Arabic Extended-A"](rl) || Sn["Arabic Presentation Forms-A"](rl) || Sn["Arabic Presentation Forms-B"](rl))));
                    if (ai.imageName) {
                      var Cs = ei[ai.imageName];
                      if (!Cs)
                        continue;
                      Ys = ai.imageName, la.iconsInText = la.iconsInText || !0, Es = Cs.paddedRect;
                      var Ps = Cs.displaySize;
                      ai.scale = 24 * ai.scale / Si, Fo = { width: Ps[0], height: Ps[1], left: 1, top: -3, advance: Ls ? Ps[1] : Ps[0] };
                      var ku = 24 - Ps[1] * ai.scale;
                      rs = Qa + ku, wo = Fo.advance;
                      var zl = Ls ? Ps[0] * ai.scale - 24 * Ra : Ps[1] * ai.scale - 24 * Ra;
                      zl > 0 && zl > Di && (Di = zl);
                    } else {
                      var Oc = Va[ai.fontStack], vl = Oc && Oc[qo];
                      if (vl && vl.rect)
                        Es = vl.rect, Fo = vl.metrics;
                      else {
                        var zc = Ka[ai.fontStack], Dc = zc && zc[qo];
                        if (!Dc)
                          continue;
                        Fo = Dc.metrics;
                      }
                      rs = 24 * (Ra - ai.scale);
                    }
                    Ls ? (la.verticalizable = !0, ji.push({ glyph: qo, imageName: Ys, x: Io, y: _o + rs, vertical: Ls, scale: ai.scale, fontStack: ai.fontStack, sectionIndex: Ui, metrics: Fo, rect: Es }), Io += wo * ai.scale + fi) : (ji.push({ glyph: qo, imageName: Ys, x: Io, y: _o + rs, vertical: Ls, scale: ai.scale, fontStack: ai.fontStack, sectionIndex: Ui, metrics: Fo, rect: Es }), Io += Fo.advance * ai.scale + fi);
                  }
                  if (ji.length !== 0) {
                    var Rc = Io - fi;
                    ko = Math.max(Rc, ko), cp(ji, 0, ji.length - 1, Ro, Di);
                  }
                  Io = 0;
                  var Fc = qa * Ra + Di;
                  Ni.lineOffset = Math.max(Di, Qa), _o += Fc, Ho = Math.max(Fc, Ho), ++oo;
                } else
                  _o += qa, ++oo;
              }
              var rl, Dl = _o - -17, Bc = mu(vi), Rl = Bc.horizontalAlign, nl = Bc.verticalAlign;
              (function(oc, Nc, jc, Uc, sc, Vc, lc, Hc, cc) {
                var qc = (Nc - jc) * sc, Fl = 0;
                Fl = Vc !== lc ? -Hc * Uc - -17 : (-Uc * cc + 0.5) * lc;
                for (var Bl = 0, Nl = oc; Bl < Nl.length; Bl += 1)
                  for (var Gc = Nl[Bl], jl = 0, uc = Gc.positionedGlyphs; jl < uc.length; jl += 1) {
                    var Ul = uc[jl];
                    Ul.x += qc, Ul.y += Fl;
                  }
              })(la.positionedLines, Ro, Rl, nl, ko, Ho, qa, Dl, _a.length), la.top += -nl * Dl, la.bottom = la.top + Dl, la.left += -Rl * ko, la.right = la.left + ko;
            }(fa, O, G, ne, Cr, Ce, Ne, $e, Rt, ct, Wt, yr), !function(la) {
              for (var Ka = 0, Va = la; Ka < Va.length; Ka += 1)
                if (Va[Ka].positionedGlyphs.length !== 0)
                  return !1;
              return !0;
            }(pa) && fa;
          }
          Do.fromFeature = function(M, O) {
            for (var G = new Do(), ne = 0; ne < M.sections.length; ne++) {
              var me = M.sections[ne];
              me.image ? G.addImageSection(me) : G.addTextSection(me, O);
            }
            return G;
          }, Do.prototype.length = function() {
            return this.text.length;
          }, Do.prototype.getSection = function(M) {
            return this.sections[this.sectionIndex[M]];
          }, Do.prototype.getSectionIndex = function(M) {
            return this.sectionIndex[M];
          }, Do.prototype.getCharCode = function(M) {
            return this.text.charCodeAt(M);
          }, Do.prototype.verticalizePunctuation = function() {
            this.text = function(M) {
              for (var O = "", G = 0; G < M.length; G++) {
                var ne = M.charCodeAt(G + 1) || null, me = M.charCodeAt(G - 1) || null;
                (!ne || !Da(ne) || tc[M[G + 1]]) && (!me || !Da(me) || tc[M[G - 1]]) && tc[M[G]] ? O += tc[M[G]] : O += M[G];
              }
              return O;
            }(this.text);
          }, Do.prototype.trim = function() {
            for (var M = 0, O = 0; O < this.text.length && kc[this.text.charCodeAt(O)]; O++)
              M++;
            for (var G = this.text.length, ne = this.text.length - 1; ne >= 0 && ne >= M && kc[this.text.charCodeAt(ne)]; ne--)
              G--;
            this.text = this.text.substring(M, G), this.sectionIndex = this.sectionIndex.slice(M, G);
          }, Do.prototype.substring = function(M, O) {
            var G = new Do();
            return G.text = this.text.substring(M, O), G.sectionIndex = this.sectionIndex.slice(M, O), G.sections = this.sections, G;
          }, Do.prototype.toString = function() {
            return this.text;
          }, Do.prototype.getMaxScale = function() {
            var M = this;
            return this.sectionIndex.reduce(function(O, G) {
              return Math.max(O, M.sections[G].scale);
            }, 0);
          }, Do.prototype.addTextSection = function(M, O) {
            this.text += M.text, this.sections.push(Al.forText(M.scale, M.fontStack || O));
            for (var G = this.sections.length - 1, ne = 0; ne < M.text.length; ++ne)
              this.sectionIndex.push(G);
          }, Do.prototype.addImageSection = function(M) {
            var O = M.image ? M.image.name : "";
            if (O.length !== 0) {
              var G = this.getNextImageSectionCharCode();
              G ? (this.text += String.fromCharCode(G), this.sections.push(Al.forImage(O)), this.sectionIndex.push(this.sections.length - 1)) : A("Reached maximum number of images 6401");
            } else
              A("Can't add FormattedSection with an empty image.");
          }, Do.prototype.getNextImageSectionCharCode = function() {
            return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);
          };
          var kc = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, ts = {};
          function ff(M, O, G, ne, me, _e) {
            if (O.imageName) {
              var Ce = ne[O.imageName];
              return Ce ? Ce.displaySize[0] * O.scale * 24 / _e + me : 0;
            }
            var Ne = G[O.fontStack], $e = Ne && Ne[M];
            return $e ? $e.metrics.advance * O.scale + me : 0;
          }
          function hf(M, O, G, ne) {
            var me = Math.pow(M - O, 2);
            return ne ? M < O ? me / 2 : 2 * me : me + Math.abs(G) * G;
          }
          function lp(M, O, G) {
            var ne = 0;
            return M === 10 && (ne -= 1e4), G && (ne += 150), M !== 40 && M !== 65288 || (ne += 50), O !== 41 && O !== 65289 || (ne += 50), ne;
          }
          function pf(M, O, G, ne, me, _e) {
            for (var Ce = null, Ne = hf(O, G, me, _e), $e = 0, ct = ne; $e < ct.length; $e += 1) {
              var dt = ct[$e], Rt = hf(O - dt.x, G, me, _e) + dt.badness;
              Rt <= Ne && (Ce = dt, Ne = Rt);
            }
            return { index: M, x: O, priorBreak: Ce, badness: Ne };
          }
          function du(M, O, G, ne, me, _e, Ce) {
            if (_e !== "point")
              return [];
            if (!M)
              return [];
            for (var Ne, $e = [], ct = function(Cr, Lr, jr, Ur, Yr, fn) {
              for (var yn = 0, Bn = 0; Bn < Cr.length(); Bn++) {
                var Fn = Cr.getSection(Bn);
                yn += ff(Cr.getCharCode(Bn), Fn, Ur, Yr, Lr, fn);
              }
              return yn / Math.max(1, Math.ceil(yn / jr));
            }(M, O, G, ne, me, Ce), dt = M.text.indexOf("\u200B") >= 0, Rt = 0, Wt = 0; Wt < M.length(); Wt++) {
              var qt = M.getSection(Wt), ir = M.getCharCode(Wt);
              if (kc[ir] || (Rt += ff(ir, qt, ne, me, O, Ce)), Wt < M.length() - 1) {
                var yr = !!(!((Ne = ir) < 11904) && (Sn["Bopomofo Extended"](Ne) || Sn.Bopomofo(Ne) || Sn["CJK Compatibility Forms"](Ne) || Sn["CJK Compatibility Ideographs"](Ne) || Sn["CJK Compatibility"](Ne) || Sn["CJK Radicals Supplement"](Ne) || Sn["CJK Strokes"](Ne) || Sn["CJK Symbols and Punctuation"](Ne) || Sn["CJK Unified Ideographs Extension A"](Ne) || Sn["CJK Unified Ideographs"](Ne) || Sn["Enclosed CJK Letters and Months"](Ne) || Sn["Halfwidth and Fullwidth Forms"](Ne) || Sn.Hiragana(Ne) || Sn["Ideographic Description Characters"](Ne) || Sn["Kangxi Radicals"](Ne) || Sn["Katakana Phonetic Extensions"](Ne) || Sn.Katakana(Ne) || Sn["Vertical Forms"](Ne) || Sn["Yi Radicals"](Ne) || Sn["Yi Syllables"](Ne)));
                (ts[ir] || yr || qt.imageName) && $e.push(pf(Wt + 1, Rt, ct, $e, lp(ir, M.getCharCode(Wt + 1), yr && dt), !1));
              }
            }
            return function Cr(Lr) {
              return Lr ? Cr(Lr.priorBreak).concat(Lr.index) : [];
            }(pf(M.length(), Rt, ct, $e, 0, !0));
          }
          function mu(M) {
            var O = 0.5, G = 0.5;
            switch (M) {
              case "right":
              case "top-right":
              case "bottom-right":
                O = 1;
                break;
              case "left":
              case "top-left":
              case "bottom-left":
                O = 0;
            }
            switch (M) {
              case "bottom":
              case "bottom-right":
              case "bottom-left":
                G = 1;
                break;
              case "top":
              case "top-right":
              case "top-left":
                G = 0;
            }
            return { horizontalAlign: O, verticalAlign: G };
          }
          function cp(M, O, G, ne, me) {
            if (ne || me)
              for (var _e = M[G], Ce = _e.metrics.advance * _e.scale, Ne = (M[G].x + Ce) * ne, $e = O; $e <= G; $e++)
                M[$e].x -= Ne, M[$e].y += me;
          }
          function df(M, O, G, ne, me, _e) {
            var Ce, Ne = M.image;
            if (Ne.content) {
              var $e = Ne.content, ct = Ne.pixelRatio || 1;
              Ce = [$e[0] / ct, $e[1] / ct, Ne.displaySize[0] - $e[2] / ct, Ne.displaySize[1] - $e[3] / ct];
            }
            var dt, Rt, Wt, qt, ir = O.left * _e, yr = O.right * _e;
            G === "width" || G === "both" ? (qt = me[0] + ir - ne[3], Rt = me[0] + yr + ne[1]) : Rt = (qt = me[0] + (ir + yr - Ne.displaySize[0]) / 2) + Ne.displaySize[0];
            var Cr = O.top * _e, Lr = O.bottom * _e;
            return G === "height" || G === "both" ? (dt = me[1] + Cr - ne[0], Wt = me[1] + Lr + ne[2]) : Wt = (dt = me[1] + (Cr + Lr - Ne.displaySize[1]) / 2) + Ne.displaySize[1], { image: Ne, top: dt, right: Rt, bottom: Wt, left: qt, collisionPadding: Ce };
          }
          ts[10] = !0, ts[32] = !0, ts[38] = !0, ts[40] = !0, ts[41] = !0, ts[43] = !0, ts[45] = !0, ts[47] = !0, ts[173] = !0, ts[183] = !0, ts[8203] = !0, ts[8208] = !0, ts[8211] = !0, ts[8231] = !0;
          var Sl = function(M) {
            function O(G, ne, me, _e) {
              M.call(this, G, ne), this.angle = me, _e !== void 0 && (this.segment = _e);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.clone = function() {
              return new O(this.x, this.y, this.angle, this.segment);
            }, O;
          }(t);
          Zr("Anchor", Sl);
          function gu(M, O) {
            var G = O.expression;
            if (G.kind === "constant")
              return { kind: "constant", layoutSize: G.evaluate(new ri(M + 1)) };
            if (G.kind === "source")
              return { kind: "source" };
            for (var ne = G.zoomStops, me = G.interpolationType, _e = 0; _e < ne.length && ne[_e] <= M; )
              _e++;
            for (var Ce = _e = Math.max(0, _e - 1); Ce < ne.length && ne[Ce] < M + 1; )
              Ce++;
            Ce = Math.min(ne.length - 1, Ce);
            var Ne = ne[_e], $e = ne[Ce];
            return G.kind === "composite" ? { kind: "composite", minZoom: Ne, maxZoom: $e, interpolationType: me } : { kind: "camera", minZoom: Ne, maxZoom: $e, minSize: G.evaluate(new ri(Ne)), maxSize: G.evaluate(new ri($e)), interpolationType: me };
          }
          function mf(M, O, G) {
            var ne = O.uSize, me = O.uSizeT, _e = G.lowerSize, Ce = G.upperSize;
            return M.kind === "source" ? _e / 128 : M.kind === "composite" ? wn(_e / 128, Ce / 128, me) : ne;
          }
          function gf(M, O) {
            var G = 0, ne = 0;
            if (M.kind === "constant")
              ne = M.layoutSize;
            else if (M.kind !== "source") {
              var me = M.interpolationType, _e = M.minZoom, Ce = M.maxZoom, Ne = me ? h(Fa.interpolationFactor(me, O, _e, Ce), 0, 1) : 0;
              M.kind === "camera" ? ne = wn(M.minSize, M.maxSize, Ne) : G = Ne;
            }
            return { uSizeT: G, uSize: ne };
          }
          var up = Object.freeze({ __proto__: null, getSizeData: gu, evaluateSizeForFeature: mf, evaluateSizeForZoom: gf, SIZE_PACK_FACTOR: 128 });
          function vf(M, O, G, ne, me) {
            if (O.segment === void 0)
              return !0;
            for (var _e = O, Ce = O.segment + 1, Ne = 0; Ne > -G / 2; ) {
              if (--Ce < 0)
                return !1;
              Ne -= M[Ce].dist(_e), _e = M[Ce];
            }
            Ne += M[Ce].dist(M[Ce + 1]), Ce++;
            for (var $e = [], ct = 0; Ne < G / 2; ) {
              var dt = M[Ce - 1], Rt = M[Ce], Wt = M[Ce + 1];
              if (!Wt)
                return !1;
              var qt = dt.angleTo(Rt) - Rt.angleTo(Wt);
              for (qt = Math.abs((qt + 3 * Math.PI) % (2 * Math.PI) - Math.PI), $e.push({ distance: Ne, angleDelta: qt }), ct += qt; Ne - $e[0].distance > ne; )
                ct -= $e.shift().angleDelta;
              if (ct > me)
                return !1;
              Ce++, Ne += Rt.dist(Wt);
            }
            return !0;
          }
          function yf(M) {
            for (var O = 0, G = 0; G < M.length - 1; G++)
              O += M[G].dist(M[G + 1]);
            return O;
          }
          function xf(M, O, G) {
            return M ? 0.6 * O * G : 0;
          }
          function bf(M, O) {
            return Math.max(M ? M.right - M.left : 0, O ? O.right - O.left : 0);
          }
          function fp(M, O, G, ne, me, _e) {
            for (var Ce = xf(G, me, _e), Ne = bf(G, ne) * _e, $e = 0, ct = yf(M) / 2, dt = 0; dt < M.length - 1; dt++) {
              var Rt = M[dt], Wt = M[dt + 1], qt = Rt.dist(Wt);
              if ($e + qt > ct) {
                var ir = (ct - $e) / qt, yr = wn(Rt.x, Wt.x, ir), Cr = wn(Rt.y, Wt.y, ir), Lr = new Sl(yr, Cr, Wt.angleTo(Rt), dt);
                return Lr._round(), !Ce || vf(M, Lr, Ne, Ce, O) ? Lr : void 0;
              }
              $e += qt;
            }
          }
          function hp(M, O, G, ne, me, _e, Ce, Ne, $e) {
            var ct = xf(ne, _e, Ce), dt = bf(ne, me), Rt = dt * Ce, Wt = M[0].x === 0 || M[0].x === $e || M[0].y === 0 || M[0].y === $e;
            return O - Rt < O / 4 && (O = Rt + O / 4), function qt(ir, yr, Cr, Lr, jr, Ur, Yr, fn, yn) {
              for (var Bn = Ur / 2, Fn = yf(ir), Gn = 0, oa = yr - Cr, sa = [], Jn = 0; Jn < ir.length - 1; Jn++) {
                for (var pa = ir[Jn], fa = ir[Jn + 1], la = pa.dist(fa), Ka = fa.angleTo(pa); oa + Cr < Gn + la; ) {
                  var Va = ((oa += Cr) - Gn) / la, ei = wn(pa.x, fa.x, Va), _a = wn(pa.y, fa.y, Va);
                  if (ei >= 0 && ei < yn && _a >= 0 && _a < yn && oa - Bn >= 0 && oa + Bn <= Fn) {
                    var qa = new Sl(ei, _a, Ka, Jn);
                    qa._round(), Lr && !vf(ir, qa, Ur, Lr, jr) || sa.push(qa);
                  }
                }
                Gn += la;
              }
              return fn || sa.length || Yr || (sa = qt(ir, Gn / 2, Cr, Lr, jr, Ur, Yr, !0, yn)), sa;
            }(M, Wt ? O / 2 * Ne % O : (dt / 2 + 2 * _e) * Ce * Ne % O, O, ct, G, Rt, Wt, !1, $e);
          }
          function _f(M, O, G, ne, me) {
            for (var _e = [], Ce = 0; Ce < M.length; Ce++)
              for (var Ne = M[Ce], $e = void 0, ct = 0; ct < Ne.length - 1; ct++) {
                var dt = Ne[ct], Rt = Ne[ct + 1];
                dt.x < O && Rt.x < O || (dt.x < O ? dt = new t(O, dt.y + (Rt.y - dt.y) * ((O - dt.x) / (Rt.x - dt.x)))._round() : Rt.x < O && (Rt = new t(O, dt.y + (Rt.y - dt.y) * ((O - dt.x) / (Rt.x - dt.x)))._round()), dt.y < G && Rt.y < G || (dt.y < G ? dt = new t(dt.x + (Rt.x - dt.x) * ((G - dt.y) / (Rt.y - dt.y)), G)._round() : Rt.y < G && (Rt = new t(dt.x + (Rt.x - dt.x) * ((G - dt.y) / (Rt.y - dt.y)), G)._round()), dt.x >= ne && Rt.x >= ne || (dt.x >= ne ? dt = new t(ne, dt.y + (Rt.y - dt.y) * ((ne - dt.x) / (Rt.x - dt.x)))._round() : Rt.x >= ne && (Rt = new t(ne, dt.y + (Rt.y - dt.y) * ((ne - dt.x) / (Rt.x - dt.x)))._round()), dt.y >= me && Rt.y >= me || (dt.y >= me ? dt = new t(dt.x + (Rt.x - dt.x) * ((me - dt.y) / (Rt.y - dt.y)), me)._round() : Rt.y >= me && (Rt = new t(dt.x + (Rt.x - dt.x) * ((me - dt.y) / (Rt.y - dt.y)), me)._round()), $e && dt.equals($e[$e.length - 1]) || ($e = [dt], _e.push($e)), $e.push(Rt)))));
              }
            return _e;
          }
          function wf(M, O, G, ne) {
            var me = [], _e = M.image, Ce = _e.pixelRatio, Ne = _e.paddedRect.w - 2, $e = _e.paddedRect.h - 2, ct = M.right - M.left, dt = M.bottom - M.top, Rt = _e.stretchX || [[0, Ne]], Wt = _e.stretchY || [[0, $e]], qt = function(qa, vi) {
              return qa + vi[1] - vi[0];
            }, ir = Rt.reduce(qt, 0), yr = Wt.reduce(qt, 0), Cr = Ne - ir, Lr = $e - yr, jr = 0, Ur = ir, Yr = 0, fn = yr, yn = 0, Bn = Cr, Fn = 0, Gn = Lr;
            if (_e.content && ne) {
              var oa = _e.content;
              jr = Mc(Rt, 0, oa[0]), Yr = Mc(Wt, 0, oa[1]), Ur = Mc(Rt, oa[0], oa[2]), fn = Mc(Wt, oa[1], oa[3]), yn = oa[0] - jr, Fn = oa[1] - Yr, Bn = oa[2] - oa[0] - Ur, Gn = oa[3] - oa[1] - fn;
            }
            var sa = function(qa, vi, ui, Ai) {
              var fi = Ac(qa.stretch - jr, Ur, ct, M.left), io = Sc(qa.fixed - yn, Bn, qa.stretch, ir), Si = Ac(vi.stretch - Yr, fn, dt, M.top), Io = Sc(vi.fixed - Fn, Gn, vi.stretch, yr), _o = Ac(ui.stretch - jr, Ur, ct, M.left), ko = Sc(ui.fixed - yn, Bn, ui.stretch, ir), Ho = Ac(Ai.stretch - Yr, fn, dt, M.top), Ro = Sc(Ai.fixed - Fn, Gn, Ai.stretch, yr), oo = new t(fi, Si), Mo = new t(_o, Si), Wi = new t(_o, Ho), fo = new t(fi, Ho), Ra = new t(io / Ce, Io / Ce), Qa = new t(ko / Ce, Ro / Ce), Ni = O * Math.PI / 180;
              if (Ni) {
                var ji = Math.sin(Ni), Di = Math.cos(Ni), Ei = [Di, -ji, ji, Di];
                oo._matMult(Ei), Mo._matMult(Ei), fo._matMult(Ei), Wi._matMult(Ei);
              }
              var ai = qa.stretch + qa.fixed, Ui = ui.stretch + ui.fixed, qo = vi.stretch + vi.fixed, rs = Ai.stretch + Ai.fixed;
              return { tl: oo, tr: Mo, bl: fo, br: Wi, tex: { x: _e.paddedRect.x + 1 + ai, y: _e.paddedRect.y + 1 + qo, w: Ui - ai, h: rs - qo }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: Ra, pixelOffsetBR: Qa, minFontScaleX: Bn / Ce / ct, minFontScaleY: Gn / Ce / dt, isSDF: G };
            };
            if (ne && (_e.stretchX || _e.stretchY))
              for (var Jn = Tf(Rt, Cr, ir), pa = Tf(Wt, Lr, yr), fa = 0; fa < Jn.length - 1; fa++)
                for (var la = Jn[fa], Ka = Jn[fa + 1], Va = 0; Va < pa.length - 1; Va++) {
                  var ei = pa[Va], _a = pa[Va + 1];
                  me.push(sa(la, ei, Ka, _a));
                }
            else
              me.push(sa({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: Ne + 1 }, { fixed: 0, stretch: $e + 1 }));
            return me;
          }
          function Mc(M, O, G) {
            for (var ne = 0, me = 0, _e = M; me < _e.length; me += 1) {
              var Ce = _e[me];
              ne += Math.max(O, Math.min(G, Ce[1])) - Math.max(O, Math.min(G, Ce[0]));
            }
            return ne;
          }
          function Tf(M, O, G) {
            for (var ne = [{ fixed: -1, stretch: 0 }], me = 0, _e = M; me < _e.length; me += 1) {
              var Ce = _e[me], Ne = Ce[0], $e = Ce[1], ct = ne[ne.length - 1];
              ne.push({ fixed: Ne - ct.stretch, stretch: ct.stretch }), ne.push({ fixed: Ne - ct.stretch, stretch: ct.stretch + ($e - Ne) });
            }
            return ne.push({ fixed: O + 1, stretch: G }), ne;
          }
          function Ac(M, O, G, ne) {
            return M / O * G + ne;
          }
          function Sc(M, O, G, ne) {
            return M - O * G / ne;
          }
          var Ec = function(M, O, G, ne, me, _e, Ce, Ne, $e, ct) {
            if (this.boxStartIndex = M.length, $e) {
              var dt = _e.top, Rt = _e.bottom, Wt = _e.collisionPadding;
              Wt && (dt -= Wt[1], Rt += Wt[3]);
              var qt = Rt - dt;
              qt > 0 && (qt = Math.max(10, qt), this.circleDiameter = qt);
            } else {
              var ir = _e.top * Ce - Ne, yr = _e.bottom * Ce + Ne, Cr = _e.left * Ce - Ne, Lr = _e.right * Ce + Ne, jr = _e.collisionPadding;
              if (jr && (Cr -= jr[0] * Ce, ir -= jr[1] * Ce, Lr += jr[2] * Ce, yr += jr[3] * Ce), ct) {
                var Ur = new t(Cr, ir), Yr = new t(Lr, ir), fn = new t(Cr, yr), yn = new t(Lr, yr), Bn = ct * Math.PI / 180;
                Ur._rotate(Bn), Yr._rotate(Bn), fn._rotate(Bn), yn._rotate(Bn), Cr = Math.min(Ur.x, Yr.x, fn.x, yn.x), Lr = Math.max(Ur.x, Yr.x, fn.x, yn.x), ir = Math.min(Ur.y, Yr.y, fn.y, yn.y), yr = Math.max(Ur.y, Yr.y, fn.y, yn.y);
              }
              M.emplaceBack(O.x, O.y, Cr, ir, Lr, yr, G, ne, me);
            }
            this.boxEndIndex = M.length;
          }, El = function(M, O) {
            if (M === void 0 && (M = []), O === void 0 && (O = pp), this.data = M, this.length = this.data.length, this.compare = O, this.length > 0)
              for (var G = (this.length >> 1) - 1; G >= 0; G--)
                this._down(G);
          };
          function pp(M, O) {
            return M < O ? -1 : M > O ? 1 : 0;
          }
          function dp(M, O, G) {
            O === void 0 && (O = 1), G === void 0 && (G = !1);
            for (var ne = 1 / 0, me = 1 / 0, _e = -1 / 0, Ce = -1 / 0, Ne = M[0], $e = 0; $e < Ne.length; $e++) {
              var ct = Ne[$e];
              (!$e || ct.x < ne) && (ne = ct.x), (!$e || ct.y < me) && (me = ct.y), (!$e || ct.x > _e) && (_e = ct.x), (!$e || ct.y > Ce) && (Ce = ct.y);
            }
            var dt = _e - ne, Rt = Ce - me, Wt = Math.min(dt, Rt), qt = Wt / 2, ir = new El([], mp);
            if (Wt === 0)
              return new t(ne, me);
            for (var yr = ne; yr < _e; yr += Wt)
              for (var Cr = me; Cr < Ce; Cr += Wt)
                ir.push(new Ll(yr + qt, Cr + qt, qt, M));
            for (var Lr = function(Yr) {
              for (var fn = 0, yn = 0, Bn = 0, Fn = Yr[0], Gn = 0, oa = Fn.length, sa = oa - 1; Gn < oa; sa = Gn++) {
                var Jn = Fn[Gn], pa = Fn[sa], fa = Jn.x * pa.y - pa.x * Jn.y;
                yn += (Jn.x + pa.x) * fa, Bn += (Jn.y + pa.y) * fa, fn += 3 * fa;
              }
              return new Ll(yn / fn, Bn / fn, 0, Yr);
            }(M), jr = ir.length; ir.length; ) {
              var Ur = ir.pop();
              (Ur.d > Lr.d || !Lr.d) && (Lr = Ur, G && console.log("found best %d after %d probes", Math.round(1e4 * Ur.d) / 1e4, jr)), Ur.max - Lr.d <= O || (qt = Ur.h / 2, ir.push(new Ll(Ur.p.x - qt, Ur.p.y - qt, qt, M)), ir.push(new Ll(Ur.p.x + qt, Ur.p.y - qt, qt, M)), ir.push(new Ll(Ur.p.x - qt, Ur.p.y + qt, qt, M)), ir.push(new Ll(Ur.p.x + qt, Ur.p.y + qt, qt, M)), jr += 4);
            }
            return G && (console.log("num probes: " + jr), console.log("best distance: " + Lr.d)), Lr.p;
          }
          function mp(M, O) {
            return O.max - M.max;
          }
          function Ll(M, O, G, ne) {
            this.p = new t(M, O), this.h = G, this.d = function(me, _e) {
              for (var Ce = !1, Ne = 1 / 0, $e = 0; $e < _e.length; $e++)
                for (var ct = _e[$e], dt = 0, Rt = ct.length, Wt = Rt - 1; dt < Rt; Wt = dt++) {
                  var qt = ct[dt], ir = ct[Wt];
                  qt.y > me.y != ir.y > me.y && me.x < (ir.x - qt.x) * (me.y - qt.y) / (ir.y - qt.y) + qt.x && (Ce = !Ce), Ne = Math.min(Ne, Us(me, qt, ir));
                }
              return (Ce ? 1 : -1) * Math.sqrt(Ne);
            }(this.p, ne), this.max = this.d + this.h * Math.SQRT2;
          }
          El.prototype.push = function(M) {
            this.data.push(M), this.length++, this._up(this.length - 1);
          }, El.prototype.pop = function() {
            if (this.length !== 0) {
              var M = this.data[0], O = this.data.pop();
              return this.length--, this.length > 0 && (this.data[0] = O, this._down(0)), M;
            }
          }, El.prototype.peek = function() {
            return this.data[0];
          }, El.prototype._up = function(M) {
            for (var O = this.data, G = this.compare, ne = O[M]; M > 0; ) {
              var me = M - 1 >> 1, _e = O[me];
              if (G(ne, _e) >= 0)
                break;
              O[M] = _e, M = me;
            }
            O[M] = ne;
          }, El.prototype._down = function(M) {
            for (var O = this.data, G = this.compare, ne = this.length >> 1, me = O[M]; M < ne; ) {
              var _e = 1 + (M << 1), Ce = O[_e], Ne = _e + 1;
              if (Ne < this.length && G(O[Ne], Ce) < 0 && (_e = Ne, Ce = O[Ne]), G(Ce, me) >= 0)
                break;
              O[M] = Ce, M = _e;
            }
            O[M] = me;
          };
          var vu = Number.POSITIVE_INFINITY;
          function kf(M, O) {
            return O[1] !== vu ? function(G, ne, me) {
              var _e = 0, Ce = 0;
              switch (ne = Math.abs(ne), me = Math.abs(me), G) {
                case "top-right":
                case "top-left":
                case "top":
                  Ce = me - 7;
                  break;
                case "bottom-right":
                case "bottom-left":
                case "bottom":
                  Ce = 7 - me;
              }
              switch (G) {
                case "top-right":
                case "bottom-right":
                case "right":
                  _e = -ne;
                  break;
                case "top-left":
                case "bottom-left":
                case "left":
                  _e = ne;
              }
              return [_e, Ce];
            }(M, O[0], O[1]) : function(G, ne) {
              var me = 0, _e = 0;
              ne < 0 && (ne = 0);
              var Ce = ne / Math.sqrt(2);
              switch (G) {
                case "top-right":
                case "top-left":
                  _e = Ce - 7;
                  break;
                case "bottom-right":
                case "bottom-left":
                  _e = 7 - Ce;
                  break;
                case "bottom":
                  _e = 7 - ne;
                  break;
                case "top":
                  _e = ne - 7;
              }
              switch (G) {
                case "top-right":
                case "bottom-right":
                  me = -Ce;
                  break;
                case "top-left":
                case "bottom-left":
                  me = Ce;
                  break;
                case "left":
                  me = ne;
                  break;
                case "right":
                  me = -ne;
              }
              return [me, _e];
            }(M, O[0]);
          }
          function yu(M) {
            switch (M) {
              case "right":
              case "top-right":
              case "bottom-right":
                return "right";
              case "left":
              case "top-left":
              case "bottom-left":
                return "left";
            }
            return "center";
          }
          function Mf(M, O, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir) {
            var yr = function(Yr, fn, yn, Bn, Fn, Gn, oa, sa) {
              for (var Jn = Bn.layout.get("text-rotate").evaluate(Gn, {}) * Math.PI / 180, pa = [], fa = 0, la = fn.positionedLines; fa < la.length; fa += 1)
                for (var Ka = la[fa], Va = 0, ei = Ka.positionedGlyphs; Va < ei.length; Va += 1) {
                  var _a = ei[Va];
                  if (_a.rect) {
                    var qa = _a.rect || {}, vi = 4, ui = !0, Ai = 1, fi = 0, io = (Fn || sa) && _a.vertical, Si = _a.metrics.advance * _a.scale / 2;
                    if (sa && fn.verticalizable) {
                      var Io = 24 * (_a.scale - 1), _o = (24 - _a.metrics.width * _a.scale) / 2;
                      fi = Ka.lineOffset / 2 - (_a.imageName ? -_o : Io);
                    }
                    if (_a.imageName) {
                      var ko = oa[_a.imageName];
                      ui = ko.sdf, vi = 1 / (Ai = ko.pixelRatio);
                    }
                    var Ho = Fn ? [_a.x + Si, _a.y] : [0, 0], Ro = Fn ? [0, 0] : [_a.x + Si + yn[0], _a.y + yn[1] - fi], oo = [0, 0];
                    io && (oo = Ro, Ro = [0, 0]);
                    var Mo = (_a.metrics.left - vi) * _a.scale - Si + Ro[0], Wi = (-_a.metrics.top - vi) * _a.scale + Ro[1], fo = Mo + qa.w * _a.scale / Ai, Ra = Wi + qa.h * _a.scale / Ai, Qa = new t(Mo, Wi), Ni = new t(fo, Wi), ji = new t(Mo, Ra), Di = new t(fo, Ra);
                    if (io) {
                      var Ei = new t(-Si, Si - -17), ai = -Math.PI / 2, Ui = 12 - Si, qo = _a.imageName ? Ui : 0, rs = new t(22 - Ui, -qo), Fo = new (Function.prototype.bind.apply(t, [null].concat(oo)))();
                      Qa._rotateAround(ai, Ei)._add(rs)._add(Fo), Ni._rotateAround(ai, Ei)._add(rs)._add(Fo), ji._rotateAround(ai, Ei)._add(rs)._add(Fo), Di._rotateAround(ai, Ei)._add(rs)._add(Fo);
                    }
                    if (Jn) {
                      var Es = Math.sin(Jn), Ys = Math.cos(Jn), wo = [Ys, -Es, Es, Ys];
                      Qa._matMult(wo), Ni._matMult(wo), ji._matMult(wo), Di._matMult(wo);
                    }
                    var Ls = new t(0, 0), Cs = new t(0, 0);
                    pa.push({ tl: Qa, tr: Ni, bl: ji, br: Di, tex: qa, writingMode: fn.writingMode, glyphOffset: Ho, sectionIndex: _a.sectionIndex, isSDF: ui, pixelOffsetTL: Ls, pixelOffsetBR: Cs, minFontScaleX: 0, minFontScaleY: 0 });
                  }
                }
              return pa;
            }(0, G, Ne, me, _e, Ce, ne, M.allowVerticalPlacement), Cr = M.textSizeData, Lr = null;
            Cr.kind === "source" ? (Lr = [128 * me.layout.get("text-size").evaluate(Ce, {})])[0] > 32640 && A(M.layerIds[0] + ': Value for "text-size" is >= 255. Reduce your "text-size".') : Cr.kind === "composite" && ((Lr = [128 * qt.compositeTextSizes[0].evaluate(Ce, {}, ir), 128 * qt.compositeTextSizes[1].evaluate(Ce, {}, ir)])[0] > 32640 || Lr[1] > 32640) && A(M.layerIds[0] + ': Value for "text-size" is >= 255. Reduce your "text-size".'), M.addSymbols(M.text, yr, Lr, Ne, _e, Ce, ct, O, $e.lineStartIndex, $e.lineLength, Wt, ir);
            for (var jr = 0, Ur = dt; jr < Ur.length; jr += 1)
              Rt[Ur[jr]] = M.text.placedSymbolArray.length - 1;
            return 4 * yr.length;
          }
          function Af(M) {
            for (var O in M)
              return M[O];
            return null;
          }
          function gp(M, O, G, ne) {
            var me = M.compareText;
            if (O in me) {
              for (var _e = me[O], Ce = _e.length - 1; Ce >= 0; Ce--)
                if (ne.dist(_e[Ce]) < G)
                  return !0;
            } else
              me[O] = [];
            return me[O].push(ne), !1;
          }
          var vp = Tl.VectorTileFeature.types, yp = [{ name: "a_fade_opacity", components: 1, type: "Uint8", offset: 0 }];
          function Lc(M, O, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt) {
            var qt = Ne ? Math.min(32640, Math.round(Ne[0])) : 0, ir = Ne ? Math.min(32640, Math.round(Ne[1])) : 0;
            M.emplaceBack(O, G, Math.round(32 * ne), Math.round(32 * me), _e, Ce, (qt << 1) + ($e ? 1 : 0), ir, 16 * ct, 16 * dt, 256 * Rt, 256 * Wt);
          }
          function xu(M, O, G) {
            M.emplaceBack(O.x, O.y, G), M.emplaceBack(O.x, O.y, G), M.emplaceBack(O.x, O.y, G), M.emplaceBack(O.x, O.y, G);
          }
          function xp(M) {
            for (var O = 0, G = M.sections; O < G.length; O += 1)
              if (ra(G[O].text))
                return !0;
            return !1;
          }
          var Cl = function(M) {
            this.layoutVertexArray = new ks(), this.indexArray = new to(), this.programConfigurations = M, this.segments = new Dt(), this.dynamicLayoutVertexArray = new is(), this.opacityVertexArray = new Js(), this.placedSymbolArray = new Ve();
          };
          Cl.prototype.isEmpty = function() {
            return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
          }, Cl.prototype.upload = function(M, O, G, ne) {
            this.isEmpty() || (G && (this.layoutVertexBuffer = M.createVertexBuffer(this.layoutVertexArray, pu.members), this.indexBuffer = M.createIndexBuffer(this.indexArray, O), this.dynamicLayoutVertexBuffer = M.createVertexBuffer(this.dynamicLayoutVertexArray, Yh.members, !0), this.opacityVertexBuffer = M.createVertexBuffer(this.opacityVertexArray, yp, !0), this.opacityVertexBuffer.itemSize = 1), (G || ne) && this.programConfigurations.upload(M));
          }, Cl.prototype.destroy = function() {
            this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());
          }, Zr("SymbolBuffers", Cl);
          var ac = function(M, O, G) {
            this.layoutVertexArray = new M(), this.layoutAttributes = O, this.indexArray = new G(), this.segments = new Dt(), this.collisionVertexArray = new Ms();
          };
          ac.prototype.upload = function(M) {
            this.layoutVertexBuffer = M.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = M.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = M.createVertexBuffer(this.collisionVertexArray, Wh.members, !0);
          }, ac.prototype.destroy = function() {
            this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());
          }, Zr("CollisionBuffers", ac);
          var si = function(M) {
            this.collisionBoxArray = M.collisionBoxArray, this.zoom = M.zoom, this.overscaling = M.overscaling, this.layers = M.layers, this.layerIds = this.layers.map(function(Ce) {
              return Ce.id;
            }), this.index = M.index, this.pixelRatio = M.pixelRatio, this.sourceLayerIndex = M.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [], this.placementInvProjMatrix = Wl([]), this.placementViewportMatrix = Wl([]);
            var O = this.layers[0]._unevaluatedLayout._values;
            this.textSizeData = gu(this.zoom, O["text-size"]), this.iconSizeData = gu(this.zoom, O["icon-size"]);
            var G = this.layers[0].layout, ne = G.get("symbol-sort-key"), me = G.get("symbol-z-order");
            this.sortFeaturesByKey = me !== "viewport-y" && ne.constantOr(1) !== void 0;
            var _e = me === "viewport-y" || me === "auto" && !this.sortFeaturesByKey;
            this.sortFeaturesByY = _e && (G.get("text-allow-overlap") || G.get("icon-allow-overlap") || G.get("text-ignore-placement") || G.get("icon-ignore-placement")), G.get("symbol-placement") === "point" && (this.writingModes = G.get("text-writing-mode").map(function(Ce) {
              return os[Ce];
            })), this.stateDependentLayerIds = this.layers.filter(function(Ce) {
              return Ce.isStateDependent();
            }).map(function(Ce) {
              return Ce.id;
            }), this.sourceID = M.sourceID;
          };
          si.prototype.createArrays = function() {
            this.text = new Cl(new ci(pu.members, this.layers, this.zoom, function(M) {
              return /^text/.test(M);
            })), this.icon = new Cl(new ci(pu.members, this.layers, this.zoom, function(M) {
              return /^icon/.test(M);
            })), this.glyphOffsetArray = new _t(), this.lineVertexArray = new Et(), this.symbolInstances = new at();
          }, si.prototype.calculateGlyphDependencies = function(M, O, G, ne, me) {
            for (var _e = 0; _e < M.length; _e++)
              if (O[M.charCodeAt(_e)] = !0, (G || ne) && me) {
                var Ce = tc[M.charAt(_e)];
                Ce && (O[Ce.charCodeAt(0)] = !0);
              }
          }, si.prototype.populate = function(M, O, G) {
            var ne = this.layers[0], me = ne.layout, _e = me.get("text-font"), Ce = me.get("text-field"), Ne = me.get("icon-image"), $e = (Ce.value.kind !== "constant" || Ce.value.value instanceof cr && !Ce.value.value.isEmpty() || Ce.value.value.toString().length > 0) && (_e.value.kind !== "constant" || _e.value.value.length > 0), ct = Ne.value.kind !== "constant" || !!Ne.value.value || Object.keys(Ne.parameters).length > 0, dt = me.get("symbol-sort-key");
            if (this.features = [], $e || ct) {
              for (var Rt = O.iconDependencies, Wt = O.glyphDependencies, qt = O.availableImages, ir = new ri(this.zoom), yr = 0, Cr = M; yr < Cr.length; yr += 1) {
                var Lr = Cr[yr], jr = Lr.feature, Ur = Lr.id, Yr = Lr.index, fn = Lr.sourceLayerIndex, yn = ne._featureFilter.needGeometry, Bn = { type: jr.type, id: Ur, properties: jr.properties, geometry: yn ? mi(jr) : [] };
                if (ne._featureFilter.filter(ir, Bn, G)) {
                  yn || (Bn.geometry = mi(jr));
                  var Fn = void 0;
                  if ($e) {
                    var Gn = ne.getValueAndResolveTokens("text-field", Bn, G, qt), oa = cr.factory(Gn);
                    xp(oa) && (this.hasRTLText = !0), (!this.hasRTLText || Hi() === "unavailable" || this.hasRTLText && uo.isParsed()) && (Fn = Xh(oa, ne, Bn));
                  }
                  var sa = void 0;
                  if (ct) {
                    var Jn = ne.getValueAndResolveTokens("icon-image", Bn, G, qt);
                    sa = Jn instanceof gr ? Jn : gr.fromString(Jn);
                  }
                  if (Fn || sa) {
                    var pa = this.sortFeaturesByKey ? dt.evaluate(Bn, {}, G) : void 0, fa = { id: Ur, text: Fn, icon: sa, index: Yr, sourceLayerIndex: fn, geometry: mi(jr), properties: jr.properties, type: vp[jr.type], sortKey: pa };
                    if (this.features.push(fa), sa && (Rt[sa.name] = !0), Fn) {
                      var la = _e.evaluate(Bn, {}, G).join(","), Ka = me.get("text-rotation-alignment") === "map" && me.get("symbol-placement") !== "point";
                      this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(os.vertical) >= 0;
                      for (var Va = 0, ei = Fn.sections; Va < ei.length; Va += 1) {
                        var _a = ei[Va];
                        if (_a.image)
                          Rt[_a.image.name] = !0;
                        else {
                          var qa = za(Fn.toString()), vi = _a.fontStack || la, ui = Wt[vi] = Wt[vi] || {};
                          this.calculateGlyphDependencies(_a.text, ui, Ka, this.allowVerticalPlacement, qa);
                        }
                      }
                    }
                  }
                }
              }
              me.get("symbol-placement") === "line" && (this.features = function(Ai) {
                var fi = {}, io = {}, Si = [], Io = 0;
                function _o(Di) {
                  Si.push(Ai[Di]), Io++;
                }
                function ko(Di, Ei, ai) {
                  var Ui = io[Di];
                  return delete io[Di], io[Ei] = Ui, Si[Ui].geometry[0].pop(), Si[Ui].geometry[0] = Si[Ui].geometry[0].concat(ai[0]), Ui;
                }
                function Ho(Di, Ei, ai) {
                  var Ui = fi[Ei];
                  return delete fi[Ei], fi[Di] = Ui, Si[Ui].geometry[0].shift(), Si[Ui].geometry[0] = ai[0].concat(Si[Ui].geometry[0]), Ui;
                }
                function Ro(Di, Ei, ai) {
                  var Ui = ai ? Ei[0][Ei[0].length - 1] : Ei[0][0];
                  return Di + ":" + Ui.x + ":" + Ui.y;
                }
                for (var oo = 0; oo < Ai.length; oo++) {
                  var Mo = Ai[oo], Wi = Mo.geometry, fo = Mo.text ? Mo.text.toString() : null;
                  if (fo) {
                    var Ra = Ro(fo, Wi), Qa = Ro(fo, Wi, !0);
                    if (Ra in io && Qa in fi && io[Ra] !== fi[Qa]) {
                      var Ni = Ho(Ra, Qa, Wi), ji = ko(Ra, Qa, Si[Ni].geometry);
                      delete fi[Ra], delete io[Qa], io[Ro(fo, Si[ji].geometry, !0)] = ji, Si[Ni].geometry = null;
                    } else
                      Ra in io ? ko(Ra, Qa, Wi) : Qa in fi ? Ho(Ra, Qa, Wi) : (_o(oo), fi[Ra] = Io - 1, io[Qa] = Io - 1);
                  } else
                    _o(oo);
                }
                return Si.filter(function(Di) {
                  return Di.geometry;
                });
              }(this.features)), this.sortFeaturesByKey && this.features.sort(function(Ai, fi) {
                return Ai.sortKey - fi.sortKey;
              });
            }
          }, si.prototype.update = function(M, O, G) {
            this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(M, O, this.layers, G), this.icon.programConfigurations.updatePaintArrays(M, O, this.layers, G));
          }, si.prototype.isEmpty = function() {
            return this.symbolInstances.length === 0 && !this.hasRTLText;
          }, si.prototype.uploadPending = function() {
            return !this.uploaded || this.text.programConfigurations.needsUpload || this.icon.programConfigurations.needsUpload;
          }, si.prototype.upload = function(M) {
            !this.uploaded && this.hasDebugData() && (this.textCollisionBox.upload(M), this.iconCollisionBox.upload(M)), this.text.upload(M, this.sortFeaturesByY, !this.uploaded, this.text.programConfigurations.needsUpload), this.icon.upload(M, this.sortFeaturesByY, !this.uploaded, this.icon.programConfigurations.needsUpload), this.uploaded = !0;
          }, si.prototype.destroyDebugData = function() {
            this.textCollisionBox.destroy(), this.iconCollisionBox.destroy();
          }, si.prototype.destroy = function() {
            this.text.destroy(), this.icon.destroy(), this.hasDebugData() && this.destroyDebugData();
          }, si.prototype.addToLineVertexArray = function(M, O) {
            var G = this.lineVertexArray.length;
            if (M.segment !== void 0) {
              for (var ne = M.dist(O[M.segment + 1]), me = M.dist(O[M.segment]), _e = {}, Ce = M.segment + 1; Ce < O.length; Ce++)
                _e[Ce] = { x: O[Ce].x, y: O[Ce].y, tileUnitDistanceFromAnchor: ne }, Ce < O.length - 1 && (ne += O[Ce + 1].dist(O[Ce]));
              for (var Ne = M.segment || 0; Ne >= 0; Ne--)
                _e[Ne] = { x: O[Ne].x, y: O[Ne].y, tileUnitDistanceFromAnchor: me }, Ne > 0 && (me += O[Ne - 1].dist(O[Ne]));
              for (var $e = 0; $e < O.length; $e++) {
                var ct = _e[$e];
                this.lineVertexArray.emplaceBack(ct.x, ct.y, ct.tileUnitDistanceFromAnchor);
              }
            }
            return { lineStartIndex: G, lineLength: this.lineVertexArray.length - G };
          }, si.prototype.addSymbols = function(M, O, G, ne, me, _e, Ce, Ne, $e, ct, dt, Rt) {
            for (var Wt = M.indexArray, qt = M.layoutVertexArray, ir = M.segments.prepareSegment(4 * O.length, qt, Wt, _e.sortKey), yr = this.glyphOffsetArray.length, Cr = ir.vertexLength, Lr = this.allowVerticalPlacement && Ce === os.vertical ? Math.PI / 2 : 0, jr = _e.text && _e.text.sections, Ur = 0; Ur < O.length; Ur++) {
              var Yr = O[Ur], fn = Yr.tl, yn = Yr.tr, Bn = Yr.bl, Fn = Yr.br, Gn = Yr.tex, oa = Yr.pixelOffsetTL, sa = Yr.pixelOffsetBR, Jn = Yr.minFontScaleX, pa = Yr.minFontScaleY, fa = Yr.glyphOffset, la = Yr.isSDF, Ka = Yr.sectionIndex, Va = ir.vertexLength, ei = fa[1];
              Lc(qt, Ne.x, Ne.y, fn.x, ei + fn.y, Gn.x, Gn.y, G, la, oa.x, oa.y, Jn, pa), Lc(qt, Ne.x, Ne.y, yn.x, ei + yn.y, Gn.x + Gn.w, Gn.y, G, la, sa.x, oa.y, Jn, pa), Lc(qt, Ne.x, Ne.y, Bn.x, ei + Bn.y, Gn.x, Gn.y + Gn.h, G, la, oa.x, sa.y, Jn, pa), Lc(qt, Ne.x, Ne.y, Fn.x, ei + Fn.y, Gn.x + Gn.w, Gn.y + Gn.h, G, la, sa.x, sa.y, Jn, pa), xu(M.dynamicLayoutVertexArray, Ne, Lr), Wt.emplaceBack(Va, Va + 1, Va + 2), Wt.emplaceBack(Va + 1, Va + 2, Va + 3), ir.vertexLength += 4, ir.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(fa[0]), Ur !== O.length - 1 && Ka === O[Ur + 1].sectionIndex || M.programConfigurations.populatePaintArrays(qt.length, _e, _e.index, {}, Rt, jr && jr[Ka]);
            }
            M.placedSymbolArray.emplaceBack(Ne.x, Ne.y, yr, this.glyphOffsetArray.length - yr, Cr, $e, ct, Ne.segment, G ? G[0] : 0, G ? G[1] : 0, ne[0], ne[1], Ce, 0, !1, 0, dt);
          }, si.prototype._addCollisionDebugVertex = function(M, O, G, ne, me, _e) {
            return O.emplaceBack(0, 0), M.emplaceBack(G.x, G.y, ne, me, Math.round(_e.x), Math.round(_e.y));
          }, si.prototype.addCollisionDebugVertices = function(M, O, G, ne, me, _e, Ce) {
            var Ne = me.segments.prepareSegment(4, me.layoutVertexArray, me.indexArray), $e = Ne.vertexLength, ct = me.layoutVertexArray, dt = me.collisionVertexArray, Rt = Ce.anchorX, Wt = Ce.anchorY;
            this._addCollisionDebugVertex(ct, dt, _e, Rt, Wt, new t(M, O)), this._addCollisionDebugVertex(ct, dt, _e, Rt, Wt, new t(G, O)), this._addCollisionDebugVertex(ct, dt, _e, Rt, Wt, new t(G, ne)), this._addCollisionDebugVertex(ct, dt, _e, Rt, Wt, new t(M, ne)), Ne.vertexLength += 4;
            var qt = me.indexArray;
            qt.emplaceBack($e, $e + 1), qt.emplaceBack($e + 1, $e + 2), qt.emplaceBack($e + 2, $e + 3), qt.emplaceBack($e + 3, $e), Ne.primitiveLength += 4;
          }, si.prototype.addDebugCollisionBoxes = function(M, O, G, ne) {
            for (var me = M; me < O; me++) {
              var _e = this.collisionBoxArray.get(me), Ce = _e.x1, Ne = _e.y1, $e = _e.x2, ct = _e.y2;
              this.addCollisionDebugVertices(Ce, Ne, $e, ct, ne ? this.textCollisionBox : this.iconCollisionBox, _e.anchorPoint, G);
            }
          }, si.prototype.generateCollisionDebugBuffers = function() {
            this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new ac(ps, nf.members, F), this.iconCollisionBox = new ac(ps, nf.members, F);
            for (var M = 0; M < this.symbolInstances.length; M++) {
              var O = this.symbolInstances.get(M);
              this.addDebugCollisionBoxes(O.textBoxStartIndex, O.textBoxEndIndex, O, !0), this.addDebugCollisionBoxes(O.verticalTextBoxStartIndex, O.verticalTextBoxEndIndex, O, !0), this.addDebugCollisionBoxes(O.iconBoxStartIndex, O.iconBoxEndIndex, O, !1), this.addDebugCollisionBoxes(O.verticalIconBoxStartIndex, O.verticalIconBoxEndIndex, O, !1);
            }
          }, si.prototype._deserializeCollisionBoxesForSymbol = function(M, O, G, ne, me, _e, Ce, Ne, $e) {
            for (var ct = {}, dt = O; dt < G; dt++) {
              var Rt = M.get(dt);
              ct.textBox = { x1: Rt.x1, y1: Rt.y1, x2: Rt.x2, y2: Rt.y2, anchorPointX: Rt.anchorPointX, anchorPointY: Rt.anchorPointY }, ct.textFeatureIndex = Rt.featureIndex;
              break;
            }
            for (var Wt = ne; Wt < me; Wt++) {
              var qt = M.get(Wt);
              ct.verticalTextBox = { x1: qt.x1, y1: qt.y1, x2: qt.x2, y2: qt.y2, anchorPointX: qt.anchorPointX, anchorPointY: qt.anchorPointY }, ct.verticalTextFeatureIndex = qt.featureIndex;
              break;
            }
            for (var ir = _e; ir < Ce; ir++) {
              var yr = M.get(ir);
              ct.iconBox = { x1: yr.x1, y1: yr.y1, x2: yr.x2, y2: yr.y2, anchorPointX: yr.anchorPointX, anchorPointY: yr.anchorPointY }, ct.iconFeatureIndex = yr.featureIndex;
              break;
            }
            for (var Cr = Ne; Cr < $e; Cr++) {
              var Lr = M.get(Cr);
              ct.verticalIconBox = { x1: Lr.x1, y1: Lr.y1, x2: Lr.x2, y2: Lr.y2, anchorPointX: Lr.anchorPointX, anchorPointY: Lr.anchorPointY }, ct.verticalIconFeatureIndex = Lr.featureIndex;
              break;
            }
            return ct;
          }, si.prototype.deserializeCollisionBoxes = function(M) {
            this.collisionArrays = [];
            for (var O = 0; O < this.symbolInstances.length; O++) {
              var G = this.symbolInstances.get(O);
              this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(M, G.textBoxStartIndex, G.textBoxEndIndex, G.verticalTextBoxStartIndex, G.verticalTextBoxEndIndex, G.iconBoxStartIndex, G.iconBoxEndIndex, G.verticalIconBoxStartIndex, G.verticalIconBoxEndIndex));
            }
          }, si.prototype.hasTextData = function() {
            return this.text.segments.get().length > 0;
          }, si.prototype.hasIconData = function() {
            return this.icon.segments.get().length > 0;
          }, si.prototype.hasDebugData = function() {
            return this.textCollisionBox && this.iconCollisionBox;
          }, si.prototype.hasTextCollisionBoxData = function() {
            return this.hasDebugData() && this.textCollisionBox.segments.get().length > 0;
          }, si.prototype.hasIconCollisionBoxData = function() {
            return this.hasDebugData() && this.iconCollisionBox.segments.get().length > 0;
          }, si.prototype.addIndicesForPlacedSymbol = function(M, O) {
            for (var G = M.placedSymbolArray.get(O), ne = G.vertexStartIndex + 4 * G.numGlyphs, me = G.vertexStartIndex; me < ne; me += 4)
              M.indexArray.emplaceBack(me, me + 1, me + 2), M.indexArray.emplaceBack(me + 1, me + 2, me + 3);
          }, si.prototype.getSortedSymbolIndexes = function(M) {
            if (this.sortedAngle === M && this.symbolInstanceIndexes !== void 0)
              return this.symbolInstanceIndexes;
            for (var O = Math.sin(M), G = Math.cos(M), ne = [], me = [], _e = [], Ce = 0; Ce < this.symbolInstances.length; ++Ce) {
              _e.push(Ce);
              var Ne = this.symbolInstances.get(Ce);
              ne.push(0 | Math.round(O * Ne.anchorX + G * Ne.anchorY)), me.push(Ne.featureIndex);
            }
            return _e.sort(function($e, ct) {
              return ne[$e] - ne[ct] || me[ct] - me[$e];
            }), _e;
          }, si.prototype.addToSortKeyRanges = function(M, O) {
            var G = this.sortKeyRanges[this.sortKeyRanges.length - 1];
            G && G.sortKey === O ? G.symbolInstanceEnd = M + 1 : this.sortKeyRanges.push({ sortKey: O, symbolInstanceStart: M, symbolInstanceEnd: M + 1 });
          }, si.prototype.sortFeatures = function(M) {
            var O = this;
            if (this.sortFeaturesByY && this.sortedAngle !== M && !(this.text.segments.get().length > 1 || this.icon.segments.get().length > 1)) {
              this.symbolInstanceIndexes = this.getSortedSymbolIndexes(M), this.sortedAngle = M, this.text.indexArray.clear(), this.icon.indexArray.clear(), this.featureSortOrder = [];
              for (var G = 0, ne = this.symbolInstanceIndexes; G < ne.length; G += 1) {
                var me = ne[G], _e = this.symbolInstances.get(me);
                this.featureSortOrder.push(_e.featureIndex), [_e.rightJustifiedTextSymbolIndex, _e.centerJustifiedTextSymbolIndex, _e.leftJustifiedTextSymbolIndex].forEach(function(Ce, Ne, $e) {
                  Ce >= 0 && $e.indexOf(Ce) === Ne && O.addIndicesForPlacedSymbol(O.text, Ce);
                }), _e.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, _e.verticalPlacedTextSymbolIndex), _e.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, _e.placedIconSymbolIndex), _e.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, _e.verticalPlacedIconSymbolIndex);
              }
              this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray);
            }
          }, Zr("SymbolBucket", si, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), si.MAX_GLYPHS = 65535, si.addDynamicAttributes = xu;
          var bp = new Lo({ "symbol-placement": new ca(be.layout_symbol["symbol-placement"]), "symbol-spacing": new ca(be.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new ca(be.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new ya(be.layout_symbol["symbol-sort-key"]), "symbol-z-order": new ca(be.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new ca(be.layout_symbol["icon-allow-overlap"]), "icon-ignore-placement": new ca(be.layout_symbol["icon-ignore-placement"]), "icon-optional": new ca(be.layout_symbol["icon-optional"]), "icon-rotation-alignment": new ca(be.layout_symbol["icon-rotation-alignment"]), "icon-size": new ya(be.layout_symbol["icon-size"]), "icon-text-fit": new ca(be.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new ca(be.layout_symbol["icon-text-fit-padding"]), "icon-image": new ya(be.layout_symbol["icon-image"]), "icon-rotate": new ya(be.layout_symbol["icon-rotate"]), "icon-padding": new ca(be.layout_symbol["icon-padding"]), "icon-keep-upright": new ca(be.layout_symbol["icon-keep-upright"]), "icon-offset": new ya(be.layout_symbol["icon-offset"]), "icon-anchor": new ya(be.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new ca(be.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new ca(be.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new ca(be.layout_symbol["text-rotation-alignment"]), "text-field": new ya(be.layout_symbol["text-field"]), "text-font": new ya(be.layout_symbol["text-font"]), "text-size": new ya(be.layout_symbol["text-size"]), "text-max-width": new ya(be.layout_symbol["text-max-width"]), "text-line-height": new ca(be.layout_symbol["text-line-height"]), "text-letter-spacing": new ya(be.layout_symbol["text-letter-spacing"]), "text-justify": new ya(be.layout_symbol["text-justify"]), "text-radial-offset": new ya(be.layout_symbol["text-radial-offset"]), "text-variable-anchor": new ca(be.layout_symbol["text-variable-anchor"]), "text-anchor": new ya(be.layout_symbol["text-anchor"]), "text-max-angle": new ca(be.layout_symbol["text-max-angle"]), "text-writing-mode": new ca(be.layout_symbol["text-writing-mode"]), "text-rotate": new ya(be.layout_symbol["text-rotate"]), "text-padding": new ca(be.layout_symbol["text-padding"]), "text-keep-upright": new ca(be.layout_symbol["text-keep-upright"]), "text-transform": new ya(be.layout_symbol["text-transform"]), "text-offset": new ya(be.layout_symbol["text-offset"]), "text-allow-overlap": new ca(be.layout_symbol["text-allow-overlap"]), "text-ignore-placement": new ca(be.layout_symbol["text-ignore-placement"]), "text-optional": new ca(be.layout_symbol["text-optional"]) }), bu = { paint: new Lo({ "icon-opacity": new ya(be.paint_symbol["icon-opacity"]), "icon-color": new ya(be.paint_symbol["icon-color"]), "icon-halo-color": new ya(be.paint_symbol["icon-halo-color"]), "icon-halo-width": new ya(be.paint_symbol["icon-halo-width"]), "icon-halo-blur": new ya(be.paint_symbol["icon-halo-blur"]), "icon-translate": new ca(be.paint_symbol["icon-translate"]), "icon-translate-anchor": new ca(be.paint_symbol["icon-translate-anchor"]), "text-opacity": new ya(be.paint_symbol["text-opacity"]), "text-color": new ya(be.paint_symbol["text-color"], { runtimeType: wt, getOverride: function(M) {
            return M.textColor;
          }, hasOverride: function(M) {
            return !!M.textColor;
          } }), "text-halo-color": new ya(be.paint_symbol["text-halo-color"]), "text-halo-width": new ya(be.paint_symbol["text-halo-width"]), "text-halo-blur": new ya(be.paint_symbol["text-halo-blur"]), "text-translate": new ca(be.paint_symbol["text-translate"]), "text-translate-anchor": new ca(be.paint_symbol["text-translate-anchor"]) }), layout: bp }, Pl = function(M) {
            this.type = M.property.overrides ? M.property.overrides.runtimeType : Pt, this.defaultValue = M;
          };
          Pl.prototype.evaluate = function(M) {
            if (M.formattedSection) {
              var O = this.defaultValue.property.overrides;
              if (O && O.hasOverride(M.formattedSection))
                return O.getOverride(M.formattedSection);
            }
            return M.feature && M.featureState ? this.defaultValue.evaluate(M.feature, M.featureState) : this.defaultValue.property.specification.default;
          }, Pl.prototype.eachChild = function(M) {
            this.defaultValue.isConstant() || M(this.defaultValue.value._styleExpression.expression);
          }, Pl.prototype.outputDefined = function() {
            return !1;
          }, Pl.prototype.serialize = function() {
            return null;
          }, Zr("FormatSectionOverride", Pl, { omit: ["defaultValue"] });
          var _p = function(M) {
            function O(G) {
              M.call(this, G, bu);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.recalculate = function(G, ne) {
              if (M.prototype.recalculate.call(this, G, ne), this.layout.get("icon-rotation-alignment") === "auto" && (this.layout.get("symbol-placement") !== "point" ? this.layout._values["icon-rotation-alignment"] = "map" : this.layout._values["icon-rotation-alignment"] = "viewport"), this.layout.get("text-rotation-alignment") === "auto" && (this.layout.get("symbol-placement") !== "point" ? this.layout._values["text-rotation-alignment"] = "map" : this.layout._values["text-rotation-alignment"] = "viewport"), this.layout.get("text-pitch-alignment") === "auto" && (this.layout._values["text-pitch-alignment"] = this.layout.get("text-rotation-alignment")), this.layout.get("icon-pitch-alignment") === "auto" && (this.layout._values["icon-pitch-alignment"] = this.layout.get("icon-rotation-alignment")), this.layout.get("symbol-placement") === "point") {
                var me = this.layout.get("text-writing-mode");
                if (me) {
                  for (var _e = [], Ce = 0, Ne = me; Ce < Ne.length; Ce += 1) {
                    var $e = Ne[Ce];
                    _e.indexOf($e) < 0 && _e.push($e);
                  }
                  this.layout._values["text-writing-mode"] = _e;
                } else
                  this.layout._values["text-writing-mode"] = ["horizontal"];
              }
              this._setPaintOverrides();
            }, O.prototype.getValueAndResolveTokens = function(G, ne, me, _e) {
              var Ce = this.layout.get(G).evaluate(ne, {}, me, _e), Ne = this._unevaluatedLayout._values[G];
              return Ne.isDataDriven() || Qt(Ne.value) || !Ce ? Ce : function($e, ct) {
                return ct.replace(/{([^{}]+)}/g, function(dt, Rt) {
                  return Rt in $e ? String($e[Rt]) : "";
                });
              }(ne.properties, Ce);
            }, O.prototype.createBucket = function(G) {
              return new si(G);
            }, O.prototype.queryRadius = function() {
              return 0;
            }, O.prototype.queryIntersectsFeature = function() {
              return !1;
            }, O.prototype._setPaintOverrides = function() {
              for (var G = 0, ne = bu.paint.overridableProperties; G < ne.length; G += 1) {
                var me = ne[G];
                if (O.hasPaintOverride(this.layout, me)) {
                  var _e = this.paint.get(me), Ce = new Pl(_e), Ne = new Jt(Ce, _e.property.specification), $e = null;
                  $e = _e.value.kind === "constant" || _e.value.kind === "source" ? new ar("source", Ne) : new pr("composite", Ne, _e.value.zoomStops, _e.value._interpolationType), this.paint._values[me] = new zi(_e.property, $e, _e.parameters);
                }
              }
            }, O.prototype._handleOverridablePaintPropertyUpdate = function(G, ne, me) {
              return !(!this.layout || ne.isDataDriven() || me.isDataDriven()) && O.hasPaintOverride(this.layout, G);
            }, O.hasPaintOverride = function(G, ne) {
              var me = G.get("text-field"), _e = bu.paint.properties[ne], Ce = !1, Ne = function(dt) {
                for (var Rt = 0, Wt = dt; Rt < Wt.length; Rt += 1) {
                  var qt = Wt[Rt];
                  if (_e.overrides && _e.overrides.hasOverride(qt))
                    return void (Ce = !0);
                }
              };
              if (me.value.kind === "constant" && me.value.value instanceof cr)
                Ne(me.value.value.sections);
              else if (me.value.kind === "source") {
                var $e = function(dt) {
                  if (!Ce)
                    if (dt instanceof un && Fr(dt.value) === nt) {
                      var Rt = dt.value;
                      Ne(Rt.sections);
                    } else
                      dt instanceof vn ? Ne(dt.sections) : dt.eachChild($e);
                }, ct = me.value;
                ct._styleExpression && $e(ct._styleExpression.expression);
              }
              return Ce;
            }, O;
          }(Vo), wp = { paint: new Lo({ "background-color": new ca(be.paint_background["background-color"]), "background-pattern": new Rs(be.paint_background["background-pattern"]), "background-opacity": new ca(be.paint_background["background-opacity"]) }) }, Tp = function(M) {
            function O(G) {
              M.call(this, G, wp);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O;
          }(Vo), kp = { paint: new Lo({ "raster-opacity": new ca(be.paint_raster["raster-opacity"]), "raster-hue-rotate": new ca(be.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new ca(be.paint_raster["raster-brightness-min"]), "raster-brightness-max": new ca(be.paint_raster["raster-brightness-max"]), "raster-saturation": new ca(be.paint_raster["raster-saturation"]), "raster-contrast": new ca(be.paint_raster["raster-contrast"]), "raster-resampling": new ca(be.paint_raster["raster-resampling"]), "raster-fade-duration": new ca(be.paint_raster["raster-fade-duration"]) }) }, Mp = function(M) {
            function O(G) {
              M.call(this, G, kp);
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O;
          }(Vo), Ap = function(M) {
            function O(G) {
              M.call(this, G, {}), this.implementation = G;
            }
            return M && (O.__proto__ = M), O.prototype = Object.create(M && M.prototype), O.prototype.constructor = O, O.prototype.is3D = function() {
              return this.implementation.renderingMode === "3d";
            }, O.prototype.hasOffscreenPass = function() {
              return this.implementation.prerender !== void 0;
            }, O.prototype.recalculate = function() {
            }, O.prototype.updateTransitions = function() {
            }, O.prototype.hasTransition = function() {
            }, O.prototype.serialize = function() {
            }, O.prototype.onAdd = function(G) {
              this.implementation.onAdd && this.implementation.onAdd(G, G.painter.context.gl);
            }, O.prototype.onRemove = function(G) {
              this.implementation.onRemove && this.implementation.onRemove(G, G.painter.context.gl);
            }, O;
          }(Vo), Sp = { circle: hh, heatmap: dh, hillshade: gh, fill: Ih, "fill-extrusion": Uh, line: Gh, symbol: _p, background: Tp, raster: Mp }, Sf = self.HTMLImageElement, Ef = self.HTMLCanvasElement, Lf = self.HTMLVideoElement, Cf = self.ImageData, Cc = self.ImageBitmap, pl = function(M, O, G, ne) {
            this.context = M, this.format = G, this.texture = M.gl.createTexture(), this.update(O, ne);
          };
          pl.prototype.update = function(M, O, G) {
            var ne = M.width, me = M.height, _e = !(this.size && this.size[0] === ne && this.size[1] === me || G), Ce = this.context, Ne = Ce.gl;
            if (this.useMipmap = Boolean(O && O.useMipmap), Ne.bindTexture(Ne.TEXTURE_2D, this.texture), Ce.pixelStoreUnpackFlipY.set(!1), Ce.pixelStoreUnpack.set(1), Ce.pixelStoreUnpackPremultiplyAlpha.set(this.format === Ne.RGBA && (!O || O.premultiply !== !1)), _e)
              this.size = [ne, me], M instanceof Sf || M instanceof Ef || M instanceof Lf || M instanceof Cf || Cc && M instanceof Cc ? Ne.texImage2D(Ne.TEXTURE_2D, 0, this.format, this.format, Ne.UNSIGNED_BYTE, M) : Ne.texImage2D(Ne.TEXTURE_2D, 0, this.format, ne, me, 0, this.format, Ne.UNSIGNED_BYTE, M.data);
            else {
              var $e = G || { x: 0, y: 0 }, ct = $e.x, dt = $e.y;
              M instanceof Sf || M instanceof Ef || M instanceof Lf || M instanceof Cf || Cc && M instanceof Cc ? Ne.texSubImage2D(Ne.TEXTURE_2D, 0, ct, dt, Ne.RGBA, Ne.UNSIGNED_BYTE, M) : Ne.texSubImage2D(Ne.TEXTURE_2D, 0, ct, dt, ne, me, Ne.RGBA, Ne.UNSIGNED_BYTE, M.data);
            }
            this.useMipmap && this.isSizePowerOfTwo() && Ne.generateMipmap(Ne.TEXTURE_2D);
          }, pl.prototype.bind = function(M, O, G) {
            var ne = this.context.gl;
            ne.bindTexture(ne.TEXTURE_2D, this.texture), G !== ne.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (G = ne.LINEAR), M !== this.filter && (ne.texParameteri(ne.TEXTURE_2D, ne.TEXTURE_MAG_FILTER, M), ne.texParameteri(ne.TEXTURE_2D, ne.TEXTURE_MIN_FILTER, G || M), this.filter = M), O !== this.wrap && (ne.texParameteri(ne.TEXTURE_2D, ne.TEXTURE_WRAP_S, O), ne.texParameteri(ne.TEXTURE_2D, ne.TEXTURE_WRAP_T, O), this.wrap = O);
          }, pl.prototype.isSizePowerOfTwo = function() {
            return this.size[0] === this.size[1] && Math.log(this.size[0]) / Math.LN2 % 1 == 0;
          }, pl.prototype.destroy = function() {
            this.context.gl.deleteTexture(this.texture), this.texture = null;
          };
          var _u = function(M) {
            var O = this;
            this._callback = M, this._triggered = !1, typeof MessageChannel < "u" && (this._channel = new MessageChannel(), this._channel.port2.onmessage = function() {
              O._triggered = !1, O._callback();
            });
          };
          _u.prototype.trigger = function() {
            var M = this;
            this._triggered || (this._triggered = !0, this._channel ? this._channel.port1.postMessage(!0) : setTimeout(function() {
              M._triggered = !1, M._callback();
            }, 0));
          }, _u.prototype.remove = function() {
            delete this._channel, this._callback = function() {
            };
          };
          var Il = function(M, O, G) {
            this.target = M, this.parent = O, this.mapId = G, this.callbacks = {}, this.tasks = {}, this.taskQueue = [], this.cancelCallbacks = {}, f(["receive", "process"], this), this.invoker = new _u(this.process), this.target.addEventListener("message", this.receive, !1), this.globalScope = S() ? M : self;
          };
          function Pf(M, O, G) {
            var ne = 2 * Math.PI * 6378137 / 256 / Math.pow(2, G);
            return [M * ne - 2 * Math.PI * 6378137 / 2, O * ne - 2 * Math.PI * 6378137 / 2];
          }
          Il.prototype.send = function(M, O, G, ne, me) {
            var _e = this;
            me === void 0 && (me = !1);
            var Ce = Math.round(1e18 * Math.random()).toString(36).substring(0, 10);
            G && (this.callbacks[Ce] = G);
            var Ne = z(this.globalScope) ? void 0 : [];
            return this.target.postMessage({ id: Ce, type: M, hasCallback: !!G, targetMapId: ne, mustQueue: me, sourceMapId: this.mapId, data: ea(O, Ne) }, Ne), { cancel: function() {
              G && delete _e.callbacks[Ce], _e.target.postMessage({ id: Ce, type: "<cancel>", targetMapId: ne, sourceMapId: _e.mapId });
            } };
          }, Il.prototype.receive = function(M) {
            var O = M.data, G = O.id;
            if (G && (!O.targetMapId || this.mapId === O.targetMapId))
              if (O.type === "<cancel>") {
                delete this.tasks[G];
                var ne = this.cancelCallbacks[G];
                delete this.cancelCallbacks[G], ne && ne();
              } else
                S() || O.mustQueue ? (this.tasks[G] = O, this.taskQueue.push(G), this.invoker.trigger()) : this.processTask(G, O);
          }, Il.prototype.process = function() {
            if (this.taskQueue.length) {
              var M = this.taskQueue.shift(), O = this.tasks[M];
              delete this.tasks[M], this.taskQueue.length && this.invoker.trigger(), O && this.processTask(M, O);
            }
          }, Il.prototype.processTask = function(M, O) {
            var G = this;
            if (O.type === "<response>") {
              var ne = this.callbacks[M];
              delete this.callbacks[M], ne && (O.error ? ne(wa(O.error)) : ne(null, wa(O.data)));
            } else {
              var me = !1, _e = z(this.globalScope) ? void 0 : [], Ce = O.hasCallback ? function(dt, Rt) {
                me = !0, delete G.cancelCallbacks[M], G.target.postMessage({ id: M, type: "<response>", sourceMapId: G.mapId, error: dt ? ea(dt) : null, data: ea(Rt, _e) }, _e);
              } : function(dt) {
                me = !0;
              }, Ne = null, $e = wa(O.data);
              if (this.parent[O.type])
                Ne = this.parent[O.type](O.sourceMapId, $e, Ce);
              else if (this.parent.getWorkerSource) {
                var ct = O.type.split(".");
                Ne = this.parent.getWorkerSource(O.sourceMapId, ct[0], $e.source)[ct[1]]($e, Ce);
              } else
                Ce(new Error("Could not find function " + O.type));
              !me && Ne && Ne.cancel && (this.cancelCallbacks[M] = Ne.cancel);
            }
          }, Il.prototype.remove = function() {
            this.invoker.remove(), this.target.removeEventListener("message", this.receive, !1);
          };
          var no = function(M, O) {
            M && (O ? this.setSouthWest(M).setNorthEast(O) : M.length === 4 ? this.setSouthWest([M[0], M[1]]).setNorthEast([M[2], M[3]]) : this.setSouthWest(M[0]).setNorthEast(M[1]));
          };
          no.prototype.setNorthEast = function(M) {
            return this._ne = M instanceof Mi ? new Mi(M.lng, M.lat) : Mi.convert(M), this;
          }, no.prototype.setSouthWest = function(M) {
            return this._sw = M instanceof Mi ? new Mi(M.lng, M.lat) : Mi.convert(M), this;
          }, no.prototype.extend = function(M) {
            var O, G, ne = this._sw, me = this._ne;
            if (M instanceof Mi)
              O = M, G = M;
            else {
              if (!(M instanceof no)) {
                if (Array.isArray(M)) {
                  if (M.length === 4 || M.every(Array.isArray)) {
                    var _e = M;
                    return this.extend(no.convert(_e));
                  }
                  var Ce = M;
                  return this.extend(Mi.convert(Ce));
                }
                return this;
              }
              if (O = M._sw, G = M._ne, !O || !G)
                return this;
            }
            return ne || me ? (ne.lng = Math.min(O.lng, ne.lng), ne.lat = Math.min(O.lat, ne.lat), me.lng = Math.max(G.lng, me.lng), me.lat = Math.max(G.lat, me.lat)) : (this._sw = new Mi(O.lng, O.lat), this._ne = new Mi(G.lng, G.lat)), this;
          }, no.prototype.getCenter = function() {
            return new Mi((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);
          }, no.prototype.getSouthWest = function() {
            return this._sw;
          }, no.prototype.getNorthEast = function() {
            return this._ne;
          }, no.prototype.getNorthWest = function() {
            return new Mi(this.getWest(), this.getNorth());
          }, no.prototype.getSouthEast = function() {
            return new Mi(this.getEast(), this.getSouth());
          }, no.prototype.getWest = function() {
            return this._sw.lng;
          }, no.prototype.getSouth = function() {
            return this._sw.lat;
          }, no.prototype.getEast = function() {
            return this._ne.lng;
          }, no.prototype.getNorth = function() {
            return this._ne.lat;
          }, no.prototype.toArray = function() {
            return [this._sw.toArray(), this._ne.toArray()];
          }, no.prototype.toString = function() {
            return "LngLatBounds(" + this._sw.toString() + ", " + this._ne.toString() + ")";
          }, no.prototype.isEmpty = function() {
            return !(this._sw && this._ne);
          }, no.prototype.contains = function(M) {
            var O = Mi.convert(M), G = O.lng, ne = O.lat, me = this._sw.lat <= ne && ne <= this._ne.lat, _e = this._sw.lng <= G && G <= this._ne.lng;
            return this._sw.lng > this._ne.lng && (_e = this._sw.lng >= G && G >= this._ne.lng), me && _e;
          }, no.convert = function(M) {
            return !M || M instanceof no ? M : new no(M);
          };
          var Mi = function(M, O) {
            if (isNaN(M) || isNaN(O))
              throw new Error("Invalid LngLat object: (" + M + ", " + O + ")");
            if (this.lng = +M, this.lat = +O, this.lat > 90 || this.lat < -90)
              throw new Error("Invalid LngLat latitude value: must be between -90 and 90");
          };
          Mi.prototype.wrap = function() {
            return new Mi(l(this.lng, -180, 180), this.lat);
          }, Mi.prototype.toArray = function() {
            return [this.lng, this.lat];
          }, Mi.prototype.toString = function() {
            return "LngLat(" + this.lng + ", " + this.lat + ")";
          }, Mi.prototype.distanceTo = function(M) {
            var O = Math.PI / 180, G = this.lat * O, ne = M.lat * O, me = Math.sin(G) * Math.sin(ne) + Math.cos(G) * Math.cos(ne) * Math.cos((M.lng - this.lng) * O);
            return 63710088e-1 * Math.acos(Math.min(me, 1));
          }, Mi.prototype.toBounds = function(M) {
            M === void 0 && (M = 0);
            var O = 360 * M / 40075017, G = O / Math.cos(Math.PI / 180 * this.lat);
            return new no(new Mi(this.lng - G, this.lat - O), new Mi(this.lng + G, this.lat + O));
          }, Mi.convert = function(M) {
            if (M instanceof Mi)
              return M;
            if (Array.isArray(M) && (M.length === 2 || M.length === 3))
              return new Mi(Number(M[0]), Number(M[1]));
            if (!Array.isArray(M) && typeof M == "object" && M !== null)
              return new Mi(Number("lng" in M ? M.lng : M.lon), Number(M.lat));
            throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]");
          };
          var If = 2 * Math.PI * 63710088e-1;
          function Of(M) {
            return If * Math.cos(M * Math.PI / 180);
          }
          function zf(M) {
            return (180 + M) / 360;
          }
          function Df(M) {
            return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + M * Math.PI / 360))) / 360;
          }
          function Rf(M, O) {
            return M / Of(O);
          }
          function wu(M) {
            var O = 180 - 360 * M;
            return 360 / Math.PI * Math.atan(Math.exp(O * Math.PI / 180)) - 90;
          }
          var dl = function(M, O, G) {
            G === void 0 && (G = 0), this.x = +M, this.y = +O, this.z = +G;
          };
          dl.fromLngLat = function(M, O) {
            O === void 0 && (O = 0);
            var G = Mi.convert(M);
            return new dl(zf(G.lng), Df(G.lat), Rf(O, G.lat));
          }, dl.prototype.toLngLat = function() {
            return new Mi(360 * this.x - 180, wu(this.y));
          }, dl.prototype.toAltitude = function() {
            return M = this.z, O = this.y, M * Of(wu(O));
            var M, O;
          }, dl.prototype.meterInMercatorCoordinateUnits = function() {
            return 1 / If * (M = wu(this.y), 1 / Math.cos(M * Math.PI / 180));
            var M;
          };
          var ml = function(M, O, G) {
            this.z = M, this.x = O, this.y = G, this.key = ic(0, M, M, O, G);
          };
          ml.prototype.equals = function(M) {
            return this.z === M.z && this.x === M.x && this.y === M.y;
          }, ml.prototype.url = function(M, O) {
            var G, ne, me, _e, Ce, Ne = (G = this.x, ne = this.y, me = this.z, _e = Pf(256 * G, 256 * (ne = Math.pow(2, me) - ne - 1), me), Ce = Pf(256 * (G + 1), 256 * (ne + 1), me), _e[0] + "," + _e[1] + "," + Ce[0] + "," + Ce[1]), $e = function(ct, dt, Rt) {
              for (var Wt, qt = "", ir = ct; ir > 0; ir--)
                qt += (dt & (Wt = 1 << ir - 1) ? 1 : 0) + (Rt & Wt ? 2 : 0);
              return qt;
            }(this.z, this.x, this.y);
            return M[(this.x + this.y) % M.length].replace("{prefix}", (this.x % 16).toString(16) + (this.y % 16).toString(16)).replace("{z}", String(this.z)).replace("{x}", String(this.x)).replace("{y}", String(O === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace("{quadkey}", $e).replace("{bbox-epsg-3857}", Ne);
          }, ml.prototype.getTilePoint = function(M) {
            var O = Math.pow(2, this.z);
            return new t(8192 * (M.x * O - this.x), 8192 * (M.y * O - this.y));
          }, ml.prototype.toString = function() {
            return this.z + "/" + this.x + "/" + this.y;
          };
          var Ff = function(M, O) {
            this.wrap = M, this.canonical = O, this.key = ic(M, O.z, O.z, O.x, O.y);
          }, ao = function(M, O, G, ne, me) {
            this.overscaledZ = M, this.wrap = O, this.canonical = new ml(G, +ne, +me), this.key = ic(O, M, G, ne, me);
          };
          function ic(M, O, G, ne, me) {
            (M *= 2) < 0 && (M = -1 * M - 1);
            var _e = 1 << G;
            return (_e * _e * M + _e * me + ne).toString(36) + G.toString(36) + O.toString(36);
          }
          ao.prototype.equals = function(M) {
            return this.overscaledZ === M.overscaledZ && this.wrap === M.wrap && this.canonical.equals(M.canonical);
          }, ao.prototype.scaledTo = function(M) {
            var O = this.canonical.z - M;
            return M > this.canonical.z ? new ao(M, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new ao(M, this.wrap, M, this.canonical.x >> O, this.canonical.y >> O);
          }, ao.prototype.calculateScaledKey = function(M, O) {
            var G = this.canonical.z - M;
            return M > this.canonical.z ? ic(this.wrap * +O, M, this.canonical.z, this.canonical.x, this.canonical.y) : ic(this.wrap * +O, M, M, this.canonical.x >> G, this.canonical.y >> G);
          }, ao.prototype.isChildOf = function(M) {
            if (M.wrap !== this.wrap)
              return !1;
            var O = this.canonical.z - M.canonical.z;
            return M.overscaledZ === 0 || M.overscaledZ < this.overscaledZ && M.canonical.x === this.canonical.x >> O && M.canonical.y === this.canonical.y >> O;
          }, ao.prototype.children = function(M) {
            if (this.overscaledZ >= M)
              return [new ao(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];
            var O = this.canonical.z + 1, G = 2 * this.canonical.x, ne = 2 * this.canonical.y;
            return [new ao(O, this.wrap, O, G, ne), new ao(O, this.wrap, O, G + 1, ne), new ao(O, this.wrap, O, G, ne + 1), new ao(O, this.wrap, O, G + 1, ne + 1)];
          }, ao.prototype.isLessThan = function(M) {
            return this.wrap < M.wrap || !(this.wrap > M.wrap) && (this.overscaledZ < M.overscaledZ || !(this.overscaledZ > M.overscaledZ) && (this.canonical.x < M.canonical.x || !(this.canonical.x > M.canonical.x) && this.canonical.y < M.canonical.y));
          }, ao.prototype.wrapped = function() {
            return new ao(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);
          }, ao.prototype.unwrapTo = function(M) {
            return new ao(this.overscaledZ, M, this.canonical.z, this.canonical.x, this.canonical.y);
          }, ao.prototype.overscaleFactor = function() {
            return Math.pow(2, this.overscaledZ - this.canonical.z);
          }, ao.prototype.toUnwrapped = function() {
            return new Ff(this.wrap, this.canonical);
          }, ao.prototype.toString = function() {
            return this.overscaledZ + "/" + this.canonical.x + "/" + this.canonical.y;
          }, ao.prototype.getTilePoint = function(M) {
            return this.canonical.getTilePoint(new dl(M.x - this.wrap, M.y));
          }, Zr("CanonicalTileID", ml), Zr("OverscaledTileID", ao, { omit: ["posMatrix"] });
          var qs = function(M, O, G) {
            if (this.uid = M, O.height !== O.width)
              throw new RangeError("DEM tiles must be square");
            if (G && G !== "mapbox" && G !== "terrarium")
              return A('"' + G + '" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');
            this.stride = O.height;
            var ne = this.dim = O.height - 2;
            this.data = new Uint32Array(O.data.buffer), this.encoding = G || "mapbox";
            for (var me = 0; me < ne; me++)
              this.data[this._idx(-1, me)] = this.data[this._idx(0, me)], this.data[this._idx(ne, me)] = this.data[this._idx(ne - 1, me)], this.data[this._idx(me, -1)] = this.data[this._idx(me, 0)], this.data[this._idx(me, ne)] = this.data[this._idx(me, ne - 1)];
            this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(ne, -1)] = this.data[this._idx(ne - 1, 0)], this.data[this._idx(-1, ne)] = this.data[this._idx(0, ne - 1)], this.data[this._idx(ne, ne)] = this.data[this._idx(ne - 1, ne - 1)];
          };
          qs.prototype.get = function(M, O) {
            var G = new Uint8Array(this.data.buffer), ne = 4 * this._idx(M, O);
            return (this.encoding === "terrarium" ? this._unpackTerrarium : this._unpackMapbox)(G[ne], G[ne + 1], G[ne + 2]);
          }, qs.prototype.getUnpackVector = function() {
            return this.encoding === "terrarium" ? [256, 1, 1 / 256, 32768] : [6553.6, 25.6, 0.1, 1e4];
          }, qs.prototype._idx = function(M, O) {
            if (M < -1 || M >= this.dim + 1 || O < -1 || O >= this.dim + 1)
              throw new RangeError("out of range source coordinates for DEM data");
            return (O + 1) * this.stride + (M + 1);
          }, qs.prototype._unpackMapbox = function(M, O, G) {
            return (256 * M * 256 + 256 * O + G) / 10 - 1e4;
          }, qs.prototype._unpackTerrarium = function(M, O, G) {
            return 256 * M + O + G / 256 - 32768;
          }, qs.prototype.getPixels = function() {
            return new Wo({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));
          }, qs.prototype.backfillBorder = function(M, O, G) {
            if (this.dim !== M.dim)
              throw new Error("dem dimension mismatch");
            var ne = O * this.dim, me = O * this.dim + this.dim, _e = G * this.dim, Ce = G * this.dim + this.dim;
            switch (O) {
              case -1:
                ne = me - 1;
                break;
              case 1:
                me = ne + 1;
            }
            switch (G) {
              case -1:
                _e = Ce - 1;
                break;
              case 1:
                Ce = _e + 1;
            }
            for (var Ne = -O * this.dim, $e = -G * this.dim, ct = _e; ct < Ce; ct++)
              for (var dt = ne; dt < me; dt++)
                this.data[this._idx(dt, ct)] = M.data[this._idx(dt + Ne, ct + $e)];
          }, Zr("DEMData", qs);
          var Pc = function(M) {
            this._stringToNumber = {}, this._numberToString = [];
            for (var O = 0; O < M.length; O++) {
              var G = M[O];
              this._stringToNumber[G] = O, this._numberToString[O] = G;
            }
          };
          Pc.prototype.encode = function(M) {
            return this._stringToNumber[M];
          }, Pc.prototype.decode = function(M) {
            return this._numberToString[M];
          };
          var Ic = function(M, O, G, ne, me) {
            this.type = "Feature", this._vectorTileFeature = M, M._z = O, M._x = G, M._y = ne, this.properties = M.properties, this.id = me;
          }, Tu = { geometry: { configurable: !0 } };
          Tu.geometry.get = function() {
            return this._geometry === void 0 && (this._geometry = this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x, this._vectorTileFeature._y, this._vectorTileFeature._z).geometry), this._geometry;
          }, Tu.geometry.set = function(M) {
            this._geometry = M;
          }, Ic.prototype.toJSON = function() {
            var M = { geometry: this.geometry };
            for (var O in this)
              O !== "_geometry" && O !== "_vectorTileFeature" && (M[O] = this[O]);
            return M;
          }, Object.defineProperties(Ic.prototype, Tu);
          var Ol = function() {
            this.state = {}, this.stateChanges = {}, this.deletedStates = {};
          };
          Ol.prototype.updateState = function(M, O, G) {
            var ne = String(O);
            if (this.stateChanges[M] = this.stateChanges[M] || {}, this.stateChanges[M][ne] = this.stateChanges[M][ne] || {}, i(this.stateChanges[M][ne], G), this.deletedStates[M] === null)
              for (var me in this.deletedStates[M] = {}, this.state[M])
                me !== ne && (this.deletedStates[M][me] = null);
            else if (this.deletedStates[M] && this.deletedStates[M][ne] === null)
              for (var _e in this.deletedStates[M][ne] = {}, this.state[M][ne])
                G[_e] || (this.deletedStates[M][ne][_e] = null);
            else
              for (var Ce in G)
                this.deletedStates[M] && this.deletedStates[M][ne] && this.deletedStates[M][ne][Ce] === null && delete this.deletedStates[M][ne][Ce];
          }, Ol.prototype.removeFeatureState = function(M, O, G) {
            if (this.deletedStates[M] !== null) {
              var ne = String(O);
              if (this.deletedStates[M] = this.deletedStates[M] || {}, G && O !== void 0)
                this.deletedStates[M][ne] !== null && (this.deletedStates[M][ne] = this.deletedStates[M][ne] || {}, this.deletedStates[M][ne][G] = null);
              else if (O !== void 0)
                if (this.stateChanges[M] && this.stateChanges[M][ne])
                  for (G in this.deletedStates[M][ne] = {}, this.stateChanges[M][ne])
                    this.deletedStates[M][ne][G] = null;
                else
                  this.deletedStates[M][ne] = null;
              else
                this.deletedStates[M] = null;
            }
          }, Ol.prototype.getState = function(M, O) {
            var G = String(O), ne = this.state[M] || {}, me = this.stateChanges[M] || {}, _e = i({}, ne[G], me[G]);
            if (this.deletedStates[M] === null)
              return {};
            if (this.deletedStates[M]) {
              var Ce = this.deletedStates[M][O];
              if (Ce === null)
                return {};
              for (var Ne in Ce)
                delete _e[Ne];
            }
            return _e;
          }, Ol.prototype.initializeTileState = function(M, O) {
            M.setFeatureState(this.state, O);
          }, Ol.prototype.coalesceChanges = function(M, O) {
            var G = {};
            for (var ne in this.stateChanges) {
              this.state[ne] = this.state[ne] || {};
              var me = {};
              for (var _e in this.stateChanges[ne])
                this.state[ne][_e] || (this.state[ne][_e] = {}), i(this.state[ne][_e], this.stateChanges[ne][_e]), me[_e] = this.state[ne][_e];
              G[ne] = me;
            }
            for (var Ce in this.deletedStates) {
              this.state[Ce] = this.state[Ce] || {};
              var Ne = {};
              if (this.deletedStates[Ce] === null)
                for (var $e in this.state[Ce])
                  Ne[$e] = {}, this.state[Ce][$e] = {};
              else
                for (var ct in this.deletedStates[Ce]) {
                  if (this.deletedStates[Ce][ct] === null)
                    this.state[Ce][ct] = {};
                  else
                    for (var dt = 0, Rt = Object.keys(this.deletedStates[Ce][ct]); dt < Rt.length; dt += 1) {
                      var Wt = Rt[dt];
                      delete this.state[Ce][ct][Wt];
                    }
                  Ne[ct] = this.state[Ce][ct];
                }
              G[Ce] = G[Ce] || {}, i(G[Ce], Ne);
            }
            if (this.stateChanges = {}, this.deletedStates = {}, Object.keys(G).length !== 0)
              for (var qt in M)
                M[qt].setFeatureState(G, O);
          };
          var Gs = function(M, O) {
            this.tileID = M, this.x = M.canonical.x, this.y = M.canonical.y, this.z = M.canonical.z, this.grid = new ln(8192, 16, 0), this.grid3D = new ln(8192, 16, 0), this.featureIndexArray = new At(), this.promoteId = O;
          };
          function Bf(M, O, G, ne, me) {
            return b(M, function(_e, Ce) {
              var Ne = O instanceof Qo ? O.get(Ce) : null;
              return Ne && Ne.evaluate ? Ne.evaluate(G, ne, me) : Ne;
            });
          }
          function Nf(M) {
            for (var O = 1 / 0, G = 1 / 0, ne = -1 / 0, me = -1 / 0, _e = 0, Ce = M; _e < Ce.length; _e += 1) {
              var Ne = Ce[_e];
              O = Math.min(O, Ne.x), G = Math.min(G, Ne.y), ne = Math.max(ne, Ne.x), me = Math.max(me, Ne.y);
            }
            return { minX: O, minY: G, maxX: ne, maxY: me };
          }
          function Ep(M, O) {
            return O - M;
          }
          Gs.prototype.insert = function(M, O, G, ne, me, _e) {
            var Ce = this.featureIndexArray.length;
            this.featureIndexArray.emplaceBack(G, ne, me);
            for (var Ne = _e ? this.grid3D : this.grid, $e = 0; $e < O.length; $e++) {
              for (var ct = O[$e], dt = [1 / 0, 1 / 0, -1 / 0, -1 / 0], Rt = 0; Rt < ct.length; Rt++) {
                var Wt = ct[Rt];
                dt[0] = Math.min(dt[0], Wt.x), dt[1] = Math.min(dt[1], Wt.y), dt[2] = Math.max(dt[2], Wt.x), dt[3] = Math.max(dt[3], Wt.y);
              }
              dt[0] < 8192 && dt[1] < 8192 && dt[2] >= 0 && dt[3] >= 0 && Ne.insert(Ce, dt[0], dt[1], dt[2], dt[3]);
            }
          }, Gs.prototype.loadVTLayers = function() {
            return this.vtLayers || (this.vtLayers = new Tl.VectorTile(new bc(this.rawTileData)).layers, this.sourceLayerCoder = new Pc(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers;
          }, Gs.prototype.query = function(M, O, G, ne) {
            var me = this;
            this.loadVTLayers();
            for (var _e = M.params || {}, Ce = 8192 / M.tileSize / M.scale, Ne = Ma(_e.filter), $e = M.queryGeometry, ct = M.queryPadding * Ce, dt = Nf($e), Rt = this.grid.query(dt.minX - ct, dt.minY - ct, dt.maxX + ct, dt.maxY + ct), Wt = Nf(M.cameraQueryGeometry), qt = this.grid3D.query(Wt.minX - ct, Wt.minY - ct, Wt.maxX + ct, Wt.maxY + ct, function(fn, yn, Bn, Fn) {
              return function(Gn, oa, sa, Jn, pa) {
                for (var fa = 0, la = Gn; fa < la.length; fa += 1) {
                  var Ka = la[fa];
                  if (oa <= Ka.x && sa <= Ka.y && Jn >= Ka.x && pa >= Ka.y)
                    return !0;
                }
                var Va = [new t(oa, sa), new t(oa, pa), new t(Jn, pa), new t(Jn, sa)];
                if (Gn.length > 2) {
                  for (var ei = 0, _a = Va; ei < _a.length; ei += 1)
                    if (es(Gn, _a[ei]))
                      return !0;
                }
                for (var qa = 0; qa < Gn.length - 1; qa++)
                  if (ul(Gn[qa], Gn[qa + 1], Va))
                    return !0;
                return !1;
              }(M.cameraQueryGeometry, fn - ct, yn - ct, Bn + ct, Fn + ct);
            }), ir = 0, yr = qt; ir < yr.length; ir += 1) {
              var Cr = yr[ir];
              Rt.push(Cr);
            }
            Rt.sort(Ep);
            for (var Lr, jr = {}, Ur = function(fn) {
              var yn = Rt[fn];
              if (yn !== Lr) {
                Lr = yn;
                var Bn = me.featureIndexArray.get(yn), Fn = null;
                me.loadMatchingFeature(jr, Bn.bucketIndex, Bn.sourceLayerIndex, Bn.featureIndex, Ne, _e.layers, _e.availableImages, O, G, ne, function(Gn, oa, sa) {
                  return Fn || (Fn = mi(Gn)), oa.queryIntersectsFeature($e, Gn, sa, Fn, me.z, M.transform, Ce, M.pixelPosMatrix);
                });
              }
            }, Yr = 0; Yr < Rt.length; Yr++)
              Ur(Yr);
            return jr;
          }, Gs.prototype.loadMatchingFeature = function(M, O, G, ne, me, _e, Ce, Ne, $e, ct, dt) {
            var Rt = this.bucketLayerIDs[O];
            if (!_e || function(Bn, Fn) {
              for (var Gn = 0; Gn < Bn.length; Gn++)
                if (Fn.indexOf(Bn[Gn]) >= 0)
                  return !0;
              return !1;
            }(_e, Rt)) {
              var Wt = this.sourceLayerCoder.decode(G), qt = this.vtLayers[Wt].feature(ne);
              if (me.filter(new ri(this.tileID.overscaledZ), qt))
                for (var ir = this.getId(qt, Wt), yr = 0; yr < Rt.length; yr++) {
                  var Cr = Rt[yr];
                  if (!(_e && _e.indexOf(Cr) < 0)) {
                    var Lr = Ne[Cr];
                    if (Lr) {
                      var jr = {};
                      ir !== void 0 && ct && (jr = ct.getState(Lr.sourceLayer || "_geojsonTileLayer", ir));
                      var Ur = $e[Cr];
                      Ur.paint = Bf(Ur.paint, Lr.paint, qt, jr, Ce), Ur.layout = Bf(Ur.layout, Lr.layout, qt, jr, Ce);
                      var Yr = !dt || dt(qt, Lr, jr);
                      if (Yr) {
                        var fn = new Ic(qt, this.z, this.x, this.y, ir);
                        fn.layer = Ur;
                        var yn = M[Cr];
                        yn === void 0 && (yn = M[Cr] = []), yn.push({ featureIndex: ne, feature: fn, intersectionZ: Yr });
                      }
                    }
                  }
                }
            }
          }, Gs.prototype.lookupSymbolFeatures = function(M, O, G, ne, me, _e, Ce, Ne) {
            var $e = {};
            this.loadVTLayers();
            for (var ct = Ma(me), dt = 0, Rt = M; dt < Rt.length; dt += 1) {
              var Wt = Rt[dt];
              this.loadMatchingFeature($e, G, ne, Wt, ct, _e, Ce, Ne, O);
            }
            return $e;
          }, Gs.prototype.hasLayer = function(M) {
            for (var O = 0, G = this.bucketLayerIDs; O < G.length; O += 1)
              for (var ne = 0, me = G[O]; ne < me.length; ne += 1)
                if (M === me[ne])
                  return !0;
            return !1;
          }, Gs.prototype.getId = function(M, O) {
            var G = M.id;
            if (this.promoteId) {
              var ne = typeof this.promoteId == "string" ? this.promoteId : this.promoteId[O];
              typeof (G = M.properties[ne]) == "boolean" && (G = Number(G));
            }
            return G;
          }, Zr("FeatureIndex", Gs, { omit: ["rawTileData", "sourceLayerCoder"] });
          var bo = function(M, O) {
            this.tileID = M, this.uid = c(), this.uses = 0, this.tileSize = O, this.buckets = {}, this.expirationTime = null, this.queryPadding = 0, this.hasSymbolBuckets = !1, this.hasRTLText = !1, this.dependencies = {}, this.expiredRequestCount = 0, this.state = "loading";
          };
          bo.prototype.registerFadeDuration = function(M) {
            var O = M + this.timeAdded;
            O < B.now() || this.fadeEndTime && O < this.fadeEndTime || (this.fadeEndTime = O);
          }, bo.prototype.wasRequested = function() {
            return this.state === "errored" || this.state === "loaded" || this.state === "reloading";
          }, bo.prototype.loadVectorData = function(M, O, G) {
            if (this.hasData() && this.unloadVectorData(), this.state = "loaded", M) {
              for (var ne in M.featureIndex && (this.latestFeatureIndex = M.featureIndex, M.rawTileData ? (this.latestRawTileData = M.rawTileData, this.latestFeatureIndex.rawTileData = M.rawTileData) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData)), this.collisionBoxArray = M.collisionBoxArray, this.buckets = function(ct, dt) {
                var Rt = {};
                if (!dt)
                  return Rt;
                for (var Wt = function() {
                  var yr = ir[qt], Cr = yr.layerIds.map(function(Yr) {
                    return dt.getLayer(Yr);
                  }).filter(Boolean);
                  if (Cr.length !== 0) {
                    yr.layers = Cr, yr.stateDependentLayerIds && (yr.stateDependentLayers = yr.stateDependentLayerIds.map(function(Yr) {
                      return Cr.filter(function(fn) {
                        return fn.id === Yr;
                      })[0];
                    }));
                    for (var Lr = 0, jr = Cr; Lr < jr.length; Lr += 1) {
                      var Ur = jr[Lr];
                      Rt[Ur.id] = yr;
                    }
                  }
                }, qt = 0, ir = ct; qt < ir.length; qt += 1)
                  Wt();
                return Rt;
              }(M.buckets, O.style), this.hasSymbolBuckets = !1, this.buckets) {
                var me = this.buckets[ne];
                if (me instanceof si) {
                  if (this.hasSymbolBuckets = !0, !G)
                    break;
                  me.justReloaded = !0;
                }
              }
              if (this.hasRTLText = !1, this.hasSymbolBuckets)
                for (var _e in this.buckets) {
                  var Ce = this.buckets[_e];
                  if (Ce instanceof si && Ce.hasRTLText) {
                    this.hasRTLText = !0, uo.isLoading() || uo.isLoaded() || Hi() !== "deferred" || ti();
                    break;
                  }
                }
              for (var Ne in this.queryPadding = 0, this.buckets) {
                var $e = this.buckets[Ne];
                this.queryPadding = Math.max(this.queryPadding, O.style.getLayer(Ne).queryRadius($e));
              }
              M.imageAtlas && (this.imageAtlas = M.imageAtlas), M.glyphAtlasImage && (this.glyphAtlasImage = M.glyphAtlasImage);
            } else
              this.collisionBoxArray = new ke();
          }, bo.prototype.unloadVectorData = function() {
            for (var M in this.buckets)
              this.buckets[M].destroy();
            this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.latestFeatureIndex = null, this.state = "unloaded";
          }, bo.prototype.getBucket = function(M) {
            return this.buckets[M.id];
          }, bo.prototype.upload = function(M) {
            for (var O in this.buckets) {
              var G = this.buckets[O];
              G.uploadPending() && G.upload(M);
            }
            var ne = M.gl;
            this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new pl(M, this.imageAtlas.image, ne.RGBA), this.imageAtlas.uploaded = !0), this.glyphAtlasImage && (this.glyphAtlasTexture = new pl(M, this.glyphAtlasImage, ne.ALPHA), this.glyphAtlasImage = null);
          }, bo.prototype.prepare = function(M) {
            this.imageAtlas && this.imageAtlas.patchUpdatedImages(M, this.imageAtlasTexture);
          }, bo.prototype.queryRenderedFeatures = function(M, O, G, ne, me, _e, Ce, Ne, $e, ct) {
            return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: ne, cameraQueryGeometry: me, scale: _e, tileSize: this.tileSize, pixelPosMatrix: ct, transform: Ne, params: Ce, queryPadding: this.queryPadding * $e }, M, O, G) : {};
          }, bo.prototype.querySourceFeatures = function(M, O) {
            var G = this.latestFeatureIndex;
            if (G && G.rawTileData) {
              var ne = G.loadVTLayers(), me = O ? O.sourceLayer : "", _e = ne._geojsonTileLayer || ne[me];
              if (_e)
                for (var Ce = Ma(O && O.filter), Ne = this.tileID.canonical, $e = Ne.z, ct = Ne.x, dt = Ne.y, Rt = { z: $e, x: ct, y: dt }, Wt = 0; Wt < _e.length; Wt++) {
                  var qt = _e.feature(Wt);
                  if (Ce.filter(new ri(this.tileID.overscaledZ), qt)) {
                    var ir = G.getId(qt, me), yr = new Ic(qt, $e, ct, dt, ir);
                    yr.tile = Rt, M.push(yr);
                  }
                }
            }
          }, bo.prototype.hasData = function() {
            return this.state === "loaded" || this.state === "reloading" || this.state === "expired";
          }, bo.prototype.patternsLoaded = function() {
            return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length;
          }, bo.prototype.setExpiryData = function(M) {
            var O = this.expirationTime;
            if (M.cacheControl) {
              var G = E(M.cacheControl);
              G["max-age"] && (this.expirationTime = Date.now() + 1e3 * G["max-age"]);
            } else
              M.expires && (this.expirationTime = new Date(M.expires).getTime());
            if (this.expirationTime) {
              var ne = Date.now(), me = !1;
              if (this.expirationTime > ne)
                me = !1;
              else if (O)
                if (this.expirationTime < O)
                  me = !0;
                else {
                  var _e = this.expirationTime - O;
                  _e ? this.expirationTime = ne + Math.max(_e, 3e4) : me = !0;
                }
              else
                me = !0;
              me ? (this.expiredRequestCount++, this.state = "expired") : this.expiredRequestCount = 0;
            }
          }, bo.prototype.getExpiryTimeout = function() {
            if (this.expirationTime)
              return this.expiredRequestCount ? 1e3 * (1 << Math.min(this.expiredRequestCount - 1, 31)) : Math.min(this.expirationTime - new Date().getTime(), Math.pow(2, 31) - 1);
          }, bo.prototype.setFeatureState = function(M, O) {
            if (this.latestFeatureIndex && this.latestFeatureIndex.rawTileData && Object.keys(M).length !== 0) {
              var G = this.latestFeatureIndex.loadVTLayers();
              for (var ne in this.buckets)
                if (O.style.hasLayer(ne)) {
                  var me = this.buckets[ne], _e = me.layers[0].sourceLayer || "_geojsonTileLayer", Ce = G[_e], Ne = M[_e];
                  if (Ce && Ne && Object.keys(Ne).length !== 0) {
                    me.update(Ne, Ce, this.imageAtlas && this.imageAtlas.patternPositions || {});
                    var $e = O && O.style && O.style.getLayer(ne);
                    $e && (this.queryPadding = Math.max(this.queryPadding, $e.queryRadius(me)));
                  }
                }
            }
          }, bo.prototype.holdingForFade = function() {
            return this.symbolFadeHoldUntil !== void 0;
          }, bo.prototype.symbolFadeFinished = function() {
            return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < B.now();
          }, bo.prototype.clearFadeHold = function() {
            this.symbolFadeHoldUntil = void 0;
          }, bo.prototype.setHoldDuration = function(M) {
            this.symbolFadeHoldUntil = B.now() + M;
          }, bo.prototype.setDependencies = function(M, O) {
            for (var G = {}, ne = 0, me = O; ne < me.length; ne += 1)
              G[me[ne]] = !0;
            this.dependencies[M] = G;
          }, bo.prototype.hasDependency = function(M, O) {
            for (var G = 0, ne = M; G < ne.length; G += 1) {
              var me = ne[G], _e = this.dependencies[me];
              if (_e) {
                for (var Ce = 0, Ne = O; Ce < Ne.length; Ce += 1)
                  if (_e[Ne[Ce]])
                    return !0;
              }
            }
            return !1;
          };
          var tl = self.performance, jf = function(M) {
            this._marks = { start: [M.url, "start"].join("#"), end: [M.url, "end"].join("#"), measure: M.url.toString() }, tl.mark(this._marks.start);
          };
          jf.prototype.finish = function() {
            tl.mark(this._marks.end);
            var M = tl.getEntriesByName(this._marks.measure);
            return M.length === 0 && (tl.measure(this._marks.measure, this._marks.start, this._marks.end), M = tl.getEntriesByName(this._marks.measure), tl.clearMarks(this._marks.start), tl.clearMarks(this._marks.end), tl.clearMeasures(this._marks.measure)), M;
          }, e.Actor = Il, e.AlphaImage = hl, e.CanonicalTileID = ml, e.CollisionBoxArray = ke, e.Color = Kt, e.DEMData = qs, e.DataConstantProperty = ca, e.DictionaryCoder = Pc, e.EXTENT = 8192, e.ErrorEvent = He, e.EvaluationParameters = ri, e.Event = Be, e.Evented = he, e.FeatureIndex = Gs, e.FillBucket = As, e.FillExtrusionBucket = Ss, e.ImageAtlas = nc, e.ImagePosition = wc, e.LineBucket = Zo, e.LngLat = Mi, e.LngLatBounds = no, e.MercatorCoordinate = dl, e.ONE_EM = 24, e.OverscaledTileID = ao, e.Point = t, e.Point$1 = t, e.Properties = Lo, e.Protobuf = bc, e.RGBAImage = Wo, e.RequestManager = ie, e.RequestPerformance = jf, e.ResourceType = vt, e.SegmentVector = Dt, e.SourceFeatureState = Ol, e.StructArrayLayout1ui2 = q, e.StructArrayLayout2f1f2i16 = Ks, e.StructArrayLayout2i4 = as, e.StructArrayLayout3ui6 = to, e.StructArrayLayout4i8 = Li, e.SymbolBucket = si, e.Texture = pl, e.Tile = bo, e.Transitionable = Ko, e.Uniform1f = qr, e.Uniform1i = ua, e.Uniform2f = Mn, e.Uniform3f = Zn, e.Uniform4f = qn, e.UniformColor = na, e.UniformMatrix4f = Sa, e.UnwrappedTileID = Ff, e.ValidationError = Re, e.WritingMode = os, e.ZoomHistory = La, e.add = function(M, O, G) {
            return M[0] = O[0] + G[0], M[1] = O[1] + G[1], M[2] = O[2] + G[2], M;
          }, e.addDynamicAttributes = xu, e.asyncAll = function(M, O, G) {
            if (!M.length)
              return G(null, []);
            var ne = M.length, me = new Array(M.length), _e = null;
            M.forEach(function(Ce, Ne) {
              O(Ce, function($e, ct) {
                $e && (_e = $e), me[Ne] = ct, --ne == 0 && G(_e, me);
              });
            });
          }, e.bezier = u, e.bindAll = f, e.browser = B, e.cacheEntryPossiblyAdded = function(M) {
            ++Qe > Oe && (M.getActor().send("enforceCacheSizeLimit", Ie), Qe = 0);
          }, e.clamp = h, e.clearTileCache = function(M) {
            var O = self.caches.delete("mapbox-tiles");
            M && O.catch(M).then(function() {
              return M();
            });
          }, e.clipLine = _f, e.clone = function(M) {
            var O = new Yo(16);
            return O[0] = M[0], O[1] = M[1], O[2] = M[2], O[3] = M[3], O[4] = M[4], O[5] = M[5], O[6] = M[6], O[7] = M[7], O[8] = M[8], O[9] = M[9], O[10] = M[10], O[11] = M[11], O[12] = M[12], O[13] = M[13], O[14] = M[14], O[15] = M[15], O;
          }, e.clone$1 = T, e.clone$2 = function(M) {
            var O = new Yo(3);
            return O[0] = M[0], O[1] = M[1], O[2] = M[2], O;
          }, e.collisionCircleLayout = Zh, e.config = U, e.create = function() {
            var M = new Yo(16);
            return Yo != Float32Array && (M[1] = 0, M[2] = 0, M[3] = 0, M[4] = 0, M[6] = 0, M[7] = 0, M[8] = 0, M[9] = 0, M[11] = 0, M[12] = 0, M[13] = 0, M[14] = 0), M[0] = 1, M[5] = 1, M[10] = 1, M[15] = 1, M;
          }, e.create$1 = function() {
            var M = new Yo(9);
            return Yo != Float32Array && (M[1] = 0, M[2] = 0, M[3] = 0, M[5] = 0, M[6] = 0, M[7] = 0), M[0] = 1, M[4] = 1, M[8] = 1, M;
          }, e.create$2 = function() {
            var M = new Yo(4);
            return Yo != Float32Array && (M[1] = 0, M[2] = 0), M[0] = 1, M[3] = 1, M;
          }, e.createCommonjsModule = r, e.createExpression = Yt, e.createLayout = ni, e.createStyleLayer = function(M) {
            return M.type === "custom" ? new Ap(M) : new Sp[M.type](M);
          }, e.cross = function(M, O, G) {
            var ne = O[0], me = O[1], _e = O[2], Ce = G[0], Ne = G[1], $e = G[2];
            return M[0] = me * $e - _e * Ne, M[1] = _e * Ce - ne * $e, M[2] = ne * Ne - me * Ce, M;
          }, e.deepEqual = function M(O, G) {
            if (Array.isArray(O)) {
              if (!Array.isArray(G) || O.length !== G.length)
                return !1;
              for (var ne = 0; ne < O.length; ne++)
                if (!M(O[ne], G[ne]))
                  return !1;
              return !0;
            }
            if (typeof O == "object" && O !== null && G !== null) {
              if (typeof G != "object" || Object.keys(O).length !== Object.keys(G).length)
                return !1;
              for (var me in O)
                if (!M(O[me], G[me]))
                  return !1;
              return !0;
            }
            return O === G;
          }, e.dot = function(M, O) {
            return M[0] * O[0] + M[1] * O[1] + M[2] * O[2];
          }, e.dot$1 = function(M, O) {
            return M[0] * O[0] + M[1] * O[1] + M[2] * O[2] + M[3] * O[3];
          }, e.ease = o, e.emitValidationErrors = Tn, e.endsWith = _, e.enforceCacheSizeLimit = function(M) {
            Ze(), we && we.then(function(O) {
              O.keys().then(function(G) {
                for (var ne = 0; ne < G.length - M; ne++)
                  O.delete(G[ne]);
              });
            });
          }, e.evaluateSizeForFeature = mf, e.evaluateSizeForZoom = gf, e.evaluateVariableOffset = kf, e.evented = wi, e.extend = i, e.featureFilter = Ma, e.filterObject = w, e.fromRotation = function(M, O) {
            var G = Math.sin(O), ne = Math.cos(O);
            return M[0] = ne, M[1] = G, M[2] = 0, M[3] = -G, M[4] = ne, M[5] = 0, M[6] = 0, M[7] = 0, M[8] = 1, M;
          }, e.getAnchorAlignment = mu, e.getAnchorJustification = yu, e.getArrayBuffer = mt, e.getImage = Gt, e.getJSON = function(M, O) {
            return Ke(i(M, { type: "json" }), O);
          }, e.getRTLTextPluginStatus = Hi, e.getReferrer = yt, e.getVideo = function(M, O) {
            var G, ne, me = self.document.createElement("video");
            me.muted = !0, me.onloadstart = function() {
              O(null, me);
            };
            for (var _e = 0; _e < M.length; _e++) {
              var Ce = self.document.createElement("source");
              G = M[_e], ne = void 0, (ne = self.document.createElement("a")).href = G, (ne.protocol !== self.document.location.protocol || ne.host !== self.document.location.host) && (me.crossOrigin = "Anonymous"), Ce.src = M[_e], me.appendChild(Ce);
            }
            return { cancel: function() {
            } };
          }, e.identity = Wl, e.invert = function(M, O) {
            var G = O[0], ne = O[1], me = O[2], _e = O[3], Ce = O[4], Ne = O[5], $e = O[6], ct = O[7], dt = O[8], Rt = O[9], Wt = O[10], qt = O[11], ir = O[12], yr = O[13], Cr = O[14], Lr = O[15], jr = G * Ne - ne * Ce, Ur = G * $e - me * Ce, Yr = G * ct - _e * Ce, fn = ne * $e - me * Ne, yn = ne * ct - _e * Ne, Bn = me * ct - _e * $e, Fn = dt * yr - Rt * ir, Gn = dt * Cr - Wt * ir, oa = dt * Lr - qt * ir, sa = Rt * Cr - Wt * yr, Jn = Rt * Lr - qt * yr, pa = Wt * Lr - qt * Cr, fa = jr * pa - Ur * Jn + Yr * sa + fn * oa - yn * Gn + Bn * Fn;
            return fa ? (fa = 1 / fa, M[0] = (Ne * pa - $e * Jn + ct * sa) * fa, M[1] = (me * Jn - ne * pa - _e * sa) * fa, M[2] = (yr * Bn - Cr * yn + Lr * fn) * fa, M[3] = (Wt * yn - Rt * Bn - qt * fn) * fa, M[4] = ($e * oa - Ce * pa - ct * Gn) * fa, M[5] = (G * pa - me * oa + _e * Gn) * fa, M[6] = (Cr * Yr - ir * Bn - Lr * Ur) * fa, M[7] = (dt * Bn - Wt * Yr + qt * Ur) * fa, M[8] = (Ce * Jn - Ne * oa + ct * Fn) * fa, M[9] = (ne * oa - G * Jn - _e * Fn) * fa, M[10] = (ir * yn - yr * Yr + Lr * jr) * fa, M[11] = (Rt * Yr - dt * yn - qt * jr) * fa, M[12] = (Ne * Gn - Ce * sa - $e * Fn) * fa, M[13] = (G * sa - ne * Gn + me * Fn) * fa, M[14] = (yr * Ur - ir * fn - Cr * jr) * fa, M[15] = (dt * fn - Rt * Ur + Wt * jr) * fa, M) : null;
          }, e.isChar = Sn, e.isMapboxURL = le, e.keysDifference = function(M, O) {
            var G = [];
            for (var ne in M)
              ne in O || G.push(ne);
            return G;
          }, e.makeRequest = Ke, e.mapObject = b, e.mercatorXfromLng = zf, e.mercatorYfromLat = Df, e.mercatorZfromAltitude = Rf, e.mul = tu, e.multiply = fl, e.mvt = Tl, e.normalize = function(M, O) {
            var G = O[0], ne = O[1], me = O[2], _e = G * G + ne * ne + me * me;
            return _e > 0 && (_e = 1 / Math.sqrt(_e)), M[0] = O[0] * _e, M[1] = O[1] * _e, M[2] = O[2] * _e, M;
          }, e.number = wn, e.offscreenCanvasSupported = ot, e.ortho = function(M, O, G, ne, me, _e, Ce) {
            var Ne = 1 / (O - G), $e = 1 / (ne - me), ct = 1 / (_e - Ce);
            return M[0] = -2 * Ne, M[1] = 0, M[2] = 0, M[3] = 0, M[4] = 0, M[5] = -2 * $e, M[6] = 0, M[7] = 0, M[8] = 0, M[9] = 0, M[10] = 2 * ct, M[11] = 0, M[12] = (O + G) * Ne, M[13] = (me + ne) * $e, M[14] = (Ce + _e) * ct, M[15] = 1, M;
          }, e.parseGlyphPBF = function(M) {
            return new bc(M).readFields(ip, []);
          }, e.pbf = bc, e.performSymbolLayout = function(M, O, G, ne, me, _e, Ce) {
            M.createArrays();
            var Ne = 512 * M.overscaling;
            M.tilePixelRatio = 8192 / Ne, M.compareText = {}, M.iconsNeedLinear = !1;
            var $e = M.layers[0].layout, ct = M.layers[0]._unevaluatedLayout._values, dt = {};
            if (M.textSizeData.kind === "composite") {
              var Rt = M.textSizeData, Wt = Rt.minZoom, qt = Rt.maxZoom;
              dt.compositeTextSizes = [ct["text-size"].possiblyEvaluate(new ri(Wt), Ce), ct["text-size"].possiblyEvaluate(new ri(qt), Ce)];
            }
            if (M.iconSizeData.kind === "composite") {
              var ir = M.iconSizeData, yr = ir.minZoom, Cr = ir.maxZoom;
              dt.compositeIconSizes = [ct["icon-size"].possiblyEvaluate(new ri(yr), Ce), ct["icon-size"].possiblyEvaluate(new ri(Cr), Ce)];
            }
            dt.layoutTextSize = ct["text-size"].possiblyEvaluate(new ri(M.zoom + 1), Ce), dt.layoutIconSize = ct["icon-size"].possiblyEvaluate(new ri(M.zoom + 1), Ce), dt.textMaxSize = ct["text-size"].possiblyEvaluate(new ri(18));
            for (var Lr = 24 * $e.get("text-line-height"), jr = $e.get("text-rotation-alignment") === "map" && $e.get("symbol-placement") !== "point", Ur = $e.get("text-keep-upright"), Yr = $e.get("text-size"), fn = function() {
              var Fn = Bn[yn], Gn = $e.get("text-font").evaluate(Fn, {}, Ce).join(","), oa = Yr.evaluate(Fn, {}, Ce), sa = dt.layoutTextSize.evaluate(Fn, {}, Ce), Jn = dt.layoutIconSize.evaluate(Fn, {}, Ce), pa = { horizontal: {}, vertical: void 0 }, fa = Fn.text, la = [0, 0];
              if (fa) {
                var Ka = fa.toString(), Va = 24 * $e.get("text-letter-spacing").evaluate(Fn, {}, Ce), ei = function(Ra) {
                  for (var Qa = 0, Ni = Ra; Qa < Ni.length; Qa += 1)
                    if (!Ea(Ni[Qa].charCodeAt(0)))
                      return !1;
                  return !0;
                }(Ka) ? Va : 0, _a = $e.get("text-anchor").evaluate(Fn, {}, Ce), qa = $e.get("text-variable-anchor");
                if (!qa) {
                  var vi = $e.get("text-radial-offset").evaluate(Fn, {}, Ce);
                  la = vi ? kf(_a, [24 * vi, vu]) : $e.get("text-offset").evaluate(Fn, {}, Ce).map(function(Ra) {
                    return 24 * Ra;
                  });
                }
                var ui = jr ? "center" : $e.get("text-justify").evaluate(Fn, {}, Ce), Ai = $e.get("symbol-placement"), fi = Ai === "point" ? 24 * $e.get("text-max-width").evaluate(Fn, {}, Ce) : 0, io = function() {
                  M.allowVerticalPlacement && za(Ka) && (pa.vertical = Tc(fa, O, G, me, Gn, fi, Lr, _a, "left", ei, la, os.vertical, !0, Ai, sa, oa));
                };
                if (!jr && qa) {
                  for (var Si = ui === "auto" ? qa.map(function(Ra) {
                    return yu(Ra);
                  }) : [ui], Io = !1, _o = 0; _o < Si.length; _o++) {
                    var ko = Si[_o];
                    if (!pa.horizontal[ko])
                      if (Io)
                        pa.horizontal[ko] = pa.horizontal[0];
                      else {
                        var Ho = Tc(fa, O, G, me, Gn, fi, Lr, "center", ko, ei, la, os.horizontal, !1, Ai, sa, oa);
                        Ho && (pa.horizontal[ko] = Ho, Io = Ho.positionedLines.length === 1);
                      }
                  }
                  io();
                } else {
                  ui === "auto" && (ui = yu(_a));
                  var Ro = Tc(fa, O, G, me, Gn, fi, Lr, _a, ui, ei, la, os.horizontal, !1, Ai, sa, oa);
                  Ro && (pa.horizontal[ui] = Ro), io(), za(Ka) && jr && Ur && (pa.vertical = Tc(fa, O, G, me, Gn, fi, Lr, _a, ui, ei, la, os.vertical, !1, Ai, sa, oa));
                }
              }
              var oo = void 0, Mo = !1;
              if (Fn.icon && Fn.icon.name) {
                var Wi = ne[Fn.icon.name];
                Wi && (oo = function(Ra, Qa, Ni) {
                  var ji = mu(Ni), Di = ji.horizontalAlign, Ei = ji.verticalAlign, ai = Qa[0], Ui = Qa[1], qo = ai - Ra.displaySize[0] * Di, rs = qo + Ra.displaySize[0], Fo = Ui - Ra.displaySize[1] * Ei;
                  return { image: Ra, top: Fo, bottom: Fo + Ra.displaySize[1], left: qo, right: rs };
                }(me[Fn.icon.name], $e.get("icon-offset").evaluate(Fn, {}, Ce), $e.get("icon-anchor").evaluate(Fn, {}, Ce)), Mo = Wi.sdf, M.sdfIcons === void 0 ? M.sdfIcons = Wi.sdf : M.sdfIcons !== Wi.sdf && A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (Wi.pixelRatio !== M.pixelRatio || $e.get("icon-rotate").constantOr(1) !== 0) && (M.iconsNeedLinear = !0));
              }
              var fo = Af(pa.horizontal) || pa.vertical;
              M.iconsInText = !!fo && fo.iconsInText, (fo || oo) && function(Ra, Qa, Ni, ji, Di, Ei, ai, Ui, qo, rs, Fo) {
                var Es = Ei.textMaxSize.evaluate(Qa, {});
                Es === void 0 && (Es = ai);
                var Ys, wo = Ra.layers[0].layout, Ls = wo.get("icon-offset").evaluate(Qa, {}, Fo), Cs = Af(Ni.horizontal), Ps = ai / 24, ku = Ra.tilePixelRatio * Ps, zl = Ra.tilePixelRatio * Es / 24, Oc = Ra.tilePixelRatio * Ui, vl = Ra.tilePixelRatio * wo.get("symbol-spacing"), zc = wo.get("text-padding") * Ra.tilePixelRatio, Dc = wo.get("icon-padding") * Ra.tilePixelRatio, Rc = wo.get("text-max-angle") / 180 * Math.PI, Fc = wo.get("text-rotation-alignment") === "map" && wo.get("symbol-placement") !== "point", rl = wo.get("icon-rotation-alignment") === "map" && wo.get("symbol-placement") !== "point", Dl = wo.get("symbol-placement"), Bc = vl / 2, Rl = wo.get("icon-text-fit");
                ji && Rl !== "none" && (Ra.allowVerticalPlacement && Ni.vertical && (Ys = df(ji, Ni.vertical, Rl, wo.get("icon-text-fit-padding"), Ls, Ps)), Cs && (ji = df(ji, Cs, Rl, wo.get("icon-text-fit-padding"), Ls, Ps)));
                var nl = function(Cp, fc) {
                  fc.x < 0 || fc.x >= 8192 || fc.y < 0 || fc.y >= 8192 || function(Gi, Is, Pp, al, Lu, qf, Yc, Bs, Wc, hc, Zc, Xc, Cu, Gf, pc, Yf, Wf, Zf, Xf, Jf, ss, Jc, Kf, Ns, Ip) {
                    var Pu, yl, Vl, Hl, ql, Gl = Gi.addToLineVertexArray(Is, Pp), Qf = 0, $f = 0, eh = 0, th = 0, Iu = -1, Ou = -1, Ws = {}, rh = Sr(""), zu = 0, Du = 0;
                    if (Bs._unevaluatedLayout.getValue("text-radial-offset") === void 0 ? (Pu = Bs.layout.get("text-offset").evaluate(ss, {}, Ns).map(function(mc) {
                      return 24 * mc;
                    }), zu = Pu[0], Du = Pu[1]) : (zu = 24 * Bs.layout.get("text-radial-offset").evaluate(ss, {}, Ns), Du = vu), Gi.allowVerticalPlacement && al.vertical) {
                      var nh = Bs.layout.get("text-rotate").evaluate(ss, {}, Ns) + 90, Op = al.vertical;
                      Hl = new Ec(Wc, Is, hc, Zc, Xc, Op, Cu, Gf, pc, nh), Yc && (ql = new Ec(Wc, Is, hc, Zc, Xc, Yc, Wf, Zf, pc, nh));
                    }
                    if (Lu) {
                      var Ru = Bs.layout.get("icon-rotate").evaluate(ss, {}), ah = Bs.layout.get("icon-text-fit") !== "none", ih = wf(Lu, Ru, Kf, ah), Fu = Yc ? wf(Yc, Ru, Kf, ah) : void 0;
                      Vl = new Ec(Wc, Is, hc, Zc, Xc, Lu, Wf, Zf, !1, Ru), Qf = 4 * ih.length;
                      var oh = Gi.iconSizeData, dc = null;
                      oh.kind === "source" ? (dc = [128 * Bs.layout.get("icon-size").evaluate(ss, {})])[0] > 32640 && A(Gi.layerIds[0] + ': Value for "icon-size" is >= 255. Reduce your "icon-size".') : oh.kind === "composite" && ((dc = [128 * Jc.compositeIconSizes[0].evaluate(ss, {}, Ns), 128 * Jc.compositeIconSizes[1].evaluate(ss, {}, Ns)])[0] > 32640 || dc[1] > 32640) && A(Gi.layerIds[0] + ': Value for "icon-size" is >= 255. Reduce your "icon-size".'), Gi.addSymbols(Gi.icon, ih, dc, Jf, Xf, ss, !1, Is, Gl.lineStartIndex, Gl.lineLength, -1, Ns), Iu = Gi.icon.placedSymbolArray.length - 1, Fu && ($f = 4 * Fu.length, Gi.addSymbols(Gi.icon, Fu, dc, Jf, Xf, ss, os.vertical, Is, Gl.lineStartIndex, Gl.lineLength, -1, Ns), Ou = Gi.icon.placedSymbolArray.length - 1);
                    }
                    for (var sh in al.horizontal) {
                      var Kc = al.horizontal[sh];
                      if (!yl) {
                        rh = Sr(Kc.text);
                        var zp = Bs.layout.get("text-rotate").evaluate(ss, {}, Ns);
                        yl = new Ec(Wc, Is, hc, Zc, Xc, Kc, Cu, Gf, pc, zp);
                      }
                      var lh = Kc.positionedLines.length === 1;
                      if (eh += Mf(Gi, Is, Kc, qf, Bs, pc, ss, Yf, Gl, al.vertical ? os.horizontal : os.horizontalOnly, lh ? Object.keys(al.horizontal) : [sh], Ws, Iu, Jc, Ns), lh)
                        break;
                    }
                    al.vertical && (th += Mf(Gi, Is, al.vertical, qf, Bs, pc, ss, Yf, Gl, os.vertical, ["vertical"], Ws, Ou, Jc, Ns));
                    var Dp = yl ? yl.boxStartIndex : Gi.collisionBoxArray.length, Rp = yl ? yl.boxEndIndex : Gi.collisionBoxArray.length, Fp = Hl ? Hl.boxStartIndex : Gi.collisionBoxArray.length, Bp = Hl ? Hl.boxEndIndex : Gi.collisionBoxArray.length, Np = Vl ? Vl.boxStartIndex : Gi.collisionBoxArray.length, jp = Vl ? Vl.boxEndIndex : Gi.collisionBoxArray.length, Up = ql ? ql.boxStartIndex : Gi.collisionBoxArray.length, Vp = ql ? ql.boxEndIndex : Gi.collisionBoxArray.length, js = -1, Qc = function(mc, uh) {
                      return mc && mc.circleDiameter ? Math.max(mc.circleDiameter, uh) : uh;
                    };
                    js = Qc(yl, js), js = Qc(Hl, js), js = Qc(Vl, js);
                    var ch = (js = Qc(ql, js)) > -1 ? 1 : 0;
                    ch && (js *= Ip / 24), Gi.glyphOffsetArray.length >= si.MAX_GLYPHS && A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), ss.sortKey !== void 0 && Gi.addToSortKeyRanges(Gi.symbolInstances.length, ss.sortKey), Gi.symbolInstances.emplaceBack(Is.x, Is.y, Ws.right >= 0 ? Ws.right : -1, Ws.center >= 0 ? Ws.center : -1, Ws.left >= 0 ? Ws.left : -1, Ws.vertical || -1, Iu, Ou, rh, Dp, Rp, Fp, Bp, Np, jp, Up, Vp, hc, eh, th, Qf, $f, ch, 0, Cu, zu, Du, js);
                  }(Ra, fc, Cp, Ni, ji, Di, Ys, Ra.layers[0], Ra.collisionBoxArray, Qa.index, Qa.sourceLayerIndex, Ra.index, ku, zc, Fc, qo, Oc, Dc, rl, Ls, Qa, Ei, rs, Fo, ai);
                };
                if (Dl === "line")
                  for (var oc = 0, Nc = _f(Qa.geometry, 0, 0, 8192, 8192); oc < Nc.length; oc += 1)
                    for (var jc = Nc[oc], Uc = hp(jc, vl, Rc, Ni.vertical || Cs, ji, 24, zl, Ra.overscaling, 8192), sc = 0, Vc = Uc; sc < Vc.length; sc += 1) {
                      var lc = Vc[sc], Hc = Cs;
                      Hc && gp(Ra, Hc.text, Bc, lc) || nl(jc, lc);
                    }
                else if (Dl === "line-center")
                  for (var cc = 0, qc = Qa.geometry; cc < qc.length; cc += 1) {
                    var Fl = qc[cc];
                    if (Fl.length > 1) {
                      var Bl = fp(Fl, Rc, Ni.vertical || Cs, ji, 24, zl);
                      Bl && nl(Fl, Bl);
                    }
                  }
                else if (Qa.type === "Polygon")
                  for (var Nl = 0, Gc = cu(Qa.geometry, 0); Nl < Gc.length; Nl += 1) {
                    var jl = Gc[Nl], uc = dp(jl, 16);
                    nl(jl[0], new Sl(uc.x, uc.y, 0));
                  }
                else if (Qa.type === "LineString")
                  for (var Ul = 0, Uf = Qa.geometry; Ul < Uf.length; Ul += 1) {
                    var Mu = Uf[Ul];
                    nl(Mu, new Sl(Mu[0].x, Mu[0].y, 0));
                  }
                else if (Qa.type === "Point")
                  for (var Au = 0, Vf = Qa.geometry; Au < Vf.length; Au += 1)
                    for (var Lp = Vf[Au], Su = 0, Hf = Lp; Su < Hf.length; Su += 1) {
                      var Eu = Hf[Su];
                      nl([Eu], new Sl(Eu.x, Eu.y, 0));
                    }
              }(M, Fn, pa, oo, ne, dt, sa, Jn, la, Mo, Ce);
            }, yn = 0, Bn = M.features; yn < Bn.length; yn += 1)
              fn();
            _e && M.generateCollisionDebugBuffers();
          }, e.perspective = function(M, O, G, ne, me) {
            var _e, Ce = 1 / Math.tan(O / 2);
            return M[0] = Ce / G, M[1] = 0, M[2] = 0, M[3] = 0, M[4] = 0, M[5] = Ce, M[6] = 0, M[7] = 0, M[8] = 0, M[9] = 0, M[11] = -1, M[12] = 0, M[13] = 0, M[15] = 0, me != null && me !== 1 / 0 ? (_e = 1 / (ne - me), M[10] = (me + ne) * _e, M[14] = 2 * me * ne * _e) : (M[10] = -1, M[14] = -2 * ne), M;
          }, e.pick = function(M, O) {
            for (var G = {}, ne = 0; ne < O.length; ne++) {
              var me = O[ne];
              me in M && (G[me] = M[me]);
            }
            return G;
          }, e.plugin = uo, e.polygonIntersectsPolygon = zo, e.postMapLoadEvent = ze, e.postTurnstileEvent = Ee, e.potpack = uf, e.refProperties = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"], e.register = Zr, e.registerForPluginStateChange = function(M) {
            return M({ pluginStatus: va, pluginURL: di }), wi.on("pluginStateChange", M), M;
          }, e.rotate = function(M, O, G) {
            var ne = O[0], me = O[1], _e = O[2], Ce = O[3], Ne = Math.sin(G), $e = Math.cos(G);
            return M[0] = ne * $e + _e * Ne, M[1] = me * $e + Ce * Ne, M[2] = ne * -Ne + _e * $e, M[3] = me * -Ne + Ce * $e, M;
          }, e.rotateX = function(M, O, G) {
            var ne = Math.sin(G), me = Math.cos(G), _e = O[4], Ce = O[5], Ne = O[6], $e = O[7], ct = O[8], dt = O[9], Rt = O[10], Wt = O[11];
            return O !== M && (M[0] = O[0], M[1] = O[1], M[2] = O[2], M[3] = O[3], M[12] = O[12], M[13] = O[13], M[14] = O[14], M[15] = O[15]), M[4] = _e * me + ct * ne, M[5] = Ce * me + dt * ne, M[6] = Ne * me + Rt * ne, M[7] = $e * me + Wt * ne, M[8] = ct * me - _e * ne, M[9] = dt * me - Ce * ne, M[10] = Rt * me - Ne * ne, M[11] = Wt * me - $e * ne, M;
          }, e.rotateZ = function(M, O, G) {
            var ne = Math.sin(G), me = Math.cos(G), _e = O[0], Ce = O[1], Ne = O[2], $e = O[3], ct = O[4], dt = O[5], Rt = O[6], Wt = O[7];
            return O !== M && (M[8] = O[8], M[9] = O[9], M[10] = O[10], M[11] = O[11], M[12] = O[12], M[13] = O[13], M[14] = O[14], M[15] = O[15]), M[0] = _e * me + ct * ne, M[1] = Ce * me + dt * ne, M[2] = Ne * me + Rt * ne, M[3] = $e * me + Wt * ne, M[4] = ct * me - _e * ne, M[5] = dt * me - Ce * ne, M[6] = Rt * me - Ne * ne, M[7] = Wt * me - $e * ne, M;
          }, e.scale = function(M, O, G) {
            var ne = G[0], me = G[1], _e = G[2];
            return M[0] = O[0] * ne, M[1] = O[1] * ne, M[2] = O[2] * ne, M[3] = O[3] * ne, M[4] = O[4] * me, M[5] = O[5] * me, M[6] = O[6] * me, M[7] = O[7] * me, M[8] = O[8] * _e, M[9] = O[9] * _e, M[10] = O[10] * _e, M[11] = O[11] * _e, M[12] = O[12], M[13] = O[13], M[14] = O[14], M[15] = O[15], M;
          }, e.scale$1 = function(M, O, G) {
            return M[0] = O[0] * G, M[1] = O[1] * G, M[2] = O[2] * G, M[3] = O[3] * G, M;
          }, e.scale$2 = function(M, O, G) {
            return M[0] = O[0] * G, M[1] = O[1] * G, M[2] = O[2] * G, M;
          }, e.setCacheLimits = function(M, O) {
            Ie = M, Oe = O;
          }, e.setRTLTextPlugin = function(M, O, G) {
            if (G === void 0 && (G = !1), va === Za || va === Bi || va === Go)
              throw new Error("setRTLTextPlugin cannot be called multiple times.");
            di = B.resolveURL(M), va = Za, go = O, Xa(), G || ti();
          }, e.sphericalToCartesian = function(M) {
            var O = M[0], G = M[1], ne = M[2];
            return G += 90, G *= Math.PI / 180, ne *= Math.PI / 180, { x: O * Math.cos(G) * Math.sin(ne), y: O * Math.sin(G) * Math.sin(ne), z: O * Math.cos(ne) };
          }, e.sqrLen = Zl, e.styleSpec = be, e.sub = ru, e.symbolSize = up, e.transformMat3 = function(M, O, G) {
            var ne = O[0], me = O[1], _e = O[2];
            return M[0] = ne * G[0] + me * G[3] + _e * G[6], M[1] = ne * G[1] + me * G[4] + _e * G[7], M[2] = ne * G[2] + me * G[5] + _e * G[8], M;
          }, e.transformMat4 = bl, e.translate = function(M, O, G) {
            var ne, me, _e, Ce, Ne, $e, ct, dt, Rt, Wt, qt, ir, yr = G[0], Cr = G[1], Lr = G[2];
            return O === M ? (M[12] = O[0] * yr + O[4] * Cr + O[8] * Lr + O[12], M[13] = O[1] * yr + O[5] * Cr + O[9] * Lr + O[13], M[14] = O[2] * yr + O[6] * Cr + O[10] * Lr + O[14], M[15] = O[3] * yr + O[7] * Cr + O[11] * Lr + O[15]) : (ne = O[0], me = O[1], _e = O[2], Ce = O[3], Ne = O[4], $e = O[5], ct = O[6], dt = O[7], Rt = O[8], Wt = O[9], qt = O[10], ir = O[11], M[0] = ne, M[1] = me, M[2] = _e, M[3] = Ce, M[4] = Ne, M[5] = $e, M[6] = ct, M[7] = dt, M[8] = Rt, M[9] = Wt, M[10] = qt, M[11] = ir, M[12] = ne * yr + Ne * Cr + Rt * Lr + O[12], M[13] = me * yr + $e * Cr + Wt * Lr + O[13], M[14] = _e * yr + ct * Cr + qt * Lr + O[14], M[15] = Ce * yr + dt * Cr + ir * Lr + O[15]), M;
          }, e.triggerPluginCompletionEvent = vo, e.uniqueId = c, e.validateCustomStyleLayer = function(M) {
            var O = [], G = M.id;
            return G === void 0 && O.push({ message: "layers." + G + ': missing required property "id"' }), M.render === void 0 && O.push({ message: "layers." + G + ': missing required method "render"' }), M.renderingMode && M.renderingMode !== "2d" && M.renderingMode !== "3d" && O.push({ message: "layers." + G + ': property "renderingMode" must be either "2d" or "3d"' }), O;
          }, e.validateLight = sn, e.validateStyle = Wr, e.values = function(M) {
            var O = [];
            for (var G in M)
              O.push(M[G]);
            return O;
          }, e.vectorTile = Tl, e.version = "1.10.1", e.warnOnce = A, e.webpSupported = ee, e.window = self, e.wrap = l;
        }), x(0, function(e) {
          function r(Be) {
            var He = typeof Be;
            if (He === "number" || He === "boolean" || He === "string" || Be == null)
              return JSON.stringify(Be);
            if (Array.isArray(Be)) {
              for (var he = "[", be = 0, Re = Be; be < Re.length; be += 1)
                he += r(Re[be]) + ",";
              return he + "]";
            }
            for (var Ue = Object.keys(Be).sort(), Xe = "{", qe = 0; qe < Ue.length; qe++)
              Xe += JSON.stringify(Ue[qe]) + ":" + r(Be[Ue[qe]]) + ",";
            return Xe + "}";
          }
          function n(Be) {
            for (var He = "", he = 0, be = e.refProperties; he < be.length; he += 1)
              He += "/" + r(Be[be[he]]);
            return He;
          }
          var s = function(Be) {
            this.keyCache = {}, Be && this.replace(Be);
          };
          s.prototype.replace = function(Be) {
            this._layerConfigs = {}, this._layers = {}, this.update(Be, []);
          }, s.prototype.update = function(Be, He) {
            for (var he = this, be = 0, Re = Be; be < Re.length; be += 1) {
              var Ue = Re[be];
              this._layerConfigs[Ue.id] = Ue;
              var Xe = this._layers[Ue.id] = e.createStyleLayer(Ue);
              Xe._featureFilter = e.featureFilter(Xe.filter), this.keyCache[Ue.id] && delete this.keyCache[Ue.id];
            }
            for (var qe = 0, st = He; qe < st.length; qe += 1) {
              var it = st[qe];
              delete this.keyCache[it], delete this._layerConfigs[it], delete this._layers[it];
            }
            this.familiesBySource = {};
            for (var Tt = 0, Pt = function(We, nt) {
              for (var ft = {}, Mt = 0; Mt < We.length; Mt++) {
                var Nt = nt && nt[We[Mt].id] || n(We[Mt]);
                nt && (nt[We[Mt].id] = Nt);
                var Zt = ft[Nt];
                Zt || (Zt = ft[Nt] = []), Zt.push(We[Mt]);
              }
              var Ut = [];
              for (var fr in ft)
                Ut.push(ft[fr]);
              return Ut;
            }(e.values(this._layerConfigs), this.keyCache); Tt < Pt.length; Tt += 1) {
              var rt = Pt[Tt].map(function(We) {
                return he._layers[We.id];
              }), ut = rt[0];
              if (ut.visibility !== "none") {
                var Bt = ut.source || "", wt = this.familiesBySource[Bt];
                wt || (wt = this.familiesBySource[Bt] = {});
                var Lt = ut.sourceLayer || "_geojsonTileLayer", Se = wt[Lt];
                Se || (Se = wt[Lt] = []), Se.push(rt);
              }
            }
          };
          var t = function(Be) {
            var He = {}, he = [];
            for (var be in Be) {
              var Re = Be[be], Ue = He[be] = {};
              for (var Xe in Re) {
                var qe = Re[+Xe];
                if (qe && qe.bitmap.width !== 0 && qe.bitmap.height !== 0) {
                  var st = { x: 0, y: 0, w: qe.bitmap.width + 2, h: qe.bitmap.height + 2 };
                  he.push(st), Ue[Xe] = { rect: st, metrics: qe.metrics };
                }
              }
            }
            var it = e.potpack(he), Tt = it.w, Pt = it.h, rt = new e.AlphaImage({ width: Tt || 1, height: Pt || 1 });
            for (var ut in Be) {
              var Bt = Be[ut];
              for (var wt in Bt) {
                var Lt = Bt[+wt];
                if (Lt && Lt.bitmap.width !== 0 && Lt.bitmap.height !== 0) {
                  var Se = He[ut][wt].rect;
                  e.AlphaImage.copy(Lt.bitmap, rt, { x: 0, y: 0 }, { x: Se.x + 1, y: Se.y + 1 }, Lt.bitmap);
                }
              }
            }
            this.image = rt, this.positions = He;
          };
          e.register("GlyphAtlas", t);
          var d = function(Be) {
            this.tileID = new e.OverscaledTileID(Be.tileID.overscaledZ, Be.tileID.wrap, Be.tileID.canonical.z, Be.tileID.canonical.x, Be.tileID.canonical.y), this.uid = Be.uid, this.zoom = Be.zoom, this.pixelRatio = Be.pixelRatio, this.tileSize = Be.tileSize, this.source = Be.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = Be.showCollisionBoxes, this.collectResourceTiming = !!Be.collectResourceTiming, this.returnDependencies = !!Be.returnDependencies, this.promoteId = Be.promoteId;
          };
          function u(Be, He, he) {
            for (var be = new e.EvaluationParameters(He), Re = 0, Ue = Be; Re < Ue.length; Re += 1)
              Ue[Re].recalculate(be, he);
          }
          function o(Be, He) {
            var he = e.getArrayBuffer(Be.request, function(be, Re, Ue, Xe) {
              be ? He(be) : Re && He(null, { vectorTile: new e.vectorTile.VectorTile(new e.pbf(Re)), rawData: Re, cacheControl: Ue, expires: Xe });
            });
            return function() {
              he.cancel(), He();
            };
          }
          d.prototype.parse = function(Be, He, he, be, Re) {
            var Ue = this;
            this.status = "parsing", this.data = Be, this.collisionBoxArray = new e.CollisionBoxArray();
            var Xe = new e.DictionaryCoder(Object.keys(Be.layers).sort()), qe = new e.FeatureIndex(this.tileID, this.promoteId);
            qe.bucketLayerIDs = [];
            var st, it, Tt, Pt, rt = {}, ut = { featureIndex: qe, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: he }, Bt = He.familiesBySource[this.source];
            for (var wt in Bt) {
              var Lt = Be.layers[wt];
              if (Lt) {
                Lt.version === 1 && e.warnOnce('Vector tile source "' + this.source + '" layer "' + wt + '" does not use vector tile spec v2 and therefore may have some rendering errors.');
                for (var Se = Xe.encode(wt), We = [], nt = 0; nt < Lt.length; nt++) {
                  var ft = Lt.feature(nt), Mt = qe.getId(ft, wt);
                  We.push({ feature: ft, id: Mt, index: nt, sourceLayerIndex: Se });
                }
                for (var Nt = 0, Zt = Bt[wt]; Nt < Zt.length; Nt += 1) {
                  var Ut = Zt[Nt], fr = Ut[0];
                  fr.minzoom && this.zoom < Math.floor(fr.minzoom) || fr.maxzoom && this.zoom >= fr.maxzoom || fr.visibility !== "none" && (u(Ut, this.zoom, he), (rt[fr.id] = fr.createBucket({ index: qe.bucketLayerIDs.length, layers: Ut, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: Se, sourceID: this.source })).populate(We, ut, this.tileID.canonical), qe.bucketLayerIDs.push(Ut.map(function(er) {
                    return er.id;
                  })));
                }
              }
            }
            var Tr = e.mapObject(ut.glyphDependencies, function(er) {
              return Object.keys(er).map(Number);
            });
            Object.keys(Tr).length ? be.send("getGlyphs", { uid: this.uid, stacks: Tr }, function(er, cr) {
              st || (st = er, it = cr, $t.call(Ue));
            }) : it = {};
            var ur = Object.keys(ut.iconDependencies);
            ur.length ? be.send("getImages", { icons: ur, source: this.source, tileID: this.tileID, type: "icons" }, function(er, cr) {
              st || (st = er, Tt = cr, $t.call(Ue));
            }) : Tt = {};
            var Kt = Object.keys(ut.patternDependencies);
            function $t() {
              if (st)
                return Re(st);
              if (it && Tt && Pt) {
                var er = new t(it), cr = new e.ImageAtlas(Tt, Pt);
                for (var gr in rt) {
                  var Mr = rt[gr];
                  Mr instanceof e.SymbolBucket ? (u(Mr.layers, this.zoom, he), e.performSymbolLayout(Mr, it, er.positions, Tt, cr.iconPositions, this.showCollisionBoxes, this.tileID.canonical)) : Mr.hasPattern && (Mr instanceof e.LineBucket || Mr instanceof e.FillBucket || Mr instanceof e.FillExtrusionBucket) && (u(Mr.layers, this.zoom, he), Mr.addFeatures(ut, this.tileID.canonical, cr.patternPositions));
                }
                this.status = "done", Re(null, { buckets: e.values(rt).filter(function(Ir) {
                  return !Ir.isEmpty();
                }), featureIndex: qe, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: er.image, imageAtlas: cr, glyphMap: this.returnDependencies ? it : null, iconMap: this.returnDependencies ? Tt : null, glyphPositions: this.returnDependencies ? er.positions : null });
              }
            }
            Kt.length ? be.send("getImages", { icons: Kt, source: this.source, tileID: this.tileID, type: "patterns" }, function(er, cr) {
              st || (st = er, Pt = cr, $t.call(Ue));
            }) : Pt = {}, $t.call(this);
          };
          var h = function(Be, He, he, be) {
            this.actor = Be, this.layerIndex = He, this.availableImages = he, this.loadVectorData = be || o, this.loading = {}, this.loaded = {};
          };
          h.prototype.loadTile = function(Be, He) {
            var he = this, be = Be.uid;
            this.loading || (this.loading = {});
            var Re = !!(Be && Be.request && Be.request.collectResourceTiming) && new e.RequestPerformance(Be.request), Ue = this.loading[be] = new d(Be);
            Ue.abort = this.loadVectorData(Be, function(Xe, qe) {
              if (delete he.loading[be], Xe || !qe)
                return Ue.status = "done", he.loaded[be] = Ue, He(Xe);
              var st = qe.rawData, it = {};
              qe.expires && (it.expires = qe.expires), qe.cacheControl && (it.cacheControl = qe.cacheControl);
              var Tt = {};
              if (Re) {
                var Pt = Re.finish();
                Pt && (Tt.resourceTiming = JSON.parse(JSON.stringify(Pt)));
              }
              Ue.vectorTile = qe.vectorTile, Ue.parse(qe.vectorTile, he.layerIndex, he.availableImages, he.actor, function(rt, ut) {
                if (rt || !ut)
                  return He(rt);
                He(null, e.extend({ rawTileData: st.slice(0) }, ut, it, Tt));
              }), he.loaded = he.loaded || {}, he.loaded[be] = Ue;
            });
          }, h.prototype.reloadTile = function(Be, He) {
            var he = this, be = this.loaded, Re = Be.uid, Ue = this;
            if (be && be[Re]) {
              var Xe = be[Re];
              Xe.showCollisionBoxes = Be.showCollisionBoxes;
              var qe = function(st, it) {
                var Tt = Xe.reloadCallback;
                Tt && (delete Xe.reloadCallback, Xe.parse(Xe.vectorTile, Ue.layerIndex, he.availableImages, Ue.actor, Tt)), He(st, it);
              };
              Xe.status === "parsing" ? Xe.reloadCallback = qe : Xe.status === "done" && (Xe.vectorTile ? Xe.parse(Xe.vectorTile, this.layerIndex, this.availableImages, this.actor, qe) : qe());
            }
          }, h.prototype.abortTile = function(Be, He) {
            var he = this.loading, be = Be.uid;
            he && he[be] && he[be].abort && (he[be].abort(), delete he[be]), He();
          }, h.prototype.removeTile = function(Be, He) {
            var he = this.loaded, be = Be.uid;
            he && he[be] && delete he[be], He();
          };
          var l = e.window.ImageBitmap, i = function() {
            this.loaded = {};
          };
          i.prototype.loadTile = function(Be, He) {
            var he = Be.uid, be = Be.encoding, Re = Be.rawImageData, Ue = l && Re instanceof l ? this.getImageData(Re) : Re, Xe = new e.DEMData(he, Ue, be);
            this.loaded = this.loaded || {}, this.loaded[he] = Xe, He(null, Xe);
          }, i.prototype.getImageData = function(Be) {
            this.offscreenCanvas && this.offscreenCanvasContext || (this.offscreenCanvas = new OffscreenCanvas(Be.width, Be.height), this.offscreenCanvasContext = this.offscreenCanvas.getContext("2d")), this.offscreenCanvas.width = Be.width, this.offscreenCanvas.height = Be.height, this.offscreenCanvasContext.drawImage(Be, 0, 0, Be.width, Be.height);
            var He = this.offscreenCanvasContext.getImageData(-1, -1, Be.width + 2, Be.height + 2);
            return this.offscreenCanvasContext.clearRect(0, 0, this.offscreenCanvas.width, this.offscreenCanvas.height), new e.RGBAImage({ width: He.width, height: He.height }, He.data);
          }, i.prototype.removeTile = function(Be) {
            var He = this.loaded, he = Be.uid;
            He && He[he] && delete He[he];
          };
          var p = function Be(He, he) {
            var be, Re = He && He.type;
            if (Re === "FeatureCollection")
              for (be = 0; be < He.features.length; be++)
                Be(He.features[be], he);
            else if (Re === "GeometryCollection")
              for (be = 0; be < He.geometries.length; be++)
                Be(He.geometries[be], he);
            else if (Re === "Feature")
              Be(He.geometry, he);
            else if (Re === "Polygon")
              c(He.coordinates, he);
            else if (Re === "MultiPolygon")
              for (be = 0; be < He.coordinates.length; be++)
                c(He.coordinates[be], he);
            return He;
          };
          function c(Be, He) {
            if (Be.length !== 0) {
              a(Be[0], He);
              for (var he = 1; he < Be.length; he++)
                a(Be[he], !He);
            }
          }
          function a(Be, He) {
            for (var he = 0, be = 0, Re = Be.length, Ue = Re - 1; be < Re; Ue = be++)
              he += (Be[be][0] - Be[Ue][0]) * (Be[Ue][1] + Be[be][1]);
            he >= 0 != !!He && Be.reverse();
          }
          var y = e.vectorTile.VectorTileFeature.prototype.toGeoJSON, f = function(Be) {
            this._feature = Be, this.extent = e.EXTENT, this.type = Be.type, this.properties = Be.tags, "id" in Be && !isNaN(Be.id) && (this.id = parseInt(Be.id, 10));
          };
          f.prototype.loadGeometry = function() {
            if (this._feature.type === 1) {
              for (var Be = [], He = 0, he = this._feature.geometry; He < he.length; He += 1) {
                var be = he[He];
                Be.push([new e.Point$1(be[0], be[1])]);
              }
              return Be;
            }
            for (var Re = [], Ue = 0, Xe = this._feature.geometry; Ue < Xe.length; Ue += 1) {
              for (var qe = [], st = 0, it = Xe[Ue]; st < it.length; st += 1) {
                var Tt = it[st];
                qe.push(new e.Point$1(Tt[0], Tt[1]));
              }
              Re.push(qe);
            }
            return Re;
          }, f.prototype.toGeoJSON = function(Be, He, he) {
            return y.call(this, Be, He, he);
          };
          var _ = function(Be) {
            this.layers = { _geojsonTileLayer: this }, this.name = "_geojsonTileLayer", this.extent = e.EXTENT, this.length = Be.length, this._features = Be;
          };
          _.prototype.feature = function(Be) {
            return new f(this._features[Be]);
          };
          var b = e.vectorTile.VectorTileFeature, w = T;
          function T(Be, He) {
            this.options = He || {}, this.features = Be, this.length = Be.length;
          }
          function L(Be, He) {
            this.id = typeof Be.id == "number" ? Be.id : void 0, this.type = Be.type, this.rawGeometry = Be.type === 1 ? [Be.geometry] : Be.geometry, this.properties = Be.tags, this.extent = He || 4096;
          }
          T.prototype.feature = function(Be) {
            return new L(this.features[Be], this.options.extent);
          }, L.prototype.loadGeometry = function() {
            var Be = this.rawGeometry;
            this.geometry = [];
            for (var He = 0; He < Be.length; He++) {
              for (var he = Be[He], be = [], Re = 0; Re < he.length; Re++)
                be.push(new e.Point$1(he[Re][0], he[Re][1]));
              this.geometry.push(be);
            }
            return this.geometry;
          }, L.prototype.bbox = function() {
            this.geometry || this.loadGeometry();
            for (var Be = this.geometry, He = 1 / 0, he = -1 / 0, be = 1 / 0, Re = -1 / 0, Ue = 0; Ue < Be.length; Ue++)
              for (var Xe = Be[Ue], qe = 0; qe < Xe.length; qe++) {
                var st = Xe[qe];
                He = Math.min(He, st.x), he = Math.max(he, st.x), be = Math.min(be, st.y), Re = Math.max(Re, st.y);
              }
            return [He, be, he, Re];
          }, L.prototype.toGeoJSON = b.prototype.toGeoJSON;
          var A = E, I = E, P = function(Be, He) {
            He = He || {};
            var he = {};
            for (var be in Be)
              he[be] = new w(Be[be].features, He), he[be].name = be, he[be].version = He.version, he[be].extent = He.extent;
            return E({ layers: he });
          }, S = w;
          function E(Be) {
            var He = new e.pbf();
            return function(he, be) {
              for (var Re in he.layers)
                be.writeMessage(3, R, he.layers[Re]);
            }(Be, He), He.finish();
          }
          function R(Be, He) {
            var he;
            He.writeVarintField(15, Be.version || 1), He.writeStringField(1, Be.name || ""), He.writeVarintField(5, Be.extent || 4096);
            var be = { keys: [], values: [], keycache: {}, valuecache: {} };
            for (he = 0; he < Be.length; he++)
              be.feature = Be.feature(he), He.writeMessage(2, z, be);
            var Re = be.keys;
            for (he = 0; he < Re.length; he++)
              He.writeStringField(3, Re[he]);
            var Ue = be.values;
            for (he = 0; he < Ue.length; he++)
              He.writeMessage(4, W, Ue[he]);
          }
          function z(Be, He) {
            var he = Be.feature;
            he.id !== void 0 && He.writeVarintField(1, he.id), He.writeMessage(2, j, Be), He.writeVarintField(3, he.type), He.writeMessage(4, J, he);
          }
          function j(Be, He) {
            var he = Be.feature, be = Be.keys, Re = Be.values, Ue = Be.keycache, Xe = Be.valuecache;
            for (var qe in he.properties) {
              var st = Ue[qe];
              st === void 0 && (be.push(qe), st = be.length - 1, Ue[qe] = st), He.writeVarint(st);
              var it = he.properties[qe], Tt = typeof it;
              Tt !== "string" && Tt !== "boolean" && Tt !== "number" && (it = JSON.stringify(it));
              var Pt = Tt + ":" + it, rt = Xe[Pt];
              rt === void 0 && (Re.push(it), rt = Re.length - 1, Xe[Pt] = rt), He.writeVarint(rt);
            }
          }
          function H(Be, He) {
            return (He << 3) + (7 & Be);
          }
          function Y(Be) {
            return Be << 1 ^ Be >> 31;
          }
          function J(Be, He) {
            for (var he = Be.loadGeometry(), be = Be.type, Re = 0, Ue = 0, Xe = he.length, qe = 0; qe < Xe; qe++) {
              var st = he[qe], it = 1;
              be === 1 && (it = st.length), He.writeVarint(H(1, it));
              for (var Tt = be === 3 ? st.length - 1 : st.length, Pt = 0; Pt < Tt; Pt++) {
                Pt === 1 && be !== 1 && He.writeVarint(H(2, Tt - 1));
                var rt = st[Pt].x - Re, ut = st[Pt].y - Ue;
                He.writeVarint(Y(rt)), He.writeVarint(Y(ut)), Re += rt, Ue += ut;
              }
              be === 3 && He.writeVarint(H(7, 1));
            }
          }
          function W(Be, He) {
            var he = typeof Be;
            he === "string" ? He.writeStringField(1, Be) : he === "boolean" ? He.writeBooleanField(7, Be) : he === "number" && (Be % 1 != 0 ? He.writeDoubleField(3, Be) : Be < 0 ? He.writeSVarintField(6, Be) : He.writeVarintField(5, Be));
          }
          function Z(Be, He, he, be, Re, Ue) {
            if (!(Re - be <= he)) {
              var Xe = be + Re >> 1;
              (function qe(st, it, Tt, Pt, rt, ut) {
                for (; rt > Pt; ) {
                  if (rt - Pt > 600) {
                    var Bt = rt - Pt + 1, wt = Tt - Pt + 1, Lt = Math.log(Bt), Se = 0.5 * Math.exp(2 * Lt / 3), We = 0.5 * Math.sqrt(Lt * Se * (Bt - Se) / Bt) * (wt - Bt / 2 < 0 ? -1 : 1), nt = Math.max(Pt, Math.floor(Tt - wt * Se / Bt + We)), ft = Math.min(rt, Math.floor(Tt + (Bt - wt) * Se / Bt + We));
                    qe(st, it, Tt, nt, ft, ut);
                  }
                  var Mt = it[2 * Tt + ut], Nt = Pt, Zt = rt;
                  for (re(st, it, Pt, Tt), it[2 * rt + ut] > Mt && re(st, it, Pt, rt); Nt < Zt; ) {
                    for (re(st, it, Nt, Zt), Nt++, Zt--; it[2 * Nt + ut] < Mt; )
                      Nt++;
                    for (; it[2 * Zt + ut] > Mt; )
                      Zt--;
                  }
                  it[2 * Pt + ut] === Mt ? re(st, it, Pt, Zt) : (Zt++, re(st, it, Zt, rt)), Zt <= Tt && (Pt = Zt + 1), Tt <= Zt && (rt = Zt - 1);
                }
              })(Be, He, Xe, be, Re, Ue % 2), Z(Be, He, he, be, Xe - 1, Ue + 1), Z(Be, He, he, Xe + 1, Re, Ue + 1);
            }
          }
          function re(Be, He, he, be) {
            V(Be, he, be), V(He, 2 * he, 2 * be), V(He, 2 * he + 1, 2 * be + 1);
          }
          function V(Be, He, he) {
            var be = Be[He];
            Be[He] = Be[he], Be[he] = be;
          }
          function B(Be, He, he, be) {
            var Re = Be - he, Ue = He - be;
            return Re * Re + Ue * Ue;
          }
          A.fromVectorTileJs = I, A.fromGeojsonVt = P, A.GeoJSONWrapper = S;
          var U = function(Be) {
            return Be[0];
          }, ee = function(Be) {
            return Be[1];
          }, N = function(Be, He, he, be, Re) {
            He === void 0 && (He = U), he === void 0 && (he = ee), be === void 0 && (be = 64), Re === void 0 && (Re = Float64Array), this.nodeSize = be, this.points = Be;
            for (var Ue = Be.length < 65536 ? Uint16Array : Uint32Array, Xe = this.ids = new Ue(Be.length), qe = this.coords = new Re(2 * Be.length), st = 0; st < Be.length; st++)
              Xe[st] = st, qe[2 * st] = He(Be[st]), qe[2 * st + 1] = he(Be[st]);
            Z(Xe, qe, be, 0, Xe.length - 1, 0);
          };
          N.prototype.range = function(Be, He, he, be) {
            return function(Re, Ue, Xe, qe, st, it, Tt) {
              for (var Pt, rt, ut = [0, Re.length - 1, 0], Bt = []; ut.length; ) {
                var wt = ut.pop(), Lt = ut.pop(), Se = ut.pop();
                if (Lt - Se <= Tt)
                  for (var We = Se; We <= Lt; We++)
                    Pt = Ue[2 * We], rt = Ue[2 * We + 1], Pt >= Xe && Pt <= st && rt >= qe && rt <= it && Bt.push(Re[We]);
                else {
                  var nt = Math.floor((Se + Lt) / 2);
                  Pt = Ue[2 * nt], rt = Ue[2 * nt + 1], Pt >= Xe && Pt <= st && rt >= qe && rt <= it && Bt.push(Re[nt]);
                  var ft = (wt + 1) % 2;
                  (wt === 0 ? Xe <= Pt : qe <= rt) && (ut.push(Se), ut.push(nt - 1), ut.push(ft)), (wt === 0 ? st >= Pt : it >= rt) && (ut.push(nt + 1), ut.push(Lt), ut.push(ft));
                }
              }
              return Bt;
            }(this.ids, this.coords, Be, He, he, be, this.nodeSize);
          }, N.prototype.within = function(Be, He, he) {
            return function(be, Re, Ue, Xe, qe, st) {
              for (var it = [0, be.length - 1, 0], Tt = [], Pt = qe * qe; it.length; ) {
                var rt = it.pop(), ut = it.pop(), Bt = it.pop();
                if (ut - Bt <= st)
                  for (var wt = Bt; wt <= ut; wt++)
                    B(Re[2 * wt], Re[2 * wt + 1], Ue, Xe) <= Pt && Tt.push(be[wt]);
                else {
                  var Lt = Math.floor((Bt + ut) / 2), Se = Re[2 * Lt], We = Re[2 * Lt + 1];
                  B(Se, We, Ue, Xe) <= Pt && Tt.push(be[Lt]);
                  var nt = (rt + 1) % 2;
                  (rt === 0 ? Ue - qe <= Se : Xe - qe <= We) && (it.push(Bt), it.push(Lt - 1), it.push(nt)), (rt === 0 ? Ue + qe >= Se : Xe + qe >= We) && (it.push(Lt + 1), it.push(ut), it.push(nt));
                }
              }
              return Tt;
            }(this.ids, this.coords, Be, He, he, this.nodeSize);
          };
          var K = { minZoom: 0, maxZoom: 16, radius: 40, extent: 512, nodeSize: 64, log: !1, generateId: !1, reduce: null, map: function(Be) {
            return Be;
          } }, X = function(Be) {
            this.options = ye(Object.create(K), Be), this.trees = new Array(this.options.maxZoom + 1);
          };
          function te(Be, He, he, be, Re) {
            return { x: Be, y: He, zoom: 1 / 0, id: he, parentId: -1, numPoints: be, properties: Re };
          }
          function ie(Be, He) {
            var he = Be.geometry.coordinates, be = he[0], Re = he[1];
            return { x: ve(be), y: ue(Re), zoom: 1 / 0, index: He, parentId: -1 };
          }
          function le(Be) {
            return { type: "Feature", id: Be.id, properties: oe(Be), geometry: { type: "Point", coordinates: [(be = Be.x, 360 * (be - 0.5)), (He = Be.y, he = (180 - 360 * He) * Math.PI / 180, 360 * Math.atan(Math.exp(he)) / Math.PI - 90)] } };
            var He, he, be;
          }
          function oe(Be) {
            var He = Be.numPoints, he = He >= 1e4 ? Math.round(He / 1e3) + "k" : He >= 1e3 ? Math.round(He / 100) / 10 + "k" : He;
            return ye(ye({}, Be.properties), { cluster: !0, cluster_id: Be.id, point_count: He, point_count_abbreviated: he });
          }
          function ve(Be) {
            return Be / 360 + 0.5;
          }
          function ue(Be) {
            var He = Math.sin(Be * Math.PI / 180), he = 0.5 - 0.25 * Math.log((1 + He) / (1 - He)) / Math.PI;
            return he < 0 ? 0 : he > 1 ? 1 : he;
          }
          function ye(Be, He) {
            for (var he in He)
              Be[he] = He[he];
            return Be;
          }
          function Ae(Be) {
            return Be.x;
          }
          function pe(Be) {
            return Be.y;
          }
          function ge(Be, He, he, be, Re, Ue) {
            var Xe = Re - he, qe = Ue - be;
            if (Xe !== 0 || qe !== 0) {
              var st = ((Be - he) * Xe + (He - be) * qe) / (Xe * Xe + qe * qe);
              st > 1 ? (he = Re, be = Ue) : st > 0 && (he += Xe * st, be += qe * st);
            }
            return (Xe = Be - he) * Xe + (qe = He - be) * qe;
          }
          function we(Be, He, he, be) {
            var Re = { id: Be === void 0 ? null : Be, type: He, geometry: he, tags: be, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
            return function(Ue) {
              var Xe = Ue.geometry, qe = Ue.type;
              if (qe === "Point" || qe === "MultiPoint" || qe === "LineString")
                se(Ue, Xe);
              else if (qe === "Polygon" || qe === "MultiLineString")
                for (var st = 0; st < Xe.length; st++)
                  se(Ue, Xe[st]);
              else if (qe === "MultiPolygon")
                for (st = 0; st < Xe.length; st++)
                  for (var it = 0; it < Xe[st].length; it++)
                    se(Ue, Xe[st][it]);
            }(Re), Re;
          }
          function se(Be, He) {
            for (var he = 0; he < He.length; he += 3)
              Be.minX = Math.min(Be.minX, He[he]), Be.minY = Math.min(Be.minY, He[he + 1]), Be.maxX = Math.max(Be.maxX, He[he]), Be.maxY = Math.max(Be.maxY, He[he + 1]);
          }
          function de(Be, He, he, be) {
            if (He.geometry) {
              var Re = He.geometry.coordinates, Ue = He.geometry.type, Xe = Math.pow(he.tolerance / ((1 << he.maxZoom) * he.extent), 2), qe = [], st = He.id;
              if (he.promoteId ? st = He.properties[he.promoteId] : he.generateId && (st = be || 0), Ue === "Point")
                Te(Re, qe);
              else if (Ue === "MultiPoint")
                for (var it = 0; it < Re.length; it++)
                  Te(Re[it], qe);
              else if (Ue === "LineString")
                Ee(Re, qe, Xe, !1);
              else if (Ue === "MultiLineString") {
                if (he.lineMetrics) {
                  for (it = 0; it < Re.length; it++)
                    qe = [], Ee(Re[it], qe, Xe, !1), Be.push(we(st, "LineString", qe, He.properties));
                  return;
                }
                Me(Re, qe, Xe, !1);
              } else if (Ue === "Polygon")
                Me(Re, qe, Xe, !0);
              else {
                if (Ue !== "MultiPolygon") {
                  if (Ue === "GeometryCollection") {
                    for (it = 0; it < He.geometry.geometries.length; it++)
                      de(Be, { id: st, geometry: He.geometry.geometries[it], properties: He.properties }, he, be);
                    return;
                  }
                  throw new Error("Input data is not a valid GeoJSON object.");
                }
                for (it = 0; it < Re.length; it++) {
                  var Tt = [];
                  Me(Re[it], Tt, Xe, !0), qe.push(Tt);
                }
              }
              Be.push(we(st, Ue, qe, He.properties));
            }
          }
          function Te(Be, He) {
            He.push(ze(Be[0])), He.push(Ie(Be[1])), He.push(0);
          }
          function Ee(Be, He, he, be) {
            for (var Re, Ue, Xe = 0, qe = 0; qe < Be.length; qe++) {
              var st = ze(Be[qe][0]), it = Ie(Be[qe][1]);
              He.push(st), He.push(it), He.push(0), qe > 0 && (Xe += be ? (Re * it - st * Ue) / 2 : Math.sqrt(Math.pow(st - Re, 2) + Math.pow(it - Ue, 2))), Re = st, Ue = it;
            }
            var Tt = He.length - 3;
            He[2] = 1, function Pt(rt, ut, Bt, wt) {
              for (var Lt, Se = wt, We = Bt - ut >> 1, nt = Bt - ut, ft = rt[ut], Mt = rt[ut + 1], Nt = rt[Bt], Zt = rt[Bt + 1], Ut = ut + 3; Ut < Bt; Ut += 3) {
                var fr = ge(rt[Ut], rt[Ut + 1], ft, Mt, Nt, Zt);
                if (fr > Se)
                  Lt = Ut, Se = fr;
                else if (fr === Se) {
                  var Tr = Math.abs(Ut - We);
                  Tr < nt && (Lt = Ut, nt = Tr);
                }
              }
              Se > wt && (Lt - ut > 3 && Pt(rt, ut, Lt, wt), rt[Lt + 2] = Se, Bt - Lt > 3 && Pt(rt, Lt, Bt, wt));
            }(He, 0, Tt, he), He[Tt + 2] = 1, He.size = Math.abs(Xe), He.start = 0, He.end = He.size;
          }
          function Me(Be, He, he, be) {
            for (var Re = 0; Re < Be.length; Re++) {
              var Ue = [];
              Ee(Be[Re], Ue, he, be), He.push(Ue);
            }
          }
          function ze(Be) {
            return Be / 360 + 0.5;
          }
          function Ie(Be) {
            var He = Math.sin(Be * Math.PI / 180), he = 0.5 - 0.25 * Math.log((1 + He) / (1 - He)) / Math.PI;
            return he < 0 ? 0 : he > 1 ? 1 : he;
          }
          function Oe(Be, He, he, be, Re, Ue, Xe, qe) {
            if (be /= He, Ue >= (he /= He) && Xe < be)
              return Be;
            if (Xe < he || Ue >= be)
              return null;
            for (var st = [], it = 0; it < Be.length; it++) {
              var Tt = Be[it], Pt = Tt.geometry, rt = Tt.type, ut = Re === 0 ? Tt.minX : Tt.minY, Bt = Re === 0 ? Tt.maxX : Tt.maxY;
              if (ut >= he && Bt < be)
                st.push(Tt);
              else if (!(Bt < he || ut >= be)) {
                var wt = [];
                if (rt === "Point" || rt === "MultiPoint")
                  Ze(Pt, wt, he, be, Re);
                else if (rt === "LineString")
                  Fe(Pt, wt, he, be, Re, !1, qe.lineMetrics);
                else if (rt === "MultiLineString")
                  De(Pt, wt, he, be, Re, !1);
                else if (rt === "Polygon")
                  De(Pt, wt, he, be, Re, !0);
                else if (rt === "MultiPolygon")
                  for (var Lt = 0; Lt < Pt.length; Lt++) {
                    var Se = [];
                    De(Pt[Lt], Se, he, be, Re, !0), Se.length && wt.push(Se);
                  }
                if (wt.length) {
                  if (qe.lineMetrics && rt === "LineString") {
                    for (Lt = 0; Lt < wt.length; Lt++)
                      st.push(we(Tt.id, rt, wt[Lt], Tt.tags));
                    continue;
                  }
                  rt !== "LineString" && rt !== "MultiLineString" || (wt.length === 1 ? (rt = "LineString", wt = wt[0]) : rt = "MultiLineString"), rt !== "Point" && rt !== "MultiPoint" || (rt = wt.length === 3 ? "Point" : "MultiPoint"), st.push(we(Tt.id, rt, wt, Tt.tags));
                }
              }
            }
            return st.length ? st : null;
          }
          function Ze(Be, He, he, be, Re) {
            for (var Ue = 0; Ue < Be.length; Ue += 3) {
              var Xe = Be[Ue + Re];
              Xe >= he && Xe <= be && (He.push(Be[Ue]), He.push(Be[Ue + 1]), He.push(Be[Ue + 2]));
            }
          }
          function Fe(Be, He, he, be, Re, Ue, Xe) {
            for (var qe, st, it = Pe(Be), Tt = Re === 0 ? Qe : ot, Pt = Be.start, rt = 0; rt < Be.length - 3; rt += 3) {
              var ut = Be[rt], Bt = Be[rt + 1], wt = Be[rt + 2], Lt = Be[rt + 3], Se = Be[rt + 4], We = Re === 0 ? ut : Bt, nt = Re === 0 ? Lt : Se, ft = !1;
              Xe && (qe = Math.sqrt(Math.pow(ut - Lt, 2) + Math.pow(Bt - Se, 2))), We < he ? nt > he && (st = Tt(it, ut, Bt, Lt, Se, he), Xe && (it.start = Pt + qe * st)) : We > be ? nt < be && (st = Tt(it, ut, Bt, Lt, Se, be), Xe && (it.start = Pt + qe * st)) : Ge(it, ut, Bt, wt), nt < he && We >= he && (st = Tt(it, ut, Bt, Lt, Se, he), ft = !0), nt > be && We <= be && (st = Tt(it, ut, Bt, Lt, Se, be), ft = !0), !Ue && ft && (Xe && (it.end = Pt + qe * st), He.push(it), it = Pe(Be)), Xe && (Pt += qe);
            }
            var Mt = Be.length - 3;
            ut = Be[Mt], Bt = Be[Mt + 1], wt = Be[Mt + 2], (We = Re === 0 ? ut : Bt) >= he && We <= be && Ge(it, ut, Bt, wt), Mt = it.length - 3, Ue && Mt >= 3 && (it[Mt] !== it[0] || it[Mt + 1] !== it[1]) && Ge(it, it[0], it[1], it[2]), it.length && He.push(it);
          }
          function Pe(Be) {
            var He = [];
            return He.size = Be.size, He.start = Be.start, He.end = Be.end, He;
          }
          function De(Be, He, he, be, Re, Ue) {
            for (var Xe = 0; Xe < Be.length; Xe++)
              Fe(Be[Xe], He, he, be, Re, Ue, !1);
          }
          function Ge(Be, He, he, be) {
            Be.push(He), Be.push(he), Be.push(be);
          }
          function Qe(Be, He, he, be, Re, Ue) {
            var Xe = (Ue - He) / (be - He);
            return Be.push(Ue), Be.push(he + (Re - he) * Xe), Be.push(1), Xe;
          }
          function ot(Be, He, he, be, Re, Ue) {
            var Xe = (Ue - he) / (Re - he);
            return Be.push(He + (be - He) * Xe), Be.push(Ue), Be.push(1), Xe;
          }
          function vt(Be, He) {
            for (var he = [], be = 0; be < Be.length; be++) {
              var Re, Ue = Be[be], Xe = Ue.type;
              if (Xe === "Point" || Xe === "MultiPoint" || Xe === "LineString")
                Re = bt(Ue.geometry, He);
              else if (Xe === "MultiLineString" || Xe === "Polygon") {
                Re = [];
                for (var qe = 0; qe < Ue.geometry.length; qe++)
                  Re.push(bt(Ue.geometry[qe], He));
              } else if (Xe === "MultiPolygon")
                for (Re = [], qe = 0; qe < Ue.geometry.length; qe++) {
                  for (var st = [], it = 0; it < Ue.geometry[qe].length; it++)
                    st.push(bt(Ue.geometry[qe][it], He));
                  Re.push(st);
                }
              he.push(we(Ue.id, Xe, Re, Ue.tags));
            }
            return he;
          }
          function bt(Be, He) {
            var he = [];
            he.size = Be.size, Be.start !== void 0 && (he.start = Be.start, he.end = Be.end);
            for (var be = 0; be < Be.length; be += 3)
              he.push(Be[be] + He, Be[be + 1], Be[be + 2]);
            return he;
          }
          function yt(Be, He) {
            if (Be.transformed)
              return Be;
            var he, be, Re, Ue = 1 << Be.z, Xe = Be.x, qe = Be.y;
            for (he = 0; he < Be.features.length; he++) {
              var st = Be.features[he], it = st.geometry, Tt = st.type;
              if (st.geometry = [], Tt === 1)
                for (be = 0; be < it.length; be += 2)
                  st.geometry.push(tt(it[be], it[be + 1], He, Ue, Xe, qe));
              else
                for (be = 0; be < it.length; be++) {
                  var Pt = [];
                  for (Re = 0; Re < it[be].length; Re += 2)
                    Pt.push(tt(it[be][Re], it[be][Re + 1], He, Ue, Xe, qe));
                  st.geometry.push(Pt);
                }
            }
            return Be.transformed = !0, Be;
          }
          function tt(Be, He, he, be, Re, Ue) {
            return [Math.round(he * (Be * be - Re)), Math.round(he * (He * be - Ue))];
          }
          function Ke(Be, He, he, be, Re) {
            for (var Ue = He === Re.maxZoom ? 0 : Re.tolerance / ((1 << He) * Re.extent), Xe = { features: [], numPoints: 0, numSimplified: 0, numFeatures: 0, source: null, x: he, y: be, z: He, transformed: !1, minX: 2, minY: 1, maxX: -1, maxY: 0 }, qe = 0; qe < Be.length; qe++) {
              Xe.numFeatures++, mt(Xe, Be[qe], Ue, Re);
              var st = Be[qe].minX, it = Be[qe].minY, Tt = Be[qe].maxX, Pt = Be[qe].maxY;
              st < Xe.minX && (Xe.minX = st), it < Xe.minY && (Xe.minY = it), Tt > Xe.maxX && (Xe.maxX = Tt), Pt > Xe.maxY && (Xe.maxY = Pt);
            }
            return Xe;
          }
          function mt(Be, He, he, be) {
            var Re = He.geometry, Ue = He.type, Xe = [];
            if (Ue === "Point" || Ue === "MultiPoint")
              for (var qe = 0; qe < Re.length; qe += 3)
                Xe.push(Re[qe]), Xe.push(Re[qe + 1]), Be.numPoints++, Be.numSimplified++;
            else if (Ue === "LineString")
              Ft(Xe, Re, Be, he, !1, !1);
            else if (Ue === "MultiLineString" || Ue === "Polygon")
              for (qe = 0; qe < Re.length; qe++)
                Ft(Xe, Re[qe], Be, he, Ue === "Polygon", qe === 0);
            else if (Ue === "MultiPolygon")
              for (var st = 0; st < Re.length; st++) {
                var it = Re[st];
                for (qe = 0; qe < it.length; qe++)
                  Ft(Xe, it[qe], Be, he, !0, qe === 0);
              }
            if (Xe.length) {
              var Tt = He.tags || null;
              if (Ue === "LineString" && be.lineMetrics) {
                for (var Pt in Tt = {}, He.tags)
                  Tt[Pt] = He.tags[Pt];
                Tt.mapbox_clip_start = Re.start / Re.size, Tt.mapbox_clip_end = Re.end / Re.size;
              }
              var rt = { geometry: Xe, type: Ue === "Polygon" || Ue === "MultiPolygon" ? 3 : Ue === "LineString" || Ue === "MultiLineString" ? 2 : 1, tags: Tt };
              He.id !== null && (rt.id = He.id), Be.features.push(rt);
            }
          }
          function Ft(Be, He, he, be, Re, Ue) {
            var Xe = be * be;
            if (be > 0 && He.size < (Re ? Xe : be))
              he.numPoints += He.length / 3;
            else {
              for (var qe = [], st = 0; st < He.length; st += 3)
                (be === 0 || He[st + 2] > Xe) && (he.numSimplified++, qe.push(He[st]), qe.push(He[st + 1])), he.numPoints++;
              Re && function(it, Tt) {
                for (var Pt = 0, rt = 0, ut = it.length, Bt = ut - 2; rt < ut; Bt = rt, rt += 2)
                  Pt += (it[rt] - it[Bt]) * (it[rt + 1] + it[Bt + 1]);
                if (Pt > 0 === Tt)
                  for (rt = 0, ut = it.length; rt < ut / 2; rt += 2) {
                    var wt = it[rt], Lt = it[rt + 1];
                    it[rt] = it[ut - 2 - rt], it[rt + 1] = it[ut - 1 - rt], it[ut - 2 - rt] = wt, it[ut - 1 - rt] = Lt;
                  }
              }(qe, Ue), Be.push(qe);
            }
          }
          function Vt(Be, He) {
            var he = (He = this.options = function(Re, Ue) {
              for (var Xe in Ue)
                Re[Xe] = Ue[Xe];
              return Re;
            }(Object.create(this.options), He)).debug;
            if (he && console.time("preprocess data"), He.maxZoom < 0 || He.maxZoom > 24)
              throw new Error("maxZoom should be in the 0-24 range");
            if (He.promoteId && He.generateId)
              throw new Error("promoteId and generateId cannot be used together.");
            var be = function(Re, Ue) {
              var Xe = [];
              if (Re.type === "FeatureCollection")
                for (var qe = 0; qe < Re.features.length; qe++)
                  de(Xe, Re.features[qe], Ue, qe);
              else
                Re.type === "Feature" ? de(Xe, Re, Ue) : de(Xe, { geometry: Re }, Ue);
              return Xe;
            }(Be, He);
            this.tiles = {}, this.tileCoords = [], he && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", He.indexMaxZoom, He.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), (be = function(Re, Ue) {
              var Xe = Ue.buffer / Ue.extent, qe = Re, st = Oe(Re, 1, -1 - Xe, Xe, 0, -1, 2, Ue), it = Oe(Re, 1, 1 - Xe, 2 + Xe, 0, -1, 2, Ue);
              return (st || it) && (qe = Oe(Re, 1, -Xe, 1 + Xe, 0, -1, 2, Ue) || [], st && (qe = vt(st, 1).concat(qe)), it && (qe = qe.concat(vt(it, -1)))), qe;
            }(be, He)).length && this.splitTile(be, 0, 0, 0), he && (be.length && console.log("features: %d, points: %d", this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd("generate tiles"), console.log("tiles generated:", this.total, JSON.stringify(this.stats)));
          }
          function Xt(Be, He, he) {
            return 32 * ((1 << Be) * he + He) + Be;
          }
          function Gt(Be, He) {
            var he = Be.tileID.canonical;
            if (!this._geoJSONIndex)
              return He(null, null);
            var be = this._geoJSONIndex.getTile(he.z, he.x, he.y);
            if (!be)
              return He(null, null);
            var Re = new _(be.features), Ue = A(Re);
            Ue.byteOffset === 0 && Ue.byteLength === Ue.buffer.byteLength || (Ue = new Uint8Array(Ue)), He(null, { vectorTile: Re, rawData: Ue.buffer });
          }
          X.prototype.load = function(Be) {
            var He = this.options, he = He.log, be = He.minZoom, Re = He.maxZoom, Ue = He.nodeSize;
            he && console.time("total time");
            var Xe = "prepare " + Be.length + " points";
            he && console.time(Xe), this.points = Be;
            for (var qe = [], st = 0; st < Be.length; st++)
              Be[st].geometry && qe.push(ie(Be[st], st));
            this.trees[Re + 1] = new N(qe, Ae, pe, Ue, Float32Array), he && console.timeEnd(Xe);
            for (var it = Re; it >= be; it--) {
              var Tt = +Date.now();
              qe = this._cluster(qe, it), this.trees[it] = new N(qe, Ae, pe, Ue, Float32Array), he && console.log("z%d: %d clusters in %dms", it, qe.length, +Date.now() - Tt);
            }
            return he && console.timeEnd("total time"), this;
          }, X.prototype.getClusters = function(Be, He) {
            var he = ((Be[0] + 180) % 360 + 360) % 360 - 180, be = Math.max(-90, Math.min(90, Be[1])), Re = Be[2] === 180 ? 180 : ((Be[2] + 180) % 360 + 360) % 360 - 180, Ue = Math.max(-90, Math.min(90, Be[3]));
            if (Be[2] - Be[0] >= 360)
              he = -180, Re = 180;
            else if (he > Re) {
              var Xe = this.getClusters([he, be, 180, Ue], He), qe = this.getClusters([-180, be, Re, Ue], He);
              return Xe.concat(qe);
            }
            for (var st = this.trees[this._limitZoom(He)], it = [], Tt = 0, Pt = st.range(ve(he), ue(Ue), ve(Re), ue(be)); Tt < Pt.length; Tt += 1) {
              var rt = Pt[Tt], ut = st.points[rt];
              it.push(ut.numPoints ? le(ut) : this.points[ut.index]);
            }
            return it;
          }, X.prototype.getChildren = function(Be) {
            var He = this._getOriginId(Be), he = this._getOriginZoom(Be), be = "No cluster with the specified id.", Re = this.trees[he];
            if (!Re)
              throw new Error(be);
            var Ue = Re.points[He];
            if (!Ue)
              throw new Error(be);
            for (var Xe = this.options.radius / (this.options.extent * Math.pow(2, he - 1)), qe = [], st = 0, it = Re.within(Ue.x, Ue.y, Xe); st < it.length; st += 1) {
              var Tt = it[st], Pt = Re.points[Tt];
              Pt.parentId === Be && qe.push(Pt.numPoints ? le(Pt) : this.points[Pt.index]);
            }
            if (qe.length === 0)
              throw new Error(be);
            return qe;
          }, X.prototype.getLeaves = function(Be, He, he) {
            He = He || 10, he = he || 0;
            var be = [];
            return this._appendLeaves(be, Be, He, he, 0), be;
          }, X.prototype.getTile = function(Be, He, he) {
            var be = this.trees[this._limitZoom(Be)], Re = Math.pow(2, Be), Ue = this.options, Xe = Ue.extent, qe = Ue.radius / Xe, st = (he - qe) / Re, it = (he + 1 + qe) / Re, Tt = { features: [] };
            return this._addTileFeatures(be.range((He - qe) / Re, st, (He + 1 + qe) / Re, it), be.points, He, he, Re, Tt), He === 0 && this._addTileFeatures(be.range(1 - qe / Re, st, 1, it), be.points, Re, he, Re, Tt), He === Re - 1 && this._addTileFeatures(be.range(0, st, qe / Re, it), be.points, -1, he, Re, Tt), Tt.features.length ? Tt : null;
          }, X.prototype.getClusterExpansionZoom = function(Be) {
            for (var He = this._getOriginZoom(Be) - 1; He <= this.options.maxZoom; ) {
              var he = this.getChildren(Be);
              if (He++, he.length !== 1)
                break;
              Be = he[0].properties.cluster_id;
            }
            return He;
          }, X.prototype._appendLeaves = function(Be, He, he, be, Re) {
            for (var Ue = 0, Xe = this.getChildren(He); Ue < Xe.length; Ue += 1) {
              var qe = Xe[Ue], st = qe.properties;
              if (st && st.cluster ? Re + st.point_count <= be ? Re += st.point_count : Re = this._appendLeaves(Be, st.cluster_id, he, be, Re) : Re < be ? Re++ : Be.push(qe), Be.length === he)
                break;
            }
            return Re;
          }, X.prototype._addTileFeatures = function(Be, He, he, be, Re, Ue) {
            for (var Xe = 0, qe = Be; Xe < qe.length; Xe += 1) {
              var st = He[qe[Xe]], it = st.numPoints, Tt = { type: 1, geometry: [[Math.round(this.options.extent * (st.x * Re - he)), Math.round(this.options.extent * (st.y * Re - be))]], tags: it ? oe(st) : this.points[st.index].properties }, Pt = void 0;
              it ? Pt = st.id : this.options.generateId ? Pt = st.index : this.points[st.index].id && (Pt = this.points[st.index].id), Pt !== void 0 && (Tt.id = Pt), Ue.features.push(Tt);
            }
          }, X.prototype._limitZoom = function(Be) {
            return Math.max(this.options.minZoom, Math.min(Be, this.options.maxZoom + 1));
          }, X.prototype._cluster = function(Be, He) {
            for (var he = [], be = this.options, Re = be.radius, Ue = be.extent, Xe = be.reduce, qe = Re / (Ue * Math.pow(2, He)), st = 0; st < Be.length; st++) {
              var it = Be[st];
              if (!(it.zoom <= He)) {
                it.zoom = He;
                for (var Tt = this.trees[He + 1], Pt = Tt.within(it.x, it.y, qe), rt = it.numPoints || 1, ut = it.x * rt, Bt = it.y * rt, wt = Xe && rt > 1 ? this._map(it, !0) : null, Lt = (st << 5) + (He + 1) + this.points.length, Se = 0, We = Pt; Se < We.length; Se += 1) {
                  var nt = We[Se], ft = Tt.points[nt];
                  if (!(ft.zoom <= He)) {
                    ft.zoom = He;
                    var Mt = ft.numPoints || 1;
                    ut += ft.x * Mt, Bt += ft.y * Mt, rt += Mt, ft.parentId = Lt, Xe && (wt || (wt = this._map(it, !0)), Xe(wt, this._map(ft)));
                  }
                }
                rt === 1 ? he.push(it) : (it.parentId = Lt, he.push(te(ut / rt, Bt / rt, Lt, rt, wt)));
              }
            }
            return he;
          }, X.prototype._getOriginId = function(Be) {
            return Be - this.points.length >> 5;
          }, X.prototype._getOriginZoom = function(Be) {
            return (Be - this.points.length) % 32;
          }, X.prototype._map = function(Be, He) {
            if (Be.numPoints)
              return He ? ye({}, Be.properties) : Be.properties;
            var he = this.points[Be.index].properties, be = this.options.map(he);
            return He && be === he ? ye({}, be) : be;
          }, Vt.prototype.options = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 }, Vt.prototype.splitTile = function(Be, He, he, be, Re, Ue, Xe) {
            for (var qe = [Be, He, he, be], st = this.options, it = st.debug; qe.length; ) {
              be = qe.pop(), he = qe.pop(), He = qe.pop(), Be = qe.pop();
              var Tt = 1 << He, Pt = Xt(He, he, be), rt = this.tiles[Pt];
              if (!rt && (it > 1 && console.time("creation"), rt = this.tiles[Pt] = Ke(Be, He, he, be, st), this.tileCoords.push({ z: He, x: he, y: be }), it)) {
                it > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", He, he, be, rt.numFeatures, rt.numPoints, rt.numSimplified), console.timeEnd("creation"));
                var ut = "z" + He;
                this.stats[ut] = (this.stats[ut] || 0) + 1, this.total++;
              }
              if (rt.source = Be, Re) {
                if (He === st.maxZoom || He === Re)
                  continue;
                var Bt = 1 << Re - He;
                if (he !== Math.floor(Ue / Bt) || be !== Math.floor(Xe / Bt))
                  continue;
              } else if (He === st.indexMaxZoom || rt.numPoints <= st.indexMaxPoints)
                continue;
              if (rt.source = null, Be.length !== 0) {
                it > 1 && console.time("clipping");
                var wt, Lt, Se, We, nt, ft, Mt = 0.5 * st.buffer / st.extent, Nt = 0.5 - Mt, Zt = 0.5 + Mt, Ut = 1 + Mt;
                wt = Lt = Se = We = null, nt = Oe(Be, Tt, he - Mt, he + Zt, 0, rt.minX, rt.maxX, st), ft = Oe(Be, Tt, he + Nt, he + Ut, 0, rt.minX, rt.maxX, st), Be = null, nt && (wt = Oe(nt, Tt, be - Mt, be + Zt, 1, rt.minY, rt.maxY, st), Lt = Oe(nt, Tt, be + Nt, be + Ut, 1, rt.minY, rt.maxY, st), nt = null), ft && (Se = Oe(ft, Tt, be - Mt, be + Zt, 1, rt.minY, rt.maxY, st), We = Oe(ft, Tt, be + Nt, be + Ut, 1, rt.minY, rt.maxY, st), ft = null), it > 1 && console.timeEnd("clipping"), qe.push(wt || [], He + 1, 2 * he, 2 * be), qe.push(Lt || [], He + 1, 2 * he, 2 * be + 1), qe.push(Se || [], He + 1, 2 * he + 1, 2 * be), qe.push(We || [], He + 1, 2 * he + 1, 2 * be + 1);
              }
            }
          }, Vt.prototype.getTile = function(Be, He, he) {
            var be = this.options, Re = be.extent, Ue = be.debug;
            if (Be < 0 || Be > 24)
              return null;
            var Xe = 1 << Be, qe = Xt(Be, He = (He % Xe + Xe) % Xe, he);
            if (this.tiles[qe])
              return yt(this.tiles[qe], Re);
            Ue > 1 && console.log("drilling down to z%d-%d-%d", Be, He, he);
            for (var st, it = Be, Tt = He, Pt = he; !st && it > 0; )
              it--, Tt = Math.floor(Tt / 2), Pt = Math.floor(Pt / 2), st = this.tiles[Xt(it, Tt, Pt)];
            return st && st.source ? (Ue > 1 && console.log("found parent tile z%d-%d-%d", it, Tt, Pt), Ue > 1 && console.time("drilling down"), this.splitTile(st.source, it, Tt, Pt, Be, He, he), Ue > 1 && console.timeEnd("drilling down"), this.tiles[qe] ? yt(this.tiles[qe], Re) : null) : null;
          };
          var nr = function(Be) {
            function He(he, be, Re, Ue) {
              Be.call(this, he, be, Re, Gt), Ue && (this.loadGeoJSON = Ue);
            }
            return Be && (He.__proto__ = Be), He.prototype = Object.create(Be && Be.prototype), He.prototype.constructor = He, He.prototype.loadData = function(he, be) {
              this._pendingCallback && this._pendingCallback(null, { abandoned: !0 }), this._pendingCallback = be, this._pendingLoadDataParams = he, this._state && this._state !== "Idle" ? this._state = "NeedsLoadData" : (this._state = "Coalescing", this._loadData());
            }, He.prototype._loadData = function() {
              var he = this;
              if (this._pendingCallback && this._pendingLoadDataParams) {
                var be = this._pendingCallback, Re = this._pendingLoadDataParams;
                delete this._pendingCallback, delete this._pendingLoadDataParams;
                var Ue = !!(Re && Re.request && Re.request.collectResourceTiming) && new e.RequestPerformance(Re.request);
                this.loadGeoJSON(Re, function(Xe, qe) {
                  if (Xe || !qe)
                    return be(Xe);
                  if (typeof qe != "object")
                    return be(new Error("Input data given to '" + Re.source + "' is not a valid GeoJSON object."));
                  p(qe, !0);
                  try {
                    he._geoJSONIndex = Re.cluster ? new X(function(Tt) {
                      var Pt = Tt.superclusterOptions, rt = Tt.clusterProperties;
                      if (!rt || !Pt)
                        return Pt;
                      for (var ut = {}, Bt = {}, wt = { accumulated: null, zoom: 0 }, Lt = { properties: null }, Se = Object.keys(rt), We = 0, nt = Se; We < nt.length; We += 1) {
                        var ft = nt[We], Mt = rt[ft], Nt = Mt[0], Zt = Mt[1], Ut = e.createExpression(Zt), fr = e.createExpression(typeof Nt == "string" ? [Nt, ["accumulated"], ["get", ft]] : Nt);
                        ut[ft] = Ut.value, Bt[ft] = fr.value;
                      }
                      return Pt.map = function(Tr) {
                        Lt.properties = Tr;
                        for (var ur = {}, Kt = 0, $t = Se; Kt < $t.length; Kt += 1) {
                          var er = $t[Kt];
                          ur[er] = ut[er].evaluate(wt, Lt);
                        }
                        return ur;
                      }, Pt.reduce = function(Tr, ur) {
                        Lt.properties = ur;
                        for (var Kt = 0, $t = Se; Kt < $t.length; Kt += 1) {
                          var er = $t[Kt];
                          wt.accumulated = Tr[er], Tr[er] = Bt[er].evaluate(wt, Lt);
                        }
                      }, Pt;
                    }(Re)).load(qe.features) : function(Tt, Pt) {
                      return new Vt(Tt, Pt);
                    }(qe, Re.geojsonVtOptions);
                  } catch (Tt) {
                    return be(Tt);
                  }
                  he.loaded = {};
                  var st = {};
                  if (Ue) {
                    var it = Ue.finish();
                    it && (st.resourceTiming = {}, st.resourceTiming[Re.source] = JSON.parse(JSON.stringify(it)));
                  }
                  be(null, st);
                });
              }
            }, He.prototype.coalesce = function() {
              this._state === "Coalescing" ? this._state = "Idle" : this._state === "NeedsLoadData" && (this._state = "Coalescing", this._loadData());
            }, He.prototype.reloadTile = function(he, be) {
              var Re = this.loaded, Ue = he.uid;
              return Re && Re[Ue] ? Be.prototype.reloadTile.call(this, he, be) : this.loadTile(he, be);
            }, He.prototype.loadGeoJSON = function(he, be) {
              if (he.request)
                e.getJSON(he.request, be);
              else {
                if (typeof he.data != "string")
                  return be(new Error("Input data given to '" + he.source + "' is not a valid GeoJSON object."));
                try {
                  return be(null, JSON.parse(he.data));
                } catch {
                  return be(new Error("Input data given to '" + he.source + "' is not a valid GeoJSON object."));
                }
              }
            }, He.prototype.removeSource = function(he, be) {
              this._pendingCallback && this._pendingCallback(null, { abandoned: !0 }), be();
            }, He.prototype.getClusterExpansionZoom = function(he, be) {
              try {
                be(null, this._geoJSONIndex.getClusterExpansionZoom(he.clusterId));
              } catch (Re) {
                be(Re);
              }
            }, He.prototype.getClusterChildren = function(he, be) {
              try {
                be(null, this._geoJSONIndex.getChildren(he.clusterId));
              } catch (Re) {
                be(Re);
              }
            }, He.prototype.getClusterLeaves = function(he, be) {
              try {
                be(null, this._geoJSONIndex.getLeaves(he.clusterId, he.limit, he.offset));
              } catch (Re) {
                be(Re);
              }
            }, He;
          }(h), It = function(Be) {
            var He = this;
            this.self = Be, this.actor = new e.Actor(Be, this), this.layerIndexes = {}, this.availableImages = {}, this.workerSourceTypes = { vector: h, geojson: nr }, this.workerSources = {}, this.demWorkerSources = {}, this.self.registerWorkerSource = function(he, be) {
              if (He.workerSourceTypes[he])
                throw new Error('Worker source with name "' + he + '" already registered.');
              He.workerSourceTypes[he] = be;
            }, this.self.registerRTLTextPlugin = function(he) {
              if (e.plugin.isParsed())
                throw new Error("RTL text plugin already registered.");
              e.plugin.applyArabicShaping = he.applyArabicShaping, e.plugin.processBidirectionalText = he.processBidirectionalText, e.plugin.processStyledBidirectionalText = he.processStyledBidirectionalText;
            };
          };
          return It.prototype.setReferrer = function(Be, He) {
            this.referrer = He;
          }, It.prototype.setImages = function(Be, He, he) {
            for (var be in this.availableImages[Be] = He, this.workerSources[Be]) {
              var Re = this.workerSources[Be][be];
              for (var Ue in Re)
                Re[Ue].availableImages = He;
            }
            he();
          }, It.prototype.setLayers = function(Be, He, he) {
            this.getLayerIndex(Be).replace(He), he();
          }, It.prototype.updateLayers = function(Be, He, he) {
            this.getLayerIndex(Be).update(He.layers, He.removedIds), he();
          }, It.prototype.loadTile = function(Be, He, he) {
            this.getWorkerSource(Be, He.type, He.source).loadTile(He, he);
          }, It.prototype.loadDEMTile = function(Be, He, he) {
            this.getDEMWorkerSource(Be, He.source).loadTile(He, he);
          }, It.prototype.reloadTile = function(Be, He, he) {
            this.getWorkerSource(Be, He.type, He.source).reloadTile(He, he);
          }, It.prototype.abortTile = function(Be, He, he) {
            this.getWorkerSource(Be, He.type, He.source).abortTile(He, he);
          }, It.prototype.removeTile = function(Be, He, he) {
            this.getWorkerSource(Be, He.type, He.source).removeTile(He, he);
          }, It.prototype.removeDEMTile = function(Be, He) {
            this.getDEMWorkerSource(Be, He.source).removeTile(He);
          }, It.prototype.removeSource = function(Be, He, he) {
            if (this.workerSources[Be] && this.workerSources[Be][He.type] && this.workerSources[Be][He.type][He.source]) {
              var be = this.workerSources[Be][He.type][He.source];
              delete this.workerSources[Be][He.type][He.source], be.removeSource !== void 0 ? be.removeSource(He, he) : he();
            }
          }, It.prototype.loadWorkerSource = function(Be, He, he) {
            try {
              this.self.importScripts(He.url), he();
            } catch (be) {
              he(be.toString());
            }
          }, It.prototype.syncRTLPluginState = function(Be, He, he) {
            try {
              e.plugin.setState(He);
              var be = e.plugin.getPluginURL();
              if (e.plugin.isLoaded() && !e.plugin.isParsed() && be != null) {
                this.self.importScripts(be);
                var Re = e.plugin.isParsed();
                he(Re ? void 0 : new Error("RTL Text Plugin failed to import scripts from " + be), Re);
              }
            } catch (Ue) {
              he(Ue.toString());
            }
          }, It.prototype.getAvailableImages = function(Be) {
            var He = this.availableImages[Be];
            return He || (He = []), He;
          }, It.prototype.getLayerIndex = function(Be) {
            var He = this.layerIndexes[Be];
            return He || (He = this.layerIndexes[Be] = new s()), He;
          }, It.prototype.getWorkerSource = function(Be, He, he) {
            var be = this;
            if (this.workerSources[Be] || (this.workerSources[Be] = {}), this.workerSources[Be][He] || (this.workerSources[Be][He] = {}), !this.workerSources[Be][He][he]) {
              var Re = { send: function(Ue, Xe, qe) {
                be.actor.send(Ue, Xe, qe, Be);
              } };
              this.workerSources[Be][He][he] = new this.workerSourceTypes[He](Re, this.getLayerIndex(Be), this.getAvailableImages(Be));
            }
            return this.workerSources[Be][He][he];
          }, It.prototype.getDEMWorkerSource = function(Be, He) {
            return this.demWorkerSources[Be] || (this.demWorkerSources[Be] = {}), this.demWorkerSources[Be][He] || (this.demWorkerSources[Be][He] = new i()), this.demWorkerSources[Be][He];
          }, It.prototype.enforceCacheSizeLimit = function(Be, He) {
            e.enforceCacheSizeLimit(He);
          }, typeof WorkerGlobalScope < "u" && e.window !== void 0 && e.window instanceof WorkerGlobalScope && (e.window.worker = new It(e.window)), It;
        }), x(0, function(e) {
          var r = e.createCommonjsModule(function(C) {
            function D(ae) {
              return !F(ae);
            }
            function F(ae) {
              return typeof window > "u" || typeof document > "u" ? "not a browser" : Array.prototype && Array.prototype.every && Array.prototype.filter && Array.prototype.forEach && Array.prototype.indexOf && Array.prototype.lastIndexOf && Array.prototype.map && Array.prototype.some && Array.prototype.reduce && Array.prototype.reduceRight && Array.isArray ? Function.prototype && Function.prototype.bind ? Object.keys && Object.create && Object.getPrototypeOf && Object.getOwnPropertyNames && Object.isSealed && Object.isFrozen && Object.isExtensible && Object.getOwnPropertyDescriptor && Object.defineProperty && Object.defineProperties && Object.seal && Object.freeze && Object.preventExtensions ? "JSON" in window && "parse" in JSON && "stringify" in JSON ? function() {
                if (!("Worker" in window && "Blob" in window && "URL" in window))
                  return !1;
                var fe, xe, ke = new Blob([""], { type: "text/javascript" }), Le = URL.createObjectURL(ke);
                try {
                  xe = new Worker(Le), fe = !0;
                } catch {
                  fe = !1;
                }
                return xe && xe.terminate(), URL.revokeObjectURL(Le), fe;
              }() ? "Uint8ClampedArray" in window ? ArrayBuffer.isView ? function() {
                var fe = document.createElement("canvas");
                fe.width = fe.height = 1;
                var xe = fe.getContext("2d");
                if (!xe)
                  return !1;
                var ke = xe.getImageData(0, 0, 1, 1);
                return ke && ke.width === fe.width;
              }() ? function(fe) {
                return q[fe] === void 0 && (q[fe] = function(xe) {
                  var ke = function(Ve) {
                    var Je = document.createElement("canvas"), at = Object.create(D.webGLContextAttributes);
                    return at.failIfMajorPerformanceCaveat = Ve, Je.probablySupportsContext ? Je.probablySupportsContext("webgl", at) || Je.probablySupportsContext("experimental-webgl", at) : Je.supportsContext ? Je.supportsContext("webgl", at) || Je.supportsContext("experimental-webgl", at) : Je.getContext("webgl", at) || Je.getContext("experimental-webgl", at);
                  }(xe);
                  if (!ke)
                    return !1;
                  var Le = ke.createShader(ke.VERTEX_SHADER);
                  return !Le || ke.isContextLost() ? !1 : (ke.shaderSource(Le, "void main() {}"), ke.compileShader(Le), ke.getShaderParameter(Le, ke.COMPILE_STATUS) === !0);
                }(fe)), q[fe];
              }(ae && ae.failIfMajorPerformanceCaveat) ? void 0 : "insufficient WebGL support" : "insufficient Canvas/getImageData support" : "insufficient ArrayBuffer support" : "insufficient Uint8ClampedArray support" : "insufficient worker support" : "insufficient JSON support" : "insufficient Object support" : "insufficient Function support" : "insufficent Array support";
            }
            C.exports ? C.exports = D : window && (window.mapboxgl = window.mapboxgl || {}, window.mapboxgl.supported = D, window.mapboxgl.notSupportedReason = F);
            var q = {};
            D.webGLContextAttributes = { antialias: !1, alpha: !0, stencil: !0, depth: !0 };
          }), n = { create: function(C, D, F) {
            var q = e.window.document.createElement(C);
            return D !== void 0 && (q.className = D), F && F.appendChild(q), q;
          }, createNS: function(C, D) {
            return e.window.document.createElementNS(C, D);
          } }, s = e.window.document.documentElement.style;
          function t(C) {
            if (!s)
              return C[0];
            for (var D = 0; D < C.length; D++)
              if (C[D] in s)
                return C[D];
            return C[0];
          }
          var d, u = t(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]);
          n.disableDrag = function() {
            s && u && (d = s[u], s[u] = "none");
          }, n.enableDrag = function() {
            s && u && (s[u] = d);
          };
          var o = t(["transform", "WebkitTransform"]);
          n.setTransform = function(C, D) {
            C.style[o] = D;
          };
          var h = !1;
          try {
            var l = Object.defineProperty({}, "passive", { get: function() {
              h = !0;
            } });
            e.window.addEventListener("test", l, l), e.window.removeEventListener("test", l, l);
          } catch {
            h = !1;
          }
          n.addEventListener = function(C, D, F, q) {
            q === void 0 && (q = {}), "passive" in q && h ? C.addEventListener(D, F, q) : C.addEventListener(D, F, q.capture);
          }, n.removeEventListener = function(C, D, F, q) {
            q === void 0 && (q = {}), "passive" in q && h ? C.removeEventListener(D, F, q) : C.removeEventListener(D, F, q.capture);
          };
          var i = function(C) {
            C.preventDefault(), C.stopPropagation(), e.window.removeEventListener("click", i, !0);
          };
          function p(C) {
            var D = C.userImage;
            return D && D.render && D.render() ? (C.data.replace(new Uint8Array(D.data.buffer)), !0) : !1;
          }
          n.suppressClick = function() {
            e.window.addEventListener("click", i, !0), e.window.setTimeout(function() {
              e.window.removeEventListener("click", i, !0);
            }, 0);
          }, n.mousePos = function(C, D) {
            var F = C.getBoundingClientRect();
            return new e.Point(D.clientX - F.left - C.clientLeft, D.clientY - F.top - C.clientTop);
          }, n.touchPos = function(C, D) {
            for (var F = C.getBoundingClientRect(), q = [], ae = 0; ae < D.length; ae++)
              q.push(new e.Point(D[ae].clientX - F.left - C.clientLeft, D[ae].clientY - F.top - C.clientTop));
            return q;
          }, n.mouseButton = function(C) {
            return e.window.InstallTrigger !== void 0 && C.button === 2 && C.ctrlKey && e.window.navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? 0 : C.button;
          }, n.remove = function(C) {
            C.parentNode && C.parentNode.removeChild(C);
          };
          var c = function(C) {
            function D() {
              C.call(this), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new e.RGBAImage({ width: 1, height: 1 }), this.dirty = !0;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.isLoaded = function() {
              return this.loaded;
            }, D.prototype.setLoaded = function(F) {
              if (this.loaded !== F && (this.loaded = F, F)) {
                for (var q = 0, ae = this.requestors; q < ae.length; q += 1) {
                  var fe = ae[q], xe = fe.ids, ke = fe.callback;
                  this._notify(xe, ke);
                }
                this.requestors = [];
              }
            }, D.prototype.getImage = function(F) {
              return this.images[F];
            }, D.prototype.addImage = function(F, q) {
              this._validate(F, q) && (this.images[F] = q);
            }, D.prototype._validate = function(F, q) {
              var ae = !0;
              return this._validateStretch(q.stretchX, q.data && q.data.width) || (this.fire(new e.ErrorEvent(new Error('Image "' + F + '" has invalid "stretchX" value'))), ae = !1), this._validateStretch(q.stretchY, q.data && q.data.height) || (this.fire(new e.ErrorEvent(new Error('Image "' + F + '" has invalid "stretchY" value'))), ae = !1), this._validateContent(q.content, q) || (this.fire(new e.ErrorEvent(new Error('Image "' + F + '" has invalid "content" value'))), ae = !1), ae;
            }, D.prototype._validateStretch = function(F, q) {
              if (!F)
                return !0;
              for (var ae = 0, fe = 0, xe = F; fe < xe.length; fe += 1) {
                var ke = xe[fe];
                if (ke[0] < ae || ke[1] < ke[0] || q < ke[1])
                  return !1;
                ae = ke[1];
              }
              return !0;
            }, D.prototype._validateContent = function(F, q) {
              return !F || F.length === 4 && !(F[0] < 0 || q.data.width < F[0]) && !(F[1] < 0 || q.data.height < F[1]) && !(F[2] < 0 || q.data.width < F[2]) && !(F[3] < 0 || q.data.height < F[3]) && !(F[2] < F[0]) && !(F[3] < F[1]);
            }, D.prototype.updateImage = function(F, q) {
              var ae = this.images[F];
              q.version = ae.version + 1, this.images[F] = q, this.updatedImages[F] = !0;
            }, D.prototype.removeImage = function(F) {
              var q = this.images[F];
              delete this.images[F], delete this.patterns[F], q.userImage && q.userImage.onRemove && q.userImage.onRemove();
            }, D.prototype.listImages = function() {
              return Object.keys(this.images);
            }, D.prototype.getImages = function(F, q) {
              var ae = !0;
              if (!this.isLoaded())
                for (var fe = 0, xe = F; fe < xe.length; fe += 1) {
                  var ke = xe[fe];
                  this.images[ke] || (ae = !1);
                }
              this.isLoaded() || ae ? this._notify(F, q) : this.requestors.push({ ids: F, callback: q });
            }, D.prototype._notify = function(F, q) {
              for (var ae = {}, fe = 0, xe = F; fe < xe.length; fe += 1) {
                var ke = xe[fe];
                this.images[ke] || this.fire(new e.Event("styleimagemissing", { id: ke }));
                var Le = this.images[ke];
                Le ? ae[ke] = { data: Le.data.clone(), pixelRatio: Le.pixelRatio, sdf: Le.sdf, version: Le.version, stretchX: Le.stretchX, stretchY: Le.stretchY, content: Le.content, hasRenderCallback: Boolean(Le.userImage && Le.userImage.render) } : e.warnOnce('Image "' + ke + '" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.');
              }
              q(null, ae);
            }, D.prototype.getPixelSize = function() {
              var F = this.atlasImage;
              return { width: F.width, height: F.height };
            }, D.prototype.getPattern = function(F) {
              var q = this.patterns[F], ae = this.getImage(F);
              if (!ae)
                return null;
              if (q && q.position.version === ae.version)
                return q.position;
              if (q)
                q.position.version = ae.version;
              else {
                var fe = { w: ae.data.width + 2, h: ae.data.height + 2, x: 0, y: 0 }, xe = new e.ImagePosition(fe, ae);
                this.patterns[F] = { bin: fe, position: xe };
              }
              return this._updatePatternAtlas(), this.patterns[F].position;
            }, D.prototype.bind = function(F) {
              var q = F.gl;
              this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = !1) : this.atlasTexture = new e.Texture(F, this.atlasImage, q.RGBA), this.atlasTexture.bind(q.LINEAR, q.CLAMP_TO_EDGE);
            }, D.prototype._updatePatternAtlas = function() {
              var F = [];
              for (var q in this.patterns)
                F.push(this.patterns[q].bin);
              var ae = e.potpack(F), fe = ae.w, xe = ae.h, ke = this.atlasImage;
              for (var Le in ke.resize({ width: fe || 1, height: xe || 1 }), this.patterns) {
                var Ve = this.patterns[Le].bin, Je = Ve.x + 1, at = Ve.y + 1, _t = this.images[Le].data, Et = _t.width, kt = _t.height;
                e.RGBAImage.copy(_t, ke, { x: 0, y: 0 }, { x: Je, y: at }, { width: Et, height: kt }), e.RGBAImage.copy(_t, ke, { x: 0, y: kt - 1 }, { x: Je, y: at - 1 }, { width: Et, height: 1 }), e.RGBAImage.copy(_t, ke, { x: 0, y: 0 }, { x: Je, y: at + kt }, { width: Et, height: 1 }), e.RGBAImage.copy(_t, ke, { x: Et - 1, y: 0 }, { x: Je - 1, y: at }, { width: 1, height: kt }), e.RGBAImage.copy(_t, ke, { x: 0, y: 0 }, { x: Je + Et, y: at }, { width: 1, height: kt });
              }
              this.dirty = !0;
            }, D.prototype.beginFrame = function() {
              this.callbackDispatchedThisFrame = {};
            }, D.prototype.dispatchRenderCallbacks = function(F) {
              for (var q = 0, ae = F; q < ae.length; q += 1) {
                var fe = ae[q];
                if (!this.callbackDispatchedThisFrame[fe]) {
                  this.callbackDispatchedThisFrame[fe] = !0;
                  var xe = this.images[fe];
                  p(xe) && this.updateImage(fe, xe);
                }
              }
            }, D;
          }(e.Evented), a = _, y = _, f = 1e20;
          function _(C, D, F, q, ae, fe) {
            this.fontSize = C || 24, this.buffer = D === void 0 ? 3 : D, this.cutoff = q || 0.25, this.fontFamily = ae || "sans-serif", this.fontWeight = fe || "normal", this.radius = F || 8;
            var xe = this.size = this.fontSize + 2 * this.buffer;
            this.canvas = document.createElement("canvas"), this.canvas.width = this.canvas.height = xe, this.ctx = this.canvas.getContext("2d"), this.ctx.font = this.fontWeight + " " + this.fontSize + "px " + this.fontFamily, this.ctx.textBaseline = "middle", this.ctx.fillStyle = "black", this.gridOuter = new Float64Array(xe * xe), this.gridInner = new Float64Array(xe * xe), this.f = new Float64Array(xe), this.d = new Float64Array(xe), this.z = new Float64Array(xe + 1), this.v = new Int16Array(xe), this.middle = Math.round(xe / 2 * (navigator.userAgent.indexOf("Gecko/") >= 0 ? 1.2 : 1));
          }
          function b(C, D, F, q, ae, fe, xe) {
            for (var ke = 0; ke < D; ke++) {
              for (var Le = 0; Le < F; Le++)
                q[Le] = C[Le * D + ke];
              for (w(q, ae, fe, xe, F), Le = 0; Le < F; Le++)
                C[Le * D + ke] = ae[Le];
            }
            for (Le = 0; Le < F; Le++) {
              for (ke = 0; ke < D; ke++)
                q[ke] = C[Le * D + ke];
              for (w(q, ae, fe, xe, D), ke = 0; ke < D; ke++)
                C[Le * D + ke] = Math.sqrt(ae[ke]);
            }
          }
          function w(C, D, F, q, ae) {
            F[0] = 0, q[0] = -f, q[1] = +f;
            for (var fe = 1, xe = 0; fe < ae; fe++) {
              for (var ke = (C[fe] + fe * fe - (C[F[xe]] + F[xe] * F[xe])) / (2 * fe - 2 * F[xe]); ke <= q[xe]; )
                xe--, ke = (C[fe] + fe * fe - (C[F[xe]] + F[xe] * F[xe])) / (2 * fe - 2 * F[xe]);
              F[++xe] = fe, q[xe] = ke, q[xe + 1] = +f;
            }
            for (fe = 0, xe = 0; fe < ae; fe++) {
              for (; q[xe + 1] < fe; )
                xe++;
              D[fe] = (fe - F[xe]) * (fe - F[xe]) + C[F[xe]];
            }
          }
          _.prototype.draw = function(C) {
            this.ctx.clearRect(0, 0, this.size, this.size), this.ctx.fillText(C, this.buffer, this.middle);
            for (var D = this.ctx.getImageData(0, 0, this.size, this.size), F = new Uint8ClampedArray(this.size * this.size), q = 0; q < this.size * this.size; q++) {
              var ae = D.data[4 * q + 3] / 255;
              this.gridOuter[q] = ae === 1 ? 0 : ae === 0 ? f : Math.pow(Math.max(0, 0.5 - ae), 2), this.gridInner[q] = ae === 1 ? f : ae === 0 ? 0 : Math.pow(Math.max(0, ae - 0.5), 2);
            }
            for (b(this.gridOuter, this.size, this.size, this.f, this.d, this.v, this.z), b(this.gridInner, this.size, this.size, this.f, this.d, this.v, this.z), q = 0; q < this.size * this.size; q++) {
              var fe = this.gridOuter[q] - this.gridInner[q];
              F[q] = Math.max(0, Math.min(255, Math.round(255 - 255 * (fe / this.radius + this.cutoff))));
            }
            return F;
          }, a.default = y;
          var T = function(C, D) {
            this.requestManager = C, this.localIdeographFontFamily = D, this.entries = {};
          };
          T.prototype.setURL = function(C) {
            this.url = C;
          }, T.prototype.getGlyphs = function(C, D) {
            var F = this, q = [];
            for (var ae in C)
              for (var fe = 0, xe = C[ae]; fe < xe.length; fe += 1) {
                var ke = xe[fe];
                q.push({ stack: ae, id: ke });
              }
            e.asyncAll(q, function(Le, Ve) {
              var Je = Le.stack, at = Le.id, _t = F.entries[Je];
              _t || (_t = F.entries[Je] = { glyphs: {}, requests: {}, ranges: {} });
              var Et = _t.glyphs[at];
              if (Et === void 0) {
                if (Et = F._tinySDF(_t, Je, at))
                  return _t.glyphs[at] = Et, void Ve(null, { stack: Je, id: at, glyph: Et });
                var kt = Math.floor(at / 256);
                if (256 * kt > 65535)
                  Ve(new Error("glyphs > 65535 not supported"));
                else if (_t.ranges[kt])
                  Ve(null, { stack: Je, id: at, glyph: Et });
                else {
                  var At = _t.requests[kt];
                  At || (At = _t.requests[kt] = [], T.loadGlyphRange(Je, kt, F.url, F.requestManager, function(xt, Dt) {
                    if (Dt) {
                      for (var Ot in Dt)
                        F._doesCharSupportLocalGlyph(+Ot) || (_t.glyphs[+Ot] = Dt[+Ot]);
                      _t.ranges[kt] = !0;
                    }
                    for (var jt = 0, rr = At; jt < rr.length; jt += 1)
                      (0, rr[jt])(xt, Dt);
                    delete _t.requests[kt];
                  })), At.push(function(xt, Dt) {
                    xt ? Ve(xt) : Dt && Ve(null, { stack: Je, id: at, glyph: Dt[at] || null });
                  });
                }
              } else
                Ve(null, { stack: Je, id: at, glyph: Et });
            }, function(Le, Ve) {
              if (Le)
                D(Le);
              else if (Ve) {
                for (var Je = {}, at = 0, _t = Ve; at < _t.length; at += 1) {
                  var Et = _t[at], kt = Et.stack, At = Et.id, xt = Et.glyph;
                  (Je[kt] || (Je[kt] = {}))[At] = xt && { id: xt.id, bitmap: xt.bitmap.clone(), metrics: xt.metrics };
                }
                D(null, Je);
              }
            });
          }, T.prototype._doesCharSupportLocalGlyph = function(C) {
            return !!this.localIdeographFontFamily && (e.isChar["CJK Unified Ideographs"](C) || e.isChar["Hangul Syllables"](C) || e.isChar.Hiragana(C) || e.isChar.Katakana(C));
          }, T.prototype._tinySDF = function(C, D, F) {
            var q = this.localIdeographFontFamily;
            if (q && this._doesCharSupportLocalGlyph(F)) {
              var ae = C.tinySDF;
              if (!ae) {
                var fe = "400";
                /bold/i.test(D) ? fe = "900" : /medium/i.test(D) ? fe = "500" : /light/i.test(D) && (fe = "200"), ae = C.tinySDF = new T.TinySDF(24, 3, 8, 0.25, q, fe);
              }
              return { id: F, bitmap: new e.AlphaImage({ width: 30, height: 30 }, ae.draw(String.fromCharCode(F))), metrics: { width: 24, height: 24, left: 0, top: -8, advance: 24 } };
            }
          }, T.loadGlyphRange = function(C, D, F, q, ae) {
            var fe = 256 * D, xe = fe + 255, ke = q.transformRequest(q.normalizeGlyphsURL(F).replace("{fontstack}", C).replace("{range}", fe + "-" + xe), e.ResourceType.Glyphs);
            e.getArrayBuffer(ke, function(Le, Ve) {
              if (Le)
                ae(Le);
              else if (Ve) {
                for (var Je = {}, at = 0, _t = e.parseGlyphPBF(Ve); at < _t.length; at += 1) {
                  var Et = _t[at];
                  Je[Et.id] = Et;
                }
                ae(null, Je);
              }
            });
          }, T.TinySDF = a;
          var L = function() {
            this.specification = e.styleSpec.light.position;
          };
          L.prototype.possiblyEvaluate = function(C, D) {
            return e.sphericalToCartesian(C.expression.evaluate(D));
          }, L.prototype.interpolate = function(C, D, F) {
            return { x: e.number(C.x, D.x, F), y: e.number(C.y, D.y, F), z: e.number(C.z, D.z, F) };
          };
          var A = new e.Properties({ anchor: new e.DataConstantProperty(e.styleSpec.light.anchor), position: new L(), color: new e.DataConstantProperty(e.styleSpec.light.color), intensity: new e.DataConstantProperty(e.styleSpec.light.intensity) }), I = function(C) {
            function D(F) {
              C.call(this), this._transitionable = new e.Transitionable(A), this.setLight(F), this._transitioning = this._transitionable.untransitioned();
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getLight = function() {
              return this._transitionable.serialize();
            }, D.prototype.setLight = function(F, q) {
              if (q === void 0 && (q = {}), !this._validate(e.validateLight, F, q))
                for (var ae in F) {
                  var fe = F[ae];
                  e.endsWith(ae, "-transition") ? this._transitionable.setTransition(ae.slice(0, -11), fe) : this._transitionable.setValue(ae, fe);
                }
            }, D.prototype.updateTransitions = function(F) {
              this._transitioning = this._transitionable.transitioned(F, this._transitioning);
            }, D.prototype.hasTransition = function() {
              return this._transitioning.hasTransition();
            }, D.prototype.recalculate = function(F) {
              this.properties = this._transitioning.possiblyEvaluate(F);
            }, D.prototype._validate = function(F, q, ae) {
              return (!ae || ae.validate !== !1) && e.emitValidationErrors(this, F.call(e.validateStyle, e.extend({ value: q, style: { glyphs: !0, sprite: !0 }, styleSpec: e.styleSpec })));
            }, D;
          }(e.Evented), P = function(C, D) {
            this.width = C, this.height = D, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {};
          };
          P.prototype.getDash = function(C, D) {
            var F = C.join(",") + String(D);
            return this.dashEntry[F] || (this.dashEntry[F] = this.addDash(C, D)), this.dashEntry[F];
          }, P.prototype.getDashRanges = function(C, D, F) {
            var q = [], ae = C.length % 2 == 1 ? -C[C.length - 1] * F : 0, fe = C[0] * F, xe = !0;
            q.push({ left: ae, right: fe, isDash: xe, zeroLength: C[0] === 0 });
            for (var ke = C[0], Le = 1; Le < C.length; Le++) {
              xe = !xe;
              var Ve = C[Le];
              ae = ke * F, fe = (ke += Ve) * F, q.push({ left: ae, right: fe, isDash: xe, zeroLength: Ve === 0 });
            }
            return q;
          }, P.prototype.addRoundDash = function(C, D, F) {
            for (var q = D / 2, ae = -F; ae <= F; ae++)
              for (var fe = this.nextRow + F + ae, xe = this.width * fe, ke = 0, Le = C[ke], Ve = 0; Ve < this.width; Ve++) {
                Ve / Le.right > 1 && (Le = C[++ke]);
                var Je = Math.abs(Ve - Le.left), at = Math.abs(Ve - Le.right), _t = Math.min(Je, at), Et = void 0, kt = ae / F * (q + 1);
                if (Le.isDash) {
                  var At = q - Math.abs(kt);
                  Et = Math.sqrt(_t * _t + At * At);
                } else
                  Et = q - Math.sqrt(_t * _t + kt * kt);
                this.data[xe + Ve] = Math.max(0, Math.min(255, Et + 128));
              }
          }, P.prototype.addRegularDash = function(C) {
            for (var D = C.length - 1; D >= 0; --D) {
              var F = C[D], q = C[D + 1];
              F.zeroLength ? C.splice(D, 1) : q && q.isDash === F.isDash && (q.left = F.left, C.splice(D, 1));
            }
            var ae = C[0], fe = C[C.length - 1];
            ae.isDash === fe.isDash && (ae.left = fe.left - this.width, fe.right = ae.right + this.width);
            for (var xe = this.width * this.nextRow, ke = 0, Le = C[ke], Ve = 0; Ve < this.width; Ve++) {
              Ve / Le.right > 1 && (Le = C[++ke]);
              var Je = Math.abs(Ve - Le.left), at = Math.abs(Ve - Le.right), _t = Math.min(Je, at), Et = Le.isDash ? _t : -_t;
              this.data[xe + Ve] = Math.max(0, Math.min(255, Et + 128));
            }
          }, P.prototype.addDash = function(C, D) {
            var F = D ? 7 : 0, q = 2 * F + 1;
            if (this.nextRow + q > this.height)
              return e.warnOnce("LineAtlas out of space"), null;
            for (var ae = 0, fe = 0; fe < C.length; fe++)
              ae += C[fe];
            if (ae !== 0) {
              var xe = this.width / ae, ke = this.getDashRanges(C, this.width, xe);
              D ? this.addRoundDash(ke, xe, F) : this.addRegularDash(ke);
            }
            var Le = { y: (this.nextRow + F + 0.5) / this.height, height: 2 * F / this.height, width: ae };
            return this.nextRow += q, this.dirty = !0, Le;
          }, P.prototype.bind = function(C) {
            var D = C.gl;
            this.texture ? (D.bindTexture(D.TEXTURE_2D, this.texture), this.dirty && (this.dirty = !1, D.texSubImage2D(D.TEXTURE_2D, 0, 0, 0, this.width, this.height, D.ALPHA, D.UNSIGNED_BYTE, this.data))) : (this.texture = D.createTexture(), D.bindTexture(D.TEXTURE_2D, this.texture), D.texParameteri(D.TEXTURE_2D, D.TEXTURE_WRAP_S, D.REPEAT), D.texParameteri(D.TEXTURE_2D, D.TEXTURE_WRAP_T, D.REPEAT), D.texParameteri(D.TEXTURE_2D, D.TEXTURE_MIN_FILTER, D.LINEAR), D.texParameteri(D.TEXTURE_2D, D.TEXTURE_MAG_FILTER, D.LINEAR), D.texImage2D(D.TEXTURE_2D, 0, D.ALPHA, this.width, this.height, 0, D.ALPHA, D.UNSIGNED_BYTE, this.data));
          };
          var S = function C(D, F) {
            this.workerPool = D, this.actors = [], this.currentActor = 0, this.id = e.uniqueId();
            for (var q = this.workerPool.acquire(this.id), ae = 0; ae < q.length; ae++) {
              var fe = q[ae], xe = new C.Actor(fe, F, this.id);
              xe.name = "Worker " + ae, this.actors.push(xe);
            }
          };
          function E(C, D, F) {
            var q = function(ae, fe) {
              if (ae)
                return F(ae);
              if (fe) {
                var xe = e.pick(e.extend(fe, C), ["tiles", "minzoom", "maxzoom", "attribution", "mapbox_logo", "bounds", "scheme", "tileSize", "encoding"]);
                fe.vector_layers && (xe.vectorLayers = fe.vector_layers, xe.vectorLayerIds = xe.vectorLayers.map(function(ke) {
                  return ke.id;
                })), xe.tiles = D.canonicalizeTileset(xe, C.url), F(null, xe);
              }
            };
            return C.url ? e.getJSON(D.transformRequest(D.normalizeSourceURL(C.url), e.ResourceType.Source), q) : e.browser.frame(function() {
              return q(null, C);
            });
          }
          S.prototype.broadcast = function(C, D, F) {
            F = F || function() {
            }, e.asyncAll(this.actors, function(q, ae) {
              q.send(C, D, ae);
            }, F);
          }, S.prototype.getActor = function() {
            return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor];
          }, S.prototype.remove = function() {
            this.actors.forEach(function(C) {
              C.remove();
            }), this.actors = [], this.workerPool.release(this.id);
          }, S.Actor = e.Actor;
          var R = function(C, D, F) {
            this.bounds = e.LngLatBounds.convert(this.validateBounds(C)), this.minzoom = D || 0, this.maxzoom = F || 24;
          };
          R.prototype.validateBounds = function(C) {
            return Array.isArray(C) && C.length === 4 ? [Math.max(-180, C[0]), Math.max(-90, C[1]), Math.min(180, C[2]), Math.min(90, C[3])] : [-180, -90, 180, 90];
          }, R.prototype.contains = function(C) {
            var D = Math.pow(2, C.z), F = Math.floor(e.mercatorXfromLng(this.bounds.getWest()) * D), q = Math.floor(e.mercatorYfromLat(this.bounds.getNorth()) * D), ae = Math.ceil(e.mercatorXfromLng(this.bounds.getEast()) * D), fe = Math.ceil(e.mercatorYfromLat(this.bounds.getSouth()) * D);
            return C.x >= F && C.x < ae && C.y >= q && C.y < fe;
          };
          var z = function(C) {
            function D(F, q, ae, fe) {
              if (C.call(this), this.id = F, this.dispatcher = ae, this.type = "vector", this.minzoom = 0, this.maxzoom = 22, this.scheme = "xyz", this.tileSize = 512, this.reparseOverscaled = !0, this.isTileClipped = !0, this._loaded = !1, e.extend(this, e.pick(q, ["url", "scheme", "tileSize", "promoteId"])), this._options = e.extend({ type: "vector" }, q), this._collectResourceTiming = q.collectResourceTiming, this.tileSize !== 512)
                throw new Error("vector tile sources must have a tileSize of 512");
              this.setEventedParent(fe);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.load = function() {
              var F = this;
              this._loaded = !1, this.fire(new e.Event("dataloading", { dataType: "source" })), this._tileJSONRequest = E(this._options, this.map._requestManager, function(q, ae) {
                F._tileJSONRequest = null, F._loaded = !0, q ? F.fire(new e.ErrorEvent(q)) : ae && (e.extend(F, ae), ae.bounds && (F.tileBounds = new R(ae.bounds, F.minzoom, F.maxzoom)), e.postTurnstileEvent(ae.tiles, F.map._requestManager._customAccessToken), e.postMapLoadEvent(ae.tiles, F.map._getMapId(), F.map._requestManager._skuToken, F.map._requestManager._customAccessToken), F.fire(new e.Event("data", { dataType: "source", sourceDataType: "metadata" })), F.fire(new e.Event("data", { dataType: "source", sourceDataType: "content" })));
              });
            }, D.prototype.loaded = function() {
              return this._loaded;
            }, D.prototype.hasTile = function(F) {
              return !this.tileBounds || this.tileBounds.contains(F.canonical);
            }, D.prototype.onAdd = function(F) {
              this.map = F, this.load();
            }, D.prototype.onRemove = function() {
              this._tileJSONRequest && (this._tileJSONRequest.cancel(), this._tileJSONRequest = null);
            }, D.prototype.serialize = function() {
              return e.extend({}, this._options);
            }, D.prototype.loadTile = function(F, q) {
              var ae = this.map._requestManager.normalizeTileURL(F.tileID.canonical.url(this.tiles, this.scheme)), fe = { request: this.map._requestManager.transformRequest(ae, e.ResourceType.Tile), uid: F.uid, tileID: F.tileID, zoom: F.tileID.overscaledZ, tileSize: this.tileSize * F.tileID.overscaleFactor(), type: this.type, source: this.id, pixelRatio: e.browser.devicePixelRatio, showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
              function xe(ke, Le) {
                return delete F.request, F.aborted ? q(null) : ke && ke.status !== 404 ? q(ke) : (Le && Le.resourceTiming && (F.resourceTiming = Le.resourceTiming), this.map._refreshExpiredTiles && Le && F.setExpiryData(Le), F.loadVectorData(Le, this.map.painter), e.cacheEntryPossiblyAdded(this.dispatcher), q(null), void (F.reloadCallback && (this.loadTile(F, F.reloadCallback), F.reloadCallback = null)));
              }
              fe.request.collectResourceTiming = this._collectResourceTiming, F.actor && F.state !== "expired" ? F.state === "loading" ? F.reloadCallback = q : F.request = F.actor.send("reloadTile", fe, xe.bind(this)) : (F.actor = this.dispatcher.getActor(), F.request = F.actor.send("loadTile", fe, xe.bind(this)));
            }, D.prototype.abortTile = function(F) {
              F.request && (F.request.cancel(), delete F.request), F.actor && F.actor.send("abortTile", { uid: F.uid, type: this.type, source: this.id }, void 0);
            }, D.prototype.unloadTile = function(F) {
              F.unloadVectorData(), F.actor && F.actor.send("removeTile", { uid: F.uid, type: this.type, source: this.id }, void 0);
            }, D.prototype.hasTransition = function() {
              return !1;
            }, D;
          }(e.Evented), j = function(C) {
            function D(F, q, ae, fe) {
              C.call(this), this.id = F, this.dispatcher = ae, this.setEventedParent(fe), this.type = "raster", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = !0, this.scheme = "xyz", this.tileSize = 512, this._loaded = !1, this._options = e.extend({ type: "raster" }, q), e.extend(this, e.pick(q, ["url", "scheme", "tileSize"]));
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.load = function() {
              var F = this;
              this._loaded = !1, this.fire(new e.Event("dataloading", { dataType: "source" })), this._tileJSONRequest = E(this._options, this.map._requestManager, function(q, ae) {
                F._tileJSONRequest = null, F._loaded = !0, q ? F.fire(new e.ErrorEvent(q)) : ae && (e.extend(F, ae), ae.bounds && (F.tileBounds = new R(ae.bounds, F.minzoom, F.maxzoom)), e.postTurnstileEvent(ae.tiles), e.postMapLoadEvent(ae.tiles, F.map._getMapId(), F.map._requestManager._skuToken), F.fire(new e.Event("data", { dataType: "source", sourceDataType: "metadata" })), F.fire(new e.Event("data", { dataType: "source", sourceDataType: "content" })));
              });
            }, D.prototype.loaded = function() {
              return this._loaded;
            }, D.prototype.onAdd = function(F) {
              this.map = F, this.load();
            }, D.prototype.onRemove = function() {
              this._tileJSONRequest && (this._tileJSONRequest.cancel(), this._tileJSONRequest = null);
            }, D.prototype.serialize = function() {
              return e.extend({}, this._options);
            }, D.prototype.hasTile = function(F) {
              return !this.tileBounds || this.tileBounds.contains(F.canonical);
            }, D.prototype.loadTile = function(F, q) {
              var ae = this, fe = this.map._requestManager.normalizeTileURL(F.tileID.canonical.url(this.tiles, this.scheme), this.tileSize);
              F.request = e.getImage(this.map._requestManager.transformRequest(fe, e.ResourceType.Tile), function(xe, ke) {
                if (delete F.request, F.aborted)
                  F.state = "unloaded", q(null);
                else if (xe)
                  F.state = "errored", q(xe);
                else if (ke) {
                  ae.map._refreshExpiredTiles && F.setExpiryData(ke), delete ke.cacheControl, delete ke.expires;
                  var Le = ae.map.painter.context, Ve = Le.gl;
                  F.texture = ae.map.painter.getTileTexture(ke.width), F.texture ? F.texture.update(ke, { useMipmap: !0 }) : (F.texture = new e.Texture(Le, ke, Ve.RGBA, { useMipmap: !0 }), F.texture.bind(Ve.LINEAR, Ve.CLAMP_TO_EDGE, Ve.LINEAR_MIPMAP_NEAREST), Le.extTextureFilterAnisotropic && Ve.texParameterf(Ve.TEXTURE_2D, Le.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, Le.extTextureFilterAnisotropicMax)), F.state = "loaded", e.cacheEntryPossiblyAdded(ae.dispatcher), q(null);
                }
              });
            }, D.prototype.abortTile = function(F, q) {
              F.request && (F.request.cancel(), delete F.request), q();
            }, D.prototype.unloadTile = function(F, q) {
              F.texture && this.map.painter.saveTileTexture(F.texture), q();
            }, D.prototype.hasTransition = function() {
              return !1;
            }, D;
          }(e.Evented), H = function(C) {
            function D(F, q, ae, fe) {
              C.call(this, F, q, ae, fe), this.type = "raster-dem", this.maxzoom = 22, this._options = e.extend({ type: "raster-dem" }, q), this.encoding = q.encoding || "mapbox";
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.serialize = function() {
              return { type: "raster-dem", url: this.url, tileSize: this.tileSize, tiles: this.tiles, bounds: this.bounds, encoding: this.encoding };
            }, D.prototype.loadTile = function(F, q) {
              var ae = this.map._requestManager.normalizeTileURL(F.tileID.canonical.url(this.tiles, this.scheme), this.tileSize);
              function fe(xe, ke) {
                xe && (F.state = "errored", q(xe)), ke && (F.dem = ke, F.needsHillshadePrepare = !0, F.state = "loaded", q(null));
              }
              F.request = e.getImage(this.map._requestManager.transformRequest(ae, e.ResourceType.Tile), function(xe, ke) {
                if (delete F.request, F.aborted)
                  F.state = "unloaded", q(null);
                else if (xe)
                  F.state = "errored", q(xe);
                else if (ke) {
                  this.map._refreshExpiredTiles && F.setExpiryData(ke), delete ke.cacheControl, delete ke.expires;
                  var Le = e.window.ImageBitmap && ke instanceof e.window.ImageBitmap && e.offscreenCanvasSupported() ? ke : e.browser.getImageData(ke, 1), Ve = { uid: F.uid, coord: F.tileID, source: this.id, rawImageData: Le, encoding: this.encoding };
                  F.actor && F.state !== "expired" || (F.actor = this.dispatcher.getActor(), F.actor.send("loadDEMTile", Ve, fe.bind(this)));
                }
              }.bind(this)), F.neighboringTiles = this._getNeighboringTiles(F.tileID);
            }, D.prototype._getNeighboringTiles = function(F) {
              var q = F.canonical, ae = Math.pow(2, q.z), fe = (q.x - 1 + ae) % ae, xe = q.x === 0 ? F.wrap - 1 : F.wrap, ke = (q.x + 1 + ae) % ae, Le = q.x + 1 === ae ? F.wrap + 1 : F.wrap, Ve = {};
              return Ve[new e.OverscaledTileID(F.overscaledZ, xe, q.z, fe, q.y).key] = { backfilled: !1 }, Ve[new e.OverscaledTileID(F.overscaledZ, Le, q.z, ke, q.y).key] = { backfilled: !1 }, q.y > 0 && (Ve[new e.OverscaledTileID(F.overscaledZ, xe, q.z, fe, q.y - 1).key] = { backfilled: !1 }, Ve[new e.OverscaledTileID(F.overscaledZ, F.wrap, q.z, q.x, q.y - 1).key] = { backfilled: !1 }, Ve[new e.OverscaledTileID(F.overscaledZ, Le, q.z, ke, q.y - 1).key] = { backfilled: !1 }), q.y + 1 < ae && (Ve[new e.OverscaledTileID(F.overscaledZ, xe, q.z, fe, q.y + 1).key] = { backfilled: !1 }, Ve[new e.OverscaledTileID(F.overscaledZ, F.wrap, q.z, q.x, q.y + 1).key] = { backfilled: !1 }, Ve[new e.OverscaledTileID(F.overscaledZ, Le, q.z, ke, q.y + 1).key] = { backfilled: !1 }), Ve;
            }, D.prototype.unloadTile = function(F) {
              F.demTexture && this.map.painter.saveTileTexture(F.demTexture), F.fbo && (F.fbo.destroy(), delete F.fbo), F.dem && delete F.dem, delete F.neighboringTiles, F.state = "unloaded", F.actor && F.actor.send("removeDEMTile", { uid: F.uid, source: this.id });
            }, D;
          }(j), Y = function(C) {
            function D(F, q, ae, fe) {
              C.call(this), this.id = F, this.type = "geojson", this.minzoom = 0, this.maxzoom = 18, this.tileSize = 512, this.isTileClipped = !0, this.reparseOverscaled = !0, this._removed = !1, this._loaded = !1, this.actor = ae.getActor(), this.setEventedParent(fe), this._data = q.data, this._options = e.extend({}, q), this._collectResourceTiming = q.collectResourceTiming, this._resourceTiming = [], q.maxzoom !== void 0 && (this.maxzoom = q.maxzoom), q.type && (this.type = q.type), q.attribution && (this.attribution = q.attribution), this.promoteId = q.promoteId;
              var xe = e.EXTENT / this.tileSize;
              this.workerOptions = e.extend({ source: this.id, cluster: q.cluster || !1, geojsonVtOptions: { buffer: (q.buffer !== void 0 ? q.buffer : 128) * xe, tolerance: (q.tolerance !== void 0 ? q.tolerance : 0.375) * xe, extent: e.EXTENT, maxZoom: this.maxzoom, lineMetrics: q.lineMetrics || !1, generateId: q.generateId || !1 }, superclusterOptions: { maxZoom: q.clusterMaxZoom !== void 0 ? Math.min(q.clusterMaxZoom, this.maxzoom - 1) : this.maxzoom - 1, extent: e.EXTENT, radius: (q.clusterRadius || 50) * xe, log: !1, generateId: q.generateId || !1 }, clusterProperties: q.clusterProperties }, q.workerOptions);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.load = function() {
              var F = this;
              this.fire(new e.Event("dataloading", { dataType: "source" })), this._updateWorkerData(function(q) {
                if (q)
                  F.fire(new e.ErrorEvent(q));
                else {
                  var ae = { dataType: "source", sourceDataType: "metadata" };
                  F._collectResourceTiming && F._resourceTiming && F._resourceTiming.length > 0 && (ae.resourceTiming = F._resourceTiming, F._resourceTiming = []), F.fire(new e.Event("data", ae));
                }
              });
            }, D.prototype.onAdd = function(F) {
              this.map = F, this.load();
            }, D.prototype.setData = function(F) {
              var q = this;
              return this._data = F, this.fire(new e.Event("dataloading", { dataType: "source" })), this._updateWorkerData(function(ae) {
                if (ae)
                  q.fire(new e.ErrorEvent(ae));
                else {
                  var fe = { dataType: "source", sourceDataType: "content" };
                  q._collectResourceTiming && q._resourceTiming && q._resourceTiming.length > 0 && (fe.resourceTiming = q._resourceTiming, q._resourceTiming = []), q.fire(new e.Event("data", fe));
                }
              }), this;
            }, D.prototype.getClusterExpansionZoom = function(F, q) {
              return this.actor.send("geojson.getClusterExpansionZoom", { clusterId: F, source: this.id }, q), this;
            }, D.prototype.getClusterChildren = function(F, q) {
              return this.actor.send("geojson.getClusterChildren", { clusterId: F, source: this.id }, q), this;
            }, D.prototype.getClusterLeaves = function(F, q, ae, fe) {
              return this.actor.send("geojson.getClusterLeaves", { source: this.id, clusterId: F, limit: q, offset: ae }, fe), this;
            }, D.prototype._updateWorkerData = function(F) {
              var q = this;
              this._loaded = !1;
              var ae = e.extend({}, this.workerOptions), fe = this._data;
              typeof fe == "string" ? (ae.request = this.map._requestManager.transformRequest(e.browser.resolveURL(fe), e.ResourceType.Source), ae.request.collectResourceTiming = this._collectResourceTiming) : ae.data = JSON.stringify(fe), this.actor.send(this.type + ".loadData", ae, function(xe, ke) {
                q._removed || ke && ke.abandoned || (q._loaded = !0, ke && ke.resourceTiming && ke.resourceTiming[q.id] && (q._resourceTiming = ke.resourceTiming[q.id].slice(0)), q.actor.send(q.type + ".coalesce", { source: ae.source }, null), F(xe));
              });
            }, D.prototype.loaded = function() {
              return this._loaded;
            }, D.prototype.loadTile = function(F, q) {
              var ae = this, fe = F.actor ? "reloadTile" : "loadTile";
              F.actor = this.actor;
              var xe = { type: this.type, uid: F.uid, tileID: F.tileID, zoom: F.tileID.overscaledZ, maxZoom: this.maxzoom, tileSize: this.tileSize, source: this.id, pixelRatio: e.browser.devicePixelRatio, showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
              F.request = this.actor.send(fe, xe, function(ke, Le) {
                return delete F.request, F.unloadVectorData(), F.aborted ? q(null) : ke ? q(ke) : (F.loadVectorData(Le, ae.map.painter, fe === "reloadTile"), q(null));
              });
            }, D.prototype.abortTile = function(F) {
              F.request && (F.request.cancel(), delete F.request), F.aborted = !0;
            }, D.prototype.unloadTile = function(F) {
              F.unloadVectorData(), this.actor.send("removeTile", { uid: F.uid, type: this.type, source: this.id });
            }, D.prototype.onRemove = function() {
              this._removed = !0, this.actor.send("removeSource", { type: this.type, source: this.id });
            }, D.prototype.serialize = function() {
              return e.extend({}, this._options, { type: this.type, data: this._data });
            }, D.prototype.hasTransition = function() {
              return !1;
            }, D;
          }(e.Evented), J = e.createLayout([{ name: "a_pos", type: "Int16", components: 2 }, { name: "a_texture_pos", type: "Int16", components: 2 }]), W = function(C) {
            function D(F, q, ae, fe) {
              C.call(this), this.id = F, this.dispatcher = ae, this.coordinates = q.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(fe), this.options = q;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.load = function(F, q) {
              var ae = this;
              this._loaded = !1, this.fire(new e.Event("dataloading", { dataType: "source" })), this.url = this.options.url, e.getImage(this.map._requestManager.transformRequest(this.url, e.ResourceType.Image), function(fe, xe) {
                ae._loaded = !0, fe ? ae.fire(new e.ErrorEvent(fe)) : xe && (ae.image = xe, F && (ae.coordinates = F), q && q(), ae._finishLoading());
              });
            }, D.prototype.loaded = function() {
              return this._loaded;
            }, D.prototype.updateImage = function(F) {
              var q = this;
              return this.image && F.url ? (this.options.url = F.url, this.load(F.coordinates, function() {
                q.texture = null;
              }), this) : this;
            }, D.prototype._finishLoading = function() {
              this.map && (this.setCoordinates(this.coordinates), this.fire(new e.Event("data", { dataType: "source", sourceDataType: "metadata" })));
            }, D.prototype.onAdd = function(F) {
              this.map = F, this.load();
            }, D.prototype.setCoordinates = function(F) {
              var q = this;
              this.coordinates = F;
              var ae = F.map(e.MercatorCoordinate.fromLngLat);
              this.tileID = function(xe) {
                for (var ke = 1 / 0, Le = 1 / 0, Ve = -1 / 0, Je = -1 / 0, at = 0, _t = xe; at < _t.length; at += 1) {
                  var Et = _t[at];
                  ke = Math.min(ke, Et.x), Le = Math.min(Le, Et.y), Ve = Math.max(Ve, Et.x), Je = Math.max(Je, Et.y);
                }
                var kt = Ve - ke, At = Je - Le, xt = Math.max(kt, At), Dt = Math.max(0, Math.floor(-Math.log(xt) / Math.LN2)), Ot = Math.pow(2, Dt);
                return new e.CanonicalTileID(Dt, Math.floor((ke + Ve) / 2 * Ot), Math.floor((Le + Je) / 2 * Ot));
              }(ae), this.minzoom = this.maxzoom = this.tileID.z;
              var fe = ae.map(function(xe) {
                return q.tileID.getTilePoint(xe)._round();
              });
              return this._boundsArray = new e.StructArrayLayout4i8(), this._boundsArray.emplaceBack(fe[0].x, fe[0].y, 0, 0), this._boundsArray.emplaceBack(fe[1].x, fe[1].y, e.EXTENT, 0), this._boundsArray.emplaceBack(fe[3].x, fe[3].y, 0, e.EXTENT), this._boundsArray.emplaceBack(fe[2].x, fe[2].y, e.EXTENT, e.EXTENT), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new e.Event("data", { dataType: "source", sourceDataType: "content" })), this;
            }, D.prototype.prepare = function() {
              if (Object.keys(this.tiles).length !== 0 && this.image) {
                var F = this.map.painter.context, q = F.gl;
                for (var ae in this.boundsBuffer || (this.boundsBuffer = F.createVertexBuffer(this._boundsArray, J.members)), this.boundsSegments || (this.boundsSegments = e.SegmentVector.simpleSegment(0, 0, 4, 2)), this.texture || (this.texture = new e.Texture(F, this.image, q.RGBA), this.texture.bind(q.LINEAR, q.CLAMP_TO_EDGE)), this.tiles) {
                  var fe = this.tiles[ae];
                  fe.state !== "loaded" && (fe.state = "loaded", fe.texture = this.texture);
                }
              }
            }, D.prototype.loadTile = function(F, q) {
              this.tileID && this.tileID.equals(F.tileID.canonical) ? (this.tiles[String(F.tileID.wrap)] = F, F.buckets = {}, q(null)) : (F.state = "errored", q(null));
            }, D.prototype.serialize = function() {
              return { type: "image", url: this.options.url, coordinates: this.coordinates };
            }, D.prototype.hasTransition = function() {
              return !1;
            }, D;
          }(e.Evented), Z = function(C) {
            function D(F, q, ae, fe) {
              C.call(this, F, q, ae, fe), this.roundZoom = !0, this.type = "video", this.options = q;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.load = function() {
              var F = this;
              this._loaded = !1;
              var q = this.options;
              this.urls = [];
              for (var ae = 0, fe = q.urls; ae < fe.length; ae += 1) {
                var xe = fe[ae];
                this.urls.push(this.map._requestManager.transformRequest(xe, e.ResourceType.Source).url);
              }
              e.getVideo(this.urls, function(ke, Le) {
                F._loaded = !0, ke ? F.fire(new e.ErrorEvent(ke)) : Le && (F.video = Le, F.video.loop = !0, F.video.addEventListener("playing", function() {
                  F.map.triggerRepaint();
                }), F.map && F.video.play(), F._finishLoading());
              });
            }, D.prototype.pause = function() {
              this.video && this.video.pause();
            }, D.prototype.play = function() {
              this.video && this.video.play();
            }, D.prototype.seek = function(F) {
              if (this.video) {
                var q = this.video.seekable;
                F < q.start(0) || F > q.end(0) ? this.fire(new e.ErrorEvent(new e.ValidationError("sources." + this.id, null, "Playback for this video can be set only between the " + q.start(0) + " and " + q.end(0) + "-second mark."))) : this.video.currentTime = F;
              }
            }, D.prototype.getVideo = function() {
              return this.video;
            }, D.prototype.onAdd = function(F) {
              this.map || (this.map = F, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates)));
            }, D.prototype.prepare = function() {
              if (!(Object.keys(this.tiles).length === 0 || this.video.readyState < 2)) {
                var F = this.map.painter.context, q = F.gl;
                for (var ae in this.boundsBuffer || (this.boundsBuffer = F.createVertexBuffer(this._boundsArray, J.members)), this.boundsSegments || (this.boundsSegments = e.SegmentVector.simpleSegment(0, 0, 4, 2)), this.texture ? this.video.paused || (this.texture.bind(q.LINEAR, q.CLAMP_TO_EDGE), q.texSubImage2D(q.TEXTURE_2D, 0, 0, 0, q.RGBA, q.UNSIGNED_BYTE, this.video)) : (this.texture = new e.Texture(F, this.video, q.RGBA), this.texture.bind(q.LINEAR, q.CLAMP_TO_EDGE)), this.tiles) {
                  var fe = this.tiles[ae];
                  fe.state !== "loaded" && (fe.state = "loaded", fe.texture = this.texture);
                }
              }
            }, D.prototype.serialize = function() {
              return { type: "video", urls: this.urls, coordinates: this.coordinates };
            }, D.prototype.hasTransition = function() {
              return this.video && !this.video.paused;
            }, D;
          }(W), re = function(C) {
            function D(F, q, ae, fe) {
              C.call(this, F, q, ae, fe), q.coordinates ? Array.isArray(q.coordinates) && q.coordinates.length === 4 && !q.coordinates.some(function(xe) {
                return !Array.isArray(xe) || xe.length !== 2 || xe.some(function(ke) {
                  return typeof ke != "number";
                });
              }) || this.fire(new e.ErrorEvent(new e.ValidationError("sources." + F, null, '"coordinates" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new e.ErrorEvent(new e.ValidationError("sources." + F, null, 'missing required property "coordinates"'))), q.animate && typeof q.animate != "boolean" && this.fire(new e.ErrorEvent(new e.ValidationError("sources." + F, null, 'optional "animate" property must be a boolean value'))), q.canvas ? typeof q.canvas == "string" || q.canvas instanceof e.window.HTMLCanvasElement || this.fire(new e.ErrorEvent(new e.ValidationError("sources." + F, null, '"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))) : this.fire(new e.ErrorEvent(new e.ValidationError("sources." + F, null, 'missing required property "canvas"'))), this.options = q, this.animate = q.animate === void 0 || q.animate;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.load = function() {
              this._loaded = !0, this.canvas || (this.canvas = this.options.canvas instanceof e.window.HTMLCanvasElement ? this.options.canvas : e.window.document.getElementById(this.options.canvas)), this.width = this.canvas.width, this.height = this.canvas.height, this._hasInvalidDimensions() ? this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))) : (this.play = function() {
                this._playing = !0, this.map.triggerRepaint();
              }, this.pause = function() {
                this._playing && (this.prepare(), this._playing = !1);
              }, this._finishLoading());
            }, D.prototype.getCanvas = function() {
              return this.canvas;
            }, D.prototype.onAdd = function(F) {
              this.map = F, this.load(), this.canvas && this.animate && this.play();
            }, D.prototype.onRemove = function() {
              this.pause();
            }, D.prototype.prepare = function() {
              var F = !1;
              if (this.canvas.width !== this.width && (this.width = this.canvas.width, F = !0), this.canvas.height !== this.height && (this.height = this.canvas.height, F = !0), !this._hasInvalidDimensions() && Object.keys(this.tiles).length !== 0) {
                var q = this.map.painter.context, ae = q.gl;
                for (var fe in this.boundsBuffer || (this.boundsBuffer = q.createVertexBuffer(this._boundsArray, J.members)), this.boundsSegments || (this.boundsSegments = e.SegmentVector.simpleSegment(0, 0, 4, 2)), this.texture ? (F || this._playing) && this.texture.update(this.canvas, { premultiply: !0 }) : this.texture = new e.Texture(q, this.canvas, ae.RGBA, { premultiply: !0 }), this.tiles) {
                  var xe = this.tiles[fe];
                  xe.state !== "loaded" && (xe.state = "loaded", xe.texture = this.texture);
                }
              }
            }, D.prototype.serialize = function() {
              return { type: "canvas", coordinates: this.coordinates };
            }, D.prototype.hasTransition = function() {
              return this._playing;
            }, D.prototype._hasInvalidDimensions = function() {
              for (var F = 0, q = [this.canvas.width, this.canvas.height]; F < q.length; F += 1) {
                var ae = q[F];
                if (isNaN(ae) || ae <= 0)
                  return !0;
              }
              return !1;
            }, D;
          }(W), V = { vector: z, raster: j, "raster-dem": H, geojson: Y, video: Z, image: W, canvas: re };
          function B(C, D) {
            var F = e.identity([]);
            return e.translate(F, F, [1, 1, 0]), e.scale(F, F, [0.5 * C.width, 0.5 * C.height, 1]), e.multiply(F, F, C.calculatePosMatrix(D.toUnwrapped()));
          }
          function U(C, D, F, q, ae, fe) {
            var xe = function(At, xt, Dt) {
              if (At)
                for (var Ot = 0, jt = At; Ot < jt.length; Ot += 1) {
                  var rr = xt[jt[Ot]];
                  if (rr && rr.source === Dt && rr.type === "fill-extrusion")
                    return !0;
                }
              else
                for (var dr in xt) {
                  var Sr = xt[dr];
                  if (Sr.source === Dt && Sr.type === "fill-extrusion")
                    return !0;
                }
              return !1;
            }(ae && ae.layers, D, C.id), ke = fe.maxPitchScaleFactor(), Le = C.tilesIn(q, ke, xe);
            Le.sort(ee);
            for (var Ve = [], Je = 0, at = Le; Je < at.length; Je += 1) {
              var _t = at[Je];
              Ve.push({ wrappedTileID: _t.tileID.wrapped().key, queryResults: _t.tile.queryRenderedFeatures(D, F, C._state, _t.queryGeometry, _t.cameraQueryGeometry, _t.scale, ae, fe, ke, B(C.transform, _t.tileID)) });
            }
            var Et = function(At) {
              for (var xt = {}, Dt = {}, Ot = 0, jt = At; Ot < jt.length; Ot += 1) {
                var rr = jt[Ot], dr = rr.queryResults, Sr = rr.wrappedTileID, kr = Dt[Sr] = Dt[Sr] || {};
                for (var Jr in dr)
                  for (var Xr = dr[Jr], hn = kr[Jr] = kr[Jr] || {}, on = xt[Jr] = xt[Jr] || [], jn = 0, Wn = Xr; jn < Wn.length; jn += 1) {
                    var ua = Wn[jn];
                    hn[ua.featureIndex] || (hn[ua.featureIndex] = !0, on.push(ua));
                  }
              }
              return xt;
            }(Ve);
            for (var kt in Et)
              Et[kt].forEach(function(At) {
                var xt = At.feature, Dt = C.getFeatureState(xt.layer["source-layer"], xt.id);
                xt.source = xt.layer.source, xt.layer["source-layer"] && (xt.sourceLayer = xt.layer["source-layer"]), xt.state = Dt;
              });
            return Et;
          }
          function ee(C, D) {
            var F = C.tileID, q = D.tileID;
            return F.overscaledZ - q.overscaledZ || F.canonical.y - q.canonical.y || F.wrap - q.wrap || F.canonical.x - q.canonical.x;
          }
          var N = function(C, D) {
            this.max = C, this.onRemove = D, this.reset();
          };
          N.prototype.reset = function() {
            for (var C in this.data)
              for (var D = 0, F = this.data[C]; D < F.length; D += 1) {
                var q = F[D];
                q.timeout && clearTimeout(q.timeout), this.onRemove(q.value);
              }
            return this.data = {}, this.order = [], this;
          }, N.prototype.add = function(C, D, F) {
            var q = this, ae = C.wrapped().key;
            this.data[ae] === void 0 && (this.data[ae] = []);
            var fe = { value: D, timeout: void 0 };
            if (F !== void 0 && (fe.timeout = setTimeout(function() {
              q.remove(C, fe);
            }, F)), this.data[ae].push(fe), this.order.push(ae), this.order.length > this.max) {
              var xe = this._getAndRemoveByKey(this.order[0]);
              xe && this.onRemove(xe);
            }
            return this;
          }, N.prototype.has = function(C) {
            return C.wrapped().key in this.data;
          }, N.prototype.getAndRemove = function(C) {
            return this.has(C) ? this._getAndRemoveByKey(C.wrapped().key) : null;
          }, N.prototype._getAndRemoveByKey = function(C) {
            var D = this.data[C].shift();
            return D.timeout && clearTimeout(D.timeout), this.data[C].length === 0 && delete this.data[C], this.order.splice(this.order.indexOf(C), 1), D.value;
          }, N.prototype.getByKey = function(C) {
            var D = this.data[C];
            return D ? D[0].value : null;
          }, N.prototype.get = function(C) {
            return this.has(C) ? this.data[C.wrapped().key][0].value : null;
          }, N.prototype.remove = function(C, D) {
            if (!this.has(C))
              return this;
            var F = C.wrapped().key, q = D === void 0 ? 0 : this.data[F].indexOf(D), ae = this.data[F][q];
            return this.data[F].splice(q, 1), ae.timeout && clearTimeout(ae.timeout), this.data[F].length === 0 && delete this.data[F], this.onRemove(ae.value), this.order.splice(this.order.indexOf(F), 1), this;
          }, N.prototype.setMaxSize = function(C) {
            for (this.max = C; this.order.length > this.max; ) {
              var D = this._getAndRemoveByKey(this.order[0]);
              D && this.onRemove(D);
            }
            return this;
          }, N.prototype.filter = function(C) {
            var D = [];
            for (var F in this.data)
              for (var q = 0, ae = this.data[F]; q < ae.length; q += 1) {
                var fe = ae[q];
                C(fe.value) || D.push(fe);
              }
            for (var xe = 0, ke = D; xe < ke.length; xe += 1) {
              var Le = ke[xe];
              this.remove(Le.value.tileID, Le);
            }
          };
          var K = function(C, D, F) {
            this.context = C;
            var q = C.gl;
            this.buffer = q.createBuffer(), this.dynamicDraw = Boolean(F), this.context.unbindVAO(), C.bindElementBuffer.set(this.buffer), q.bufferData(q.ELEMENT_ARRAY_BUFFER, D.arrayBuffer, this.dynamicDraw ? q.DYNAMIC_DRAW : q.STATIC_DRAW), this.dynamicDraw || delete D.arrayBuffer;
          };
          K.prototype.bind = function() {
            this.context.bindElementBuffer.set(this.buffer);
          }, K.prototype.updateData = function(C) {
            var D = this.context.gl;
            this.context.unbindVAO(), this.bind(), D.bufferSubData(D.ELEMENT_ARRAY_BUFFER, 0, C.arrayBuffer);
          }, K.prototype.destroy = function() {
            var C = this.context.gl;
            this.buffer && (C.deleteBuffer(this.buffer), delete this.buffer);
          };
          var X = { Int8: "BYTE", Uint8: "UNSIGNED_BYTE", Int16: "SHORT", Uint16: "UNSIGNED_SHORT", Int32: "INT", Uint32: "UNSIGNED_INT", Float32: "FLOAT" }, te = function(C, D, F, q) {
            this.length = D.length, this.attributes = F, this.itemSize = D.bytesPerElement, this.dynamicDraw = q, this.context = C;
            var ae = C.gl;
            this.buffer = ae.createBuffer(), C.bindVertexBuffer.set(this.buffer), ae.bufferData(ae.ARRAY_BUFFER, D.arrayBuffer, this.dynamicDraw ? ae.DYNAMIC_DRAW : ae.STATIC_DRAW), this.dynamicDraw || delete D.arrayBuffer;
          };
          te.prototype.bind = function() {
            this.context.bindVertexBuffer.set(this.buffer);
          }, te.prototype.updateData = function(C) {
            var D = this.context.gl;
            this.bind(), D.bufferSubData(D.ARRAY_BUFFER, 0, C.arrayBuffer);
          }, te.prototype.enableAttributes = function(C, D) {
            for (var F = 0; F < this.attributes.length; F++) {
              var q = this.attributes[F], ae = D.attributes[q.name];
              ae !== void 0 && C.enableVertexAttribArray(ae);
            }
          }, te.prototype.setVertexAttribPointers = function(C, D, F) {
            for (var q = 0; q < this.attributes.length; q++) {
              var ae = this.attributes[q], fe = D.attributes[ae.name];
              fe !== void 0 && C.vertexAttribPointer(fe, ae.components, C[X[ae.type]], !1, this.itemSize, ae.offset + this.itemSize * (F || 0));
            }
          }, te.prototype.destroy = function() {
            var C = this.context.gl;
            this.buffer && (C.deleteBuffer(this.buffer), delete this.buffer);
          };
          var ie = function(C) {
            this.gl = C.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1;
          };
          ie.prototype.get = function() {
            return this.current;
          }, ie.prototype.set = function(C) {
          }, ie.prototype.getDefault = function() {
            return this.default;
          }, ie.prototype.setDefault = function() {
            this.set(this.default);
          };
          var le = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return e.Color.transparent;
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F.r !== q.r || F.g !== q.g || F.b !== q.b || F.a !== q.a || this.dirty) && (this.gl.clearColor(F.r, F.g, F.b, F.a), this.current = F, this.dirty = !1);
            }, D;
          }(ie), oe = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return 1;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.clearDepth(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), ve = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return 0;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.clearStencil(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), ue = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return [!0, !0, !0, !0];
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F[0] !== q[0] || F[1] !== q[1] || F[2] !== q[2] || F[3] !== q[3] || this.dirty) && (this.gl.colorMask(F[0], F[1], F[2], F[3]), this.current = F, this.dirty = !1);
            }, D;
          }(ie), ye = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !0;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.depthMask(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Ae = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return 255;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.stencilMask(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), pe = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return { func: this.gl.ALWAYS, ref: 0, mask: 255 };
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F.func !== q.func || F.ref !== q.ref || F.mask !== q.mask || this.dirty) && (this.gl.stencilFunc(F.func, F.ref, F.mask), this.current = F, this.dirty = !1);
            }, D;
          }(ie), ge = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              var F = this.gl;
              return [F.KEEP, F.KEEP, F.KEEP];
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F[0] !== q[0] || F[1] !== q[1] || F[2] !== q[2] || this.dirty) && (this.gl.stencilOp(F[0], F[1], F[2]), this.current = F, this.dirty = !1);
            }, D;
          }(ie), we = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !1;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                F ? q.enable(q.STENCIL_TEST) : q.disable(q.STENCIL_TEST), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), se = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return [0, 1];
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F[0] !== q[0] || F[1] !== q[1] || this.dirty) && (this.gl.depthRange(F[0], F[1]), this.current = F, this.dirty = !1);
            }, D;
          }(ie), de = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !1;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                F ? q.enable(q.DEPTH_TEST) : q.disable(q.DEPTH_TEST), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), Te = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return this.gl.LESS;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.depthFunc(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Ee = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !1;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                F ? q.enable(q.BLEND) : q.disable(q.BLEND), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), Me = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              var F = this.gl;
              return [F.ONE, F.ZERO];
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F[0] !== q[0] || F[1] !== q[1] || this.dirty) && (this.gl.blendFunc(F[0], F[1]), this.current = F, this.dirty = !1);
            }, D;
          }(ie), ze = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return e.Color.transparent;
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F.r !== q.r || F.g !== q.g || F.b !== q.b || F.a !== q.a || this.dirty) && (this.gl.blendColor(F.r, F.g, F.b, F.a), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Ie = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return this.gl.FUNC_ADD;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.blendEquation(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Oe = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !1;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                F ? q.enable(q.CULL_FACE) : q.disable(q.CULL_FACE), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), Ze = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return this.gl.BACK;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.cullFace(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Fe = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return this.gl.CCW;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.frontFace(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Pe = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.useProgram(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), De = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return this.gl.TEXTURE0;
            }, D.prototype.set = function(F) {
              (F !== this.current || this.dirty) && (this.gl.activeTexture(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Ge = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              var F = this.gl;
              return [0, 0, F.drawingBufferWidth, F.drawingBufferHeight];
            }, D.prototype.set = function(F) {
              var q = this.current;
              (F[0] !== q[0] || F[1] !== q[1] || F[2] !== q[2] || F[3] !== q[3] || this.dirty) && (this.gl.viewport(F[0], F[1], F[2], F[3]), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Qe = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.bindFramebuffer(q.FRAMEBUFFER, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), ot = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.bindRenderbuffer(q.RENDERBUFFER, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), vt = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.bindTexture(q.TEXTURE_2D, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), bt = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.bindBuffer(q.ARRAY_BUFFER, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), yt = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              var q = this.gl;
              q.bindBuffer(q.ELEMENT_ARRAY_BUFFER, F), this.current = F, this.dirty = !1;
            }, D;
          }(ie), tt = function(C) {
            function D(F) {
              C.call(this, F), this.vao = F.extVertexArrayObject;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D.prototype.set = function(F) {
              this.vao && (F !== this.current || this.dirty) && (this.vao.bindVertexArrayOES(F), this.current = F, this.dirty = !1);
            }, D;
          }(ie), Ke = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return 4;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.pixelStorei(q.UNPACK_ALIGNMENT, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), mt = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !1;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), Ft = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return !1;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                var q = this.gl;
                q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(ie), Vt = function(C) {
            function D(F, q) {
              C.call(this, F), this.context = F, this.parent = q;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getDefault = function() {
              return null;
            }, D;
          }(ie), Xt = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.setDirty = function() {
              this.dirty = !0;
            }, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                this.context.bindFramebuffer.set(this.parent);
                var q = this.gl;
                q.framebufferTexture2D(q.FRAMEBUFFER, q.COLOR_ATTACHMENT0, q.TEXTURE_2D, F, 0), this.current = F, this.dirty = !1;
              }
            }, D;
          }(Vt), Gt = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.set = function(F) {
              if (F !== this.current || this.dirty) {
                this.context.bindFramebuffer.set(this.parent);
                var q = this.gl;
                q.framebufferRenderbuffer(q.FRAMEBUFFER, q.DEPTH_ATTACHMENT, q.RENDERBUFFER, F), this.current = F, this.dirty = !1;
              }
            }, D;
          }(Vt), nr = function(C, D, F, q) {
            this.context = C, this.width = D, this.height = F;
            var ae = C.gl, fe = this.framebuffer = ae.createFramebuffer();
            this.colorAttachment = new Xt(C, fe), q && (this.depthAttachment = new Gt(C, fe));
          };
          nr.prototype.destroy = function() {
            var C = this.context.gl, D = this.colorAttachment.get();
            if (D && C.deleteTexture(D), this.depthAttachment) {
              var F = this.depthAttachment.get();
              F && C.deleteRenderbuffer(F);
            }
            C.deleteFramebuffer(this.framebuffer);
          };
          var It = function(C, D, F) {
            this.func = C, this.mask = D, this.range = F;
          };
          It.ReadOnly = !1, It.ReadWrite = !0, It.disabled = new It(519, It.ReadOnly, [0, 1]);
          var Be = function(C, D, F, q, ae, fe) {
            this.test = C, this.ref = D, this.mask = F, this.fail = q, this.depthFail = ae, this.pass = fe;
          };
          Be.disabled = new Be({ func: 519, mask: 0 }, 0, 0, 7680, 7680, 7680);
          var He = function(C, D, F) {
            this.blendFunction = C, this.blendColor = D, this.mask = F;
          };
          He.disabled = new He(He.Replace = [1, 0], e.Color.transparent, [!1, !1, !1, !1]), He.unblended = new He(He.Replace, e.Color.transparent, [!0, !0, !0, !0]), He.alphaBlended = new He([1, 771], e.Color.transparent, [!0, !0, !0, !0]);
          var he = function(C, D, F) {
            this.enable = C, this.mode = D, this.frontFace = F;
          };
          he.disabled = new he(!1, 1029, 2305), he.backCCW = new he(!0, 1029, 2305);
          var be = function(C) {
            this.gl = C, this.extVertexArrayObject = this.gl.getExtension("OES_vertex_array_object"), this.clearColor = new le(this), this.clearDepth = new oe(this), this.clearStencil = new ve(this), this.colorMask = new ue(this), this.depthMask = new ye(this), this.stencilMask = new Ae(this), this.stencilFunc = new pe(this), this.stencilOp = new ge(this), this.stencilTest = new we(this), this.depthRange = new se(this), this.depthTest = new de(this), this.depthFunc = new Te(this), this.blend = new Ee(this), this.blendFunc = new Me(this), this.blendColor = new ze(this), this.blendEquation = new Ie(this), this.cullFace = new Oe(this), this.cullFaceSide = new Ze(this), this.frontFace = new Fe(this), this.program = new Pe(this), this.activeTexture = new De(this), this.viewport = new Ge(this), this.bindFramebuffer = new Qe(this), this.bindRenderbuffer = new ot(this), this.bindTexture = new vt(this), this.bindVertexBuffer = new bt(this), this.bindElementBuffer = new yt(this), this.bindVertexArrayOES = this.extVertexArrayObject && new tt(this), this.pixelStoreUnpack = new Ke(this), this.pixelStoreUnpackPremultiplyAlpha = new mt(this), this.pixelStoreUnpackFlipY = new Ft(this), this.extTextureFilterAnisotropic = C.getExtension("EXT_texture_filter_anisotropic") || C.getExtension("MOZ_EXT_texture_filter_anisotropic") || C.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = C.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.extTextureHalfFloat = C.getExtension("OES_texture_half_float"), this.extTextureHalfFloat && (C.getExtension("OES_texture_half_float_linear"), this.extRenderToTextureHalfFloat = C.getExtension("EXT_color_buffer_half_float")), this.extTimerQuery = C.getExtension("EXT_disjoint_timer_query");
          };
          be.prototype.setDefault = function() {
            this.unbindVAO(), this.clearColor.setDefault(), this.clearDepth.setDefault(), this.clearStencil.setDefault(), this.colorMask.setDefault(), this.depthMask.setDefault(), this.stencilMask.setDefault(), this.stencilFunc.setDefault(), this.stencilOp.setDefault(), this.stencilTest.setDefault(), this.depthRange.setDefault(), this.depthTest.setDefault(), this.depthFunc.setDefault(), this.blend.setDefault(), this.blendFunc.setDefault(), this.blendColor.setDefault(), this.blendEquation.setDefault(), this.cullFace.setDefault(), this.cullFaceSide.setDefault(), this.frontFace.setDefault(), this.program.setDefault(), this.activeTexture.setDefault(), this.bindFramebuffer.setDefault(), this.pixelStoreUnpack.setDefault(), this.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.pixelStoreUnpackFlipY.setDefault();
          }, be.prototype.setDirty = function() {
            this.clearColor.dirty = !0, this.clearDepth.dirty = !0, this.clearStencil.dirty = !0, this.colorMask.dirty = !0, this.depthMask.dirty = !0, this.stencilMask.dirty = !0, this.stencilFunc.dirty = !0, this.stencilOp.dirty = !0, this.stencilTest.dirty = !0, this.depthRange.dirty = !0, this.depthTest.dirty = !0, this.depthFunc.dirty = !0, this.blend.dirty = !0, this.blendFunc.dirty = !0, this.blendColor.dirty = !0, this.blendEquation.dirty = !0, this.cullFace.dirty = !0, this.cullFaceSide.dirty = !0, this.frontFace.dirty = !0, this.program.dirty = !0, this.activeTexture.dirty = !0, this.viewport.dirty = !0, this.bindFramebuffer.dirty = !0, this.bindRenderbuffer.dirty = !0, this.bindTexture.dirty = !0, this.bindVertexBuffer.dirty = !0, this.bindElementBuffer.dirty = !0, this.extVertexArrayObject && (this.bindVertexArrayOES.dirty = !0), this.pixelStoreUnpack.dirty = !0, this.pixelStoreUnpackPremultiplyAlpha.dirty = !0, this.pixelStoreUnpackFlipY.dirty = !0;
          }, be.prototype.createIndexBuffer = function(C, D) {
            return new K(this, C, D);
          }, be.prototype.createVertexBuffer = function(C, D, F) {
            return new te(this, C, D, F);
          }, be.prototype.createRenderbuffer = function(C, D, F) {
            var q = this.gl, ae = q.createRenderbuffer();
            return this.bindRenderbuffer.set(ae), q.renderbufferStorage(q.RENDERBUFFER, C, D, F), this.bindRenderbuffer.set(null), ae;
          }, be.prototype.createFramebuffer = function(C, D, F) {
            return new nr(this, C, D, F);
          }, be.prototype.clear = function(C) {
            var D = C.color, F = C.depth, q = this.gl, ae = 0;
            D && (ae |= q.COLOR_BUFFER_BIT, this.clearColor.set(D), this.colorMask.set([!0, !0, !0, !0])), F !== void 0 && (ae |= q.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(F), this.depthMask.set(!0)), q.clear(ae);
          }, be.prototype.setCullFace = function(C) {
            C.enable === !1 ? this.cullFace.set(!1) : (this.cullFace.set(!0), this.cullFaceSide.set(C.mode), this.frontFace.set(C.frontFace));
          }, be.prototype.setDepthMode = function(C) {
            C.func !== this.gl.ALWAYS || C.mask ? (this.depthTest.set(!0), this.depthFunc.set(C.func), this.depthMask.set(C.mask), this.depthRange.set(C.range)) : this.depthTest.set(!1);
          }, be.prototype.setStencilMode = function(C) {
            C.test.func !== this.gl.ALWAYS || C.mask ? (this.stencilTest.set(!0), this.stencilMask.set(C.mask), this.stencilOp.set([C.fail, C.depthFail, C.pass]), this.stencilFunc.set({ func: C.test.func, ref: C.ref, mask: C.test.mask })) : this.stencilTest.set(!1);
          }, be.prototype.setColorMode = function(C) {
            e.deepEqual(C.blendFunction, He.Replace) ? this.blend.set(!1) : (this.blend.set(!0), this.blendFunc.set(C.blendFunction), this.blendColor.set(C.blendColor)), this.colorMask.set(C.mask);
          }, be.prototype.unbindVAO = function() {
            this.extVertexArrayObject && this.bindVertexArrayOES.set(null);
          };
          var Re = function(C) {
            function D(F, q, ae) {
              var fe = this;
              C.call(this), this.id = F, this.dispatcher = ae, this.on("data", function(xe) {
                xe.dataType === "source" && xe.sourceDataType === "metadata" && (fe._sourceLoaded = !0), fe._sourceLoaded && !fe._paused && xe.dataType === "source" && xe.sourceDataType === "content" && (fe.reload(), fe.transform && fe.update(fe.transform));
              }), this.on("error", function() {
                fe._sourceErrored = !0;
              }), this._source = function(xe, ke, Le, Ve) {
                var Je = new V[ke.type](xe, ke, Le, Ve);
                if (Je.id !== xe)
                  throw new Error("Expected Source id to be " + xe + " instead of " + Je.id);
                return e.bindAll(["load", "abort", "unload", "serialize", "prepare"], Je), Je;
              }(F, q, ae, this), this._tiles = {}, this._cache = new N(0, this._unloadTile.bind(this)), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new e.SourceFeatureState();
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.onAdd = function(F) {
              this.map = F, this._maxTileCacheSize = F ? F._maxTileCacheSize : null, this._source && this._source.onAdd && this._source.onAdd(F);
            }, D.prototype.onRemove = function(F) {
              this._source && this._source.onRemove && this._source.onRemove(F);
            }, D.prototype.loaded = function() {
              if (this._sourceErrored)
                return !0;
              if (!this._sourceLoaded || !this._source.loaded())
                return !1;
              for (var F in this._tiles) {
                var q = this._tiles[F];
                if (q.state !== "loaded" && q.state !== "errored")
                  return !1;
              }
              return !0;
            }, D.prototype.getSource = function() {
              return this._source;
            }, D.prototype.pause = function() {
              this._paused = !0;
            }, D.prototype.resume = function() {
              if (this._paused) {
                var F = this._shouldReloadOnResume;
                this._paused = !1, this._shouldReloadOnResume = !1, F && this.reload(), this.transform && this.update(this.transform);
              }
            }, D.prototype._loadTile = function(F, q) {
              return this._source.loadTile(F, q);
            }, D.prototype._unloadTile = function(F) {
              if (this._source.unloadTile)
                return this._source.unloadTile(F, function() {
                });
            }, D.prototype._abortTile = function(F) {
              if (this._source.abortTile)
                return this._source.abortTile(F, function() {
                });
            }, D.prototype.serialize = function() {
              return this._source.serialize();
            }, D.prototype.prepare = function(F) {
              for (var q in this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._tiles, this.map ? this.map.painter : null), this._tiles) {
                var ae = this._tiles[q];
                ae.upload(F), ae.prepare(this.map.style.imageManager);
              }
            }, D.prototype.getIds = function() {
              return e.values(this._tiles).map(function(F) {
                return F.tileID;
              }).sort(Ue).map(function(F) {
                return F.key;
              });
            }, D.prototype.getRenderableIds = function(F) {
              var q = this, ae = [];
              for (var fe in this._tiles)
                this._isIdRenderable(fe, F) && ae.push(this._tiles[fe]);
              return F ? ae.sort(function(xe, ke) {
                var Le = xe.tileID, Ve = ke.tileID, Je = new e.Point(Le.canonical.x, Le.canonical.y)._rotate(q.transform.angle), at = new e.Point(Ve.canonical.x, Ve.canonical.y)._rotate(q.transform.angle);
                return Le.overscaledZ - Ve.overscaledZ || at.y - Je.y || at.x - Je.x;
              }).map(function(xe) {
                return xe.tileID.key;
              }) : ae.map(function(xe) {
                return xe.tileID;
              }).sort(Ue).map(function(xe) {
                return xe.key;
              });
            }, D.prototype.hasRenderableParent = function(F) {
              var q = this.findLoadedParent(F, 0);
              return !!q && this._isIdRenderable(q.tileID.key);
            }, D.prototype._isIdRenderable = function(F, q) {
              return this._tiles[F] && this._tiles[F].hasData() && !this._coveredTiles[F] && (q || !this._tiles[F].holdingForFade());
            }, D.prototype.reload = function() {
              if (this._paused)
                this._shouldReloadOnResume = !0;
              else
                for (var F in this._cache.reset(), this._tiles)
                  this._tiles[F].state !== "errored" && this._reloadTile(F, "reloading");
            }, D.prototype._reloadTile = function(F, q) {
              var ae = this._tiles[F];
              ae && (ae.state !== "loading" && (ae.state = q), this._loadTile(ae, this._tileLoaded.bind(this, ae, F, q)));
            }, D.prototype._tileLoaded = function(F, q, ae, fe) {
              if (fe)
                return F.state = "errored", void (fe.status !== 404 ? this._source.fire(new e.ErrorEvent(fe, { tile: F })) : this.update(this.transform));
              F.timeAdded = e.browser.now(), ae === "expired" && (F.refreshedUponExpiration = !0), this._setTileReloadTimer(q, F), this.getSource().type === "raster-dem" && F.dem && this._backfillDEM(F), this._state.initializeTileState(F, this.map ? this.map.painter : null), this._source.fire(new e.Event("data", { dataType: "source", tile: F, coord: F.tileID }));
            }, D.prototype._backfillDEM = function(F) {
              for (var q = this.getRenderableIds(), ae = 0; ae < q.length; ae++) {
                var fe = q[ae];
                if (F.neighboringTiles && F.neighboringTiles[fe]) {
                  var xe = this.getTileByID(fe);
                  ke(F, xe), ke(xe, F);
                }
              }
              function ke(Le, Ve) {
                Le.needsHillshadePrepare = !0;
                var Je = Ve.tileID.canonical.x - Le.tileID.canonical.x, at = Ve.tileID.canonical.y - Le.tileID.canonical.y, _t = Math.pow(2, Le.tileID.canonical.z), Et = Ve.tileID.key;
                Je === 0 && at === 0 || Math.abs(at) > 1 || (Math.abs(Je) > 1 && (Math.abs(Je + _t) === 1 ? Je += _t : Math.abs(Je - _t) === 1 && (Je -= _t)), Ve.dem && Le.dem && (Le.dem.backfillBorder(Ve.dem, Je, at), Le.neighboringTiles && Le.neighboringTiles[Et] && (Le.neighboringTiles[Et].backfilled = !0)));
              }
            }, D.prototype.getTile = function(F) {
              return this.getTileByID(F.key);
            }, D.prototype.getTileByID = function(F) {
              return this._tiles[F];
            }, D.prototype._retainLoadedChildren = function(F, q, ae, fe) {
              for (var xe in this._tiles) {
                var ke = this._tiles[xe];
                if (!(fe[xe] || !ke.hasData() || ke.tileID.overscaledZ <= q || ke.tileID.overscaledZ > ae)) {
                  for (var Le = ke.tileID; ke && ke.tileID.overscaledZ > q + 1; ) {
                    var Ve = ke.tileID.scaledTo(ke.tileID.overscaledZ - 1);
                    (ke = this._tiles[Ve.key]) && ke.hasData() && (Le = Ve);
                  }
                  for (var Je = Le; Je.overscaledZ > q; )
                    if (F[(Je = Je.scaledTo(Je.overscaledZ - 1)).key]) {
                      fe[Le.key] = Le;
                      break;
                    }
                }
              }
            }, D.prototype.findLoadedParent = function(F, q) {
              if (F.key in this._loadedParentTiles) {
                var ae = this._loadedParentTiles[F.key];
                return ae && ae.tileID.overscaledZ >= q ? ae : null;
              }
              for (var fe = F.overscaledZ - 1; fe >= q; fe--) {
                var xe = F.scaledTo(fe), ke = this._getLoadedTile(xe);
                if (ke)
                  return ke;
              }
            }, D.prototype._getLoadedTile = function(F) {
              var q = this._tiles[F.key];
              return q && q.hasData() ? q : this._cache.getByKey(F.wrapped().key);
            }, D.prototype.updateCacheSize = function(F) {
              var q = (Math.ceil(F.width / this._source.tileSize) + 1) * (Math.ceil(F.height / this._source.tileSize) + 1), ae = Math.floor(5 * q), fe = typeof this._maxTileCacheSize == "number" ? Math.min(this._maxTileCacheSize, ae) : ae;
              this._cache.setMaxSize(fe);
            }, D.prototype.handleWrapJump = function(F) {
              var q = (F - (this._prevLng === void 0 ? F : this._prevLng)) / 360, ae = Math.round(q);
              if (this._prevLng = F, ae) {
                var fe = {};
                for (var xe in this._tiles) {
                  var ke = this._tiles[xe];
                  ke.tileID = ke.tileID.unwrapTo(ke.tileID.wrap + ae), fe[ke.tileID.key] = ke;
                }
                for (var Le in this._tiles = fe, this._timers)
                  clearTimeout(this._timers[Le]), delete this._timers[Le];
                for (var Ve in this._tiles) {
                  var Je = this._tiles[Ve];
                  this._setTileReloadTimer(Ve, Je);
                }
              }
            }, D.prototype.update = function(F) {
              var q = this;
              if (this.transform = F, this._sourceLoaded && !this._paused) {
                var ae;
                this.updateCacheSize(F), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used ? this._source.tileID ? ae = F.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(kr) {
                  return new e.OverscaledTileID(kr.canonical.z, kr.wrap, kr.canonical.z, kr.canonical.x, kr.canonical.y);
                }) : (ae = F.coveringTiles({ tileSize: this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled }), this._source.hasTile && (ae = ae.filter(function(kr) {
                  return q._source.hasTile(kr);
                }))) : ae = [];
                var fe = F.coveringZoomLevel(this._source), xe = Math.max(fe - D.maxOverzooming, this._source.minzoom), ke = Math.max(fe + D.maxUnderzooming, this._source.minzoom), Le = this._updateRetainedTiles(ae, fe);
                if (Xe(this._source.type)) {
                  for (var Ve = {}, Je = {}, at = 0, _t = Object.keys(Le); at < _t.length; at += 1) {
                    var Et = _t[at], kt = Le[Et], At = this._tiles[Et];
                    if (At && !(At.fadeEndTime && At.fadeEndTime <= e.browser.now())) {
                      var xt = this.findLoadedParent(kt, xe);
                      xt && (this._addTile(xt.tileID), Ve[xt.tileID.key] = xt.tileID), Je[Et] = kt;
                    }
                  }
                  for (var Dt in this._retainLoadedChildren(Je, fe, ke, Le), Ve)
                    Le[Dt] || (this._coveredTiles[Dt] = !0, Le[Dt] = Ve[Dt]);
                }
                for (var Ot in Le)
                  this._tiles[Ot].clearFadeHold();
                for (var jt = 0, rr = e.keysDifference(this._tiles, Le); jt < rr.length; jt += 1) {
                  var dr = rr[jt], Sr = this._tiles[dr];
                  Sr.hasSymbolBuckets && !Sr.holdingForFade() ? Sr.setHoldDuration(this.map._fadeDuration) : Sr.hasSymbolBuckets && !Sr.symbolFadeFinished() || this._removeTile(dr);
                }
                this._updateLoadedParentTileCache();
              }
            }, D.prototype.releaseSymbolFadeTiles = function() {
              for (var F in this._tiles)
                this._tiles[F].holdingForFade() && this._removeTile(F);
            }, D.prototype._updateRetainedTiles = function(F, q) {
              for (var ae = {}, fe = {}, xe = Math.max(q - D.maxOverzooming, this._source.minzoom), ke = Math.max(q + D.maxUnderzooming, this._source.minzoom), Le = {}, Ve = 0, Je = F; Ve < Je.length; Ve += 1) {
                var at = Je[Ve], _t = this._addTile(at);
                ae[at.key] = at, _t.hasData() || q < this._source.maxzoom && (Le[at.key] = at);
              }
              this._retainLoadedChildren(Le, q, ke, ae);
              for (var Et = 0, kt = F; Et < kt.length; Et += 1) {
                var At = kt[Et], xt = this._tiles[At.key];
                if (!xt.hasData()) {
                  if (q + 1 > this._source.maxzoom) {
                    var Dt = At.children(this._source.maxzoom)[0], Ot = this.getTile(Dt);
                    if (Ot && Ot.hasData()) {
                      ae[Dt.key] = Dt;
                      continue;
                    }
                  } else {
                    var jt = At.children(this._source.maxzoom);
                    if (ae[jt[0].key] && ae[jt[1].key] && ae[jt[2].key] && ae[jt[3].key])
                      continue;
                  }
                  for (var rr = xt.wasRequested(), dr = At.overscaledZ - 1; dr >= xe; --dr) {
                    var Sr = At.scaledTo(dr);
                    if (fe[Sr.key] || (fe[Sr.key] = !0, !(xt = this.getTile(Sr)) && rr && (xt = this._addTile(Sr)), xt && (ae[Sr.key] = Sr, rr = xt.wasRequested(), xt.hasData())))
                      break;
                  }
                }
              }
              return ae;
            }, D.prototype._updateLoadedParentTileCache = function() {
              for (var F in this._loadedParentTiles = {}, this._tiles) {
                for (var q = [], ae = void 0, fe = this._tiles[F].tileID; fe.overscaledZ > 0; ) {
                  if (fe.key in this._loadedParentTiles) {
                    ae = this._loadedParentTiles[fe.key];
                    break;
                  }
                  q.push(fe.key);
                  var xe = fe.scaledTo(fe.overscaledZ - 1);
                  if (ae = this._getLoadedTile(xe))
                    break;
                  fe = xe;
                }
                for (var ke = 0, Le = q; ke < Le.length; ke += 1) {
                  var Ve = Le[ke];
                  this._loadedParentTiles[Ve] = ae;
                }
              }
            }, D.prototype._addTile = function(F) {
              var q = this._tiles[F.key];
              if (q)
                return q;
              (q = this._cache.getAndRemove(F)) && (this._setTileReloadTimer(F.key, q), q.tileID = F, this._state.initializeTileState(q, this.map ? this.map.painter : null), this._cacheTimers[F.key] && (clearTimeout(this._cacheTimers[F.key]), delete this._cacheTimers[F.key], this._setTileReloadTimer(F.key, q)));
              var ae = Boolean(q);
              return ae || (q = new e.Tile(F, this._source.tileSize * F.overscaleFactor()), this._loadTile(q, this._tileLoaded.bind(this, q, F.key, q.state))), q ? (q.uses++, this._tiles[F.key] = q, ae || this._source.fire(new e.Event("dataloading", { tile: q, coord: q.tileID, dataType: "source" })), q) : null;
            }, D.prototype._setTileReloadTimer = function(F, q) {
              var ae = this;
              F in this._timers && (clearTimeout(this._timers[F]), delete this._timers[F]);
              var fe = q.getExpiryTimeout();
              fe && (this._timers[F] = setTimeout(function() {
                ae._reloadTile(F, "expired"), delete ae._timers[F];
              }, fe));
            }, D.prototype._removeTile = function(F) {
              var q = this._tiles[F];
              q && (q.uses--, delete this._tiles[F], this._timers[F] && (clearTimeout(this._timers[F]), delete this._timers[F]), q.uses > 0 || (q.hasData() && q.state !== "reloading" ? this._cache.add(q.tileID, q, q.getExpiryTimeout()) : (q.aborted = !0, this._abortTile(q), this._unloadTile(q))));
            }, D.prototype.clearTiles = function() {
              for (var F in this._shouldReloadOnResume = !1, this._paused = !1, this._tiles)
                this._removeTile(F);
              this._cache.reset();
            }, D.prototype.tilesIn = function(F, q, ae) {
              var fe = this, xe = [], ke = this.transform;
              if (!ke)
                return xe;
              for (var Le = ae ? ke.getCameraQueryGeometry(F) : F, Ve = F.map(function(dr) {
                return ke.pointCoordinate(dr);
              }), Je = Le.map(function(dr) {
                return ke.pointCoordinate(dr);
              }), at = this.getIds(), _t = 1 / 0, Et = 1 / 0, kt = -1 / 0, At = -1 / 0, xt = 0, Dt = Je; xt < Dt.length; xt += 1) {
                var Ot = Dt[xt];
                _t = Math.min(_t, Ot.x), Et = Math.min(Et, Ot.y), kt = Math.max(kt, Ot.x), At = Math.max(At, Ot.y);
              }
              for (var jt = function(dr) {
                var Sr = fe._tiles[at[dr]];
                if (!Sr.holdingForFade()) {
                  var kr = Sr.tileID, Jr = Math.pow(2, ke.zoom - Sr.tileID.overscaledZ), Xr = q * Sr.queryPadding * e.EXTENT / Sr.tileSize / Jr, hn = [kr.getTilePoint(new e.MercatorCoordinate(_t, Et)), kr.getTilePoint(new e.MercatorCoordinate(kt, At))];
                  if (hn[0].x - Xr < e.EXTENT && hn[0].y - Xr < e.EXTENT && hn[1].x + Xr >= 0 && hn[1].y + Xr >= 0) {
                    var on = Ve.map(function(Wn) {
                      return kr.getTilePoint(Wn);
                    }), jn = Je.map(function(Wn) {
                      return kr.getTilePoint(Wn);
                    });
                    xe.push({ tile: Sr, tileID: kr, queryGeometry: on, cameraQueryGeometry: jn, scale: Jr });
                  }
                }
              }, rr = 0; rr < at.length; rr++)
                jt(rr);
              return xe;
            }, D.prototype.getVisibleCoordinates = function(F) {
              for (var q = this, ae = this.getRenderableIds(F).map(function(Le) {
                return q._tiles[Le].tileID;
              }), fe = 0, xe = ae; fe < xe.length; fe += 1) {
                var ke = xe[fe];
                ke.posMatrix = this.transform.calculatePosMatrix(ke.toUnwrapped());
              }
              return ae;
            }, D.prototype.hasTransition = function() {
              if (this._source.hasTransition())
                return !0;
              if (Xe(this._source.type))
                for (var F in this._tiles) {
                  var q = this._tiles[F];
                  if (q.fadeEndTime !== void 0 && q.fadeEndTime >= e.browser.now())
                    return !0;
                }
              return !1;
            }, D.prototype.setFeatureState = function(F, q, ae) {
              F = F || "_geojsonTileLayer", this._state.updateState(F, q, ae);
            }, D.prototype.removeFeatureState = function(F, q, ae) {
              F = F || "_geojsonTileLayer", this._state.removeFeatureState(F, q, ae);
            }, D.prototype.getFeatureState = function(F, q) {
              return F = F || "_geojsonTileLayer", this._state.getState(F, q);
            }, D.prototype.setDependencies = function(F, q, ae) {
              var fe = this._tiles[F];
              fe && fe.setDependencies(q, ae);
            }, D.prototype.reloadTilesForDependencies = function(F, q) {
              for (var ae in this._tiles)
                this._tiles[ae].hasDependency(F, q) && this._reloadTile(ae, "reloading");
              this._cache.filter(function(fe) {
                return !fe.hasDependency(F, q);
              });
            }, D;
          }(e.Evented);
          function Ue(C, D) {
            var F = Math.abs(2 * C.wrap) - +(C.wrap < 0), q = Math.abs(2 * D.wrap) - +(D.wrap < 0);
            return C.overscaledZ - D.overscaledZ || q - F || D.canonical.y - C.canonical.y || D.canonical.x - C.canonical.x;
          }
          function Xe(C) {
            return C === "raster" || C === "image" || C === "video";
          }
          function qe() {
            return new e.window.Worker(ce.workerUrl);
          }
          Re.maxOverzooming = 10, Re.maxUnderzooming = 3;
          var st = "mapboxgl_preloaded_worker_pool", it = function() {
            this.active = {};
          };
          it.prototype.acquire = function(C) {
            if (!this.workers)
              for (this.workers = []; this.workers.length < it.workerCount; )
                this.workers.push(new qe());
            return this.active[C] = !0, this.workers.slice();
          }, it.prototype.release = function(C) {
            delete this.active[C], this.numActive() === 0 && (this.workers.forEach(function(D) {
              D.terminate();
            }), this.workers = null);
          }, it.prototype.isPreloaded = function() {
            return !!this.active[st];
          }, it.prototype.numActive = function() {
            return Object.keys(this.active).length;
          };
          var Tt, Pt = Math.floor(e.browser.hardwareConcurrency / 2);
          function rt() {
            return Tt || (Tt = new it()), Tt;
          }
          function ut(C, D) {
            var F = {};
            for (var q in C)
              q !== "ref" && (F[q] = C[q]);
            return e.refProperties.forEach(function(ae) {
              ae in D && (F[ae] = D[ae]);
            }), F;
          }
          function Bt(C) {
            C = C.slice();
            for (var D = /* @__PURE__ */ Object.create(null), F = 0; F < C.length; F++)
              D[C[F].id] = C[F];
            for (var q = 0; q < C.length; q++)
              "ref" in C[q] && (C[q] = ut(C[q], D[C[q].ref]));
            return C;
          }
          it.workerCount = Math.max(Math.min(Pt, 6), 1);
          var wt = { setStyle: "setStyle", addLayer: "addLayer", removeLayer: "removeLayer", setPaintProperty: "setPaintProperty", setLayoutProperty: "setLayoutProperty", setFilter: "setFilter", addSource: "addSource", removeSource: "removeSource", setGeoJSONSourceData: "setGeoJSONSourceData", setLayerZoomRange: "setLayerZoomRange", setLayerProperty: "setLayerProperty", setCenter: "setCenter", setZoom: "setZoom", setBearing: "setBearing", setPitch: "setPitch", setSprite: "setSprite", setGlyphs: "setGlyphs", setTransition: "setTransition", setLight: "setLight" };
          function Lt(C, D, F) {
            F.push({ command: wt.addSource, args: [C, D[C]] });
          }
          function Se(C, D, F) {
            D.push({ command: wt.removeSource, args: [C] }), F[C] = !0;
          }
          function We(C, D, F, q) {
            Se(C, F, q), Lt(C, D, F);
          }
          function nt(C, D, F) {
            var q;
            for (q in C[F])
              if (C[F].hasOwnProperty(q) && q !== "data" && !e.deepEqual(C[F][q], D[F][q]))
                return !1;
            for (q in D[F])
              if (D[F].hasOwnProperty(q) && q !== "data" && !e.deepEqual(C[F][q], D[F][q]))
                return !1;
            return !0;
          }
          function ft(C, D, F, q, ae, fe) {
            var xe;
            for (xe in D = D || {}, C = C || {})
              C.hasOwnProperty(xe) && (e.deepEqual(C[xe], D[xe]) || F.push({ command: fe, args: [q, xe, D[xe], ae] }));
            for (xe in D)
              D.hasOwnProperty(xe) && !C.hasOwnProperty(xe) && (e.deepEqual(C[xe], D[xe]) || F.push({ command: fe, args: [q, xe, D[xe], ae] }));
          }
          function Mt(C) {
            return C.id;
          }
          function Nt(C, D) {
            return C[D.id] = D, C;
          }
          function Zt(C, D) {
            if (!C)
              return [{ command: wt.setStyle, args: [D] }];
            var F = [];
            try {
              if (!e.deepEqual(C.version, D.version))
                return [{ command: wt.setStyle, args: [D] }];
              e.deepEqual(C.center, D.center) || F.push({ command: wt.setCenter, args: [D.center] }), e.deepEqual(C.zoom, D.zoom) || F.push({ command: wt.setZoom, args: [D.zoom] }), e.deepEqual(C.bearing, D.bearing) || F.push({ command: wt.setBearing, args: [D.bearing] }), e.deepEqual(C.pitch, D.pitch) || F.push({ command: wt.setPitch, args: [D.pitch] }), e.deepEqual(C.sprite, D.sprite) || F.push({ command: wt.setSprite, args: [D.sprite] }), e.deepEqual(C.glyphs, D.glyphs) || F.push({ command: wt.setGlyphs, args: [D.glyphs] }), e.deepEqual(C.transition, D.transition) || F.push({ command: wt.setTransition, args: [D.transition] }), e.deepEqual(C.light, D.light) || F.push({ command: wt.setLight, args: [D.light] });
              var q = {}, ae = [];
              (function(xe, ke, Le, Ve) {
                var Je;
                for (Je in ke = ke || {}, xe = xe || {})
                  xe.hasOwnProperty(Je) && (ke.hasOwnProperty(Je) || Se(Je, Le, Ve));
                for (Je in ke)
                  ke.hasOwnProperty(Je) && (xe.hasOwnProperty(Je) ? e.deepEqual(xe[Je], ke[Je]) || (xe[Je].type === "geojson" && ke[Je].type === "geojson" && nt(xe, ke, Je) ? Le.push({ command: wt.setGeoJSONSourceData, args: [Je, ke[Je].data] }) : We(Je, ke, Le, Ve)) : Lt(Je, ke, Le));
              })(C.sources, D.sources, ae, q);
              var fe = [];
              C.layers && C.layers.forEach(function(xe) {
                q[xe.source] ? F.push({ command: wt.removeLayer, args: [xe.id] }) : fe.push(xe);
              }), F = F.concat(ae), function(xe, ke, Le) {
                ke = ke || [];
                var Ve, Je, at, _t, Et, kt, At, xt = (xe = xe || []).map(Mt), Dt = ke.map(Mt), Ot = xe.reduce(Nt, {}), jt = ke.reduce(Nt, {}), rr = xt.slice(), dr = /* @__PURE__ */ Object.create(null);
                for (Ve = 0, Je = 0; Ve < xt.length; Ve++)
                  at = xt[Ve], jt.hasOwnProperty(at) ? Je++ : (Le.push({ command: wt.removeLayer, args: [at] }), rr.splice(rr.indexOf(at, Je), 1));
                for (Ve = 0, Je = 0; Ve < Dt.length; Ve++)
                  at = Dt[Dt.length - 1 - Ve], rr[rr.length - 1 - Ve] !== at && (Ot.hasOwnProperty(at) ? (Le.push({ command: wt.removeLayer, args: [at] }), rr.splice(rr.lastIndexOf(at, rr.length - Je), 1)) : Je++, kt = rr[rr.length - Ve], Le.push({ command: wt.addLayer, args: [jt[at], kt] }), rr.splice(rr.length - Ve, 0, at), dr[at] = !0);
                for (Ve = 0; Ve < Dt.length; Ve++)
                  if (_t = Ot[at = Dt[Ve]], Et = jt[at], !dr[at] && !e.deepEqual(_t, Et))
                    if (e.deepEqual(_t.source, Et.source) && e.deepEqual(_t["source-layer"], Et["source-layer"]) && e.deepEqual(_t.type, Et.type)) {
                      for (At in ft(_t.layout, Et.layout, Le, at, null, wt.setLayoutProperty), ft(_t.paint, Et.paint, Le, at, null, wt.setPaintProperty), e.deepEqual(_t.filter, Et.filter) || Le.push({ command: wt.setFilter, args: [at, Et.filter] }), e.deepEqual(_t.minzoom, Et.minzoom) && e.deepEqual(_t.maxzoom, Et.maxzoom) || Le.push({ command: wt.setLayerZoomRange, args: [at, Et.minzoom, Et.maxzoom] }), _t)
                        _t.hasOwnProperty(At) && At !== "layout" && At !== "paint" && At !== "filter" && At !== "metadata" && At !== "minzoom" && At !== "maxzoom" && (At.indexOf("paint.") === 0 ? ft(_t[At], Et[At], Le, at, At.slice(6), wt.setPaintProperty) : e.deepEqual(_t[At], Et[At]) || Le.push({ command: wt.setLayerProperty, args: [at, At, Et[At]] }));
                      for (At in Et)
                        Et.hasOwnProperty(At) && !_t.hasOwnProperty(At) && At !== "layout" && At !== "paint" && At !== "filter" && At !== "metadata" && At !== "minzoom" && At !== "maxzoom" && (At.indexOf("paint.") === 0 ? ft(_t[At], Et[At], Le, at, At.slice(6), wt.setPaintProperty) : e.deepEqual(_t[At], Et[At]) || Le.push({ command: wt.setLayerProperty, args: [at, At, Et[At]] }));
                    } else
                      Le.push({ command: wt.removeLayer, args: [at] }), kt = rr[rr.lastIndexOf(at) + 1], Le.push({ command: wt.addLayer, args: [Et, kt] });
              }(fe, D.layers, F);
            } catch (xe) {
              console.warn("Unable to compute style diff:", xe), F = [{ command: wt.setStyle, args: [D] }];
            }
            return F;
          }
          var Ut = function(C, D) {
            this.reset(C, D);
          };
          Ut.prototype.reset = function(C, D) {
            this.points = C || [], this._distances = [0];
            for (var F = 1; F < this.points.length; F++)
              this._distances[F] = this._distances[F - 1] + this.points[F].dist(this.points[F - 1]);
            this.length = this._distances[this._distances.length - 1], this.padding = Math.min(D || 0, 0.5 * this.length), this.paddedLength = this.length - 2 * this.padding;
          }, Ut.prototype.lerp = function(C) {
            if (this.points.length === 1)
              return this.points[0];
            C = e.clamp(C, 0, 1);
            for (var D = 1, F = this._distances[D], q = C * this.paddedLength + this.padding; F < q && D < this._distances.length; )
              F = this._distances[++D];
            var ae = D - 1, fe = this._distances[ae], xe = F - fe, ke = xe > 0 ? (q - fe) / xe : 0;
            return this.points[ae].mult(1 - ke).add(this.points[D].mult(ke));
          };
          var fr = function(C, D, F) {
            var q = this.boxCells = [], ae = this.circleCells = [];
            this.xCellCount = Math.ceil(C / F), this.yCellCount = Math.ceil(D / F);
            for (var fe = 0; fe < this.xCellCount * this.yCellCount; fe++)
              q.push([]), ae.push([]);
            this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = C, this.height = D, this.xScale = this.xCellCount / C, this.yScale = this.yCellCount / D, this.boxUid = 0, this.circleUid = 0;
          };
          function Tr(C, D, F, q, ae) {
            var fe = e.create();
            return D ? (e.scale(fe, fe, [1 / ae, 1 / ae, 1]), F || e.rotateZ(fe, fe, q.angle)) : e.multiply(fe, q.labelPlaneMatrix, C), fe;
          }
          function ur(C, D, F, q, ae) {
            if (D) {
              var fe = e.clone(C);
              return e.scale(fe, fe, [ae, ae, 1]), F || e.rotateZ(fe, fe, -q.angle), fe;
            }
            return q.glCoordMatrix;
          }
          function Kt(C, D) {
            var F = [C.x, C.y, 0, 1];
            Dn(F, F, D);
            var q = F[3];
            return { point: new e.Point(F[0] / q, F[1] / q), signedDistanceFromCamera: q };
          }
          function $t(C, D) {
            return 0.5 + C / D * 0.5;
          }
          function er(C, D) {
            var F = C[0] / C[3], q = C[1] / C[3];
            return F >= -D[0] && F <= D[0] && q >= -D[1] && q <= D[1];
          }
          function cr(C, D, F, q, ae, fe, xe, ke) {
            var Le = q ? C.textSizeData : C.iconSizeData, Ve = e.evaluateSizeForZoom(Le, F.transform.zoom), Je = [256 / F.width * 2 + 1, 256 / F.height * 2 + 1], at = q ? C.text.dynamicLayoutVertexArray : C.icon.dynamicLayoutVertexArray;
            at.clear();
            for (var _t = C.lineVertexArray, Et = q ? C.text.placedSymbolArray : C.icon.placedSymbolArray, kt = F.transform.width / F.transform.height, At = !1, xt = 0; xt < Et.length; xt++) {
              var Dt = Et.get(xt);
              if (Dt.hidden || Dt.writingMode === e.WritingMode.vertical && !At)
                $r(Dt.numGlyphs, at);
              else {
                At = !1;
                var Ot = [Dt.anchorX, Dt.anchorY, 0, 1];
                if (e.transformMat4(Ot, Ot, D), er(Ot, Je)) {
                  var jt = Ot[3], rr = $t(F.transform.cameraToCenterDistance, jt), dr = e.evaluateSizeForFeature(Le, Ve, Dt), Sr = xe ? dr / rr : dr * rr, kr = new e.Point(Dt.anchorX, Dt.anchorY), Jr = Kt(kr, ae).point, Xr = {}, hn = Ir(Dt, Sr, !1, ke, D, ae, fe, C.glyphOffsetArray, _t, at, Jr, kr, Xr, kt);
                  At = hn.useVertical, (hn.notEnoughRoom || At || hn.needsFlipping && Ir(Dt, Sr, !0, ke, D, ae, fe, C.glyphOffsetArray, _t, at, Jr, kr, Xr, kt).notEnoughRoom) && $r(Dt.numGlyphs, at);
                } else
                  $r(Dt.numGlyphs, at);
              }
            }
            q ? C.text.dynamicLayoutVertexBuffer.updateData(at) : C.icon.dynamicLayoutVertexBuffer.updateData(at);
          }
          function gr(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je) {
            var at = ke.glyphStartIndex + ke.numGlyphs, _t = ke.lineStartIndex, Et = ke.lineStartIndex + ke.lineLength, kt = D.getoffsetX(ke.glyphStartIndex), At = D.getoffsetX(at - 1), xt = Gr(C * kt, F, q, ae, fe, xe, ke.segment, _t, Et, Le, Ve, Je);
            if (!xt)
              return null;
            var Dt = Gr(C * At, F, q, ae, fe, xe, ke.segment, _t, Et, Le, Ve, Je);
            return Dt ? { first: xt, last: Dt } : null;
          }
          function Mr(C, D, F, q) {
            return C === e.WritingMode.horizontal && Math.abs(F.y - D.y) > Math.abs(F.x - D.x) * q ? { useVertical: !0 } : (C === e.WritingMode.vertical ? D.y < F.y : D.x > F.x) ? { needsFlipping: !0 } : null;
          }
          function Ir(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je, at, _t, Et) {
            var kt, At = D / 24, xt = C.lineOffsetX * At, Dt = C.lineOffsetY * At;
            if (C.numGlyphs > 1) {
              var Ot = C.glyphStartIndex + C.numGlyphs, jt = C.lineStartIndex, rr = C.lineStartIndex + C.lineLength, dr = gr(At, ke, xt, Dt, F, Je, at, C, Le, fe, _t);
              if (!dr)
                return { notEnoughRoom: !0 };
              var Sr = Kt(dr.first.point, xe).point, kr = Kt(dr.last.point, xe).point;
              if (q && !F) {
                var Jr = Mr(C.writingMode, Sr, kr, Et);
                if (Jr)
                  return Jr;
              }
              kt = [dr.first];
              for (var Xr = C.glyphStartIndex + 1; Xr < Ot - 1; Xr++)
                kt.push(Gr(At * ke.getoffsetX(Xr), xt, Dt, F, Je, at, C.segment, jt, rr, Le, fe, _t));
              kt.push(dr.last);
            } else {
              if (q && !F) {
                var hn = Kt(at, ae).point, on = C.lineStartIndex + C.segment + 1, jn = new e.Point(Le.getx(on), Le.gety(on)), Wn = Kt(jn, ae), ua = Wn.signedDistanceFromCamera > 0 ? Wn.point : Fr(at, jn, hn, 1, ae), qr = Mr(C.writingMode, hn, ua, Et);
                if (qr)
                  return qr;
              }
              var Mn = Gr(At * ke.getoffsetX(C.glyphStartIndex), xt, Dt, F, Je, at, C.segment, C.lineStartIndex, C.lineStartIndex + C.lineLength, Le, fe, _t);
              if (!Mn)
                return { notEnoughRoom: !0 };
              kt = [Mn];
            }
            for (var Zn = 0, qn = kt; Zn < qn.length; Zn += 1) {
              var na = qn[Zn];
              e.addDynamicAttributes(Ve, na.point, na.angle);
            }
            return {};
          }
          function Fr(C, D, F, q, ae) {
            var fe = Kt(C.add(C.sub(D)._unit()), ae).point, xe = F.sub(fe);
            return F.add(xe._mult(q / xe.mag()));
          }
          function Gr(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je, at) {
            var _t = q ? C - D : C + D, Et = _t > 0 ? 1 : -1, kt = 0;
            q && (Et *= -1, kt = Math.PI), Et < 0 && (kt += Math.PI);
            for (var At = Et > 0 ? ke + xe : ke + xe + 1, xt = ae, Dt = ae, Ot = 0, jt = 0, rr = Math.abs(_t), dr = []; Ot + jt <= rr; ) {
              if ((At += Et) < ke || At >= Le)
                return null;
              if (Dt = xt, dr.push(xt), (xt = at[At]) === void 0) {
                var Sr = new e.Point(Ve.getx(At), Ve.gety(At)), kr = Kt(Sr, Je);
                if (kr.signedDistanceFromCamera > 0)
                  xt = at[At] = kr.point;
                else {
                  var Jr = At - Et;
                  xt = Fr(Ot === 0 ? fe : new e.Point(Ve.getx(Jr), Ve.gety(Jr)), Sr, Dt, rr - Ot + 1, Je);
                }
              }
              Ot += jt, jt = Dt.dist(xt);
            }
            var Xr = (rr - Ot) / jt, hn = xt.sub(Dt), on = hn.mult(Xr)._add(Dt);
            on._add(hn._unit()._perp()._mult(F * Et));
            var jn = kt + Math.atan2(xt.y - Dt.y, xt.x - Dt.x);
            return dr.push(on), { point: on, angle: jn, path: dr };
          }
          fr.prototype.keysLength = function() {
            return this.boxKeys.length + this.circleKeys.length;
          }, fr.prototype.insert = function(C, D, F, q, ae) {
            this._forEachCell(D, F, q, ae, this._insertBoxCell, this.boxUid++), this.boxKeys.push(C), this.bboxes.push(D), this.bboxes.push(F), this.bboxes.push(q), this.bboxes.push(ae);
          }, fr.prototype.insertCircle = function(C, D, F, q) {
            this._forEachCell(D - q, F - q, D + q, F + q, this._insertCircleCell, this.circleUid++), this.circleKeys.push(C), this.circles.push(D), this.circles.push(F), this.circles.push(q);
          }, fr.prototype._insertBoxCell = function(C, D, F, q, ae, fe) {
            this.boxCells[ae].push(fe);
          }, fr.prototype._insertCircleCell = function(C, D, F, q, ae, fe) {
            this.circleCells[ae].push(fe);
          }, fr.prototype._query = function(C, D, F, q, ae, fe) {
            if (F < 0 || C > this.width || q < 0 || D > this.height)
              return !ae && [];
            var xe = [];
            if (C <= 0 && D <= 0 && this.width <= F && this.height <= q) {
              if (ae)
                return !0;
              for (var ke = 0; ke < this.boxKeys.length; ke++)
                xe.push({ key: this.boxKeys[ke], x1: this.bboxes[4 * ke], y1: this.bboxes[4 * ke + 1], x2: this.bboxes[4 * ke + 2], y2: this.bboxes[4 * ke + 3] });
              for (var Le = 0; Le < this.circleKeys.length; Le++) {
                var Ve = this.circles[3 * Le], Je = this.circles[3 * Le + 1], at = this.circles[3 * Le + 2];
                xe.push({ key: this.circleKeys[Le], x1: Ve - at, y1: Je - at, x2: Ve + at, y2: Je + at });
              }
              return fe ? xe.filter(fe) : xe;
            }
            var _t = { hitTest: ae, seenUids: { box: {}, circle: {} } };
            return this._forEachCell(C, D, F, q, this._queryCell, xe, _t, fe), ae ? xe.length > 0 : xe;
          }, fr.prototype._queryCircle = function(C, D, F, q, ae) {
            var fe = C - F, xe = C + F, ke = D - F, Le = D + F;
            if (xe < 0 || fe > this.width || Le < 0 || ke > this.height)
              return !q && [];
            var Ve = [], Je = { hitTest: q, circle: { x: C, y: D, radius: F }, seenUids: { box: {}, circle: {} } };
            return this._forEachCell(fe, ke, xe, Le, this._queryCellCircle, Ve, Je, ae), q ? Ve.length > 0 : Ve;
          }, fr.prototype.query = function(C, D, F, q, ae) {
            return this._query(C, D, F, q, !1, ae);
          }, fr.prototype.hitTest = function(C, D, F, q, ae) {
            return this._query(C, D, F, q, !0, ae);
          }, fr.prototype.hitTestCircle = function(C, D, F, q) {
            return this._queryCircle(C, D, F, !0, q);
          }, fr.prototype._queryCell = function(C, D, F, q, ae, fe, xe, ke) {
            var Le = xe.seenUids, Ve = this.boxCells[ae];
            if (Ve !== null)
              for (var Je = this.bboxes, at = 0, _t = Ve; at < _t.length; at += 1) {
                var Et = _t[at];
                if (!Le.box[Et]) {
                  Le.box[Et] = !0;
                  var kt = 4 * Et;
                  if (C <= Je[kt + 2] && D <= Je[kt + 3] && F >= Je[kt + 0] && q >= Je[kt + 1] && (!ke || ke(this.boxKeys[Et]))) {
                    if (xe.hitTest)
                      return fe.push(!0), !0;
                    fe.push({ key: this.boxKeys[Et], x1: Je[kt], y1: Je[kt + 1], x2: Je[kt + 2], y2: Je[kt + 3] });
                  }
                }
              }
            var At = this.circleCells[ae];
            if (At !== null)
              for (var xt = this.circles, Dt = 0, Ot = At; Dt < Ot.length; Dt += 1) {
                var jt = Ot[Dt];
                if (!Le.circle[jt]) {
                  Le.circle[jt] = !0;
                  var rr = 3 * jt;
                  if (this._circleAndRectCollide(xt[rr], xt[rr + 1], xt[rr + 2], C, D, F, q) && (!ke || ke(this.circleKeys[jt]))) {
                    if (xe.hitTest)
                      return fe.push(!0), !0;
                    var dr = xt[rr], Sr = xt[rr + 1], kr = xt[rr + 2];
                    fe.push({ key: this.circleKeys[jt], x1: dr - kr, y1: Sr - kr, x2: dr + kr, y2: Sr + kr });
                  }
                }
              }
          }, fr.prototype._queryCellCircle = function(C, D, F, q, ae, fe, xe, ke) {
            var Le = xe.circle, Ve = xe.seenUids, Je = this.boxCells[ae];
            if (Je !== null)
              for (var at = this.bboxes, _t = 0, Et = Je; _t < Et.length; _t += 1) {
                var kt = Et[_t];
                if (!Ve.box[kt]) {
                  Ve.box[kt] = !0;
                  var At = 4 * kt;
                  if (this._circleAndRectCollide(Le.x, Le.y, Le.radius, at[At + 0], at[At + 1], at[At + 2], at[At + 3]) && (!ke || ke(this.boxKeys[kt])))
                    return fe.push(!0), !0;
                }
              }
            var xt = this.circleCells[ae];
            if (xt !== null)
              for (var Dt = this.circles, Ot = 0, jt = xt; Ot < jt.length; Ot += 1) {
                var rr = jt[Ot];
                if (!Ve.circle[rr]) {
                  Ve.circle[rr] = !0;
                  var dr = 3 * rr;
                  if (this._circlesCollide(Dt[dr], Dt[dr + 1], Dt[dr + 2], Le.x, Le.y, Le.radius) && (!ke || ke(this.circleKeys[rr])))
                    return fe.push(!0), !0;
                }
              }
          }, fr.prototype._forEachCell = function(C, D, F, q, ae, fe, xe, ke) {
            for (var Le = this._convertToXCellCoord(C), Ve = this._convertToYCellCoord(D), Je = this._convertToXCellCoord(F), at = this._convertToYCellCoord(q), _t = Le; _t <= Je; _t++)
              for (var Et = Ve; Et <= at; Et++) {
                var kt = this.xCellCount * Et + _t;
                if (ae.call(this, C, D, F, q, kt, fe, xe, ke))
                  return;
              }
          }, fr.prototype._convertToXCellCoord = function(C) {
            return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(C * this.xScale)));
          }, fr.prototype._convertToYCellCoord = function(C) {
            return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(C * this.yScale)));
          }, fr.prototype._circlesCollide = function(C, D, F, q, ae, fe) {
            var xe = q - C, ke = ae - D, Le = F + fe;
            return Le * Le > xe * xe + ke * ke;
          }, fr.prototype._circleAndRectCollide = function(C, D, F, q, ae, fe, xe) {
            var ke = (fe - q) / 2, Le = Math.abs(C - (q + ke));
            if (Le > ke + F)
              return !1;
            var Ve = (xe - ae) / 2, Je = Math.abs(D - (ae + Ve));
            if (Je > Ve + F)
              return !1;
            if (Le <= ke || Je <= Ve)
              return !0;
            var at = Le - ke, _t = Je - Ve;
            return at * at + _t * _t <= F * F;
          };
          var un = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
          function $r(C, D) {
            for (var F = 0; F < C; F++) {
              var q = D.length;
              D.resize(q + 4), D.float32.set(un, 3 * q);
            }
          }
          function Dn(C, D, F) {
            var q = D[0], ae = D[1];
            return C[0] = F[0] * q + F[4] * ae + F[12], C[1] = F[1] * q + F[5] * ae + F[13], C[3] = F[3] * q + F[7] * ae + F[15], C;
          }
          var rn = function(C, D, F) {
            D === void 0 && (D = new fr(C.width + 200, C.height + 200, 25)), F === void 0 && (F = new fr(C.width + 200, C.height + 200, 25)), this.transform = C, this.grid = D, this.ignoredGrid = F, this.pitchfactor = Math.cos(C._pitch) * C.cameraToCenterDistance, this.screenRightBoundary = C.width + 100, this.screenBottomBoundary = C.height + 100, this.gridRightBoundary = C.width + 200, this.gridBottomBoundary = C.height + 200;
          };
          function vn(C, D, F) {
            return D * (e.EXTENT / (C.tileSize * Math.pow(2, F - C.tileID.overscaledZ)));
          }
          rn.prototype.placeCollisionBox = function(C, D, F, q, ae) {
            var fe = this.projectAndGetPerspectiveRatio(q, C.anchorPointX, C.anchorPointY), xe = F * fe.perspectiveRatio, ke = C.x1 * xe + fe.point.x, Le = C.y1 * xe + fe.point.y, Ve = C.x2 * xe + fe.point.x, Je = C.y2 * xe + fe.point.y;
            return !this.isInsideGrid(ke, Le, Ve, Je) || !D && this.grid.hitTest(ke, Le, Ve, Je, ae) ? { box: [], offscreen: !1 } : { box: [ke, Le, Ve, Je], offscreen: this.isOffscreen(ke, Le, Ve, Je) };
          }, rn.prototype.placeCollisionCircles = function(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je, at, _t) {
            var Et = [], kt = new e.Point(D.anchorX, D.anchorY), At = Kt(kt, fe), xt = $t(this.transform.cameraToCenterDistance, At.signedDistanceFromCamera), Dt = (Ve ? ae / xt : ae * xt) / e.ONE_EM, Ot = Kt(kt, xe).point, jt = gr(Dt, q, D.lineOffsetX * Dt, D.lineOffsetY * Dt, !1, Ot, kt, D, F, xe, {}), rr = !1, dr = !1, Sr = !0;
            if (jt) {
              for (var kr = 0.5 * at * xt + _t, Jr = new e.Point(-100, -100), Xr = new e.Point(this.screenRightBoundary, this.screenBottomBoundary), hn = new Ut(), on = jt.first, jn = jt.last, Wn = [], ua = on.path.length - 1; ua >= 1; ua--)
                Wn.push(on.path[ua]);
              for (var qr = 1; qr < jn.path.length; qr++)
                Wn.push(jn.path[qr]);
              var Mn = 2.5 * kr;
              if (ke) {
                var Zn = Wn.map(function(yo) {
                  return Kt(yo, ke);
                });
                Wn = Zn.some(function(yo) {
                  return yo.signedDistanceFromCamera <= 0;
                }) ? [] : Zn.map(function(yo) {
                  return yo.point;
                });
              }
              var qn = [];
              if (Wn.length > 0) {
                for (var na = Wn[0].clone(), ha = Wn[0].clone(), Sa = 1; Sa < Wn.length; Sa++)
                  na.x = Math.min(na.x, Wn[Sa].x), na.y = Math.min(na.y, Wn[Sa].y), ha.x = Math.max(ha.x, Wn[Sa].x), ha.y = Math.max(ha.y, Wn[Sa].y);
                qn = na.x >= Jr.x && ha.x <= Xr.x && na.y >= Jr.y && ha.y <= Xr.y ? [Wn] : ha.x < Jr.x || na.x > Xr.x || ha.y < Jr.y || na.y > Xr.y ? [] : e.clipLine([Wn], Jr.x, Jr.y, Xr.x, Xr.y);
              }
              for (var Qn = 0, xa = qn; Qn < xa.length; Qn += 1) {
                var ga = xa[Qn];
                hn.reset(ga, 0.25 * kr);
                var Ca = 0;
                Ca = hn.length <= 0.5 * kr ? 1 : Math.ceil(hn.paddedLength / Mn) + 1;
                for (var ba = 0; ba < Ca; ba++) {
                  var Pa = ba / Math.max(Ca - 1, 1), Ua = hn.lerp(Pa), ci = Ua.x + 100, Ci = Ua.y + 100;
                  Et.push(ci, Ci, kr, 0);
                  var Pi = ci - kr, li = Ci - kr, Ti = ci + kr, mi = Ci + kr;
                  if (Sr = Sr && this.isOffscreen(Pi, li, Ti, mi), dr = dr || this.isInsideGrid(Pi, li, Ti, mi), !C && this.grid.hitTestCircle(ci, Ci, kr, Je) && (rr = !0, !Le))
                    return { circles: [], offscreen: !1, collisionDetected: rr };
                }
              }
            }
            return { circles: !Le && rr || !dr ? [] : Et, offscreen: Sr, collisionDetected: rr };
          }, rn.prototype.queryRenderedSymbols = function(C) {
            if (C.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0)
              return {};
            for (var D = [], F = 1 / 0, q = 1 / 0, ae = -1 / 0, fe = -1 / 0, xe = 0, ke = C; xe < ke.length; xe += 1) {
              var Le = ke[xe], Ve = new e.Point(Le.x + 100, Le.y + 100);
              F = Math.min(F, Ve.x), q = Math.min(q, Ve.y), ae = Math.max(ae, Ve.x), fe = Math.max(fe, Ve.y), D.push(Ve);
            }
            for (var Je = {}, at = {}, _t = 0, Et = this.grid.query(F, q, ae, fe).concat(this.ignoredGrid.query(F, q, ae, fe)); _t < Et.length; _t += 1) {
              var kt = Et[_t], At = kt.key;
              if (Je[At.bucketInstanceId] === void 0 && (Je[At.bucketInstanceId] = {}), !Je[At.bucketInstanceId][At.featureIndex]) {
                var xt = [new e.Point(kt.x1, kt.y1), new e.Point(kt.x2, kt.y1), new e.Point(kt.x2, kt.y2), new e.Point(kt.x1, kt.y2)];
                e.polygonIntersectsPolygon(D, xt) && (Je[At.bucketInstanceId][At.featureIndex] = !0, at[At.bucketInstanceId] === void 0 && (at[At.bucketInstanceId] = []), at[At.bucketInstanceId].push(At.featureIndex));
              }
            }
            return at;
          }, rn.prototype.insertCollisionBox = function(C, D, F, q, ae) {
            var fe = { bucketInstanceId: F, featureIndex: q, collisionGroupID: ae };
            (D ? this.ignoredGrid : this.grid).insert(fe, C[0], C[1], C[2], C[3]);
          }, rn.prototype.insertCollisionCircles = function(C, D, F, q, ae) {
            for (var fe = D ? this.ignoredGrid : this.grid, xe = { bucketInstanceId: F, featureIndex: q, collisionGroupID: ae }, ke = 0; ke < C.length; ke += 4)
              fe.insertCircle(xe, C[ke], C[ke + 1], C[ke + 2]);
          }, rn.prototype.projectAndGetPerspectiveRatio = function(C, D, F) {
            var q = [D, F, 0, 1];
            return Dn(q, q, C), { point: new e.Point((q[0] / q[3] + 1) / 2 * this.transform.width + 100, (-q[1] / q[3] + 1) / 2 * this.transform.height + 100), perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / q[3] * 0.5 };
          }, rn.prototype.isOffscreen = function(C, D, F, q) {
            return F < 100 || C >= this.screenRightBoundary || q < 100 || D > this.screenBottomBoundary;
          }, rn.prototype.isInsideGrid = function(C, D, F, q) {
            return F >= 0 && C < this.gridRightBoundary && q >= 0 && D < this.gridBottomBoundary;
          }, rn.prototype.getViewportMatrix = function() {
            var C = e.identity([]);
            return e.translate(C, C, [-100, -100, 0]), C;
          };
          var xn = function(C, D, F, q) {
            this.opacity = C ? Math.max(0, Math.min(1, C.opacity + (C.placed ? D : -D))) : q && F ? 1 : 0, this.placed = F;
          };
          xn.prototype.isHidden = function() {
            return this.opacity === 0 && !this.placed;
          };
          var $n = function(C, D, F, q, ae) {
            this.text = new xn(C ? C.text : null, D, F, ae), this.icon = new xn(C ? C.icon : null, D, q, ae);
          };
          $n.prototype.isHidden = function() {
            return this.text.isHidden() && this.icon.isHidden();
          };
          var Br = function(C, D, F) {
            this.text = C, this.icon = D, this.skipFade = F;
          }, tn = function() {
            this.invProjMatrix = e.create(), this.viewportMatrix = e.create(), this.circles = [];
          }, mn = function(C, D, F, q, ae) {
            this.bucketInstanceId = C, this.featureIndex = D, this.sourceLayerIndex = F, this.bucketIndex = q, this.tileID = ae;
          }, Qr = function(C) {
            this.crossSourceCollisions = C, this.maxGroupID = 0, this.collisionGroups = {};
          };
          function cn(C, D, F, q, ae) {
            var fe = e.getAnchorAlignment(C), xe = -(fe.horizontalAlign - 0.5) * D, ke = -(fe.verticalAlign - 0.5) * F, Le = e.evaluateVariableOffset(C, q);
            return new e.Point(xe + Le[0] * ae, ke + Le[1] * ae);
          }
          function Hn(C, D, F, q, ae, fe) {
            var xe = C.x1, ke = C.x2, Le = C.y1, Ve = C.y2, Je = C.anchorPointX, at = C.anchorPointY, _t = new e.Point(D, F);
            return q && _t._rotate(ae ? fe : -fe), { x1: xe + _t.x, y1: Le + _t.y, x2: ke + _t.x, y2: Ve + _t.y, anchorPointX: Je, anchorPointY: at };
          }
          Qr.prototype.get = function(C) {
            if (this.crossSourceCollisions)
              return { ID: 0, predicate: null };
            if (!this.collisionGroups[C]) {
              var D = ++this.maxGroupID;
              this.collisionGroups[C] = { ID: D, predicate: function(F) {
                return F.collisionGroupID === D;
              } };
            }
            return this.collisionGroups[C];
          };
          var _n = function(C, D, F, q) {
            this.transform = C.clone(), this.collisionIndex = new rn(this.transform), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = !1, this.commitTime = 0, this.fadeDuration = D, this.retainedQueryData = {}, this.collisionGroups = new Qr(F), this.collisionCircleArrays = {}, this.prevPlacement = q, q && (q.prevPlacement = void 0), this.placedOrientations = {};
          };
          function En(C, D, F, q, ae) {
            C.emplaceBack(D ? 1 : 0, F ? 1 : 0, q || 0, ae || 0), C.emplaceBack(D ? 1 : 0, F ? 1 : 0, q || 0, ae || 0), C.emplaceBack(D ? 1 : 0, F ? 1 : 0, q || 0, ae || 0), C.emplaceBack(D ? 1 : 0, F ? 1 : 0, q || 0, ae || 0);
          }
          _n.prototype.getBucketParts = function(C, D, F, q) {
            var ae = F.getBucket(D), fe = F.latestFeatureIndex;
            if (ae && fe && D.id === ae.layerIds[0]) {
              var xe = F.collisionBoxArray, ke = ae.layers[0].layout, Le = Math.pow(2, this.transform.zoom - F.tileID.overscaledZ), Ve = F.tileSize / e.EXTENT, Je = this.transform.calculatePosMatrix(F.tileID.toUnwrapped()), at = ke.get("text-pitch-alignment") === "map", _t = ke.get("text-rotation-alignment") === "map", Et = vn(F, 1, this.transform.zoom), kt = Tr(Je, at, _t, this.transform, Et), At = null;
              if (at) {
                var xt = ur(Je, at, _t, this.transform, Et);
                At = e.multiply([], this.transform.labelPlaneMatrix, xt);
              }
              this.retainedQueryData[ae.bucketInstanceId] = new mn(ae.bucketInstanceId, fe, ae.sourceLayerIndex, ae.index, F.tileID);
              var Dt = { bucket: ae, layout: ke, posMatrix: Je, textLabelPlaneMatrix: kt, labelToScreenMatrix: At, scale: Le, textPixelRatio: Ve, holdingForFade: F.holdingForFade(), collisionBoxArray: xe, partiallyEvaluatedTextSize: e.evaluateSizeForZoom(ae.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(ae.sourceID) };
              if (q)
                for (var Ot = 0, jt = ae.sortKeyRanges; Ot < jt.length; Ot += 1) {
                  var rr = jt[Ot], dr = rr.sortKey, Sr = rr.symbolInstanceStart, kr = rr.symbolInstanceEnd;
                  C.push({ sortKey: dr, symbolInstanceStart: Sr, symbolInstanceEnd: kr, parameters: Dt });
                }
              else
                C.push({ symbolInstanceStart: 0, symbolInstanceEnd: ae.symbolInstances.length, parameters: Dt });
            }
          }, _n.prototype.attemptAnchorPlacement = function(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je, at, _t, Et, kt) {
            var At, xt = [at.textOffset0, at.textOffset1], Dt = cn(C, F, q, xt, ae), Ot = this.collisionIndex.placeCollisionBox(Hn(D, Dt.x, Dt.y, fe, xe, this.transform.angle), Je, ke, Le, Ve.predicate);
            if (!(kt && this.collisionIndex.placeCollisionBox(Hn(kt, Dt.x, Dt.y, fe, xe, this.transform.angle), Je, ke, Le, Ve.predicate).box.length === 0) && Ot.box.length > 0)
              return this.prevPlacement && this.prevPlacement.variableOffsets[at.crossTileID] && this.prevPlacement.placements[at.crossTileID] && this.prevPlacement.placements[at.crossTileID].text && (At = this.prevPlacement.variableOffsets[at.crossTileID].anchor), this.variableOffsets[at.crossTileID] = { textOffset: xt, width: F, height: q, anchor: C, textBoxScale: ae, prevAnchor: At }, this.markUsedJustification(_t, C, at, Et), _t.allowVerticalPlacement && (this.markUsedOrientation(_t, Et, at), this.placedOrientations[at.crossTileID] = Et), { shift: Dt, placedGlyphBoxes: Ot };
          }, _n.prototype.placeLayerBucketPart = function(C, D, F) {
            var q = this, ae = C.parameters, fe = ae.bucket, xe = ae.layout, ke = ae.posMatrix, Le = ae.textLabelPlaneMatrix, Ve = ae.labelToScreenMatrix, Je = ae.textPixelRatio, at = ae.holdingForFade, _t = ae.collisionBoxArray, Et = ae.partiallyEvaluatedTextSize, kt = ae.collisionGroup, At = xe.get("text-optional"), xt = xe.get("icon-optional"), Dt = xe.get("text-allow-overlap"), Ot = xe.get("icon-allow-overlap"), jt = xe.get("text-rotation-alignment") === "map", rr = xe.get("text-pitch-alignment") === "map", dr = xe.get("icon-text-fit") !== "none", Sr = xe.get("symbol-z-order") === "viewport-y", kr = Dt && (Ot || !fe.hasIconData() || xt), Jr = Ot && (Dt || !fe.hasTextData() || At);
            !fe.collisionArrays && _t && fe.deserializeCollisionBoxes(_t);
            var Xr = function(qr, Mn) {
              if (!D[qr.crossTileID])
                if (at)
                  q.placements[qr.crossTileID] = new Br(!1, !1, !1);
                else {
                  var Zn, qn = !1, na = !1, ha = !0, Sa = null, Qn = { box: null, offscreen: null }, xa = { box: null, offscreen: null }, ga = null, Ca = null, ba = 0, Pa = 0, Ua = 0;
                  Mn.textFeatureIndex ? ba = Mn.textFeatureIndex : qr.useRuntimeCollisionCircles && (ba = qr.featureIndex), Mn.verticalTextFeatureIndex && (Pa = Mn.verticalTextFeatureIndex);
                  var ci = Mn.textBox;
                  if (ci) {
                    var Ci = function(ki) {
                      var Co = e.WritingMode.horizontal;
                      if (fe.allowVerticalPlacement && !ki && q.prevPlacement) {
                        var Po = q.prevPlacement.placedOrientations[qr.crossTileID];
                        Po && (q.placedOrientations[qr.crossTileID] = Po, Co = Po, q.markUsedOrientation(fe, Co, qr));
                      }
                      return Co;
                    }, Pi = function(ki, Co) {
                      if (fe.allowVerticalPlacement && qr.numVerticalGlyphVertices > 0 && Mn.verticalTextBox)
                        for (var Po = 0, xl = fe.writingModes; Po < xl.length && (xl[Po] === e.WritingMode.vertical ? (Qn = Co(), xa = Qn) : Qn = ki(), !(Qn && Qn.box && Qn.box.length)); Po += 1)
                          ;
                      else
                        Qn = ki();
                    };
                    if (xe.get("text-variable-anchor")) {
                      var li = xe.get("text-variable-anchor");
                      if (q.prevPlacement && q.prevPlacement.variableOffsets[qr.crossTileID]) {
                        var Ti = q.prevPlacement.variableOffsets[qr.crossTileID];
                        li.indexOf(Ti.anchor) > 0 && (li = li.filter(function(ki) {
                          return ki !== Ti.anchor;
                        })).unshift(Ti.anchor);
                      }
                      var mi = function(ki, Co, Po) {
                        for (var xl = ki.x2 - ki.x1, eu = ki.y2 - ki.y1, Yo = qr.textBoxScale, Wl = dr && !Ot ? Co : null, fl = { box: [], offscreen: !1 }, tu = Dt ? 2 * li.length : li.length, Vs = 0; Vs < tu; ++Vs) {
                          var ru = li[Vs % li.length], bl = Vs >= li.length, Zl = q.attemptAnchorPlacement(ru, ki, xl, eu, Yo, jt, rr, Je, ke, kt, bl, qr, fe, Po, Wl);
                          if (Zl && (fl = Zl.placedGlyphBoxes) && fl.box && fl.box.length) {
                            qn = !0, Sa = Zl.shift;
                            break;
                          }
                        }
                        return fl;
                      };
                      Pi(function() {
                        return mi(ci, Mn.iconBox, e.WritingMode.horizontal);
                      }, function() {
                        var ki = Mn.verticalTextBox, Co = Qn && Qn.box && Qn.box.length;
                        return fe.allowVerticalPlacement && !Co && qr.numVerticalGlyphVertices > 0 && ki ? mi(ki, Mn.verticalIconBox, e.WritingMode.vertical) : { box: null, offscreen: null };
                      }), Qn && (qn = Qn.box, ha = Qn.offscreen);
                      var yo = Ci(Qn && Qn.box);
                      if (!qn && q.prevPlacement) {
                        var qi = q.prevPlacement.variableOffsets[qr.crossTileID];
                        qi && (q.variableOffsets[qr.crossTileID] = qi, q.markUsedJustification(fe, qi.anchor, qr, yo));
                      }
                    } else {
                      var zo = function(ki, Co) {
                        var Po = q.collisionIndex.placeCollisionBox(ki, Dt, Je, ke, kt.predicate);
                        return Po && Po.box && Po.box.length && (q.markUsedOrientation(fe, Co, qr), q.placedOrientations[qr.crossTileID] = Co), Po;
                      };
                      Pi(function() {
                        return zo(ci, e.WritingMode.horizontal);
                      }, function() {
                        var ki = Mn.verticalTextBox;
                        return fe.allowVerticalPlacement && qr.numVerticalGlyphVertices > 0 && ki ? zo(ki, e.WritingMode.vertical) : { box: null, offscreen: null };
                      }), Ci(Qn && Qn.box && Qn.box.length);
                    }
                  }
                  if (qn = (Zn = Qn) && Zn.box && Zn.box.length > 0, ha = Zn && Zn.offscreen, qr.useRuntimeCollisionCircles) {
                    var vs = fe.text.placedSymbolArray.get(qr.centerJustifiedTextSymbolIndex), Fs = e.evaluateSizeForFeature(fe.textSizeData, Et, vs), ll = xe.get("text-padding"), Qs = qr.collisionCircleDiameter;
                    ga = q.collisionIndex.placeCollisionCircles(Dt, vs, fe.lineVertexArray, fe.glyphOffsetArray, Fs, ke, Le, Ve, F, rr, kt.predicate, Qs, ll), qn = Dt || ga.circles.length > 0 && !ga.collisionDetected, ha = ha && ga.offscreen;
                  }
                  if (Mn.iconFeatureIndex && (Ua = Mn.iconFeatureIndex), Mn.iconBox) {
                    var $s = function(ki) {
                      var Co = dr && Sa ? Hn(ki, Sa.x, Sa.y, jt, rr, q.transform.angle) : ki;
                      return q.collisionIndex.placeCollisionBox(Co, Ot, Je, ke, kt.predicate);
                    };
                    na = xa && xa.box && xa.box.length && Mn.verticalIconBox ? (Ca = $s(Mn.verticalIconBox)).box.length > 0 : (Ca = $s(Mn.iconBox)).box.length > 0, ha = ha && Ca.offscreen;
                  }
                  var xo = At || qr.numHorizontalGlyphVertices === 0 && qr.numVerticalGlyphVertices === 0, Us = xt || qr.numIconVertices === 0;
                  if (xo || Us ? Us ? xo || (na = na && qn) : qn = na && qn : na = qn = na && qn, qn && Zn && Zn.box && (xa && xa.box && Pa ? q.collisionIndex.insertCollisionBox(Zn.box, xe.get("text-ignore-placement"), fe.bucketInstanceId, Pa, kt.ID) : q.collisionIndex.insertCollisionBox(Zn.box, xe.get("text-ignore-placement"), fe.bucketInstanceId, ba, kt.ID)), na && Ca && q.collisionIndex.insertCollisionBox(Ca.box, xe.get("icon-ignore-placement"), fe.bucketInstanceId, Ua, kt.ID), ga && (qn && q.collisionIndex.insertCollisionCircles(ga.circles, xe.get("text-ignore-placement"), fe.bucketInstanceId, ba, kt.ID), F)) {
                    var cl = fe.bucketInstanceId, es = q.collisionCircleArrays[cl];
                    es === void 0 && (es = q.collisionCircleArrays[cl] = new tn());
                    for (var ul = 0; ul < ga.circles.length; ul += 4)
                      es.circles.push(ga.circles[ul + 0]), es.circles.push(ga.circles[ul + 1]), es.circles.push(ga.circles[ul + 2]), es.circles.push(ga.collisionDetected ? 1 : 0);
                  }
                  q.placements[qr.crossTileID] = new Br(qn || kr, na || Jr, ha || fe.justReloaded), D[qr.crossTileID] = !0;
                }
            };
            if (Sr)
              for (var hn = fe.getSortedSymbolIndexes(this.transform.angle), on = hn.length - 1; on >= 0; --on) {
                var jn = hn[on];
                Xr(fe.symbolInstances.get(jn), fe.collisionArrays[jn]);
              }
            else
              for (var Wn = C.symbolInstanceStart; Wn < C.symbolInstanceEnd; Wn++)
                Xr(fe.symbolInstances.get(Wn), fe.collisionArrays[Wn]);
            if (F && fe.bucketInstanceId in this.collisionCircleArrays) {
              var ua = this.collisionCircleArrays[fe.bucketInstanceId];
              e.invert(ua.invProjMatrix, ke), ua.viewportMatrix = this.collisionIndex.getViewportMatrix();
            }
            fe.justReloaded = !1;
          }, _n.prototype.markUsedJustification = function(C, D, F, q) {
            var ae, fe = { left: F.leftJustifiedTextSymbolIndex, center: F.centerJustifiedTextSymbolIndex, right: F.rightJustifiedTextSymbolIndex };
            ae = q === e.WritingMode.vertical ? F.verticalPlacedTextSymbolIndex : fe[e.getAnchorJustification(D)];
            for (var xe = 0, ke = [F.leftJustifiedTextSymbolIndex, F.centerJustifiedTextSymbolIndex, F.rightJustifiedTextSymbolIndex, F.verticalPlacedTextSymbolIndex]; xe < ke.length; xe += 1) {
              var Le = ke[xe];
              Le >= 0 && (C.text.placedSymbolArray.get(Le).crossTileID = ae >= 0 && Le !== ae ? 0 : F.crossTileID);
            }
          }, _n.prototype.markUsedOrientation = function(C, D, F) {
            for (var q = D === e.WritingMode.horizontal || D === e.WritingMode.horizontalOnly ? D : 0, ae = D === e.WritingMode.vertical ? D : 0, fe = 0, xe = [F.leftJustifiedTextSymbolIndex, F.centerJustifiedTextSymbolIndex, F.rightJustifiedTextSymbolIndex]; fe < xe.length; fe += 1) {
              var ke = xe[fe];
              C.text.placedSymbolArray.get(ke).placedOrientation = q;
            }
            F.verticalPlacedTextSymbolIndex && (C.text.placedSymbolArray.get(F.verticalPlacedTextSymbolIndex).placedOrientation = ae);
          }, _n.prototype.commit = function(C) {
            this.commitTime = C, this.zoomAtLastRecencyCheck = this.transform.zoom;
            var D = this.prevPlacement, F = !1;
            this.prevZoomAdjustment = D ? D.zoomAdjustment(this.transform.zoom) : 0;
            var q = D ? D.symbolFadeChange(C) : 1, ae = D ? D.opacities : {}, fe = D ? D.variableOffsets : {}, xe = D ? D.placedOrientations : {};
            for (var ke in this.placements) {
              var Le = this.placements[ke], Ve = ae[ke];
              Ve ? (this.opacities[ke] = new $n(Ve, q, Le.text, Le.icon), F = F || Le.text !== Ve.text.placed || Le.icon !== Ve.icon.placed) : (this.opacities[ke] = new $n(null, q, Le.text, Le.icon, Le.skipFade), F = F || Le.text || Le.icon);
            }
            for (var Je in ae) {
              var at = ae[Je];
              if (!this.opacities[Je]) {
                var _t = new $n(at, q, !1, !1);
                _t.isHidden() || (this.opacities[Je] = _t, F = F || at.text.placed || at.icon.placed);
              }
            }
            for (var Et in fe)
              this.variableOffsets[Et] || !this.opacities[Et] || this.opacities[Et].isHidden() || (this.variableOffsets[Et] = fe[Et]);
            for (var kt in xe)
              this.placedOrientations[kt] || !this.opacities[kt] || this.opacities[kt].isHidden() || (this.placedOrientations[kt] = xe[kt]);
            F ? this.lastPlacementChangeTime = C : typeof this.lastPlacementChangeTime != "number" && (this.lastPlacementChangeTime = D ? D.lastPlacementChangeTime : C);
          }, _n.prototype.updateLayerOpacities = function(C, D) {
            for (var F = {}, q = 0, ae = D; q < ae.length; q += 1) {
              var fe = ae[q], xe = fe.getBucket(C);
              xe && fe.latestFeatureIndex && C.id === xe.layerIds[0] && this.updateBucketOpacities(xe, F, fe.collisionBoxArray);
            }
          }, _n.prototype.updateBucketOpacities = function(C, D, F) {
            var q = this;
            C.hasTextData() && C.text.opacityVertexArray.clear(), C.hasIconData() && C.icon.opacityVertexArray.clear(), C.hasIconCollisionBoxData() && C.iconCollisionBox.collisionVertexArray.clear(), C.hasTextCollisionBoxData() && C.textCollisionBox.collisionVertexArray.clear();
            var ae = C.layers[0].layout, fe = new $n(null, 0, !1, !1, !0), xe = ae.get("text-allow-overlap"), ke = ae.get("icon-allow-overlap"), Le = ae.get("text-variable-anchor"), Ve = ae.get("text-rotation-alignment") === "map", Je = ae.get("text-pitch-alignment") === "map", at = ae.get("icon-text-fit") !== "none", _t = new $n(null, 0, xe && (ke || !C.hasIconData() || ae.get("icon-optional")), ke && (xe || !C.hasTextData() || ae.get("text-optional")), !0);
            !C.collisionArrays && F && (C.hasIconCollisionBoxData() || C.hasTextCollisionBoxData()) && C.deserializeCollisionBoxes(F);
            for (var Et = function(Dt, Ot, jt) {
              for (var rr = 0; rr < Ot / 4; rr++)
                Dt.opacityVertexArray.emplaceBack(jt);
            }, kt = function(Dt) {
              var Ot = C.symbolInstances.get(Dt), jt = Ot.numHorizontalGlyphVertices, rr = Ot.numVerticalGlyphVertices, dr = Ot.crossTileID, Sr = D[dr], kr = q.opacities[dr];
              Sr ? kr = fe : kr || (kr = _t, q.opacities[dr] = kr), D[dr] = !0;
              var Jr = jt > 0 || rr > 0, Xr = Ot.numIconVertices > 0, hn = q.placedOrientations[Ot.crossTileID], on = hn === e.WritingMode.vertical, jn = hn === e.WritingMode.horizontal || hn === e.WritingMode.horizontalOnly;
              if (Jr) {
                var Wn = Dr(kr.text), ua = on ? Or : Wn;
                Et(C.text, jt, ua);
                var qr = jn ? Or : Wn;
                Et(C.text, rr, qr);
                var Mn = kr.text.isHidden();
                [Ot.rightJustifiedTextSymbolIndex, Ot.centerJustifiedTextSymbolIndex, Ot.leftJustifiedTextSymbolIndex].forEach(function(Ua) {
                  Ua >= 0 && (C.text.placedSymbolArray.get(Ua).hidden = Mn || on ? 1 : 0);
                }), Ot.verticalPlacedTextSymbolIndex >= 0 && (C.text.placedSymbolArray.get(Ot.verticalPlacedTextSymbolIndex).hidden = Mn || jn ? 1 : 0);
                var Zn = q.variableOffsets[Ot.crossTileID];
                Zn && q.markUsedJustification(C, Zn.anchor, Ot, hn);
                var qn = q.placedOrientations[Ot.crossTileID];
                qn && (q.markUsedJustification(C, "left", Ot, qn), q.markUsedOrientation(C, qn, Ot));
              }
              if (Xr) {
                var na = Dr(kr.icon), ha = !(at && Ot.verticalPlacedIconSymbolIndex && on);
                if (Ot.placedIconSymbolIndex >= 0) {
                  var Sa = ha ? na : Or;
                  Et(C.icon, Ot.numIconVertices, Sa), C.icon.placedSymbolArray.get(Ot.placedIconSymbolIndex).hidden = kr.icon.isHidden();
                }
                if (Ot.verticalPlacedIconSymbolIndex >= 0) {
                  var Qn = ha ? Or : na;
                  Et(C.icon, Ot.numVerticalIconVertices, Qn), C.icon.placedSymbolArray.get(Ot.verticalPlacedIconSymbolIndex).hidden = kr.icon.isHidden();
                }
              }
              if (C.hasIconCollisionBoxData() || C.hasTextCollisionBoxData()) {
                var xa = C.collisionArrays[Dt];
                if (xa) {
                  var ga = new e.Point(0, 0);
                  if (xa.textBox || xa.verticalTextBox) {
                    var Ca = !0;
                    if (Le) {
                      var ba = q.variableOffsets[dr];
                      ba ? (ga = cn(ba.anchor, ba.width, ba.height, ba.textOffset, ba.textBoxScale), Ve && ga._rotate(Je ? q.transform.angle : -q.transform.angle)) : Ca = !1;
                    }
                    xa.textBox && En(C.textCollisionBox.collisionVertexArray, kr.text.placed, !Ca || on, ga.x, ga.y), xa.verticalTextBox && En(C.textCollisionBox.collisionVertexArray, kr.text.placed, !Ca || jn, ga.x, ga.y);
                  }
                  var Pa = Boolean(!jn && xa.verticalIconBox);
                  xa.iconBox && En(C.iconCollisionBox.collisionVertexArray, kr.icon.placed, Pa, at ? ga.x : 0, at ? ga.y : 0), xa.verticalIconBox && En(C.iconCollisionBox.collisionVertexArray, kr.icon.placed, !Pa, at ? ga.x : 0, at ? ga.y : 0);
                }
              }
            }, At = 0; At < C.symbolInstances.length; At++)
              kt(At);
            if (C.sortFeatures(this.transform.angle), this.retainedQueryData[C.bucketInstanceId] && (this.retainedQueryData[C.bucketInstanceId].featureSortOrder = C.featureSortOrder), C.hasTextData() && C.text.opacityVertexBuffer && C.text.opacityVertexBuffer.updateData(C.text.opacityVertexArray), C.hasIconData() && C.icon.opacityVertexBuffer && C.icon.opacityVertexBuffer.updateData(C.icon.opacityVertexArray), C.hasIconCollisionBoxData() && C.iconCollisionBox.collisionVertexBuffer && C.iconCollisionBox.collisionVertexBuffer.updateData(C.iconCollisionBox.collisionVertexArray), C.hasTextCollisionBoxData() && C.textCollisionBox.collisionVertexBuffer && C.textCollisionBox.collisionVertexBuffer.updateData(C.textCollisionBox.collisionVertexArray), C.bucketInstanceId in this.collisionCircleArrays) {
              var xt = this.collisionCircleArrays[C.bucketInstanceId];
              C.placementInvProjMatrix = xt.invProjMatrix, C.placementViewportMatrix = xt.viewportMatrix, C.collisionCircleArray = xt.circles, delete this.collisionCircleArrays[C.bucketInstanceId];
            }
          }, _n.prototype.symbolFadeChange = function(C) {
            return this.fadeDuration === 0 ? 1 : (C - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment;
          }, _n.prototype.zoomAdjustment = function(C) {
            return Math.max(0, (this.transform.zoom - C) / 1.5);
          }, _n.prototype.hasTransitions = function(C) {
            return this.stale || C - this.lastPlacementChangeTime < this.fadeDuration;
          }, _n.prototype.stillRecent = function(C, D) {
            var F = this.zoomAtLastRecencyCheck === D ? 1 - this.zoomAdjustment(D) : 1;
            return this.zoomAtLastRecencyCheck = D, this.commitTime + this.fadeDuration * F > C;
          }, _n.prototype.setStale = function() {
            this.stale = !0;
          };
          var aa = Math.pow(2, 25), tr = Math.pow(2, 24), mr = Math.pow(2, 17), Ct = Math.pow(2, 16), or = Math.pow(2, 9), hr = Math.pow(2, 8), Rr = Math.pow(2, 1);
          function Dr(C) {
            if (C.opacity === 0 && !C.placed)
              return 0;
            if (C.opacity === 1 && C.placed)
              return 4294967295;
            var D = C.placed ? 1 : 0, F = Math.floor(127 * C.opacity);
            return F * aa + D * tr + F * mr + D * Ct + F * or + D * hr + F * Rr + D;
          }
          var Or = 0, Ar = function(C) {
            this._sortAcrossTiles = C.layout.get("symbol-z-order") !== "viewport-y" && C.layout.get("symbol-sort-key").constantOr(1) !== void 0, this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [];
          };
          Ar.prototype.continuePlacement = function(C, D, F, q, ae) {
            for (var fe = this._bucketParts; this._currentTileIndex < C.length; ) {
              var xe = C[this._currentTileIndex];
              if (D.getBucketParts(fe, q, xe, this._sortAcrossTiles), this._currentTileIndex++, ae())
                return !0;
            }
            for (this._sortAcrossTiles && (this._sortAcrossTiles = !1, fe.sort(function(Le, Ve) {
              return Le.sortKey - Ve.sortKey;
            })); this._currentPartIndex < fe.length; ) {
              var ke = fe[this._currentPartIndex];
              if (D.placeLayerBucketPart(ke, this._seenCrossTileIDs, F), this._currentPartIndex++, ae())
                return !0;
            }
            return !1;
          };
          var vr = function(C, D, F, q, ae, fe, xe) {
            this.placement = new _n(C, ae, fe, xe), this._currentPlacementIndex = D.length - 1, this._forceFullPlacement = F, this._showCollisionBoxes = q, this._done = !1;
          };
          vr.prototype.isDone = function() {
            return this._done;
          }, vr.prototype.continuePlacement = function(C, D, F) {
            for (var q = this, ae = e.browser.now(), fe = function() {
              var Le = e.browser.now() - ae;
              return !q._forceFullPlacement && Le > 2;
            }; this._currentPlacementIndex >= 0; ) {
              var xe = D[C[this._currentPlacementIndex]], ke = this.placement.collisionIndex.transform.zoom;
              if (xe.type === "symbol" && (!xe.minzoom || xe.minzoom <= ke) && (!xe.maxzoom || xe.maxzoom > ke)) {
                if (this._inProgressLayer || (this._inProgressLayer = new Ar(xe)), this._inProgressLayer.continuePlacement(F[xe.source], this.placement, this._showCollisionBoxes, xe, fe))
                  return;
                delete this._inProgressLayer;
              }
              this._currentPlacementIndex--;
            }
            this._done = !0;
          }, vr.prototype.commit = function(C) {
            return this.placement.commit(C), this.placement;
          };
          var xr = 512 / e.EXTENT / 2, wr = function(C, D, F) {
            this.tileID = C, this.indexedSymbolInstances = {}, this.bucketInstanceId = F;
            for (var q = 0; q < D.length; q++) {
              var ae = D.get(q), fe = ae.key;
              this.indexedSymbolInstances[fe] || (this.indexedSymbolInstances[fe] = []), this.indexedSymbolInstances[fe].push({ crossTileID: ae.crossTileID, coord: this.getScaledCoordinates(ae, C) });
            }
          };
          wr.prototype.getScaledCoordinates = function(C, D) {
            var F = D.canonical.z - this.tileID.canonical.z, q = xr / Math.pow(2, F);
            return { x: Math.floor((D.canonical.x * e.EXTENT + C.anchorX) * q), y: Math.floor((D.canonical.y * e.EXTENT + C.anchorY) * q) };
          }, wr.prototype.findMatches = function(C, D, F) {
            for (var q = this.tileID.canonical.z < D.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - D.canonical.z), ae = 0; ae < C.length; ae++) {
              var fe = C.get(ae);
              if (!fe.crossTileID) {
                var xe = this.indexedSymbolInstances[fe.key];
                if (xe)
                  for (var ke = this.getScaledCoordinates(fe, D), Le = 0, Ve = xe; Le < Ve.length; Le += 1) {
                    var Je = Ve[Le];
                    if (Math.abs(Je.coord.x - ke.x) <= q && Math.abs(Je.coord.y - ke.y) <= q && !F[Je.crossTileID]) {
                      F[Je.crossTileID] = !0, fe.crossTileID = Je.crossTileID;
                      break;
                    }
                  }
              }
            }
          };
          var Er = function() {
            this.maxCrossTileID = 0;
          };
          Er.prototype.generate = function() {
            return ++this.maxCrossTileID;
          };
          var Hr = function() {
            this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0;
          };
          Hr.prototype.handleWrapJump = function(C) {
            var D = Math.round((C - this.lng) / 360);
            if (D !== 0)
              for (var F in this.indexes) {
                var q = this.indexes[F], ae = {};
                for (var fe in q) {
                  var xe = q[fe];
                  xe.tileID = xe.tileID.unwrapTo(xe.tileID.wrap + D), ae[xe.tileID.key] = xe;
                }
                this.indexes[F] = ae;
              }
            this.lng = C;
          }, Hr.prototype.addBucket = function(C, D, F) {
            if (this.indexes[C.overscaledZ] && this.indexes[C.overscaledZ][C.key]) {
              if (this.indexes[C.overscaledZ][C.key].bucketInstanceId === D.bucketInstanceId)
                return !1;
              this.removeBucketCrossTileIDs(C.overscaledZ, this.indexes[C.overscaledZ][C.key]);
            }
            for (var q = 0; q < D.symbolInstances.length; q++)
              D.symbolInstances.get(q).crossTileID = 0;
            this.usedCrossTileIDs[C.overscaledZ] || (this.usedCrossTileIDs[C.overscaledZ] = {});
            var ae = this.usedCrossTileIDs[C.overscaledZ];
            for (var fe in this.indexes) {
              var xe = this.indexes[fe];
              if (Number(fe) > C.overscaledZ)
                for (var ke in xe) {
                  var Le = xe[ke];
                  Le.tileID.isChildOf(C) && Le.findMatches(D.symbolInstances, C, ae);
                }
              else {
                var Ve = xe[C.scaledTo(Number(fe)).key];
                Ve && Ve.findMatches(D.symbolInstances, C, ae);
              }
            }
            for (var Je = 0; Je < D.symbolInstances.length; Je++) {
              var at = D.symbolInstances.get(Je);
              at.crossTileID || (at.crossTileID = F.generate(), ae[at.crossTileID] = !0);
            }
            return this.indexes[C.overscaledZ] === void 0 && (this.indexes[C.overscaledZ] = {}), this.indexes[C.overscaledZ][C.key] = new wr(C, D.symbolInstances, D.bucketInstanceId), !0;
          }, Hr.prototype.removeBucketCrossTileIDs = function(C, D) {
            for (var F in D.indexedSymbolInstances)
              for (var q = 0, ae = D.indexedSymbolInstances[F]; q < ae.length; q += 1) {
                var fe = ae[q];
                delete this.usedCrossTileIDs[C][fe.crossTileID];
              }
          }, Hr.prototype.removeStaleBuckets = function(C) {
            var D = !1;
            for (var F in this.indexes) {
              var q = this.indexes[F];
              for (var ae in q)
                C[q[ae].bucketInstanceId] || (this.removeBucketCrossTileIDs(F, q[ae]), delete q[ae], D = !0);
            }
            return D;
          };
          var Vr = function() {
            this.layerIndexes = {}, this.crossTileIDs = new Er(), this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {};
          };
          Vr.prototype.addLayer = function(C, D, F) {
            var q = this.layerIndexes[C.id];
            q === void 0 && (q = this.layerIndexes[C.id] = new Hr());
            var ae = !1, fe = {};
            q.handleWrapJump(F);
            for (var xe = 0, ke = D; xe < ke.length; xe += 1) {
              var Le = ke[xe], Ve = Le.getBucket(C);
              Ve && C.id === Ve.layerIds[0] && (Ve.bucketInstanceId || (Ve.bucketInstanceId = ++this.maxBucketInstanceId), q.addBucket(Le.tileID, Ve, this.crossTileIDs) && (ae = !0), fe[Ve.bucketInstanceId] = !0);
            }
            return q.removeStaleBuckets(fe) && (ae = !0), ae;
          }, Vr.prototype.pruneUnusedLayers = function(C) {
            var D = {};
            for (var F in C.forEach(function(q) {
              D[q] = !0;
            }), this.layerIndexes)
              D[F] || delete this.layerIndexes[F];
          };
          var Kr = function(C, D) {
            return e.emitValidationErrors(C, D && D.filter(function(F) {
              return F.identifier !== "source.canvas";
            }));
          }, en = e.pick(wt, ["addLayer", "removeLayer", "setPaintProperty", "setLayoutProperty", "setFilter", "addSource", "removeSource", "setLayerZoomRange", "setLight", "setTransition", "setGeoJSONSourceData"]), gn = e.pick(wt, ["setCenter", "setZoom", "setBearing", "setPitch"]), bn = function() {
            var C = {}, D = e.styleSpec.$version;
            for (var F in e.styleSpec.$root) {
              var q = e.styleSpec.$root[F];
              if (q.required) {
                var ae = null;
                (ae = F === "version" ? D : q.type === "array" ? [] : {}) != null && (C[F] = ae);
              }
            }
            return C;
          }(), wn = function(C) {
            function D(F, q) {
              var ae = this;
              q === void 0 && (q = {}), C.call(this), this.map = F, this.dispatcher = new S(rt(), this), this.imageManager = new c(), this.imageManager.setEventedParent(this), this.glyphManager = new T(F._requestManager, q.localIdeographFontFamily), this.lineAtlas = new P(256, 512), this.crossTileSymbolIndex = new Vr(), this._layers = {}, this._serializedLayers = {}, this._order = [], this.sourceCaches = {}, this.zoomHistory = new e.ZoomHistory(), this._loaded = !1, this._availableImages = [], this._resetUpdates(), this.dispatcher.broadcast("setReferrer", e.getReferrer());
              var fe = this;
              this._rtlTextPluginCallback = D.registerForPluginStateChange(function(xe) {
                var ke = { pluginStatus: xe.pluginStatus, pluginURL: xe.pluginURL };
                fe.dispatcher.broadcast("syncRTLPluginState", ke, function(Le, Ve) {
                  if (e.triggerPluginCompletionEvent(Le), Ve && Ve.every(function(at) {
                    return at;
                  }))
                    for (var Je in fe.sourceCaches)
                      fe.sourceCaches[Je].reload();
                });
              }), this.on("data", function(xe) {
                if (xe.dataType === "source" && xe.sourceDataType === "metadata") {
                  var ke = ae.sourceCaches[xe.sourceId];
                  if (ke) {
                    var Le = ke.getSource();
                    if (Le && Le.vectorLayerIds)
                      for (var Ve in ae._layers) {
                        var Je = ae._layers[Ve];
                        Je.source === Le.id && ae._validateLayer(Je);
                      }
                  }
                }
              });
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.loadURL = function(F, q) {
              var ae = this;
              q === void 0 && (q = {}), this.fire(new e.Event("dataloading", { dataType: "style" }));
              var fe = typeof q.validate == "boolean" ? q.validate : !e.isMapboxURL(F);
              F = this.map._requestManager.normalizeStyleURL(F, q.accessToken);
              var xe = this.map._requestManager.transformRequest(F, e.ResourceType.Style);
              this._request = e.getJSON(xe, function(ke, Le) {
                ae._request = null, ke ? ae.fire(new e.ErrorEvent(ke)) : Le && ae._load(Le, fe);
              });
            }, D.prototype.loadJSON = function(F, q) {
              var ae = this;
              q === void 0 && (q = {}), this.fire(new e.Event("dataloading", { dataType: "style" })), this._request = e.browser.frame(function() {
                ae._request = null, ae._load(F, q.validate !== !1);
              });
            }, D.prototype.loadEmpty = function() {
              this.fire(new e.Event("dataloading", { dataType: "style" })), this._load(bn, !1);
            }, D.prototype._load = function(F, q) {
              if (!q || !Kr(this, e.validateStyle(F))) {
                for (var ae in this._loaded = !0, this.stylesheet = F, F.sources)
                  this.addSource(ae, F.sources[ae], { validate: !1 });
                F.sprite ? this._loadSprite(F.sprite) : this.imageManager.setLoaded(!0), this.glyphManager.setURL(F.glyphs);
                var fe = Bt(this.stylesheet.layers);
                this._order = fe.map(function(Ve) {
                  return Ve.id;
                }), this._layers = {}, this._serializedLayers = {};
                for (var xe = 0, ke = fe; xe < ke.length; xe += 1) {
                  var Le = ke[xe];
                  (Le = e.createStyleLayer(Le)).setEventedParent(this, { layer: { id: Le.id } }), this._layers[Le.id] = Le, this._serializedLayers[Le.id] = Le.serialize();
                }
                this.dispatcher.broadcast("setLayers", this._serializeLayers(this._order)), this.light = new I(this.stylesheet.light), this.fire(new e.Event("data", { dataType: "style" })), this.fire(new e.Event("style.load"));
              }
            }, D.prototype._loadSprite = function(F) {
              var q = this;
              this._spriteRequest = function(ae, fe, xe) {
                var ke, Le, Ve, Je = e.browser.devicePixelRatio > 1 ? "@2x" : "", at = e.getJSON(fe.transformRequest(fe.normalizeSpriteURL(ae, Je, ".json"), e.ResourceType.SpriteJSON), function(kt, At) {
                  at = null, Ve || (Ve = kt, ke = At, Et());
                }), _t = e.getImage(fe.transformRequest(fe.normalizeSpriteURL(ae, Je, ".png"), e.ResourceType.SpriteImage), function(kt, At) {
                  _t = null, Ve || (Ve = kt, Le = At, Et());
                });
                function Et() {
                  if (Ve)
                    xe(Ve);
                  else if (ke && Le) {
                    var kt = e.browser.getImageData(Le), At = {};
                    for (var xt in ke) {
                      var Dt = ke[xt], Ot = Dt.width, jt = Dt.height, rr = Dt.x, dr = Dt.y, Sr = Dt.sdf, kr = Dt.pixelRatio, Jr = Dt.stretchX, Xr = Dt.stretchY, hn = Dt.content, on = new e.RGBAImage({ width: Ot, height: jt });
                      e.RGBAImage.copy(kt, on, { x: rr, y: dr }, { x: 0, y: 0 }, { width: Ot, height: jt }), At[xt] = { data: on, pixelRatio: kr, sdf: Sr, stretchX: Jr, stretchY: Xr, content: hn };
                    }
                    xe(null, At);
                  }
                }
                return { cancel: function() {
                  at && (at.cancel(), at = null), _t && (_t.cancel(), _t = null);
                } };
              }(F, this.map._requestManager, function(ae, fe) {
                if (q._spriteRequest = null, ae)
                  q.fire(new e.ErrorEvent(ae));
                else if (fe)
                  for (var xe in fe)
                    q.imageManager.addImage(xe, fe[xe]);
                q.imageManager.setLoaded(!0), q._availableImages = q.imageManager.listImages(), q.dispatcher.broadcast("setImages", q._availableImages), q.fire(new e.Event("data", { dataType: "style" }));
              });
            }, D.prototype._validateLayer = function(F) {
              var q = this.sourceCaches[F.source];
              if (q) {
                var ae = F.sourceLayer;
                if (ae) {
                  var fe = q.getSource();
                  (fe.type === "geojson" || fe.vectorLayerIds && fe.vectorLayerIds.indexOf(ae) === -1) && this.fire(new e.ErrorEvent(new Error('Source layer "' + ae + '" does not exist on source "' + fe.id + '" as specified by style layer "' + F.id + '"')));
                }
              }
            }, D.prototype.loaded = function() {
              if (!this._loaded || Object.keys(this._updatedSources).length)
                return !1;
              for (var F in this.sourceCaches)
                if (!this.sourceCaches[F].loaded())
                  return !1;
              return !!this.imageManager.isLoaded();
            }, D.prototype._serializeLayers = function(F) {
              for (var q = [], ae = 0, fe = F; ae < fe.length; ae += 1) {
                var xe = fe[ae], ke = this._layers[xe];
                ke.type !== "custom" && q.push(ke.serialize());
              }
              return q;
            }, D.prototype.hasTransitions = function() {
              if (this.light && this.light.hasTransition())
                return !0;
              for (var F in this.sourceCaches)
                if (this.sourceCaches[F].hasTransition())
                  return !0;
              for (var q in this._layers)
                if (this._layers[q].hasTransition())
                  return !0;
              return !1;
            }, D.prototype._checkLoaded = function() {
              if (!this._loaded)
                throw new Error("Style is not done loading");
            }, D.prototype.update = function(F) {
              if (this._loaded) {
                var q = this._changed;
                if (this._changed) {
                  var ae = Object.keys(this._updatedLayers), fe = Object.keys(this._removedLayers);
                  for (var xe in (ae.length || fe.length) && this._updateWorkerLayers(ae, fe), this._updatedSources) {
                    var ke = this._updatedSources[xe];
                    ke === "reload" ? this._reloadSource(xe) : ke === "clear" && this._clearSource(xe);
                  }
                  for (var Le in this._updateTilesForChangedImages(), this._updatedPaintProps)
                    this._layers[Le].updateTransitions(F);
                  this.light.updateTransitions(F), this._resetUpdates();
                }
                for (var Ve in this.sourceCaches)
                  this.sourceCaches[Ve].used = !1;
                for (var Je = 0, at = this._order; Je < at.length; Je += 1) {
                  var _t = at[Je], Et = this._layers[_t];
                  Et.recalculate(F, this._availableImages), !Et.isHidden(F.zoom) && Et.source && (this.sourceCaches[Et.source].used = !0);
                }
                this.light.recalculate(F), this.z = F.zoom, q && this.fire(new e.Event("data", { dataType: "style" }));
              }
            }, D.prototype._updateTilesForChangedImages = function() {
              var F = Object.keys(this._changedImages);
              if (F.length) {
                for (var q in this.sourceCaches)
                  this.sourceCaches[q].reloadTilesForDependencies(["icons", "patterns"], F);
                this._changedImages = {};
              }
            }, D.prototype._updateWorkerLayers = function(F, q) {
              this.dispatcher.broadcast("updateLayers", { layers: this._serializeLayers(F), removedIds: q });
            }, D.prototype._resetUpdates = function() {
              this._changed = !1, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {};
            }, D.prototype.setState = function(F) {
              var q = this;
              if (this._checkLoaded(), Kr(this, e.validateStyle(F)))
                return !1;
              (F = e.clone$1(F)).layers = Bt(F.layers);
              var ae = Zt(this.serialize(), F).filter(function(xe) {
                return !(xe.command in gn);
              });
              if (ae.length === 0)
                return !1;
              var fe = ae.filter(function(xe) {
                return !(xe.command in en);
              });
              if (fe.length > 0)
                throw new Error("Unimplemented: " + fe.map(function(xe) {
                  return xe.command;
                }).join(", ") + ".");
              return ae.forEach(function(xe) {
                xe.command !== "setTransition" && q[xe.command].apply(q, xe.args);
              }), this.stylesheet = F, !0;
            }, D.prototype.addImage = function(F, q) {
              if (this.getImage(F))
                return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));
              this.imageManager.addImage(F, q), this._availableImages = this.imageManager.listImages(), this._changedImages[F] = !0, this._changed = !0, this.fire(new e.Event("data", { dataType: "style" }));
            }, D.prototype.updateImage = function(F, q) {
              this.imageManager.updateImage(F, q);
            }, D.prototype.getImage = function(F) {
              return this.imageManager.getImage(F);
            }, D.prototype.removeImage = function(F) {
              if (!this.getImage(F))
                return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));
              this.imageManager.removeImage(F), this._availableImages = this.imageManager.listImages(), this._changedImages[F] = !0, this._changed = !0, this.fire(new e.Event("data", { dataType: "style" }));
            }, D.prototype.listImages = function() {
              return this._checkLoaded(), this.imageManager.listImages();
            }, D.prototype.addSource = function(F, q, ae) {
              var fe = this;
              if (ae === void 0 && (ae = {}), this._checkLoaded(), this.sourceCaches[F] !== void 0)
                throw new Error("There is already a source with this ID");
              if (!q.type)
                throw new Error("The type property must be defined, but the only the following properties were given: " + Object.keys(q).join(", ") + ".");
              if (!(["vector", "raster", "geojson", "video", "image"].indexOf(q.type) >= 0) || !this._validate(e.validateStyle.source, "sources." + F, q, null, ae)) {
                this.map && this.map._collectResourceTiming && (q.collectResourceTiming = !0);
                var xe = this.sourceCaches[F] = new Re(F, q, this.dispatcher);
                xe.style = this, xe.setEventedParent(this, function() {
                  return { isSourceLoaded: fe.loaded(), source: xe.serialize(), sourceId: F };
                }), xe.onAdd(this.map), this._changed = !0;
              }
            }, D.prototype.removeSource = function(F) {
              if (this._checkLoaded(), this.sourceCaches[F] === void 0)
                throw new Error("There is no source with this ID");
              for (var q in this._layers)
                if (this._layers[q].source === F)
                  return this.fire(new e.ErrorEvent(new Error('Source "' + F + '" cannot be removed while layer "' + q + '" is using it.')));
              var ae = this.sourceCaches[F];
              delete this.sourceCaches[F], delete this._updatedSources[F], ae.fire(new e.Event("data", { sourceDataType: "metadata", dataType: "source", sourceId: F })), ae.setEventedParent(null), ae.clearTiles(), ae.onRemove && ae.onRemove(this.map), this._changed = !0;
            }, D.prototype.setGeoJSONSourceData = function(F, q) {
              this._checkLoaded(), this.sourceCaches[F].getSource().setData(q), this._changed = !0;
            }, D.prototype.getSource = function(F) {
              return this.sourceCaches[F] && this.sourceCaches[F].getSource();
            }, D.prototype.addLayer = function(F, q, ae) {
              ae === void 0 && (ae = {}), this._checkLoaded();
              var fe = F.id;
              if (this.getLayer(fe))
                this.fire(new e.ErrorEvent(new Error('Layer with id "' + fe + '" already exists on this map')));
              else {
                var xe;
                if (F.type === "custom") {
                  if (Kr(this, e.validateCustomStyleLayer(F)))
                    return;
                  xe = e.createStyleLayer(F);
                } else {
                  if (typeof F.source == "object" && (this.addSource(fe, F.source), F = e.clone$1(F), F = e.extend(F, { source: fe })), this._validate(e.validateStyle.layer, "layers." + fe, F, { arrayIndex: -1 }, ae))
                    return;
                  xe = e.createStyleLayer(F), this._validateLayer(xe), xe.setEventedParent(this, { layer: { id: fe } }), this._serializedLayers[xe.id] = xe.serialize();
                }
                var ke = q ? this._order.indexOf(q) : this._order.length;
                if (q && ke === -1)
                  this.fire(new e.ErrorEvent(new Error('Layer with id "' + q + '" does not exist on this map.')));
                else {
                  if (this._order.splice(ke, 0, fe), this._layerOrderChanged = !0, this._layers[fe] = xe, this._removedLayers[fe] && xe.source && xe.type !== "custom") {
                    var Le = this._removedLayers[fe];
                    delete this._removedLayers[fe], Le.type !== xe.type ? this._updatedSources[xe.source] = "clear" : (this._updatedSources[xe.source] = "reload", this.sourceCaches[xe.source].pause());
                  }
                  this._updateLayer(xe), xe.onAdd && xe.onAdd(this.map);
                }
              }
            }, D.prototype.moveLayer = function(F, q) {
              if (this._checkLoaded(), this._changed = !0, this._layers[F]) {
                if (F !== q) {
                  var ae = this._order.indexOf(F);
                  this._order.splice(ae, 1);
                  var fe = q ? this._order.indexOf(q) : this._order.length;
                  q && fe === -1 ? this.fire(new e.ErrorEvent(new Error('Layer with id "' + q + '" does not exist on this map.'))) : (this._order.splice(fe, 0, F), this._layerOrderChanged = !0);
                }
              } else
                this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style and cannot be moved.")));
            }, D.prototype.removeLayer = function(F) {
              this._checkLoaded();
              var q = this._layers[F];
              if (q) {
                q.setEventedParent(null);
                var ae = this._order.indexOf(F);
                this._order.splice(ae, 1), this._layerOrderChanged = !0, this._changed = !0, this._removedLayers[F] = q, delete this._layers[F], delete this._serializedLayers[F], delete this._updatedLayers[F], delete this._updatedPaintProps[F], q.onRemove && q.onRemove(this.map);
              } else
                this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style and cannot be removed.")));
            }, D.prototype.getLayer = function(F) {
              return this._layers[F];
            }, D.prototype.hasLayer = function(F) {
              return F in this._layers;
            }, D.prototype.setLayerZoomRange = function(F, q, ae) {
              this._checkLoaded();
              var fe = this.getLayer(F);
              fe ? fe.minzoom === q && fe.maxzoom === ae || (q != null && (fe.minzoom = q), ae != null && (fe.maxzoom = ae), this._updateLayer(fe)) : this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style and cannot have zoom extent.")));
            }, D.prototype.setFilter = function(F, q, ae) {
              ae === void 0 && (ae = {}), this._checkLoaded();
              var fe = this.getLayer(F);
              if (fe) {
                if (!e.deepEqual(fe.filter, q))
                  return q == null ? (fe.filter = void 0, void this._updateLayer(fe)) : void (this._validate(e.validateStyle.filter, "layers." + fe.id + ".filter", q, null, ae) || (fe.filter = e.clone$1(q), this._updateLayer(fe)));
              } else
                this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style and cannot be filtered.")));
            }, D.prototype.getFilter = function(F) {
              return e.clone$1(this.getLayer(F).filter);
            }, D.prototype.setLayoutProperty = function(F, q, ae, fe) {
              fe === void 0 && (fe = {}), this._checkLoaded();
              var xe = this.getLayer(F);
              xe ? e.deepEqual(xe.getLayoutProperty(q), ae) || (xe.setLayoutProperty(q, ae, fe), this._updateLayer(xe)) : this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style and cannot be styled.")));
            }, D.prototype.getLayoutProperty = function(F, q) {
              var ae = this.getLayer(F);
              if (ae)
                return ae.getLayoutProperty(q);
              this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style.")));
            }, D.prototype.setPaintProperty = function(F, q, ae, fe) {
              fe === void 0 && (fe = {}), this._checkLoaded();
              var xe = this.getLayer(F);
              xe ? e.deepEqual(xe.getPaintProperty(q), ae) || (xe.setPaintProperty(q, ae, fe) && this._updateLayer(xe), this._changed = !0, this._updatedPaintProps[F] = !0) : this.fire(new e.ErrorEvent(new Error("The layer '" + F + "' does not exist in the map's style and cannot be styled.")));
            }, D.prototype.getPaintProperty = function(F, q) {
              return this.getLayer(F).getPaintProperty(q);
            }, D.prototype.setFeatureState = function(F, q) {
              this._checkLoaded();
              var ae = F.source, fe = F.sourceLayer, xe = this.sourceCaches[ae];
              if (xe !== void 0) {
                var ke = xe.getSource().type;
                ke === "geojson" && fe ? this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))) : ke !== "vector" || fe ? (F.id === void 0 && this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))), xe.setFeatureState(fe, F.id, q)) : this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));
              } else
                this.fire(new e.ErrorEvent(new Error("The source '" + ae + "' does not exist in the map's style.")));
            }, D.prototype.removeFeatureState = function(F, q) {
              this._checkLoaded();
              var ae = F.source, fe = this.sourceCaches[ae];
              if (fe !== void 0) {
                var xe = fe.getSource().type, ke = xe === "vector" ? F.sourceLayer : void 0;
                xe !== "vector" || ke ? q && typeof F.id != "string" && typeof F.id != "number" ? this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))) : fe.removeFeatureState(ke, F.id, q) : this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));
              } else
                this.fire(new e.ErrorEvent(new Error("The source '" + ae + "' does not exist in the map's style.")));
            }, D.prototype.getFeatureState = function(F) {
              this._checkLoaded();
              var q = F.source, ae = F.sourceLayer, fe = this.sourceCaches[q];
              if (fe !== void 0) {
                if (fe.getSource().type !== "vector" || ae)
                  return F.id === void 0 && this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))), fe.getFeatureState(ae, F.id);
                this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));
              } else
                this.fire(new e.ErrorEvent(new Error("The source '" + q + "' does not exist in the map's style.")));
            }, D.prototype.getTransition = function() {
              return e.extend({ duration: 300, delay: 0 }, this.stylesheet && this.stylesheet.transition);
            }, D.prototype.serialize = function() {
              return e.filterObject({ version: this.stylesheet.version, name: this.stylesheet.name, metadata: this.stylesheet.metadata, light: this.stylesheet.light, center: this.stylesheet.center, zoom: this.stylesheet.zoom, bearing: this.stylesheet.bearing, pitch: this.stylesheet.pitch, sprite: this.stylesheet.sprite, glyphs: this.stylesheet.glyphs, transition: this.stylesheet.transition, sources: e.mapObject(this.sourceCaches, function(F) {
                return F.serialize();
              }), layers: this._serializeLayers(this._order) }, function(F) {
                return F !== void 0;
              });
            }, D.prototype._updateLayer = function(F) {
              this._updatedLayers[F.id] = !0, F.source && !this._updatedSources[F.source] && this.sourceCaches[F.source].getSource().type !== "raster" && (this._updatedSources[F.source] = "reload", this.sourceCaches[F.source].pause()), this._changed = !0;
            }, D.prototype._flattenAndSortRenderedFeatures = function(F) {
              for (var q = this, ae = function(hn) {
                return q._layers[hn].type === "fill-extrusion";
              }, fe = {}, xe = [], ke = this._order.length - 1; ke >= 0; ke--) {
                var Le = this._order[ke];
                if (ae(Le)) {
                  fe[Le] = ke;
                  for (var Ve = 0, Je = F; Ve < Je.length; Ve += 1) {
                    var at = Je[Ve][Le];
                    if (at)
                      for (var _t = 0, Et = at; _t < Et.length; _t += 1) {
                        var kt = Et[_t];
                        xe.push(kt);
                      }
                  }
                }
              }
              xe.sort(function(hn, on) {
                return on.intersectionZ - hn.intersectionZ;
              });
              for (var At = [], xt = this._order.length - 1; xt >= 0; xt--) {
                var Dt = this._order[xt];
                if (ae(Dt))
                  for (var Ot = xe.length - 1; Ot >= 0; Ot--) {
                    var jt = xe[Ot].feature;
                    if (fe[jt.layer.id] < xt)
                      break;
                    At.push(jt), xe.pop();
                  }
                else
                  for (var rr = 0, dr = F; rr < dr.length; rr += 1) {
                    var Sr = dr[rr][Dt];
                    if (Sr)
                      for (var kr = 0, Jr = Sr; kr < Jr.length; kr += 1) {
                        var Xr = Jr[kr];
                        At.push(Xr.feature);
                      }
                  }
              }
              return At;
            }, D.prototype.queryRenderedFeatures = function(F, q, ae) {
              q && q.filter && this._validate(e.validateStyle.filter, "queryRenderedFeatures.filter", q.filter, null, q);
              var fe = {};
              if (q && q.layers) {
                if (!Array.isArray(q.layers))
                  return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))), [];
                for (var xe = 0, ke = q.layers; xe < ke.length; xe += 1) {
                  var Le = ke[xe], Ve = this._layers[Le];
                  if (!Ve)
                    return this.fire(new e.ErrorEvent(new Error("The layer '" + Le + "' does not exist in the map's style and cannot be queried for features."))), [];
                  fe[Ve.source] = !0;
                }
              }
              var Je = [];
              for (var at in q.availableImages = this._availableImages, this.sourceCaches)
                q.layers && !fe[at] || Je.push(U(this.sourceCaches[at], this._layers, this._serializedLayers, F, q, ae));
              return this.placement && Je.push(function(_t, Et, kt, At, xt, Dt, Ot) {
                for (var jt = {}, rr = Dt.queryRenderedSymbols(At), dr = [], Sr = 0, kr = Object.keys(rr).map(Number); Sr < kr.length; Sr += 1) {
                  var Jr = kr[Sr];
                  dr.push(Ot[Jr]);
                }
                dr.sort(ee);
                for (var Xr = function() {
                  var ua = on[hn], qr = ua.featureIndex.lookupSymbolFeatures(rr[ua.bucketInstanceId], Et, ua.bucketIndex, ua.sourceLayerIndex, xt.filter, xt.layers, xt.availableImages, _t);
                  for (var Mn in qr) {
                    var Zn = jt[Mn] = jt[Mn] || [], qn = qr[Mn];
                    qn.sort(function(Qn, xa) {
                      var ga = ua.featureSortOrder;
                      if (ga) {
                        var Ca = ga.indexOf(Qn.featureIndex);
                        return ga.indexOf(xa.featureIndex) - Ca;
                      }
                      return xa.featureIndex - Qn.featureIndex;
                    });
                    for (var na = 0, ha = qn; na < ha.length; na += 1) {
                      var Sa = ha[na];
                      Zn.push(Sa);
                    }
                  }
                }, hn = 0, on = dr; hn < on.length; hn += 1)
                  Xr();
                var jn = function(ua) {
                  jt[ua].forEach(function(qr) {
                    var Mn = qr.feature, Zn = _t[ua], qn = kt[Zn.source].getFeatureState(Mn.layer["source-layer"], Mn.id);
                    Mn.source = Mn.layer.source, Mn.layer["source-layer"] && (Mn.sourceLayer = Mn.layer["source-layer"]), Mn.state = qn;
                  });
                };
                for (var Wn in jt)
                  jn(Wn);
                return jt;
              }(this._layers, this._serializedLayers, this.sourceCaches, F, q, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(Je);
            }, D.prototype.querySourceFeatures = function(F, q) {
              q && q.filter && this._validate(e.validateStyle.filter, "querySourceFeatures.filter", q.filter, null, q);
              var ae = this.sourceCaches[F];
              return ae ? function(fe, xe) {
                for (var ke = fe.getRenderableIds().map(function(Et) {
                  return fe.getTileByID(Et);
                }), Le = [], Ve = {}, Je = 0; Je < ke.length; Je++) {
                  var at = ke[Je], _t = at.tileID.canonical.key;
                  Ve[_t] || (Ve[_t] = !0, at.querySourceFeatures(Le, xe));
                }
                return Le;
              }(ae, q) : [];
            }, D.prototype.addSourceType = function(F, q, ae) {
              return D.getSourceType(F) ? ae(new Error('A source type called "' + F + '" already exists.')) : (D.setSourceType(F, q), q.workerSourceURL ? void this.dispatcher.broadcast("loadWorkerSource", { name: F, url: q.workerSourceURL }, ae) : ae(null, null));
            }, D.prototype.getLight = function() {
              return this.light.getLight();
            }, D.prototype.setLight = function(F, q) {
              q === void 0 && (q = {}), this._checkLoaded();
              var ae = this.light.getLight(), fe = !1;
              for (var xe in F)
                if (!e.deepEqual(F[xe], ae[xe])) {
                  fe = !0;
                  break;
                }
              if (fe) {
                var ke = { now: e.browser.now(), transition: e.extend({ duration: 300, delay: 0 }, this.stylesheet.transition) };
                this.light.setLight(F, q), this.light.updateTransitions(ke);
              }
            }, D.prototype._validate = function(F, q, ae, fe, xe) {
              return xe === void 0 && (xe = {}), (!xe || xe.validate !== !1) && Kr(this, F.call(e.validateStyle, e.extend({ key: q, style: this.serialize(), value: ae, styleSpec: e.styleSpec }, fe)));
            }, D.prototype._remove = function() {
              for (var F in this._request && (this._request.cancel(), this._request = null), this._spriteRequest && (this._spriteRequest.cancel(), this._spriteRequest = null), e.evented.off("pluginStateChange", this._rtlTextPluginCallback), this._layers)
                this._layers[F].setEventedParent(null);
              for (var q in this.sourceCaches)
                this.sourceCaches[q].clearTiles(), this.sourceCaches[q].setEventedParent(null);
              this.imageManager.setEventedParent(null), this.setEventedParent(null), this.dispatcher.remove();
            }, D.prototype._clearSource = function(F) {
              this.sourceCaches[F].clearTiles();
            }, D.prototype._reloadSource = function(F) {
              this.sourceCaches[F].resume(), this.sourceCaches[F].reload();
            }, D.prototype._updateSources = function(F) {
              for (var q in this.sourceCaches)
                this.sourceCaches[q].update(F);
            }, D.prototype._generateCollisionBoxes = function() {
              for (var F in this.sourceCaches)
                this._reloadSource(F);
            }, D.prototype._updatePlacement = function(F, q, ae, fe, xe) {
              xe === void 0 && (xe = !1);
              for (var ke = !1, Le = !1, Ve = {}, Je = 0, at = this._order; Je < at.length; Je += 1) {
                var _t = at[Je], Et = this._layers[_t];
                if (Et.type === "symbol") {
                  if (!Ve[Et.source]) {
                    var kt = this.sourceCaches[Et.source];
                    Ve[Et.source] = kt.getRenderableIds(!0).map(function(rr) {
                      return kt.getTileByID(rr);
                    }).sort(function(rr, dr) {
                      return dr.tileID.overscaledZ - rr.tileID.overscaledZ || (rr.tileID.isLessThan(dr.tileID) ? -1 : 1);
                    });
                  }
                  var At = this.crossTileSymbolIndex.addLayer(Et, Ve[Et.source], F.center.lng);
                  ke = ke || At;
                }
              }
              if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((xe = xe || this._layerOrderChanged || ae === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(e.browser.now(), F.zoom)) && (this.pauseablePlacement = new vr(F, this._order, xe, q, ae, fe, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, Ve), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(e.browser.now()), Le = !0), ke && this.pauseablePlacement.placement.setStale()), Le || ke)
                for (var xt = 0, Dt = this._order; xt < Dt.length; xt += 1) {
                  var Ot = Dt[xt], jt = this._layers[Ot];
                  jt.type === "symbol" && this.placement.updateLayerOpacities(jt, Ve[jt.source]);
                }
              return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(e.browser.now());
            }, D.prototype._releaseSymbolFadeTiles = function() {
              for (var F in this.sourceCaches)
                this.sourceCaches[F].releaseSymbolFadeTiles();
            }, D.prototype.getImages = function(F, q, ae) {
              this.imageManager.getImages(q.icons, ae), this._updateTilesForChangedImages();
              var fe = this.sourceCaches[q.source];
              fe && fe.setDependencies(q.tileID.key, q.type, q.icons);
            }, D.prototype.getGlyphs = function(F, q, ae) {
              this.glyphManager.getGlyphs(q.stacks, ae);
            }, D.prototype.getResource = function(F, q, ae) {
              return e.makeRequest(q, ae);
            }, D;
          }(e.Evented);
          wn.getSourceType = function(C) {
            return V[C];
          }, wn.setSourceType = function(C, D) {
            V[C] = D;
          }, wn.registerForPluginStateChange = e.registerForPluginStateChange;
          var Ln = e.createLayout([{ name: "a_pos", type: "Int16", components: 2 }]), In = Wa(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`, `#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`), Yn = Wa(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), ka = Wa(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"), Ta = Wa(`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`), An = Wa("void main() {gl_FragColor=vec4(1.0);}", "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), Kn = Wa(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`), Xn = Wa(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`, "uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"), Ia = Wa("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}", "attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"), hi = Wa("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}", "attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"), Ii = Wa("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}", "attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"), so = Wa(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`), Ga = Wa(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`), Ya = Wa(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`), Zi = Wa(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`), Fa = Wa(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`), lo = Wa(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`), ho = Wa(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"), bi = Wa(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"), Xi = Wa(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`), po = Wa(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define MAX_LINE_DISTANCE 32767.0
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`), To = Wa(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`), Ri = Wa(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`), pi = Wa(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"), Yi = Wa(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`), ds = Wa(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`), ys = Wa(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);
          function Wa(C, D) {
            var F = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, q = {};
            return { fragmentSource: C = C.replace(F, function(ae, fe, xe, ke, Le) {
              return q[Le] = !0, fe === "define" ? `
#ifndef HAS_UNIFORM_u_` + Le + `
varying ` + xe + " " + ke + " " + Le + `;
#else
uniform ` + xe + " " + ke + " u_" + Le + `;
#endif
` : `
#ifdef HAS_UNIFORM_u_` + Le + `
    ` + xe + " " + ke + " " + Le + " = u_" + Le + `;
#endif
`;
            }), vertexSource: D = D.replace(F, function(ae, fe, xe, ke, Le) {
              var Ve = ke === "float" ? "vec2" : "vec4", Je = Le.match(/color/) ? "color" : Ve;
              return q[Le] ? fe === "define" ? `
#ifndef HAS_UNIFORM_u_` + Le + `
uniform lowp float u_` + Le + `_t;
attribute ` + xe + " " + Ve + " a_" + Le + `;
varying ` + xe + " " + ke + " " + Le + `;
#else
uniform ` + xe + " " + ke + " u_" + Le + `;
#endif
` : Je === "vec4" ? `
#ifndef HAS_UNIFORM_u_` + Le + `
    ` + Le + " = a_" + Le + `;
#else
    ` + xe + " " + ke + " " + Le + " = u_" + Le + `;
#endif
` : `
#ifndef HAS_UNIFORM_u_` + Le + `
    ` + Le + " = unpack_mix_" + Je + "(a_" + Le + ", u_" + Le + `_t);
#else
    ` + xe + " " + ke + " " + Le + " = u_" + Le + `;
#endif
` : fe === "define" ? `
#ifndef HAS_UNIFORM_u_` + Le + `
uniform lowp float u_` + Le + `_t;
attribute ` + xe + " " + Ve + " a_" + Le + `;
#else
uniform ` + xe + " " + ke + " u_" + Le + `;
#endif
` : Je === "vec4" ? `
#ifndef HAS_UNIFORM_u_` + Le + `
    ` + xe + " " + ke + " " + Le + " = a_" + Le + `;
#else
    ` + xe + " " + ke + " " + Le + " = u_" + Le + `;
#endif
` : `
#ifndef HAS_UNIFORM_u_` + Le + `
    ` + xe + " " + ke + " " + Le + " = unpack_mix_" + Je + "(a_" + Le + ", u_" + Le + `_t);
#else
    ` + xe + " " + ke + " " + Le + " = u_" + Le + `;
#endif
`;
            }) };
          }
          var ls = Object.freeze({ __proto__: null, prelude: In, background: Yn, backgroundPattern: ka, circle: Ta, clippingMask: An, heatmap: Kn, heatmapTexture: Xn, collisionBox: Ia, collisionCircle: hi, debug: Ii, fill: so, fillOutline: Ga, fillOutlinePattern: Ya, fillPattern: Zi, fillExtrusion: Fa, fillExtrusionPattern: lo, hillshadePrepare: ho, hillshade: bi, line: Xi, lineGradient: po, linePattern: To, lineSDF: Ri, raster: pi, symbolIcon: Yi, symbolSDF: ds, symbolTextAndIcon: ys }), Xo = function() {
            this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null;
          };
          Xo.prototype.bind = function(C, D, F, q, ae, fe, xe, ke) {
            this.context = C;
            for (var Le = this.boundPaintVertexBuffers.length !== q.length, Ve = 0; !Le && Ve < q.length; Ve++)
              this.boundPaintVertexBuffers[Ve] !== q[Ve] && (Le = !0);
            var Je = !this.vao || this.boundProgram !== D || this.boundLayoutVertexBuffer !== F || Le || this.boundIndexBuffer !== ae || this.boundVertexOffset !== fe || this.boundDynamicVertexBuffer !== xe || this.boundDynamicVertexBuffer2 !== ke;
            !C.extVertexArrayObject || Je ? this.freshBind(D, F, q, ae, fe, xe, ke) : (C.bindVertexArrayOES.set(this.vao), xe && xe.bind(), ae && ae.dynamicDraw && ae.bind(), ke && ke.bind());
          }, Xo.prototype.freshBind = function(C, D, F, q, ae, fe, xe) {
            var ke, Le = C.numAttributes, Ve = this.context, Je = Ve.gl;
            if (Ve.extVertexArrayObject)
              this.vao && this.destroy(), this.vao = Ve.extVertexArrayObject.createVertexArrayOES(), Ve.bindVertexArrayOES.set(this.vao), ke = 0, this.boundProgram = C, this.boundLayoutVertexBuffer = D, this.boundPaintVertexBuffers = F, this.boundIndexBuffer = q, this.boundVertexOffset = ae, this.boundDynamicVertexBuffer = fe, this.boundDynamicVertexBuffer2 = xe;
            else {
              ke = Ve.currentNumAttributes || 0;
              for (var at = Le; at < ke; at++)
                Je.disableVertexAttribArray(at);
            }
            D.enableAttributes(Je, C);
            for (var _t = 0, Et = F; _t < Et.length; _t += 1)
              Et[_t].enableAttributes(Je, C);
            fe && fe.enableAttributes(Je, C), xe && xe.enableAttributes(Je, C), D.bind(), D.setVertexAttribPointers(Je, C, ae);
            for (var kt = 0, At = F; kt < At.length; kt += 1) {
              var xt = At[kt];
              xt.bind(), xt.setVertexAttribPointers(Je, C, ae);
            }
            fe && (fe.bind(), fe.setVertexAttribPointers(Je, C, ae)), q && q.bind(), xe && (xe.bind(), xe.setVertexAttribPointers(Je, C, ae)), Ve.currentNumAttributes = Le;
          }, Xo.prototype.destroy = function() {
            this.vao && (this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao), this.vao = null);
          };
          var xs = function(C, D, F, q, ae) {
            var fe = C.gl;
            this.program = fe.createProgram();
            var xe = F ? F.defines() : [];
            ae && xe.push("#define OVERDRAW_INSPECTOR;");
            var ke = xe.concat(In.fragmentSource, D.fragmentSource).join(`
`), Le = xe.concat(In.vertexSource, D.vertexSource).join(`
`), Ve = fe.createShader(fe.FRAGMENT_SHADER);
            if (fe.isContextLost())
              this.failedToCreate = !0;
            else {
              fe.shaderSource(Ve, ke), fe.compileShader(Ve), fe.attachShader(this.program, Ve);
              var Je = fe.createShader(fe.VERTEX_SHADER);
              if (fe.isContextLost())
                this.failedToCreate = !0;
              else {
                fe.shaderSource(Je, Le), fe.compileShader(Je), fe.attachShader(this.program, Je);
                for (var at = F ? F.layoutAttributes : [], _t = 0; _t < at.length; _t++)
                  fe.bindAttribLocation(this.program, _t, at[_t].name);
                fe.linkProgram(this.program), fe.deleteShader(Je), fe.deleteShader(Ve), this.numAttributes = fe.getProgramParameter(this.program, fe.ACTIVE_ATTRIBUTES), this.attributes = {};
                for (var Et = {}, kt = 0; kt < this.numAttributes; kt++) {
                  var At = fe.getActiveAttrib(this.program, kt);
                  At && (this.attributes[At.name] = fe.getAttribLocation(this.program, At.name));
                }
                for (var xt = fe.getProgramParameter(this.program, fe.ACTIVE_UNIFORMS), Dt = 0; Dt < xt; Dt++) {
                  var Ot = fe.getActiveUniform(this.program, Dt);
                  Ot && (Et[Ot.name] = fe.getUniformLocation(this.program, Ot.name));
                }
                this.fixedUniforms = q(C, Et), this.binderUniforms = F ? F.getUniforms(C, Et) : [];
              }
            }
          };
          function bs(C, D, F) {
            var q = 1 / vn(F, 1, D.transform.tileZoom), ae = Math.pow(2, F.tileID.overscaledZ), fe = F.tileSize * Math.pow(2, D.transform.tileZoom) / ae, xe = fe * (F.tileID.canonical.x + F.tileID.wrap * ae), ke = fe * F.tileID.canonical.y;
            return { u_image: 0, u_texsize: F.imageAtlasTexture.size, u_scale: [q, C.fromScale, C.toScale], u_fade: C.t, u_pixel_coord_upper: [xe >> 16, ke >> 16], u_pixel_coord_lower: [65535 & xe, 65535 & ke] };
          }
          xs.prototype.draw = function(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je, at, _t, Et, kt, At) {
            var xt, Dt = C.gl;
            if (!this.failedToCreate) {
              for (var Ot in C.program.set(this.program), C.setDepthMode(F), C.setStencilMode(q), C.setColorMode(ae), C.setCullFace(fe), this.fixedUniforms)
                this.fixedUniforms[Ot].set(xe[Ot]);
              Et && Et.setUniforms(C, this.binderUniforms, at, { zoom: _t });
              for (var jt = (xt = {}, xt[Dt.LINES] = 2, xt[Dt.TRIANGLES] = 3, xt[Dt.LINE_STRIP] = 1, xt)[D], rr = 0, dr = Je.get(); rr < dr.length; rr += 1) {
                var Sr = dr[rr], kr = Sr.vaos || (Sr.vaos = {});
                (kr[ke] || (kr[ke] = new Xo())).bind(C, this, Le, Et ? Et.getPaintVertexBuffers() : [], Ve, Sr.vertexOffset, kt, At), Dt.drawElements(D, Sr.primitiveLength * jt, Dt.UNSIGNED_SHORT, Sr.primitiveOffset * jt * 2);
              }
            }
          };
          var ms = function(C, D, F, q) {
            var ae = D.style.light, fe = ae.properties.get("position"), xe = [fe.x, fe.y, fe.z], ke = e.create$1();
            ae.properties.get("anchor") === "viewport" && e.fromRotation(ke, -D.transform.angle), e.transformMat3(xe, xe, ke);
            var Le = ae.properties.get("color");
            return { u_matrix: C, u_lightpos: xe, u_lightintensity: ae.properties.get("intensity"), u_lightcolor: [Le.r, Le.g, Le.b], u_vertical_gradient: +F, u_opacity: q };
          }, _s = function(C, D, F, q, ae, fe, xe) {
            return e.extend(ms(C, D, F, q), bs(fe, D, xe), { u_height_factor: -Math.pow(2, ae.overscaledZ) / xe.tileSize / 8 });
          }, Ao = function(C) {
            return { u_matrix: C };
          }, So = function(C, D, F, q) {
            return e.extend(Ao(C), bs(F, D, q));
          }, Bo = function(C, D) {
            return { u_matrix: C, u_world: D };
          }, No = function(C, D, F, q, ae) {
            return e.extend(So(C, D, F, q), { u_world: ae });
          }, jo = function(C, D, F, q) {
            var ae, fe, xe = C.transform;
            if (q.paint.get("circle-pitch-alignment") === "map") {
              var ke = vn(F, 1, xe.zoom);
              ae = !0, fe = [ke, ke];
            } else
              ae = !1, fe = xe.pixelsToGLUnits;
            return { u_camera_to_center_distance: xe.cameraToCenterDistance, u_scale_with_map: +(q.paint.get("circle-pitch-scale") === "map"), u_matrix: C.translatePosMatrix(D.posMatrix, F, q.paint.get("circle-translate"), q.paint.get("circle-translate-anchor")), u_pitch_with_map: +ae, u_device_pixel_ratio: e.browser.devicePixelRatio, u_extrude_scale: fe };
          }, Jo = function(C, D, F) {
            var q = vn(F, 1, D.zoom), ae = Math.pow(2, D.zoom - F.tileID.overscaledZ), fe = F.tileID.overscaleFactor();
            return { u_matrix: C, u_camera_to_center_distance: D.cameraToCenterDistance, u_pixels_to_tile_units: q, u_extrude_scale: [D.pixelsToGLUnits[0] / (q * ae), D.pixelsToGLUnits[1] / (q * ae)], u_overscale_factor: fe };
          }, mo = function(C, D, F) {
            return { u_matrix: C, u_inv_matrix: D, u_camera_to_center_distance: F.cameraToCenterDistance, u_viewport_size: [F.width, F.height] };
          }, cs = function(C, D, F) {
            return F === void 0 && (F = 1), { u_matrix: C, u_color: D, u_overlay: 0, u_overlay_scale: F };
          }, co = function(C) {
            return { u_matrix: C };
          }, Uo = function(C, D, F, q) {
            return { u_matrix: C, u_extrude_scale: vn(D, 1, F), u_intensity: q };
          };
          function us(C, D) {
            var F = Math.pow(2, D.canonical.z), q = D.canonical.y;
            return [new e.MercatorCoordinate(0, q / F).toLngLat().lat, new e.MercatorCoordinate(0, (q + 1) / F).toLngLat().lat];
          }
          var Eo = function(C, D, F) {
            var q = C.transform;
            return { u_matrix: lt(C, D, F), u_ratio: 1 / vn(D, 1, q.zoom), u_device_pixel_ratio: e.browser.devicePixelRatio, u_units_to_pixels: [1 / q.pixelsToGLUnits[0], 1 / q.pixelsToGLUnits[1]] };
          }, Ha = function(C, D, F) {
            return e.extend(Eo(C, D, F), { u_image: 0 });
          }, je = function(C, D, F, q) {
            var ae = C.transform, fe = et(D, ae);
            return { u_matrix: lt(C, D, F), u_texsize: D.imageAtlasTexture.size, u_ratio: 1 / vn(D, 1, ae.zoom), u_device_pixel_ratio: e.browser.devicePixelRatio, u_image: 0, u_scale: [fe, q.fromScale, q.toScale], u_fade: q.t, u_units_to_pixels: [1 / ae.pixelsToGLUnits[0], 1 / ae.pixelsToGLUnits[1]] };
          }, Ye = function(C, D, F, q, ae) {
            var fe = C.transform, xe = C.lineAtlas, ke = et(D, fe), Le = F.layout.get("line-cap") === "round", Ve = xe.getDash(q.from, Le), Je = xe.getDash(q.to, Le), at = Ve.width * ae.fromScale, _t = Je.width * ae.toScale;
            return e.extend(Eo(C, D, F), { u_patternscale_a: [ke / at, -Ve.height / 2], u_patternscale_b: [ke / _t, -Je.height / 2], u_sdfgamma: xe.width / (256 * Math.min(at, _t) * e.browser.devicePixelRatio) / 2, u_image: 0, u_tex_y_a: Ve.y, u_tex_y_b: Je.y, u_mix: ae.t });
          };
          function et(C, D) {
            return 1 / vn(C, 1, D.tileZoom);
          }
          function lt(C, D, F) {
            return C.translatePosMatrix(D.tileID.posMatrix, D, F.paint.get("line-translate"), F.paint.get("line-translate-anchor"));
          }
          var gt = function(C, D, F, q, ae) {
            return { u_matrix: C, u_tl_parent: D, u_scale_parent: F, u_buffer_scale: 1, u_fade_t: q.mix, u_opacity: q.opacity * ae.paint.get("raster-opacity"), u_image0: 0, u_image1: 1, u_brightness_low: ae.paint.get("raster-brightness-min"), u_brightness_high: ae.paint.get("raster-brightness-max"), u_saturation_factor: (xe = ae.paint.get("raster-saturation"), xe > 0 ? 1 - 1 / (1.001 - xe) : -xe), u_contrast_factor: (fe = ae.paint.get("raster-contrast"), fe > 0 ? 1 / (1 - fe) : 1 + fe), u_spin_weights: pt(ae.paint.get("raster-hue-rotate")) };
            var fe, xe;
          };
          function pt(C) {
            C *= Math.PI / 180;
            var D = Math.sin(C), F = Math.cos(C);
            return [(2 * F + 1) / 3, (-Math.sqrt(3) * D - F + 1) / 3, (Math.sqrt(3) * D - F + 1) / 3];
          }
          var St, Jt = function(C, D, F, q, ae, fe, xe, ke, Le, Ve) {
            var Je = ae.transform;
            return { u_is_size_zoom_constant: +(C === "constant" || C === "source"), u_is_size_feature_constant: +(C === "constant" || C === "camera"), u_size_t: D ? D.uSizeT : 0, u_size: D ? D.uSize : 0, u_camera_to_center_distance: Je.cameraToCenterDistance, u_pitch: Je.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +F, u_aspect_ratio: Je.width / Je.height, u_fade_change: ae.options.fadeDuration ? ae.symbolFadeChange : 1, u_matrix: fe, u_label_plane_matrix: xe, u_coord_matrix: ke, u_is_text: +Le, u_pitch_with_map: +q, u_texsize: Ve, u_texture: 0 };
          }, Qt = function(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je) {
            var at = ae.transform;
            return e.extend(Jt(C, D, F, q, ae, fe, xe, ke, Le, Ve), { u_gamma_scale: q ? Math.cos(at._pitch) * at.cameraToCenterDistance : 1, u_device_pixel_ratio: e.browser.devicePixelRatio, u_is_halo: +Je });
          }, Yt = function(C, D, F, q, ae, fe, xe, ke, Le, Ve) {
            return e.extend(Qt(C, D, F, q, ae, fe, xe, ke, !0, Le, !0), { u_texsize_icon: Ve, u_texture_icon: 1 });
          }, ar = function(C, D, F) {
            return { u_matrix: C, u_opacity: D, u_color: F };
          }, pr = function(C, D, F, q, ae, fe) {
            return e.extend(function(xe, ke, Le, Ve) {
              var Je = Le.imageManager.getPattern(xe.from.toString()), at = Le.imageManager.getPattern(xe.to.toString()), _t = Le.imageManager.getPixelSize(), Et = _t.width, kt = _t.height, At = Math.pow(2, Ve.tileID.overscaledZ), xt = Ve.tileSize * Math.pow(2, Le.transform.tileZoom) / At, Dt = xt * (Ve.tileID.canonical.x + Ve.tileID.wrap * At), Ot = xt * Ve.tileID.canonical.y;
              return { u_image: 0, u_pattern_tl_a: Je.tl, u_pattern_br_a: Je.br, u_pattern_tl_b: at.tl, u_pattern_br_b: at.br, u_texsize: [Et, kt], u_mix: ke.t, u_pattern_size_a: Je.displaySize, u_pattern_size_b: at.displaySize, u_scale_a: ke.fromScale, u_scale_b: ke.toScale, u_tile_units_to_pixels: 1 / vn(Ve, 1, Le.transform.tileZoom), u_pixel_coord_upper: [Dt >> 16, Ot >> 16], u_pixel_coord_lower: [65535 & Dt, 65535 & Ot] };
            }(q, fe, F, ae), { u_matrix: C, u_opacity: D });
          }, br = { fillExtrusion: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_lightpos: new e.Uniform3f(C, D.u_lightpos), u_lightintensity: new e.Uniform1f(C, D.u_lightintensity), u_lightcolor: new e.Uniform3f(C, D.u_lightcolor), u_vertical_gradient: new e.Uniform1f(C, D.u_vertical_gradient), u_opacity: new e.Uniform1f(C, D.u_opacity) };
          }, fillExtrusionPattern: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_lightpos: new e.Uniform3f(C, D.u_lightpos), u_lightintensity: new e.Uniform1f(C, D.u_lightintensity), u_lightcolor: new e.Uniform3f(C, D.u_lightcolor), u_vertical_gradient: new e.Uniform1f(C, D.u_vertical_gradient), u_height_factor: new e.Uniform1f(C, D.u_height_factor), u_image: new e.Uniform1i(C, D.u_image), u_texsize: new e.Uniform2f(C, D.u_texsize), u_pixel_coord_upper: new e.Uniform2f(C, D.u_pixel_coord_upper), u_pixel_coord_lower: new e.Uniform2f(C, D.u_pixel_coord_lower), u_scale: new e.Uniform3f(C, D.u_scale), u_fade: new e.Uniform1f(C, D.u_fade), u_opacity: new e.Uniform1f(C, D.u_opacity) };
          }, fill: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix) };
          }, fillPattern: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_image: new e.Uniform1i(C, D.u_image), u_texsize: new e.Uniform2f(C, D.u_texsize), u_pixel_coord_upper: new e.Uniform2f(C, D.u_pixel_coord_upper), u_pixel_coord_lower: new e.Uniform2f(C, D.u_pixel_coord_lower), u_scale: new e.Uniform3f(C, D.u_scale), u_fade: new e.Uniform1f(C, D.u_fade) };
          }, fillOutline: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_world: new e.Uniform2f(C, D.u_world) };
          }, fillOutlinePattern: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_world: new e.Uniform2f(C, D.u_world), u_image: new e.Uniform1i(C, D.u_image), u_texsize: new e.Uniform2f(C, D.u_texsize), u_pixel_coord_upper: new e.Uniform2f(C, D.u_pixel_coord_upper), u_pixel_coord_lower: new e.Uniform2f(C, D.u_pixel_coord_lower), u_scale: new e.Uniform3f(C, D.u_scale), u_fade: new e.Uniform1f(C, D.u_fade) };
          }, circle: function(C, D) {
            return { u_camera_to_center_distance: new e.Uniform1f(C, D.u_camera_to_center_distance), u_scale_with_map: new e.Uniform1i(C, D.u_scale_with_map), u_pitch_with_map: new e.Uniform1i(C, D.u_pitch_with_map), u_extrude_scale: new e.Uniform2f(C, D.u_extrude_scale), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_matrix: new e.UniformMatrix4f(C, D.u_matrix) };
          }, collisionBox: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_camera_to_center_distance: new e.Uniform1f(C, D.u_camera_to_center_distance), u_pixels_to_tile_units: new e.Uniform1f(C, D.u_pixels_to_tile_units), u_extrude_scale: new e.Uniform2f(C, D.u_extrude_scale), u_overscale_factor: new e.Uniform1f(C, D.u_overscale_factor) };
          }, collisionCircle: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_inv_matrix: new e.UniformMatrix4f(C, D.u_inv_matrix), u_camera_to_center_distance: new e.Uniform1f(C, D.u_camera_to_center_distance), u_viewport_size: new e.Uniform2f(C, D.u_viewport_size) };
          }, debug: function(C, D) {
            return { u_color: new e.UniformColor(C, D.u_color), u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_overlay: new e.Uniform1i(C, D.u_overlay), u_overlay_scale: new e.Uniform1f(C, D.u_overlay_scale) };
          }, clippingMask: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix) };
          }, heatmap: function(C, D) {
            return { u_extrude_scale: new e.Uniform1f(C, D.u_extrude_scale), u_intensity: new e.Uniform1f(C, D.u_intensity), u_matrix: new e.UniformMatrix4f(C, D.u_matrix) };
          }, heatmapTexture: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_world: new e.Uniform2f(C, D.u_world), u_image: new e.Uniform1i(C, D.u_image), u_color_ramp: new e.Uniform1i(C, D.u_color_ramp), u_opacity: new e.Uniform1f(C, D.u_opacity) };
          }, hillshade: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_image: new e.Uniform1i(C, D.u_image), u_latrange: new e.Uniform2f(C, D.u_latrange), u_light: new e.Uniform2f(C, D.u_light), u_shadow: new e.UniformColor(C, D.u_shadow), u_highlight: new e.UniformColor(C, D.u_highlight), u_accent: new e.UniformColor(C, D.u_accent) };
          }, hillshadePrepare: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_image: new e.Uniform1i(C, D.u_image), u_dimension: new e.Uniform2f(C, D.u_dimension), u_zoom: new e.Uniform1f(C, D.u_zoom), u_maxzoom: new e.Uniform1f(C, D.u_maxzoom), u_unpack: new e.Uniform4f(C, D.u_unpack) };
          }, line: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_ratio: new e.Uniform1f(C, D.u_ratio), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_units_to_pixels: new e.Uniform2f(C, D.u_units_to_pixels) };
          }, lineGradient: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_ratio: new e.Uniform1f(C, D.u_ratio), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_units_to_pixels: new e.Uniform2f(C, D.u_units_to_pixels), u_image: new e.Uniform1i(C, D.u_image) };
          }, linePattern: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_texsize: new e.Uniform2f(C, D.u_texsize), u_ratio: new e.Uniform1f(C, D.u_ratio), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_image: new e.Uniform1i(C, D.u_image), u_units_to_pixels: new e.Uniform2f(C, D.u_units_to_pixels), u_scale: new e.Uniform3f(C, D.u_scale), u_fade: new e.Uniform1f(C, D.u_fade) };
          }, lineSDF: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_ratio: new e.Uniform1f(C, D.u_ratio), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_units_to_pixels: new e.Uniform2f(C, D.u_units_to_pixels), u_patternscale_a: new e.Uniform2f(C, D.u_patternscale_a), u_patternscale_b: new e.Uniform2f(C, D.u_patternscale_b), u_sdfgamma: new e.Uniform1f(C, D.u_sdfgamma), u_image: new e.Uniform1i(C, D.u_image), u_tex_y_a: new e.Uniform1f(C, D.u_tex_y_a), u_tex_y_b: new e.Uniform1f(C, D.u_tex_y_b), u_mix: new e.Uniform1f(C, D.u_mix) };
          }, raster: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_tl_parent: new e.Uniform2f(C, D.u_tl_parent), u_scale_parent: new e.Uniform1f(C, D.u_scale_parent), u_buffer_scale: new e.Uniform1f(C, D.u_buffer_scale), u_fade_t: new e.Uniform1f(C, D.u_fade_t), u_opacity: new e.Uniform1f(C, D.u_opacity), u_image0: new e.Uniform1i(C, D.u_image0), u_image1: new e.Uniform1i(C, D.u_image1), u_brightness_low: new e.Uniform1f(C, D.u_brightness_low), u_brightness_high: new e.Uniform1f(C, D.u_brightness_high), u_saturation_factor: new e.Uniform1f(C, D.u_saturation_factor), u_contrast_factor: new e.Uniform1f(C, D.u_contrast_factor), u_spin_weights: new e.Uniform3f(C, D.u_spin_weights) };
          }, symbolIcon: function(C, D) {
            return { u_is_size_zoom_constant: new e.Uniform1i(C, D.u_is_size_zoom_constant), u_is_size_feature_constant: new e.Uniform1i(C, D.u_is_size_feature_constant), u_size_t: new e.Uniform1f(C, D.u_size_t), u_size: new e.Uniform1f(C, D.u_size), u_camera_to_center_distance: new e.Uniform1f(C, D.u_camera_to_center_distance), u_pitch: new e.Uniform1f(C, D.u_pitch), u_rotate_symbol: new e.Uniform1i(C, D.u_rotate_symbol), u_aspect_ratio: new e.Uniform1f(C, D.u_aspect_ratio), u_fade_change: new e.Uniform1f(C, D.u_fade_change), u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_label_plane_matrix: new e.UniformMatrix4f(C, D.u_label_plane_matrix), u_coord_matrix: new e.UniformMatrix4f(C, D.u_coord_matrix), u_is_text: new e.Uniform1i(C, D.u_is_text), u_pitch_with_map: new e.Uniform1i(C, D.u_pitch_with_map), u_texsize: new e.Uniform2f(C, D.u_texsize), u_texture: new e.Uniform1i(C, D.u_texture) };
          }, symbolSDF: function(C, D) {
            return { u_is_size_zoom_constant: new e.Uniform1i(C, D.u_is_size_zoom_constant), u_is_size_feature_constant: new e.Uniform1i(C, D.u_is_size_feature_constant), u_size_t: new e.Uniform1f(C, D.u_size_t), u_size: new e.Uniform1f(C, D.u_size), u_camera_to_center_distance: new e.Uniform1f(C, D.u_camera_to_center_distance), u_pitch: new e.Uniform1f(C, D.u_pitch), u_rotate_symbol: new e.Uniform1i(C, D.u_rotate_symbol), u_aspect_ratio: new e.Uniform1f(C, D.u_aspect_ratio), u_fade_change: new e.Uniform1f(C, D.u_fade_change), u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_label_plane_matrix: new e.UniformMatrix4f(C, D.u_label_plane_matrix), u_coord_matrix: new e.UniformMatrix4f(C, D.u_coord_matrix), u_is_text: new e.Uniform1i(C, D.u_is_text), u_pitch_with_map: new e.Uniform1i(C, D.u_pitch_with_map), u_texsize: new e.Uniform2f(C, D.u_texsize), u_texture: new e.Uniform1i(C, D.u_texture), u_gamma_scale: new e.Uniform1f(C, D.u_gamma_scale), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_is_halo: new e.Uniform1i(C, D.u_is_halo) };
          }, symbolTextAndIcon: function(C, D) {
            return { u_is_size_zoom_constant: new e.Uniform1i(C, D.u_is_size_zoom_constant), u_is_size_feature_constant: new e.Uniform1i(C, D.u_is_size_feature_constant), u_size_t: new e.Uniform1f(C, D.u_size_t), u_size: new e.Uniform1f(C, D.u_size), u_camera_to_center_distance: new e.Uniform1f(C, D.u_camera_to_center_distance), u_pitch: new e.Uniform1f(C, D.u_pitch), u_rotate_symbol: new e.Uniform1i(C, D.u_rotate_symbol), u_aspect_ratio: new e.Uniform1f(C, D.u_aspect_ratio), u_fade_change: new e.Uniform1f(C, D.u_fade_change), u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_label_plane_matrix: new e.UniformMatrix4f(C, D.u_label_plane_matrix), u_coord_matrix: new e.UniformMatrix4f(C, D.u_coord_matrix), u_is_text: new e.Uniform1i(C, D.u_is_text), u_pitch_with_map: new e.Uniform1i(C, D.u_pitch_with_map), u_texsize: new e.Uniform2f(C, D.u_texsize), u_texsize_icon: new e.Uniform2f(C, D.u_texsize_icon), u_texture: new e.Uniform1i(C, D.u_texture), u_texture_icon: new e.Uniform1i(C, D.u_texture_icon), u_gamma_scale: new e.Uniform1f(C, D.u_gamma_scale), u_device_pixel_ratio: new e.Uniform1f(C, D.u_device_pixel_ratio), u_is_halo: new e.Uniform1i(C, D.u_is_halo) };
          }, background: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_opacity: new e.Uniform1f(C, D.u_opacity), u_color: new e.UniformColor(C, D.u_color) };
          }, backgroundPattern: function(C, D) {
            return { u_matrix: new e.UniformMatrix4f(C, D.u_matrix), u_opacity: new e.Uniform1f(C, D.u_opacity), u_image: new e.Uniform1i(C, D.u_image), u_pattern_tl_a: new e.Uniform2f(C, D.u_pattern_tl_a), u_pattern_br_a: new e.Uniform2f(C, D.u_pattern_br_a), u_pattern_tl_b: new e.Uniform2f(C, D.u_pattern_tl_b), u_pattern_br_b: new e.Uniform2f(C, D.u_pattern_br_b), u_texsize: new e.Uniform2f(C, D.u_texsize), u_mix: new e.Uniform1f(C, D.u_mix), u_pattern_size_a: new e.Uniform2f(C, D.u_pattern_size_a), u_pattern_size_b: new e.Uniform2f(C, D.u_pattern_size_b), u_scale_a: new e.Uniform1f(C, D.u_scale_a), u_scale_b: new e.Uniform1f(C, D.u_scale_b), u_pixel_coord_upper: new e.Uniform2f(C, D.u_pixel_coord_upper), u_pixel_coord_lower: new e.Uniform2f(C, D.u_pixel_coord_lower), u_tile_units_to_pixels: new e.Uniform1f(C, D.u_tile_units_to_pixels) };
          } };
          function _r(C, D, F, q, ae, fe, xe) {
            for (var ke = C.context, Le = ke.gl, Ve = C.useProgram("collisionBox"), Je = [], at = 0, _t = 0, Et = 0; Et < q.length; Et++) {
              var kt = q[Et], At = D.getTile(kt), xt = At.getBucket(F);
              if (xt) {
                var Dt = kt.posMatrix;
                ae[0] === 0 && ae[1] === 0 || (Dt = C.translatePosMatrix(kt.posMatrix, At, ae, fe));
                var Ot = xe ? xt.textCollisionBox : xt.iconCollisionBox, jt = xt.collisionCircleArray;
                if (jt.length > 0) {
                  var rr = e.create(), dr = Dt;
                  e.mul(rr, xt.placementInvProjMatrix, C.transform.glCoordMatrix), e.mul(rr, rr, xt.placementViewportMatrix), Je.push({ circleArray: jt, circleOffset: _t, transform: dr, invTransform: rr }), _t = at += jt.length / 4;
                }
                Ot && Ve.draw(ke, Le.LINES, It.disabled, Be.disabled, C.colorModeForRenderPass(), he.disabled, Jo(Dt, C.transform, At), F.id, Ot.layoutVertexBuffer, Ot.indexBuffer, Ot.segments, null, C.transform.zoom, null, null, Ot.collisionVertexBuffer);
              }
            }
            if (xe && Je.length) {
              var Sr = C.useProgram("collisionCircle"), kr = new e.StructArrayLayout2f1f2i16();
              kr.resize(4 * at), kr._trim();
              for (var Jr = 0, Xr = 0, hn = Je; Xr < hn.length; Xr += 1)
                for (var on = hn[Xr], jn = 0; jn < on.circleArray.length / 4; jn++) {
                  var Wn = 4 * jn, ua = on.circleArray[Wn + 0], qr = on.circleArray[Wn + 1], Mn = on.circleArray[Wn + 2], Zn = on.circleArray[Wn + 3];
                  kr.emplace(Jr++, ua, qr, Mn, Zn, 0), kr.emplace(Jr++, ua, qr, Mn, Zn, 1), kr.emplace(Jr++, ua, qr, Mn, Zn, 2), kr.emplace(Jr++, ua, qr, Mn, Zn, 3);
                }
              (!St || St.length < 2 * at) && (St = function(ga) {
                var Ca = 2 * ga, ba = new e.StructArrayLayout3ui6();
                ba.resize(Ca), ba._trim();
                for (var Pa = 0; Pa < Ca; Pa++) {
                  var Ua = 6 * Pa;
                  ba.uint16[Ua + 0] = 4 * Pa + 0, ba.uint16[Ua + 1] = 4 * Pa + 1, ba.uint16[Ua + 2] = 4 * Pa + 2, ba.uint16[Ua + 3] = 4 * Pa + 2, ba.uint16[Ua + 4] = 4 * Pa + 3, ba.uint16[Ua + 5] = 4 * Pa + 0;
                }
                return ba;
              }(at));
              for (var qn = ke.createIndexBuffer(St, !0), na = ke.createVertexBuffer(kr, e.collisionCircleLayout.members, !0), ha = 0, Sa = Je; ha < Sa.length; ha += 1) {
                var Qn = Sa[ha], xa = mo(Qn.transform, Qn.invTransform, C.transform);
                Sr.draw(ke, Le.TRIANGLES, It.disabled, Be.disabled, C.colorModeForRenderPass(), he.disabled, xa, F.id, na, qn, e.SegmentVector.simpleSegment(0, 2 * Qn.circleOffset, Qn.circleArray.length, Qn.circleArray.length / 2), null, C.transform.zoom, null, null, null);
              }
              na.destroy(), qn.destroy();
            }
          }
          var zr = e.identity(new Float32Array(16));
          function nn(C, D, F, q, ae, fe) {
            var xe = e.getAnchorAlignment(C), ke = -(xe.horizontalAlign - 0.5) * D, Le = -(xe.verticalAlign - 0.5) * F, Ve = e.evaluateVariableOffset(C, q);
            return new e.Point((ke / ae + Ve[0]) * fe, (Le / ae + Ve[1]) * fe);
          }
          function pn(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je) {
            var at = C.text.placedSymbolArray, _t = C.text.dynamicLayoutVertexArray, Et = C.icon.dynamicLayoutVertexArray, kt = {};
            _t.clear();
            for (var At = 0; At < at.length; At++) {
              var xt = at.get(At), Dt = C.allowVerticalPlacement && !xt.placedOrientation, Ot = xt.hidden || !xt.crossTileID || Dt ? null : q[xt.crossTileID];
              if (Ot) {
                var jt = new e.Point(xt.anchorX, xt.anchorY), rr = Kt(jt, F ? ke : xe), dr = $t(fe.cameraToCenterDistance, rr.signedDistanceFromCamera), Sr = ae.evaluateSizeForFeature(C.textSizeData, Ve, xt) * dr / e.ONE_EM;
                F && (Sr *= C.tilePixelRatio / Le);
                for (var kr = Ot.width, Jr = Ot.height, Xr = nn(Ot.anchor, kr, Jr, Ot.textOffset, Ot.textBoxScale, Sr), hn = F ? Kt(jt.add(Xr), xe).point : rr.point.add(D ? Xr.rotate(-fe.angle) : Xr), on = C.allowVerticalPlacement && xt.placedOrientation === e.WritingMode.vertical ? Math.PI / 2 : 0, jn = 0; jn < xt.numGlyphs; jn++)
                  e.addDynamicAttributes(_t, hn, on);
                Je && xt.associatedIconIndex >= 0 && (kt[xt.associatedIconIndex] = { shiftedAnchor: hn, angle: on });
              } else
                $r(xt.numGlyphs, _t);
            }
            if (Je) {
              Et.clear();
              for (var Wn = C.icon.placedSymbolArray, ua = 0; ua < Wn.length; ua++) {
                var qr = Wn.get(ua);
                if (qr.hidden)
                  $r(qr.numGlyphs, Et);
                else {
                  var Mn = kt[ua];
                  if (Mn)
                    for (var Zn = 0; Zn < qr.numGlyphs; Zn++)
                      e.addDynamicAttributes(Et, Mn.shiftedAnchor, Mn.angle);
                  else
                    $r(qr.numGlyphs, Et);
                }
              }
              C.icon.dynamicLayoutVertexBuffer.updateData(Et);
            }
            C.text.dynamicLayoutVertexBuffer.updateData(_t);
          }
          function Cn(C, D, F) {
            return F.iconsInText && D ? "symbolTextAndIcon" : C ? "symbolSDF" : "symbolIcon";
          }
          function On(C, D, F, q, ae, fe, xe, ke, Le, Ve, Je, at) {
            for (var _t = C.context, Et = _t.gl, kt = C.transform, At = ke === "map", xt = Le === "map", Dt = At && F.layout.get("symbol-placement") !== "point", Ot = At && !xt && !Dt, jt = F.layout.get("symbol-sort-key").constantOr(1) !== void 0, rr = C.depthModeForSublayer(0, It.ReadOnly), dr = F.layout.get("text-variable-anchor"), Sr = [], kr = 0, Jr = q; kr < Jr.length; kr += 1) {
              var Xr = Jr[kr], hn = D.getTile(Xr), on = hn.getBucket(F);
              if (on) {
                var jn = ae ? on.text : on.icon;
                if (jn && jn.segments.get().length) {
                  var Wn = jn.programConfigurations.get(F.id), ua = ae || on.sdfIcons, qr = ae ? on.textSizeData : on.iconSizeData, Mn = xt || kt.pitch !== 0, Zn = C.useProgram(Cn(ua, ae, on), Wn), qn = e.evaluateSizeForZoom(qr, kt.zoom), na = void 0, ha = [0, 0], Sa = void 0, Qn = void 0, xa = null, ga = void 0;
                  if (ae) {
                    if (Sa = hn.glyphAtlasTexture, Qn = Et.LINEAR, na = hn.glyphAtlasTexture.size, on.iconsInText) {
                      ha = hn.imageAtlasTexture.size, xa = hn.imageAtlasTexture;
                      var Ca = qr.kind === "composite" || qr.kind === "camera";
                      ga = Mn || C.options.rotating || C.options.zooming || Ca ? Et.LINEAR : Et.NEAREST;
                    }
                  } else {
                    var ba = F.layout.get("icon-size").constantOr(0) !== 1 || on.iconsNeedLinear;
                    Sa = hn.imageAtlasTexture, Qn = ua || C.options.rotating || C.options.zooming || ba || Mn ? Et.LINEAR : Et.NEAREST, na = hn.imageAtlasTexture.size;
                  }
                  var Pa = vn(hn, 1, C.transform.zoom), Ua = Tr(Xr.posMatrix, xt, At, C.transform, Pa), ci = ur(Xr.posMatrix, xt, At, C.transform, Pa), Ci = dr && on.hasTextData(), Pi = F.layout.get("icon-text-fit") !== "none" && Ci && on.hasIconData();
                  Dt && cr(on, Xr.posMatrix, C, ae, Ua, ci, xt, Ve);
                  var li = C.translatePosMatrix(Xr.posMatrix, hn, fe, xe), Ti = Dt || ae && dr || Pi ? zr : Ua, mi = C.translatePosMatrix(ci, hn, fe, xe, !0), yo = ua && F.paint.get(ae ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0, qi = { program: Zn, buffers: jn, uniformValues: ua ? on.iconsInText ? Yt(qr.kind, qn, Ot, xt, C, li, Ti, mi, na, ha) : Qt(qr.kind, qn, Ot, xt, C, li, Ti, mi, ae, na, !0) : Jt(qr.kind, qn, Ot, xt, C, li, Ti, mi, ae, na), atlasTexture: Sa, atlasTextureIcon: xa, atlasInterpolation: Qn, atlasInterpolationIcon: ga, isSDF: ua, hasHalo: yo };
                  if (jt)
                    for (var zo = 0, vs = jn.segments.get(); zo < vs.length; zo += 1) {
                      var Fs = vs[zo];
                      Sr.push({ segments: new e.SegmentVector([Fs]), sortKey: Fs.sortKey, state: qi });
                    }
                  else
                    Sr.push({ segments: jn.segments, sortKey: 0, state: qi });
                }
              }
            }
            jt && Sr.sort(function(cl, es) {
              return cl.sortKey - es.sortKey;
            });
            for (var ll = 0, Qs = Sr; ll < Qs.length; ll += 1) {
              var $s = Qs[ll], xo = $s.state;
              if (_t.activeTexture.set(Et.TEXTURE0), xo.atlasTexture.bind(xo.atlasInterpolation, Et.CLAMP_TO_EDGE), xo.atlasTextureIcon && (_t.activeTexture.set(Et.TEXTURE1), xo.atlasTextureIcon && xo.atlasTextureIcon.bind(xo.atlasInterpolationIcon, Et.CLAMP_TO_EDGE)), xo.isSDF) {
                var Us = xo.uniformValues;
                xo.hasHalo && (Us.u_is_halo = 1, Vn(xo.buffers, $s.segments, F, C, xo.program, rr, Je, at, Us)), Us.u_is_halo = 0;
              }
              Vn(xo.buffers, $s.segments, F, C, xo.program, rr, Je, at, xo.uniformValues);
            }
          }
          function Vn(C, D, F, q, ae, fe, xe, ke, Le) {
            var Ve = q.context, Je = Ve.gl;
            ae.draw(Ve, Je.TRIANGLES, fe, xe, ke, he.disabled, Le, F.id, C.layoutVertexBuffer, C.indexBuffer, D, F.paint, q.transform.zoom, C.programConfigurations.get(F.id), C.dynamicLayoutVertexBuffer, C.opacityVertexBuffer);
          }
          function zn(C, D, F, q, ae, fe, xe) {
            var ke, Le, Ve, Je, at, _t = C.context.gl, Et = F.paint.get("fill-pattern"), kt = Et && Et.constantOr(1), At = F.getCrossfadeParameters();
            xe ? (Le = kt && !F.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", ke = _t.LINES) : (Le = kt ? "fillPattern" : "fill", ke = _t.TRIANGLES);
            for (var xt = 0, Dt = q; xt < Dt.length; xt += 1) {
              var Ot = Dt[xt], jt = D.getTile(Ot);
              if (!kt || jt.patternsLoaded()) {
                var rr = jt.getBucket(F);
                if (rr) {
                  var dr = rr.programConfigurations.get(F.id), Sr = C.useProgram(Le, dr);
                  kt && (C.context.activeTexture.set(_t.TEXTURE0), jt.imageAtlasTexture.bind(_t.LINEAR, _t.CLAMP_TO_EDGE), dr.updatePaintBuffers(At));
                  var kr = Et.constantOr(null);
                  if (kr && jt.imageAtlas) {
                    var Jr = jt.imageAtlas, Xr = Jr.patternPositions[kr.to.toString()], hn = Jr.patternPositions[kr.from.toString()];
                    Xr && hn && dr.setConstantPatternPositions(Xr, hn);
                  }
                  var on = C.translatePosMatrix(Ot.posMatrix, jt, F.paint.get("fill-translate"), F.paint.get("fill-translate-anchor"));
                  if (xe) {
                    Je = rr.indexBuffer2, at = rr.segments2;
                    var jn = [_t.drawingBufferWidth, _t.drawingBufferHeight];
                    Ve = Le === "fillOutlinePattern" && kt ? No(on, C, At, jt, jn) : Bo(on, jn);
                  } else
                    Je = rr.indexBuffer, at = rr.segments, Ve = kt ? So(on, C, At, jt) : Ao(on);
                  Sr.draw(C.context, ke, ae, C.stencilModeForClipping(Ot), fe, he.disabled, Ve, F.id, rr.layoutVertexBuffer, Je, at, F.paint, C.transform.zoom, dr);
                }
              }
            }
          }
          function ma(C, D, F, q, ae, fe, xe) {
            for (var ke = C.context, Le = ke.gl, Ve = F.paint.get("fill-extrusion-pattern"), Je = Ve.constantOr(1), at = F.getCrossfadeParameters(), _t = F.paint.get("fill-extrusion-opacity"), Et = 0, kt = q; Et < kt.length; Et += 1) {
              var At = kt[Et], xt = D.getTile(At), Dt = xt.getBucket(F);
              if (Dt) {
                var Ot = Dt.programConfigurations.get(F.id), jt = C.useProgram(Je ? "fillExtrusionPattern" : "fillExtrusion", Ot);
                Je && (C.context.activeTexture.set(Le.TEXTURE0), xt.imageAtlasTexture.bind(Le.LINEAR, Le.CLAMP_TO_EDGE), Ot.updatePaintBuffers(at));
                var rr = Ve.constantOr(null);
                if (rr && xt.imageAtlas) {
                  var dr = xt.imageAtlas, Sr = dr.patternPositions[rr.to.toString()], kr = dr.patternPositions[rr.from.toString()];
                  Sr && kr && Ot.setConstantPatternPositions(Sr, kr);
                }
                var Jr = C.translatePosMatrix(At.posMatrix, xt, F.paint.get("fill-extrusion-translate"), F.paint.get("fill-extrusion-translate-anchor")), Xr = F.paint.get("fill-extrusion-vertical-gradient"), hn = Je ? _s(Jr, C, Xr, _t, At, at, xt) : ms(Jr, C, Xr, _t);
                jt.draw(ke, ke.gl.TRIANGLES, ae, fe, xe, he.backCCW, hn, F.id, Dt.layoutVertexBuffer, Dt.indexBuffer, Dt.segments, F.paint, C.transform.zoom, Ot);
              }
            }
          }
          function Ma(C, D, F, q, ae, fe) {
            var xe = C.context, ke = xe.gl, Le = D.fbo;
            if (Le) {
              var Ve = C.useProgram("hillshade");
              xe.activeTexture.set(ke.TEXTURE0), ke.bindTexture(ke.TEXTURE_2D, Le.colorAttachment.get());
              var Je = function(at, _t, Et) {
                var kt = Et.paint.get("hillshade-shadow-color"), At = Et.paint.get("hillshade-highlight-color"), xt = Et.paint.get("hillshade-accent-color"), Dt = Et.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
                Et.paint.get("hillshade-illumination-anchor") === "viewport" && (Dt -= at.transform.angle);
                var Ot = !at.options.moving;
                return { u_matrix: at.transform.calculatePosMatrix(_t.tileID.toUnwrapped(), Ot), u_image: 0, u_latrange: us(at, _t.tileID), u_light: [Et.paint.get("hillshade-exaggeration"), Dt], u_shadow: kt, u_highlight: At, u_accent: xt };
              }(C, D, F);
              Ve.draw(xe, ke.TRIANGLES, q, ae, fe, he.disabled, Je, F.id, C.rasterBoundsBuffer, C.quadTriangleIndexBuffer, C.rasterBoundsSegments);
            }
          }
          function Na(C, D, F, q, ae, fe, xe) {
            var ke = C.context, Le = ke.gl, Ve = D.dem;
            if (Ve && Ve.data) {
              var Je = Ve.dim, at = Ve.stride, _t = Ve.getPixels();
              if (ke.activeTexture.set(Le.TEXTURE1), ke.pixelStoreUnpackPremultiplyAlpha.set(!1), D.demTexture = D.demTexture || C.getTileTexture(at), D.demTexture) {
                var Et = D.demTexture;
                Et.update(_t, { premultiply: !1 }), Et.bind(Le.NEAREST, Le.CLAMP_TO_EDGE);
              } else
                D.demTexture = new e.Texture(ke, _t, Le.RGBA, { premultiply: !1 }), D.demTexture.bind(Le.NEAREST, Le.CLAMP_TO_EDGE);
              ke.activeTexture.set(Le.TEXTURE0);
              var kt = D.fbo;
              if (!kt) {
                var At = new e.Texture(ke, { width: Je, height: Je, data: null }, Le.RGBA);
                At.bind(Le.LINEAR, Le.CLAMP_TO_EDGE), (kt = D.fbo = ke.createFramebuffer(Je, Je, !0)).colorAttachment.set(At.texture);
              }
              ke.bindFramebuffer.set(kt.framebuffer), ke.viewport.set([0, 0, Je, Je]), C.useProgram("hillshadePrepare").draw(ke, Le.TRIANGLES, ae, fe, xe, he.disabled, function(xt, Dt, Ot) {
                var jt = Dt.stride, rr = e.create();
                return e.ortho(rr, 0, e.EXTENT, -e.EXTENT, 0, 0, 1), e.translate(rr, rr, [0, -e.EXTENT, 0]), { u_matrix: rr, u_image: 1, u_dimension: [jt, jt], u_zoom: xt.overscaledZ, u_maxzoom: Ot, u_unpack: Dt.getUnpackVector() };
              }(D.tileID, Ve, q), F.id, C.rasterBoundsBuffer, C.quadTriangleIndexBuffer, C.rasterBoundsSegments), D.needsHillshadePrepare = !1;
            }
          }
          function Ba(C, D, F, q, ae) {
            var fe = q.paint.get("raster-fade-duration");
            if (fe > 0) {
              var xe = e.browser.now(), ke = (xe - C.timeAdded) / fe, Le = D ? (xe - D.timeAdded) / fe : -1, Ve = F.getSource(), Je = ae.coveringZoomLevel({ tileSize: Ve.tileSize, roundZoom: Ve.roundZoom }), at = !D || Math.abs(D.tileID.overscaledZ - Je) > Math.abs(C.tileID.overscaledZ - Je), _t = at && C.refreshedUponExpiration ? 1 : e.clamp(at ? ke : 1 - Le, 0, 1);
              return C.refreshedUponExpiration && ke >= 1 && (C.refreshedUponExpiration = !1), D ? { opacity: 1, mix: 1 - _t } : { opacity: _t, mix: 0 };
            }
            return { opacity: 1, mix: 0 };
          }
          var ja = new e.Color(1, 0, 0, 1), _i = new e.Color(0, 1, 0, 1), yi = new e.Color(0, 0, 1, 1), ii = new e.Color(1, 0, 1, 1), oi = new e.Color(0, 1, 1, 1);
          function xi(C) {
            var D = C.transform.padding;
            Fi(C, C.transform.height - (D.top || 0), 3, ja), Fi(C, D.bottom || 0, 3, _i), Ji(C, D.left || 0, 3, yi), Ji(C, C.transform.width - (D.right || 0), 3, ii);
            var F = C.transform.centerPoint;
            (function(q, ae, fe, xe) {
              Ki(q, ae - 1, fe - 10, 2, 20, xe), Ki(q, ae - 10, fe - 1, 20, 2, xe);
            })(C, F.x, C.transform.height - F.y, oi);
          }
          function Fi(C, D, F, q) {
            Ki(C, 0, D + F / 2, C.transform.width, F, q);
          }
          function Ji(C, D, F, q) {
            Ki(C, D - F / 2, 0, F, C.transform.height, q);
          }
          function Ki(C, D, F, q, ae, fe) {
            var xe = C.context, ke = xe.gl;
            ke.enable(ke.SCISSOR_TEST), ke.scissor(D * e.browser.devicePixelRatio, F * e.browser.devicePixelRatio, q * e.browser.devicePixelRatio, ae * e.browser.devicePixelRatio), xe.clear({ color: fe }), ke.disable(ke.SCISSOR_TEST);
          }
          function Qi(C, D, F) {
            var q = C.context, ae = q.gl, fe = F.posMatrix, xe = C.useProgram("debug"), ke = It.disabled, Le = Be.disabled, Ve = C.colorModeForRenderPass();
            q.activeTexture.set(ae.TEXTURE0), C.emptyTexture.bind(ae.LINEAR, ae.CLAMP_TO_EDGE), xe.draw(q, ae.LINE_STRIP, ke, Le, Ve, he.disabled, cs(fe, e.Color.red), "$debug", C.debugBuffer, C.tileBorderIndexBuffer, C.debugSegments);
            var Je = D.getTileByID(F.key).latestRawTileData, at = Je && Je.byteLength || 0, _t = Math.floor(at / 1024), Et = D.getTile(F).tileSize, kt = 512 / Math.min(Et, 512) * (F.overscaledZ / C.transform.zoom) * 0.5, At = F.canonical.toString();
            F.overscaledZ !== F.canonical.z && (At += " => " + F.overscaledZ), function(xt, Dt) {
              xt.initDebugOverlayCanvas();
              var Ot = xt.debugOverlayCanvas, jt = xt.context.gl, rr = xt.debugOverlayCanvas.getContext("2d");
              rr.clearRect(0, 0, Ot.width, Ot.height), rr.shadowColor = "white", rr.shadowBlur = 2, rr.lineWidth = 1.5, rr.strokeStyle = "white", rr.textBaseline = "top", rr.font = "bold 36px Open Sans, sans-serif", rr.fillText(Dt, 5, 5), rr.strokeText(Dt, 5, 5), xt.debugOverlayTexture.update(Ot), xt.debugOverlayTexture.bind(jt.LINEAR, jt.CLAMP_TO_EDGE);
            }(C, At + " " + _t + "kb"), xe.draw(q, ae.TRIANGLES, ke, Le, He.alphaBlended, he.disabled, cs(fe, e.Color.transparent, kt), "$debug", C.debugBuffer, C.quadTriangleIndexBuffer, C.debugSegments);
          }
          var $i = { symbol: function(C, D, F, q, ae) {
            if (C.renderPass === "translucent") {
              var fe = Be.disabled, xe = C.colorModeForRenderPass();
              F.layout.get("text-variable-anchor") && function(ke, Le, Ve, Je, at, _t, Et) {
                for (var kt = Le.transform, At = at === "map", xt = _t === "map", Dt = 0, Ot = ke; Dt < Ot.length; Dt += 1) {
                  var jt = Ot[Dt], rr = Je.getTile(jt), dr = rr.getBucket(Ve);
                  if (dr && dr.text && dr.text.segments.get().length) {
                    var Sr = dr.textSizeData, kr = e.evaluateSizeForZoom(Sr, kt.zoom), Jr = vn(rr, 1, Le.transform.zoom), Xr = Tr(jt.posMatrix, xt, At, Le.transform, Jr), hn = Ve.layout.get("icon-text-fit") !== "none" && dr.hasIconData();
                    if (kr) {
                      var on = Math.pow(2, kt.zoom - rr.tileID.overscaledZ);
                      pn(dr, At, xt, Et, e.symbolSize, kt, Xr, jt.posMatrix, on, kr, hn);
                    }
                  }
                }
              }(q, C, F, D, F.layout.get("text-rotation-alignment"), F.layout.get("text-pitch-alignment"), ae), F.paint.get("icon-opacity").constantOr(1) !== 0 && On(C, D, F, q, !1, F.paint.get("icon-translate"), F.paint.get("icon-translate-anchor"), F.layout.get("icon-rotation-alignment"), F.layout.get("icon-pitch-alignment"), F.layout.get("icon-keep-upright"), fe, xe), F.paint.get("text-opacity").constantOr(1) !== 0 && On(C, D, F, q, !0, F.paint.get("text-translate"), F.paint.get("text-translate-anchor"), F.layout.get("text-rotation-alignment"), F.layout.get("text-pitch-alignment"), F.layout.get("text-keep-upright"), fe, xe), D.map.showCollisionBoxes && (_r(C, D, F, q, F.paint.get("text-translate"), F.paint.get("text-translate-anchor"), !0), _r(C, D, F, q, F.paint.get("icon-translate"), F.paint.get("icon-translate-anchor"), !1));
            }
          }, circle: function(C, D, F, q) {
            if (C.renderPass === "translucent") {
              var ae = F.paint.get("circle-opacity"), fe = F.paint.get("circle-stroke-width"), xe = F.paint.get("circle-stroke-opacity"), ke = F.layout.get("circle-sort-key").constantOr(1) !== void 0;
              if (ae.constantOr(1) !== 0 || fe.constantOr(1) !== 0 && xe.constantOr(1) !== 0) {
                for (var Le = C.context, Ve = Le.gl, Je = C.depthModeForSublayer(0, It.ReadOnly), at = Be.disabled, _t = C.colorModeForRenderPass(), Et = [], kt = 0; kt < q.length; kt++) {
                  var At = q[kt], xt = D.getTile(At), Dt = xt.getBucket(F);
                  if (Dt) {
                    var Ot = Dt.programConfigurations.get(F.id), jt = { programConfiguration: Ot, program: C.useProgram("circle", Ot), layoutVertexBuffer: Dt.layoutVertexBuffer, indexBuffer: Dt.indexBuffer, uniformValues: jo(C, At, xt, F) };
                    if (ke)
                      for (var rr = 0, dr = Dt.segments.get(); rr < dr.length; rr += 1) {
                        var Sr = dr[rr];
                        Et.push({ segments: new e.SegmentVector([Sr]), sortKey: Sr.sortKey, state: jt });
                      }
                    else
                      Et.push({ segments: Dt.segments, sortKey: 0, state: jt });
                  }
                }
                ke && Et.sort(function(Zn, qn) {
                  return Zn.sortKey - qn.sortKey;
                });
                for (var kr = 0, Jr = Et; kr < Jr.length; kr += 1) {
                  var Xr = Jr[kr], hn = Xr.state, on = hn.programConfiguration, jn = hn.program, Wn = hn.layoutVertexBuffer, ua = hn.indexBuffer, qr = hn.uniformValues, Mn = Xr.segments;
                  jn.draw(Le, Ve.TRIANGLES, Je, at, _t, he.disabled, qr, F.id, Wn, ua, Mn, F.paint, C.transform.zoom, on);
                }
              }
            }
          }, heatmap: function(C, D, F, q) {
            if (F.paint.get("heatmap-opacity") !== 0)
              if (C.renderPass === "offscreen") {
                var ae = C.context, fe = ae.gl, xe = Be.disabled, ke = new He([fe.ONE, fe.ONE], e.Color.transparent, [!0, !0, !0, !0]);
                (function(At, xt, Dt) {
                  var Ot = At.gl;
                  At.activeTexture.set(Ot.TEXTURE1), At.viewport.set([0, 0, xt.width / 4, xt.height / 4]);
                  var jt = Dt.heatmapFbo;
                  if (jt)
                    Ot.bindTexture(Ot.TEXTURE_2D, jt.colorAttachment.get()), At.bindFramebuffer.set(jt.framebuffer);
                  else {
                    var rr = Ot.createTexture();
                    Ot.bindTexture(Ot.TEXTURE_2D, rr), Ot.texParameteri(Ot.TEXTURE_2D, Ot.TEXTURE_WRAP_S, Ot.CLAMP_TO_EDGE), Ot.texParameteri(Ot.TEXTURE_2D, Ot.TEXTURE_WRAP_T, Ot.CLAMP_TO_EDGE), Ot.texParameteri(Ot.TEXTURE_2D, Ot.TEXTURE_MIN_FILTER, Ot.LINEAR), Ot.texParameteri(Ot.TEXTURE_2D, Ot.TEXTURE_MAG_FILTER, Ot.LINEAR), jt = Dt.heatmapFbo = At.createFramebuffer(xt.width / 4, xt.height / 4, !1), function(dr, Sr, kr, Jr) {
                      var Xr = dr.gl, hn = dr.extRenderToTextureHalfFloat ? dr.extTextureHalfFloat.HALF_FLOAT_OES : Xr.UNSIGNED_BYTE;
                      Xr.texImage2D(Xr.TEXTURE_2D, 0, Xr.RGBA, Sr.width / 4, Sr.height / 4, 0, Xr.RGBA, hn, null), Jr.colorAttachment.set(kr);
                    }(At, xt, rr, jt);
                  }
                })(ae, C, F), ae.clear({ color: e.Color.transparent });
                for (var Le = 0; Le < q.length; Le++) {
                  var Ve = q[Le];
                  if (!D.hasRenderableParent(Ve)) {
                    var Je = D.getTile(Ve), at = Je.getBucket(F);
                    if (at) {
                      var _t = at.programConfigurations.get(F.id), Et = C.useProgram("heatmap", _t), kt = C.transform.zoom;
                      Et.draw(ae, fe.TRIANGLES, It.disabled, xe, ke, he.disabled, Uo(Ve.posMatrix, Je, kt, F.paint.get("heatmap-intensity")), F.id, at.layoutVertexBuffer, at.indexBuffer, at.segments, F.paint, C.transform.zoom, _t);
                    }
                  }
                }
                ae.viewport.set([0, 0, C.width, C.height]);
              } else
                C.renderPass === "translucent" && (C.context.setColorMode(C.colorModeForRenderPass()), function(At, xt) {
                  var Dt = At.context, Ot = Dt.gl, jt = xt.heatmapFbo;
                  if (!!jt) {
                    Dt.activeTexture.set(Ot.TEXTURE0), Ot.bindTexture(Ot.TEXTURE_2D, jt.colorAttachment.get()), Dt.activeTexture.set(Ot.TEXTURE1);
                    var rr = xt.colorRampTexture;
                    rr || (rr = xt.colorRampTexture = new e.Texture(Dt, xt.colorRamp, Ot.RGBA)), rr.bind(Ot.LINEAR, Ot.CLAMP_TO_EDGE), At.useProgram("heatmapTexture").draw(Dt, Ot.TRIANGLES, It.disabled, Be.disabled, At.colorModeForRenderPass(), he.disabled, function(dr, Sr, kr, Jr) {
                      var Xr = e.create();
                      e.ortho(Xr, 0, dr.width, dr.height, 0, 0, 1);
                      var hn = dr.context.gl;
                      return { u_matrix: Xr, u_world: [hn.drawingBufferWidth, hn.drawingBufferHeight], u_image: kr, u_color_ramp: Jr, u_opacity: Sr.paint.get("heatmap-opacity") };
                    }(At, xt, 0, 1), xt.id, At.viewportBuffer, At.quadTriangleIndexBuffer, At.viewportSegments, xt.paint, At.transform.zoom);
                  }
                }(C, F));
          }, line: function(C, D, F, q) {
            if (C.renderPass === "translucent") {
              var ae = F.paint.get("line-opacity"), fe = F.paint.get("line-width");
              if (ae.constantOr(1) !== 0 && fe.constantOr(1) !== 0) {
                var xe = C.depthModeForSublayer(0, It.ReadOnly), ke = C.colorModeForRenderPass(), Le = F.paint.get("line-dasharray"), Ve = F.paint.get("line-pattern"), Je = Ve.constantOr(1), at = F.paint.get("line-gradient"), _t = F.getCrossfadeParameters(), Et = Je ? "linePattern" : Le ? "lineSDF" : at ? "lineGradient" : "line", kt = C.context, At = kt.gl, xt = !0;
                if (at) {
                  kt.activeTexture.set(At.TEXTURE0);
                  var Dt = F.gradientTexture;
                  if (!F.gradient)
                    return;
                  Dt || (Dt = F.gradientTexture = new e.Texture(kt, F.gradient, At.RGBA)), Dt.bind(At.LINEAR, At.CLAMP_TO_EDGE);
                }
                for (var Ot = 0, jt = q; Ot < jt.length; Ot += 1) {
                  var rr = jt[Ot], dr = D.getTile(rr);
                  if (!Je || dr.patternsLoaded()) {
                    var Sr = dr.getBucket(F);
                    if (Sr) {
                      var kr = Sr.programConfigurations.get(F.id), Jr = C.context.program.get(), Xr = C.useProgram(Et, kr), hn = xt || Xr.program !== Jr, on = Ve.constantOr(null);
                      if (on && dr.imageAtlas) {
                        var jn = dr.imageAtlas, Wn = jn.patternPositions[on.to.toString()], ua = jn.patternPositions[on.from.toString()];
                        Wn && ua && kr.setConstantPatternPositions(Wn, ua);
                      }
                      var qr = Je ? je(C, dr, F, _t) : Le ? Ye(C, dr, F, Le, _t) : at ? Ha(C, dr, F) : Eo(C, dr, F);
                      Je ? (kt.activeTexture.set(At.TEXTURE0), dr.imageAtlasTexture.bind(At.LINEAR, At.CLAMP_TO_EDGE), kr.updatePaintBuffers(_t)) : Le && (hn || C.lineAtlas.dirty) && (kt.activeTexture.set(At.TEXTURE0), C.lineAtlas.bind(kt)), Xr.draw(kt, At.TRIANGLES, xe, C.stencilModeForClipping(rr), ke, he.disabled, qr, F.id, Sr.layoutVertexBuffer, Sr.indexBuffer, Sr.segments, F.paint, C.transform.zoom, kr), xt = !1;
                    }
                  }
                }
              }
            }
          }, fill: function(C, D, F, q) {
            var ae = F.paint.get("fill-color"), fe = F.paint.get("fill-opacity");
            if (fe.constantOr(1) !== 0) {
              var xe = C.colorModeForRenderPass(), ke = F.paint.get("fill-pattern"), Le = C.opaquePassEnabledForLayer() && !ke.constantOr(1) && ae.constantOr(e.Color.transparent).a === 1 && fe.constantOr(0) === 1 ? "opaque" : "translucent";
              if (C.renderPass === Le) {
                var Ve = C.depthModeForSublayer(1, C.renderPass === "opaque" ? It.ReadWrite : It.ReadOnly);
                zn(C, D, F, q, Ve, xe, !1);
              }
              if (C.renderPass === "translucent" && F.paint.get("fill-antialias")) {
                var Je = C.depthModeForSublayer(F.getPaintProperty("fill-outline-color") ? 2 : 0, It.ReadOnly);
                zn(C, D, F, q, Je, xe, !0);
              }
            }
          }, "fill-extrusion": function(C, D, F, q) {
            var ae = F.paint.get("fill-extrusion-opacity");
            if (ae !== 0 && C.renderPass === "translucent") {
              var fe = new It(C.context.gl.LEQUAL, It.ReadWrite, C.depthRangeFor3D);
              if (ae !== 1 || F.paint.get("fill-extrusion-pattern").constantOr(1))
                ma(C, D, F, q, fe, Be.disabled, He.disabled), ma(C, D, F, q, fe, C.stencilModeFor3D(), C.colorModeForRenderPass());
              else {
                var xe = C.colorModeForRenderPass();
                ma(C, D, F, q, fe, Be.disabled, xe);
              }
            }
          }, hillshade: function(C, D, F, q) {
            if (C.renderPass === "offscreen" || C.renderPass === "translucent") {
              for (var ae = C.context, fe = D.getSource().maxzoom, xe = C.depthModeForSublayer(0, It.ReadOnly), ke = C.colorModeForRenderPass(), Le = C.renderPass === "translucent" ? C.stencilConfigForOverlap(q) : [{}, q], Ve = Le[0], Je = 0, at = Le[1]; Je < at.length; Je += 1) {
                var _t = at[Je], Et = D.getTile(_t);
                Et.needsHillshadePrepare && C.renderPass === "offscreen" ? Na(C, Et, F, fe, xe, Be.disabled, ke) : C.renderPass === "translucent" && Ma(C, Et, F, xe, Ve[_t.overscaledZ], ke);
              }
              ae.viewport.set([0, 0, C.width, C.height]);
            }
          }, raster: function(C, D, F, q) {
            if (C.renderPass === "translucent" && F.paint.get("raster-opacity") !== 0 && q.length)
              for (var ae = C.context, fe = ae.gl, xe = D.getSource(), ke = C.useProgram("raster"), Le = C.colorModeForRenderPass(), Ve = xe instanceof W ? [{}, q] : C.stencilConfigForOverlap(q), Je = Ve[0], at = Ve[1], _t = at[at.length - 1].overscaledZ, Et = !C.options.moving, kt = 0, At = at; kt < At.length; kt += 1) {
                var xt = At[kt], Dt = C.depthModeForSublayer(xt.overscaledZ - _t, F.paint.get("raster-opacity") === 1 ? It.ReadWrite : It.ReadOnly, fe.LESS), Ot = D.getTile(xt), jt = C.transform.calculatePosMatrix(xt.toUnwrapped(), Et);
                Ot.registerFadeDuration(F.paint.get("raster-fade-duration"));
                var rr = D.findLoadedParent(xt, 0), dr = Ba(Ot, rr, D, F, C.transform), Sr = void 0, kr = void 0, Jr = F.paint.get("raster-resampling") === "nearest" ? fe.NEAREST : fe.LINEAR;
                ae.activeTexture.set(fe.TEXTURE0), Ot.texture.bind(Jr, fe.CLAMP_TO_EDGE, fe.LINEAR_MIPMAP_NEAREST), ae.activeTexture.set(fe.TEXTURE1), rr ? (rr.texture.bind(Jr, fe.CLAMP_TO_EDGE, fe.LINEAR_MIPMAP_NEAREST), Sr = Math.pow(2, rr.tileID.overscaledZ - Ot.tileID.overscaledZ), kr = [Ot.tileID.canonical.x * Sr % 1, Ot.tileID.canonical.y * Sr % 1]) : Ot.texture.bind(Jr, fe.CLAMP_TO_EDGE, fe.LINEAR_MIPMAP_NEAREST);
                var Xr = gt(jt, kr || [0, 0], Sr || 1, dr, F);
                xe instanceof W ? ke.draw(ae, fe.TRIANGLES, Dt, Be.disabled, Le, he.disabled, Xr, F.id, xe.boundsBuffer, C.quadTriangleIndexBuffer, xe.boundsSegments) : ke.draw(ae, fe.TRIANGLES, Dt, Je[xt.overscaledZ], Le, he.disabled, Xr, F.id, C.rasterBoundsBuffer, C.quadTriangleIndexBuffer, C.rasterBoundsSegments);
              }
          }, background: function(C, D, F) {
            var q = F.paint.get("background-color"), ae = F.paint.get("background-opacity");
            if (ae !== 0) {
              var fe = C.context, xe = fe.gl, ke = C.transform, Le = ke.tileSize, Ve = F.paint.get("background-pattern");
              if (!C.isPatternMissing(Ve)) {
                var Je = !Ve && q.a === 1 && ae === 1 && C.opaquePassEnabledForLayer() ? "opaque" : "translucent";
                if (C.renderPass === Je) {
                  var at = Be.disabled, _t = C.depthModeForSublayer(0, Je === "opaque" ? It.ReadWrite : It.ReadOnly), Et = C.colorModeForRenderPass(), kt = C.useProgram(Ve ? "backgroundPattern" : "background"), At = ke.coveringTiles({ tileSize: Le });
                  Ve && (fe.activeTexture.set(xe.TEXTURE0), C.imageManager.bind(C.context));
                  for (var xt = F.getCrossfadeParameters(), Dt = 0, Ot = At; Dt < Ot.length; Dt += 1) {
                    var jt = Ot[Dt], rr = C.transform.calculatePosMatrix(jt.toUnwrapped()), dr = Ve ? pr(rr, ae, C, Ve, { tileID: jt, tileSize: Le }, xt) : ar(rr, ae, q);
                    kt.draw(fe, xe.TRIANGLES, _t, at, Et, he.disabled, dr, F.id, C.tileExtentBuffer, C.quadTriangleIndexBuffer, C.tileExtentSegments);
                  }
                }
              }
            }
          }, debug: function(C, D, F) {
            for (var q = 0; q < F.length; q++)
              Qi(C, D, F[q]);
          }, custom: function(C, D, F) {
            var q = C.context, ae = F.implementation;
            if (C.renderPass === "offscreen") {
              var fe = ae.prerender;
              fe && (C.setCustomLayerDefaults(), q.setColorMode(C.colorModeForRenderPass()), fe.call(ae, q.gl, C.transform.customLayerMatrix()), q.setDirty(), C.setBaseState());
            } else if (C.renderPass === "translucent") {
              C.setCustomLayerDefaults(), q.setColorMode(C.colorModeForRenderPass()), q.setStencilMode(Be.disabled);
              var xe = ae.renderingMode === "3d" ? new It(C.context.gl.LEQUAL, It.ReadWrite, C.depthRangeFor3D) : C.depthModeForSublayer(0, It.ReadOnly);
              q.setDepthMode(xe), ae.render(q.gl, C.transform.customLayerMatrix()), q.setDirty(), C.setBaseState(), q.bindFramebuffer.set(null);
            }
          } }, Oa = function(C, D) {
            this.context = new be(C), this.transform = D, this._tileTextures = {}, this.setup(), this.numSublayers = Re.maxUnderzooming + Re.maxOverzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new Vr(), this.gpuTimers = {};
          };
          Oa.prototype.resize = function(C, D) {
            if (this.width = C * e.browser.devicePixelRatio, this.height = D * e.browser.devicePixelRatio, this.context.viewport.set([0, 0, this.width, this.height]), this.style)
              for (var F = 0, q = this.style._order; F < q.length; F += 1) {
                var ae = q[F];
                this.style._layers[ae].resize();
              }
          }, Oa.prototype.setup = function() {
            var C = this.context, D = new e.StructArrayLayout2i4();
            D.emplaceBack(0, 0), D.emplaceBack(e.EXTENT, 0), D.emplaceBack(0, e.EXTENT), D.emplaceBack(e.EXTENT, e.EXTENT), this.tileExtentBuffer = C.createVertexBuffer(D, Ln.members), this.tileExtentSegments = e.SegmentVector.simpleSegment(0, 0, 4, 2);
            var F = new e.StructArrayLayout2i4();
            F.emplaceBack(0, 0), F.emplaceBack(e.EXTENT, 0), F.emplaceBack(0, e.EXTENT), F.emplaceBack(e.EXTENT, e.EXTENT), this.debugBuffer = C.createVertexBuffer(F, Ln.members), this.debugSegments = e.SegmentVector.simpleSegment(0, 0, 4, 5);
            var q = new e.StructArrayLayout4i8();
            q.emplaceBack(0, 0, 0, 0), q.emplaceBack(e.EXTENT, 0, e.EXTENT, 0), q.emplaceBack(0, e.EXTENT, 0, e.EXTENT), q.emplaceBack(e.EXTENT, e.EXTENT, e.EXTENT, e.EXTENT), this.rasterBoundsBuffer = C.createVertexBuffer(q, J.members), this.rasterBoundsSegments = e.SegmentVector.simpleSegment(0, 0, 4, 2);
            var ae = new e.StructArrayLayout2i4();
            ae.emplaceBack(0, 0), ae.emplaceBack(1, 0), ae.emplaceBack(0, 1), ae.emplaceBack(1, 1), this.viewportBuffer = C.createVertexBuffer(ae, Ln.members), this.viewportSegments = e.SegmentVector.simpleSegment(0, 0, 4, 2);
            var fe = new e.StructArrayLayout1ui2();
            fe.emplaceBack(0), fe.emplaceBack(1), fe.emplaceBack(3), fe.emplaceBack(2), fe.emplaceBack(0), this.tileBorderIndexBuffer = C.createIndexBuffer(fe);
            var xe = new e.StructArrayLayout3ui6();
            xe.emplaceBack(0, 1, 2), xe.emplaceBack(2, 1, 3), this.quadTriangleIndexBuffer = C.createIndexBuffer(xe), this.emptyTexture = new e.Texture(C, { width: 1, height: 1, data: new Uint8Array([0, 0, 0, 0]) }, C.gl.RGBA);
            var ke = this.context.gl;
            this.stencilClearMode = new Be({ func: ke.ALWAYS, mask: 0 }, 0, 255, ke.ZERO, ke.ZERO, ke.ZERO);
          }, Oa.prototype.clearStencil = function() {
            var C = this.context, D = C.gl;
            this.nextStencilID = 1, this.currentStencilSource = void 0;
            var F = e.create();
            e.ortho(F, 0, this.width, this.height, 0, 0, 1), e.scale(F, F, [D.drawingBufferWidth, D.drawingBufferHeight, 0]), this.useProgram("clippingMask").draw(C, D.TRIANGLES, It.disabled, this.stencilClearMode, He.disabled, he.disabled, co(F), "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);
          }, Oa.prototype._renderTileClippingMasks = function(C, D) {
            if (this.currentStencilSource !== C.source && C.isTileClipped() && D && D.length) {
              this.currentStencilSource = C.source;
              var F = this.context, q = F.gl;
              this.nextStencilID + D.length > 256 && this.clearStencil(), F.setColorMode(He.disabled), F.setDepthMode(It.disabled);
              var ae = this.useProgram("clippingMask");
              this._tileClippingMaskIDs = {};
              for (var fe = 0, xe = D; fe < xe.length; fe += 1) {
                var ke = xe[fe], Le = this._tileClippingMaskIDs[ke.key] = this.nextStencilID++;
                ae.draw(F, q.TRIANGLES, It.disabled, new Be({ func: q.ALWAYS, mask: 0 }, Le, 255, q.KEEP, q.KEEP, q.REPLACE), He.disabled, he.disabled, co(ke.posMatrix), "$clipping", this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);
              }
            }
          }, Oa.prototype.stencilModeFor3D = function() {
            this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil();
            var C = this.nextStencilID++, D = this.context.gl;
            return new Be({ func: D.NOTEQUAL, mask: 255 }, C, 255, D.KEEP, D.KEEP, D.REPLACE);
          }, Oa.prototype.stencilModeForClipping = function(C) {
            var D = this.context.gl;
            return new Be({ func: D.EQUAL, mask: 255 }, this._tileClippingMaskIDs[C.key], 0, D.KEEP, D.KEEP, D.REPLACE);
          }, Oa.prototype.stencilConfigForOverlap = function(C) {
            var D, F = this.context.gl, q = C.sort(function(Le, Ve) {
              return Ve.overscaledZ - Le.overscaledZ;
            }), ae = q[q.length - 1].overscaledZ, fe = q[0].overscaledZ - ae + 1;
            if (fe > 1) {
              this.currentStencilSource = void 0, this.nextStencilID + fe > 256 && this.clearStencil();
              for (var xe = {}, ke = 0; ke < fe; ke++)
                xe[ke + ae] = new Be({ func: F.GEQUAL, mask: 255 }, ke + this.nextStencilID, 255, F.KEEP, F.KEEP, F.REPLACE);
              return this.nextStencilID += fe, [xe, q];
            }
            return [(D = {}, D[ae] = Be.disabled, D), q];
          }, Oa.prototype.colorModeForRenderPass = function() {
            var C = this.context.gl;
            return this._showOverdrawInspector ? new He([C.CONSTANT_COLOR, C.ONE], new e.Color(1 / 8, 1 / 8, 1 / 8, 0), [!0, !0, !0, !0]) : this.renderPass === "opaque" ? He.unblended : He.alphaBlended;
          }, Oa.prototype.depthModeForSublayer = function(C, D, F) {
            if (!this.opaquePassEnabledForLayer())
              return It.disabled;
            var q = 1 - ((1 + this.currentLayer) * this.numSublayers + C) * this.depthEpsilon;
            return new It(F || this.context.gl.LEQUAL, D, [q, q]);
          }, Oa.prototype.opaquePassEnabledForLayer = function() {
            return this.currentLayer < this.opaquePassCutoff;
          }, Oa.prototype.render = function(C, D) {
            var F = this;
            this.style = C, this.options = D, this.lineAtlas = C.lineAtlas, this.imageManager = C.imageManager, this.glyphManager = C.glyphManager, this.symbolFadeChange = C.placement.symbolFadeChange(e.browser.now()), this.imageManager.beginFrame();
            var q = this.style._order, ae = this.style.sourceCaches;
            for (var fe in ae) {
              var xe = ae[fe];
              xe.used && xe.prepare(this.context);
            }
            var ke, Le, Ve = {}, Je = {}, at = {};
            for (var _t in ae) {
              var Et = ae[_t];
              Ve[_t] = Et.getVisibleCoordinates(), Je[_t] = Ve[_t].slice().reverse(), at[_t] = Et.getVisibleCoordinates(!0).reverse();
            }
            this.opaquePassCutoff = 1 / 0;
            for (var kt = 0; kt < q.length; kt++) {
              var At = q[kt];
              if (this.style._layers[At].is3D()) {
                this.opaquePassCutoff = kt;
                break;
              }
            }
            this.renderPass = "offscreen";
            for (var xt = 0, Dt = q; xt < Dt.length; xt += 1) {
              var Ot = Dt[xt], jt = this.style._layers[Ot];
              if (jt.hasOffscreenPass() && !jt.isHidden(this.transform.zoom)) {
                var rr = Je[jt.source];
                (jt.type === "custom" || rr.length) && this.renderLayer(this, ae[jt.source], jt, rr);
              }
            }
            for (this.context.bindFramebuffer.set(null), this.context.clear({ color: D.showOverdrawInspector ? e.Color.black : e.Color.transparent, depth: 1 }), this.clearStencil(), this._showOverdrawInspector = D.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (C._order.length + 2) * this.numSublayers * this.depthEpsilon], this.renderPass = "opaque", this.currentLayer = q.length - 1; this.currentLayer >= 0; this.currentLayer--) {
              var dr = this.style._layers[q[this.currentLayer]], Sr = ae[dr.source], kr = Ve[dr.source];
              this._renderTileClippingMasks(dr, kr), this.renderLayer(this, Sr, dr, kr);
            }
            for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < q.length; this.currentLayer++) {
              var Jr = this.style._layers[q[this.currentLayer]], Xr = ae[Jr.source], hn = (Jr.type === "symbol" ? at : Je)[Jr.source];
              this._renderTileClippingMasks(Jr, Ve[Jr.source]), this.renderLayer(this, Xr, Jr, hn);
            }
            this.options.showTileBoundaries && (e.values(this.style._layers).forEach(function(on) {
              on.source && !on.isHidden(F.transform.zoom) && (on.source !== (Le && Le.id) && (Le = F.style.sourceCaches[on.source]), (!ke || ke.getSource().maxzoom < Le.getSource().maxzoom) && (ke = Le));
            }), ke && $i.debug(this, ke, ke.getVisibleCoordinates())), this.options.showPadding && xi(this), this.context.setDefault();
          }, Oa.prototype.renderLayer = function(C, D, F, q) {
            F.isHidden(this.transform.zoom) || (F.type === "background" || F.type === "custom" || q.length) && (this.id = F.id, this.gpuTimingStart(F), $i[F.type](C, D, F, q, this.style.placement.variableOffsets), this.gpuTimingEnd());
          }, Oa.prototype.gpuTimingStart = function(C) {
            if (this.options.gpuTiming) {
              var D = this.context.extTimerQuery, F = this.gpuTimers[C.id];
              F || (F = this.gpuTimers[C.id] = { calls: 0, cpuTime: 0, query: D.createQueryEXT() }), F.calls++, D.beginQueryEXT(D.TIME_ELAPSED_EXT, F.query);
            }
          }, Oa.prototype.gpuTimingEnd = function() {
            if (this.options.gpuTiming) {
              var C = this.context.extTimerQuery;
              C.endQueryEXT(C.TIME_ELAPSED_EXT);
            }
          }, Oa.prototype.collectGpuTimers = function() {
            var C = this.gpuTimers;
            return this.gpuTimers = {}, C;
          }, Oa.prototype.queryGpuTimers = function(C) {
            var D = {};
            for (var F in C) {
              var q = C[F], ae = this.context.extTimerQuery, fe = ae.getQueryObjectEXT(q.query, ae.QUERY_RESULT_EXT) / 1e6;
              ae.deleteQueryEXT(q.query), D[F] = fe;
            }
            return D;
          }, Oa.prototype.translatePosMatrix = function(C, D, F, q, ae) {
            if (!F[0] && !F[1])
              return C;
            var fe = ae ? q === "map" ? this.transform.angle : 0 : q === "viewport" ? -this.transform.angle : 0;
            if (fe) {
              var xe = Math.sin(fe), ke = Math.cos(fe);
              F = [F[0] * ke - F[1] * xe, F[0] * xe + F[1] * ke];
            }
            var Le = [ae ? F[0] : vn(D, F[0], this.transform.zoom), ae ? F[1] : vn(D, F[1], this.transform.zoom), 0], Ve = new Float32Array(16);
            return e.translate(Ve, C, Le), Ve;
          }, Oa.prototype.saveTileTexture = function(C) {
            var D = this._tileTextures[C.size[0]];
            D ? D.push(C) : this._tileTextures[C.size[0]] = [C];
          }, Oa.prototype.getTileTexture = function(C) {
            var D = this._tileTextures[C];
            return D && D.length > 0 ? D.pop() : null;
          }, Oa.prototype.isPatternMissing = function(C) {
            if (!C)
              return !1;
            if (!C.from || !C.to)
              return !0;
            var D = this.imageManager.getPattern(C.from.toString()), F = this.imageManager.getPattern(C.to.toString());
            return !D || !F;
          }, Oa.prototype.useProgram = function(C, D) {
            this.cache = this.cache || {};
            var F = "" + C + (D ? D.cacheKey : "") + (this._showOverdrawInspector ? "/overdraw" : "");
            return this.cache[F] || (this.cache[F] = new xs(this.context, ls[C], D, br[C], this._showOverdrawInspector)), this.cache[F];
          }, Oa.prototype.setCustomLayerDefaults = function() {
            this.context.unbindVAO(), this.context.cullFace.setDefault(), this.context.activeTexture.setDefault(), this.context.pixelStoreUnpack.setDefault(), this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.context.pixelStoreUnpackFlipY.setDefault();
          }, Oa.prototype.setBaseState = function() {
            var C = this.context.gl;
            this.context.cullFace.set(!1), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(C.FUNC_ADD);
          }, Oa.prototype.initDebugOverlayCanvas = function() {
            if (this.debugOverlayCanvas == null) {
              this.debugOverlayCanvas = e.window.document.createElement("canvas"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512;
              var C = this.context.gl;
              this.debugOverlayTexture = new e.Texture(this.context, this.debugOverlayCanvas, C.RGBA);
            }
          }, Oa.prototype.destroy = function() {
            this.emptyTexture.destroy(), this.debugOverlayTexture && this.debugOverlayTexture.destroy();
          };
          var ht = function(C, D) {
            this.points = C, this.planes = D;
          };
          ht.fromInvProjectionMatrix = function(C, D, F) {
            var q = Math.pow(2, F), ae = [[-1, 1, -1, 1], [1, 1, -1, 1], [1, -1, -1, 1], [-1, -1, -1, 1], [-1, 1, 1, 1], [1, 1, 1, 1], [1, -1, 1, 1], [-1, -1, 1, 1]].map(function(xe) {
              return e.transformMat4([], xe, C);
            }).map(function(xe) {
              return e.scale$1([], xe, 1 / xe[3] / D * q);
            }), fe = [[0, 1, 2], [6, 5, 4], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]].map(function(xe) {
              var ke = e.sub([], ae[xe[0]], ae[xe[1]]), Le = e.sub([], ae[xe[2]], ae[xe[1]]), Ve = e.normalize([], e.cross([], ke, Le)), Je = -e.dot(Ve, ae[xe[1]]);
              return Ve.concat(Je);
            });
            return new ht(ae, fe);
          };
          var zt = function(C, D) {
            this.min = C, this.max = D, this.center = e.scale$2([], e.add([], this.min, this.max), 0.5);
          };
          zt.prototype.quadrant = function(C) {
            for (var D = [C % 2 == 0, C < 2], F = e.clone$2(this.min), q = e.clone$2(this.max), ae = 0; ae < D.length; ae++)
              F[ae] = D[ae] ? this.min[ae] : this.center[ae], q[ae] = D[ae] ? this.center[ae] : this.max[ae];
            return q[2] = this.max[2], new zt(F, q);
          }, zt.prototype.distanceX = function(C) {
            return Math.max(Math.min(this.max[0], C[0]), this.min[0]) - C[0];
          }, zt.prototype.distanceY = function(C) {
            return Math.max(Math.min(this.max[1], C[1]), this.min[1]) - C[1];
          }, zt.prototype.intersects = function(C) {
            for (var D = [[this.min[0], this.min[1], 0, 1], [this.max[0], this.min[1], 0, 1], [this.max[0], this.max[1], 0, 1], [this.min[0], this.max[1], 0, 1]], F = !0, q = 0; q < C.planes.length; q++) {
              for (var ae = C.planes[q], fe = 0, xe = 0; xe < D.length; xe++)
                fe += e.dot$1(ae, D[xe]) >= 0;
              if (fe === 0)
                return 0;
              fe !== D.length && (F = !1);
            }
            if (F)
              return 2;
            for (var ke = 0; ke < 3; ke++) {
              for (var Le = Number.MAX_VALUE, Ve = -Number.MAX_VALUE, Je = 0; Je < C.points.length; Je++) {
                var at = C.points[Je][ke] - this.min[ke];
                Le = Math.min(Le, at), Ve = Math.max(Ve, at);
              }
              if (Ve < 0 || Le > this.max[ke] - this.min[ke])
                return 0;
            }
            return 1;
          };
          var sr = function(C, D, F, q) {
            if (C === void 0 && (C = 0), D === void 0 && (D = 0), F === void 0 && (F = 0), q === void 0 && (q = 0), isNaN(C) || C < 0 || isNaN(D) || D < 0 || isNaN(F) || F < 0 || isNaN(q) || q < 0)
              throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");
            this.top = C, this.bottom = D, this.left = F, this.right = q;
          };
          sr.prototype.interpolate = function(C, D, F) {
            return D.top != null && C.top != null && (this.top = e.number(C.top, D.top, F)), D.bottom != null && C.bottom != null && (this.bottom = e.number(C.bottom, D.bottom, F)), D.left != null && C.left != null && (this.left = e.number(C.left, D.left, F)), D.right != null && C.right != null && (this.right = e.number(C.right, D.right, F)), this;
          }, sr.prototype.getCenter = function(C, D) {
            var F = e.clamp((this.left + C - this.right) / 2, 0, C), q = e.clamp((this.top + D - this.bottom) / 2, 0, D);
            return new e.Point(F, q);
          }, sr.prototype.equals = function(C) {
            return this.top === C.top && this.bottom === C.bottom && this.left === C.left && this.right === C.right;
          }, sr.prototype.clone = function() {
            return new sr(this.top, this.bottom, this.left, this.right);
          }, sr.prototype.toJSON = function() {
            return { top: this.top, bottom: this.bottom, left: this.left, right: this.right };
          };
          var Ht = function(C, D, F, q, ae) {
            this.tileSize = 512, this.maxValidLatitude = 85.051129, this._renderWorldCopies = ae === void 0 || ae, this._minZoom = C || 0, this._maxZoom = D || 22, this._minPitch = F == null ? 0 : F, this._maxPitch = q == null ? 60 : q, this.setMaxBounds(), this.width = 0, this.height = 0, this._center = new e.LngLat(0, 0), this.zoom = 0, this.angle = 0, this._fov = 0.6435011087932844, this._pitch = 0, this._unmodified = !0, this._edgeInsets = new sr(), this._posMatrixCache = {}, this._alignedPosMatrixCache = {};
          }, lr = { minZoom: { configurable: !0 }, maxZoom: { configurable: !0 }, minPitch: { configurable: !0 }, maxPitch: { configurable: !0 }, renderWorldCopies: { configurable: !0 }, worldSize: { configurable: !0 }, centerOffset: { configurable: !0 }, size: { configurable: !0 }, bearing: { configurable: !0 }, pitch: { configurable: !0 }, fov: { configurable: !0 }, zoom: { configurable: !0 }, center: { configurable: !0 }, padding: { configurable: !0 }, centerPoint: { configurable: !0 }, unmodified: { configurable: !0 }, point: { configurable: !0 } };
          Ht.prototype.clone = function() {
            var C = new Ht(this._minZoom, this._maxZoom, this._minPitch, this.maxPitch, this._renderWorldCopies);
            return C.tileSize = this.tileSize, C.latRange = this.latRange, C.width = this.width, C.height = this.height, C._center = this._center, C.zoom = this.zoom, C.angle = this.angle, C._fov = this._fov, C._pitch = this._pitch, C._unmodified = this._unmodified, C._edgeInsets = this._edgeInsets.clone(), C._calcMatrices(), C;
          }, lr.minZoom.get = function() {
            return this._minZoom;
          }, lr.minZoom.set = function(C) {
            this._minZoom !== C && (this._minZoom = C, this.zoom = Math.max(this.zoom, C));
          }, lr.maxZoom.get = function() {
            return this._maxZoom;
          }, lr.maxZoom.set = function(C) {
            this._maxZoom !== C && (this._maxZoom = C, this.zoom = Math.min(this.zoom, C));
          }, lr.minPitch.get = function() {
            return this._minPitch;
          }, lr.minPitch.set = function(C) {
            this._minPitch !== C && (this._minPitch = C, this.pitch = Math.max(this.pitch, C));
          }, lr.maxPitch.get = function() {
            return this._maxPitch;
          }, lr.maxPitch.set = function(C) {
            this._maxPitch !== C && (this._maxPitch = C, this.pitch = Math.min(this.pitch, C));
          }, lr.renderWorldCopies.get = function() {
            return this._renderWorldCopies;
          }, lr.renderWorldCopies.set = function(C) {
            C === void 0 ? C = !0 : C === null && (C = !1), this._renderWorldCopies = C;
          }, lr.worldSize.get = function() {
            return this.tileSize * this.scale;
          }, lr.centerOffset.get = function() {
            return this.centerPoint._sub(this.size._div(2));
          }, lr.size.get = function() {
            return new e.Point(this.width, this.height);
          }, lr.bearing.get = function() {
            return -this.angle / Math.PI * 180;
          }, lr.bearing.set = function(C) {
            var D = -e.wrap(C, -180, 180) * Math.PI / 180;
            this.angle !== D && (this._unmodified = !1, this.angle = D, this._calcMatrices(), this.rotationMatrix = e.create$2(), e.rotate(this.rotationMatrix, this.rotationMatrix, this.angle));
          }, lr.pitch.get = function() {
            return this._pitch / Math.PI * 180;
          }, lr.pitch.set = function(C) {
            var D = e.clamp(C, this.minPitch, this.maxPitch) / 180 * Math.PI;
            this._pitch !== D && (this._unmodified = !1, this._pitch = D, this._calcMatrices());
          }, lr.fov.get = function() {
            return this._fov / Math.PI * 180;
          }, lr.fov.set = function(C) {
            C = Math.max(0.01, Math.min(60, C)), this._fov !== C && (this._unmodified = !1, this._fov = C / 180 * Math.PI, this._calcMatrices());
          }, lr.zoom.get = function() {
            return this._zoom;
          }, lr.zoom.set = function(C) {
            var D = Math.min(Math.max(C, this.minZoom), this.maxZoom);
            this._zoom !== D && (this._unmodified = !1, this._zoom = D, this.scale = this.zoomScale(D), this.tileZoom = Math.floor(D), this.zoomFraction = D - this.tileZoom, this._constrain(), this._calcMatrices());
          }, lr.center.get = function() {
            return this._center;
          }, lr.center.set = function(C) {
            C.lat === this._center.lat && C.lng === this._center.lng || (this._unmodified = !1, this._center = C, this._constrain(), this._calcMatrices());
          }, lr.padding.get = function() {
            return this._edgeInsets.toJSON();
          }, lr.padding.set = function(C) {
            this._edgeInsets.equals(C) || (this._unmodified = !1, this._edgeInsets.interpolate(this._edgeInsets, C, 1), this._calcMatrices());
          }, lr.centerPoint.get = function() {
            return this._edgeInsets.getCenter(this.width, this.height);
          }, Ht.prototype.isPaddingEqual = function(C) {
            return this._edgeInsets.equals(C);
          }, Ht.prototype.interpolatePadding = function(C, D, F) {
            this._unmodified = !1, this._edgeInsets.interpolate(C, D, F), this._constrain(), this._calcMatrices();
          }, Ht.prototype.coveringZoomLevel = function(C) {
            var D = (C.roundZoom ? Math.round : Math.floor)(this.zoom + this.scaleZoom(this.tileSize / C.tileSize));
            return Math.max(0, D);
          }, Ht.prototype.getVisibleUnwrappedCoordinates = function(C) {
            var D = [new e.UnwrappedTileID(0, C)];
            if (this._renderWorldCopies)
              for (var F = this.pointCoordinate(new e.Point(0, 0)), q = this.pointCoordinate(new e.Point(this.width, 0)), ae = this.pointCoordinate(new e.Point(this.width, this.height)), fe = this.pointCoordinate(new e.Point(0, this.height)), xe = Math.floor(Math.min(F.x, q.x, ae.x, fe.x)), ke = Math.floor(Math.max(F.x, q.x, ae.x, fe.x)), Le = xe - 1; Le <= ke + 1; Le++)
                Le !== 0 && D.push(new e.UnwrappedTileID(Le, C));
            return D;
          }, Ht.prototype.coveringTiles = function(C) {
            var D = this.coveringZoomLevel(C), F = D;
            if (C.minzoom !== void 0 && D < C.minzoom)
              return [];
            C.maxzoom !== void 0 && D > C.maxzoom && (D = C.maxzoom);
            var q = e.MercatorCoordinate.fromLngLat(this.center), ae = Math.pow(2, D), fe = [ae * q.x, ae * q.y, 0], xe = ht.fromInvProjectionMatrix(this.invProjMatrix, this.worldSize, D), ke = C.minzoom || 0;
            this.pitch <= 60 && this._edgeInsets.top < 0.1 && (ke = D);
            var Le = function(hn) {
              return { aabb: new zt([hn * ae, 0, 0], [(hn + 1) * ae, ae, 0]), zoom: 0, x: 0, y: 0, wrap: hn, fullyVisible: !1 };
            }, Ve = [], Je = [], at = D, _t = C.reparseOverscaled ? F : D;
            if (this._renderWorldCopies)
              for (var Et = 1; Et <= 3; Et++)
                Ve.push(Le(-Et)), Ve.push(Le(Et));
            for (Ve.push(Le(0)); Ve.length > 0; ) {
              var kt = Ve.pop(), At = kt.x, xt = kt.y, Dt = kt.fullyVisible;
              if (!Dt) {
                var Ot = kt.aabb.intersects(xe);
                if (Ot === 0)
                  continue;
                Dt = Ot === 2;
              }
              var jt = kt.aabb.distanceX(fe), rr = kt.aabb.distanceY(fe), dr = Math.max(Math.abs(jt), Math.abs(rr)), Sr = 3 + (1 << at - kt.zoom) - 2;
              if (kt.zoom === at || dr > Sr && kt.zoom >= ke)
                Je.push({ tileID: new e.OverscaledTileID(kt.zoom === at ? _t : kt.zoom, kt.wrap, kt.zoom, At, xt), distanceSq: e.sqrLen([fe[0] - 0.5 - At, fe[1] - 0.5 - xt]) });
              else
                for (var kr = 0; kr < 4; kr++) {
                  var Jr = (At << 1) + kr % 2, Xr = (xt << 1) + (kr >> 1);
                  Ve.push({ aabb: kt.aabb.quadrant(kr), zoom: kt.zoom + 1, x: Jr, y: Xr, wrap: kt.wrap, fullyVisible: Dt });
                }
            }
            return Je.sort(function(hn, on) {
              return hn.distanceSq - on.distanceSq;
            }).map(function(hn) {
              return hn.tileID;
            });
          }, Ht.prototype.resize = function(C, D) {
            this.width = C, this.height = D, this.pixelsToGLUnits = [2 / C, -2 / D], this._constrain(), this._calcMatrices();
          }, lr.unmodified.get = function() {
            return this._unmodified;
          }, Ht.prototype.zoomScale = function(C) {
            return Math.pow(2, C);
          }, Ht.prototype.scaleZoom = function(C) {
            return Math.log(C) / Math.LN2;
          }, Ht.prototype.project = function(C) {
            var D = e.clamp(C.lat, -this.maxValidLatitude, this.maxValidLatitude);
            return new e.Point(e.mercatorXfromLng(C.lng) * this.worldSize, e.mercatorYfromLat(D) * this.worldSize);
          }, Ht.prototype.unproject = function(C) {
            return new e.MercatorCoordinate(C.x / this.worldSize, C.y / this.worldSize).toLngLat();
          }, lr.point.get = function() {
            return this.project(this.center);
          }, Ht.prototype.setLocationAtPoint = function(C, D) {
            var F = this.pointCoordinate(D), q = this.pointCoordinate(this.centerPoint), ae = this.locationCoordinate(C), fe = new e.MercatorCoordinate(ae.x - (F.x - q.x), ae.y - (F.y - q.y));
            this.center = this.coordinateLocation(fe), this._renderWorldCopies && (this.center = this.center.wrap());
          }, Ht.prototype.locationPoint = function(C) {
            return this.coordinatePoint(this.locationCoordinate(C));
          }, Ht.prototype.pointLocation = function(C) {
            return this.coordinateLocation(this.pointCoordinate(C));
          }, Ht.prototype.locationCoordinate = function(C) {
            return e.MercatorCoordinate.fromLngLat(C);
          }, Ht.prototype.coordinateLocation = function(C) {
            return C.toLngLat();
          }, Ht.prototype.pointCoordinate = function(C) {
            var D = [C.x, C.y, 0, 1], F = [C.x, C.y, 1, 1];
            e.transformMat4(D, D, this.pixelMatrixInverse), e.transformMat4(F, F, this.pixelMatrixInverse);
            var q = D[3], ae = F[3], fe = D[0] / q, xe = F[0] / ae, ke = D[1] / q, Le = F[1] / ae, Ve = D[2] / q, Je = F[2] / ae, at = Ve === Je ? 0 : (0 - Ve) / (Je - Ve);
            return new e.MercatorCoordinate(e.number(fe, xe, at) / this.worldSize, e.number(ke, Le, at) / this.worldSize);
          }, Ht.prototype.coordinatePoint = function(C) {
            var D = [C.x * this.worldSize, C.y * this.worldSize, 0, 1];
            return e.transformMat4(D, D, this.pixelMatrix), new e.Point(D[0] / D[3], D[1] / D[3]);
          }, Ht.prototype.getBounds = function() {
            return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0, 0))).extend(this.pointLocation(new e.Point(this.width, 0))).extend(this.pointLocation(new e.Point(this.width, this.height))).extend(this.pointLocation(new e.Point(0, this.height)));
          }, Ht.prototype.getMaxBounds = function() {
            return this.latRange && this.latRange.length === 2 && this.lngRange && this.lngRange.length === 2 ? new e.LngLatBounds([this.lngRange[0], this.latRange[0]], [this.lngRange[1], this.latRange[1]]) : null;
          }, Ht.prototype.setMaxBounds = function(C) {
            C ? (this.lngRange = [C.getWest(), C.getEast()], this.latRange = [C.getSouth(), C.getNorth()], this._constrain()) : (this.lngRange = null, this.latRange = [-this.maxValidLatitude, this.maxValidLatitude]);
          }, Ht.prototype.calculatePosMatrix = function(C, D) {
            D === void 0 && (D = !1);
            var F = C.key, q = D ? this._alignedPosMatrixCache : this._posMatrixCache;
            if (q[F])
              return q[F];
            var ae = C.canonical, fe = this.worldSize / this.zoomScale(ae.z), xe = ae.x + Math.pow(2, ae.z) * C.wrap, ke = e.identity(new Float64Array(16));
            return e.translate(ke, ke, [xe * fe, ae.y * fe, 0]), e.scale(ke, ke, [fe / e.EXTENT, fe / e.EXTENT, 1]), e.multiply(ke, D ? this.alignedProjMatrix : this.projMatrix, ke), q[F] = new Float32Array(ke), q[F];
          }, Ht.prototype.customLayerMatrix = function() {
            return this.mercatorMatrix.slice();
          }, Ht.prototype._constrain = function() {
            if (this.center && this.width && this.height && !this._constraining) {
              this._constraining = !0;
              var C, D, F, q, ae = -90, fe = 90, xe = -180, ke = 180, Le = this.size, Ve = this._unmodified;
              if (this.latRange) {
                var Je = this.latRange;
                ae = e.mercatorYfromLat(Je[1]) * this.worldSize, C = (fe = e.mercatorYfromLat(Je[0]) * this.worldSize) - ae < Le.y ? Le.y / (fe - ae) : 0;
              }
              if (this.lngRange) {
                var at = this.lngRange;
                xe = e.mercatorXfromLng(at[0]) * this.worldSize, D = (ke = e.mercatorXfromLng(at[1]) * this.worldSize) - xe < Le.x ? Le.x / (ke - xe) : 0;
              }
              var _t = this.point, Et = Math.max(D || 0, C || 0);
              if (Et)
                return this.center = this.unproject(new e.Point(D ? (ke + xe) / 2 : _t.x, C ? (fe + ae) / 2 : _t.y)), this.zoom += this.scaleZoom(Et), this._unmodified = Ve, void (this._constraining = !1);
              if (this.latRange) {
                var kt = _t.y, At = Le.y / 2;
                kt - At < ae && (q = ae + At), kt + At > fe && (q = fe - At);
              }
              if (this.lngRange) {
                var xt = _t.x, Dt = Le.x / 2;
                xt - Dt < xe && (F = xe + Dt), xt + Dt > ke && (F = ke - Dt);
              }
              F === void 0 && q === void 0 || (this.center = this.unproject(new e.Point(F !== void 0 ? F : _t.x, q !== void 0 ? q : _t.y))), this._unmodified = Ve, this._constraining = !1;
            }
          }, Ht.prototype._calcMatrices = function() {
            if (this.height) {
              var C = this._fov / 2, D = this.centerOffset;
              this.cameraToCenterDistance = 0.5 / Math.tan(C) * this.height;
              var F = Math.PI / 2 + this._pitch, q = this._fov * (0.5 + D.y / this.height), ae = Math.sin(q) * this.cameraToCenterDistance / Math.sin(e.clamp(Math.PI - F - q, 0.01, Math.PI - 0.01)), fe = this.point, xe = fe.x, ke = fe.y, Le = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * ae + this.cameraToCenterDistance), Ve = this.height / 50, Je = new Float64Array(16);
              e.perspective(Je, this._fov, this.width / this.height, Ve, Le), Je[8] = 2 * -D.x / this.width, Je[9] = 2 * D.y / this.height, e.scale(Je, Je, [1, -1, 1]), e.translate(Je, Je, [0, 0, -this.cameraToCenterDistance]), e.rotateX(Je, Je, this._pitch), e.rotateZ(Je, Je, this.angle), e.translate(Je, Je, [-xe, -ke, 0]), this.mercatorMatrix = e.scale([], Je, [this.worldSize, this.worldSize, this.worldSize]), e.scale(Je, Je, [1, 1, e.mercatorZfromAltitude(1, this.center.lat) * this.worldSize, 1]), this.projMatrix = Je, this.invProjMatrix = e.invert([], this.projMatrix);
              var at = this.width % 2 / 2, _t = this.height % 2 / 2, Et = Math.cos(this.angle), kt = Math.sin(this.angle), At = xe - Math.round(xe) + Et * at + kt * _t, xt = ke - Math.round(ke) + Et * _t + kt * at, Dt = new Float64Array(Je);
              if (e.translate(Dt, Dt, [At > 0.5 ? At - 1 : At, xt > 0.5 ? xt - 1 : xt, 0]), this.alignedProjMatrix = Dt, Je = e.create(), e.scale(Je, Je, [this.width / 2, -this.height / 2, 1]), e.translate(Je, Je, [1, -1, 0]), this.labelPlaneMatrix = Je, Je = e.create(), e.scale(Je, Je, [1, -1, 1]), e.translate(Je, Je, [-1, -1, 0]), e.scale(Je, Je, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = Je, this.pixelMatrix = e.multiply(new Float64Array(16), this.labelPlaneMatrix, this.projMatrix), !(Je = e.invert(new Float64Array(16), this.pixelMatrix)))
                throw new Error("failed to invert matrix");
              this.pixelMatrixInverse = Je, this._posMatrixCache = {}, this._alignedPosMatrixCache = {};
            }
          }, Ht.prototype.maxPitchScaleFactor = function() {
            if (!this.pixelMatrixInverse)
              return 1;
            var C = this.pointCoordinate(new e.Point(0, 0)), D = [C.x * this.worldSize, C.y * this.worldSize, 0, 1];
            return e.transformMat4(D, D, this.pixelMatrix)[3] / this.cameraToCenterDistance;
          }, Ht.prototype.getCameraPoint = function() {
            var C = this._pitch, D = Math.tan(C) * (this.cameraToCenterDistance || 1);
            return this.centerPoint.add(new e.Point(0, D));
          }, Ht.prototype.getCameraQueryGeometry = function(C) {
            var D = this.getCameraPoint();
            if (C.length === 1)
              return [C[0], D];
            for (var F = D.x, q = D.y, ae = D.x, fe = D.y, xe = 0, ke = C; xe < ke.length; xe += 1) {
              var Le = ke[xe];
              F = Math.min(F, Le.x), q = Math.min(q, Le.y), ae = Math.max(ae, Le.x), fe = Math.max(fe, Le.y);
            }
            return [new e.Point(F, q), new e.Point(ae, q), new e.Point(ae, fe), new e.Point(F, fe), new e.Point(F, q)];
          }, Object.defineProperties(Ht.prototype, lr);
          var Pr = function(C) {
            var D, F, q, ae, fe;
            this._hashName = C && encodeURIComponent(C), e.bindAll(["_getCurrentHash", "_onHashChange", "_updateHash"], this), this._updateHash = (D = this._updateHashUnthrottled.bind(this), F = 300, q = !1, ae = null, fe = function() {
              ae = null, q && (D(), ae = setTimeout(fe, F), q = !1);
            }, function() {
              return q = !0, ae || fe(), ae;
            });
          };
          Pr.prototype.addTo = function(C) {
            return this._map = C, e.window.addEventListener("hashchange", this._onHashChange, !1), this._map.on("moveend", this._updateHash), this;
          }, Pr.prototype.remove = function() {
            return e.window.removeEventListener("hashchange", this._onHashChange, !1), this._map.off("moveend", this._updateHash), clearTimeout(this._updateHash()), delete this._map, this;
          }, Pr.prototype.getHashString = function(C) {
            var D = this._map.getCenter(), F = Math.round(100 * this._map.getZoom()) / 100, q = Math.ceil((F * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), ae = Math.pow(10, q), fe = Math.round(D.lng * ae) / ae, xe = Math.round(D.lat * ae) / ae, ke = this._map.getBearing(), Le = this._map.getPitch(), Ve = "";
            if (Ve += C ? "/" + fe + "/" + xe + "/" + F : F + "/" + xe + "/" + fe, (ke || Le) && (Ve += "/" + Math.round(10 * ke) / 10), Le && (Ve += "/" + Math.round(Le)), this._hashName) {
              var Je = this._hashName, at = !1, _t = e.window.location.hash.slice(1).split("&").map(function(Et) {
                var kt = Et.split("=")[0];
                return kt === Je ? (at = !0, kt + "=" + Ve) : Et;
              }).filter(function(Et) {
                return Et;
              });
              return at || _t.push(Je + "=" + Ve), "#" + _t.join("&");
            }
            return "#" + Ve;
          }, Pr.prototype._getCurrentHash = function() {
            var C, D = this, F = e.window.location.hash.replace("#", "");
            return this._hashName ? (F.split("&").map(function(q) {
              return q.split("=");
            }).forEach(function(q) {
              q[0] === D._hashName && (C = q);
            }), (C && C[1] || "").split("/")) : F.split("/");
          }, Pr.prototype._onHashChange = function() {
            var C = this._getCurrentHash();
            if (C.length >= 3 && !C.some(function(F) {
              return isNaN(F);
            })) {
              var D = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(C[3] || 0) : this._map.getBearing();
              return this._map.jumpTo({ center: [+C[2], +C[1]], zoom: +C[0], bearing: D, pitch: +(C[4] || 0) }), !0;
            }
            return !1;
          }, Pr.prototype._updateHashUnthrottled = function() {
            var C = this.getHashString();
            try {
              e.window.history.replaceState(e.window.history.state, "", C);
            } catch {
            }
          };
          var Nr = { linearity: 0.3, easing: e.bezier(0, 0, 0.3, 1) }, Wr = e.extend({ deceleration: 2500, maxSpeed: 1400 }, Nr), sn = e.extend({ deceleration: 20, maxSpeed: 1400 }, Nr), an = e.extend({ deceleration: 1e3, maxSpeed: 360 }, Nr), dn = e.extend({ deceleration: 1e3, maxSpeed: 90 }, Nr), Tn = function(C) {
            this._map = C, this.clear();
          };
          function ln(C, D) {
            (!C.duration || C.duration < D.duration) && (C.duration = D.duration, C.easing = D.easing);
          }
          function kn(C, D, F) {
            var q = F.maxSpeed, ae = F.linearity, fe = F.deceleration, xe = e.clamp(C * ae / (D / 1e3), -q, q), ke = Math.abs(xe) / (fe * ae);
            return { easing: F.easing, duration: 1e3 * ke, amount: xe * (ke / 2) };
          }
          Tn.prototype.clear = function() {
            this._inertiaBuffer = [];
          }, Tn.prototype.record = function(C) {
            this._drainInertiaBuffer(), this._inertiaBuffer.push({ time: e.browser.now(), settings: C });
          }, Tn.prototype._drainInertiaBuffer = function() {
            for (var C = this._inertiaBuffer, D = e.browser.now(); C.length > 0 && D - C[0].time > 160; )
              C.shift();
          }, Tn.prototype._onMoveEnd = function(C) {
            if (this._drainInertiaBuffer(), !(this._inertiaBuffer.length < 2)) {
              for (var D = { zoom: 0, bearing: 0, pitch: 0, pan: new e.Point(0, 0), pinchAround: void 0, around: void 0 }, F = 0, q = this._inertiaBuffer; F < q.length; F += 1) {
                var ae = q[F].settings;
                D.zoom += ae.zoomDelta || 0, D.bearing += ae.bearingDelta || 0, D.pitch += ae.pitchDelta || 0, ae.panDelta && D.pan._add(ae.panDelta), ae.around && (D.around = ae.around), ae.pinchAround && (D.pinchAround = ae.pinchAround);
              }
              var fe = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, xe = {};
              if (D.pan.mag()) {
                var ke = kn(D.pan.mag(), fe, e.extend({}, Wr, C || {}));
                xe.offset = D.pan.mult(ke.amount / D.pan.mag()), xe.center = this._map.transform.center, ln(xe, ke);
              }
              if (D.zoom) {
                var Le = kn(D.zoom, fe, sn);
                xe.zoom = this._map.transform.zoom + Le.amount, ln(xe, Le);
              }
              if (D.bearing) {
                var Ve = kn(D.bearing, fe, an);
                xe.bearing = this._map.transform.bearing + e.clamp(Ve.amount, -179, 179), ln(xe, Ve);
              }
              if (D.pitch) {
                var Je = kn(D.pitch, fe, dn);
                xe.pitch = this._map.transform.pitch + Je.amount, ln(xe, Je);
              }
              if (xe.zoom || xe.bearing) {
                var at = D.pinchAround === void 0 ? D.around : D.pinchAround;
                xe.around = at ? this._map.unproject(at) : this._map.getCenter();
              }
              return this.clear(), e.extend(xe, { noMoveStart: !0 });
            }
          };
          var Rn = function(C) {
            function D(q, ae, fe, xe) {
              xe === void 0 && (xe = {});
              var ke = n.mousePos(ae.getCanvasContainer(), fe), Le = ae.unproject(ke);
              C.call(this, q, e.extend({ point: ke, lngLat: Le, originalEvent: fe }, xe)), this._defaultPrevented = !1, this.target = ae;
            }
            C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D;
            var F = { defaultPrevented: { configurable: !0 } };
            return D.prototype.preventDefault = function() {
              this._defaultPrevented = !0;
            }, F.defaultPrevented.get = function() {
              return this._defaultPrevented;
            }, Object.defineProperties(D.prototype, F), D;
          }(e.Event), Un = function(C) {
            function D(q, ae, fe) {
              var xe = q === "touchend" ? fe.changedTouches : fe.touches, ke = n.touchPos(ae.getCanvasContainer(), xe), Le = ke.map(function(at) {
                return ae.unproject(at);
              }), Ve = ke.reduce(function(at, _t, Et, kt) {
                return at.add(_t.div(kt.length));
              }, new e.Point(0, 0)), Je = ae.unproject(Ve);
              C.call(this, q, { points: ke, point: Ve, lngLats: Le, lngLat: Je, originalEvent: fe }), this._defaultPrevented = !1;
            }
            C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D;
            var F = { defaultPrevented: { configurable: !0 } };
            return D.prototype.preventDefault = function() {
              this._defaultPrevented = !0;
            }, F.defaultPrevented.get = function() {
              return this._defaultPrevented;
            }, Object.defineProperties(D.prototype, F), D;
          }(e.Event), ia = function(C) {
            function D(q, ae, fe) {
              C.call(this, q, { originalEvent: fe }), this._defaultPrevented = !1;
            }
            C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D;
            var F = { defaultPrevented: { configurable: !0 } };
            return D.prototype.preventDefault = function() {
              this._defaultPrevented = !0;
            }, F.defaultPrevented.get = function() {
              return this._defaultPrevented;
            }, Object.defineProperties(D.prototype, F), D;
          }(e.Event), Zr = function(C, D) {
            this._map = C, this._clickTolerance = D.clickTolerance;
          };
          Zr.prototype.reset = function() {
            delete this._mousedownPos;
          }, Zr.prototype.wheel = function(C) {
            return this._firePreventable(new ia(C.type, this._map, C));
          }, Zr.prototype.mousedown = function(C, D) {
            return this._mousedownPos = D, this._firePreventable(new Rn(C.type, this._map, C));
          }, Zr.prototype.mouseup = function(C) {
            this._map.fire(new Rn(C.type, this._map, C));
          }, Zr.prototype.click = function(C, D) {
            this._mousedownPos && this._mousedownPos.dist(D) >= this._clickTolerance || this._map.fire(new Rn(C.type, this._map, C));
          }, Zr.prototype.dblclick = function(C) {
            return this._firePreventable(new Rn(C.type, this._map, C));
          }, Zr.prototype.mouseover = function(C) {
            this._map.fire(new Rn(C.type, this._map, C));
          }, Zr.prototype.mouseout = function(C) {
            this._map.fire(new Rn(C.type, this._map, C));
          }, Zr.prototype.touchstart = function(C) {
            return this._firePreventable(new Un(C.type, this._map, C));
          }, Zr.prototype.touchmove = function(C) {
            this._map.fire(new Un(C.type, this._map, C));
          }, Zr.prototype.touchend = function(C) {
            this._map.fire(new Un(C.type, this._map, C));
          }, Zr.prototype.touchcancel = function(C) {
            this._map.fire(new Un(C.type, this._map, C));
          }, Zr.prototype._firePreventable = function(C) {
            if (this._map.fire(C), C.defaultPrevented)
              return {};
          }, Zr.prototype.isEnabled = function() {
            return !0;
          }, Zr.prototype.isActive = function() {
            return !1;
          }, Zr.prototype.enable = function() {
          }, Zr.prototype.disable = function() {
          };
          var ta = function(C) {
            this._map = C;
          };
          ta.prototype.reset = function() {
            this._delayContextMenu = !1, delete this._contextMenuEvent;
          }, ta.prototype.mousemove = function(C) {
            this._map.fire(new Rn(C.type, this._map, C));
          }, ta.prototype.mousedown = function() {
            this._delayContextMenu = !0;
          }, ta.prototype.mouseup = function() {
            this._delayContextMenu = !1, this._contextMenuEvent && (this._map.fire(new Rn("contextmenu", this._map, this._contextMenuEvent)), delete this._contextMenuEvent);
          }, ta.prototype.contextmenu = function(C) {
            this._delayContextMenu ? this._contextMenuEvent = C : this._map.fire(new Rn(C.type, this._map, C)), this._map.listens("contextmenu") && C.preventDefault();
          }, ta.prototype.isEnabled = function() {
            return !0;
          }, ta.prototype.isActive = function() {
            return !1;
          }, ta.prototype.enable = function() {
          }, ta.prototype.disable = function() {
          };
          var Pn = function(C, D) {
            this._map = C, this._el = C.getCanvasContainer(), this._container = C.getContainer(), this._clickTolerance = D.clickTolerance || 1;
          };
          function Nn(C, D) {
            for (var F = {}, q = 0; q < C.length; q++)
              F[C[q].identifier] = D[q];
            return F;
          }
          Pn.prototype.isEnabled = function() {
            return !!this._enabled;
          }, Pn.prototype.isActive = function() {
            return !!this._active;
          }, Pn.prototype.enable = function() {
            this.isEnabled() || (this._enabled = !0);
          }, Pn.prototype.disable = function() {
            this.isEnabled() && (this._enabled = !1);
          }, Pn.prototype.mousedown = function(C, D) {
            this.isEnabled() && C.shiftKey && C.button === 0 && (n.disableDrag(), this._startPos = this._lastPos = D, this._active = !0);
          }, Pn.prototype.mousemoveWindow = function(C, D) {
            if (this._active) {
              var F = D;
              if (!(this._lastPos.equals(F) || !this._box && F.dist(this._startPos) < this._clickTolerance)) {
                var q = this._startPos;
                this._lastPos = F, this._box || (this._box = n.create("div", "mapboxgl-boxzoom", this._container), this._container.classList.add("mapboxgl-crosshair"), this._fireEvent("boxzoomstart", C));
                var ae = Math.min(q.x, F.x), fe = Math.max(q.x, F.x), xe = Math.min(q.y, F.y), ke = Math.max(q.y, F.y);
                n.setTransform(this._box, "translate(" + ae + "px," + xe + "px)"), this._box.style.width = fe - ae + "px", this._box.style.height = ke - xe + "px";
              }
            }
          }, Pn.prototype.mouseupWindow = function(C, D) {
            var F = this;
            if (this._active && C.button === 0) {
              var q = this._startPos, ae = D;
              if (this.reset(), n.suppressClick(), q.x !== ae.x || q.y !== ae.y)
                return this._map.fire(new e.Event("boxzoomend", { originalEvent: C })), { cameraAnimation: function(fe) {
                  return fe.fitScreenCoordinates(q, ae, F._map.getBearing(), { linear: !0 });
                } };
              this._fireEvent("boxzoomcancel", C);
            }
          }, Pn.prototype.keydown = function(C) {
            this._active && C.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", C));
          }, Pn.prototype.reset = function() {
            this._active = !1, this._container.classList.remove("mapboxgl-crosshair"), this._box && (n.remove(this._box), this._box = null), n.enableDrag(), delete this._startPos, delete this._lastPos;
          }, Pn.prototype._fireEvent = function(C, D) {
            return this._map.fire(new e.Event(C, { originalEvent: D }));
          };
          var ea = function(C) {
            this.reset(), this.numTouches = C.numTouches;
          };
          ea.prototype.reset = function() {
            delete this.centroid, delete this.startTime, delete this.touches, this.aborted = !1;
          }, ea.prototype.touchstart = function(C, D, F) {
            (this.centroid || F.length > this.numTouches) && (this.aborted = !0), this.aborted || (this.startTime === void 0 && (this.startTime = C.timeStamp), F.length === this.numTouches && (this.centroid = function(q) {
              for (var ae = new e.Point(0, 0), fe = 0, xe = q; fe < xe.length; fe += 1) {
                var ke = xe[fe];
                ae._add(ke);
              }
              return ae.div(q.length);
            }(D), this.touches = Nn(F, D)));
          }, ea.prototype.touchmove = function(C, D, F) {
            if (!this.aborted && this.centroid) {
              var q = Nn(F, D);
              for (var ae in this.touches) {
                var fe = this.touches[ae], xe = q[ae];
                (!xe || xe.dist(fe) > 30) && (this.aborted = !0);
              }
            }
          }, ea.prototype.touchend = function(C, D, F) {
            if ((!this.centroid || C.timeStamp - this.startTime > 500) && (this.aborted = !0), F.length === 0) {
              var q = !this.aborted && this.centroid;
              if (this.reset(), q)
                return q;
            }
          };
          var wa = function(C) {
            this.singleTap = new ea(C), this.numTaps = C.numTaps, this.reset();
          };
          wa.prototype.reset = function() {
            this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset();
          }, wa.prototype.touchstart = function(C, D, F) {
            this.singleTap.touchstart(C, D, F);
          }, wa.prototype.touchmove = function(C, D, F) {
            this.singleTap.touchmove(C, D, F);
          }, wa.prototype.touchend = function(C, D, F) {
            var q = this.singleTap.touchend(C, D, F);
            if (q) {
              var ae = C.timeStamp - this.lastTime < 500, fe = !this.lastTap || this.lastTap.dist(q) < 30;
              if (ae && fe || this.reset(), this.count++, this.lastTime = C.timeStamp, this.lastTap = q, this.count === this.numTaps)
                return this.reset(), q;
            }
          };
          var La = function() {
            this._zoomIn = new wa({ numTouches: 1, numTaps: 2 }), this._zoomOut = new wa({ numTouches: 2, numTaps: 1 }), this.reset();
          };
          La.prototype.reset = function() {
            this._active = !1, this._zoomIn.reset(), this._zoomOut.reset();
          }, La.prototype.touchstart = function(C, D, F) {
            this._zoomIn.touchstart(C, D, F), this._zoomOut.touchstart(C, D, F);
          }, La.prototype.touchmove = function(C, D, F) {
            this._zoomIn.touchmove(C, D, F), this._zoomOut.touchmove(C, D, F);
          }, La.prototype.touchend = function(C, D, F) {
            var q = this, ae = this._zoomIn.touchend(C, D, F), fe = this._zoomOut.touchend(C, D, F);
            return ae ? (this._active = !0, C.preventDefault(), setTimeout(function() {
              return q.reset();
            }, 0), { cameraAnimation: function(xe) {
              return xe.easeTo({ duration: 300, zoom: xe.getZoom() + 1, around: xe.unproject(ae) }, { originalEvent: C });
            } }) : fe ? (this._active = !0, C.preventDefault(), setTimeout(function() {
              return q.reset();
            }, 0), { cameraAnimation: function(xe) {
              return xe.easeTo({ duration: 300, zoom: xe.getZoom() - 1, around: xe.unproject(fe) }, { originalEvent: C });
            } }) : void 0;
          }, La.prototype.touchcancel = function() {
            this.reset();
          }, La.prototype.enable = function() {
            this._enabled = !0;
          }, La.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, La.prototype.isEnabled = function() {
            return this._enabled;
          }, La.prototype.isActive = function() {
            return this._active;
          };
          var Sn = function(C) {
            this.reset(), this._clickTolerance = C.clickTolerance || 1;
          };
          Sn.prototype.reset = function() {
            this._active = !1, this._moved = !1, delete this._lastPoint, delete this._eventButton;
          }, Sn.prototype._correctButton = function(C, D) {
            return !1;
          }, Sn.prototype._move = function(C, D) {
            return {};
          }, Sn.prototype.mousedown = function(C, D) {
            if (!this._lastPoint) {
              var F = n.mouseButton(C);
              this._correctButton(C, F) && (this._lastPoint = D, this._eventButton = F);
            }
          }, Sn.prototype.mousemoveWindow = function(C, D) {
            var F = this._lastPoint;
            if (F && (C.preventDefault(), this._moved || !(D.dist(F) < this._clickTolerance)))
              return this._moved = !0, this._lastPoint = D, this._move(F, D);
          }, Sn.prototype.mouseupWindow = function(C) {
            n.mouseButton(C) === this._eventButton && (this._moved && n.suppressClick(), this.reset());
          }, Sn.prototype.enable = function() {
            this._enabled = !0;
          }, Sn.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, Sn.prototype.isEnabled = function() {
            return this._enabled;
          }, Sn.prototype.isActive = function() {
            return this._active;
          };
          var za = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.mousedown = function(F, q) {
              C.prototype.mousedown.call(this, F, q), this._lastPoint && (this._active = !0);
            }, D.prototype._correctButton = function(F, q) {
              return q === 0 && !F.ctrlKey;
            }, D.prototype._move = function(F, q) {
              return { around: q, panDelta: q.sub(F) };
            }, D;
          }(Sn), Ea = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype._correctButton = function(F, q) {
              return q === 0 && F.ctrlKey || q === 2;
            }, D.prototype._move = function(F, q) {
              var ae = 0.8 * (q.x - F.x);
              if (ae)
                return this._active = !0, { bearingDelta: ae };
            }, D.prototype.contextmenu = function(F) {
              F.preventDefault();
            }, D;
          }(Sn), da = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype._correctButton = function(F, q) {
              return q === 0 && F.ctrlKey || q === 2;
            }, D.prototype._move = function(F, q) {
              var ae = -0.5 * (q.y - F.y);
              if (ae)
                return this._active = !0, { pitchDelta: ae };
            }, D.prototype.contextmenu = function(F) {
              F.preventDefault();
            }, D;
          }(Sn), Da = function(C) {
            this._minTouches = 1, this._clickTolerance = C.clickTolerance || 1, this.reset();
          };
          Da.prototype.reset = function() {
            this._active = !1, this._touches = {}, this._sum = new e.Point(0, 0);
          }, Da.prototype.touchstart = function(C, D, F) {
            return this._calculateTransform(C, D, F);
          }, Da.prototype.touchmove = function(C, D, F) {
            if (this._active)
              return C.preventDefault(), this._calculateTransform(C, D, F);
          }, Da.prototype.touchend = function(C, D, F) {
            this._calculateTransform(C, D, F), this._active && F.length < this._minTouches && this.reset();
          }, Da.prototype.touchcancel = function() {
            this.reset();
          }, Da.prototype._calculateTransform = function(C, D, F) {
            F.length > 0 && (this._active = !0);
            var q = Nn(F, D), ae = new e.Point(0, 0), fe = new e.Point(0, 0), xe = 0;
            for (var ke in q) {
              var Le = q[ke], Ve = this._touches[ke];
              Ve && (ae._add(Le), fe._add(Le.sub(Ve)), xe++, q[ke] = Le);
            }
            if (this._touches = q, !(xe < this._minTouches) && fe.mag()) {
              var Je = fe.div(xe);
              if (this._sum._add(Je), !(this._sum.mag() < this._clickTolerance))
                return { around: ae.div(xe), panDelta: Je };
            }
          }, Da.prototype.enable = function() {
            this._enabled = !0;
          }, Da.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, Da.prototype.isEnabled = function() {
            return this._enabled;
          }, Da.prototype.isActive = function() {
            return this._active;
          };
          var Aa = function() {
            this.reset();
          };
          function $a(C, D, F) {
            for (var q = 0; q < C.length; q++)
              if (C[q].identifier === F)
                return D[q];
          }
          Aa.prototype.reset = function() {
            this._active = !1, delete this._firstTwoTouches;
          }, Aa.prototype._start = function(C) {
          }, Aa.prototype._move = function(C, D, F) {
            return {};
          }, Aa.prototype.touchstart = function(C, D, F) {
            this._firstTwoTouches || F.length < 2 || (this._firstTwoTouches = [F[0].identifier, F[1].identifier], this._start([D[0], D[1]]));
          }, Aa.prototype.touchmove = function(C, D, F) {
            if (this._firstTwoTouches) {
              C.preventDefault();
              var q = this._firstTwoTouches, ae = q[0], fe = q[1], xe = $a(F, D, ae), ke = $a(F, D, fe);
              if (xe && ke) {
                var Le = this._aroundCenter ? null : xe.add(ke).div(2);
                return this._move([xe, ke], Le, C);
              }
            }
          }, Aa.prototype.touchend = function(C, D, F) {
            if (this._firstTwoTouches) {
              var q = this._firstTwoTouches, ae = q[0], fe = q[1], xe = $a(F, D, ae), ke = $a(F, D, fe);
              xe && ke || (this._active && n.suppressClick(), this.reset());
            }
          }, Aa.prototype.touchcancel = function() {
            this.reset();
          }, Aa.prototype.enable = function(C) {
            this._enabled = !0, this._aroundCenter = !!C && C.around === "center";
          }, Aa.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, Aa.prototype.isEnabled = function() {
            return this._enabled;
          }, Aa.prototype.isActive = function() {
            return this._active;
          };
          function ra(C, D) {
            return Math.log(C / D) / Math.LN2;
          }
          var Za = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.reset = function() {
              C.prototype.reset.call(this), delete this._distance, delete this._startDistance;
            }, D.prototype._start = function(F) {
              this._startDistance = this._distance = F[0].dist(F[1]);
            }, D.prototype._move = function(F, q) {
              var ae = this._distance;
              if (this._distance = F[0].dist(F[1]), this._active || !(Math.abs(ra(this._distance, this._startDistance)) < 0.1))
                return this._active = !0, { zoomDelta: ra(this._distance, ae), pinchAround: q };
            }, D;
          }(Aa);
          function Bi(C, D) {
            return 180 * C.angleWith(D) / Math.PI;
          }
          var Go = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.reset = function() {
              C.prototype.reset.call(this), delete this._minDiameter, delete this._startVector, delete this._vector;
            }, D.prototype._start = function(F) {
              this._startVector = this._vector = F[0].sub(F[1]), this._minDiameter = F[0].dist(F[1]);
            }, D.prototype._move = function(F, q) {
              var ae = this._vector;
              if (this._vector = F[0].sub(F[1]), this._active || !this._isBelowThreshold(this._vector))
                return this._active = !0, { bearingDelta: Bi(this._vector, ae), pinchAround: q };
            }, D.prototype._isBelowThreshold = function(F) {
              this._minDiameter = Math.min(this._minDiameter, F.mag());
              var q = 25 / (Math.PI * this._minDiameter) * 360, ae = Bi(F, this._startVector);
              return Math.abs(ae) < q;
            }, D;
          }(Aa);
          function Oo(C) {
            return Math.abs(C.y) > Math.abs(C.x);
          }
          var go = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.reset = function() {
              C.prototype.reset.call(this), this._valid = void 0, delete this._firstMove, delete this._lastPoints;
            }, D.prototype._start = function(F) {
              this._lastPoints = F, Oo(F[0].sub(F[1])) && (this._valid = !1);
            }, D.prototype._move = function(F, q, ae) {
              var fe = F[0].sub(this._lastPoints[0]), xe = F[1].sub(this._lastPoints[1]);
              if (this._valid = this.gestureBeginsVertically(fe, xe, ae.timeStamp), this._valid)
                return this._lastPoints = F, this._active = !0, { pitchDelta: -0.5 * ((fe.y + xe.y) / 2) };
            }, D.prototype.gestureBeginsVertically = function(F, q, ae) {
              if (this._valid !== void 0)
                return this._valid;
              var fe = F.mag() >= 2, xe = q.mag() >= 2;
              if (fe || xe) {
                if (!fe || !xe)
                  return this._firstMove === void 0 && (this._firstMove = ae), ae - this._firstMove < 100 && void 0;
                var ke = F.y > 0 == q.y > 0;
                return Oo(F) && Oo(q) && ke;
              }
            }, D;
          }(Aa), va = { panStep: 100, bearingStep: 15, pitchStep: 10 }, di = function() {
            var C = va;
            this._panStep = C.panStep, this._bearingStep = C.bearingStep, this._pitchStep = C.pitchStep;
          };
          function vo(C) {
            return C * (2 - C);
          }
          di.prototype.reset = function() {
            this._active = !1;
          }, di.prototype.keydown = function(C) {
            var D = this;
            if (!(C.altKey || C.ctrlKey || C.metaKey)) {
              var F = 0, q = 0, ae = 0, fe = 0, xe = 0;
              switch (C.keyCode) {
                case 61:
                case 107:
                case 171:
                case 187:
                  F = 1;
                  break;
                case 189:
                case 109:
                case 173:
                  F = -1;
                  break;
                case 37:
                  C.shiftKey ? q = -1 : (C.preventDefault(), fe = -1);
                  break;
                case 39:
                  C.shiftKey ? q = 1 : (C.preventDefault(), fe = 1);
                  break;
                case 38:
                  C.shiftKey ? ae = 1 : (C.preventDefault(), xe = -1);
                  break;
                case 40:
                  C.shiftKey ? ae = -1 : (C.preventDefault(), xe = 1);
                  break;
                default:
                  return;
              }
              return { cameraAnimation: function(ke) {
                var Le = ke.getZoom();
                ke.easeTo({ duration: 300, easeId: "keyboardHandler", easing: vo, zoom: F ? Math.round(Le) + F * (C.shiftKey ? 2 : 1) : Le, bearing: ke.getBearing() + q * D._bearingStep, pitch: ke.getPitch() + ae * D._pitchStep, offset: [-fe * D._panStep, -xe * D._panStep], center: ke.getCenter() }, { originalEvent: C });
              } };
            }
          }, di.prototype.enable = function() {
            this._enabled = !0;
          }, di.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, di.prototype.isEnabled = function() {
            return this._enabled;
          }, di.prototype.isActive = function() {
            return this._active;
          };
          var Xa = function(C, D) {
            this._map = C, this._el = C.getCanvasContainer(), this._handler = D, this._delta = 0, this._defaultZoomRate = 0.01, this._wheelZoomRate = 1 / 450, e.bindAll(["_onWheel", "_onTimeout", "_onScrollFrame", "_onScrollFinished"], this);
          };
          Xa.prototype.setZoomRate = function(C) {
            this._defaultZoomRate = C;
          }, Xa.prototype.setWheelZoomRate = function(C) {
            this._wheelZoomRate = C;
          }, Xa.prototype.isEnabled = function() {
            return !!this._enabled;
          }, Xa.prototype.isActive = function() {
            return !!this._active || this._finishTimeout !== void 0;
          }, Xa.prototype.isZooming = function() {
            return !!this._zooming;
          }, Xa.prototype.enable = function(C) {
            this.isEnabled() || (this._enabled = !0, this._aroundCenter = C && C.around === "center");
          }, Xa.prototype.disable = function() {
            this.isEnabled() && (this._enabled = !1);
          }, Xa.prototype.wheel = function(C) {
            if (this.isEnabled()) {
              var D = C.deltaMode === e.window.WheelEvent.DOM_DELTA_LINE ? 40 * C.deltaY : C.deltaY, F = e.browser.now(), q = F - (this._lastWheelEventTime || 0);
              this._lastWheelEventTime = F, D !== 0 && D % 4.000244140625 == 0 ? this._type = "wheel" : D !== 0 && Math.abs(D) < 4 ? this._type = "trackpad" : q > 400 ? (this._type = null, this._lastValue = D, this._timeout = setTimeout(this._onTimeout, 40, C)) : this._type || (this._type = Math.abs(q * D) < 200 ? "trackpad" : "wheel", this._timeout && (clearTimeout(this._timeout), this._timeout = null, D += this._lastValue)), C.shiftKey && D && (D /= 4), this._type && (this._lastWheelEvent = C, this._delta -= D, this._active || this._start(C)), C.preventDefault();
            }
          }, Xa.prototype._onTimeout = function(C) {
            this._type = "wheel", this._delta -= this._lastValue, this._active || this._start(C);
          }, Xa.prototype._start = function(C) {
            if (this._delta) {
              this._frameId && (this._frameId = null), this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
              var D = n.mousePos(this._el, C);
              this._around = e.LngLat.convert(this._aroundCenter ? this._map.getCenter() : this._map.unproject(D)), this._aroundPoint = this._map.transform.locationPoint(this._around), this._frameId || (this._frameId = !0, this._handler._triggerRenderFrame());
            }
          }, Xa.prototype.renderFrame = function() {
            return this._onScrollFrame();
          }, Xa.prototype._onScrollFrame = function() {
            var C = this;
            if (this._frameId && (this._frameId = null, this.isActive())) {
              var D = this._map.transform;
              if (this._delta !== 0) {
                var F = this._type === "wheel" && Math.abs(this._delta) > 4.000244140625 ? this._wheelZoomRate : this._defaultZoomRate, q = 2 / (1 + Math.exp(-Math.abs(this._delta * F)));
                this._delta < 0 && q !== 0 && (q = 1 / q);
                var ae = typeof this._targetZoom == "number" ? D.zoomScale(this._targetZoom) : D.scale;
                this._targetZoom = Math.min(D.maxZoom, Math.max(D.minZoom, D.scaleZoom(ae * q))), this._type === "wheel" && (this._startZoom = D.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
              }
              var fe, xe = typeof this._targetZoom == "number" ? this._targetZoom : D.zoom, ke = this._startZoom, Le = this._easing, Ve = !1;
              if (this._type === "wheel" && ke && Le) {
                var Je = Math.min((e.browser.now() - this._lastWheelEventTime) / 200, 1), at = Le(Je);
                fe = e.number(ke, xe, at), Je < 1 ? this._frameId || (this._frameId = !0) : Ve = !0;
              } else
                fe = xe, Ve = !0;
              return this._active = !0, Ve && (this._active = !1, this._finishTimeout = setTimeout(function() {
                C._zooming = !1, C._handler._triggerRenderFrame(), delete C._targetZoom, delete C._finishTimeout;
              }, 200)), { noInertia: !0, needsRenderFrame: !Ve, zoomDelta: fe - D.zoom, around: this._aroundPoint, originalEvent: this._lastWheelEvent };
            }
          }, Xa.prototype._smoothOutEasing = function(C) {
            var D = e.ease;
            if (this._prevEase) {
              var F = this._prevEase, q = (e.browser.now() - F.start) / F.duration, ae = F.easing(q + 0.01) - F.easing(q), fe = 0.27 / Math.sqrt(ae * ae + 1e-4) * 0.01, xe = Math.sqrt(0.0729 - fe * fe);
              D = e.bezier(fe, xe, 0.25, 1);
            }
            return this._prevEase = { start: e.browser.now(), duration: C, easing: D }, D;
          }, Xa.prototype.reset = function() {
            this._active = !1;
          };
          var wi = function(C, D) {
            this._clickZoom = C, this._tapZoom = D;
          };
          wi.prototype.enable = function() {
            this._clickZoom.enable(), this._tapZoom.enable();
          }, wi.prototype.disable = function() {
            this._clickZoom.disable(), this._tapZoom.disable();
          }, wi.prototype.isEnabled = function() {
            return this._clickZoom.isEnabled() && this._tapZoom.isEnabled();
          }, wi.prototype.isActive = function() {
            return this._clickZoom.isActive() || this._tapZoom.isActive();
          };
          var Hi = function() {
            this.reset();
          };
          Hi.prototype.reset = function() {
            this._active = !1;
          }, Hi.prototype.dblclick = function(C, D) {
            return C.preventDefault(), { cameraAnimation: function(F) {
              F.easeTo({ duration: 300, zoom: F.getZoom() + (C.shiftKey ? -1 : 1), around: F.unproject(D) }, { originalEvent: C });
            } };
          }, Hi.prototype.enable = function() {
            this._enabled = !0;
          }, Hi.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, Hi.prototype.isEnabled = function() {
            return this._enabled;
          }, Hi.prototype.isActive = function() {
            return this._active;
          };
          var ti = function() {
            this._tap = new wa({ numTouches: 1, numTaps: 1 }), this.reset();
          };
          ti.prototype.reset = function() {
            this._active = !1, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, this._tap.reset();
          }, ti.prototype.touchstart = function(C, D, F) {
            this._swipePoint || (this._tapTime && C.timeStamp - this._tapTime > 500 && this.reset(), this._tapTime ? F.length > 0 && (this._swipePoint = D[0], this._swipeTouch = F[0].identifier) : this._tap.touchstart(C, D, F));
          }, ti.prototype.touchmove = function(C, D, F) {
            if (this._tapTime) {
              if (this._swipePoint) {
                if (F[0].identifier !== this._swipeTouch)
                  return;
                var q = D[0], ae = q.y - this._swipePoint.y;
                return this._swipePoint = q, C.preventDefault(), this._active = !0, { zoomDelta: ae / 128 };
              }
            } else
              this._tap.touchmove(C, D, F);
          }, ti.prototype.touchend = function(C, D, F) {
            this._tapTime ? this._swipePoint && F.length === 0 && this.reset() : this._tap.touchend(C, D, F) && (this._tapTime = C.timeStamp);
          }, ti.prototype.touchcancel = function() {
            this.reset();
          }, ti.prototype.enable = function() {
            this._enabled = !0;
          }, ti.prototype.disable = function() {
            this._enabled = !1, this.reset();
          }, ti.prototype.isEnabled = function() {
            return this._enabled;
          }, ti.prototype.isActive = function() {
            return this._active;
          };
          var uo = function(C, D, F) {
            this._el = C, this._mousePan = D, this._touchPan = F;
          };
          uo.prototype.enable = function(C) {
            this._inertiaOptions = C || {}, this._mousePan.enable(), this._touchPan.enable(), this._el.classList.add("mapboxgl-touch-drag-pan");
          }, uo.prototype.disable = function() {
            this._mousePan.disable(), this._touchPan.disable(), this._el.classList.remove("mapboxgl-touch-drag-pan");
          }, uo.prototype.isEnabled = function() {
            return this._mousePan.isEnabled() && this._touchPan.isEnabled();
          }, uo.prototype.isActive = function() {
            return this._mousePan.isActive() || this._touchPan.isActive();
          };
          var ri = function(C, D, F) {
            this._pitchWithRotate = C.pitchWithRotate, this._mouseRotate = D, this._mousePitch = F;
          };
          ri.prototype.enable = function() {
            this._mouseRotate.enable(), this._pitchWithRotate && this._mousePitch.enable();
          }, ri.prototype.disable = function() {
            this._mouseRotate.disable(), this._mousePitch.disable();
          }, ri.prototype.isEnabled = function() {
            return this._mouseRotate.isEnabled() && (!this._pitchWithRotate || this._mousePitch.isEnabled());
          }, ri.prototype.isActive = function() {
            return this._mouseRotate.isActive() || this._mousePitch.isActive();
          };
          var eo = function(C, D, F, q) {
            this._el = C, this._touchZoom = D, this._touchRotate = F, this._tapDragZoom = q, this._rotationDisabled = !1, this._enabled = !0;
          };
          eo.prototype.enable = function(C) {
            this._touchZoom.enable(C), this._rotationDisabled || this._touchRotate.enable(C), this._tapDragZoom.enable(), this._el.classList.add("mapboxgl-touch-zoom-rotate");
          }, eo.prototype.disable = function() {
            this._touchZoom.disable(), this._touchRotate.disable(), this._tapDragZoom.disable(), this._el.classList.remove("mapboxgl-touch-zoom-rotate");
          }, eo.prototype.isEnabled = function() {
            return this._touchZoom.isEnabled() && (this._rotationDisabled || this._touchRotate.isEnabled()) && this._tapDragZoom.isEnabled();
          }, eo.prototype.isActive = function() {
            return this._touchZoom.isActive() || this._touchRotate.isActive() || this._tapDragZoom.isActive();
          }, eo.prototype.disableRotation = function() {
            this._rotationDisabled = !0, this._touchRotate.disable();
          }, eo.prototype.enableRotation = function() {
            this._rotationDisabled = !1, this._touchZoom.isEnabled() && this._touchRotate.enable();
          };
          var ns = function(C) {
            return C.zoom || C.drag || C.pitch || C.rotate;
          }, Ko = function(C) {
            function D() {
              C.apply(this, arguments);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D;
          }(e.Event);
          function Os(C) {
            return C.panDelta && C.panDelta.mag() || C.zoomDelta || C.bearingDelta || C.pitchDelta;
          }
          var Oi = function(C, D) {
            this._map = C, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new Tn(C), this._bearingSnap = D.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(D), e.bindAll(["handleEvent", "handleWindowEvent"], this);
            var F = this._el;
            this._listeners = [[F, "touchstart", { passive: !1 }], [F, "touchmove", { passive: !1 }], [F, "touchend", void 0], [F, "touchcancel", void 0], [F, "mousedown", void 0], [F, "mousemove", void 0], [F, "mouseup", void 0], [e.window.document, "mousemove", { capture: !0 }], [e.window.document, "mouseup", void 0], [F, "mouseover", void 0], [F, "mouseout", void 0], [F, "dblclick", void 0], [F, "click", void 0], [F, "keydown", { capture: !1 }], [F, "keyup", void 0], [F, "wheel", { passive: !1 }], [F, "contextmenu", void 0], [e.window, "blur", void 0]];
            for (var q = 0, ae = this._listeners; q < ae.length; q += 1) {
              var fe = ae[q], xe = fe[0], ke = fe[1], Le = fe[2];
              n.addEventListener(xe, ke, xe === e.window.document ? this.handleWindowEvent : this.handleEvent, Le);
            }
          };
          Oi.prototype.destroy = function() {
            for (var C = 0, D = this._listeners; C < D.length; C += 1) {
              var F = D[C], q = F[0], ae = F[1], fe = F[2];
              n.removeEventListener(q, ae, q === e.window.document ? this.handleWindowEvent : this.handleEvent, fe);
            }
          }, Oi.prototype._addDefaultHandlers = function(C) {
            var D = this._map, F = D.getCanvasContainer();
            this._add("mapEvent", new Zr(D, C));
            var q = D.boxZoom = new Pn(D, C);
            this._add("boxZoom", q);
            var ae = new La(), fe = new Hi();
            D.doubleClickZoom = new wi(fe, ae), this._add("tapZoom", ae), this._add("clickZoom", fe);
            var xe = new ti();
            this._add("tapDragZoom", xe);
            var ke = D.touchPitch = new go();
            this._add("touchPitch", ke);
            var Le = new Ea(C), Ve = new da(C);
            D.dragRotate = new ri(C, Le, Ve), this._add("mouseRotate", Le, ["mousePitch"]), this._add("mousePitch", Ve, ["mouseRotate"]);
            var Je = new za(C), at = new Da(C);
            D.dragPan = new uo(F, Je, at), this._add("mousePan", Je), this._add("touchPan", at, ["touchZoom", "touchRotate"]);
            var _t = new Go(), Et = new Za();
            D.touchZoomRotate = new eo(F, Et, _t, xe), this._add("touchRotate", _t, ["touchPan", "touchZoom"]), this._add("touchZoom", Et, ["touchPan", "touchRotate"]);
            var kt = D.scrollZoom = new Xa(D, this);
            this._add("scrollZoom", kt, ["mousePan"]);
            var At = D.keyboard = new di();
            this._add("keyboard", At), this._add("blockableMapEvent", new ta(D));
            for (var xt = 0, Dt = ["boxZoom", "doubleClickZoom", "tapDragZoom", "touchPitch", "dragRotate", "dragPan", "touchZoomRotate", "scrollZoom", "keyboard"]; xt < Dt.length; xt += 1) {
              var Ot = Dt[xt];
              C.interactive && C[Ot] && D[Ot].enable(C[Ot]);
            }
          }, Oi.prototype._add = function(C, D, F) {
            this._handlers.push({ handlerName: C, handler: D, allowed: F }), this._handlersById[C] = D;
          }, Oi.prototype.stop = function() {
            if (!this._updatingCamera) {
              for (var C = 0, D = this._handlers; C < D.length; C += 1)
                D[C].handler.reset();
              this._inertia.clear(), this._fireEvents({}, {}), this._changes = [];
            }
          }, Oi.prototype.isActive = function() {
            for (var C = 0, D = this._handlers; C < D.length; C += 1)
              if (D[C].handler.isActive())
                return !0;
            return !1;
          }, Oi.prototype.isZooming = function() {
            return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming();
          }, Oi.prototype.isRotating = function() {
            return !!this._eventsInProgress.rotate;
          }, Oi.prototype.isMoving = function() {
            return Boolean(ns(this._eventsInProgress)) || this.isZooming();
          }, Oi.prototype._blockedByActive = function(C, D, F) {
            for (var q in C)
              if (q !== F && (!D || D.indexOf(q) < 0))
                return !0;
            return !1;
          }, Oi.prototype.handleWindowEvent = function(C) {
            this.handleEvent(C, C.type + "Window");
          }, Oi.prototype._getMapTouches = function(C) {
            for (var D = [], F = 0, q = C; F < q.length; F += 1) {
              var ae = q[F], fe = ae.target;
              this._el.contains(fe) && D.push(ae);
            }
            return D;
          }, Oi.prototype.handleEvent = function(C, D) {
            if (C.type !== "blur") {
              this._updatingCamera = !0;
              for (var F = C.type === "renderFrame" ? void 0 : C, q = { needsRenderFrame: !1 }, ae = {}, fe = {}, xe = C.touches ? this._getMapTouches(C.touches) : void 0, ke = xe ? n.touchPos(this._el, xe) : n.mousePos(this._el, C), Le = 0, Ve = this._handlers; Le < Ve.length; Le += 1) {
                var Je = Ve[Le], at = Je.handlerName, _t = Je.handler, Et = Je.allowed;
                if (_t.isEnabled()) {
                  var kt = void 0;
                  this._blockedByActive(fe, Et, at) ? _t.reset() : _t[D || C.type] && (kt = _t[D || C.type](C, ke, xe), this.mergeHandlerResult(q, ae, kt, at, F), kt && kt.needsRenderFrame && this._triggerRenderFrame()), (kt || _t.isActive()) && (fe[at] = _t);
                }
              }
              var At = {};
              for (var xt in this._previousActiveHandlers)
                fe[xt] || (At[xt] = F);
              this._previousActiveHandlers = fe, (Object.keys(At).length || Os(q)) && (this._changes.push([q, ae, At]), this._triggerRenderFrame()), (Object.keys(fe).length || Os(q)) && this._map._stop(!0), this._updatingCamera = !1;
              var Dt = q.cameraAnimation;
              Dt && (this._inertia.clear(), this._fireEvents({}, {}), this._changes = [], Dt(this._map));
            } else
              this.stop();
          }, Oi.prototype.mergeHandlerResult = function(C, D, F, q, ae) {
            if (F) {
              e.extend(C, F);
              var fe = { handlerName: q, originalEvent: F.originalEvent || ae };
              F.zoomDelta !== void 0 && (D.zoom = fe), F.panDelta !== void 0 && (D.drag = fe), F.pitchDelta !== void 0 && (D.pitch = fe), F.bearingDelta !== void 0 && (D.rotate = fe);
            }
          }, Oi.prototype._applyChanges = function() {
            for (var C = {}, D = {}, F = {}, q = 0, ae = this._changes; q < ae.length; q += 1) {
              var fe = ae[q], xe = fe[0], ke = fe[1], Le = fe[2];
              xe.panDelta && (C.panDelta = (C.panDelta || new e.Point(0, 0))._add(xe.panDelta)), xe.zoomDelta && (C.zoomDelta = (C.zoomDelta || 0) + xe.zoomDelta), xe.bearingDelta && (C.bearingDelta = (C.bearingDelta || 0) + xe.bearingDelta), xe.pitchDelta && (C.pitchDelta = (C.pitchDelta || 0) + xe.pitchDelta), xe.around !== void 0 && (C.around = xe.around), xe.pinchAround !== void 0 && (C.pinchAround = xe.pinchAround), xe.noInertia && (C.noInertia = xe.noInertia), e.extend(D, ke), e.extend(F, Le);
            }
            this._updateMapTransform(C, D, F), this._changes = [];
          }, Oi.prototype._updateMapTransform = function(C, D, F) {
            var q = this._map, ae = q.transform;
            if (!Os(C))
              return this._fireEvents(D, F);
            var fe = C.panDelta, xe = C.zoomDelta, ke = C.bearingDelta, Le = C.pitchDelta, Ve = C.around, Je = C.pinchAround;
            Je !== void 0 && (Ve = Je), q._stop(!0), Ve = Ve || q.transform.centerPoint;
            var at = ae.pointLocation(fe ? Ve.sub(fe) : Ve);
            ke && (ae.bearing += ke), Le && (ae.pitch += Le), xe && (ae.zoom += xe), ae.setLocationAtPoint(at, Ve), this._map._update(), C.noInertia || this._inertia.record(C), this._fireEvents(D, F);
          }, Oi.prototype._fireEvents = function(C, D) {
            var F = this, q = ns(this._eventsInProgress), ae = ns(C), fe = {};
            for (var xe in C) {
              var ke = C[xe].originalEvent;
              this._eventsInProgress[xe] || (fe[xe + "start"] = ke), this._eventsInProgress[xe] = C[xe];
            }
            for (var Le in !q && ae && this._fireEvent("movestart", ae.originalEvent), fe)
              this._fireEvent(Le, fe[Le]);
            for (var Ve in C.rotate && (this._bearingChanged = !0), ae && this._fireEvent("move", ae.originalEvent), C) {
              var Je = C[Ve].originalEvent;
              this._fireEvent(Ve, Je);
            }
            var at, _t = {};
            for (var Et in this._eventsInProgress) {
              var kt = this._eventsInProgress[Et], At = kt.handlerName, xt = kt.originalEvent;
              this._handlersById[At].isActive() || (delete this._eventsInProgress[Et], at = D[At] || xt, _t[Et + "end"] = at);
            }
            for (var Dt in _t)
              this._fireEvent(Dt, _t[Dt]);
            var Ot = ns(this._eventsInProgress);
            if ((q || ae) && !Ot) {
              this._updatingCamera = !0;
              var jt = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), rr = function(dr) {
                return dr !== 0 && -F._bearingSnap < dr && dr < F._bearingSnap;
              };
              jt ? (rr(jt.bearing || this._map.getBearing()) && (jt.bearing = 0), this._map.easeTo(jt, { originalEvent: at })) : (this._map.fire(new e.Event("moveend", { originalEvent: at })), rr(this._map.getBearing()) && this._map.resetNorth()), this._bearingChanged = !1, this._updatingCamera = !1;
            }
          }, Oi.prototype._fireEvent = function(C, D) {
            this._map.fire(new e.Event(C, D ? { originalEvent: D } : {}));
          }, Oi.prototype._triggerRenderFrame = function() {
            var C = this;
            this._frameId === void 0 && (this._frameId = this._map._requestRenderFrame(function(D) {
              delete C._frameId, C.handleEvent(new Ko("renderFrame", { timeStamp: D })), C._applyChanges();
            }));
          };
          var zs = function(C) {
            function D(F, q) {
              C.call(this), this._moving = !1, this._zooming = !1, this.transform = F, this._bearingSnap = q.bearingSnap, e.bindAll(["_renderFrameCallback"], this);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.getCenter = function() {
              return new e.LngLat(this.transform.center.lng, this.transform.center.lat);
            }, D.prototype.setCenter = function(F, q) {
              return this.jumpTo({ center: F }, q);
            }, D.prototype.panBy = function(F, q, ae) {
              return F = e.Point.convert(F).mult(-1), this.panTo(this.transform.center, e.extend({ offset: F }, q), ae);
            }, D.prototype.panTo = function(F, q, ae) {
              return this.easeTo(e.extend({ center: F }, q), ae);
            }, D.prototype.getZoom = function() {
              return this.transform.zoom;
            }, D.prototype.setZoom = function(F, q) {
              return this.jumpTo({ zoom: F }, q), this;
            }, D.prototype.zoomTo = function(F, q, ae) {
              return this.easeTo(e.extend({ zoom: F }, q), ae);
            }, D.prototype.zoomIn = function(F, q) {
              return this.zoomTo(this.getZoom() + 1, F, q), this;
            }, D.prototype.zoomOut = function(F, q) {
              return this.zoomTo(this.getZoom() - 1, F, q), this;
            }, D.prototype.getBearing = function() {
              return this.transform.bearing;
            }, D.prototype.setBearing = function(F, q) {
              return this.jumpTo({ bearing: F }, q), this;
            }, D.prototype.getPadding = function() {
              return this.transform.padding;
            }, D.prototype.setPadding = function(F, q) {
              return this.jumpTo({ padding: F }, q), this;
            }, D.prototype.rotateTo = function(F, q, ae) {
              return this.easeTo(e.extend({ bearing: F }, q), ae);
            }, D.prototype.resetNorth = function(F, q) {
              return this.rotateTo(0, e.extend({ duration: 1e3 }, F), q), this;
            }, D.prototype.resetNorthPitch = function(F, q) {
              return this.easeTo(e.extend({ bearing: 0, pitch: 0, duration: 1e3 }, F), q), this;
            }, D.prototype.snapToNorth = function(F, q) {
              return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(F, q) : this;
            }, D.prototype.getPitch = function() {
              return this.transform.pitch;
            }, D.prototype.setPitch = function(F, q) {
              return this.jumpTo({ pitch: F }, q), this;
            }, D.prototype.cameraForBounds = function(F, q) {
              return F = e.LngLatBounds.convert(F), this._cameraForBoxAndBearing(F.getNorthWest(), F.getSouthEast(), 0, q);
            }, D.prototype._cameraForBoxAndBearing = function(F, q, ae, fe) {
              var xe = { top: 0, bottom: 0, right: 0, left: 0 };
              if (typeof (fe = e.extend({ padding: xe, offset: [0, 0], maxZoom: this.transform.maxZoom }, fe)).padding == "number") {
                var ke = fe.padding;
                fe.padding = { top: ke, bottom: ke, right: ke, left: ke };
              }
              fe.padding = e.extend(xe, fe.padding);
              var Le = this.transform, Ve = Le.padding, Je = Le.project(e.LngLat.convert(F)), at = Le.project(e.LngLat.convert(q)), _t = Je.rotate(-ae * Math.PI / 180), Et = at.rotate(-ae * Math.PI / 180), kt = new e.Point(Math.max(_t.x, Et.x), Math.max(_t.y, Et.y)), At = new e.Point(Math.min(_t.x, Et.x), Math.min(_t.y, Et.y)), xt = kt.sub(At), Dt = (Le.width - (Ve.left + Ve.right + fe.padding.left + fe.padding.right)) / xt.x, Ot = (Le.height - (Ve.top + Ve.bottom + fe.padding.top + fe.padding.bottom)) / xt.y;
              if (!(Ot < 0 || Dt < 0)) {
                var jt = Math.min(Le.scaleZoom(Le.scale * Math.min(Dt, Ot)), fe.maxZoom), rr = e.Point.convert(fe.offset), dr = (fe.padding.left - fe.padding.right) / 2, Sr = (fe.padding.top - fe.padding.bottom) / 2, kr = new e.Point(rr.x + dr, rr.y + Sr).mult(Le.scale / Le.zoomScale(jt));
                return { center: Le.unproject(Je.add(at).div(2).sub(kr)), zoom: jt, bearing: ae };
              }
              e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
            }, D.prototype.fitBounds = function(F, q, ae) {
              return this._fitInternal(this.cameraForBounds(F, q), q, ae);
            }, D.prototype.fitScreenCoordinates = function(F, q, ae, fe, xe) {
              return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(F)), this.transform.pointLocation(e.Point.convert(q)), ae, fe), fe, xe);
            }, D.prototype._fitInternal = function(F, q, ae) {
              return F ? (delete (q = e.extend(F, q)).padding, q.linear ? this.easeTo(q, ae) : this.flyTo(q, ae)) : this;
            }, D.prototype.jumpTo = function(F, q) {
              this.stop();
              var ae = this.transform, fe = !1, xe = !1, ke = !1;
              return "zoom" in F && ae.zoom !== +F.zoom && (fe = !0, ae.zoom = +F.zoom), F.center !== void 0 && (ae.center = e.LngLat.convert(F.center)), "bearing" in F && ae.bearing !== +F.bearing && (xe = !0, ae.bearing = +F.bearing), "pitch" in F && ae.pitch !== +F.pitch && (ke = !0, ae.pitch = +F.pitch), F.padding == null || ae.isPaddingEqual(F.padding) || (ae.padding = F.padding), this.fire(new e.Event("movestart", q)).fire(new e.Event("move", q)), fe && this.fire(new e.Event("zoomstart", q)).fire(new e.Event("zoom", q)).fire(new e.Event("zoomend", q)), xe && this.fire(new e.Event("rotatestart", q)).fire(new e.Event("rotate", q)).fire(new e.Event("rotateend", q)), ke && this.fire(new e.Event("pitchstart", q)).fire(new e.Event("pitch", q)).fire(new e.Event("pitchend", q)), this.fire(new e.Event("moveend", q));
            }, D.prototype.easeTo = function(F, q) {
              var ae = this;
              this._stop(!1, F.easeId), ((F = e.extend({ offset: [0, 0], duration: 500, easing: e.ease }, F)).animate === !1 || !F.essential && e.browser.prefersReducedMotion) && (F.duration = 0);
              var fe = this.transform, xe = this.getZoom(), ke = this.getBearing(), Le = this.getPitch(), Ve = this.getPadding(), Je = "zoom" in F ? +F.zoom : xe, at = "bearing" in F ? this._normalizeBearing(F.bearing, ke) : ke, _t = "pitch" in F ? +F.pitch : Le, Et = "padding" in F ? F.padding : fe.padding, kt = e.Point.convert(F.offset), At = fe.centerPoint.add(kt), xt = fe.pointLocation(At), Dt = e.LngLat.convert(F.center || xt);
              this._normalizeCenter(Dt);
              var Ot, jt, rr = fe.project(xt), dr = fe.project(Dt).sub(rr), Sr = fe.zoomScale(Je - xe);
              F.around && (Ot = e.LngLat.convert(F.around), jt = fe.locationPoint(Ot));
              var kr = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
              return this._zooming = this._zooming || Je !== xe, this._rotating = this._rotating || ke !== at, this._pitching = this._pitching || _t !== Le, this._padding = !fe.isPaddingEqual(Et), this._easeId = F.easeId, this._prepareEase(q, F.noMoveStart, kr), clearTimeout(this._easeEndTimeoutID), this._ease(function(Jr) {
                if (ae._zooming && (fe.zoom = e.number(xe, Je, Jr)), ae._rotating && (fe.bearing = e.number(ke, at, Jr)), ae._pitching && (fe.pitch = e.number(Le, _t, Jr)), ae._padding && (fe.interpolatePadding(Ve, Et, Jr), At = fe.centerPoint.add(kt)), Ot)
                  fe.setLocationAtPoint(Ot, jt);
                else {
                  var Xr = fe.zoomScale(fe.zoom - xe), hn = Je > xe ? Math.min(2, Sr) : Math.max(0.5, Sr), on = Math.pow(hn, 1 - Jr), jn = fe.unproject(rr.add(dr.mult(Jr * on)).mult(Xr));
                  fe.setLocationAtPoint(fe.renderWorldCopies ? jn.wrap() : jn, At);
                }
                ae._fireMoveEvents(q);
              }, function(Jr) {
                ae._afterEase(q, Jr);
              }, F), this;
            }, D.prototype._prepareEase = function(F, q, ae) {
              ae === void 0 && (ae = {}), this._moving = !0, q || ae.moving || this.fire(new e.Event("movestart", F)), this._zooming && !ae.zooming && this.fire(new e.Event("zoomstart", F)), this._rotating && !ae.rotating && this.fire(new e.Event("rotatestart", F)), this._pitching && !ae.pitching && this.fire(new e.Event("pitchstart", F));
            }, D.prototype._fireMoveEvents = function(F) {
              this.fire(new e.Event("move", F)), this._zooming && this.fire(new e.Event("zoom", F)), this._rotating && this.fire(new e.Event("rotate", F)), this._pitching && this.fire(new e.Event("pitch", F));
            }, D.prototype._afterEase = function(F, q) {
              if (!this._easeId || !q || this._easeId !== q) {
                delete this._easeId;
                var ae = this._zooming, fe = this._rotating, xe = this._pitching;
                this._moving = !1, this._zooming = !1, this._rotating = !1, this._pitching = !1, this._padding = !1, ae && this.fire(new e.Event("zoomend", F)), fe && this.fire(new e.Event("rotateend", F)), xe && this.fire(new e.Event("pitchend", F)), this.fire(new e.Event("moveend", F));
              }
            }, D.prototype.flyTo = function(F, q) {
              var ae = this;
              if (!F.essential && e.browser.prefersReducedMotion) {
                var fe = e.pick(F, ["center", "zoom", "bearing", "pitch", "around"]);
                return this.jumpTo(fe, q);
              }
              this.stop(), F = e.extend({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: e.ease }, F);
              var xe = this.transform, ke = this.getZoom(), Le = this.getBearing(), Ve = this.getPitch(), Je = this.getPadding(), at = "zoom" in F ? e.clamp(+F.zoom, xe.minZoom, xe.maxZoom) : ke, _t = "bearing" in F ? this._normalizeBearing(F.bearing, Le) : Le, Et = "pitch" in F ? +F.pitch : Ve, kt = "padding" in F ? F.padding : xe.padding, At = xe.zoomScale(at - ke), xt = e.Point.convert(F.offset), Dt = xe.centerPoint.add(xt), Ot = xe.pointLocation(Dt), jt = e.LngLat.convert(F.center || Ot);
              this._normalizeCenter(jt);
              var rr = xe.project(Ot), dr = xe.project(jt).sub(rr), Sr = F.curve, kr = Math.max(xe.width, xe.height), Jr = kr / At, Xr = dr.mag();
              if ("minZoom" in F) {
                var hn = e.clamp(Math.min(F.minZoom, ke, at), xe.minZoom, xe.maxZoom), on = kr / xe.zoomScale(hn - ke);
                Sr = Math.sqrt(on / Xr * 2);
              }
              var jn = Sr * Sr;
              function Wn(Qn) {
                var xa = (Jr * Jr - kr * kr + (Qn ? -1 : 1) * jn * jn * Xr * Xr) / (2 * (Qn ? Jr : kr) * jn * Xr);
                return Math.log(Math.sqrt(xa * xa + 1) - xa);
              }
              function ua(Qn) {
                return (Math.exp(Qn) - Math.exp(-Qn)) / 2;
              }
              function qr(Qn) {
                return (Math.exp(Qn) + Math.exp(-Qn)) / 2;
              }
              var Mn = Wn(0), Zn = function(Qn) {
                return qr(Mn) / qr(Mn + Sr * Qn);
              }, qn = function(Qn) {
                return kr * ((qr(Mn) * (ua(xa = Mn + Sr * Qn) / qr(xa)) - ua(Mn)) / jn) / Xr;
                var xa;
              }, na = (Wn(1) - Mn) / Sr;
              if (Math.abs(Xr) < 1e-6 || !isFinite(na)) {
                if (Math.abs(kr - Jr) < 1e-6)
                  return this.easeTo(F, q);
                var ha = Jr < kr ? -1 : 1;
                na = Math.abs(Math.log(Jr / kr)) / Sr, qn = function() {
                  return 0;
                }, Zn = function(Qn) {
                  return Math.exp(ha * Sr * Qn);
                };
              }
              if ("duration" in F)
                F.duration = +F.duration;
              else {
                var Sa = "screenSpeed" in F ? +F.screenSpeed / Sr : +F.speed;
                F.duration = 1e3 * na / Sa;
              }
              return F.maxDuration && F.duration > F.maxDuration && (F.duration = 0), this._zooming = !0, this._rotating = Le !== _t, this._pitching = Et !== Ve, this._padding = !xe.isPaddingEqual(kt), this._prepareEase(q, !1), this._ease(function(Qn) {
                var xa = Qn * na, ga = 1 / Zn(xa);
                xe.zoom = Qn === 1 ? at : ke + xe.scaleZoom(ga), ae._rotating && (xe.bearing = e.number(Le, _t, Qn)), ae._pitching && (xe.pitch = e.number(Ve, Et, Qn)), ae._padding && (xe.interpolatePadding(Je, kt, Qn), Dt = xe.centerPoint.add(xt));
                var Ca = Qn === 1 ? jt : xe.unproject(rr.add(dr.mult(qn(xa))).mult(ga));
                xe.setLocationAtPoint(xe.renderWorldCopies ? Ca.wrap() : Ca, Dt), ae._fireMoveEvents(q);
              }, function() {
                return ae._afterEase(q);
              }, F), this;
            }, D.prototype.isEasing = function() {
              return !!this._easeFrameId;
            }, D.prototype.stop = function() {
              return this._stop();
            }, D.prototype._stop = function(F, q) {
              if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) {
                var ae = this._onEaseEnd;
                delete this._onEaseEnd, ae.call(this, q);
              }
              if (!F) {
                var fe = this.handlers;
                fe && fe.stop();
              }
              return this;
            }, D.prototype._ease = function(F, q, ae) {
              ae.animate === !1 || ae.duration === 0 ? (F(1), q()) : (this._easeStart = e.browser.now(), this._easeOptions = ae, this._onEaseFrame = F, this._onEaseEnd = q, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback));
            }, D.prototype._renderFrameCallback = function() {
              var F = Math.min((e.browser.now() - this._easeStart) / this._easeOptions.duration, 1);
              this._onEaseFrame(this._easeOptions.easing(F)), F < 1 ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop();
            }, D.prototype._normalizeBearing = function(F, q) {
              F = e.wrap(F, -180, 180);
              var ae = Math.abs(F - q);
              return Math.abs(F - 360 - q) < ae && (F -= 360), Math.abs(F + 360 - q) < ae && (F += 360), F;
            }, D.prototype._normalizeCenter = function(F) {
              var q = this.transform;
              if (q.renderWorldCopies && !q.lngRange) {
                var ae = F.lng - q.center.lng;
                F.lng += ae > 180 ? -360 : ae < -180 ? 360 : 0;
              }
            }, D;
          }(e.Evented), zi = function(C) {
            C === void 0 && (C = {}), this.options = C, e.bindAll(["_updateEditLink", "_updateData", "_updateCompact"], this);
          };
          zi.prototype.getDefaultPosition = function() {
            return "bottom-right";
          }, zi.prototype.onAdd = function(C) {
            var D = this.options && this.options.compact;
            return this._map = C, this._container = n.create("div", "mapboxgl-ctrl mapboxgl-ctrl-attrib"), this._innerContainer = n.create("div", "mapboxgl-ctrl-attrib-inner", this._container), D && this._container.classList.add("mapboxgl-compact"), this._updateAttributions(), this._updateEditLink(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("moveend", this._updateEditLink), D === void 0 && (this._map.on("resize", this._updateCompact), this._updateCompact()), this._container;
          }, zi.prototype.onRemove = function() {
            n.remove(this._container), this._map.off("styledata", this._updateData), this._map.off("sourcedata", this._updateData), this._map.off("moveend", this._updateEditLink), this._map.off("resize", this._updateCompact), this._map = void 0, this._attribHTML = void 0;
          }, zi.prototype._updateEditLink = function() {
            var C = this._editLink;
            C || (C = this._editLink = this._container.querySelector(".mapbox-improve-map"));
            var D = [{ key: "owner", value: this.styleOwner }, { key: "id", value: this.styleId }, { key: "access_token", value: this._map._requestManager._customAccessToken || e.config.ACCESS_TOKEN }];
            if (C) {
              var F = D.reduce(function(q, ae, fe) {
                return ae.value && (q += ae.key + "=" + ae.value + (fe < D.length - 1 ? "&" : "")), q;
              }, "?");
              C.href = e.config.FEEDBACK_URL + "/" + F + (this._map._hash ? this._map._hash.getHashString(!0) : ""), C.rel = "noopener nofollow";
            }
          }, zi.prototype._updateData = function(C) {
            !C || C.sourceDataType !== "metadata" && C.dataType !== "style" || (this._updateAttributions(), this._updateEditLink());
          }, zi.prototype._updateAttributions = function() {
            if (this._map.style) {
              var C = [];
              if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? C = C.concat(this.options.customAttribution.map(function(ke) {
                return typeof ke != "string" ? "" : ke;
              })) : typeof this.options.customAttribution == "string" && C.push(this.options.customAttribution)), this._map.style.stylesheet) {
                var D = this._map.style.stylesheet;
                this.styleOwner = D.owner, this.styleId = D.id;
              }
              var F = this._map.style.sourceCaches;
              for (var q in F) {
                var ae = F[q];
                if (ae.used) {
                  var fe = ae.getSource();
                  fe.attribution && C.indexOf(fe.attribution) < 0 && C.push(fe.attribution);
                }
              }
              C.sort(function(ke, Le) {
                return ke.length - Le.length;
              });
              var xe = (C = C.filter(function(ke, Le) {
                for (var Ve = Le + 1; Ve < C.length; Ve++)
                  if (C[Ve].indexOf(ke) >= 0)
                    return !1;
                return !0;
              })).join(" | ");
              xe !== this._attribHTML && (this._attribHTML = xe, C.length ? (this._innerContainer.innerHTML = xe, this._container.classList.remove("mapboxgl-attrib-empty")) : this._container.classList.add("mapboxgl-attrib-empty"), this._editLink = null);
            }
          }, zi.prototype._updateCompact = function() {
            this._map.getCanvasContainer().offsetWidth <= 640 ? this._container.classList.add("mapboxgl-compact") : this._container.classList.remove("mapboxgl-compact");
          };
          var Qo = function() {
            e.bindAll(["_updateLogo"], this), e.bindAll(["_updateCompact"], this);
          };
          Qo.prototype.onAdd = function(C) {
            this._map = C, this._container = n.create("div", "mapboxgl-ctrl");
            var D = n.create("a", "mapboxgl-ctrl-logo");
            return D.target = "_blank", D.rel = "noopener nofollow", D.href = "https://www.mapbox.com/", D.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), D.setAttribute("rel", "noopener nofollow"), this._container.appendChild(D), this._container.style.display = "none", this._map.on("sourcedata", this._updateLogo), this._updateLogo(), this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
          }, Qo.prototype.onRemove = function() {
            n.remove(this._container), this._map.off("sourcedata", this._updateLogo), this._map.off("resize", this._updateCompact);
          }, Qo.prototype.getDefaultPosition = function() {
            return "bottom-left";
          }, Qo.prototype._updateLogo = function(C) {
            C && C.sourceDataType !== "metadata" || (this._container.style.display = this._logoRequired() ? "block" : "none");
          }, Qo.prototype._logoRequired = function() {
            if (this._map.style) {
              var C = this._map.style.sourceCaches;
              for (var D in C)
                if (C[D].getSource().mapbox_logo)
                  return !0;
              return !1;
            }
          }, Qo.prototype._updateCompact = function() {
            var C = this._container.children;
            if (C.length) {
              var D = C[0];
              this._map.getCanvasContainer().offsetWidth < 250 ? D.classList.add("mapboxgl-compact") : D.classList.remove("mapboxgl-compact");
            }
          };
          var ca = function() {
            this._queue = [], this._id = 0, this._cleared = !1, this._currentlyRunning = !1;
          };
          ca.prototype.add = function(C) {
            var D = ++this._id;
            return this._queue.push({ callback: C, id: D, cancelled: !1 }), D;
          }, ca.prototype.remove = function(C) {
            for (var D = this._currentlyRunning, F = 0, q = D ? this._queue.concat(D) : this._queue; F < q.length; F += 1) {
              var ae = q[F];
              if (ae.id === C)
                return void (ae.cancelled = !0);
            }
          }, ca.prototype.run = function(C) {
            C === void 0 && (C = 0);
            var D = this._currentlyRunning = this._queue;
            this._queue = [];
            for (var F = 0, q = D; F < q.length; F += 1) {
              var ae = q[F];
              if (!ae.cancelled && (ae.callback(C), this._cleared))
                break;
            }
            this._cleared = !1, this._currentlyRunning = !1;
          }, ca.prototype.clear = function() {
            this._currentlyRunning && (this._cleared = !0), this._queue = [];
          };
          var ya = { "FullscreenControl.Enter": "Enter fullscreen", "FullscreenControl.Exit": "Exit fullscreen", "GeolocateControl.FindMyLocation": "Find my location", "GeolocateControl.LocationNotAvailable": "Location not available", "LogoControl.Title": "Mapbox logo", "NavigationControl.ResetBearing": "Reset bearing to north", "NavigationControl.ZoomIn": "Zoom in", "NavigationControl.ZoomOut": "Zoom out", "ScaleControl.Feet": "ft", "ScaleControl.Meters": "m", "ScaleControl.Kilometers": "km", "ScaleControl.Miles": "mi", "ScaleControl.NauticalMiles": "nm" }, Ds = e.window.HTMLImageElement, Rs = e.window.HTMLElement, $o = e.window.ImageBitmap, Lo = { center: [0, 0], zoom: 0, bearing: 0, pitch: 0, minZoom: -2, maxZoom: 22, minPitch: 0, maxPitch: 60, interactive: !0, scrollZoom: !0, boxZoom: !0, dragRotate: !0, dragPan: !0, keyboard: !0, doubleClickZoom: !0, touchZoomRotate: !0, touchPitch: !0, bearingSnap: 7, clickTolerance: 3, pitchWithRotate: !0, hash: !1, attributionControl: !0, failIfMajorPerformanceCaveat: !1, preserveDrawingBuffer: !1, trackResize: !0, renderWorldCopies: !0, refreshExpiredTiles: !0, maxTileCacheSize: null, localIdeographFontFamily: "sans-serif", transformRequest: null, accessToken: null, fadeDuration: 300, crossSourceCollisions: !0 }, Vo = function(C) {
            function D(q) {
              var ae = this;
              if ((q = e.extend({}, Lo, q)).minZoom != null && q.maxZoom != null && q.minZoom > q.maxZoom)
                throw new Error("maxZoom must be greater than or equal to minZoom");
              if (q.minPitch != null && q.maxPitch != null && q.minPitch > q.maxPitch)
                throw new Error("maxPitch must be greater than or equal to minPitch");
              if (q.minPitch != null && q.minPitch < 0)
                throw new Error("minPitch must be greater than or equal to 0");
              if (q.maxPitch != null && q.maxPitch > 60)
                throw new Error("maxPitch must be less than or equal to 60");
              var fe = new Ht(q.minZoom, q.maxZoom, q.minPitch, q.maxPitch, q.renderWorldCopies);
              if (C.call(this, fe, q), this._interactive = q.interactive, this._maxTileCacheSize = q.maxTileCacheSize, this._failIfMajorPerformanceCaveat = q.failIfMajorPerformanceCaveat, this._preserveDrawingBuffer = q.preserveDrawingBuffer, this._antialias = q.antialias, this._trackResize = q.trackResize, this._bearingSnap = q.bearingSnap, this._refreshExpiredTiles = q.refreshExpiredTiles, this._fadeDuration = q.fadeDuration, this._crossSourceCollisions = q.crossSourceCollisions, this._crossFadingFactor = 1, this._collectResourceTiming = q.collectResourceTiming, this._renderTaskQueue = new ca(), this._controls = [], this._mapId = e.uniqueId(), this._locale = e.extend({}, ya, q.locale), this._requestManager = new e.RequestManager(q.transformRequest, q.accessToken), typeof q.container == "string") {
                if (this._container = e.window.document.getElementById(q.container), !this._container)
                  throw new Error("Container '" + q.container + "' not found.");
              } else {
                if (!(q.container instanceof Rs))
                  throw new Error("Invalid type: 'container' must be a String or HTMLElement.");
                this._container = q.container;
              }
              if (q.maxBounds && this.setMaxBounds(q.maxBounds), e.bindAll(["_onWindowOnline", "_onWindowResize", "_contextLost", "_contextRestored"], this), this._setupContainer(), this._setupPainter(), this.painter === void 0)
                throw new Error("Failed to initialize WebGL.");
              this.on("move", function() {
                return ae._update(!1);
              }), this.on("moveend", function() {
                return ae._update(!1);
              }), this.on("zoom", function() {
                return ae._update(!0);
              }), e.window !== void 0 && (e.window.addEventListener("online", this._onWindowOnline, !1), e.window.addEventListener("resize", this._onWindowResize, !1)), this.handlers = new Oi(this, q);
              var xe = typeof q.hash == "string" && q.hash || void 0;
              this._hash = q.hash && new Pr(xe).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ center: q.center, zoom: q.zoom, bearing: q.bearing, pitch: q.pitch }), q.bounds && (this.resize(), this.fitBounds(q.bounds, e.extend({}, q.fitBoundsOptions, { duration: 0 })))), this.resize(), this._localIdeographFontFamily = q.localIdeographFontFamily, q.style && this.setStyle(q.style, { localIdeographFontFamily: q.localIdeographFontFamily }), q.attributionControl && this.addControl(new zi({ customAttribution: q.customAttribution })), this.addControl(new Qo(), q.logoPosition), this.on("style.load", function() {
                ae.transform.unmodified && ae.jumpTo(ae.style.stylesheet);
              }), this.on("data", function(ke) {
                ae._update(ke.dataType === "style"), ae.fire(new e.Event(ke.dataType + "data", ke));
              }), this.on("dataloading", function(ke) {
                ae.fire(new e.Event(ke.dataType + "dataloading", ke));
              });
            }
            C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D;
            var F = { showTileBoundaries: { configurable: !0 }, showPadding: { configurable: !0 }, showCollisionBoxes: { configurable: !0 }, showOverdrawInspector: { configurable: !0 }, repaint: { configurable: !0 }, vertices: { configurable: !0 }, version: { configurable: !0 } };
            return D.prototype._getMapId = function() {
              return this._mapId;
            }, D.prototype.addControl = function(q, ae) {
              if (ae === void 0 && q.getDefaultPosition && (ae = q.getDefaultPosition()), ae === void 0 && (ae = "top-right"), !q || !q.onAdd)
                return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));
              var fe = q.onAdd(this);
              this._controls.push(q);
              var xe = this._controlPositions[ae];
              return ae.indexOf("bottom") !== -1 ? xe.insertBefore(fe, xe.firstChild) : xe.appendChild(fe), this;
            }, D.prototype.removeControl = function(q) {
              if (!q || !q.onRemove)
                return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));
              var ae = this._controls.indexOf(q);
              return ae > -1 && this._controls.splice(ae, 1), q.onRemove(this), this;
            }, D.prototype.resize = function(q) {
              var ae = this._containerDimensions(), fe = ae[0], xe = ae[1];
              this._resizeCanvas(fe, xe), this.transform.resize(fe, xe), this.painter.resize(fe, xe);
              var ke = !this._moving;
              return ke && (this.stop(), this.fire(new e.Event("movestart", q)).fire(new e.Event("move", q))), this.fire(new e.Event("resize", q)), ke && this.fire(new e.Event("moveend", q)), this;
            }, D.prototype.getBounds = function() {
              return this.transform.getBounds();
            }, D.prototype.getMaxBounds = function() {
              return this.transform.getMaxBounds();
            }, D.prototype.setMaxBounds = function(q) {
              return this.transform.setMaxBounds(e.LngLatBounds.convert(q)), this._update();
            }, D.prototype.setMinZoom = function(q) {
              if ((q = q == null ? -2 : q) >= -2 && q <= this.transform.maxZoom)
                return this.transform.minZoom = q, this._update(), this.getZoom() < q && this.setZoom(q), this;
              throw new Error("minZoom must be between -2 and the current maxZoom, inclusive");
            }, D.prototype.getMinZoom = function() {
              return this.transform.minZoom;
            }, D.prototype.setMaxZoom = function(q) {
              if ((q = q == null ? 22 : q) >= this.transform.minZoom)
                return this.transform.maxZoom = q, this._update(), this.getZoom() > q && this.setZoom(q), this;
              throw new Error("maxZoom must be greater than the current minZoom");
            }, D.prototype.getMaxZoom = function() {
              return this.transform.maxZoom;
            }, D.prototype.setMinPitch = function(q) {
              if ((q = q == null ? 0 : q) < 0)
                throw new Error("minPitch must be greater than or equal to 0");
              if (q >= 0 && q <= this.transform.maxPitch)
                return this.transform.minPitch = q, this._update(), this.getPitch() < q && this.setPitch(q), this;
              throw new Error("minPitch must be between 0 and the current maxPitch, inclusive");
            }, D.prototype.getMinPitch = function() {
              return this.transform.minPitch;
            }, D.prototype.setMaxPitch = function(q) {
              if ((q = q == null ? 60 : q) > 60)
                throw new Error("maxPitch must be less than or equal to 60");
              if (q >= this.transform.minPitch)
                return this.transform.maxPitch = q, this._update(), this.getPitch() > q && this.setPitch(q), this;
              throw new Error("maxPitch must be greater than the current minPitch");
            }, D.prototype.getMaxPitch = function() {
              return this.transform.maxPitch;
            }, D.prototype.getRenderWorldCopies = function() {
              return this.transform.renderWorldCopies;
            }, D.prototype.setRenderWorldCopies = function(q) {
              return this.transform.renderWorldCopies = q, this._update();
            }, D.prototype.project = function(q) {
              return this.transform.locationPoint(e.LngLat.convert(q));
            }, D.prototype.unproject = function(q) {
              return this.transform.pointLocation(e.Point.convert(q));
            }, D.prototype.isMoving = function() {
              return this._moving || this.handlers.isMoving();
            }, D.prototype.isZooming = function() {
              return this._zooming || this.handlers.isZooming();
            }, D.prototype.isRotating = function() {
              return this._rotating || this.handlers.isRotating();
            }, D.prototype._createDelegatedListener = function(q, ae, fe) {
              var xe, ke = this;
              if (q === "mouseenter" || q === "mouseover") {
                var Le = !1;
                return { layer: ae, listener: fe, delegates: { mousemove: function(Je) {
                  var at = ke.getLayer(ae) ? ke.queryRenderedFeatures(Je.point, { layers: [ae] }) : [];
                  at.length ? Le || (Le = !0, fe.call(ke, new Rn(q, ke, Je.originalEvent, { features: at }))) : Le = !1;
                }, mouseout: function() {
                  Le = !1;
                } } };
              }
              if (q === "mouseleave" || q === "mouseout") {
                var Ve = !1;
                return { layer: ae, listener: fe, delegates: { mousemove: function(Je) {
                  (ke.getLayer(ae) ? ke.queryRenderedFeatures(Je.point, { layers: [ae] }) : []).length ? Ve = !0 : Ve && (Ve = !1, fe.call(ke, new Rn(q, ke, Je.originalEvent)));
                }, mouseout: function(Je) {
                  Ve && (Ve = !1, fe.call(ke, new Rn(q, ke, Je.originalEvent)));
                } } };
              }
              return { layer: ae, listener: fe, delegates: (xe = {}, xe[q] = function(Je) {
                var at = ke.getLayer(ae) ? ke.queryRenderedFeatures(Je.point, { layers: [ae] }) : [];
                at.length && (Je.features = at, fe.call(ke, Je), delete Je.features);
              }, xe) };
            }, D.prototype.on = function(q, ae, fe) {
              if (fe === void 0)
                return C.prototype.on.call(this, q, ae);
              var xe = this._createDelegatedListener(q, ae, fe);
              for (var ke in this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[q] = this._delegatedListeners[q] || [], this._delegatedListeners[q].push(xe), xe.delegates)
                this.on(ke, xe.delegates[ke]);
              return this;
            }, D.prototype.once = function(q, ae, fe) {
              if (fe === void 0)
                return C.prototype.once.call(this, q, ae);
              var xe = this._createDelegatedListener(q, ae, fe);
              for (var ke in xe.delegates)
                this.once(ke, xe.delegates[ke]);
              return this;
            }, D.prototype.off = function(q, ae, fe) {
              var xe = this;
              return fe === void 0 ? C.prototype.off.call(this, q, ae) : (this._delegatedListeners && this._delegatedListeners[q] && function(ke) {
                for (var Le = ke[q], Ve = 0; Ve < Le.length; Ve++) {
                  var Je = Le[Ve];
                  if (Je.layer === ae && Je.listener === fe) {
                    for (var at in Je.delegates)
                      xe.off(at, Je.delegates[at]);
                    return Le.splice(Ve, 1), xe;
                  }
                }
              }(this._delegatedListeners), this);
            }, D.prototype.queryRenderedFeatures = function(q, ae) {
              if (!this.style)
                return [];
              var fe;
              if (ae !== void 0 || q === void 0 || q instanceof e.Point || Array.isArray(q) || (ae = q, q = void 0), ae = ae || {}, (q = q || [[0, 0], [this.transform.width, this.transform.height]]) instanceof e.Point || typeof q[0] == "number")
                fe = [e.Point.convert(q)];
              else {
                var xe = e.Point.convert(q[0]), ke = e.Point.convert(q[1]);
                fe = [xe, new e.Point(ke.x, xe.y), ke, new e.Point(xe.x, ke.y), xe];
              }
              return this.style.queryRenderedFeatures(fe, ae, this.transform);
            }, D.prototype.querySourceFeatures = function(q, ae) {
              return this.style.querySourceFeatures(q, ae);
            }, D.prototype.setStyle = function(q, ae) {
              return (ae = e.extend({}, { localIdeographFontFamily: this._localIdeographFontFamily }, ae)).diff !== !1 && ae.localIdeographFontFamily === this._localIdeographFontFamily && this.style && q ? (this._diffStyle(q, ae), this) : (this._localIdeographFontFamily = ae.localIdeographFontFamily, this._updateStyle(q, ae));
            }, D.prototype._getUIString = function(q) {
              var ae = this._locale[q];
              if (ae == null)
                throw new Error("Missing UI string '" + q + "'");
              return ae;
            }, D.prototype._updateStyle = function(q, ae) {
              return this.style && (this.style.setEventedParent(null), this.style._remove()), q ? (this.style = new wn(this, ae || {}), this.style.setEventedParent(this, { style: this.style }), typeof q == "string" ? this.style.loadURL(q) : this.style.loadJSON(q), this) : (delete this.style, this);
            }, D.prototype._lazyInitEmptyStyle = function() {
              this.style || (this.style = new wn(this, {}), this.style.setEventedParent(this, { style: this.style }), this.style.loadEmpty());
            }, D.prototype._diffStyle = function(q, ae) {
              var fe = this;
              if (typeof q == "string") {
                var xe = this._requestManager.normalizeStyleURL(q), ke = this._requestManager.transformRequest(xe, e.ResourceType.Style);
                e.getJSON(ke, function(Le, Ve) {
                  Le ? fe.fire(new e.ErrorEvent(Le)) : Ve && fe._updateDiff(Ve, ae);
                });
              } else
                typeof q == "object" && this._updateDiff(q, ae);
            }, D.prototype._updateDiff = function(q, ae) {
              try {
                this.style.setState(q) && this._update(!0);
              } catch (fe) {
                e.warnOnce("Unable to perform style diff: " + (fe.message || fe.error || fe) + ".  Rebuilding the style from scratch."), this._updateStyle(q, ae);
              }
            }, D.prototype.getStyle = function() {
              if (this.style)
                return this.style.serialize();
            }, D.prototype.isStyleLoaded = function() {
              return this.style ? this.style.loaded() : e.warnOnce("There is no style added to the map.");
            }, D.prototype.addSource = function(q, ae) {
              return this._lazyInitEmptyStyle(), this.style.addSource(q, ae), this._update(!0);
            }, D.prototype.isSourceLoaded = function(q) {
              var ae = this.style && this.style.sourceCaches[q];
              if (ae !== void 0)
                return ae.loaded();
              this.fire(new e.ErrorEvent(new Error("There is no source with ID '" + q + "'")));
            }, D.prototype.areTilesLoaded = function() {
              var q = this.style && this.style.sourceCaches;
              for (var ae in q) {
                var fe = q[ae]._tiles;
                for (var xe in fe) {
                  var ke = fe[xe];
                  if (ke.state !== "loaded" && ke.state !== "errored")
                    return !1;
                }
              }
              return !0;
            }, D.prototype.addSourceType = function(q, ae, fe) {
              return this._lazyInitEmptyStyle(), this.style.addSourceType(q, ae, fe);
            }, D.prototype.removeSource = function(q) {
              return this.style.removeSource(q), this._update(!0);
            }, D.prototype.getSource = function(q) {
              return this.style.getSource(q);
            }, D.prototype.addImage = function(q, ae, fe) {
              fe === void 0 && (fe = {});
              var xe = fe.pixelRatio;
              xe === void 0 && (xe = 1);
              var ke = fe.sdf;
              ke === void 0 && (ke = !1);
              var Le = fe.stretchX, Ve = fe.stretchY, Je = fe.content;
              if (this._lazyInitEmptyStyle(), ae instanceof Ds || $o && ae instanceof $o) {
                var at = e.browser.getImageData(ae), _t = at.width, Et = at.height, kt = at.data;
                this.style.addImage(q, { data: new e.RGBAImage({ width: _t, height: Et }, kt), pixelRatio: xe, stretchX: Le, stretchY: Ve, content: Je, sdf: ke, version: 0 });
              } else {
                if (ae.width === void 0 || ae.height === void 0)
                  return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
                var At = ae.width, xt = ae.height, Dt = ae.data, Ot = ae;
                this.style.addImage(q, { data: new e.RGBAImage({ width: At, height: xt }, new Uint8Array(Dt)), pixelRatio: xe, stretchX: Le, stretchY: Ve, content: Je, sdf: ke, version: 0, userImage: Ot }), Ot.onAdd && Ot.onAdd(this, q);
              }
            }, D.prototype.updateImage = function(q, ae) {
              var fe = this.style.getImage(q);
              if (!fe)
                return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));
              var xe = ae instanceof Ds || $o && ae instanceof $o ? e.browser.getImageData(ae) : ae, ke = xe.width, Le = xe.height, Ve = xe.data;
              if (ke === void 0 || Le === void 0)
                return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
              if (ke !== fe.data.width || Le !== fe.data.height)
                return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));
              var Je = !(ae instanceof Ds || $o && ae instanceof $o);
              fe.data.replace(Ve, Je), this.style.updateImage(q, fe);
            }, D.prototype.hasImage = function(q) {
              return q ? !!this.style.getImage(q) : (this.fire(new e.ErrorEvent(new Error("Missing required image id"))), !1);
            }, D.prototype.removeImage = function(q) {
              this.style.removeImage(q);
            }, D.prototype.loadImage = function(q, ae) {
              e.getImage(this._requestManager.transformRequest(q, e.ResourceType.Image), ae);
            }, D.prototype.listImages = function() {
              return this.style.listImages();
            }, D.prototype.addLayer = function(q, ae) {
              return this._lazyInitEmptyStyle(), this.style.addLayer(q, ae), this._update(!0);
            }, D.prototype.moveLayer = function(q, ae) {
              return this.style.moveLayer(q, ae), this._update(!0);
            }, D.prototype.removeLayer = function(q) {
              return this.style.removeLayer(q), this._update(!0);
            }, D.prototype.getLayer = function(q) {
              return this.style.getLayer(q);
            }, D.prototype.setLayerZoomRange = function(q, ae, fe) {
              return this.style.setLayerZoomRange(q, ae, fe), this._update(!0);
            }, D.prototype.setFilter = function(q, ae, fe) {
              return fe === void 0 && (fe = {}), this.style.setFilter(q, ae, fe), this._update(!0);
            }, D.prototype.getFilter = function(q) {
              return this.style.getFilter(q);
            }, D.prototype.setPaintProperty = function(q, ae, fe, xe) {
              return xe === void 0 && (xe = {}), this.style.setPaintProperty(q, ae, fe, xe), this._update(!0);
            }, D.prototype.getPaintProperty = function(q, ae) {
              return this.style.getPaintProperty(q, ae);
            }, D.prototype.setLayoutProperty = function(q, ae, fe, xe) {
              return xe === void 0 && (xe = {}), this.style.setLayoutProperty(q, ae, fe, xe), this._update(!0);
            }, D.prototype.getLayoutProperty = function(q, ae) {
              return this.style.getLayoutProperty(q, ae);
            }, D.prototype.setLight = function(q, ae) {
              return ae === void 0 && (ae = {}), this._lazyInitEmptyStyle(), this.style.setLight(q, ae), this._update(!0);
            }, D.prototype.getLight = function() {
              return this.style.getLight();
            }, D.prototype.setFeatureState = function(q, ae) {
              return this.style.setFeatureState(q, ae), this._update();
            }, D.prototype.removeFeatureState = function(q, ae) {
              return this.style.removeFeatureState(q, ae), this._update();
            }, D.prototype.getFeatureState = function(q) {
              return this.style.getFeatureState(q);
            }, D.prototype.getContainer = function() {
              return this._container;
            }, D.prototype.getCanvasContainer = function() {
              return this._canvasContainer;
            }, D.prototype.getCanvas = function() {
              return this._canvas;
            }, D.prototype._containerDimensions = function() {
              var q = 0, ae = 0;
              return this._container && (q = this._container.clientWidth || 400, ae = this._container.clientHeight || 300), [q, ae];
            }, D.prototype._detectMissingCSS = function() {
              e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color") !== "rgb(250, 128, 114)" && e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.");
            }, D.prototype._setupContainer = function() {
              var q = this._container;
              q.classList.add("mapboxgl-map"), (this._missingCSSCanary = n.create("div", "mapboxgl-canary", q)).style.visibility = "hidden", this._detectMissingCSS();
              var ae = this._canvasContainer = n.create("div", "mapboxgl-canvas-container", q);
              this._interactive && ae.classList.add("mapboxgl-interactive"), this._canvas = n.create("canvas", "mapboxgl-canvas", ae), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", "0"), this._canvas.setAttribute("aria-label", "Map");
              var fe = this._containerDimensions();
              this._resizeCanvas(fe[0], fe[1]);
              var xe = this._controlContainer = n.create("div", "mapboxgl-control-container", q), ke = this._controlPositions = {};
              ["top-left", "top-right", "bottom-left", "bottom-right"].forEach(function(Le) {
                ke[Le] = n.create("div", "mapboxgl-ctrl-" + Le, xe);
              });
            }, D.prototype._resizeCanvas = function(q, ae) {
              var fe = e.browser.devicePixelRatio || 1;
              this._canvas.width = fe * q, this._canvas.height = fe * ae, this._canvas.style.width = q + "px", this._canvas.style.height = ae + "px";
            }, D.prototype._setupPainter = function() {
              var q = e.extend({}, r.webGLContextAttributes, { failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat, preserveDrawingBuffer: this._preserveDrawingBuffer, antialias: this._antialias || !1 }), ae = this._canvas.getContext("webgl", q) || this._canvas.getContext("experimental-webgl", q);
              ae ? (this.painter = new Oa(ae, this.transform), e.webpSupported.testSupport(ae)) : this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")));
            }, D.prototype._contextLost = function(q) {
              q.preventDefault(), this._frame && (this._frame.cancel(), this._frame = null), this.fire(new e.Event("webglcontextlost", { originalEvent: q }));
            }, D.prototype._contextRestored = function(q) {
              this._setupPainter(), this.resize(), this._update(), this.fire(new e.Event("webglcontextrestored", { originalEvent: q }));
            }, D.prototype.loaded = function() {
              return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();
            }, D.prototype._update = function(q) {
              return this.style ? (this._styleDirty = this._styleDirty || q, this._sourcesDirty = !0, this.triggerRepaint(), this) : this;
            }, D.prototype._requestRenderFrame = function(q) {
              return this._update(), this._renderTaskQueue.add(q);
            }, D.prototype._cancelRenderFrame = function(q) {
              this._renderTaskQueue.remove(q);
            }, D.prototype._render = function(q) {
              var ae, fe = this, xe = 0, ke = this.painter.context.extTimerQuery;
              if (this.listens("gpu-timing-frame") && (ae = ke.createQueryEXT(), ke.beginQueryEXT(ke.TIME_ELAPSED_EXT, ae), xe = e.browser.now()), this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(q), !this._removed) {
                var Le = !1;
                if (this.style && this._styleDirty) {
                  this._styleDirty = !1;
                  var Ve = this.transform.zoom, Je = e.browser.now();
                  this.style.zoomHistory.update(Ve, Je);
                  var at = new e.EvaluationParameters(Ve, { now: Je, fadeDuration: this._fadeDuration, zoomHistory: this.style.zoomHistory, transition: this.style.getTransition() }), _t = at.crossFadingFactor();
                  _t === 1 && _t === this._crossFadingFactor || (Le = !0, this._crossFadingFactor = _t), this.style.update(at);
                }
                if (this.style && this._sourcesDirty && (this._sourcesDirty = !1, this.style._updateSources(this.transform)), this._placementDirty = this.style && this.style._updatePlacement(this.painter.transform, this.showCollisionBoxes, this._fadeDuration, this._crossSourceCollisions), this.painter.render(this.style, { showTileBoundaries: this.showTileBoundaries, showOverdrawInspector: this._showOverdrawInspector, rotating: this.isRotating(), zooming: this.isZooming(), moving: this.isMoving(), fadeDuration: this._fadeDuration, showPadding: this.showPadding, gpuTiming: !!this.listens("gpu-timing-layer") }), this.fire(new e.Event("render")), this.loaded() && !this._loaded && (this._loaded = !0, this.fire(new e.Event("load"))), this.style && (this.style.hasTransitions() || Le) && (this._styleDirty = !0), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles(), this.listens("gpu-timing-frame")) {
                  var Et = e.browser.now() - xe;
                  ke.endQueryEXT(ke.TIME_ELAPSED_EXT, ae), setTimeout(function() {
                    var At = ke.getQueryObjectEXT(ae, ke.QUERY_RESULT_EXT) / 1e6;
                    ke.deleteQueryEXT(ae), fe.fire(new e.Event("gpu-timing-frame", { cpuTime: Et, gpuTime: At }));
                  }, 50);
                }
                if (this.listens("gpu-timing-layer")) {
                  var kt = this.painter.collectGpuTimers();
                  setTimeout(function() {
                    var At = fe.painter.queryGpuTimers(kt);
                    fe.fire(new e.Event("gpu-timing-layer", { layerTimes: At }));
                  }, 50);
                }
                return this._sourcesDirty || this._styleDirty || this._placementDirty || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && (this._fullyLoaded || (this._fullyLoaded = !0), this.fire(new e.Event("idle"))), this;
              }
            }, D.prototype.remove = function() {
              this._hash && this._hash.remove();
              for (var q = 0, ae = this._controls; q < ae.length; q += 1)
                ae[q].onRemove(this);
              this._controls = [], this._frame && (this._frame.cancel(), this._frame = null), this._renderTaskQueue.clear(), this.painter.destroy(), this.handlers.destroy(), delete this.handlers, this.setStyle(null), e.window !== void 0 && (e.window.removeEventListener("resize", this._onWindowResize, !1), e.window.removeEventListener("online", this._onWindowOnline, !1));
              var fe = this.painter.context.gl.getExtension("WEBGL_lose_context");
              fe && fe.loseContext(), Xs(this._canvasContainer), Xs(this._controlContainer), Xs(this._missingCSSCanary), this._container.classList.remove("mapboxgl-map"), this._removed = !0, this.fire(new e.Event("remove"));
            }, D.prototype.triggerRepaint = function() {
              var q = this;
              this.style && !this._frame && (this._frame = e.browser.frame(function(ae) {
                q._frame = null, q._render(ae);
              }));
            }, D.prototype._onWindowOnline = function() {
              this._update();
            }, D.prototype._onWindowResize = function(q) {
              this._trackResize && this.resize({ originalEvent: q })._update();
            }, F.showTileBoundaries.get = function() {
              return !!this._showTileBoundaries;
            }, F.showTileBoundaries.set = function(q) {
              this._showTileBoundaries !== q && (this._showTileBoundaries = q, this._update());
            }, F.showPadding.get = function() {
              return !!this._showPadding;
            }, F.showPadding.set = function(q) {
              this._showPadding !== q && (this._showPadding = q, this._update());
            }, F.showCollisionBoxes.get = function() {
              return !!this._showCollisionBoxes;
            }, F.showCollisionBoxes.set = function(q) {
              this._showCollisionBoxes !== q && (this._showCollisionBoxes = q, q ? this.style._generateCollisionBoxes() : this._update());
            }, F.showOverdrawInspector.get = function() {
              return !!this._showOverdrawInspector;
            }, F.showOverdrawInspector.set = function(q) {
              this._showOverdrawInspector !== q && (this._showOverdrawInspector = q, this._update());
            }, F.repaint.get = function() {
              return !!this._repaint;
            }, F.repaint.set = function(q) {
              this._repaint !== q && (this._repaint = q, this.triggerRepaint());
            }, F.vertices.get = function() {
              return !!this._vertices;
            }, F.vertices.set = function(q) {
              this._vertices = q, this._update();
            }, D.prototype._setCacheLimits = function(q, ae) {
              e.setCacheLimits(q, ae);
            }, F.version.get = function() {
              return e.version;
            }, Object.defineProperties(D.prototype, F), D;
          }(zs);
          function Xs(C) {
            C.parentNode && C.parentNode.removeChild(C);
          }
          var ws = { showCompass: !0, showZoom: !0, visualizePitch: !1 }, Ja = function(C) {
            var D = this;
            this.options = e.extend({}, ws, C), this._container = n.create("div", "mapboxgl-ctrl mapboxgl-ctrl-group"), this._container.addEventListener("contextmenu", function(F) {
              return F.preventDefault();
            }), this.options.showZoom && (e.bindAll(["_setButtonTitle", "_updateZoomButtons"], this), this._zoomInButton = this._createButton("mapboxgl-ctrl-zoom-in", function(F) {
              return D._map.zoomIn({}, { originalEvent: F });
            }), n.create("span", "mapboxgl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", !0), this._zoomOutButton = this._createButton("mapboxgl-ctrl-zoom-out", function(F) {
              return D._map.zoomOut({}, { originalEvent: F });
            }), n.create("span", "mapboxgl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", !0)), this.options.showCompass && (e.bindAll(["_rotateCompassArrow"], this), this._compass = this._createButton("mapboxgl-ctrl-compass", function(F) {
              D.options.visualizePitch ? D._map.resetNorthPitch({}, { originalEvent: F }) : D._map.resetNorth({}, { originalEvent: F });
            }), this._compassIcon = n.create("span", "mapboxgl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", !0));
          };
          Ja.prototype._updateZoomButtons = function() {
            var C = this._map.getZoom();
            this._zoomInButton.disabled = C === this._map.getMaxZoom(), this._zoomOutButton.disabled = C === this._map.getMinZoom();
          }, Ja.prototype._rotateCompassArrow = function() {
            var C = this.options.visualizePitch ? "scale(" + 1 / Math.pow(Math.cos(this._map.transform.pitch * (Math.PI / 180)), 0.5) + ") rotateX(" + this._map.transform.pitch + "deg) rotateZ(" + this._map.transform.angle * (180 / Math.PI) + "deg)" : "rotate(" + this._map.transform.angle * (180 / Math.PI) + "deg)";
            this._compassIcon.style.transform = C;
          }, Ja.prototype.onAdd = function(C) {
            return this._map = C, this.options.showZoom && (this._setButtonTitle(this._zoomInButton, "ZoomIn"), this._setButtonTitle(this._zoomOutButton, "ZoomOut"), this._map.on("zoom", this._updateZoomButtons), this._updateZoomButtons()), this.options.showCompass && (this._setButtonTitle(this._compass, "ResetBearing"), this.options.visualizePitch && this._map.on("pitch", this._rotateCompassArrow), this._map.on("rotate", this._rotateCompassArrow), this._rotateCompassArrow(), this._handler = new ni(this._map, this._compass, this.options.visualizePitch)), this._container;
          }, Ja.prototype.onRemove = function() {
            n.remove(this._container), this.options.showZoom && this._map.off("zoom", this._updateZoomButtons), this.options.showCompass && (this.options.visualizePitch && this._map.off("pitch", this._rotateCompassArrow), this._map.off("rotate", this._rotateCompassArrow), this._handler.off(), delete this._handler), delete this._map;
          }, Ja.prototype._createButton = function(C, D) {
            var F = n.create("button", C, this._container);
            return F.type = "button", F.addEventListener("click", D), F;
          }, Ja.prototype._setButtonTitle = function(C, D) {
            var F = this._map._getUIString("NavigationControl." + D);
            C.title = F, C.setAttribute("aria-label", F);
          };
          var ni = function(C, D, F) {
            F === void 0 && (F = !1), this._clickTolerance = 10, this.element = D, this.mouseRotate = new Ea({ clickTolerance: C.dragRotate._mouseRotate._clickTolerance }), this.map = C, F && (this.mousePitch = new da({ clickTolerance: C.dragRotate._mousePitch._clickTolerance })), e.bindAll(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend", "reset"], this), n.addEventListener(D, "mousedown", this.mousedown), n.addEventListener(D, "touchstart", this.touchstart, { passive: !1 }), n.addEventListener(D, "touchmove", this.touchmove), n.addEventListener(D, "touchend", this.touchend), n.addEventListener(D, "touchcancel", this.reset);
          };
          function fs(C, D, F) {
            if (C = new e.LngLat(C.lng, C.lat), D) {
              var q = new e.LngLat(C.lng - 360, C.lat), ae = new e.LngLat(C.lng + 360, C.lat), fe = F.locationPoint(C).distSqr(D);
              F.locationPoint(q).distSqr(D) < fe ? C = q : F.locationPoint(ae).distSqr(D) < fe && (C = ae);
            }
            for (; Math.abs(C.lng - F.center.lng) > 180; ) {
              var xe = F.locationPoint(C);
              if (xe.x >= 0 && xe.y >= 0 && xe.x <= F.width && xe.y <= F.height)
                break;
              C.lng > F.center.lng ? C.lng -= 360 : C.lng += 360;
            }
            return C;
          }
          ni.prototype.down = function(C, D) {
            this.mouseRotate.mousedown(C, D), this.mousePitch && this.mousePitch.mousedown(C, D), n.disableDrag();
          }, ni.prototype.move = function(C, D) {
            var F = this.map, q = this.mouseRotate.mousemoveWindow(C, D);
            if (q && q.bearingDelta && F.setBearing(F.getBearing() + q.bearingDelta), this.mousePitch) {
              var ae = this.mousePitch.mousemoveWindow(C, D);
              ae && ae.pitchDelta && F.setPitch(F.getPitch() + ae.pitchDelta);
            }
          }, ni.prototype.off = function() {
            var C = this.element;
            n.removeEventListener(C, "mousedown", this.mousedown), n.removeEventListener(C, "touchstart", this.touchstart, { passive: !1 }), n.removeEventListener(C, "touchmove", this.touchmove), n.removeEventListener(C, "touchend", this.touchend), n.removeEventListener(C, "touchcancel", this.reset), this.offTemp();
          }, ni.prototype.offTemp = function() {
            n.enableDrag(), n.removeEventListener(e.window, "mousemove", this.mousemove), n.removeEventListener(e.window, "mouseup", this.mouseup);
          }, ni.prototype.mousedown = function(C) {
            this.down(e.extend({}, C, { ctrlKey: !0, preventDefault: function() {
              return C.preventDefault();
            } }), n.mousePos(this.element, C)), n.addEventListener(e.window, "mousemove", this.mousemove), n.addEventListener(e.window, "mouseup", this.mouseup);
          }, ni.prototype.mousemove = function(C) {
            this.move(C, n.mousePos(this.element, C));
          }, ni.prototype.mouseup = function(C) {
            this.mouseRotate.mouseupWindow(C), this.mousePitch && this.mousePitch.mouseupWindow(C), this.offTemp();
          }, ni.prototype.touchstart = function(C) {
            C.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = n.touchPos(this.element, C.targetTouches)[0], this.down({ type: "mousedown", button: 0, ctrlKey: !0, preventDefault: function() {
              return C.preventDefault();
            } }, this._startPos));
          }, ni.prototype.touchmove = function(C) {
            C.targetTouches.length !== 1 ? this.reset() : (this._lastPos = n.touchPos(this.element, C.targetTouches)[0], this.move({ preventDefault: function() {
              return C.preventDefault();
            } }, this._lastPos));
          }, ni.prototype.touchend = function(C) {
            C.targetTouches.length === 0 && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), this.reset();
          }, ni.prototype.reset = function() {
            this.mouseRotate.reset(), this.mousePitch && this.mousePitch.reset(), delete this._startPos, delete this._lastPos, this.offTemp();
          };
          var as = { center: "translate(-50%,-50%)", top: "translate(-50%,0)", "top-left": "translate(0,0)", "top-right": "translate(-100%,0)", bottom: "translate(-50%,-100%)", "bottom-left": "translate(0,-100%)", "bottom-right": "translate(-100%,-100%)", left: "translate(0,-50%)", right: "translate(-100%,-50%)" };
          function Li(C, D, F) {
            var q = C.classList;
            for (var ae in as)
              q.remove("mapboxgl-" + F + "-anchor-" + ae);
            q.add("mapboxgl-" + F + "-anchor-" + D);
          }
          var hs, Ts = function(C) {
            function D(F, q) {
              var ae = this;
              if (C.call(this), (F instanceof e.window.HTMLElement || q) && (F = e.extend({ element: F }, q)), e.bindAll(["_update", "_onMove", "_onUp", "_addDragHandler", "_onMapClick", "_onKeyPress"], this), this._anchor = F && F.anchor || "center", this._color = F && F.color || "#3FB1CE", this._draggable = F && F.draggable || !1, this._state = "inactive", this._rotation = F && F.rotation || 0, this._rotationAlignment = F && F.rotationAlignment || "auto", this._pitchAlignment = F && F.pitchAlignment && F.pitchAlignment !== "auto" ? F.pitchAlignment : this._rotationAlignment, F && F.element)
                this._element = F.element, this._offset = e.Point.convert(F && F.offset || [0, 0]);
              else {
                this._defaultMarker = !0, this._element = n.create("div"), this._element.setAttribute("aria-label", "Map marker");
                var fe = n.createNS("http://www.w3.org/2000/svg", "svg");
                fe.setAttributeNS(null, "display", "block"), fe.setAttributeNS(null, "height", "41px"), fe.setAttributeNS(null, "width", "27px"), fe.setAttributeNS(null, "viewBox", "0 0 27 41");
                var xe = n.createNS("http://www.w3.org/2000/svg", "g");
                xe.setAttributeNS(null, "stroke", "none"), xe.setAttributeNS(null, "stroke-width", "1"), xe.setAttributeNS(null, "fill", "none"), xe.setAttributeNS(null, "fill-rule", "evenodd");
                var ke = n.createNS("http://www.w3.org/2000/svg", "g");
                ke.setAttributeNS(null, "fill-rule", "nonzero");
                var Le = n.createNS("http://www.w3.org/2000/svg", "g");
                Le.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), Le.setAttributeNS(null, "fill", "#000000");
                for (var Ve = 0, Je = [{ rx: "10.5", ry: "5.25002273" }, { rx: "10.5", ry: "5.25002273" }, { rx: "9.5", ry: "4.77275007" }, { rx: "8.5", ry: "4.29549936" }, { rx: "7.5", ry: "3.81822308" }, { rx: "6.5", ry: "3.34094679" }, { rx: "5.5", ry: "2.86367051" }, { rx: "4.5", ry: "2.38636864" }]; Ve < Je.length; Ve += 1) {
                  var at = Je[Ve], _t = n.createNS("http://www.w3.org/2000/svg", "ellipse");
                  _t.setAttributeNS(null, "opacity", "0.04"), _t.setAttributeNS(null, "cx", "10.5"), _t.setAttributeNS(null, "cy", "5.80029008"), _t.setAttributeNS(null, "rx", at.rx), _t.setAttributeNS(null, "ry", at.ry), Le.appendChild(_t);
                }
                var Et = n.createNS("http://www.w3.org/2000/svg", "g");
                Et.setAttributeNS(null, "fill", this._color);
                var kt = n.createNS("http://www.w3.org/2000/svg", "path");
                kt.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), Et.appendChild(kt);
                var At = n.createNS("http://www.w3.org/2000/svg", "g");
                At.setAttributeNS(null, "opacity", "0.25"), At.setAttributeNS(null, "fill", "#000000");
                var xt = n.createNS("http://www.w3.org/2000/svg", "path");
                xt.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), At.appendChild(xt);
                var Dt = n.createNS("http://www.w3.org/2000/svg", "g");
                Dt.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), Dt.setAttributeNS(null, "fill", "#FFFFFF");
                var Ot = n.createNS("http://www.w3.org/2000/svg", "g");
                Ot.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
                var jt = n.createNS("http://www.w3.org/2000/svg", "circle");
                jt.setAttributeNS(null, "fill", "#000000"), jt.setAttributeNS(null, "opacity", "0.25"), jt.setAttributeNS(null, "cx", "5.5"), jt.setAttributeNS(null, "cy", "5.5"), jt.setAttributeNS(null, "r", "5.4999962");
                var rr = n.createNS("http://www.w3.org/2000/svg", "circle");
                rr.setAttributeNS(null, "fill", "#FFFFFF"), rr.setAttributeNS(null, "cx", "5.5"), rr.setAttributeNS(null, "cy", "5.5"), rr.setAttributeNS(null, "r", "5.4999962"), Ot.appendChild(jt), Ot.appendChild(rr), ke.appendChild(Le), ke.appendChild(Et), ke.appendChild(At), ke.appendChild(Dt), ke.appendChild(Ot), fe.appendChild(ke), this._element.appendChild(fe), this._offset = e.Point.convert(F && F.offset || [0, -14]);
              }
              this._element.classList.add("mapboxgl-marker"), this._element.addEventListener("dragstart", function(dr) {
                dr.preventDefault();
              }), this._element.addEventListener("mousedown", function(dr) {
                dr.preventDefault();
              }), this._element.addEventListener("focus", function() {
                var dr = ae._map.getContainer();
                dr.scrollTop = 0, dr.scrollLeft = 0;
              }), Li(this._element, this._anchor, "marker"), this._popup = null;
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.addTo = function(F) {
              return this.remove(), this._map = F, F.getCanvasContainer().appendChild(this._element), F.on("move", this._update), F.on("moveend", this._update), this.setDraggable(this._draggable), this._update(), this._map.on("click", this._onMapClick), this;
            }, D.prototype.remove = function() {
              return this._map && (this._map.off("click", this._onMapClick), this._map.off("move", this._update), this._map.off("moveend", this._update), this._map.off("mousedown", this._addDragHandler), this._map.off("touchstart", this._addDragHandler), this._map.off("mouseup", this._onUp), this._map.off("touchend", this._onUp), this._map.off("mousemove", this._onMove), this._map.off("touchmove", this._onMove), delete this._map), n.remove(this._element), this._popup && this._popup.remove(), this;
            }, D.prototype.getLngLat = function() {
              return this._lngLat;
            }, D.prototype.setLngLat = function(F) {
              return this._lngLat = e.LngLat.convert(F), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this;
            }, D.prototype.getElement = function() {
              return this._element;
            }, D.prototype.setPopup = function(F) {
              if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener("keypress", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute("tabindex")), F) {
                if (!("offset" in F.options)) {
                  var q = Math.sqrt(Math.pow(13.5, 2) / 2);
                  F.options.offset = this._defaultMarker ? { top: [0, 0], "top-left": [0, 0], "top-right": [0, 0], bottom: [0, -38.1], "bottom-left": [q, -1 * (24.6 + q)], "bottom-right": [-q, -1 * (24.6 + q)], left: [13.5, -24.6], right: [-13.5, -24.6] } : this._offset;
                }
                this._popup = F, this._lngLat && this._popup.setLngLat(this._lngLat), this._originalTabIndex = this._element.getAttribute("tabindex"), this._originalTabIndex || this._element.setAttribute("tabindex", "0"), this._element.addEventListener("keypress", this._onKeyPress);
              }
              return this;
            }, D.prototype._onKeyPress = function(F) {
              var q = F.code, ae = F.charCode || F.keyCode;
              q !== "Space" && q !== "Enter" && ae !== 32 && ae !== 13 || this.togglePopup();
            }, D.prototype._onMapClick = function(F) {
              var q = F.originalEvent.target, ae = this._element;
              this._popup && (q === ae || ae.contains(q)) && this.togglePopup();
            }, D.prototype.getPopup = function() {
              return this._popup;
            }, D.prototype.togglePopup = function() {
              var F = this._popup;
              return F ? (F.isOpen() ? F.remove() : F.addTo(this._map), this) : this;
            }, D.prototype._update = function(F) {
              if (this._map) {
                this._map.transform.renderWorldCopies && (this._lngLat = fs(this._lngLat, this._pos, this._map.transform)), this._pos = this._map.project(this._lngLat)._add(this._offset);
                var q = "";
                this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? q = "rotateZ(" + this._rotation + "deg)" : this._rotationAlignment === "map" && (q = "rotateZ(" + (this._rotation - this._map.getBearing()) + "deg)");
                var ae = "";
                this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? ae = "rotateX(0deg)" : this._pitchAlignment === "map" && (ae = "rotateX(" + this._map.getPitch() + "deg)"), F && F.type !== "moveend" || (this._pos = this._pos.round()), n.setTransform(this._element, as[this._anchor] + " translate(" + this._pos.x + "px, " + this._pos.y + "px) " + ae + " " + q);
              }
            }, D.prototype.getOffset = function() {
              return this._offset;
            }, D.prototype.setOffset = function(F) {
              return this._offset = e.Point.convert(F), this._update(), this;
            }, D.prototype._onMove = function(F) {
              this._pos = F.point.sub(this._positionDelta), this._lngLat = this._map.unproject(this._pos), this.setLngLat(this._lngLat), this._element.style.pointerEvents = "none", this._state === "pending" && (this._state = "active", this.fire(new e.Event("dragstart"))), this.fire(new e.Event("drag"));
            }, D.prototype._onUp = function() {
              this._element.style.pointerEvents = "auto", this._positionDelta = null, this._map.off("mousemove", this._onMove), this._map.off("touchmove", this._onMove), this._state === "active" && this.fire(new e.Event("dragend")), this._state = "inactive";
            }, D.prototype._addDragHandler = function(F) {
              this._element.contains(F.originalEvent.target) && (F.preventDefault(), this._positionDelta = F.point.sub(this._pos).add(this._offset), this._state = "pending", this._map.on("mousemove", this._onMove), this._map.on("touchmove", this._onMove), this._map.once("mouseup", this._onUp), this._map.once("touchend", this._onUp));
            }, D.prototype.setDraggable = function(F) {
              return this._draggable = !!F, this._map && (F ? (this._map.on("mousedown", this._addDragHandler), this._map.on("touchstart", this._addDragHandler)) : (this._map.off("mousedown", this._addDragHandler), this._map.off("touchstart", this._addDragHandler))), this;
            }, D.prototype.isDraggable = function() {
              return this._draggable;
            }, D.prototype.setRotation = function(F) {
              return this._rotation = F || 0, this._update(), this;
            }, D.prototype.getRotation = function() {
              return this._rotation;
            }, D.prototype.setRotationAlignment = function(F) {
              return this._rotationAlignment = F || "auto", this._update(), this;
            }, D.prototype.getRotationAlignment = function() {
              return this._rotationAlignment;
            }, D.prototype.setPitchAlignment = function(F) {
              return this._pitchAlignment = F && F !== "auto" ? F : this._rotationAlignment, this._update(), this;
            }, D.prototype.getPitchAlignment = function() {
              return this._pitchAlignment;
            }, D;
          }(e.Evented), gs = { positionOptions: { enableHighAccuracy: !1, maximumAge: 0, timeout: 6e3 }, fitBoundsOptions: { maxZoom: 15 }, trackUserLocation: !1, showAccuracyCircle: !0, showUserLocation: !0 }, ks = 0, is = !1, Js = function(C) {
            function D(F) {
              C.call(this), this.options = e.extend({}, gs, F), e.bindAll(["_onSuccess", "_onError", "_onZoom", "_finish", "_setupUI", "_updateCamera", "_updateMarker"], this);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.onAdd = function(F) {
              var q;
              return this._map = F, this._container = n.create("div", "mapboxgl-ctrl mapboxgl-ctrl-group"), q = this._setupUI, hs !== void 0 ? q(hs) : e.window.navigator.permissions !== void 0 ? e.window.navigator.permissions.query({ name: "geolocation" }).then(function(ae) {
                hs = ae.state !== "denied", q(hs);
              }) : (hs = !!e.window.navigator.geolocation, q(hs)), this._container;
            }, D.prototype.onRemove = function() {
              this._geolocationWatchID !== void 0 && (e.window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0), this.options.showUserLocation && this._userLocationDotMarker && this._userLocationDotMarker.remove(), this.options.showAccuracyCircle && this._accuracyCircleMarker && this._accuracyCircleMarker.remove(), n.remove(this._container), this._map.off("zoom", this._onZoom), this._map = void 0, ks = 0, is = !1;
            }, D.prototype._isOutOfMapMaxBounds = function(F) {
              var q = this._map.getMaxBounds(), ae = F.coords;
              return q && (ae.longitude < q.getWest() || ae.longitude > q.getEast() || ae.latitude < q.getSouth() || ae.latitude > q.getNorth());
            }, D.prototype._setErrorState = function() {
              switch (this._watchState) {
                case "WAITING_ACTIVE":
                  this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");
                  break;
                case "ACTIVE_LOCK":
                  this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");
                  break;
                case "BACKGROUND":
                  this._watchState = "BACKGROUND_ERROR", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");
              }
            }, D.prototype._onSuccess = function(F) {
              if (this._map) {
                if (this._isOutOfMapMaxBounds(F))
                  return this._setErrorState(), this.fire(new e.Event("outofmaxbounds", F)), this._updateMarker(), void this._finish();
                if (this.options.trackUserLocation)
                  switch (this._lastKnownPosition = F, this._watchState) {
                    case "WAITING_ACTIVE":
                    case "ACTIVE_LOCK":
                    case "ACTIVE_ERROR":
                      this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");
                      break;
                    case "BACKGROUND":
                    case "BACKGROUND_ERROR":
                      this._watchState = "BACKGROUND", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");
                  }
                this.options.showUserLocation && this._watchState !== "OFF" && this._updateMarker(F), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(F), this.options.showUserLocation && this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"), this.fire(new e.Event("geolocate", F)), this._finish();
              }
            }, D.prototype._updateCamera = function(F) {
              var q = new e.LngLat(F.coords.longitude, F.coords.latitude), ae = F.coords.accuracy, fe = this._map.getBearing(), xe = e.extend({ bearing: fe }, this.options.fitBoundsOptions);
              this._map.fitBounds(q.toBounds(ae), xe, { geolocateSource: !0 });
            }, D.prototype._updateMarker = function(F) {
              if (F) {
                var q = new e.LngLat(F.coords.longitude, F.coords.latitude);
                this._accuracyCircleMarker.setLngLat(q).addTo(this._map), this._userLocationDotMarker.setLngLat(q).addTo(this._map), this._accuracy = F.coords.accuracy, this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
              } else
                this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove();
            }, D.prototype._updateCircleRadius = function() {
              var F = this._map._container.clientHeight / 2, q = this._map.unproject([0, F]), ae = this._map.unproject([1, F]), fe = q.distanceTo(ae), xe = Math.ceil(2 * this._accuracy / fe);
              this._circleElement.style.width = xe + "px", this._circleElement.style.height = xe + "px";
            }, D.prototype._onZoom = function() {
              this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
            }, D.prototype._onError = function(F) {
              if (this._map) {
                if (this.options.trackUserLocation)
                  if (F.code === 1) {
                    this._watchState = "OFF", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"), this._geolocateButton.disabled = !0;
                    var q = this._map._getUIString("GeolocateControl.LocationNotAvailable");
                    this._geolocateButton.title = q, this._geolocateButton.setAttribute("aria-label", q), this._geolocationWatchID !== void 0 && this._clearWatch();
                  } else {
                    if (F.code === 3 && is)
                      return;
                    this._setErrorState();
                  }
                this._watchState !== "OFF" && this.options.showUserLocation && this._dotElement.classList.add("mapboxgl-user-location-dot-stale"), this.fire(new e.Event("error", F)), this._finish();
              }
            }, D.prototype._finish = function() {
              this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0;
            }, D.prototype._setupUI = function(F) {
              var q = this;
              if (this._container.addEventListener("contextmenu", function(xe) {
                return xe.preventDefault();
              }), this._geolocateButton = n.create("button", "mapboxgl-ctrl-geolocate", this._container), n.create("span", "mapboxgl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", !0), this._geolocateButton.type = "button", F === !1) {
                e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");
                var ae = this._map._getUIString("GeolocateControl.LocationNotAvailable");
                this._geolocateButton.disabled = !0, this._geolocateButton.title = ae, this._geolocateButton.setAttribute("aria-label", ae);
              } else {
                var fe = this._map._getUIString("GeolocateControl.FindMyLocation");
                this._geolocateButton.title = fe, this._geolocateButton.setAttribute("aria-label", fe);
              }
              this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = n.create("div", "mapboxgl-user-location-dot"), this._userLocationDotMarker = new Ts(this._dotElement), this._circleElement = n.create("div", "mapboxgl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Ts({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", function(xe) {
                var ke = xe.originalEvent && xe.originalEvent.type === "resize";
                xe.geolocateSource || q._watchState !== "ACTIVE_LOCK" || ke || (q._watchState = "BACKGROUND", q._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"), q._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), q.fire(new e.Event("trackuserlocationend")));
              });
            }, D.prototype.trigger = function() {
              if (!this._setup)
                return e.warnOnce("Geolocate control triggered before added to a map"), !1;
              if (this.options.trackUserLocation) {
                switch (this._watchState) {
                  case "OFF":
                    this._watchState = "WAITING_ACTIVE", this.fire(new e.Event("trackuserlocationstart"));
                    break;
                  case "WAITING_ACTIVE":
                  case "ACTIVE_LOCK":
                  case "ACTIVE_ERROR":
                  case "BACKGROUND_ERROR":
                    ks--, is = !1, this._watchState = "OFF", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"), this.fire(new e.Event("trackuserlocationend"));
                    break;
                  case "BACKGROUND":
                    this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._lastKnownPosition && this._updateCamera(this._lastKnownPosition), this.fire(new e.Event("trackuserlocationstart"));
                }
                switch (this._watchState) {
                  case "WAITING_ACTIVE":
                    this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");
                    break;
                  case "ACTIVE_LOCK":
                    this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");
                    break;
                  case "ACTIVE_ERROR":
                    this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");
                    break;
                  case "BACKGROUND":
                    this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");
                    break;
                  case "BACKGROUND_ERROR":
                    this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");
                }
                if (this._watchState === "OFF" && this._geolocationWatchID !== void 0)
                  this._clearWatch();
                else if (this._geolocationWatchID === void 0) {
                  var F;
                  this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "true"), ++ks > 1 ? (F = { maximumAge: 6e5, timeout: 0 }, is = !0) : (F = this.options.positionOptions, is = !1), this._geolocationWatchID = e.window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, F);
                }
              } else
                e.window.navigator.geolocation.getCurrentPosition(this._onSuccess, this._onError, this.options.positionOptions), this._timeoutId = setTimeout(this._finish, 1e4);
              return !0;
            }, D.prototype._clearWatch = function() {
              e.window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0, this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "false"), this.options.showUserLocation && this._updateMarker(null);
            }, D;
          }(e.Evented), il = { maxWidth: 100, unit: "metric" }, ps = function(C) {
            this.options = e.extend({}, il, C), e.bindAll(["_onMove", "setUnit"], this);
          };
          function Ks(C, D, F) {
            var q = F && F.maxWidth || 100, ae = C._container.clientHeight / 2, fe = C.unproject([0, ae]), xe = C.unproject([q, ae]), ke = fe.distanceTo(xe);
            if (F && F.unit === "imperial") {
              var Le = 3.2808 * ke;
              Le > 5280 ? Ms(D, q, Le / 5280, C._getUIString("ScaleControl.Miles")) : Ms(D, q, Le, C._getUIString("ScaleControl.Feet"));
            } else
              F && F.unit === "nautical" ? Ms(D, q, ke / 1852, C._getUIString("ScaleControl.NauticalMiles")) : ke >= 1e3 ? Ms(D, q, ke / 1e3, C._getUIString("ScaleControl.Kilometers")) : Ms(D, q, ke, C._getUIString("ScaleControl.Meters"));
          }
          function Ms(C, D, F, q) {
            var ae, fe, xe, ke = (ae = F, fe = Math.pow(10, ("" + Math.floor(ae)).length - 1), xe = (xe = ae / fe) >= 10 ? 10 : xe >= 5 ? 5 : xe >= 3 ? 3 : xe >= 2 ? 2 : xe >= 1 ? 1 : function(Ve) {
              var Je = Math.pow(10, Math.ceil(-Math.log(Ve) / Math.LN10));
              return Math.round(Ve * Je) / Je;
            }(xe), fe * xe), Le = ke / F;
            C.style.width = D * Le + "px", C.innerHTML = ke + "&nbsp;" + q;
          }
          ps.prototype.getDefaultPosition = function() {
            return "bottom-left";
          }, ps.prototype._onMove = function() {
            Ks(this._map, this._container, this.options);
          }, ps.prototype.onAdd = function(C) {
            return this._map = C, this._container = n.create("div", "mapboxgl-ctrl mapboxgl-ctrl-scale", C.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
          }, ps.prototype.onRemove = function() {
            n.remove(this._container), this._map.off("move", this._onMove), this._map = void 0;
          }, ps.prototype.setUnit = function(C) {
            this.options.unit = C, Ks(this._map, this._container, this.options);
          };
          var to = function(C) {
            this._fullscreen = !1, C && C.container && (C.container instanceof e.window.HTMLElement ? this._container = C.container : e.warnOnce("Full screen control 'container' must be a DOM element.")), e.bindAll(["_onClickFullscreen", "_changeIcon"], this), "onfullscreenchange" in e.window.document ? this._fullscreenchange = "fullscreenchange" : "onmozfullscreenchange" in e.window.document ? this._fullscreenchange = "mozfullscreenchange" : "onwebkitfullscreenchange" in e.window.document ? this._fullscreenchange = "webkitfullscreenchange" : "onmsfullscreenchange" in e.window.document && (this._fullscreenchange = "MSFullscreenChange");
          };
          to.prototype.onAdd = function(C) {
            return this._map = C, this._container || (this._container = this._map.getContainer()), this._controlContainer = n.create("div", "mapboxgl-ctrl mapboxgl-ctrl-group"), this._checkFullscreenSupport() ? this._setupUI() : (this._controlContainer.style.display = "none", e.warnOnce("This device does not support fullscreen mode.")), this._controlContainer;
          }, to.prototype.onRemove = function() {
            n.remove(this._controlContainer), this._map = null, e.window.document.removeEventListener(this._fullscreenchange, this._changeIcon);
          }, to.prototype._checkFullscreenSupport = function() {
            return !!(e.window.document.fullscreenEnabled || e.window.document.mozFullScreenEnabled || e.window.document.msFullscreenEnabled || e.window.document.webkitFullscreenEnabled);
          }, to.prototype._setupUI = function() {
            var C = this._fullscreenButton = n.create("button", "mapboxgl-ctrl-fullscreen", this._controlContainer);
            n.create("span", "mapboxgl-ctrl-icon", C).setAttribute("aria-hidden", !0), C.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), e.window.document.addEventListener(this._fullscreenchange, this._changeIcon);
          }, to.prototype._updateTitle = function() {
            var C = this._getTitle();
            this._fullscreenButton.setAttribute("aria-label", C), this._fullscreenButton.title = C;
          }, to.prototype._getTitle = function() {
            return this._map._getUIString(this._isFullscreen() ? "FullscreenControl.Exit" : "FullscreenControl.Enter");
          }, to.prototype._isFullscreen = function() {
            return this._fullscreen;
          }, to.prototype._changeIcon = function() {
            (e.window.document.fullscreenElement || e.window.document.mozFullScreenElement || e.window.document.webkitFullscreenElement || e.window.document.msFullscreenElement) === this._container !== this._fullscreen && (this._fullscreen = !this._fullscreen, this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"), this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"), this._updateTitle());
          }, to.prototype._onClickFullscreen = function() {
            this._isFullscreen() ? e.window.document.exitFullscreen ? e.window.document.exitFullscreen() : e.window.document.mozCancelFullScreen ? e.window.document.mozCancelFullScreen() : e.window.document.msExitFullscreen ? e.window.document.msExitFullscreen() : e.window.document.webkitCancelFullScreen && e.window.document.webkitCancelFullScreen() : this._container.requestFullscreen ? this._container.requestFullscreen() : this._container.mozRequestFullScreen ? this._container.mozRequestFullScreen() : this._container.msRequestFullscreen ? this._container.msRequestFullscreen() : this._container.webkitRequestFullscreen && this._container.webkitRequestFullscreen();
          };
          var ol = { closeButton: !0, closeOnClick: !0, className: "", maxWidth: "240px" }, sl = function(C) {
            function D(F) {
              C.call(this), this.options = e.extend(Object.create(ol), F), e.bindAll(["_update", "_onClose", "remove", "_onMouseMove", "_onMouseUp", "_onDrag"], this);
            }
            return C && (D.__proto__ = C), D.prototype = Object.create(C && C.prototype), D.prototype.constructor = D, D.prototype.addTo = function(F) {
              return this._map && this.remove(), this._map = F, this.options.closeOnClick && this._map.on("click", this._onClose), this.options.closeOnMove && this._map.on("move", this._onClose), this._map.on("remove", this.remove), this._update(), this._trackPointer ? (this._map.on("mousemove", this._onMouseMove), this._map.on("mouseup", this._onMouseUp), this._container && this._container.classList.add("mapboxgl-popup-track-pointer"), this._map._canvasContainer.classList.add("mapboxgl-track-pointer")) : this._map.on("move", this._update), this.fire(new e.Event("open")), this;
            }, D.prototype.isOpen = function() {
              return !!this._map;
            }, D.prototype.remove = function() {
              return this._content && n.remove(this._content), this._container && (n.remove(this._container), delete this._container), this._map && (this._map.off("move", this._update), this._map.off("move", this._onClose), this._map.off("click", this._onClose), this._map.off("remove", this.remove), this._map.off("mousemove", this._onMouseMove), this._map.off("mouseup", this._onMouseUp), this._map.off("drag", this._onDrag), delete this._map), this.fire(new e.Event("close")), this;
            }, D.prototype.getLngLat = function() {
              return this._lngLat;
            }, D.prototype.setLngLat = function(F) {
              return this._lngLat = e.LngLat.convert(F), this._pos = null, this._trackPointer = !1, this._update(), this._map && (this._map.on("move", this._update), this._map.off("mousemove", this._onMouseMove), this._container && this._container.classList.remove("mapboxgl-popup-track-pointer"), this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")), this;
            }, D.prototype.trackPointer = function() {
              return this._trackPointer = !0, this._pos = null, this._update(), this._map && (this._map.off("move", this._update), this._map.on("mousemove", this._onMouseMove), this._map.on("drag", this._onDrag), this._container && this._container.classList.add("mapboxgl-popup-track-pointer"), this._map._canvasContainer.classList.add("mapboxgl-track-pointer")), this;
            }, D.prototype.getElement = function() {
              return this._container;
            }, D.prototype.setText = function(F) {
              return this.setDOMContent(e.window.document.createTextNode(F));
            }, D.prototype.setHTML = function(F) {
              var q, ae = e.window.document.createDocumentFragment(), fe = e.window.document.createElement("body");
              for (fe.innerHTML = F; q = fe.firstChild; )
                ae.appendChild(q);
              return this.setDOMContent(ae);
            }, D.prototype.getMaxWidth = function() {
              return this._container && this._container.style.maxWidth;
            }, D.prototype.setMaxWidth = function(F) {
              return this.options.maxWidth = F, this._update(), this;
            }, D.prototype.setDOMContent = function(F) {
              return this._createContent(), this._content.appendChild(F), this._update(), this;
            }, D.prototype.addClassName = function(F) {
              this._container && this._container.classList.add(F);
            }, D.prototype.removeClassName = function(F) {
              this._container && this._container.classList.remove(F);
            }, D.prototype.toggleClassName = function(F) {
              if (this._container)
                return this._container.classList.toggle(F);
            }, D.prototype._createContent = function() {
              this._content && n.remove(this._content), this._content = n.create("div", "mapboxgl-popup-content", this._container), this.options.closeButton && (this._closeButton = n.create("button", "mapboxgl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.setAttribute("aria-label", "Close popup"), this._closeButton.innerHTML = "&#215;", this._closeButton.addEventListener("click", this._onClose));
            }, D.prototype._onMouseUp = function(F) {
              this._update(F.point);
            }, D.prototype._onMouseMove = function(F) {
              this._update(F.point);
            }, D.prototype._onDrag = function(F) {
              this._update(F.point);
            }, D.prototype._update = function(F) {
              var q = this, ae = this._lngLat || this._trackPointer;
              if (this._map && ae && this._content && (this._container || (this._container = n.create("div", "mapboxgl-popup", this._map.getContainer()), this._tip = n.create("div", "mapboxgl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className && this.options.className.split(" ").forEach(function(_t) {
                return q._container.classList.add(_t);
              }), this._trackPointer && this._container.classList.add("mapboxgl-popup-track-pointer")), this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._map.transform.renderWorldCopies && !this._trackPointer && (this._lngLat = fs(this._lngLat, this._pos, this._map.transform)), !this._trackPointer || F)) {
                var fe = this._pos = this._trackPointer && F ? F : this._map.project(this._lngLat), xe = this.options.anchor, ke = function _t(Et) {
                  if (Et) {
                    if (typeof Et == "number") {
                      var kt = Math.round(Math.sqrt(0.5 * Math.pow(Et, 2)));
                      return { center: new e.Point(0, 0), top: new e.Point(0, Et), "top-left": new e.Point(kt, kt), "top-right": new e.Point(-kt, kt), bottom: new e.Point(0, -Et), "bottom-left": new e.Point(kt, -kt), "bottom-right": new e.Point(-kt, -kt), left: new e.Point(Et, 0), right: new e.Point(-Et, 0) };
                    }
                    if (Et instanceof e.Point || Array.isArray(Et)) {
                      var At = e.Point.convert(Et);
                      return { center: At, top: At, "top-left": At, "top-right": At, bottom: At, "bottom-left": At, "bottom-right": At, left: At, right: At };
                    }
                    return { center: e.Point.convert(Et.center || [0, 0]), top: e.Point.convert(Et.top || [0, 0]), "top-left": e.Point.convert(Et["top-left"] || [0, 0]), "top-right": e.Point.convert(Et["top-right"] || [0, 0]), bottom: e.Point.convert(Et.bottom || [0, 0]), "bottom-left": e.Point.convert(Et["bottom-left"] || [0, 0]), "bottom-right": e.Point.convert(Et["bottom-right"] || [0, 0]), left: e.Point.convert(Et.left || [0, 0]), right: e.Point.convert(Et.right || [0, 0]) };
                  }
                  return _t(new e.Point(0, 0));
                }(this.options.offset);
                if (!xe) {
                  var Le, Ve = this._container.offsetWidth, Je = this._container.offsetHeight;
                  Le = fe.y + ke.bottom.y < Je ? ["top"] : fe.y > this._map.transform.height - Je ? ["bottom"] : [], fe.x < Ve / 2 ? Le.push("left") : fe.x > this._map.transform.width - Ve / 2 && Le.push("right"), xe = Le.length === 0 ? "bottom" : Le.join("-");
                }
                var at = fe.add(ke[xe]).round();
                n.setTransform(this._container, as[xe] + " translate(" + at.x + "px," + at.y + "px)"), Li(this._container, xe, "popup");
              }
            }, D.prototype._onClose = function() {
              this.remove();
            }, D;
          }(e.Evented), ce = { version: e.version, supported: r, setRTLTextPlugin: e.setRTLTextPlugin, getRTLTextPluginStatus: e.getRTLTextPluginStatus, Map: Vo, NavigationControl: Ja, GeolocateControl: Js, AttributionControl: zi, ScaleControl: ps, FullscreenControl: to, Popup: sl, Marker: Ts, Style: wn, LngLat: e.LngLat, LngLatBounds: e.LngLatBounds, Point: e.Point, MercatorCoordinate: e.MercatorCoordinate, Evented: e.Evented, config: e.config, prewarm: function() {
            rt().acquire(st);
          }, clearPrewarmedResources: function() {
            var C = Tt;
            C && (C.isPreloaded() && C.numActive() === 1 ? (C.release(st), Tt = null) : console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"));
          }, get accessToken() {
            return e.config.ACCESS_TOKEN;
          }, set accessToken(C) {
            e.config.ACCESS_TOKEN = C;
          }, get baseApiUrl() {
            return e.config.API_URL;
          }, set baseApiUrl(C) {
            e.config.API_URL = C;
          }, get workerCount() {
            return it.workerCount;
          }, set workerCount(C) {
            it.workerCount = C;
          }, get maxParallelImageRequests() {
            return e.config.MAX_PARALLEL_IMAGE_REQUESTS;
          }, set maxParallelImageRequests(C) {
            e.config.MAX_PARALLEL_IMAGE_REQUESTS = C;
          }, clearStorage: function(C) {
            e.clearTileCache(C);
          }, workerUrl: "" };
          return ce;
        }), k;
      });
    }, {}], 240: [function(v, Q, $) {
      Q.exports = Math.log2 || function(m) {
        return Math.log(m) * Math.LOG2E;
      };
    }, {}], 241: [function(v, Q, $) {
      Q.exports = function(g, k) {
        k || (k = g, g = window);
        var x = 0, e = 0, r = 0, n = { shift: !1, alt: !1, control: !1, meta: !1 }, s = !1;
        function t(y) {
          var f = !1;
          return "altKey" in y && (f = f || y.altKey !== n.alt, n.alt = !!y.altKey), "shiftKey" in y && (f = f || y.shiftKey !== n.shift, n.shift = !!y.shiftKey), "ctrlKey" in y && (f = f || y.ctrlKey !== n.control, n.control = !!y.ctrlKey), "metaKey" in y && (f = f || y.metaKey !== n.meta, n.meta = !!y.metaKey), f;
        }
        function d(y, f) {
          var _ = m.x(f), b = m.y(f);
          "buttons" in f && (y = 0 | f.buttons), (y !== x || _ !== e || b !== r || t(f)) && (x = 0 | y, e = _ || 0, r = b || 0, k && k(x, e, r, n));
        }
        function u(y) {
          d(0, y);
        }
        function o() {
          (x || e || r || n.shift || n.alt || n.meta || n.control) && (e = r = 0, x = 0, n.shift = n.alt = n.control = n.meta = !1, k && k(0, 0, 0, n));
        }
        function h(y) {
          t(y) && k && k(x, e, r, n);
        }
        function l(y) {
          m.buttons(y) === 0 ? d(0, y) : d(x, y);
        }
        function i(y) {
          d(x | m.buttons(y), y);
        }
        function p(y) {
          d(x & ~m.buttons(y), y);
        }
        function c() {
          s || (s = !0, g.addEventListener("mousemove", l), g.addEventListener("mousedown", i), g.addEventListener("mouseup", p), g.addEventListener("mouseleave", u), g.addEventListener("mouseenter", u), g.addEventListener("mouseout", u), g.addEventListener("mouseover", u), g.addEventListener("blur", o), g.addEventListener("keyup", h), g.addEventListener("keydown", h), g.addEventListener("keypress", h), g !== window && (window.addEventListener("blur", o), window.addEventListener("keyup", h), window.addEventListener("keydown", h), window.addEventListener("keypress", h)));
        }
        c();
        var a = { element: g };
        return Object.defineProperties(a, { enabled: { get: function() {
          return s;
        }, set: function(y) {
          y ? c() : function() {
            !s || (s = !1, g.removeEventListener("mousemove", l), g.removeEventListener("mousedown", i), g.removeEventListener("mouseup", p), g.removeEventListener("mouseleave", u), g.removeEventListener("mouseenter", u), g.removeEventListener("mouseout", u), g.removeEventListener("mouseover", u), g.removeEventListener("blur", o), g.removeEventListener("keyup", h), g.removeEventListener("keydown", h), g.removeEventListener("keypress", h), g !== window && (window.removeEventListener("blur", o), window.removeEventListener("keyup", h), window.removeEventListener("keydown", h), window.removeEventListener("keypress", h)));
          }();
        }, enumerable: !0 }, buttons: { get: function() {
          return x;
        }, enumerable: !0 }, x: { get: function() {
          return e;
        }, enumerable: !0 }, y: { get: function() {
          return r;
        }, enumerable: !0 }, mods: { get: function() {
          return n;
        }, enumerable: !0 } }), a;
      };
      var m = v("mouse-event");
    }, { "mouse-event": 243 }], 242: [function(v, Q, $) {
      var m = { left: 0, top: 0 };
      Q.exports = function(g, k, x) {
        k = k || g.currentTarget || g.srcElement, Array.isArray(x) || (x = [0, 0]);
        var e = g.clientX || 0, r = g.clientY || 0, n = (s = k, s === window || s === document || s === document.body ? m : s.getBoundingClientRect()), s;
        return x[0] = e - n.left, x[1] = r - n.top, x;
      };
    }, {}], 243: [function(v, Q, $) {
      function m(g) {
        return g.target || g.srcElement || window;
      }
      $.buttons = function(g) {
        if (typeof g == "object") {
          if ("buttons" in g)
            return g.buttons;
          if ("which" in g) {
            if ((k = g.which) === 2)
              return 4;
            if (k === 3)
              return 2;
            if (k > 0)
              return 1 << k - 1;
          } else if ("button" in g) {
            var k;
            if ((k = g.button) === 1)
              return 4;
            if (k === 2)
              return 2;
            if (k >= 0)
              return 1 << k;
          }
        }
        return 0;
      }, $.element = m, $.x = function(g) {
        if (typeof g == "object") {
          if ("offsetX" in g)
            return g.offsetX;
          var k = m(g).getBoundingClientRect();
          return g.clientX - k.left;
        }
        return 0;
      }, $.y = function(g) {
        if (typeof g == "object") {
          if ("offsetY" in g)
            return g.offsetY;
          var k = m(g).getBoundingClientRect();
          return g.clientY - k.top;
        }
        return 0;
      };
    }, {}], 244: [function(v, Q, $) {
      var m = v("to-px");
      Q.exports = function(g, k, x) {
        typeof g == "function" && (x = !!k, k = g, g = window);
        var e = m("ex", g), r = function(n) {
          x && n.preventDefault();
          var s = n.deltaX || 0, t = n.deltaY || 0, d = n.deltaZ || 0, u = 1;
          switch (n.deltaMode) {
            case 1:
              u = e;
              break;
            case 2:
              u = window.innerHeight;
          }
          if (t *= u, d *= u, (s *= u) || t || d)
            return k(s, t, d, n);
        };
        return g.addEventListener("wheel", r), r;
      };
    }, { "to-px": 315 }], 245: [function(v, Q, $) {
      (function(m, g) {
        (function() {
          /*! Native Promise Only
              v0.8.1 (c) Kyle Simpson
              MIT License: http://getify.mit-license.org
          */
          (function(k, x, e) {
            x[k] = x[k] || e(), Q !== void 0 && Q.exports && (Q.exports = x[k]);
          })("Promise", m !== void 0 ? m : this, function() {
            var k, x, e, r = Object.prototype.toString, n = g !== void 0 ? function(y) {
              return g(y);
            } : setTimeout;
            try {
              Object.defineProperty({}, "x", {}), k = function(y, f, _, b) {
                return Object.defineProperty(y, f, { value: _, writable: !0, configurable: b !== !1 });
              };
            } catch {
              k = function(f, _, b) {
                return f[_] = b, f;
              };
            }
            function s(y, f) {
              e.add(y, f), x || (x = n(e.drain));
            }
            function t(y) {
              var f, _ = typeof y;
              return y == null || _ != "object" && _ != "function" || (f = y.then), typeof f == "function" && f;
            }
            function d() {
              for (var y = 0; y < this.chain.length; y++)
                u(this, this.state === 1 ? this.chain[y].success : this.chain[y].failure, this.chain[y]);
              this.chain.length = 0;
            }
            function u(y, f, _) {
              var b, w;
              try {
                f === !1 ? _.reject(y.msg) : (b = f === !0 ? y.msg : f.call(void 0, y.msg)) === _.promise ? _.reject(TypeError("Promise-chain cycle")) : (w = t(b)) ? w.call(b, _.resolve, _.reject) : _.resolve(b);
              } catch (T) {
                _.reject(T);
              }
            }
            function o(y) {
              var f, _ = this;
              if (!_.triggered) {
                _.triggered = !0, _.def && (_ = _.def);
                try {
                  (f = t(y)) ? s(function() {
                    var b = new i(_);
                    try {
                      f.call(y, function() {
                        o.apply(b, arguments);
                      }, function() {
                        h.apply(b, arguments);
                      });
                    } catch (w) {
                      h.call(b, w);
                    }
                  }) : (_.msg = y, _.state = 1, _.chain.length > 0 && s(d, _));
                } catch (b) {
                  h.call(new i(_), b);
                }
              }
            }
            function h(y) {
              var f = this;
              f.triggered || (f.triggered = !0, f.def && (f = f.def), f.msg = y, f.state = 2, f.chain.length > 0 && s(d, f));
            }
            function l(y, f, _, b) {
              for (var w = 0; w < f.length; w++)
                (function(T) {
                  y.resolve(f[T]).then(function(L) {
                    _(T, L);
                  }, b);
                })(w);
            }
            function i(y) {
              this.def = y, this.triggered = !1;
            }
            function p(y) {
              this.promise = y, this.state = 0, this.triggered = !1, this.chain = [], this.msg = void 0;
            }
            function c(y) {
              if (typeof y != "function")
                throw TypeError("Not a function");
              if (this.__NPO__ !== 0)
                throw TypeError("Not a promise");
              this.__NPO__ = 1;
              var f = new p(this);
              this.then = function(_, b) {
                var w = { success: typeof _ != "function" || _, failure: typeof b == "function" && b };
                return w.promise = new this.constructor(function(T, L) {
                  if (typeof T != "function" || typeof L != "function")
                    throw TypeError("Not a function");
                  w.resolve = T, w.reject = L;
                }), f.chain.push(w), f.state !== 0 && s(d, f), w.promise;
              }, this.catch = function(_) {
                return this.then(void 0, _);
              };
              try {
                y.call(void 0, function(_) {
                  o.call(f, _);
                }, function(_) {
                  h.call(f, _);
                });
              } catch (_) {
                h.call(f, _);
              }
            }
            e = function() {
              var y, f, _;
              function b(w, T) {
                this.fn = w, this.self = T, this.next = void 0;
              }
              return { add: function(w, T) {
                _ = new b(w, T), f ? f.next = _ : y = _, f = _, _ = void 0;
              }, drain: function() {
                var w = y;
                for (y = f = x = void 0; w; )
                  w.fn.call(w.self), w = w.next;
              } };
            }();
            var a = k({}, "constructor", c, !1);
            return c.prototype = a, k(a, "__NPO__", 0, !1), k(c, "resolve", function(y) {
              return y && typeof y == "object" && y.__NPO__ === 1 ? y : new this(function(f, _) {
                if (typeof f != "function" || typeof _ != "function")
                  throw TypeError("Not a function");
                f(y);
              });
            }), k(c, "reject", function(y) {
              return new this(function(f, _) {
                if (typeof f != "function" || typeof _ != "function")
                  throw TypeError("Not a function");
                _(y);
              });
            }), k(c, "all", function(y) {
              var f = this;
              return r.call(y) != "[object Array]" ? f.reject(TypeError("Not an array")) : y.length === 0 ? f.resolve([]) : new f(function(_, b) {
                if (typeof _ != "function" || typeof b != "function")
                  throw TypeError("Not a function");
                var w = y.length, T = Array(w), L = 0;
                l(f, y, function(A, I) {
                  T[A] = I, ++L === w && _(T);
                }, b);
              });
            }), k(c, "race", function(y) {
              var f = this;
              return r.call(y) != "[object Array]" ? f.reject(TypeError("Not an array")) : new f(function(_, b) {
                if (typeof _ != "function" || typeof b != "function")
                  throw TypeError("Not a function");
                l(f, y, function(w, T) {
                  _(T);
                }, b);
              });
            }), c;
          });
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {}, v("timers").setImmediate);
    }, { timers: 312 }], 246: [function(v, Q, $) {
      var m = Math.PI, g = n(120);
      function k(s, t, d, u) {
        return ["C", s, t, d, u, d, u];
      }
      function x(s, t, d, u, o, h) {
        return ["C", s / 3 + 2 / 3 * d, t / 3 + 2 / 3 * u, o / 3 + 2 / 3 * d, h / 3 + 2 / 3 * u, o, h];
      }
      function e(s, t, d, u, o, h, l, i, p, c) {
        if (c)
          I = c[0], P = c[1], L = c[2], A = c[3];
        else {
          var a = r(s, t, -o);
          s = a.x, t = a.y;
          var y = (s - (i = (a = r(i, p, -o)).x)) / 2, f = (t - (p = a.y)) / 2, _ = y * y / (d * d) + f * f / (u * u);
          _ > 1 && (d *= _ = Math.sqrt(_), u *= _);
          var b = d * d, w = u * u, T = (h == l ? -1 : 1) * Math.sqrt(Math.abs((b * w - b * f * f - w * y * y) / (b * f * f + w * y * y)));
          T == 1 / 0 && (T = 1);
          var L = T * d * f / u + (s + i) / 2, A = T * -u * y / d + (t + p) / 2, I = Math.asin(((t - A) / u).toFixed(9)), P = Math.asin(((p - A) / u).toFixed(9));
          (I = s < L ? m - I : I) < 0 && (I = 2 * m + I), (P = i < L ? m - P : P) < 0 && (P = 2 * m + P), l && I > P && (I -= 2 * m), !l && P > I && (P -= 2 * m);
        }
        if (Math.abs(P - I) > g) {
          var S = P, E = i, R = p;
          P = I + g * (l && P > I ? 1 : -1);
          var z = e(i = L + d * Math.cos(P), p = A + u * Math.sin(P), d, u, o, 0, l, E, R, [P, S, L, A]);
        }
        var j = Math.tan((P - I) / 4), H = 4 / 3 * d * j, Y = 4 / 3 * u * j, J = [2 * s - (s + H * Math.sin(I)), 2 * t - (t - Y * Math.cos(I)), i + H * Math.sin(P), p - Y * Math.cos(P), i, p];
        if (c)
          return J;
        z && (J = J.concat(z));
        for (var W = 0; W < J.length; ) {
          var Z = r(J[W], J[W + 1], o);
          J[W++] = Z.x, J[W++] = Z.y;
        }
        return J;
      }
      function r(s, t, d) {
        return { x: s * Math.cos(d) - t * Math.sin(d), y: s * Math.sin(d) + t * Math.cos(d) };
      }
      function n(s) {
        return s * (m / 180);
      }
      Q.exports = function(s) {
        for (var t, d = [], u = 0, o = 0, h = 0, l = 0, i = null, p = null, c = 0, a = 0, y = 0, f = s.length; y < f; y++) {
          var _ = s[y], b = _[0];
          switch (b) {
            case "M":
              h = _[1], l = _[2];
              break;
            case "A":
              (_ = e(c, a, _[1], _[2], n(_[3]), _[4], _[5], _[6], _[7])).unshift("C"), _.length > 7 && (d.push(_.splice(0, 7)), _.unshift("C"));
              break;
            case "S":
              var w = c, T = a;
              t != "C" && t != "S" || (w += w - u, T += T - o), _ = ["C", w, T, _[1], _[2], _[3], _[4]];
              break;
            case "T":
              t == "Q" || t == "T" ? (i = 2 * c - i, p = 2 * a - p) : (i = c, p = a), _ = x(c, a, i, p, _[1], _[2]);
              break;
            case "Q":
              i = _[1], p = _[2], _ = x(c, a, _[1], _[2], _[3], _[4]);
              break;
            case "L":
              _ = k(c, a, _[1], _[2]);
              break;
            case "H":
              _ = k(c, a, _[1], a);
              break;
            case "V":
              _ = k(c, a, c, _[1]);
              break;
            case "Z":
              _ = k(c, a, h, l);
          }
          t = b, c = _[_.length - 2], a = _[_.length - 1], _.length > 4 ? (u = _[_.length - 4], o = _[_.length - 3]) : (u = c, o = a), d.push(_);
        }
        return d;
      };
    }, {}], 247: [function(v, Q, $) {
      var m = Object.getOwnPropertySymbols, g = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
      function x(e) {
        if (e == null)
          throw new TypeError("Object.assign cannot be called with null or undefined");
        return Object(e);
      }
      Q.exports = function() {
        try {
          if (!Object.assign)
            return !1;
          var e = new String("abc");
          if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5")
            return !1;
          for (var r = {}, n = 0; n < 10; n++)
            r["_" + String.fromCharCode(n)] = n;
          if (Object.getOwnPropertyNames(r).map(function(t) {
            return r[t];
          }).join("") !== "0123456789")
            return !1;
          var s = {};
          return "abcdefghijklmnopqrst".split("").forEach(function(t) {
            s[t] = t;
          }), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
        } catch {
          return !1;
        }
      }() ? Object.assign : function(e, r) {
        for (var n, s, t = x(e), d = 1; d < arguments.length; d++) {
          for (var u in n = Object(arguments[d]))
            g.call(n, u) && (t[u] = n[u]);
          if (m) {
            s = m(n);
            for (var o = 0; o < s.length; o++)
              k.call(n, s[o]) && (t[s[o]] = n[s[o]]);
          }
        }
        return t;
      };
    }, {}], 248: [function(v, Q, $) {
      function m(x, e) {
        if (typeof x != "string")
          return [x];
        var r = [x];
        typeof e == "string" || Array.isArray(e) ? e = { brackets: e } : e || (e = {});
        var n = e.brackets ? Array.isArray(e.brackets) ? e.brackets : [e.brackets] : ["{}", "[]", "()"], s = e.escape || "___", t = !!e.flat;
        n.forEach(function(u) {
          var o = new RegExp(["\\", u[0], "[^\\", u[0], "\\", u[1], "]*\\", u[1]].join("")), h = [];
          function l(i, p, c) {
            var a = r.push(i.slice(u[0].length, -u[1].length)) - 1;
            return h.push(a), s + a + s;
          }
          r.forEach(function(i, p) {
            for (var c, a = 0; i != c; )
              if (c = i, i = i.replace(o, l), a++ > 1e4)
                throw Error("References have circular dependency. Please, check them.");
            r[p] = i;
          }), h = h.reverse(), r = r.map(function(i) {
            return h.forEach(function(p) {
              i = i.replace(new RegExp("(\\" + s + p + "\\" + s + ")", "g"), u[0] + "$1" + u[1]);
            }), i;
          });
        });
        var d = new RegExp("\\" + s + "([0-9]+)\\" + s);
        return t ? r : function u(o, h, l) {
          for (var i, p = [], c = 0; i = d.exec(o); ) {
            if (c++ > 1e4)
              throw Error("Circular references in parenthesis");
            p.push(o.slice(0, i.index)), p.push(u(h[i[1]], h)), o = o.slice(i.index + i[0].length);
          }
          return p.push(o), p;
        }(r[0], r);
      }
      function g(x, e) {
        if (e && e.flat) {
          var r, n = e && e.escape || "___", s = x[0];
          if (!s)
            return "";
          for (var t = new RegExp("\\" + n + "([0-9]+)\\" + n), d = 0; s != r; ) {
            if (d++ > 1e4)
              throw Error("Circular references in " + x);
            r = s, s = s.replace(t, u);
          }
          return s;
        }
        return x.reduce(function o(h, l) {
          return Array.isArray(l) && (l = l.reduce(o, "")), h + l;
        }, "");
        function u(o, h) {
          if (x[h] == null)
            throw Error("Reference " + h + "is undefined");
          return x[h];
        }
      }
      function k(x, e) {
        return Array.isArray(x) ? g(x, e) : m(x, e);
      }
      k.parse = m, k.stringify = g, Q.exports = k;
    }, {}], 249: [function(v, Q, $) {
      var m = v("pick-by-alias");
      Q.exports = function(g) {
        var k;
        return arguments.length > 1 && (g = arguments), typeof g == "string" ? g = g.split(/\s/).map(parseFloat) : typeof g == "number" && (g = [g]), g.length && typeof g[0] == "number" ? k = g.length === 1 ? { width: g[0], height: g[0], x: 0, y: 0 } : g.length === 2 ? { width: g[0], height: g[1], x: 0, y: 0 } : { x: g[0], y: g[1], width: g[2] - g[0] || 0, height: g[3] - g[1] || 0 } : g && (g = m(g, { left: "x l left Left", top: "y t top Top", width: "w width W Width", height: "h height W Width", bottom: "b bottom Bottom", right: "r right Right" }), k = { x: g.left || 0, y: g.top || 0 }, g.width == null ? g.right ? k.width = g.right - k.x : k.width = 0 : k.width = g.width, g.height == null ? g.bottom ? k.height = g.bottom - k.y : k.height = 0 : k.height = g.height), k;
      };
    }, { "pick-by-alias": 253 }], 250: [function(v, Q, $) {
      Q.exports = function(x) {
        var e = [];
        return x.replace(g, function(r, n, s) {
          var t = n.toLowerCase();
          for (s = function(d) {
            var u = d.match(k);
            return u ? u.map(Number) : [];
          }(s), t == "m" && s.length > 2 && (e.push([n].concat(s.splice(0, 2))), t = "l", n = n == "m" ? "l" : "L"); ; ) {
            if (s.length == m[t])
              return s.unshift(n), e.push(s);
            if (s.length < m[t])
              throw new Error("malformed path data");
            e.push([n].concat(s.splice(0, m[t])));
          }
        }), e;
      };
      var m = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, g = /([astvzqmhlc])([^astvzqmhlc]*)/gi, k = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;
    }, {}], 251: [function(v, Q, $) {
      Q.exports = function(m, g) {
        g || (g = [0, ""]), m = String(m);
        var k = parseFloat(m, 10);
        return g[0] = k, g[1] = m.match(/[\d.\-\+]*\s*(.*)/)[1] || "", g;
      };
    }, {}], 252: [function(v, Q, $) {
      (function(m) {
        (function() {
          (function() {
            var g, k, x, e, r, n;
            typeof performance < "u" && performance !== null && performance.now ? Q.exports = function() {
              return performance.now();
            } : m != null && m.hrtime ? (Q.exports = function() {
              return (g() - r) / 1e6;
            }, k = m.hrtime, e = (g = function() {
              var s;
              return 1e9 * (s = k())[0] + s[1];
            })(), n = 1e9 * m.uptime(), r = e - n) : Date.now ? (Q.exports = function() {
              return Date.now() - x;
            }, x = Date.now()) : (Q.exports = function() {
              return new Date().getTime() - x;
            }, x = new Date().getTime());
          }).call(this);
        }).call(this);
      }).call(this, v("_process"));
    }, { _process: 278 }], 253: [function(v, Q, $) {
      Q.exports = function(k, x, e) {
        var r, n, s = {};
        if (typeof x == "string" && (x = g(x)), Array.isArray(x)) {
          var t = {};
          for (n = 0; n < x.length; n++)
            t[x[n]] = !0;
          x = t;
        }
        for (r in x)
          x[r] = g(x[r]);
        var d = {};
        for (r in x) {
          var u = x[r];
          if (Array.isArray(u))
            for (n = 0; n < u.length; n++) {
              var o = u[n];
              if (e && (d[o] = !0), o in k) {
                if (s[r] = k[o], e)
                  for (var h = n; h < u.length; h++)
                    d[u[h]] = !0;
                break;
              }
            }
          else
            r in k && (x[r] && (s[r] = k[r]), e && (d[r] = !0));
        }
        if (e)
          for (r in k)
            d[r] || (s[r] = k[r]);
        return s;
      };
      var m = {};
      function g(k) {
        return m[k] ? m[k] : (typeof k == "string" && (k = m[k] = k.split(/\s*,\s*|\s+/)), k);
      }
    }, {}], 254: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e = m[0], r = m[1], n = !1;
        k === void 0 && (k = 0), x === void 0 && (x = g.length);
        for (var s = x - k, t = 0, d = s - 1; t < s; d = t++) {
          var u = g[t + k][0], o = g[t + k][1], h = g[d + k][0], l = g[d + k][1];
          o > r != l > r && e < (h - u) * (r - o) / (l - o) + u && (n = !n);
        }
        return n;
      };
    }, {}], 255: [function(v, Q, $) {
      /*
       * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
       * @license MIT
       * @preserve Project Home: https://github.com/voidqk/polybooljs
       */
      var m, g = v("./lib/build-log"), k = v("./lib/epsilon"), x = v("./lib/intersecter"), e = v("./lib/segment-chainer"), r = v("./lib/segment-selector"), n = v("./lib/geojson"), s = !1, t = k();
      function d(u, o, h) {
        var l = m.segments(u), i = m.segments(o), p = h(m.combine(l, i));
        return m.polygon(p);
      }
      m = { buildLog: function(u) {
        return u === !0 ? s = g() : u === !1 && (s = !1), s !== !1 && s.list;
      }, epsilon: function(u) {
        return t.epsilon(u);
      }, segments: function(u) {
        var o = x(!0, t, s);
        return u.regions.forEach(o.addRegion), { segments: o.calculate(u.inverted), inverted: u.inverted };
      }, combine: function(u, o) {
        return { combined: x(!1, t, s).calculate(u.segments, u.inverted, o.segments, o.inverted), inverted1: u.inverted, inverted2: o.inverted };
      }, selectUnion: function(u) {
        return { segments: r.union(u.combined, s), inverted: u.inverted1 || u.inverted2 };
      }, selectIntersect: function(u) {
        return { segments: r.intersect(u.combined, s), inverted: u.inverted1 && u.inverted2 };
      }, selectDifference: function(u) {
        return { segments: r.difference(u.combined, s), inverted: u.inverted1 && !u.inverted2 };
      }, selectDifferenceRev: function(u) {
        return { segments: r.differenceRev(u.combined, s), inverted: !u.inverted1 && u.inverted2 };
      }, selectXor: function(u) {
        return { segments: r.xor(u.combined, s), inverted: u.inverted1 !== u.inverted2 };
      }, polygon: function(u) {
        return { regions: e(u.segments, t, s), inverted: u.inverted };
      }, polygonFromGeoJSON: function(u) {
        return n.toPolygon(m, u);
      }, polygonToGeoJSON: function(u) {
        return n.fromPolygon(m, t, u);
      }, union: function(u, o) {
        return d(u, o, m.selectUnion);
      }, intersect: function(u, o) {
        return d(u, o, m.selectIntersect);
      }, difference: function(u, o) {
        return d(u, o, m.selectDifference);
      }, differenceRev: function(u, o) {
        return d(u, o, m.selectDifferenceRev);
      }, xor: function(u, o) {
        return d(u, o, m.selectXor);
      } }, typeof window == "object" && (window.PolyBool = m), Q.exports = m;
    }, { "./lib/build-log": 256, "./lib/epsilon": 257, "./lib/geojson": 258, "./lib/intersecter": 259, "./lib/segment-chainer": 261, "./lib/segment-selector": 262 }], 256: [function(v, Q, $) {
      Q.exports = function() {
        var m, g = 0, k = !1;
        function x(e, r) {
          return m.list.push({ type: e, data: r ? JSON.parse(JSON.stringify(r)) : void 0 }), m;
        }
        return m = { list: [], segmentId: function() {
          return g++;
        }, checkIntersection: function(e, r) {
          return x("check", { seg1: e, seg2: r });
        }, segmentChop: function(e, r) {
          return x("div_seg", { seg: e, pt: r }), x("chop", { seg: e, pt: r });
        }, statusRemove: function(e) {
          return x("pop_seg", { seg: e });
        }, segmentUpdate: function(e) {
          return x("seg_update", { seg: e });
        }, segmentNew: function(e, r) {
          return x("new_seg", { seg: e, primary: r });
        }, segmentRemove: function(e) {
          return x("rem_seg", { seg: e });
        }, tempStatus: function(e, r, n) {
          return x("temp_status", { seg: e, above: r, below: n });
        }, rewind: function(e) {
          return x("rewind", { seg: e });
        }, status: function(e, r, n) {
          return x("status", { seg: e, above: r, below: n });
        }, vert: function(e) {
          return e === k ? m : (k = e, x("vert", { x: e }));
        }, log: function(e) {
          return typeof e != "string" && (e = JSON.stringify(e, !1, "  ")), x("log", { txt: e });
        }, reset: function() {
          return x("reset");
        }, selected: function(e) {
          return x("selected", { segs: e });
        }, chainStart: function(e) {
          return x("chain_start", { seg: e });
        }, chainRemoveHead: function(e, r) {
          return x("chain_rem_head", { index: e, pt: r });
        }, chainRemoveTail: function(e, r) {
          return x("chain_rem_tail", { index: e, pt: r });
        }, chainNew: function(e, r) {
          return x("chain_new", { pt1: e, pt2: r });
        }, chainMatch: function(e) {
          return x("chain_match", { index: e });
        }, chainClose: function(e) {
          return x("chain_close", { index: e });
        }, chainAddHead: function(e, r) {
          return x("chain_add_head", { index: e, pt: r });
        }, chainAddTail: function(e, r) {
          return x("chain_add_tail", { index: e, pt: r });
        }, chainConnect: function(e, r) {
          return x("chain_con", { index1: e, index2: r });
        }, chainReverse: function(e) {
          return x("chain_rev", { index: e });
        }, chainJoin: function(e, r) {
          return x("chain_join", { index1: e, index2: r });
        }, done: function() {
          return x("done");
        } };
      };
    }, {}], 257: [function(v, Q, $) {
      Q.exports = function(m) {
        typeof m != "number" && (m = 1e-10);
        var g = { epsilon: function(k) {
          return typeof k == "number" && (m = k), m;
        }, pointAboveOrOnLine: function(k, x, e) {
          var r = x[0], n = x[1], s = e[0], t = e[1], d = k[0];
          return (s - r) * (k[1] - n) - (t - n) * (d - r) >= -m;
        }, pointBetween: function(k, x, e) {
          var r = k[1] - x[1], n = e[0] - x[0], s = k[0] - x[0], t = e[1] - x[1], d = s * n + r * t;
          return !(d < m) && !(d - (n * n + t * t) > -m);
        }, pointsSameX: function(k, x) {
          return Math.abs(k[0] - x[0]) < m;
        }, pointsSameY: function(k, x) {
          return Math.abs(k[1] - x[1]) < m;
        }, pointsSame: function(k, x) {
          return g.pointsSameX(k, x) && g.pointsSameY(k, x);
        }, pointsCompare: function(k, x) {
          return g.pointsSameX(k, x) ? g.pointsSameY(k, x) ? 0 : k[1] < x[1] ? -1 : 1 : k[0] < x[0] ? -1 : 1;
        }, pointsCollinear: function(k, x, e) {
          var r = k[0] - x[0], n = k[1] - x[1], s = x[0] - e[0], t = x[1] - e[1];
          return Math.abs(r * t - s * n) < m;
        }, linesIntersect: function(k, x, e, r) {
          var n = x[0] - k[0], s = x[1] - k[1], t = r[0] - e[0], d = r[1] - e[1], u = n * d - s * t;
          if (Math.abs(u) < m)
            return !1;
          var o = k[0] - e[0], h = k[1] - e[1], l = (t * h - d * o) / u, i = (n * h - s * o) / u, p = { alongA: 0, alongB: 0, pt: [k[0] + l * n, k[1] + l * s] };
          return p.alongA = l <= -m ? -2 : l < m ? -1 : l - 1 <= -m ? 0 : l - 1 < m ? 1 : 2, p.alongB = i <= -m ? -2 : i < m ? -1 : i - 1 <= -m ? 0 : i - 1 < m ? 1 : 2, p;
        }, pointInsideRegion: function(k, x) {
          for (var e = k[0], r = k[1], n = x[x.length - 1][0], s = x[x.length - 1][1], t = !1, d = 0; d < x.length; d++) {
            var u = x[d][0], o = x[d][1];
            o - r > m != s - r > m && (n - u) * (r - o) / (s - o) + u - e > m && (t = !t), n = u, s = o;
          }
          return t;
        } };
        return g;
      };
    }, {}], 258: [function(v, Q, $) {
      var m = { toPolygon: function(g, k) {
        function x(n) {
          if (n.length <= 0)
            return g.segments({ inverted: !1, regions: [] });
          function s(u) {
            var o = u.slice(0, u.length - 1);
            return g.segments({ inverted: !1, regions: [o] });
          }
          for (var t = s(n[0]), d = 1; d < n.length; d++)
            t = g.selectDifference(g.combine(t, s(n[d])));
          return t;
        }
        if (k.type === "Polygon")
          return g.polygon(x(k.coordinates));
        if (k.type === "MultiPolygon") {
          for (var e = g.segments({ inverted: !1, regions: [] }), r = 0; r < k.coordinates.length; r++)
            e = g.selectUnion(g.combine(e, x(k.coordinates[r])));
          return g.polygon(e);
        }
        throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon");
      }, fromPolygon: function(g, k, x) {
        function e(i, p) {
          return k.pointInsideRegion([0.5 * (i[0][0] + i[1][0]), 0.5 * (i[0][1] + i[1][1])], p);
        }
        function r(i) {
          return { region: i, children: [] };
        }
        x = g.polygon(g.segments(x));
        var n = r(null);
        function s(i, p) {
          for (var c = 0; c < i.children.length; c++)
            if (e(p, (y = i.children[c]).region))
              return void s(y, p);
          var a = r(p);
          for (c = 0; c < i.children.length; c++) {
            var y;
            e((y = i.children[c]).region, p) && (a.children.push(y), i.children.splice(c, 1), c--);
          }
          i.children.push(a);
        }
        for (var t = 0; t < x.regions.length; t++) {
          var d = x.regions[t];
          d.length < 3 || s(n, d);
        }
        function u(i, p) {
          for (var c = 0, a = i[i.length - 1][0], y = i[i.length - 1][1], f = [], _ = 0; _ < i.length; _++) {
            var b = i[_][0], w = i[_][1];
            f.push([b, w]), c += w * a - b * y, a = b, y = w;
          }
          return c < 0 !== p && f.reverse(), f.push([f[0][0], f[0][1]]), f;
        }
        var o = [];
        function h(i) {
          var p = [u(i.region, !1)];
          o.push(p);
          for (var c = 0; c < i.children.length; c++)
            p.push(l(i.children[c]));
        }
        function l(i) {
          for (var p = 0; p < i.children.length; p++)
            h(i.children[p]);
          return u(i.region, !0);
        }
        for (t = 0; t < n.children.length; t++)
          h(n.children[t]);
        return o.length <= 0 ? { type: "Polygon", coordinates: [] } : o.length == 1 ? { type: "Polygon", coordinates: o[0] } : { type: "MultiPolygon", coordinates: o };
      } };
      Q.exports = m;
    }, {}], 259: [function(v, Q, $) {
      var m = v("./linked-list");
      Q.exports = function(g, k, x) {
        function e(u, o, h) {
          return { id: x ? x.segmentId() : -1, start: u, end: o, myFill: { above: h.myFill.above, below: h.myFill.below }, otherFill: null };
        }
        var r = m.create();
        function n(u, o) {
          r.insertBefore(u, function(h) {
            return function(l, i, p, c, a, y) {
              var f = k.pointsCompare(i, a);
              return f !== 0 ? f : k.pointsSame(p, y) ? 0 : l !== c ? l ? 1 : -1 : k.pointAboveOrOnLine(p, c ? a : y, c ? y : a) ? 1 : -1;
            }(u.isStart, u.pt, o, h.isStart, h.pt, h.other.pt) < 0;
          });
        }
        function s(u, o) {
          var h = function(l, i) {
            var p = m.node({ isStart: !0, pt: l.start, seg: l, primary: i, other: null, status: null });
            return n(p, l.end), p;
          }(u, o);
          return function(l, i, p) {
            var c = m.node({ isStart: !1, pt: i.end, seg: i, primary: p, other: l, status: null });
            l.other = c, n(c, l.pt);
          }(h, u, o), h;
        }
        function t(u, o) {
          var h = e(o, u.seg.end, u.seg);
          return function(l, i) {
            x && x.segmentChop(l.seg, i), l.other.remove(), l.seg.end = i, l.other.pt = i, n(l.other, l.pt);
          }(u, o), s(h, u.primary);
        }
        function d(u, o) {
          var h = m.create();
          function l(A) {
            return h.findTransition(function(I) {
              var P, S, E, R, z, j;
              return P = A, S = I.ev, E = P.seg.start, R = P.seg.end, z = S.seg.start, j = S.seg.end, (k.pointsCollinear(E, z, j) ? k.pointsCollinear(R, z, j) || k.pointAboveOrOnLine(R, z, j) ? 1 : -1 : k.pointAboveOrOnLine(E, z, j) ? 1 : -1) > 0;
            });
          }
          function i(A, I) {
            var P = A.seg, S = I.seg, E = P.start, R = P.end, z = S.start, j = S.end;
            x && x.checkIntersection(P, S);
            var H = k.linesIntersect(E, R, z, j);
            if (H === !1) {
              if (!k.pointsCollinear(E, R, z) || k.pointsSame(E, j) || k.pointsSame(R, z))
                return !1;
              var Y = k.pointsSame(E, z), J = k.pointsSame(R, j);
              if (Y && J)
                return I;
              var W = !Y && k.pointBetween(E, z, j), Z = !J && k.pointBetween(R, z, j);
              if (Y)
                return Z ? t(I, R) : t(A, j), I;
              W && (J || (Z ? t(I, R) : t(A, j)), t(I, E));
            } else
              H.alongA === 0 && (H.alongB === -1 ? t(A, z) : H.alongB === 0 ? t(A, H.pt) : H.alongB === 1 && t(A, j)), H.alongB === 0 && (H.alongA === -1 ? t(I, E) : H.alongA === 0 ? t(I, H.pt) : H.alongA === 1 && t(I, R));
            return !1;
          }
          for (var p = []; !r.isEmpty(); ) {
            var c = r.getHead();
            if (x && x.vert(c.pt[0]), c.isStart) {
              let A = function() {
                if (y) {
                  var I = i(c, y);
                  if (I)
                    return I;
                }
                return !!f && i(c, f);
              };
              x && x.segmentNew(c.seg, c.primary);
              var a = l(c), y = a.before ? a.before.ev : null, f = a.after ? a.after.ev : null;
              x && x.tempStatus(c.seg, !!y && y.seg, !!f && f.seg);
              var _, b = A();
              if (b) {
                var w;
                g ? (w = c.seg.myFill.below === null || c.seg.myFill.above !== c.seg.myFill.below) && (b.seg.myFill.above = !b.seg.myFill.above) : b.seg.otherFill = c.seg.myFill, x && x.segmentUpdate(b.seg), c.other.remove(), c.remove();
              }
              if (r.getHead() !== c) {
                x && x.rewind(c.seg);
                continue;
              }
              g ? (w = c.seg.myFill.below === null || c.seg.myFill.above !== c.seg.myFill.below, c.seg.myFill.below = f ? f.seg.myFill.above : u, c.seg.myFill.above = w ? !c.seg.myFill.below : c.seg.myFill.below) : c.seg.otherFill === null && (_ = f ? c.primary === f.primary ? f.seg.otherFill.above : f.seg.myFill.above : c.primary ? o : u, c.seg.otherFill = { above: _, below: _ }), x && x.status(c.seg, !!y && y.seg, !!f && f.seg), c.other.status = a.insert(m.node({ ev: c }));
            } else {
              var T = c.status;
              if (T === null)
                throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");
              if (h.exists(T.prev) && h.exists(T.next) && i(T.prev.ev, T.next.ev), x && x.statusRemove(T.ev.seg), T.remove(), !c.primary) {
                var L = c.seg.myFill;
                c.seg.myFill = c.seg.otherFill, c.seg.otherFill = L;
              }
              p.push(c.seg);
            }
            r.getHead().remove();
          }
          return x && x.done(), p;
        }
        return g ? { addRegion: function(u) {
          for (var o, h, l, i = u[u.length - 1], p = 0; p < u.length; p++) {
            o = i, i = u[p];
            var c = k.pointsCompare(o, i);
            c !== 0 && s((h = c < 0 ? o : i, l = c < 0 ? i : o, { id: x ? x.segmentId() : -1, start: h, end: l, myFill: { above: null, below: null }, otherFill: null }), !0);
          }
        }, calculate: function(u) {
          return d(u, !1);
        } } : { calculate: function(u, o, h, l) {
          return u.forEach(function(i) {
            s(e(i.start, i.end, i), !0);
          }), h.forEach(function(i) {
            s(e(i.start, i.end, i), !1);
          }), d(o, l);
        } };
      };
    }, { "./linked-list": 260 }], 260: [function(v, Q, $) {
      Q.exports = { create: function() {
        var m = { root: { root: !0, next: null }, exists: function(g) {
          return g !== null && g !== m.root;
        }, isEmpty: function() {
          return m.root.next === null;
        }, getHead: function() {
          return m.root.next;
        }, insertBefore: function(g, k) {
          for (var x = m.root, e = m.root.next; e !== null; ) {
            if (k(e))
              return g.prev = e.prev, g.next = e, e.prev.next = g, void (e.prev = g);
            x = e, e = e.next;
          }
          x.next = g, g.prev = x, g.next = null;
        }, findTransition: function(g) {
          for (var k = m.root, x = m.root.next; x !== null && !g(x); )
            k = x, x = x.next;
          return { before: k === m.root ? null : k, after: x, insert: function(e) {
            return e.prev = k, e.next = x, k.next = e, x !== null && (x.prev = e), e;
          } };
        } };
        return m;
      }, node: function(m) {
        return m.prev = null, m.next = null, m.remove = function() {
          m.prev.next = m.next, m.next && (m.next.prev = m.prev), m.prev = null, m.next = null;
        }, m;
      } };
    }, {}], 261: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        var x = [], e = [];
        return m.forEach(function(r) {
          var n = r.start, s = r.end;
          if (g.pointsSame(n, s))
            console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");
          else {
            k && k.chainStart(r);
            for (var t = { index: 0, matches_head: !1, matches_pt1: !1 }, d = { index: 0, matches_head: !1, matches_pt1: !1 }, u = t, o = 0; o < x.length; o++) {
              var h = (a = x[o])[0], l = (a[1], a[a.length - 1]);
              if (a[a.length - 2], g.pointsSame(h, n)) {
                if (A(o, !0, !0))
                  break;
              } else if (g.pointsSame(h, s)) {
                if (A(o, !0, !1))
                  break;
              } else if (g.pointsSame(l, n)) {
                if (A(o, !1, !0))
                  break;
              } else if (g.pointsSame(l, s) && A(o, !1, !1))
                break;
            }
            if (u === t)
              return x.push([n, s]), void (k && k.chainNew(n, s));
            if (u === d) {
              k && k.chainMatch(t.index);
              var i = t.index, p = t.matches_pt1 ? s : n, c = t.matches_head, a = x[i], y = c ? a[0] : a[a.length - 1], f = c ? a[1] : a[a.length - 2], _ = c ? a[a.length - 1] : a[0], b = c ? a[a.length - 2] : a[1];
              return g.pointsCollinear(f, y, p) && (c ? (k && k.chainRemoveHead(t.index, p), a.shift()) : (k && k.chainRemoveTail(t.index, p), a.pop()), y = f), g.pointsSame(_, p) ? (x.splice(i, 1), g.pointsCollinear(b, _, y) && (c ? (k && k.chainRemoveTail(t.index, y), a.pop()) : (k && k.chainRemoveHead(t.index, y), a.shift())), k && k.chainClose(t.index), void e.push(a)) : void (c ? (k && k.chainAddHead(t.index, p), a.unshift(p)) : (k && k.chainAddTail(t.index, p), a.push(p)));
            }
            var w = t.index, T = d.index;
            k && k.chainConnect(w, T);
            var L = x[w].length < x[T].length;
            t.matches_head ? d.matches_head ? L ? (I(w), P(w, T)) : (I(T), P(T, w)) : P(T, w) : d.matches_head ? P(w, T) : L ? (I(w), P(T, w)) : (I(T), P(w, T));
          }
          function A(S, E, R) {
            return u.index = S, u.matches_head = E, u.matches_pt1 = R, u === t ? (u = d, !1) : (u = null, !0);
          }
          function I(S) {
            k && k.chainReverse(S), x[S].reverse();
          }
          function P(S, E) {
            var R = x[S], z = x[E], j = R[R.length - 1], H = R[R.length - 2], Y = z[0], J = z[1];
            g.pointsCollinear(H, j, Y) && (k && k.chainRemoveTail(S, j), R.pop(), j = H), g.pointsCollinear(j, Y, J) && (k && k.chainRemoveHead(E, Y), z.shift()), k && k.chainJoin(S, E), x[S] = R.concat(z), x.splice(E, 1);
          }
        }), e;
      };
    }, {}], 262: [function(v, Q, $) {
      function m(k, x, e) {
        var r = [];
        return k.forEach(function(n) {
          var s = (n.myFill.above ? 8 : 0) + (n.myFill.below ? 4 : 0) + (n.otherFill && n.otherFill.above ? 2 : 0) + (n.otherFill && n.otherFill.below ? 1 : 0);
          x[s] !== 0 && r.push({ id: e ? e.segmentId() : -1, start: n.start, end: n.end, myFill: { above: x[s] === 1, below: x[s] === 2 }, otherFill: null });
        }), e && e.selected(r), r;
      }
      var g = { union: function(k, x) {
        return m(k, [0, 2, 1, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], x);
      }, intersect: function(k, x) {
        return m(k, [0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 0], x);
      }, difference: function(k, x) {
        return m(k, [0, 0, 0, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 1, 2, 0], x);
      }, differenceRev: function(k, x) {
        return m(k, [0, 2, 1, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 0, 0], x);
      }, xor: function(k, x) {
        return m(k, [0, 2, 1, 0, 2, 0, 0, 1, 1, 0, 0, 2, 0, 1, 2, 0], x);
      } };
      Q.exports = g;
    }, {}], 263: [function(v, Q, $) {
      var m = v("stream").Transform, g = v("stream-parser");
      function k() {
        m.call(this, { readableObjectMode: !0 });
      }
      function x(e, r, n) {
        Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "", this.name = this.constructor.name, this.message = e, r && (this.code = r), n && (this.statusCode = n);
      }
      k.prototype = Object.create(m.prototype), k.prototype.constructor = k, g(k.prototype), $.ParserStream = k, $.sliceEq = function(e, r, n) {
        for (var s = r, t = 0; t < n.length; )
          if (e[s++] !== n[t++])
            return !1;
        return !0;
      }, $.str2arr = function(e, r) {
        var n = [], s = 0;
        if (r && r === "hex")
          for (; s < e.length; )
            n.push(parseInt(e.slice(s, s + 2), 16)), s += 2;
        else
          for (; s < e.length; s++)
            n.push(255 & e.charCodeAt(s));
        return n;
      }, $.readUInt16LE = function(e, r) {
        return e[r] | e[r + 1] << 8;
      }, $.readUInt16BE = function(e, r) {
        return e[r + 1] | e[r] << 8;
      }, $.readUInt32LE = function(e, r) {
        return e[r] | e[r + 1] << 8 | e[r + 2] << 16 | 16777216 * e[r + 3];
      }, $.readUInt32BE = function(e, r) {
        return e[r + 3] | e[r + 2] << 8 | e[r + 1] << 16 | 16777216 * e[r];
      }, x.prototype = Object.create(Error.prototype), x.prototype.constructor = x, $.ProbeError = x;
    }, { stream: 286, "stream-parser": 302 }], 264: [function(v, Q, $) {
      function m(x, e) {
        var r = new Error(x);
        return r.code = e, r;
      }
      function g(x) {
        try {
          return decodeURIComponent(escape(x));
        } catch {
          return x;
        }
      }
      function k(x, e, r) {
        this.input = x.subarray(e, r), this.start = e;
        var n = String.fromCharCode.apply(null, this.input.subarray(0, 4));
        if (n !== "II*\0" && n !== "MM\0*")
          throw m("invalid TIFF signature", "EBADDATA");
        this.big_endian = n[0] === "M";
      }
      k.prototype.each = function(x) {
        this.aborted = !1;
        var e = this.read_uint32(4);
        for (this.ifds_to_read = [{ id: 0, offset: e }]; this.ifds_to_read.length > 0 && !this.aborted; ) {
          var r = this.ifds_to_read.shift();
          r.offset && this.scan_ifd(r.id, r.offset, x);
        }
      }, k.prototype.read_uint16 = function(x) {
        var e = this.input;
        if (x + 2 > e.length)
          throw m("unexpected EOF", "EBADDATA");
        return this.big_endian ? 256 * e[x] + e[x + 1] : e[x] + 256 * e[x + 1];
      }, k.prototype.read_uint32 = function(x) {
        var e = this.input;
        if (x + 4 > e.length)
          throw m("unexpected EOF", "EBADDATA");
        return this.big_endian ? 16777216 * e[x] + 65536 * e[x + 1] + 256 * e[x + 2] + e[x + 3] : e[x] + 256 * e[x + 1] + 65536 * e[x + 2] + 16777216 * e[x + 3];
      }, k.prototype.is_subifd_link = function(x, e) {
        return x === 0 && e === 34665 || x === 0 && e === 34853 || x === 34665 && e === 40965;
      }, k.prototype.exif_format_length = function(x) {
        switch (x) {
          case 1:
          case 2:
          case 6:
          case 7:
            return 1;
          case 3:
          case 8:
            return 2;
          case 4:
          case 9:
          case 11:
            return 4;
          case 5:
          case 10:
          case 12:
            return 8;
          default:
            return 0;
        }
      }, k.prototype.exif_format_read = function(x, e) {
        var r;
        switch (x) {
          case 1:
          case 2:
            return r = this.input[e];
          case 6:
            return (r = this.input[e]) | 33554430 * (128 & r);
          case 3:
            return r = this.read_uint16(e);
          case 8:
            return (r = this.read_uint16(e)) | 131070 * (32768 & r);
          case 4:
            return r = this.read_uint32(e);
          case 9:
            return 0 | (r = this.read_uint32(e));
          case 5:
          case 10:
          case 11:
          case 12:
          case 7:
          default:
            return null;
        }
      }, k.prototype.scan_ifd = function(x, e, r) {
        var n = this.read_uint16(e);
        e += 2;
        for (var s = 0; s < n; s++) {
          var t = this.read_uint16(e), d = this.read_uint16(e + 2), u = this.read_uint32(e + 4), o = this.exif_format_length(d), h = u * o, l = h <= 4 ? e + 8 : this.read_uint32(e + 8), i = !1;
          if (l + h > this.input.length)
            throw m("unexpected EOF", "EBADDATA");
          for (var p = [], c = l, a = 0; a < u; a++, c += o) {
            var y = this.exif_format_read(d, c);
            if (y === null) {
              p = null;
              break;
            }
            p.push(y);
          }
          if (Array.isArray(p) && d === 2 && (p = g(String.fromCharCode.apply(null, p))) && p[p.length - 1] === "\0" && (p = p.slice(0, -1)), this.is_subifd_link(x, t) && Array.isArray(p) && Number.isInteger(p[0]) && p[0] > 0 && (this.ifds_to_read.push({ id: t, offset: p[0] }), i = !0), r({ is_big_endian: this.big_endian, ifd: x, tag: t, format: d, count: u, entry_offset: e + this.start, data_length: h, data_offset: l + this.start, value: p, is_subifd_link: i }) === !1)
            return void (this.aborted = !0);
          e += 12;
        }
        x === 0 && this.ifds_to_read.push({ id: 1, offset: this.read_uint32(e) });
      }, Q.exports.ExifParser = k, Q.exports.get_orientation = function(x) {
        var e = 0;
        try {
          return new k(x, 0, x.length).each(function(r) {
            if (r.ifd === 0 && r.tag === 274 && Array.isArray(r.value))
              return e = r.value[0], !1;
          }), e;
        } catch {
          return -1;
        }
      };
    }, {}], 265: [function(v, Q, $) {
      var m = v("./common").readUInt16BE, g = v("./common").readUInt32BE;
      function k(t, d) {
        if (t.length < 4 + d)
          return null;
        var u = g(t, d);
        return t.length < u + d || u < 8 ? null : { boxtype: String.fromCharCode.apply(null, t.slice(d + 4, d + 8)), data: t.slice(d + 8, d + u), end: d + u };
      }
      function x(t, d) {
        for (var u = 0; ; ) {
          var o = k(t, u);
          if (!o)
            break;
          switch (o.boxtype) {
            case "ispe":
              d.sizes.push({ width: g(o.data, 4), height: g(o.data, 8) });
              break;
            case "irot":
              d.transforms.push({ type: "irot", value: 3 & o.data[0] });
              break;
            case "imir":
              d.transforms.push({ type: "imir", value: 1 & o.data[0] });
          }
          u = o.end;
        }
      }
      function e(t, d, u) {
        for (var o = 0, h = 0; h < u; h++)
          o = 256 * o + (t[d + h] || 0);
        return o;
      }
      function r(t, d) {
        for (var u = t[4] >> 4 & 15, o = 15 & t[4], h = t[5] >> 4 & 15, l = m(t, 6), i = 8, p = 0; p < l; p++) {
          var c = m(t, i), a = m(t, i += 2), y = e(t, i += 2, h), f = m(t, i += h);
          if (i += 2, a === 0 && f === 1) {
            var _ = e(t, i, u), b = e(t, i + u, o);
            d.item_loc[c] = { length: b, offset: _ + y };
          }
          i += f * (u + o);
        }
      }
      function n(t, d) {
        for (var u = m(t, 4), o = 6, h = 0; h < u; h++) {
          var l = k(t, o);
          if (!l)
            break;
          if (l.boxtype === "infe") {
            for (var i = m(l.data, 4), p = "", c = 8; c < l.data.length && l.data[c]; c++)
              p += String.fromCharCode(l.data[c]);
            d.item_inf[p] = i;
          }
          o = l.end;
        }
      }
      function s(t, d) {
        for (var u = 0; ; ) {
          var o = k(t, u);
          if (!o)
            break;
          o.boxtype === "ipco" && x(o.data, d), u = o.end;
        }
      }
      Q.exports.unbox = k, Q.exports.readSizeFromMeta = function(t) {
        var d = { sizes: [], transforms: [], item_inf: {}, item_loc: {} };
        if (function(c, a) {
          for (var y = 4; ; ) {
            var f = k(c, y);
            if (!f)
              break;
            f.boxtype === "iprp" && s(f.data, a), f.boxtype === "iloc" && r(f.data, a), f.boxtype === "iinf" && n(f.data, a), y = f.end;
          }
        }(t, d), d.sizes.length) {
          var u, o, h, l = (u = d.sizes, o = u.reduce(function(c, a) {
            return c.width > a.width || c.width === a.width && c.height > a.height ? c : a;
          }), h = u.reduce(function(c, a) {
            return c.height > a.height || c.height === a.height && c.width > a.width ? c : a;
          }), o.width > h.height || o.width === h.height && o.height > h.width ? o : h), i = 1;
          d.transforms.forEach(function(c) {
            var a = { 1: 6, 2: 5, 3: 8, 4: 7, 5: 4, 6: 3, 7: 2, 8: 1 }, y = { 1: 4, 2: 3, 3: 2, 4: 1, 5: 6, 6: 5, 7: 8, 8: 7 };
            if (c.type === "imir" && (i = c.value === 0 ? y[i] : a[i = a[i = y[i]]]), c.type === "irot")
              for (var f = 0; f < c.value; f++)
                i = a[i];
          });
          var p = null;
          return d.item_inf.Exif && (p = d.item_loc[d.item_inf.Exif]), { width: l.width, height: l.height, orientation: d.transforms.length ? i : null, variants: d.sizes, exif_location: p };
        }
      }, Q.exports.getMimeType = function(t) {
        var d = String.fromCharCode.apply(null, t.slice(0, 4)), u = {};
        u[d] = !0;
        for (var o = 8; o < t.length; o += 4)
          u[String.fromCharCode.apply(null, t.slice(o, o + 4))] = !0;
        if (u.mif1 || u.msf1 || u.miaf)
          return d === "avif" || d === "avis" || d === "avio" ? { type: "avif", mime: "image/avif" } : d === "heic" || d === "heix" ? { type: "heic", mime: "image/heic" } : d === "hevc" || d === "hevx" ? { type: "heic", mime: "image/heic-sequence" } : u.avif || u.avis ? { type: "avif", mime: "image/avif" } : u.heic || u.heix || u.hevc || u.hevx || u.heis ? u.msf1 ? { type: "heif", mime: "image/heif-sequence" } : { type: "heif", mime: "image/heif" } : { type: "avif", mime: "image/avif" };
      };
    }, { "./common": 263 }], 266: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt32BE, x = v("../miaf_utils"), e = v("../exif_utils"), r = m("ftyp");
      Q.exports = function(n) {
        if (g(n, 4, r)) {
          var s = x.unbox(n, 0);
          if (s) {
            var t = x.getMimeType(s.data);
            if (t) {
              for (var d, u = s.end; ; ) {
                var o = x.unbox(n, u);
                if (!o)
                  break;
                if (u = o.end, o.boxtype === "mdat")
                  return;
                if (o.boxtype === "meta") {
                  d = o.data;
                  break;
                }
              }
              if (d) {
                var h = x.readSizeFromMeta(d);
                if (h) {
                  var l = { width: h.width, height: h.height, type: t.type, mime: t.mime, wUnits: "px", hUnits: "px" };
                  if (h.variants.length > 1 && (l.variants = h.variants), h.orientation && (l.orientation = h.orientation), h.exif_location && h.exif_location.offset + h.exif_location.length <= n.length) {
                    var i = k(n, h.exif_location.offset), p = n.slice(h.exif_location.offset + i + 4, h.exif_location.offset + h.exif_location.length), c = e.get_orientation(p);
                    c > 0 && (l.orientation = c);
                  }
                  return l;
                }
              }
            }
          }
        }
      };
    }, { "../common": 263, "../exif_utils": 264, "../miaf_utils": 265 }], 267: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt16LE, x = m("BM");
      Q.exports = function(e) {
        if (!(e.length < 26) && g(e, 0, x))
          return { width: k(e, 18), height: k(e, 22), type: "bmp", mime: "image/bmp", wUnits: "px", hUnits: "px" };
      };
    }, { "../common": 263 }], 268: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt16LE, x = m("GIF87a"), e = m("GIF89a");
      Q.exports = function(r) {
        if (!(r.length < 10) && (g(r, 0, x) || g(r, 0, e)))
          return { width: k(r, 6), height: k(r, 8), type: "gif", mime: "image/gif", wUnits: "px", hUnits: "px" };
      };
    }, { "../common": 263 }], 269: [function(v, Q, $) {
      var m = v("../common").readUInt16LE;
      Q.exports = function(g) {
        var k = m(g, 0), x = m(g, 2), e = m(g, 4);
        if (k === 0 && x === 1 && e) {
          for (var r = [], n = { width: 0, height: 0 }, s = 0; s < e; s++) {
            var t = g[6 + 16 * s] || 256, d = g[6 + 16 * s + 1] || 256, u = { width: t, height: d };
            r.push(u), (t > n.width || d > n.height) && (n = u);
          }
          return { width: n.width, height: n.height, variants: r, type: "ico", mime: "image/x-icon", wUnits: "px", hUnits: "px" };
        }
      };
    }, { "../common": 263 }], 270: [function(v, Q, $) {
      var m = v("../common").readUInt16BE, g = v("../common").str2arr, k = v("../common").sliceEq, x = v("../exif_utils"), e = g("Exif\0\0");
      Q.exports = function(r) {
        if (!(r.length < 2) && r[0] === 255 && r[1] === 216 && r[2] === 255)
          for (var n = 2; ; ) {
            for (; ; ) {
              if (r.length - n < 2)
                return;
              if (r[n++] === 255)
                break;
            }
            for (var s, t, d = r[n++]; d === 255; )
              d = r[n++];
            if (208 <= d && d <= 217 || d === 1)
              s = 0;
            else {
              if (!(192 <= d && d <= 254) || r.length - n < 2)
                return;
              s = m(r, n) - 2, n += 2;
            }
            if (d === 217 || d === 218)
              return;
            if (d === 225 && s >= 10 && k(r, n, e) && (t = x.get_orientation(r.slice(n + 6, n + s))), s >= 5 && 192 <= d && d <= 207 && d !== 196 && d !== 200 && d !== 204) {
              if (r.length - n < s)
                return;
              var u = { width: m(r, n + 3), height: m(r, n + 1), type: "jpg", mime: "image/jpeg", wUnits: "px", hUnits: "px" };
              return t > 0 && (u.orientation = t), u;
            }
            n += s;
          }
      };
    }, { "../common": 263, "../exif_utils": 264 }], 271: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt32BE, x = m(`\x89PNG\r

`), e = m("IHDR");
      Q.exports = function(r) {
        if (!(r.length < 24) && g(r, 0, x) && g(r, 12, e))
          return { width: k(r, 16), height: k(r, 20), type: "png", mime: "image/png", wUnits: "px", hUnits: "px" };
      };
    }, { "../common": 263 }], 272: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt32BE, x = m("8BPS\0");
      Q.exports = function(e) {
        if (!(e.length < 22) && g(e, 0, x))
          return { width: k(e, 18), height: k(e, 14), type: "psd", mime: "image/vnd.adobe.photoshop", wUnits: "px", hUnits: "px" };
      };
    }, { "../common": 263 }], 273: [function(v, Q, $) {
      function m(t) {
        return typeof t == "number" && isFinite(t) && t > 0;
      }
      var g = /<[-_.:a-zA-Z0-9][^>]*>/, k = /^<([-_.:a-zA-Z0-9]+:)?svg\s/, x = /[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/, e = /\bheight="([^%]+?)"|\bheight='([^%]+?)'/, r = /\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/, n = /in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;
      function s(t) {
        return n.test(t) ? t.match(n)[0] : "px";
      }
      Q.exports = function(t) {
        if (function(_) {
          var b, w = 0, T = _.length;
          for (_[0] === 239 && _[1] === 187 && _[2] === 191 && (w = 3); w < T && ((b = _[w]) === 32 || b === 9 || b === 13 || b === 10); )
            w++;
          return w !== T && _[w] === 60;
        }(t)) {
          for (var d = "", u = 0; u < t.length; u++)
            d += String.fromCharCode(t[u]);
          var o = (d.match(g) || [""])[0];
          if (k.test(o)) {
            var h = function(_) {
              var b = _.match(x), w = _.match(e), T = _.match(r);
              return { width: b && (b[1] || b[2]), height: w && (w[1] || w[2]), viewbox: T && (T[1] || T[2]) };
            }(o), l = parseFloat(h.width), i = parseFloat(h.height);
            if (h.width && h.height)
              return !m(l) || !m(i) ? void 0 : { width: l, height: i, type: "svg", mime: "image/svg+xml", wUnits: s(h.width), hUnits: s(h.height) };
            var p = (h.viewbox || "").split(" "), c = { width: p[2], height: p[3] }, a = parseFloat(c.width), y = parseFloat(c.height);
            if (m(a) && m(y) && s(c.width) === s(c.height)) {
              var f = a / y;
              return h.width ? m(l) ? { width: l, height: l / f, type: "svg", mime: "image/svg+xml", wUnits: s(h.width), hUnits: s(h.width) } : void 0 : h.height ? m(i) ? { width: i * f, height: i, type: "svg", mime: "image/svg+xml", wUnits: s(h.height), hUnits: s(h.height) } : void 0 : { width: a, height: y, type: "svg", mime: "image/svg+xml", wUnits: s(c.width), hUnits: s(c.height) };
            }
          }
        }
      };
    }, {}], 274: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt16LE, x = v("../common").readUInt16BE, e = v("../common").readUInt32LE, r = v("../common").readUInt32BE, n = m("II*\0"), s = m("MM\0*");
      function t(o, h, l) {
        return l ? x(o, h) : k(o, h);
      }
      function d(o, h, l) {
        return l ? r(o, h) : e(o, h);
      }
      function u(o, h, l) {
        var i = t(o, h + 2, l);
        return d(o, h + 4, l) !== 1 || i !== 3 && i !== 4 ? null : i === 3 ? t(o, h + 8, l) : d(o, h + 8, l);
      }
      Q.exports = function(o) {
        if (!(o.length < 8) && (g(o, 0, n) || g(o, 0, s))) {
          var h = o[0] === 77, l = d(o, 4, h) - 8;
          if (!(l < 0)) {
            var i = l + 8;
            if (!(o.length - i < 2)) {
              var p = 12 * t(o, i + 0, h);
              if (!(p <= 0 || (i += 2, o.length - i < p))) {
                var c, a, y, f;
                for (c = 0; c < p; c += 12)
                  (f = t(o, i + c, h)) === 256 ? a = u(o, i + c, h) : f === 257 && (y = u(o, i + c, h));
                return a && y ? { width: a, height: y, type: "tiff", mime: "image/tiff", wUnits: "px", hUnits: "px" } : void 0;
              }
            }
          }
        }
      };
    }, { "../common": 263 }], 275: [function(v, Q, $) {
      var m = v("../common").str2arr, g = v("../common").sliceEq, k = v("../common").readUInt16LE, x = v("../common").readUInt32LE, e = v("../exif_utils"), r = m("RIFF"), n = m("WEBP");
      function s(u, o) {
        if (u[o + 3] === 157 && u[o + 4] === 1 && u[o + 5] === 42)
          return { width: 16383 & k(u, o + 6), height: 16383 & k(u, o + 8), type: "webp", mime: "image/webp", wUnits: "px", hUnits: "px" };
      }
      function t(u, o) {
        if (u[o] === 47) {
          var h = x(u, o + 1);
          return { width: 1 + (16383 & h), height: 1 + (h >> 14 & 16383), type: "webp", mime: "image/webp", wUnits: "px", hUnits: "px" };
        }
      }
      function d(u, o) {
        return { width: 1 + (u[o + 6] << 16 | u[o + 5] << 8 | u[o + 4]), height: 1 + (u[o + 9] << o | u[o + 8] << 8 | u[o + 7]), type: "webp", mime: "image/webp", wUnits: "px", hUnits: "px" };
      }
      Q.exports = function(u) {
        if (!(u.length < 16) && (g(u, 0, r) || g(u, 8, n))) {
          var o = 12, h = null, l = 0, i = x(u, 4) + 8;
          if (!(i > u.length)) {
            for (; o + 8 < i; )
              if (u[o] !== 0) {
                var p = String.fromCharCode.apply(null, u.slice(o, o + 4)), c = x(u, o + 4);
                p === "VP8 " && c >= 10 ? h = h || s(u, o + 8) : p === "VP8L" && c >= 9 ? h = h || t(u, o + 8) : p === "VP8X" && c >= 10 ? h = h || d(u, o + 8) : p === "EXIF" && (l = e.get_orientation(u.slice(o + 8, o + 8 + c)), o = 1 / 0), o += 8 + c;
              } else
                o++;
            if (h)
              return l > 0 && (h.orientation = l), h;
          }
        }
      };
    }, { "../common": 263, "../exif_utils": 264 }], 276: [function(v, Q, $) {
      Q.exports = { avif: v("./parse_sync/avif"), bmp: v("./parse_sync/bmp"), gif: v("./parse_sync/gif"), ico: v("./parse_sync/ico"), jpeg: v("./parse_sync/jpeg"), png: v("./parse_sync/png"), psd: v("./parse_sync/psd"), svg: v("./parse_sync/svg"), tiff: v("./parse_sync/tiff"), webp: v("./parse_sync/webp") };
    }, { "./parse_sync/avif": 266, "./parse_sync/bmp": 267, "./parse_sync/gif": 268, "./parse_sync/ico": 269, "./parse_sync/jpeg": 270, "./parse_sync/png": 271, "./parse_sync/psd": 272, "./parse_sync/svg": 273, "./parse_sync/tiff": 274, "./parse_sync/webp": 275 }], 277: [function(v, Q, $) {
      var m = v("./lib/parsers_sync");
      Q.exports = function(g) {
        return function(k) {
          for (var x = Object.keys(m), e = 0; e < x.length; e++) {
            var r = m[x[e]](k);
            if (r)
              return r;
          }
          return null;
        }(g);
      }, Q.exports.parsers = m;
    }, { "./lib/parsers_sync": 276 }], 278: [function(v, Q, $) {
      var m, g, k = Q.exports = {};
      function x() {
        throw new Error("setTimeout has not been defined");
      }
      function e() {
        throw new Error("clearTimeout has not been defined");
      }
      function r(i) {
        if (m === setTimeout)
          return setTimeout(i, 0);
        if ((m === x || !m) && setTimeout)
          return m = setTimeout, setTimeout(i, 0);
        try {
          return m(i, 0);
        } catch {
          try {
            return m.call(null, i, 0);
          } catch {
            return m.call(this, i, 0);
          }
        }
      }
      (function() {
        try {
          m = typeof setTimeout == "function" ? setTimeout : x;
        } catch {
          m = x;
        }
        try {
          g = typeof clearTimeout == "function" ? clearTimeout : e;
        } catch {
          g = e;
        }
      })();
      var n, s = [], t = !1, d = -1;
      function u() {
        t && n && (t = !1, n.length ? s = n.concat(s) : d = -1, s.length && o());
      }
      function o() {
        if (!t) {
          var i = r(u);
          t = !0;
          for (var p = s.length; p; ) {
            for (n = s, s = []; ++d < p; )
              n && n[d].run();
            d = -1, p = s.length;
          }
          n = null, t = !1, function(c) {
            if (g === clearTimeout)
              return clearTimeout(c);
            if ((g === e || !g) && clearTimeout)
              return g = clearTimeout, clearTimeout(c);
            try {
              g(c);
            } catch {
              try {
                return g.call(null, c);
              } catch {
                return g.call(this, c);
              }
            }
          }(i);
        }
      }
      function h(i, p) {
        this.fun = i, this.array = p;
      }
      function l() {
      }
      k.nextTick = function(i) {
        var p = new Array(arguments.length - 1);
        if (arguments.length > 1)
          for (var c = 1; c < arguments.length; c++)
            p[c - 1] = arguments[c];
        s.push(new h(i, p)), s.length !== 1 || t || r(o);
      }, h.prototype.run = function() {
        this.fun.apply(null, this.array);
      }, k.title = "browser", k.browser = !0, k.env = {}, k.argv = [], k.version = "", k.versions = {}, k.on = l, k.addListener = l, k.once = l, k.off = l, k.removeListener = l, k.removeAllListeners = l, k.emit = l, k.prependListener = l, k.prependOnceListener = l, k.listeners = function(i) {
        return [];
      }, k.binding = function(i) {
        throw new Error("process.binding is not supported");
      }, k.cwd = function() {
        return "/";
      }, k.chdir = function(i) {
        throw new Error("process.chdir is not supported");
      }, k.umask = function() {
        return 0;
      };
    }, {}], 279: [function(v, Q, $) {
      (function(m) {
        (function() {
          for (var g = v("performance-now"), k = typeof window > "u" ? m : window, x = ["moz", "webkit"], e = "AnimationFrame", r = k["request" + e], n = k["cancel" + e] || k["cancelRequest" + e], s = 0; !r && s < x.length; s++)
            r = k[x[s] + "Request" + e], n = k[x[s] + "Cancel" + e] || k[x[s] + "CancelRequest" + e];
          if (!r || !n) {
            var t = 0, d = 0, u = [];
            r = function(o) {
              if (u.length === 0) {
                var h = g(), l = Math.max(0, 1e3 / 60 - (h - t));
                t = l + h, setTimeout(function() {
                  var i = u.slice(0);
                  u.length = 0;
                  for (var p = 0; p < i.length; p++)
                    if (!i[p].cancelled)
                      try {
                        i[p].callback(t);
                      } catch (c) {
                        setTimeout(function() {
                          throw c;
                        }, 0);
                      }
                }, Math.round(l));
              }
              return u.push({ handle: ++d, callback: o, cancelled: !1 }), d;
            }, n = function(o) {
              for (var h = 0; h < u.length; h++)
                u[h].handle === o && (u[h].cancelled = !0);
            };
          }
          Q.exports = function(o) {
            return r.call(k, o);
          }, Q.exports.cancel = function() {
            n.apply(k, arguments);
          }, Q.exports.polyfill = function(o) {
            o || (o = k), o.requestAnimationFrame = r, o.cancelAnimationFrame = n;
          };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "performance-now": 252 }], 280: [function(v, Q, $) {
      var m = v("array-bounds"), g = v("color-normalize"), k = v("update-diff"), x = v("pick-by-alias"), e = v("object-assign"), r = v("flatten-vertex-data"), n = v("to-float32"), s = n.float32, t = n.fract32;
      Q.exports = function(u, o) {
        if (typeof u == "function" ? (o || (o = {}), o.regl = u) : o = u, o.length && (o.positions = o), !(u = o.regl).hasExtension("ANGLE_instanced_arrays"))
          throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");
        var h, l, i, p, c, a, y = u._gl, f = { color: "black", capSize: 5, lineWidth: 1, opacity: 1, viewport: null, range: null, offset: 0, count: 0, bounds: null, positions: [], errors: [] }, _ = [];
        return p = u.buffer({ usage: "dynamic", type: "uint8", data: new Uint8Array(0) }), l = u.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) }), i = u.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) }), c = u.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) }), a = u.buffer({ usage: "static", type: "float", data: d }), L(o), h = u({ vert: `
		precision highp float;

		attribute vec2 position, positionFract;
		attribute vec4 error;
		attribute vec4 color;

		attribute vec2 direction, lineOffset, capOffset;

		uniform vec4 viewport;
		uniform float lineWidth, capSize;
		uniform vec2 scale, scaleFract, translate, translateFract;

		varying vec4 fragColor;

		void main() {
			fragColor = color / 255.;

			vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;

			vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;

			vec2 position = position + dxy;

			vec2 pos = (position + translate) * scale
				+ (positionFract + translateFract) * scale
				+ (position + translate) * scaleFract
				+ (positionFract + translateFract) * scaleFract;

			pos += pixelOffset / viewport.zw;

			gl_Position = vec4(pos * 2. - 1., 0, 1);
		}
		`, frag: `
		precision highp float;

		varying vec4 fragColor;

		uniform float opacity;

		void main() {
			gl_FragColor = fragColor;
			gl_FragColor.a *= opacity;
		}
		`, uniforms: { range: u.prop("range"), lineWidth: u.prop("lineWidth"), capSize: u.prop("capSize"), opacity: u.prop("opacity"), scale: u.prop("scale"), translate: u.prop("translate"), scaleFract: u.prop("scaleFract"), translateFract: u.prop("translateFract"), viewport: function(I, P) {
          return [P.viewport.x, P.viewport.y, I.viewportWidth, I.viewportHeight];
        } }, attributes: { color: { buffer: p, offset: function(I, P) {
          return 4 * P.offset;
        }, divisor: 1 }, position: { buffer: l, offset: function(I, P) {
          return 8 * P.offset;
        }, divisor: 1 }, positionFract: { buffer: i, offset: function(I, P) {
          return 8 * P.offset;
        }, divisor: 1 }, error: { buffer: c, offset: function(I, P) {
          return 16 * P.offset;
        }, divisor: 1 }, direction: { buffer: a, stride: 24, offset: 0 }, lineOffset: { buffer: a, stride: 24, offset: 8 }, capOffset: { buffer: a, stride: 24, offset: 16 } }, primitive: "triangles", blend: { enable: !0, color: [0, 0, 0, 0], equation: { rgb: "add", alpha: "add" }, func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, depth: { enable: !1 }, scissor: { enable: !0, box: u.prop("viewport") }, viewport: u.prop("viewport"), stencil: !1, instances: u.prop("count"), count: d.length }), e(b, { update: L, draw: w, destroy: A, regl: u, gl: y, canvas: y.canvas, groups: _ }), b;
        function b(I) {
          I ? L(I) : I === null && A(), w();
        }
        function w(I) {
          if (typeof I == "number")
            return T(I);
          I && !Array.isArray(I) && (I = [I]), u._refresh(), _.forEach(function(P, S) {
            P && (I && (I[S] ? P.draw = !0 : P.draw = !1), P.draw ? T(S) : P.draw = !0);
          });
        }
        function T(I) {
          typeof I == "number" && (I = _[I]), I != null && I && I.count && I.color && I.opacity && I.positions && I.positions.length > 1 && (I.scaleRatio = [I.scale[0] * I.viewport.width, I.scale[1] * I.viewport.height], h(I), I.after && I.after(I));
        }
        function L(I) {
          if (I) {
            I.length != null ? typeof I[0] == "number" && (I = [{ positions: I }]) : Array.isArray(I) || (I = [I]);
            var P = 0, S = 0;
            if (b.groups = _ = I.map(function(J, W) {
              var Z = _[W];
              return J && (typeof J == "function" ? J = { after: J } : typeof J[0] == "number" && (J = { positions: J }), J = x(J, { color: "color colors fill", capSize: "capSize cap capsize cap-size", lineWidth: "lineWidth line-width width line thickness", opacity: "opacity alpha", range: "range dataBox", viewport: "viewport viewBox", errors: "errors error", positions: "positions position data points" }), Z || (_[W] = Z = { id: W, scale: null, translate: null, scaleFract: null, translateFract: null, draw: !0 }, J = e({}, f, J)), k(Z, J, [{ lineWidth: function(re) {
                return 0.5 * +re;
              }, capSize: function(re) {
                return 0.5 * +re;
              }, opacity: parseFloat, errors: function(re) {
                return re = r(re), S += re.length, re;
              }, positions: function(re, V) {
                return re = r(re, "float64"), V.count = Math.floor(re.length / 2), V.bounds = m(re, 2), V.offset = P, P += V.count, re;
              } }, { color: function(re, V) {
                var B = V.count;
                if (re || (re = "transparent"), !Array.isArray(re) || typeof re[0] == "number") {
                  var U = re;
                  re = Array(B);
                  for (var ee = 0; ee < B; ee++)
                    re[ee] = U;
                }
                if (re.length < B)
                  throw Error("Not enough colors");
                for (var N = new Uint8Array(4 * B), K = 0; K < B; K++) {
                  var X = g(re[K], "uint8");
                  N.set(X, 4 * K);
                }
                return N;
              }, range: function(re, V, B) {
                var U = V.bounds;
                return re || (re = U), V.scale = [1 / (re[2] - re[0]), 1 / (re[3] - re[1])], V.translate = [-re[0], -re[1]], V.scaleFract = t(V.scale), V.translateFract = t(V.translate), re;
              }, viewport: function(re) {
                var V;
                return Array.isArray(re) ? V = { x: re[0], y: re[1], width: re[2] - re[0], height: re[3] - re[1] } : re ? (V = { x: re.x || re.left || 0, y: re.y || re.top || 0 }, re.right ? V.width = re.right - V.x : V.width = re.w || re.width || 0, re.bottom ? V.height = re.bottom - V.y : V.height = re.h || re.height || 0) : V = { x: 0, y: 0, width: y.drawingBufferWidth, height: y.drawingBufferHeight }, V;
              } }])), Z;
            }), P || S) {
              var E = _.reduce(function(J, W, Z) {
                return J + (W ? W.count : 0);
              }, 0), R = new Float64Array(2 * E), z = new Uint8Array(4 * E), j = new Float32Array(4 * E);
              _.forEach(function(J, W) {
                if (J) {
                  var Z = J.positions, re = J.count, V = J.offset, B = J.color, U = J.errors;
                  re && (z.set(B, 4 * V), j.set(U, 4 * V), R.set(Z, 2 * V));
                }
              });
              var H = s(R);
              l(H);
              var Y = t(R, H);
              i(Y), p(z), c(j);
            }
          }
        }
        function A() {
          l.destroy(), i.destroy(), p.destroy(), c.destroy(), a.destroy();
        }
      };
      var d = [[1, 0, 0, 1, 0, 0], [1, 0, 0, -1, 0, 0], [-1, 0, 0, -1, 0, 0], [-1, 0, 0, -1, 0, 0], [-1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, -1, 0, 0, 1], [1, 0, -1, 0, 0, -1], [1, 0, 1, 0, 0, -1], [1, 0, 1, 0, 0, -1], [1, 0, 1, 0, 0, 1], [1, 0, -1, 0, 0, 1], [-1, 0, -1, 0, 0, 1], [-1, 0, -1, 0, 0, -1], [-1, 0, 1, 0, 0, -1], [-1, 0, 1, 0, 0, -1], [-1, 0, 1, 0, 0, 1], [-1, 0, -1, 0, 0, 1], [0, 1, 1, 0, 0, 0], [0, 1, -1, 0, 0, 0], [0, -1, -1, 0, 0, 0], [0, -1, -1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, -1, 1, 0, 0, 0], [0, 1, 0, -1, 1, 0], [0, 1, 0, -1, -1, 0], [0, 1, 0, 1, -1, 0], [0, 1, 0, 1, 1, 0], [0, 1, 0, -1, 1, 0], [0, 1, 0, 1, -1, 0], [0, -1, 0, -1, 1, 0], [0, -1, 0, -1, -1, 0], [0, -1, 0, 1, -1, 0], [0, -1, 0, 1, 1, 0], [0, -1, 0, -1, 1, 0], [0, -1, 0, 1, -1, 0]];
    }, { "array-bounds": 71, "color-normalize": 89, "flatten-vertex-data": 191, "object-assign": 247, "pick-by-alias": 253, "to-float32": 314, "update-diff": 330 }], 281: [function(v, Q, $) {
      var m = v("color-normalize"), g = v("array-bounds"), k = v("object-assign"), x = v("glslify"), e = v("pick-by-alias"), r = v("flatten-vertex-data"), n = v("earcut"), s = v("array-normalize"), t = v("to-float32"), d = t.float32, u = t.fract32, o = v("es6-weak-map"), h = v("parse-rect"), l = v("array-find-index");
      function i(p, c) {
        if (!(this instanceof i))
          return new i(p, c);
        if (typeof p == "function" ? (c || (c = {}), c.regl = p) : c = p, c.length && (c.positions = c), !(p = c.regl).hasExtension("ANGLE_instanced_arrays"))
          throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");
        this.gl = p._gl, this.regl = p, this.passes = [], this.shaders = i.shaders.has(p) ? i.shaders.get(p) : i.shaders.set(p, i.createShaders(p)).get(p), this.update(c);
      }
      Q.exports = i, i.dashMult = 2, i.maxPatternLength = 256, i.precisionThreshold = 3e6, i.maxPoints = 1e4, i.maxLines = 2048, i.shaders = new o(), i.createShaders = function(p) {
        var c, a = p.buffer({ usage: "static", type: "float", data: [0, 1, 0, 0, 1, 1, 1, 0] }), y = { primitive: "triangle strip", instances: p.prop("count"), count: 4, offset: 0, uniforms: { miterMode: function(_, b) {
          return b.join === "round" ? 2 : 1;
        }, miterLimit: p.prop("miterLimit"), scale: p.prop("scale"), scaleFract: p.prop("scaleFract"), translateFract: p.prop("translateFract"), translate: p.prop("translate"), thickness: p.prop("thickness"), dashTexture: p.prop("dashTexture"), opacity: p.prop("opacity"), pixelRatio: p.context("pixelRatio"), id: p.prop("id"), dashLength: p.prop("dashLength"), viewport: function(_, b) {
          return [b.viewport.x, b.viewport.y, _.viewportWidth, _.viewportHeight];
        }, depth: p.prop("depth") }, blend: { enable: !0, color: [0, 0, 0, 0], equation: { rgb: "add", alpha: "add" }, func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, depth: { enable: function(_, b) {
          return !b.overlay;
        } }, stencil: { enable: !1 }, scissor: { enable: !0, box: p.prop("viewport") }, viewport: p.prop("viewport") }, f = p(k({ vert: x([`precision highp float;
#define GLSLIFY 1

attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;

uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;

varying vec4 fragColor;
varying vec2 tangent;

vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
	// the order is important
	return position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;
}

void main() {
	float lineStart = 1. - lineEnd;
	float lineOffset = lineTop * 2. - 1.;

	vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
	tangent = normalize(diff * scale * viewport.zw);
	vec2 normal = vec2(-tangent.y, tangent.x);

	vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
		+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd

		+ thickness * normal * .5 * lineOffset / viewport.zw;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
}
`]), frag: x([`precision highp float;
#define GLSLIFY 1

uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;

void main() {
	float alpha = 1.;

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`]), attributes: { lineEnd: { buffer: a, divisor: 0, stride: 8, offset: 0 }, lineTop: { buffer: a, divisor: 0, stride: 8, offset: 4 }, aCoord: { buffer: p.prop("positionBuffer"), stride: 8, offset: 8, divisor: 1 }, bCoord: { buffer: p.prop("positionBuffer"), stride: 8, offset: 16, divisor: 1 }, aCoordFract: { buffer: p.prop("positionFractBuffer"), stride: 8, offset: 8, divisor: 1 }, bCoordFract: { buffer: p.prop("positionFractBuffer"), stride: 8, offset: 16, divisor: 1 }, color: { buffer: p.prop("colorBuffer"), stride: 4, offset: 0, divisor: 1 } } }, y));
        try {
          c = p(k({ cull: { enable: !0, face: "back" }, vert: x([`precision highp float;
#define GLSLIFY 1

attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;

uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;

varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;

// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

bool isNaN( float val ){
  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}

void main() {
	vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;

  vec2 adjustedScale;
  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;

  vec2 scaleRatio = adjustedScale * viewport.zw;
	vec2 normalWidth = thickness / scaleRatio;

	float lineStart = 1. - lineEnd;
	float lineBot = 1. - lineTop;

	fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;

	if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;

	if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
	if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);

	vec2 prevDiff = aCoord - prevCoord;
	vec2 currDiff = bCoord - aCoord;
	vec2 nextDiff = nextCoord - bCoord;

	vec2 prevTangent = normalize(prevDiff * scaleRatio);
	vec2 currTangent = normalize(currDiff * scaleRatio);
	vec2 nextTangent = normalize(nextDiff * scaleRatio);

	vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
	vec2 currNormal = vec2(-currTangent.y, currTangent.x);
	vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);

	vec2 startJoinDirection = normalize(prevTangent - currTangent);
	vec2 endJoinDirection = normalize(currTangent - nextTangent);

	// collapsed/unidirectional segment cases
	// FIXME: there should be more elegant solution
	vec2 prevTanDiff = abs(prevTangent - currTangent);
	vec2 nextTanDiff = abs(nextTangent - currTangent);
	if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
		startJoinDirection = currNormal;
	}
	if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
		endJoinDirection = currNormal;
	}
	if (aCoord == bCoord) {
		endJoinDirection = startJoinDirection;
		currNormal = prevNormal;
		currTangent = prevTangent;
	}

	tangent = currTangent;

	//calculate join shifts relative to normals
	float startJoinShift = dot(currNormal, startJoinDirection);
	float endJoinShift = dot(currNormal, endJoinDirection);

	float startMiterRatio = abs(1. / startJoinShift);
	float endMiterRatio = abs(1. / endJoinShift);

	vec2 startJoin = startJoinDirection * startMiterRatio;
	vec2 endJoin = endJoinDirection * endMiterRatio;

	vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
	startTopJoin = sign(startJoinShift) * startJoin * .5;
	startBotJoin = -startTopJoin;

	endTopJoin = sign(endJoinShift) * endJoin * .5;
	endBotJoin = -endTopJoin;

	vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
	vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
	vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
	vec2 bBotCoord = bCoord + normalWidth * endBotJoin;

	//miter anti-clipping
	float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
	float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));

	//prevent close to reverse direction switch
	bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);
	bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);

	if (prevReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
		aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
		//handle miter clipping
		bTopCoord -= normalWidth * endTopJoin;
		bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
	}

	if (nextReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
		bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
		//handle miter clipping
		aBotCoord -= normalWidth * startBotJoin;
		aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
	}

	vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
	vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;

	vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
	vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;

	//position is normalized 0..1 coord on the screen
	vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;

	startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
	endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;

	gl_Position = vec4(position  * 2.0 - 1.0, depth, 1);

	enableStartMiter = step(dot(currTangent, prevTangent), .5);
	enableEndMiter = step(dot(currTangent, nextTangent), .5);

	//bevel miter cutoffs
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}

	//round miter cutoffs
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}
}
`]), frag: x([`precision highp float;
#define GLSLIFY 1

uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;
varying vec4 startCutoff, endCutoff;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

void main() {
	float alpha = 1., distToStart, distToEnd;
	float cutoff = thickness * .5;

	//bevel miter
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToStart + 1., 0.), 1.);
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToEnd + 1., 0.), 1.);
		}
	}

	// round miter
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < 0.) {
				float radius = length(gl_FragCoord.xy - startCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < 0.) {
				float radius = length(gl_FragCoord.xy - endCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}
	}

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`]), attributes: { lineEnd: { buffer: a, divisor: 0, stride: 8, offset: 0 }, lineTop: { buffer: a, divisor: 0, stride: 8, offset: 4 }, aColor: { buffer: p.prop("colorBuffer"), stride: 4, offset: 0, divisor: 1 }, bColor: { buffer: p.prop("colorBuffer"), stride: 4, offset: 4, divisor: 1 }, prevCoord: { buffer: p.prop("positionBuffer"), stride: 8, offset: 0, divisor: 1 }, aCoord: { buffer: p.prop("positionBuffer"), stride: 8, offset: 8, divisor: 1 }, bCoord: { buffer: p.prop("positionBuffer"), stride: 8, offset: 16, divisor: 1 }, nextCoord: { buffer: p.prop("positionBuffer"), stride: 8, offset: 24, divisor: 1 } } }, y));
        } catch {
          c = f;
        }
        return { fill: p({ primitive: "triangle", elements: function(_, b) {
          return b.triangles;
        }, offset: 0, vert: x([`precision highp float;
#define GLSLIFY 1

attribute vec2 position, positionFract;

uniform vec4 color;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float pixelRatio, id;
uniform vec4 viewport;
uniform float opacity;

varying vec4 fragColor;

const float MAX_LINES = 256.;

void main() {
	float depth = (MAX_LINES - 4. - id) / (MAX_LINES);

	vec2 position = position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
	fragColor.a *= opacity;
}
`]), frag: x([`precision highp float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
	gl_FragColor = fragColor;
}
`]), uniforms: { scale: p.prop("scale"), color: p.prop("fill"), scaleFract: p.prop("scaleFract"), translateFract: p.prop("translateFract"), translate: p.prop("translate"), opacity: p.prop("opacity"), pixelRatio: p.context("pixelRatio"), id: p.prop("id"), viewport: function(_, b) {
          return [b.viewport.x, b.viewport.y, _.viewportWidth, _.viewportHeight];
        } }, attributes: { position: { buffer: p.prop("positionBuffer"), stride: 8, offset: 8 }, positionFract: { buffer: p.prop("positionFractBuffer"), stride: 8, offset: 8 } }, blend: y.blend, depth: { enable: !1 }, scissor: y.scissor, stencil: y.stencil, viewport: y.viewport }), rect: f, miter: c };
      }, i.defaults = { dashes: null, join: "miter", miterLimit: 1, thickness: 10, cap: "square", color: "black", opacity: 1, overlay: !1, viewport: null, range: null, close: !1, fill: null }, i.prototype.render = function() {
        for (var p, c = [], a = arguments.length; a--; )
          c[a] = arguments[a];
        c.length && (p = this).update.apply(p, c), this.draw();
      }, i.prototype.draw = function() {
        for (var p = this, c = [], a = arguments.length; a--; )
          c[a] = arguments[a];
        return (c.length ? c : this.passes).forEach(function(y, f) {
          var _;
          if (y && Array.isArray(y))
            return (_ = p).draw.apply(_, y);
          typeof y == "number" && (y = p.passes[y]), y && y.count > 1 && y.opacity && (p.regl._refresh(), y.fill && y.triangles && y.triangles.length > 2 && p.shaders.fill(y), y.thickness && (y.scale[0] * y.viewport.width > i.precisionThreshold || y.scale[1] * y.viewport.height > i.precisionThreshold || y.join === "rect" || !y.join && (y.thickness <= 2 || y.count >= i.maxPoints) ? p.shaders.rect(y) : p.shaders.miter(y)));
        }), this;
      }, i.prototype.update = function(p) {
        var c = this;
        if (p) {
          p.length != null ? typeof p[0] == "number" && (p = [{ positions: p }]) : Array.isArray(p) || (p = [p]);
          var a = this.regl, y = this.gl;
          if (p.forEach(function(T, L) {
            var A = c.passes[L];
            if (T !== void 0)
              if (T !== null) {
                if (typeof T[0] == "number" && (T = { positions: T }), T = e(T, { positions: "positions points data coords", thickness: "thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth", join: "lineJoin linejoin join type mode", miterLimit: "miterlimit miterLimit", dashes: "dash dashes dasharray dash-array dashArray", color: "color colour stroke colors colours stroke-color strokeColor", fill: "fill fill-color fillColor", opacity: "alpha opacity", overlay: "overlay crease overlap intersect", close: "closed close closed-path closePath", range: "range dataBox", viewport: "viewport viewBox", hole: "holes hole hollow", splitNull: "splitNull" }), A || (c.passes[L] = A = { id: L, scale: null, scaleFract: null, translate: null, translateFract: null, count: 0, hole: [], depth: 0, dashLength: 1, dashTexture: a.texture({ channels: 1, data: new Uint8Array([255]), width: 1, height: 1, mag: "linear", min: "linear" }), colorBuffer: a.buffer({ usage: "dynamic", type: "uint8", data: new Uint8Array() }), positionBuffer: a.buffer({ usage: "dynamic", type: "float", data: new Uint8Array() }), positionFractBuffer: a.buffer({ usage: "dynamic", type: "float", data: new Uint8Array() }) }, T = k({}, i.defaults, T)), T.thickness != null && (A.thickness = parseFloat(T.thickness)), T.opacity != null && (A.opacity = parseFloat(T.opacity)), T.miterLimit != null && (A.miterLimit = parseFloat(T.miterLimit)), T.overlay != null && (A.overlay = !!T.overlay, L < i.maxLines && (A.depth = 2 * (i.maxLines - 1 - L % i.maxLines) / i.maxLines - 1)), T.join != null && (A.join = T.join), T.hole != null && (A.hole = T.hole), T.fill != null && (A.fill = T.fill ? m(T.fill, "uint8") : null), T.viewport != null && (A.viewport = h(T.viewport)), A.viewport || (A.viewport = h([y.drawingBufferWidth, y.drawingBufferHeight])), T.close != null && (A.close = T.close), T.positions === null && (T.positions = []), T.positions) {
                  var I, P;
                  if (T.positions.x && T.positions.y) {
                    var S = T.positions.x, E = T.positions.y;
                    P = A.count = Math.max(S.length, E.length), I = new Float64Array(2 * P);
                    for (var R = 0; R < P; R++)
                      I[2 * R] = S[R], I[2 * R + 1] = E[R];
                  } else
                    I = r(T.positions, "float64"), P = A.count = Math.floor(I.length / 2);
                  var z = A.bounds = g(I, 2);
                  if (A.fill) {
                    for (var j = [], H = {}, Y = 0, J = 0, W = 0, Z = A.count; J < Z; J++) {
                      var re = I[2 * J], V = I[2 * J + 1];
                      isNaN(re) || isNaN(V) || re == null || V == null ? (re = I[2 * Y], V = I[2 * Y + 1], H[J] = Y) : Y = J, j[W++] = re, j[W++] = V;
                    }
                    if (T.splitNull) {
                      A.count - 1 in H || (H[A.count] = A.count - 1);
                      var B = Object.keys(H).map(Number).sort(function(mt, Ft) {
                        return mt - Ft;
                      }), U = [], ee = 0, N = A.hole != null ? A.hole[0] : null;
                      if (N != null) {
                        var K = l(B, function(mt) {
                          return mt >= N;
                        });
                        (B = B.slice(0, K)).push(N);
                      }
                      for (var X = function(mt) {
                        var Ft = j.slice(2 * ee, 2 * B[mt]).concat(N ? j.slice(2 * N) : []), Vt = (A.hole || []).map(function(Gt) {
                          return Gt - N + (B[mt] - ee);
                        }), Xt = n(Ft, Vt);
                        Xt = Xt.map(function(Gt) {
                          return Gt + ee + (Gt + ee < B[mt] ? 0 : N - B[mt]);
                        }), U.push.apply(U, Xt), ee = B[mt] + 1;
                      }, te = 0; te < B.length; te++)
                        X(te);
                      for (var ie = 0, le = U.length; ie < le; ie++)
                        H[U[ie]] != null && (U[ie] = H[U[ie]]);
                      A.triangles = U;
                    } else {
                      for (var oe = n(j, A.hole || []), ve = 0, ue = oe.length; ve < ue; ve++)
                        H[oe[ve]] != null && (oe[ve] = H[oe[ve]]);
                      A.triangles = oe;
                    }
                  }
                  var ye = new Float64Array(I);
                  s(ye, 2, z);
                  var Ae = new Float64Array(2 * P + 6);
                  A.close ? I[0] === I[2 * P - 2] && I[1] === I[2 * P - 1] ? (Ae[0] = ye[2 * P - 4], Ae[1] = ye[2 * P - 3]) : (Ae[0] = ye[2 * P - 2], Ae[1] = ye[2 * P - 1]) : (Ae[0] = ye[0], Ae[1] = ye[1]), Ae.set(ye, 2), A.close ? I[0] === I[2 * P - 2] && I[1] === I[2 * P - 1] ? (Ae[2 * P + 2] = ye[2], Ae[2 * P + 3] = ye[3], A.count -= 1) : (Ae[2 * P + 2] = ye[0], Ae[2 * P + 3] = ye[1], Ae[2 * P + 4] = ye[2], Ae[2 * P + 5] = ye[3]) : (Ae[2 * P + 2] = ye[2 * P - 2], Ae[2 * P + 3] = ye[2 * P - 1], Ae[2 * P + 4] = ye[2 * P - 2], Ae[2 * P + 5] = ye[2 * P - 1]);
                  var pe = d(Ae);
                  A.positionBuffer(pe);
                  var ge = u(Ae, pe);
                  A.positionFractBuffer(ge);
                }
                if (T.range ? A.range = T.range : A.range || (A.range = A.bounds), (T.range || T.positions) && A.count) {
                  var we = A.bounds, se = we[2] - we[0], de = we[3] - we[1], Te = A.range[2] - A.range[0], Ee = A.range[3] - A.range[1];
                  A.scale = [se / Te, de / Ee], A.translate = [-A.range[0] / Te + we[0] / Te || 0, -A.range[1] / Ee + we[1] / Ee || 0], A.scaleFract = u(A.scale), A.translateFract = u(A.translate);
                }
                if (T.dashes) {
                  var Me, ze = 0;
                  if (!T.dashes || T.dashes.length < 2)
                    ze = 1, Me = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]);
                  else {
                    ze = 0;
                    for (var Ie = 0; Ie < T.dashes.length; ++Ie)
                      ze += T.dashes[Ie];
                    Me = new Uint8Array(ze * i.dashMult);
                    for (var Oe = 0, Ze = 255, Fe = 0; Fe < 2; Fe++)
                      for (var Pe = 0; Pe < T.dashes.length; ++Pe) {
                        for (var De = 0, Ge = T.dashes[Pe] * i.dashMult * 0.5; De < Ge; ++De)
                          Me[Oe++] = Ze;
                        Ze ^= 255;
                      }
                  }
                  A.dashLength = ze, A.dashTexture({ channels: 1, data: Me, width: Me.length, height: 1, mag: "linear", min: "linear" }, 0, 0);
                }
                if (T.color) {
                  var Qe = A.count, ot = T.color;
                  ot || (ot = "transparent");
                  var vt = new Uint8Array(4 * Qe + 4);
                  if (Array.isArray(ot) && typeof ot[0] != "number") {
                    for (var bt = 0; bt < Qe; bt++) {
                      var yt = m(ot[bt], "uint8");
                      vt.set(yt, 4 * bt);
                    }
                    vt.set(m(ot[0], "uint8"), 4 * Qe);
                  } else
                    for (var tt = m(ot, "uint8"), Ke = 0; Ke < Qe + 1; Ke++)
                      vt.set(tt, 4 * Ke);
                  A.colorBuffer({ usage: "dynamic", type: "uint8", data: vt });
                }
              } else
                c.passes[L] = null;
          }), p.length < this.passes.length) {
            for (var f = p.length; f < this.passes.length; f++) {
              var _ = this.passes[f];
              _ && (_.colorBuffer.destroy(), _.positionBuffer.destroy(), _.dashTexture.destroy());
            }
            this.passes.length = p.length;
          }
          for (var b = [], w = 0; w < this.passes.length; w++)
            this.passes[w] !== null && b.push(this.passes[w]);
          return this.passes = b, this;
        }
      }, i.prototype.destroy = function() {
        return this.passes.forEach(function(p) {
          p.colorBuffer.destroy(), p.positionBuffer.destroy(), p.dashTexture.destroy();
        }), this.passes.length = 0, this;
      };
    }, { "array-bounds": 71, "array-find-index": 72, "array-normalize": 73, "color-normalize": 89, earcut: 129, "es6-weak-map": 183, "flatten-vertex-data": 191, glslify: 227, "object-assign": 247, "parse-rect": 249, "pick-by-alias": 253, "to-float32": 314 }], 282: [function(v, Q, $) {
      function m(f, _) {
        return function(b) {
          if (Array.isArray(b))
            return b;
        }(f) || function(b, w) {
          var T = b == null ? null : typeof Symbol < "u" && b[Symbol.iterator] || b["@@iterator"];
          if (T != null) {
            var L, A, I = [], P = !0, S = !1;
            try {
              for (T = T.call(b); !(P = (L = T.next()).done) && (I.push(L.value), !w || I.length !== w); P = !0)
                ;
            } catch (E) {
              S = !0, A = E;
            } finally {
              try {
                P || T.return == null || T.return();
              } finally {
                if (S)
                  throw A;
              }
            }
            return I;
          }
        }(f, _) || k(f, _) || function() {
          throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }();
      }
      function g(f) {
        return function(_) {
          if (Array.isArray(_))
            return x(_);
        }(f) || function(_) {
          if (typeof Symbol < "u" && _[Symbol.iterator] != null || _["@@iterator"] != null)
            return Array.from(_);
        }(f) || k(f) || function() {
          throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }();
      }
      function k(f, _) {
        if (f) {
          if (typeof f == "string")
            return x(f, _);
          var b = Object.prototype.toString.call(f).slice(8, -1);
          return b === "Object" && f.constructor && (b = f.constructor.name), b === "Map" || b === "Set" ? Array.from(f) : b === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b) ? x(f, _) : void 0;
        }
      }
      function x(f, _) {
        (_ == null || _ > f.length) && (_ = f.length);
        for (var b = 0, w = new Array(_); b < _; b++)
          w[b] = f[b];
        return w;
      }
      var e = v("color-normalize"), r = v("array-bounds"), n = v("color-id"), s = v("@plotly/point-cluster"), t = v("object-assign"), d = v("glslify"), u = v("pick-by-alias"), o = v("update-diff"), h = v("flatten-vertex-data"), l = v("is-iexplorer"), i = v("to-float32"), p = v("parse-rect"), c = a;
      function a(f, _) {
        var b = this;
        if (!(this instanceof a))
          return new a(f, _);
        typeof f == "function" ? (_ || (_ = {}), _.regl = f) : (_ = f, f = null), _ && _.length && (_.positions = _);
        var w, T = (f = _.regl)._gl, L = [];
        this.tooManyColors = l, w = f.texture({ data: new Uint8Array(1020), width: 255, height: 1, type: "uint8", format: "rgba", wrapS: "clamp", wrapT: "clamp", mag: "nearest", min: "nearest" }), t(this, { regl: f, gl: T, groups: [], markerCache: [null], markerTextures: [null], palette: L, paletteIds: {}, paletteTexture: w, maxColors: 255, maxSize: 100, canvas: T.canvas }), this.update(_);
        var A = { uniforms: { constPointSize: !!_.constPointSize, opacity: f.prop("opacity"), paletteSize: function(S, E) {
          return [b.tooManyColors ? 0 : 255, w.height];
        }, pixelRatio: f.context("pixelRatio"), scale: f.prop("scale"), scaleFract: f.prop("scaleFract"), translate: f.prop("translate"), translateFract: f.prop("translateFract"), markerTexture: f.prop("markerTexture"), paletteTexture: w }, attributes: { x: function(S, E) {
          return E.xAttr || { buffer: E.positionBuffer, stride: 8, offset: 0 };
        }, y: function(S, E) {
          return E.yAttr || { buffer: E.positionBuffer, stride: 8, offset: 4 };
        }, xFract: function(S, E) {
          return E.xAttr ? { constant: [0, 0] } : { buffer: E.positionFractBuffer, stride: 8, offset: 0 };
        }, yFract: function(S, E) {
          return E.yAttr ? { constant: [0, 0] } : { buffer: E.positionFractBuffer, stride: 8, offset: 4 };
        }, size: function(S, E) {
          return E.size.length ? { buffer: E.sizeBuffer, stride: 2, offset: 0 } : { constant: [Math.round(255 * E.size / b.maxSize)] };
        }, borderSize: function(S, E) {
          return E.borderSize.length ? { buffer: E.sizeBuffer, stride: 2, offset: 1 } : { constant: [Math.round(255 * E.borderSize / b.maxSize)] };
        }, colorId: function(S, E) {
          return E.color.length ? { buffer: E.colorBuffer, stride: b.tooManyColors ? 8 : 4, offset: 0 } : { constant: b.tooManyColors ? L.slice(4 * E.color, 4 * E.color + 4) : [E.color] };
        }, borderColorId: function(S, E) {
          return E.borderColor.length ? { buffer: E.colorBuffer, stride: b.tooManyColors ? 8 : 4, offset: b.tooManyColors ? 4 : 2 } : { constant: b.tooManyColors ? L.slice(4 * E.borderColor, 4 * E.borderColor + 4) : [E.borderColor] };
        }, isActive: function(S, E) {
          return E.activation === !0 ? { constant: [1] } : E.activation ? E.activation : { constant: [0] };
        } }, blend: { enable: !0, color: [0, 0, 0, 1], func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, scissor: { enable: !0, box: f.prop("viewport") }, viewport: f.prop("viewport"), stencil: { enable: !1 }, depth: { enable: !1 }, elements: f.prop("elements"), count: f.prop("count"), offset: f.prop("offset"), primitive: "points" }, I = t({}, A);
        I.frag = d([`precision highp float;
#define GLSLIFY 1

uniform float opacity;
uniform sampler2D markerTexture;

varying vec4 fragColor, fragBorderColor;
varying float fragWidth, fragBorderColorLevel, fragColorLevel;

float smoothStep(float x, float y) {
  return 1.0 / (1.0 + exp(50.0*(x - y)));
}

void main() {
  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;

  // max-distance alpha
  if (dist < 0.003) discard;

  // null-border case
  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {
    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);
    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);
  }
  else {
    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);
    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);

    vec4 color = fragBorderColor;
    color.a *= borderColorAmt;
    color = mix(color, fragColor, colorAmt);
    color.a *= opacity;

    gl_FragColor = color;
  }

}
`]), I.vert = d([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;
uniform sampler2D paletteTexture;

const float maxSize = 100.;
const float borderLevel = .5;

varying vec4 fragColor, fragBorderColor;
varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = 2. * size * pointSizeScale;
  fragPointSize = size * pixelRatio;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragColor = color;
  fragBorderColor = borderColor;
  fragWidth = 1. / gl_PointSize;

  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
}`]), this.drawMarker = f(I);
        var P = t({}, A);
        P.frag = d([`precision highp float;
#define GLSLIFY 1

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

uniform float opacity;

float smoothStep(float edge0, float edge1, float x) {
	float t;
	t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
	return t * t * (3.0 - 2.0 * t);
}

void main() {
	float radius, alpha = 1.0, delta = fragWidth;

	radius = length(2.0 * gl_PointCoord.xy - 1.0);

	if (radius > 1.0 + delta) {
		discard;
	}

	alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);

	float borderRadius = fragBorderRadius;
	float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);
	vec4 color = mix(fragColor, fragBorderColor, ratio);
	color.a *= alpha * opacity;
	gl_FragColor = color;
}
`]), P.vert = d([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
uniform sampler2D paletteTexture;

const float maxSize = 100.;

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = (size + borderSize) * pointSizeScale;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
  fragColor = color;
  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
  fragWidth = 1. / gl_PointSize;
}
`]), l && (P.frag = P.frag.replace("smoothstep", "smoothStep"), I.frag = I.frag.replace("smoothstep", "smoothStep")), this.drawCircle = f(P);
      }
      a.defaults = { color: "black", borderColor: "transparent", borderSize: 0, size: 12, opacity: 1, marker: void 0, viewport: null, range: null, pixelSize: null, count: 0, offset: 0, bounds: null, positions: [], snap: 1e4 }, a.prototype.render = function() {
        return arguments.length && this.update.apply(this, arguments), this.draw(), this;
      }, a.prototype.draw = function() {
        for (var f = this, _ = arguments.length, b = new Array(_), w = 0; w < _; w++)
          b[w] = arguments[w];
        var T = this.groups;
        if (b.length === 1 && Array.isArray(b[0]) && (b[0][0] === null || Array.isArray(b[0][0])) && (b = b[0]), this.regl._refresh(), b.length)
          for (var L = 0; L < b.length; L++)
            this.drawItem(L, b[L]);
        else
          T.forEach(function(A, I) {
            f.drawItem(I);
          });
        return this;
      }, a.prototype.drawItem = function(f, _) {
        var b = this.groups, w = b[f];
        if (typeof _ == "number" && (f = _, w = b[_], _ = null), w && w.count && w.opacity) {
          w.activation[0] && this.drawCircle(this.getMarkerDrawOptions(0, w, _));
          for (var T = [], L = 1; L < w.activation.length; L++)
            w.activation[L] && (w.activation[L] === !0 || w.activation[L].data.length) && T.push.apply(T, g(this.getMarkerDrawOptions(L, w, _)));
          T.length && this.drawMarker(T);
        }
      }, a.prototype.getMarkerDrawOptions = function(f, _, b) {
        var w = _.range, T = _.tree, L = _.viewport, A = _.activation, I = _.selectionBuffer, P = _.count;
        if (this.regl, !T)
          return b ? [t({}, _, { markerTexture: this.markerTextures[f], activation: A[f], count: b.length, elements: b, offset: 0 })] : [t({}, _, { markerTexture: this.markerTextures[f], activation: A[f], offset: 0 })];
        var S = [], E = T.range(w, { lod: !0, px: [(w[2] - w[0]) / L.width, (w[3] - w[1]) / L.height] });
        if (b) {
          for (var R = A[f].data, z = new Uint8Array(P), j = 0; j < b.length; j++) {
            var H = b[j];
            z[H] = R ? R[H] : 1;
          }
          I.subdata(z);
        }
        for (var Y = E.length; Y--; ) {
          var J = m(E[Y], 2), W = J[0], Z = J[1];
          S.push(t({}, _, { markerTexture: this.markerTextures[f], activation: b ? I : A[f], offset: W, count: Z - W }));
        }
        return S;
      }, a.prototype.update = function() {
        for (var f = this, _ = arguments.length, b = new Array(_), w = 0; w < _; w++)
          b[w] = arguments[w];
        if (b.length) {
          b.length === 1 && Array.isArray(b[0]) && (b = b[0]);
          var T = this.groups, L = this.gl, A = this.regl, I = this.maxSize, P = this.maxColors, S = this.palette;
          this.groups = T = b.map(function(E, R) {
            var z = T[R];
            if (E === void 0)
              return z;
            E === null ? E = { positions: null } : typeof E == "function" ? E = { ondraw: E } : typeof E[0] == "number" && (E = { positions: E }), (E = u(E, { positions: "positions data points", snap: "snap cluster lod tree", size: "sizes size radius", borderSize: "borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline", color: "colors color fill fill-color fillColor", borderColor: "borderColors borderColor stroke stroke-color strokeColor", marker: "markers marker shape", range: "range dataBox databox", viewport: "viewport viewPort viewBox viewbox", opacity: "opacity alpha transparency", bounds: "bound bounds boundaries limits", tooManyColors: "tooManyColors palette paletteMode optimizePalette enablePalette" })).positions === null && (E.positions = []), E.tooManyColors != null && (f.tooManyColors = E.tooManyColors), z || (T[R] = z = { id: R, scale: null, translate: null, scaleFract: null, translateFract: null, activation: [], selectionBuffer: A.buffer({ data: new Uint8Array(0), usage: "stream", type: "uint8" }), sizeBuffer: A.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "uint8" }), colorBuffer: A.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "uint8" }), positionBuffer: A.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "float" }), positionFractBuffer: A.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "float" }) }, E = t({}, a.defaults, E)), E.positions && !("marker" in E) && (E.marker = z.marker, delete z.marker), E.marker && !("positions" in E) && (E.positions = z.positions, delete z.positions);
            var j = 0, H = 0;
            if (o(z, E, [{ snap: !0, size: function(ue, ye) {
              return ue == null && (ue = a.defaults.size), j += ue && ue.length ? 1 : 0, ue;
            }, borderSize: function(ue, ye) {
              return ue == null && (ue = a.defaults.borderSize), j += ue && ue.length ? 1 : 0, ue;
            }, opacity: parseFloat, color: function(ue, ye) {
              return ue == null && (ue = a.defaults.color), ue = f.updateColor(ue), H++, ue;
            }, borderColor: function(ue, ye) {
              return ue == null && (ue = a.defaults.borderColor), ue = f.updateColor(ue), H++, ue;
            }, bounds: function(ue, ye, Ae) {
              return "range" in Ae || (Ae.range = null), ue;
            }, positions: function(ue, ye, Ae) {
              var pe = ye.snap, ge = ye.positionBuffer, we = ye.positionFractBuffer, se = ye.selectionBuffer;
              if (ue.x || ue.y)
                return ue.x.length ? ye.xAttr = { buffer: A.buffer(ue.x), offset: 0, stride: 4, count: ue.x.length } : ye.xAttr = { buffer: ue.x.buffer, offset: 4 * ue.x.offset || 0, stride: 4 * (ue.x.stride || 1), count: ue.x.count }, ue.y.length ? ye.yAttr = { buffer: A.buffer(ue.y), offset: 0, stride: 4, count: ue.y.length } : ye.yAttr = { buffer: ue.y.buffer, offset: 4 * ue.y.offset || 0, stride: 4 * (ue.y.stride || 1), count: ue.y.count }, ye.count = Math.max(ye.xAttr.count, ye.yAttr.count), ue;
              ue = h(ue, "float64");
              var de = ye.count = Math.floor(ue.length / 2), Te = ye.bounds = de ? r(ue, 2) : null;
              if (Ae.range || ye.range || (delete ye.range, Ae.range = Te), Ae.marker || ye.marker || (delete ye.marker, Ae.marker = null), pe && (pe === !0 || de > pe) ? ye.tree = s(ue, { bounds: Te }) : pe && pe.length && (ye.tree = pe), ye.tree) {
                var Ee = { primitive: "points", usage: "static", data: ye.tree, type: "uint32" };
                ye.elements ? ye.elements(Ee) : ye.elements = A.elements(Ee);
              }
              var Me = i.float32(ue);
              return ge({ data: Me, usage: "dynamic" }), we({ data: i.fract32(ue, Me), usage: "dynamic" }), se({ data: new Uint8Array(de), type: "uint8", usage: "stream" }), ue;
            } }, { marker: function(ue, ye, Ae) {
              var pe = ye.activation;
              if (pe.forEach(function(Me) {
                return Me && Me.destroy && Me.destroy();
              }), pe.length = 0, ue && typeof ue[0] != "number") {
                for (var ge = [], we = 0, se = Math.min(ue.length, ye.count); we < se; we++) {
                  var de = f.addMarker(ue[we]);
                  ge[de] || (ge[de] = new Uint8Array(ye.count)), ge[de][we] = 1;
                }
                for (var Te = 0; Te < ge.length; Te++)
                  if (ge[Te]) {
                    var Ee = { data: ge[Te], type: "uint8", usage: "static" };
                    pe[Te] ? pe[Te](Ee) : pe[Te] = A.buffer(Ee), pe[Te].data = ge[Te];
                  }
              } else
                pe[f.addMarker(ue)] = !0;
              return ue;
            }, range: function(ue, ye, Ae) {
              var pe = ye.bounds;
              if (pe)
                return ue || (ue = pe), ye.scale = [1 / (ue[2] - ue[0]), 1 / (ue[3] - ue[1])], ye.translate = [-ue[0], -ue[1]], ye.scaleFract = i.fract(ye.scale), ye.translateFract = i.fract(ye.translate), ue;
            }, viewport: function(ue) {
              return p(ue || [L.drawingBufferWidth, L.drawingBufferHeight]);
            } }]), j) {
              var Y = z, J = Y.count, W = Y.size, Z = Y.borderSize, re = Y.sizeBuffer, V = new Uint8Array(2 * J);
              if (W.length || Z.length)
                for (var B = 0; B < J; B++)
                  V[2 * B] = Math.round(255 * (W[B] == null ? W : W[B]) / I), V[2 * B + 1] = Math.round(255 * (Z[B] == null ? Z : Z[B]) / I);
              re({ data: V, usage: "dynamic" });
            }
            if (H) {
              var U, ee = z, N = ee.count, K = ee.color, X = ee.borderColor, te = ee.colorBuffer;
              if (f.tooManyColors) {
                if (K.length || X.length) {
                  U = new Uint8Array(8 * N);
                  for (var ie = 0; ie < N; ie++) {
                    var le = K[ie];
                    U[8 * ie] = S[4 * le], U[8 * ie + 1] = S[4 * le + 1], U[8 * ie + 2] = S[4 * le + 2], U[8 * ie + 3] = S[4 * le + 3];
                    var oe = X[ie];
                    U[8 * ie + 4] = S[4 * oe], U[8 * ie + 5] = S[4 * oe + 1], U[8 * ie + 6] = S[4 * oe + 2], U[8 * ie + 7] = S[4 * oe + 3];
                  }
                }
              } else if (K.length || X.length) {
                U = new Uint8Array(4 * N + 2);
                for (var ve = 0; ve < N; ve++)
                  K[ve] != null && (U[4 * ve] = K[ve] % P, U[4 * ve + 1] = Math.floor(K[ve] / P)), X[ve] != null && (U[4 * ve + 2] = X[ve] % P, U[4 * ve + 3] = Math.floor(X[ve] / P));
              }
              te({ data: U || new Uint8Array(0), type: "uint8", usage: "dynamic" });
            }
            return z;
          });
        }
      }, a.prototype.addMarker = function(f) {
        var _, b = this.markerTextures, w = this.regl, T = this.markerCache, L = f == null ? 0 : T.indexOf(f);
        if (L >= 0)
          return L;
        if (f instanceof Uint8Array || f instanceof Uint8ClampedArray)
          _ = f;
        else {
          _ = new Uint8Array(f.length);
          for (var A = 0, I = f.length; A < I; A++)
            _[A] = 255 * f[A];
        }
        var P = Math.floor(Math.sqrt(_.length));
        return L = b.length, T.push(f), b.push(w.texture({ channels: 1, data: _, radius: P, mag: "linear", min: "linear" })), L;
      }, a.prototype.updateColor = function(f) {
        var _ = this.paletteIds, b = this.palette, w = this.maxColors;
        Array.isArray(f) || (f = [f]);
        var T = [];
        if (typeof f[0] == "number") {
          var L = [];
          if (Array.isArray(f))
            for (var A = 0; A < f.length; A += 4)
              L.push(f.slice(A, A + 4));
          else
            for (var I = 0; I < f.length; I += 4)
              L.push(f.subarray(I, I + 4));
          f = L;
        }
        for (var P = 0; P < f.length; P++) {
          var S = f[P];
          S = e(S, "uint8");
          var E = n(S, !1);
          if (_[E] == null) {
            var R = b.length;
            _[E] = Math.floor(R / 4), b[R] = S[0], b[R + 1] = S[1], b[R + 2] = S[2], b[R + 3] = S[3];
          }
          T[P] = _[E];
        }
        return !this.tooManyColors && b.length > 4 * w && (this.tooManyColors = !0), this.updatePalette(b), T.length === 1 ? T[0] : T;
      }, a.prototype.updatePalette = function(f) {
        if (!this.tooManyColors) {
          var _ = this.maxColors, b = this.paletteTexture, w = Math.ceil(0.25 * f.length / _);
          if (w > 1)
            for (var T = 0.25 * (f = f.slice()).length % _; T < w * _; T++)
              f.push(0, 0, 0, 0);
          b.height < w && b.resize(_, w), b.subimage({ width: Math.min(0.25 * f.length, _), height: w, data: f }, 0, 0);
        }
      }, a.prototype.destroy = function() {
        return this.groups.forEach(function(f) {
          f.sizeBuffer.destroy(), f.positionBuffer.destroy(), f.positionFractBuffer.destroy(), f.colorBuffer.destroy(), f.activation.forEach(function(_) {
            return _ && _.destroy && _.destroy();
          }), f.selectionBuffer.destroy(), f.elements && f.elements.destroy();
        }), this.groups.length = 0, this.paletteTexture.destroy(), this.markerTextures.forEach(function(f) {
          return f && f.destroy && f.destroy();
        }), this;
      };
      var y = v("object-assign");
      Q.exports = function(f, _) {
        var b = new c(f, _), w = b.render.bind(b);
        return y(w, { render: w, update: b.update.bind(b), draw: b.draw.bind(b), destroy: b.destroy.bind(b), regl: b.regl, gl: b.gl, canvas: b.gl.canvas, groups: b.groups, markers: b.markerCache, palette: b.palette }), w;
      };
    }, { "@plotly/point-cluster": 59, "array-bounds": 71, "color-id": 87, "color-normalize": 89, "flatten-vertex-data": 191, glslify: 227, "is-iexplorer": 233, "object-assign": 247, "parse-rect": 249, "pick-by-alias": 253, "to-float32": 314, "update-diff": 330 }], 283: [function(v, Q, $) {
      var m = v("regl-scatter2d"), g = v("pick-by-alias"), k = v("array-bounds"), x = v("raf"), e = v("array-range"), r = v("parse-rect"), n = v("flatten-vertex-data");
      function s(o, h) {
        if (!(this instanceof s))
          return new s(o);
        this.traces = [], this.passes = {}, this.regl = o, this.scatter = m(o), this.canvas = this.scatter.canvas;
      }
      function t(o, h, l) {
        return (o.id != null ? o.id : o) << 16 | (255 & h) << 8 | 255 & l;
      }
      function d(o, h, l) {
        var i, p, c, a, y = o[h], f = o[l];
        return y.length > 2 ? (y[0], y[2], i = y[1], p = y[3]) : y.length ? (i = y[0], p = y[1]) : (y.x, i = y.y, y.x + y.width, p = y.y + y.height), f.length > 2 ? (c = f[0], a = f[2], f[1], f[3]) : f.length ? (c = f[0], a = f[1]) : (c = f.x, f.y, a = f.x + f.width, f.y + f.height), [c, i, a, p];
      }
      function u(o) {
        if (typeof o == "number")
          return [o, o, o, o];
        if (o.length === 2)
          return [o[0], o[1], o[0], o[1]];
        var h = r(o);
        return [h.x, h.y, h.x + h.width, h.y + h.height];
      }
      Q.exports = s, s.prototype.render = function() {
        for (var o, h = this, l = [], i = arguments.length; i--; )
          l[i] = arguments[i];
        return l.length && (o = this).update.apply(o, l), this.regl.attributes.preserveDrawingBuffer ? this.draw() : (this.dirty ? this.planned == null && (this.planned = x(function() {
          h.draw(), h.dirty = !0, h.planned = null;
        })) : (this.draw(), this.dirty = !0, x(function() {
          h.dirty = !1;
        })), this);
      }, s.prototype.update = function() {
        for (var o, h = [], l = arguments.length; l--; )
          h[l] = arguments[l];
        if (h.length) {
          for (var i = 0; i < h.length; i++)
            this.updateItem(i, h[i]);
          this.traces = this.traces.filter(Boolean);
          for (var p = [], c = 0, a = 0; a < this.traces.length; a++) {
            for (var y = this.traces[a], f = this.traces[a].passes, _ = 0; _ < f.length; _++)
              p.push(this.passes[f[_]]);
            y.passOffset = c, c += y.passes.length;
          }
          return (o = this.scatter).update.apply(o, p), this;
        }
      }, s.prototype.updateItem = function(o, h) {
        var l = this.regl;
        if (h === null)
          return this.traces[o] = null, this;
        if (!h)
          return this;
        var i, p = g(h, { data: "data items columns rows values dimensions samples x", snap: "snap cluster", size: "sizes size radius", color: "colors color fill fill-color fillColor", opacity: "opacity alpha transparency opaque", borderSize: "borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline", borderColor: "borderColors borderColor bordercolor stroke stroke-color strokeColor", marker: "markers marker shape", range: "range ranges databox dataBox", viewport: "viewport viewBox viewbox", domain: "domain domains area areas", padding: "pad padding paddings pads margin margins", transpose: "transpose transposed", diagonal: "diagonal diag showDiagonal", upper: "upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf", lower: "lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower" }), c = this.traces[o] || (this.traces[o] = { id: o, buffer: l.buffer({ usage: "dynamic", type: "float", data: new Uint8Array() }), color: "black", marker: null, size: 12, borderColor: "transparent", borderSize: 1, viewport: r([l._gl.drawingBufferWidth, l._gl.drawingBufferHeight]), padding: [0, 0, 0, 0], opacity: 1, diagonal: !0, upper: !0, lower: !0 });
        if (p.color != null && (c.color = p.color), p.size != null && (c.size = p.size), p.marker != null && (c.marker = p.marker), p.borderColor != null && (c.borderColor = p.borderColor), p.borderSize != null && (c.borderSize = p.borderSize), p.opacity != null && (c.opacity = p.opacity), p.viewport && (c.viewport = r(p.viewport)), p.diagonal != null && (c.diagonal = p.diagonal), p.upper != null && (c.upper = p.upper), p.lower != null && (c.lower = p.lower), p.data) {
          c.buffer(n(p.data)), c.columns = p.data.length, c.count = p.data[0].length, c.bounds = [];
          for (var a = 0; a < c.columns; a++)
            c.bounds[a] = k(p.data[a], 1);
        }
        p.range && (c.range = p.range, i = c.range && typeof c.range[0] != "number"), p.domain && (c.domain = p.domain);
        var y = !1;
        p.padding != null && (Array.isArray(p.padding) && p.padding.length === c.columns && typeof p.padding[p.padding.length - 1] == "number" ? (c.padding = p.padding.map(u), y = !0) : c.padding = u(p.padding));
        var f = c.columns, _ = c.count, b = c.viewport.width, w = c.viewport.height, T = c.viewport.x, L = c.viewport.y, A = b / f, I = w / f;
        c.passes = [];
        for (var P = 0; P < f; P++)
          for (var S = 0; S < f; S++)
            if ((c.diagonal || S !== P) && (c.upper || !(P > S)) && (c.lower || !(P < S))) {
              var E = t(c.id, P, S), R = this.passes[E] || (this.passes[E] = {});
              if (p.data && (p.transpose ? R.positions = { x: { buffer: c.buffer, offset: S, count: _, stride: f }, y: { buffer: c.buffer, offset: P, count: _, stride: f } } : R.positions = { x: { buffer: c.buffer, offset: S * _, count: _ }, y: { buffer: c.buffer, offset: P * _, count: _ } }, R.bounds = d(c.bounds, P, S)), p.domain || p.viewport || p.data) {
                var z = y ? d(c.padding, P, S) : c.padding;
                if (c.domain) {
                  var j = d(c.domain, P, S), H = j[0], Y = j[1], J = j[2], W = j[3];
                  R.viewport = [T + H * b + z[0], L + Y * w + z[1], T + J * b - z[2], L + W * w - z[3]];
                } else
                  R.viewport = [T + S * A + A * z[0], L + P * I + I * z[1], T + (S + 1) * A - A * z[2], L + (P + 1) * I - I * z[3]];
              }
              p.color && (R.color = c.color), p.size && (R.size = c.size), p.marker && (R.marker = c.marker), p.borderSize && (R.borderSize = c.borderSize), p.borderColor && (R.borderColor = c.borderColor), p.opacity && (R.opacity = c.opacity), p.range && (R.range = i ? d(c.range, P, S) : c.range || R.bounds), c.passes.push(E);
            }
        return this;
      }, s.prototype.draw = function() {
        for (var o, h = [], l = arguments.length; l--; )
          h[l] = arguments[l];
        if (h.length) {
          for (var i = [], p = 0; p < h.length; p++)
            if (typeof h[p] == "number") {
              var c = this.traces[h[p]], a = c.passes, y = c.passOffset;
              i.push.apply(i, e(y, y + a.length));
            } else if (h[p].length) {
              var f = h[p], _ = this.traces[p], b = _.passes, w = _.passOffset;
              b = b.map(function(T, L) {
                i[w + L] = f;
              });
            }
          (o = this.scatter).draw.apply(o, i);
        } else
          this.scatter.draw();
        return this;
      }, s.prototype.destroy = function() {
        return this.traces.forEach(function(o) {
          o.buffer && o.buffer.destroy && o.buffer.destroy();
        }), this.traces = null, this.passes = null, this.scatter.destroy(), this;
      };
    }, { "array-bounds": 71, "array-range": 74, "flatten-vertex-data": 191, "parse-rect": 249, "pick-by-alias": 253, raf: 279, "regl-scatter2d": 282 }], 284: [function(v, Q, $) {
      (function(m, g) {
        typeof $ == "object" && Q !== void 0 ? Q.exports = g() : m.createREGL = g();
      })(this, function() {
        function m(he, be) {
          this.id = K++, this.type = he, this.data = be;
        }
        function g(he) {
          return "[" + function be(Re) {
            if (Re.length === 0)
              return [];
            var Ue = Re.charAt(0), Xe = Re.charAt(Re.length - 1);
            if (1 < Re.length && Ue === Xe && (Ue === '"' || Ue === "'"))
              return ['"' + Re.substr(1, Re.length - 2).replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'];
            if (Ue = /\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Re))
              return be(Re.substr(0, Ue.index)).concat(be(Ue[1])).concat(be(Re.substr(Ue.index + Ue[0].length)));
            if ((Ue = Re.split(".")).length === 1)
              return ['"' + Re.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'];
            for (Re = [], Xe = 0; Xe < Ue.length; ++Xe)
              Re = Re.concat(be(Ue[Xe]));
            return Re;
          }(he).join("][") + "]";
        }
        function k(he) {
          return typeof he == "string" ? he.split() : he;
        }
        function x(he) {
          return typeof he == "string" ? document.querySelector(he) : he;
        }
        function e(he) {
          var be, Re, Ue, Xe, qe = he || {};
          he = {};
          var st = [], it = [], Tt = typeof window > "u" ? 1 : window.devicePixelRatio, Pt = !1, rt = {}, ut = function(wt) {
          }, Bt = function() {
          };
          if (typeof qe == "string" ? be = document.querySelector(qe) : typeof qe == "object" && (typeof qe.nodeName == "string" && typeof qe.appendChild == "function" && typeof qe.getBoundingClientRect == "function" ? be = qe : typeof qe.drawArrays == "function" || typeof qe.drawElements == "function" ? Ue = (Xe = qe).canvas : ("gl" in qe ? Xe = qe.gl : "canvas" in qe ? Ue = x(qe.canvas) : "container" in qe && (Re = x(qe.container)), "attributes" in qe && (he = qe.attributes), "extensions" in qe && (st = k(qe.extensions)), "optionalExtensions" in qe && (it = k(qe.optionalExtensions)), "onDone" in qe && (ut = qe.onDone), "profile" in qe && (Pt = !!qe.profile), "pixelRatio" in qe && (Tt = +qe.pixelRatio), "cachedCode" in qe && (rt = qe.cachedCode))), be && (be.nodeName.toLowerCase() === "canvas" ? Ue = be : Re = be), !Xe) {
            if (!Ue) {
              if (!(be = function(wt, Lt, Se) {
                function We() {
                  var Mt = window.innerWidth, Nt = window.innerHeight;
                  wt !== document.body && (Mt = (Nt = ft.getBoundingClientRect()).right - Nt.left, Nt = Nt.bottom - Nt.top), ft.width = Se * Mt, ft.height = Se * Nt;
                }
                var nt, ft = document.createElement("canvas");
                return N(ft.style, { border: 0, margin: 0, padding: 0, top: 0, left: 0, width: "100%", height: "100%" }), wt.appendChild(ft), wt === document.body && (ft.style.position = "absolute", N(wt.style, { margin: 0, padding: 0 })), wt !== document.body && typeof ResizeObserver == "function" ? (nt = new ResizeObserver(function() {
                  setTimeout(We);
                })).observe(wt) : window.addEventListener("resize", We, !1), We(), { canvas: ft, onDestroy: function() {
                  nt ? nt.disconnect() : window.removeEventListener("resize", We), wt.removeChild(ft);
                } };
              }(Re || document.body, 0, Tt)))
                return null;
              Ue = be.canvas, Bt = be.onDestroy;
            }
            he.premultipliedAlpha === void 0 && (he.premultipliedAlpha = !0), Xe = function(wt, Lt) {
              function Se(We) {
                try {
                  return wt.getContext(We, Lt);
                } catch {
                  return null;
                }
              }
              return Se("webgl") || Se("experimental-webgl") || Se("webgl-experimental");
            }(Ue, he);
          }
          return Xe ? { gl: Xe, canvas: Ue, container: Re, extensions: st, optionalExtensions: it, pixelRatio: Tt, profile: Pt, cachedCode: rt, onDone: ut, onDestroy: Bt } : (Bt(), ut("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"), null);
        }
        function r(he, be) {
          for (var Re = Array(he), Ue = 0; Ue < he; ++Ue)
            Re[Ue] = be(Ue);
          return Re;
        }
        function n(he) {
          var be, Re;
          return be = (65535 < he) << 4, be |= Re = (255 < (he >>>= be)) << 3, (be |= Re = (15 < (he >>>= Re)) << 2) | (Re = (3 < (he >>>= Re)) << 1) | he >>> Re >> 1;
        }
        function s() {
          function he(Ue) {
            e: {
              for (var Xe = 16; 268435456 >= Xe; Xe *= 16)
                if (Ue <= Xe) {
                  Ue = Xe;
                  break e;
                }
              Ue = 0;
            }
            return 0 < (Xe = Re[n(Ue) >> 2]).length ? Xe.pop() : new ArrayBuffer(Ue);
          }
          function be(Ue) {
            Re[n(Ue.byteLength) >> 2].push(Ue);
          }
          var Re = r(8, function() {
            return [];
          });
          return { alloc: he, free: be, allocType: function(Ue, Xe) {
            var qe = null;
            switch (Ue) {
              case 5120:
                qe = new Int8Array(he(Xe), 0, Xe);
                break;
              case 5121:
                qe = new Uint8Array(he(Xe), 0, Xe);
                break;
              case 5122:
                qe = new Int16Array(he(2 * Xe), 0, Xe);
                break;
              case 5123:
                qe = new Uint16Array(he(2 * Xe), 0, Xe);
                break;
              case 5124:
                qe = new Int32Array(he(4 * Xe), 0, Xe);
                break;
              case 5125:
                qe = new Uint32Array(he(4 * Xe), 0, Xe);
                break;
              case 5126:
                qe = new Float32Array(he(4 * Xe), 0, Xe);
                break;
              default:
                return null;
            }
            return qe.length !== Xe ? qe.subarray(0, Xe) : qe;
          }, freeType: function(Ue) {
            be(Ue.buffer);
          } };
        }
        function t(he) {
          return !!he && typeof he == "object" && Array.isArray(he.shape) && Array.isArray(he.stride) && typeof he.offset == "number" && he.shape.length === he.stride.length && (Array.isArray(he.data) || ve(he.data));
        }
        function d(he, be, Re, Ue, Xe, qe) {
          for (var st = 0; st < be; ++st)
            for (var it = he[st], Tt = 0; Tt < Re; ++Tt)
              for (var Pt = it[Tt], rt = 0; rt < Ue; ++rt)
                Xe[qe++] = Pt[rt];
        }
        function u(he) {
          return 0 | Ae[Object.prototype.toString.call(he)];
        }
        function o(he, be) {
          for (var Re = 0; Re < be.length; ++Re)
            he[Re] = be[Re];
        }
        function h(he, be, Re, Ue, Xe, qe, st) {
          for (var it = 0, Tt = 0; Tt < Re; ++Tt)
            for (var Pt = 0; Pt < Ue; ++Pt)
              he[it++] = be[Xe * Tt + qe * Pt + st];
        }
        function l(he, be, Re, Ue) {
          function Xe(ut) {
            this.id = Tt++, this.buffer = he.createBuffer(), this.type = ut, this.usage = 35044, this.byteLength = 0, this.dimension = 1, this.dtype = 5121, this.persistentData = null, Re.profile && (this.stats = { size: 0 });
          }
          function qe(ut, Bt, wt) {
            ut.byteLength = Bt.byteLength, he.bufferData(ut.type, Bt, wt);
          }
          function st(ut, Bt, wt, Lt, Se, We) {
            if (ut.usage = wt, Array.isArray(Bt)) {
              if (ut.dtype = Lt || 5126, 0 < Bt.length)
                if (Array.isArray(Bt[0])) {
                  Se = se(Bt);
                  for (var nt = Lt = 1; nt < Se.length; ++nt)
                    Lt *= Se[nt];
                  ut.dimension = Lt, qe(ut, Bt = we(Bt, Se, ut.dtype), wt), We ? ut.persistentData = Bt : le.freeType(Bt);
                } else
                  typeof Bt[0] == "number" ? (ut.dimension = Se, o(Se = le.allocType(ut.dtype, Bt.length), Bt), qe(ut, Se, wt), We ? ut.persistentData = Se : le.freeType(Se)) : ve(Bt[0]) && (ut.dimension = Bt[0].length, ut.dtype = Lt || u(Bt[0]) || 5126, qe(ut, Bt = we(Bt, [Bt.length, Bt[0].length], ut.dtype), wt), We ? ut.persistentData = Bt : le.freeType(Bt));
            } else if (ve(Bt))
              ut.dtype = Lt || u(Bt), ut.dimension = Se, qe(ut, Bt, wt), We && (ut.persistentData = new Uint8Array(new Uint8Array(Bt.buffer)));
            else if (t(Bt)) {
              Se = Bt.shape;
              var ft = Bt.stride, Mt = (nt = Bt.offset, 0), Nt = 0, Zt = 0, Ut = 0;
              Se.length === 1 ? (Mt = Se[0], Nt = 1, Zt = ft[0], Ut = 0) : Se.length === 2 && (Mt = Se[0], Nt = Se[1], Zt = ft[0], Ut = ft[1]), ut.dtype = Lt || u(Bt.data) || 5126, ut.dimension = Nt, h(Se = le.allocType(ut.dtype, Mt * Nt), Bt.data, Mt, Nt, Zt, Ut, nt), qe(ut, Se, wt), We ? ut.persistentData = Se : le.freeType(Se);
            } else
              Bt instanceof ArrayBuffer && (ut.dtype = 5121, ut.dimension = Se, qe(ut, Bt, wt), We && (ut.persistentData = new Uint8Array(new Uint8Array(Bt))));
          }
          function it(ut) {
            be.bufferCount--, Ue(ut), he.deleteBuffer(ut.buffer), ut.buffer = null, delete Pt[ut.id];
          }
          var Tt = 0, Pt = {};
          Xe.prototype.bind = function() {
            he.bindBuffer(this.type, this.buffer);
          }, Xe.prototype.destroy = function() {
            it(this);
          };
          var rt = [];
          return Re.profile && (be.getTotalBufferSize = function() {
            var ut = 0;
            return Object.keys(Pt).forEach(function(Bt) {
              ut += Pt[Bt].stats.size;
            }), ut;
          }), { create: function(ut, Bt, wt, Lt) {
            function Se(nt) {
              var ft = 35044, Mt = null, Nt = 0, Zt = 0, Ut = 1;
              return Array.isArray(nt) || ve(nt) || t(nt) || nt instanceof ArrayBuffer ? Mt = nt : typeof nt == "number" ? Nt = 0 | nt : nt && ("data" in nt && (Mt = nt.data), "usage" in nt && (ft = ge[nt.usage]), "type" in nt && (Zt = pe[nt.type]), "dimension" in nt && (Ut = 0 | nt.dimension), "length" in nt && (Nt = 0 | nt.length)), We.bind(), Mt ? st(We, Mt, ft, Zt, Ut, Lt) : (Nt && he.bufferData(We.type, Nt, ft), We.dtype = Zt || 5121, We.usage = ft, We.dimension = Ut, We.byteLength = Nt), Re.profile && (We.stats.size = We.byteLength * de[We.dtype]), Se;
            }
            be.bufferCount++;
            var We = new Xe(Bt);
            return Pt[We.id] = We, wt || Se(ut), Se._reglType = "buffer", Se._buffer = We, Se.subdata = function(nt, ft) {
              var Mt, Nt = 0 | (ft || 0);
              if (We.bind(), ve(nt) || nt instanceof ArrayBuffer)
                he.bufferSubData(We.type, Nt, nt);
              else if (Array.isArray(nt)) {
                if (0 < nt.length)
                  if (typeof nt[0] == "number") {
                    var Zt = le.allocType(We.dtype, nt.length);
                    o(Zt, nt), he.bufferSubData(We.type, Nt, Zt), le.freeType(Zt);
                  } else
                    (Array.isArray(nt[0]) || ve(nt[0])) && (Mt = se(nt), Zt = we(nt, Mt, We.dtype), he.bufferSubData(We.type, Nt, Zt), le.freeType(Zt));
              } else if (t(nt)) {
                Mt = nt.shape;
                var Ut = nt.stride, fr = Zt = 0, Tr = 0, ur = 0;
                Mt.length === 1 ? (Zt = Mt[0], fr = 1, Tr = Ut[0], ur = 0) : Mt.length === 2 && (Zt = Mt[0], fr = Mt[1], Tr = Ut[0], ur = Ut[1]), Mt = Array.isArray(nt.data) ? We.dtype : u(nt.data), h(Mt = le.allocType(Mt, Zt * fr), nt.data, Zt, fr, Tr, ur, nt.offset), he.bufferSubData(We.type, Nt, Mt), le.freeType(Mt);
              }
              return Se;
            }, Re.profile && (Se.stats = We.stats), Se.destroy = function() {
              it(We);
            }, Se;
          }, createStream: function(ut, Bt) {
            var wt = rt.pop();
            return wt || (wt = new Xe(ut)), wt.bind(), st(wt, Bt, 35040, 0, 1, !1), wt;
          }, destroyStream: function(ut) {
            rt.push(ut);
          }, clear: function() {
            ue(Pt).forEach(it), rt.forEach(it);
          }, getBuffer: function(ut) {
            return ut && ut._buffer instanceof Xe ? ut._buffer : null;
          }, restore: function() {
            ue(Pt).forEach(function(ut) {
              ut.buffer = he.createBuffer(), he.bindBuffer(ut.type, ut.buffer), he.bufferData(ut.type, ut.persistentData || ut.byteLength, ut.usage);
            });
          }, _initBuffer: st };
        }
        function i(he, be, Re, Ue) {
          function Xe(ut) {
            this.id = Tt++, it[this.id] = this, this.buffer = ut, this.primType = 4, this.type = this.vertCount = 0;
          }
          function qe(ut, Bt, wt, Lt, Se, We, nt) {
            var ft;
            if (ut.buffer.bind(), Bt ? ((ft = nt) || ve(Bt) && (!t(Bt) || ve(Bt.data)) || (ft = be.oes_element_index_uint ? 5125 : 5123), Re._initBuffer(ut.buffer, Bt, wt, ft, 3)) : (he.bufferData(34963, We, wt), ut.buffer.dtype = ft || 5121, ut.buffer.usage = wt, ut.buffer.dimension = 3, ut.buffer.byteLength = We), ft = nt, !nt) {
              switch (ut.buffer.dtype) {
                case 5121:
                case 5120:
                  ft = 5121;
                  break;
                case 5123:
                case 5122:
                  ft = 5123;
                  break;
                case 5125:
                case 5124:
                  ft = 5125;
              }
              ut.buffer.dtype = ft;
            }
            ut.type = ft, 0 > (Bt = Se) && (Bt = ut.buffer.byteLength, ft === 5123 ? Bt >>= 1 : ft === 5125 && (Bt >>= 2)), ut.vertCount = Bt, Bt = Lt, 0 > Lt && (Bt = 4, (Lt = ut.buffer.dimension) === 1 && (Bt = 0), Lt === 2 && (Bt = 1), Lt === 3 && (Bt = 4)), ut.primType = Bt;
          }
          function st(ut) {
            Ue.elementsCount--, delete it[ut.id], ut.buffer.destroy(), ut.buffer = null;
          }
          var it = {}, Tt = 0, Pt = { uint8: 5121, uint16: 5123 };
          be.oes_element_index_uint && (Pt.uint32 = 5125), Xe.prototype.bind = function() {
            this.buffer.bind();
          };
          var rt = [];
          return { create: function(ut, Bt) {
            function wt(We) {
              if (We)
                if (typeof We == "number")
                  Lt(We), Se.primType = 4, Se.vertCount = 0 | We, Se.type = 5121;
                else {
                  var nt = null, ft = 35044, Mt = -1, Nt = -1, Zt = 0, Ut = 0;
                  Array.isArray(We) || ve(We) || t(We) ? nt = We : ("data" in We && (nt = We.data), "usage" in We && (ft = ge[We.usage]), "primitive" in We && (Mt = Te[We.primitive]), "count" in We && (Nt = 0 | We.count), "type" in We && (Ut = Pt[We.type]), "length" in We ? Zt = 0 | We.length : (Zt = Nt, Ut === 5123 || Ut === 5122 ? Zt *= 2 : Ut !== 5125 && Ut !== 5124 || (Zt *= 4))), qe(Se, nt, ft, Mt, Nt, Zt, Ut);
                }
              else
                Lt(), Se.primType = 4, Se.vertCount = 0, Se.type = 5121;
              return wt;
            }
            var Lt = Re.create(null, 34963, !0), Se = new Xe(Lt._buffer);
            return Ue.elementsCount++, wt(ut), wt._reglType = "elements", wt._elements = Se, wt.subdata = function(We, nt) {
              return Lt.subdata(We, nt), wt;
            }, wt.destroy = function() {
              st(Se);
            }, wt;
          }, createStream: function(ut) {
            var Bt = rt.pop();
            return Bt || (Bt = new Xe(Re.create(null, 34963, !0, !1)._buffer)), qe(Bt, ut, 35040, -1, -1, 0, 0), Bt;
          }, destroyStream: function(ut) {
            rt.push(ut);
          }, getElements: function(ut) {
            return typeof ut == "function" && ut._elements instanceof Xe ? ut._elements : null;
          }, clear: function() {
            ue(it).forEach(st);
          } };
        }
        function p(he) {
          for (var be = le.allocType(5123, he.length), Re = 0; Re < he.length; ++Re)
            if (isNaN(he[Re]))
              be[Re] = 65535;
            else if (1 / 0 === he[Re])
              be[Re] = 31744;
            else if (-1 / 0 === he[Re])
              be[Re] = 64512;
            else {
              Ee[0] = he[Re];
              var Ue = (qe = Me[0]) >>> 31 << 15, Xe = (qe << 1 >>> 24) - 127, qe = qe >> 13 & 1023;
              be[Re] = -24 > Xe ? Ue : -14 > Xe ? Ue + (qe + 1024 >> -14 - Xe) : 15 < Xe ? Ue + 31744 : Ue + (Xe + 15 << 10) + qe;
            }
          return be;
        }
        function c(he) {
          return Array.isArray(he) || ve(he);
        }
        function a(he) {
          return "[object " + he + "]";
        }
        function y(he) {
          return Array.isArray(he) && (he.length === 0 || typeof he[0] == "number");
        }
        function f(he) {
          return !(!Array.isArray(he) || he.length === 0 || !c(he[0]));
        }
        function _(he) {
          return Object.prototype.toString.call(he);
        }
        function b(he) {
          if (!he)
            return !1;
          var be = _(he);
          return 0 <= ot.indexOf(be) || y(he) || f(he) || t(he);
        }
        function w(he, be) {
          he.type === 36193 ? (he.data = p(be), le.freeType(be)) : he.data = be;
        }
        function T(he, be, Re, Ue, Xe, qe) {
          if (he = bt[he] !== void 0 ? bt[he] : Oe[he] * vt[be], qe && (he *= 6), Xe) {
            for (Ue = 0; 1 <= Re; )
              Ue += he * Re * Re, Re /= 2;
            return Ue;
          }
          return he * Re * Ue;
        }
        function L(he, be, Re, Ue, Xe, qe, st) {
          function it() {
            this.format = this.internalformat = 6408, this.type = 5121, this.flipY = this.premultiplyAlpha = this.compressed = !1, this.unpackAlignment = 1, this.colorSpace = 37444, this.channels = this.height = this.width = 0;
          }
          function Tt(tr, mr) {
            tr.internalformat = mr.internalformat, tr.format = mr.format, tr.type = mr.type, tr.compressed = mr.compressed, tr.premultiplyAlpha = mr.premultiplyAlpha, tr.flipY = mr.flipY, tr.unpackAlignment = mr.unpackAlignment, tr.colorSpace = mr.colorSpace, tr.width = mr.width, tr.height = mr.height, tr.channels = mr.channels;
          }
          function Pt(tr, mr) {
            if (typeof mr == "object" && mr) {
              "premultiplyAlpha" in mr && (tr.premultiplyAlpha = mr.premultiplyAlpha), "flipY" in mr && (tr.flipY = mr.flipY), "alignment" in mr && (tr.unpackAlignment = mr.alignment), "colorSpace" in mr && (tr.colorSpace = Fr[mr.colorSpace]), "type" in mr && (tr.type = Gr[mr.type]);
              var Ct = tr.width, or = tr.height, hr = tr.channels, Rr = !1;
              "shape" in mr ? (Ct = mr.shape[0], or = mr.shape[1], mr.shape.length === 3 && (hr = mr.shape[2], Rr = !0)) : ("radius" in mr && (Ct = or = mr.radius), "width" in mr && (Ct = mr.width), "height" in mr && (or = mr.height), "channels" in mr && (hr = mr.channels, Rr = !0)), tr.width = 0 | Ct, tr.height = 0 | or, tr.channels = 0 | hr, Ct = !1, "format" in mr && (Ct = mr.format, or = tr.internalformat = un[Ct], tr.format = mn[or], Ct in Gr && !("type" in mr) && (tr.type = Gr[Ct]), Ct in $r && (tr.compressed = !0), Ct = !0), !Rr && Ct ? tr.channels = Oe[tr.format] : Rr && !Ct && tr.channels !== Ie[tr.format] && (tr.format = tr.internalformat = Ie[tr.channels]);
            }
          }
          function rt(tr) {
            he.pixelStorei(37440, tr.flipY), he.pixelStorei(37441, tr.premultiplyAlpha), he.pixelStorei(37443, tr.colorSpace), he.pixelStorei(3317, tr.unpackAlignment);
          }
          function ut() {
            it.call(this), this.yOffset = this.xOffset = 0, this.data = null, this.needsFree = !1, this.element = null, this.needsCopy = !1;
          }
          function Bt(tr, mr) {
            var Ct = null;
            if (b(mr) ? Ct = mr : mr && (Pt(tr, mr), "x" in mr && (tr.xOffset = 0 | mr.x), "y" in mr && (tr.yOffset = 0 | mr.y), b(mr.data) && (Ct = mr.data)), mr.copy) {
              var or = Xe.viewportWidth, hr = Xe.viewportHeight;
              tr.width = tr.width || or - tr.xOffset, tr.height = tr.height || hr - tr.yOffset, tr.needsCopy = !0;
            } else if (Ct) {
              if (ve(Ct))
                tr.channels = tr.channels || 4, tr.data = Ct, "type" in mr || tr.type !== 5121 || (tr.type = 0 | Ae[Object.prototype.toString.call(Ct)]);
              else if (y(Ct)) {
                switch (tr.channels = tr.channels || 4, hr = (or = Ct).length, tr.type) {
                  case 5121:
                  case 5123:
                  case 5125:
                  case 5126:
                    (hr = le.allocType(tr.type, hr)).set(or), tr.data = hr;
                    break;
                  case 36193:
                    tr.data = p(or);
                }
                tr.alignment = 1, tr.needsFree = !0;
              } else if (t(Ct)) {
                or = Ct.data, Array.isArray(or) || tr.type !== 5121 || (tr.type = 0 | Ae[Object.prototype.toString.call(or)]), hr = Ct.shape;
                var Rr, Dr, Or, Ar, vr = Ct.stride;
                hr.length === 3 ? (Or = hr[2], Ar = vr[2]) : Ar = Or = 1, Rr = hr[0], Dr = hr[1], hr = vr[0], vr = vr[1], tr.alignment = 1, tr.width = Rr, tr.height = Dr, tr.channels = Or, tr.format = tr.internalformat = Ie[Or], tr.needsFree = !0, Rr = Ar, Ct = Ct.offset, Or = tr.width, Ar = tr.height, Dr = tr.channels;
                for (var xr = le.allocType(tr.type === 36193 ? 5126 : tr.type, Or * Ar * Dr), wr = 0, Er = 0; Er < Ar; ++Er)
                  for (var Hr = 0; Hr < Or; ++Hr)
                    for (var Vr = 0; Vr < Dr; ++Vr)
                      xr[wr++] = or[hr * Hr + vr * Er + Rr * Vr + Ct];
                w(tr, xr);
              } else if (_(Ct) === Ze || _(Ct) === Fe || _(Ct) === Pe)
                _(Ct) === Ze || _(Ct) === Fe ? tr.element = Ct : tr.element = Ct.canvas, tr.width = tr.element.width, tr.height = tr.element.height, tr.channels = 4;
              else if (_(Ct) === De)
                tr.element = Ct, tr.width = Ct.width, tr.height = Ct.height, tr.channels = 4;
              else if (_(Ct) === Ge)
                tr.element = Ct, tr.width = Ct.naturalWidth, tr.height = Ct.naturalHeight, tr.channels = 4;
              else if (_(Ct) === Qe)
                tr.element = Ct, tr.width = Ct.videoWidth, tr.height = Ct.videoHeight, tr.channels = 4;
              else if (f(Ct)) {
                for (or = tr.width || Ct[0].length, hr = tr.height || Ct.length, vr = tr.channels, vr = c(Ct[0][0]) ? vr || Ct[0][0].length : vr || 1, Rr = ye.shape(Ct), Or = 1, Ar = 0; Ar < Rr.length; ++Ar)
                  Or *= Rr[Ar];
                Or = le.allocType(tr.type === 36193 ? 5126 : tr.type, Or), ye.flatten(Ct, Rr, "", Or), w(tr, Or), tr.alignment = 1, tr.width = or, tr.height = hr, tr.channels = vr, tr.format = tr.internalformat = Ie[vr], tr.needsFree = !0;
              }
            } else
              tr.width = tr.width || 1, tr.height = tr.height || 1, tr.channels = tr.channels || 4;
          }
          function wt(tr, mr, Ct, or, hr) {
            var Rr = tr.element, Dr = tr.data, Or = tr.internalformat, Ar = tr.format, vr = tr.type, xr = tr.width, wr = tr.height;
            rt(tr), Rr ? he.texSubImage2D(mr, hr, Ct, or, Ar, vr, Rr) : tr.compressed ? he.compressedTexSubImage2D(mr, hr, Ct, or, Or, xr, wr, Dr) : tr.needsCopy ? (Ue(), he.copyTexSubImage2D(mr, hr, Ct, or, tr.xOffset, tr.yOffset, xr, wr)) : he.texSubImage2D(mr, hr, Ct, or, xr, wr, Ar, vr, Dr);
          }
          function Lt() {
            return Qr.pop() || new ut();
          }
          function Se(tr) {
            tr.needsFree && le.freeType(tr.data), ut.call(tr), Qr.push(tr);
          }
          function We() {
            it.call(this), this.genMipmaps = !1, this.mipmapHint = 4352, this.mipmask = 0, this.images = Array(16);
          }
          function nt(tr, mr, Ct) {
            var or = tr.images[0] = Lt();
            tr.mipmask = 1, or.width = tr.width = mr, or.height = tr.height = Ct, or.channels = tr.channels = 4;
          }
          function ft(tr, mr) {
            var Ct = null;
            if (b(mr))
              Tt(Ct = tr.images[0] = Lt(), tr), Bt(Ct, mr), tr.mipmask = 1;
            else if (Pt(tr, mr), Array.isArray(mr.mipmap))
              for (var or = mr.mipmap, hr = 0; hr < or.length; ++hr)
                Tt(Ct = tr.images[hr] = Lt(), tr), Ct.width >>= hr, Ct.height >>= hr, Bt(Ct, or[hr]), tr.mipmask |= 1 << hr;
            else
              Tt(Ct = tr.images[0] = Lt(), tr), Bt(Ct, mr), tr.mipmask = 1;
            Tt(tr, tr.images[0]);
          }
          function Mt(tr, mr) {
            for (var Ct = tr.images, or = 0; or < Ct.length && Ct[or]; ++or) {
              var hr = Ct[or], Rr = mr, Dr = or, Or = hr.element, Ar = hr.data, vr = hr.internalformat, xr = hr.format, wr = hr.type, Er = hr.width, Hr = hr.height;
              rt(hr), Or ? he.texImage2D(Rr, Dr, xr, xr, wr, Or) : hr.compressed ? he.compressedTexImage2D(Rr, Dr, vr, Er, Hr, 0, Ar) : hr.needsCopy ? (Ue(), he.copyTexImage2D(Rr, Dr, xr, hr.xOffset, hr.yOffset, Er, Hr, 0)) : he.texImage2D(Rr, Dr, xr, Er, Hr, 0, xr, wr, Ar || null);
            }
          }
          function Nt() {
            var tr = cn.pop() || new We();
            it.call(tr);
            for (var mr = tr.mipmask = 0; 16 > mr; ++mr)
              tr.images[mr] = null;
            return tr;
          }
          function Zt(tr) {
            for (var mr = tr.images, Ct = 0; Ct < mr.length; ++Ct)
              mr[Ct] && Se(mr[Ct]), mr[Ct] = null;
            cn.push(tr);
          }
          function Ut() {
            this.magFilter = this.minFilter = 9728, this.wrapT = this.wrapS = 33071, this.anisotropic = 1, this.genMipmaps = !1, this.mipmapHint = 4352;
          }
          function fr(tr, mr) {
            "min" in mr && (tr.minFilter = Ir[mr.min], 0 <= ze.indexOf(tr.minFilter) && !("faces" in mr) && (tr.genMipmaps = !0)), "mag" in mr && (tr.magFilter = Mr[mr.mag]);
            var Ct = tr.wrapS, or = tr.wrapT;
            if ("wrap" in mr) {
              var hr = mr.wrap;
              typeof hr == "string" ? Ct = or = gr[hr] : Array.isArray(hr) && (Ct = gr[hr[0]], or = gr[hr[1]]);
            } else
              "wrapS" in mr && (Ct = gr[mr.wrapS]), "wrapT" in mr && (or = gr[mr.wrapT]);
            if (tr.wrapS = Ct, tr.wrapT = or, "anisotropic" in mr && (tr.anisotropic = mr.anisotropic), "mipmap" in mr) {
              switch (Ct = !1, typeof mr.mipmap) {
                case "string":
                  tr.mipmapHint = cr[mr.mipmap], Ct = tr.genMipmaps = !0;
                  break;
                case "boolean":
                  Ct = tr.genMipmaps = mr.mipmap;
                  break;
                case "object":
                  tr.genMipmaps = !1, Ct = !0;
              }
              !Ct || "min" in mr || (tr.minFilter = 9984);
            }
          }
          function Tr(tr, mr) {
            he.texParameteri(mr, 10241, tr.minFilter), he.texParameteri(mr, 10240, tr.magFilter), he.texParameteri(mr, 10242, tr.wrapS), he.texParameteri(mr, 10243, tr.wrapT), be.ext_texture_filter_anisotropic && he.texParameteri(mr, 34046, tr.anisotropic), tr.genMipmaps && (he.hint(33170, tr.mipmapHint), he.generateMipmap(mr));
          }
          function ur(tr) {
            it.call(this), this.mipmask = 0, this.internalformat = 6408, this.id = Hn++, this.refCount = 1, this.target = tr, this.texture = he.createTexture(), this.unit = -1, this.bindCount = 0, this.texInfo = new Ut(), st.profile && (this.stats = { size: 0 });
          }
          function Kt(tr) {
            he.activeTexture(33984), he.bindTexture(tr.target, tr.texture);
          }
          function $t() {
            var tr = aa[0];
            tr ? he.bindTexture(tr.target, tr.texture) : he.bindTexture(3553, null);
          }
          function er(tr) {
            var mr = tr.texture, Ct = tr.unit, or = tr.target;
            0 <= Ct && (he.activeTexture(33984 + Ct), he.bindTexture(or, null), aa[Ct] = null), he.deleteTexture(mr), tr.texture = null, tr.params = null, tr.pixels = null, tr.refCount = 0, delete _n[tr.id], qe.textureCount--;
          }
          var cr = { "don't care": 4352, "dont care": 4352, nice: 4354, fast: 4353 }, gr = { repeat: 10497, clamp: 33071, mirror: 33648 }, Mr = { nearest: 9728, linear: 9729 }, Ir = N({ mipmap: 9987, "nearest mipmap nearest": 9984, "linear mipmap nearest": 9985, "nearest mipmap linear": 9986, "linear mipmap linear": 9987 }, Mr), Fr = { none: 0, browser: 37444 }, Gr = { uint8: 5121, rgba4: 32819, rgb565: 33635, "rgb5 a1": 32820 }, un = { alpha: 6406, luminance: 6409, "luminance alpha": 6410, rgb: 6407, rgba: 6408, rgba4: 32854, "rgb5 a1": 32855, rgb565: 36194 }, $r = {};
          be.ext_srgb && (un.srgb = 35904, un.srgba = 35906), be.oes_texture_float && (Gr.float32 = Gr.float = 5126), be.oes_texture_half_float && (Gr.float16 = Gr["half float"] = 36193), be.webgl_depth_texture && (N(un, { depth: 6402, "depth stencil": 34041 }), N(Gr, { uint16: 5123, uint32: 5125, "depth stencil": 34042 })), be.webgl_compressed_texture_s3tc && N($r, { "rgb s3tc dxt1": 33776, "rgba s3tc dxt1": 33777, "rgba s3tc dxt3": 33778, "rgba s3tc dxt5": 33779 }), be.webgl_compressed_texture_atc && N($r, { "rgb atc": 35986, "rgba atc explicit alpha": 35987, "rgba atc interpolated alpha": 34798 }), be.webgl_compressed_texture_pvrtc && N($r, { "rgb pvrtc 4bppv1": 35840, "rgb pvrtc 2bppv1": 35841, "rgba pvrtc 4bppv1": 35842, "rgba pvrtc 2bppv1": 35843 }), be.webgl_compressed_texture_etc1 && ($r["rgb etc1"] = 36196);
          var Dn = Array.prototype.slice.call(he.getParameter(34467));
          Object.keys($r).forEach(function(tr) {
            var mr = $r[tr];
            0 <= Dn.indexOf(mr) && (un[tr] = mr);
          });
          var rn = Object.keys(un);
          Re.textureFormats = rn;
          var vn = [];
          Object.keys(un).forEach(function(tr) {
            vn[un[tr]] = tr;
          });
          var xn = [];
          Object.keys(Gr).forEach(function(tr) {
            xn[Gr[tr]] = tr;
          });
          var $n = [];
          Object.keys(Mr).forEach(function(tr) {
            $n[Mr[tr]] = tr;
          });
          var Br = [];
          Object.keys(Ir).forEach(function(tr) {
            Br[Ir[tr]] = tr;
          });
          var tn = [];
          Object.keys(gr).forEach(function(tr) {
            tn[gr[tr]] = tr;
          });
          var mn = rn.reduce(function(tr, mr) {
            var Ct = un[mr];
            return Ct === 6409 || Ct === 6406 || Ct === 6409 || Ct === 6410 || Ct === 6402 || Ct === 34041 || be.ext_srgb && (Ct === 35904 || Ct === 35906) ? tr[Ct] = Ct : Ct === 32855 || 0 <= mr.indexOf("rgba") ? tr[Ct] = 6408 : tr[Ct] = 6407, tr;
          }, {}), Qr = [], cn = [], Hn = 0, _n = {}, En = Re.maxTextureUnits, aa = Array(En).map(function() {
            return null;
          });
          return N(ur.prototype, { bind: function() {
            this.bindCount += 1;
            var tr = this.unit;
            if (0 > tr) {
              for (var mr = 0; mr < En; ++mr) {
                var Ct = aa[mr];
                if (Ct) {
                  if (0 < Ct.bindCount)
                    continue;
                  Ct.unit = -1;
                }
                aa[mr] = this, tr = mr;
                break;
              }
              st.profile && qe.maxTextureUnits < tr + 1 && (qe.maxTextureUnits = tr + 1), this.unit = tr, he.activeTexture(33984 + tr), he.bindTexture(this.target, this.texture);
            }
            return tr;
          }, unbind: function() {
            --this.bindCount;
          }, decRef: function() {
            0 >= --this.refCount && er(this);
          } }), st.profile && (qe.getTotalTextureSize = function() {
            var tr = 0;
            return Object.keys(_n).forEach(function(mr) {
              tr += _n[mr].stats.size;
            }), tr;
          }), { create2D: function(tr, mr) {
            function Ct(hr, Rr) {
              var Dr = or.texInfo;
              Ut.call(Dr);
              var Or = Nt();
              return typeof hr == "number" ? nt(Or, 0 | hr, typeof Rr == "number" ? 0 | Rr : 0 | hr) : hr ? (fr(Dr, hr), ft(Or, hr)) : nt(Or, 1, 1), Dr.genMipmaps && (Or.mipmask = (Or.width << 1) - 1), or.mipmask = Or.mipmask, Tt(or, Or), or.internalformat = Or.internalformat, Ct.width = Or.width, Ct.height = Or.height, Kt(or), Mt(Or, 3553), Tr(Dr, 3553), $t(), Zt(Or), st.profile && (or.stats.size = T(or.internalformat, or.type, Or.width, Or.height, Dr.genMipmaps, !1)), Ct.format = vn[or.internalformat], Ct.type = xn[or.type], Ct.mag = $n[Dr.magFilter], Ct.min = Br[Dr.minFilter], Ct.wrapS = tn[Dr.wrapS], Ct.wrapT = tn[Dr.wrapT], Ct;
            }
            var or = new ur(3553);
            return _n[or.id] = or, qe.textureCount++, Ct(tr, mr), Ct.subimage = function(hr, Rr, Dr, Or) {
              Rr |= 0, Dr |= 0, Or |= 0;
              var Ar = Lt();
              return Tt(Ar, or), Ar.width = 0, Ar.height = 0, Bt(Ar, hr), Ar.width = Ar.width || (or.width >> Or) - Rr, Ar.height = Ar.height || (or.height >> Or) - Dr, Kt(or), wt(Ar, 3553, Rr, Dr, Or), $t(), Se(Ar), Ct;
            }, Ct.resize = function(hr, Rr) {
              var Dr = 0 | hr, Or = 0 | Rr || Dr;
              if (Dr === or.width && Or === or.height)
                return Ct;
              Ct.width = or.width = Dr, Ct.height = or.height = Or, Kt(or);
              for (var Ar = 0; or.mipmask >> Ar; ++Ar) {
                var vr = Dr >> Ar, xr = Or >> Ar;
                if (!vr || !xr)
                  break;
                he.texImage2D(3553, Ar, or.format, vr, xr, 0, or.format, or.type, null);
              }
              return $t(), st.profile && (or.stats.size = T(or.internalformat, or.type, Dr, Or, !1, !1)), Ct;
            }, Ct._reglType = "texture2d", Ct._texture = or, st.profile && (Ct.stats = or.stats), Ct.destroy = function() {
              or.decRef();
            }, Ct;
          }, createCube: function(tr, mr, Ct, or, hr, Rr) {
            function Dr(vr, xr, wr, Er, Hr, Vr) {
              var Kr, en = Or.texInfo;
              for (Ut.call(en), Kr = 0; 6 > Kr; ++Kr)
                Ar[Kr] = Nt();
              if (typeof vr != "number" && vr) {
                if (typeof vr == "object")
                  if (xr)
                    ft(Ar[0], vr), ft(Ar[1], xr), ft(Ar[2], wr), ft(Ar[3], Er), ft(Ar[4], Hr), ft(Ar[5], Vr);
                  else if (fr(en, vr), Pt(Or, vr), "faces" in vr)
                    for (vr = vr.faces, Kr = 0; 6 > Kr; ++Kr)
                      Tt(Ar[Kr], Or), ft(Ar[Kr], vr[Kr]);
                  else
                    for (Kr = 0; 6 > Kr; ++Kr)
                      ft(Ar[Kr], vr);
              } else
                for (vr = 0 | vr || 1, Kr = 0; 6 > Kr; ++Kr)
                  nt(Ar[Kr], vr, vr);
              for (Tt(Or, Ar[0]), Or.mipmask = en.genMipmaps ? (Ar[0].width << 1) - 1 : Ar[0].mipmask, Or.internalformat = Ar[0].internalformat, Dr.width = Ar[0].width, Dr.height = Ar[0].height, Kt(Or), Kr = 0; 6 > Kr; ++Kr)
                Mt(Ar[Kr], 34069 + Kr);
              for (Tr(en, 34067), $t(), st.profile && (Or.stats.size = T(Or.internalformat, Or.type, Dr.width, Dr.height, en.genMipmaps, !0)), Dr.format = vn[Or.internalformat], Dr.type = xn[Or.type], Dr.mag = $n[en.magFilter], Dr.min = Br[en.minFilter], Dr.wrapS = tn[en.wrapS], Dr.wrapT = tn[en.wrapT], Kr = 0; 6 > Kr; ++Kr)
                Zt(Ar[Kr]);
              return Dr;
            }
            var Or = new ur(34067);
            _n[Or.id] = Or, qe.cubeCount++;
            var Ar = Array(6);
            return Dr(tr, mr, Ct, or, hr, Rr), Dr.subimage = function(vr, xr, wr, Er, Hr) {
              wr |= 0, Er |= 0, Hr |= 0;
              var Vr = Lt();
              return Tt(Vr, Or), Vr.width = 0, Vr.height = 0, Bt(Vr, xr), Vr.width = Vr.width || (Or.width >> Hr) - wr, Vr.height = Vr.height || (Or.height >> Hr) - Er, Kt(Or), wt(Vr, 34069 + vr, wr, Er, Hr), $t(), Se(Vr), Dr;
            }, Dr.resize = function(vr) {
              if ((vr |= 0) !== Or.width) {
                Dr.width = Or.width = vr, Dr.height = Or.height = vr, Kt(Or);
                for (var xr = 0; 6 > xr; ++xr)
                  for (var wr = 0; Or.mipmask >> wr; ++wr)
                    he.texImage2D(34069 + xr, wr, Or.format, vr >> wr, vr >> wr, 0, Or.format, Or.type, null);
                return $t(), st.profile && (Or.stats.size = T(Or.internalformat, Or.type, Dr.width, Dr.height, !1, !0)), Dr;
              }
            }, Dr._reglType = "textureCube", Dr._texture = Or, st.profile && (Dr.stats = Or.stats), Dr.destroy = function() {
              Or.decRef();
            }, Dr;
          }, clear: function() {
            for (var tr = 0; tr < En; ++tr)
              he.activeTexture(33984 + tr), he.bindTexture(3553, null), aa[tr] = null;
            ue(_n).forEach(er), qe.cubeCount = 0, qe.textureCount = 0;
          }, getTexture: function(tr) {
            return null;
          }, restore: function() {
            for (var tr = 0; tr < En; ++tr) {
              var mr = aa[tr];
              mr && (mr.bindCount = 0, mr.unit = -1, aa[tr] = null);
            }
            ue(_n).forEach(function(Ct) {
              Ct.texture = he.createTexture(), he.bindTexture(Ct.target, Ct.texture);
              for (var or = 0; 32 > or; ++or)
                if ((Ct.mipmask & 1 << or) != 0)
                  if (Ct.target === 3553)
                    he.texImage2D(3553, or, Ct.internalformat, Ct.width >> or, Ct.height >> or, 0, Ct.internalformat, Ct.type, null);
                  else
                    for (var hr = 0; 6 > hr; ++hr)
                      he.texImage2D(34069 + hr, or, Ct.internalformat, Ct.width >> or, Ct.height >> or, 0, Ct.internalformat, Ct.type, null);
              Tr(Ct.texInfo, Ct.target);
            });
          }, refresh: function() {
            for (var tr = 0; tr < En; ++tr) {
              var mr = aa[tr];
              mr && (mr.bindCount = 0, mr.unit = -1, aa[tr] = null), he.activeTexture(33984 + tr), he.bindTexture(3553, null), he.bindTexture(34067, null);
            }
          } };
        }
        function A(he, be, Re, Ue, Xe, qe) {
          function st(ur, Kt, $t) {
            this.target = ur, this.texture = Kt, this.renderbuffer = $t;
            var er = ur = 0;
            Kt ? (ur = Kt.width, er = Kt.height) : $t && (ur = $t.width, er = $t.height), this.width = ur, this.height = er;
          }
          function it(ur) {
            ur && (ur.texture && ur.texture._texture.decRef(), ur.renderbuffer && ur.renderbuffer._renderbuffer.decRef());
          }
          function Tt(ur, Kt, $t) {
            ur && (ur.texture ? ur.texture._texture.refCount += 1 : ur.renderbuffer._renderbuffer.refCount += 1);
          }
          function Pt(ur, Kt) {
            Kt && (Kt.texture ? he.framebufferTexture2D(36160, ur, Kt.target, Kt.texture._texture.texture, 0) : he.framebufferRenderbuffer(36160, ur, 36161, Kt.renderbuffer._renderbuffer.renderbuffer));
          }
          function rt(ur) {
            var Kt = 3553, $t = null, er = null, cr = ur;
            return typeof ur == "object" && (cr = ur.data, "target" in ur && (Kt = 0 | ur.target)), (ur = cr._reglType) === "texture2d" || ur === "textureCube" ? $t = cr : ur === "renderbuffer" && (er = cr, Kt = 36161), new st(Kt, $t, er);
          }
          function ut(ur, Kt, $t, er, cr) {
            return $t ? ((ur = Ue.create2D({ width: ur, height: Kt, format: er, type: cr }))._texture.refCount = 0, new st(3553, ur, null)) : ((ur = Xe.create({ width: ur, height: Kt, format: er }))._renderbuffer.refCount = 0, new st(36161, null, ur));
          }
          function Bt(ur) {
            return ur && (ur.texture || ur.renderbuffer);
          }
          function wt(ur, Kt, $t) {
            ur && (ur.texture ? ur.texture.resize(Kt, $t) : ur.renderbuffer && ur.renderbuffer.resize(Kt, $t), ur.width = Kt, ur.height = $t);
          }
          function Lt() {
            this.id = fr++, Tr[this.id] = this, this.framebuffer = he.createFramebuffer(), this.height = this.width = 0, this.colorAttachments = [], this.depthStencilAttachment = this.stencilAttachment = this.depthAttachment = null;
          }
          function Se(ur) {
            ur.colorAttachments.forEach(it), it(ur.depthAttachment), it(ur.stencilAttachment), it(ur.depthStencilAttachment);
          }
          function We(ur) {
            he.deleteFramebuffer(ur.framebuffer), ur.framebuffer = null, qe.framebufferCount--, delete Tr[ur.id];
          }
          function nt(ur) {
            var Kt;
            he.bindFramebuffer(36160, ur.framebuffer);
            var $t = ur.colorAttachments;
            for (Kt = 0; Kt < $t.length; ++Kt)
              Pt(36064 + Kt, $t[Kt]);
            for (Kt = $t.length; Kt < Re.maxColorAttachments; ++Kt)
              he.framebufferTexture2D(36160, 36064 + Kt, 3553, null, 0);
            he.framebufferTexture2D(36160, 33306, 3553, null, 0), he.framebufferTexture2D(36160, 36096, 3553, null, 0), he.framebufferTexture2D(36160, 36128, 3553, null, 0), Pt(36096, ur.depthAttachment), Pt(36128, ur.stencilAttachment), Pt(33306, ur.depthStencilAttachment), he.checkFramebufferStatus(36160), he.isContextLost(), he.bindFramebuffer(36160, Mt.next ? Mt.next.framebuffer : null), Mt.cur = Mt.next, he.getError();
          }
          function ft(ur, Kt) {
            function $t(cr, gr) {
              var Mr, Ir = 0, Fr = 0, Gr = !0, un = !0;
              Mr = null;
              var $r = !0, Dn = "rgba", rn = "uint8", vn = 1, xn = null, $n = null, Br = null, tn = !1;
              typeof cr == "number" ? (Ir = 0 | cr, Fr = 0 | gr || Ir) : cr ? ("shape" in cr ? (Ir = (Fr = cr.shape)[0], Fr = Fr[1]) : ("radius" in cr && (Ir = Fr = cr.radius), "width" in cr && (Ir = cr.width), "height" in cr && (Fr = cr.height)), ("color" in cr || "colors" in cr) && (Mr = cr.color || cr.colors, Array.isArray(Mr)), Mr || ("colorCount" in cr && (vn = 0 | cr.colorCount), "colorTexture" in cr && ($r = !!cr.colorTexture, Dn = "rgba4"), "colorType" in cr && (rn = cr.colorType, !$r) && (rn === "half float" || rn === "float16" ? Dn = "rgba16f" : rn !== "float" && rn !== "float32" || (Dn = "rgba32f")), "colorFormat" in cr && (Dn = cr.colorFormat, 0 <= Nt.indexOf(Dn) ? $r = !0 : 0 <= Zt.indexOf(Dn) && ($r = !1))), ("depthTexture" in cr || "depthStencilTexture" in cr) && (tn = !(!cr.depthTexture && !cr.depthStencilTexture)), "depth" in cr && (typeof cr.depth == "boolean" ? Gr = cr.depth : (xn = cr.depth, un = !1)), "stencil" in cr && (typeof cr.stencil == "boolean" ? un = cr.stencil : ($n = cr.stencil, Gr = !1)), "depthStencil" in cr && (typeof cr.depthStencil == "boolean" ? Gr = un = cr.depthStencil : (Br = cr.depthStencil, un = Gr = !1))) : Ir = Fr = 1;
              var mn = null, Qr = null, cn = null, Hn = null;
              if (Array.isArray(Mr))
                mn = Mr.map(rt);
              else if (Mr)
                mn = [rt(Mr)];
              else
                for (mn = Array(vn), Mr = 0; Mr < vn; ++Mr)
                  mn[Mr] = ut(Ir, Fr, $r, Dn, rn);
              for (Ir = Ir || mn[0].width, Fr = Fr || mn[0].height, xn ? Qr = rt(xn) : Gr && !un && (Qr = ut(Ir, Fr, tn, "depth", "uint32")), $n ? cn = rt($n) : un && !Gr && (cn = ut(Ir, Fr, !1, "stencil", "uint8")), Br ? Hn = rt(Br) : !xn && !$n && un && Gr && (Hn = ut(Ir, Fr, tn, "depth stencil", "depth stencil")), Gr = null, Mr = 0; Mr < mn.length; ++Mr)
                Tt(mn[Mr]), mn[Mr] && mn[Mr].texture && (un = Ke[mn[Mr].texture._texture.format] * mt[mn[Mr].texture._texture.type], Gr === null && (Gr = un));
              return Tt(Qr), Tt(cn), Tt(Hn), Se(er), er.width = Ir, er.height = Fr, er.colorAttachments = mn, er.depthAttachment = Qr, er.stencilAttachment = cn, er.depthStencilAttachment = Hn, $t.color = mn.map(Bt), $t.depth = Bt(Qr), $t.stencil = Bt(cn), $t.depthStencil = Bt(Hn), $t.width = er.width, $t.height = er.height, nt(er), $t;
            }
            var er = new Lt();
            return qe.framebufferCount++, $t(ur, Kt), N($t, { resize: function(cr, gr) {
              var Mr = Math.max(0 | cr, 1), Ir = Math.max(0 | gr || Mr, 1);
              if (Mr === er.width && Ir === er.height)
                return $t;
              for (var Fr = er.colorAttachments, Gr = 0; Gr < Fr.length; ++Gr)
                wt(Fr[Gr], Mr, Ir);
              return wt(er.depthAttachment, Mr, Ir), wt(er.stencilAttachment, Mr, Ir), wt(er.depthStencilAttachment, Mr, Ir), er.width = $t.width = Mr, er.height = $t.height = Ir, nt(er), $t;
            }, _reglType: "framebuffer", _framebuffer: er, destroy: function() {
              We(er), Se(er);
            }, use: function(cr) {
              Mt.setFBO({ framebuffer: $t }, cr);
            } });
          }
          var Mt = { cur: null, next: null, dirty: !1, setFBO: null }, Nt = ["rgba"], Zt = ["rgba4", "rgb565", "rgb5 a1"];
          be.ext_srgb && Zt.push("srgba"), be.ext_color_buffer_half_float && Zt.push("rgba16f", "rgb16f"), be.webgl_color_buffer_float && Zt.push("rgba32f");
          var Ut = ["uint8"];
          be.oes_texture_half_float && Ut.push("half float", "float16"), be.oes_texture_float && Ut.push("float", "float32");
          var fr = 0, Tr = {};
          return N(Mt, { getFramebuffer: function(ur) {
            return typeof ur == "function" && ur._reglType === "framebuffer" && (ur = ur._framebuffer) instanceof Lt ? ur : null;
          }, create: ft, createCube: function(ur) {
            function Kt(er) {
              var cr, gr = { color: null }, Mr = 0, Ir = null;
              cr = "rgba";
              var Fr = "uint8", Gr = 1;
              if (typeof er == "number" ? Mr = 0 | er : er ? ("shape" in er ? Mr = er.shape[0] : ("radius" in er && (Mr = 0 | er.radius), "width" in er ? Mr = 0 | er.width : "height" in er && (Mr = 0 | er.height)), ("color" in er || "colors" in er) && (Ir = er.color || er.colors, Array.isArray(Ir)), Ir || ("colorCount" in er && (Gr = 0 | er.colorCount), "colorType" in er && (Fr = er.colorType), "colorFormat" in er && (cr = er.colorFormat)), "depth" in er && (gr.depth = er.depth), "stencil" in er && (gr.stencil = er.stencil), "depthStencil" in er && (gr.depthStencil = er.depthStencil)) : Mr = 1, Ir)
                if (Array.isArray(Ir))
                  for (er = [], cr = 0; cr < Ir.length; ++cr)
                    er[cr] = Ir[cr];
                else
                  er = [Ir];
              else
                for (er = Array(Gr), Ir = { radius: Mr, format: cr, type: Fr }, cr = 0; cr < Gr; ++cr)
                  er[cr] = Ue.createCube(Ir);
              for (gr.color = Array(er.length), cr = 0; cr < er.length; ++cr)
                Gr = er[cr], Mr = Mr || Gr.width, gr.color[cr] = { target: 34069, data: er[cr] };
              for (cr = 0; 6 > cr; ++cr) {
                for (Gr = 0; Gr < er.length; ++Gr)
                  gr.color[Gr].target = 34069 + cr;
                0 < cr && (gr.depth = $t[0].depth, gr.stencil = $t[0].stencil, gr.depthStencil = $t[0].depthStencil), $t[cr] ? $t[cr](gr) : $t[cr] = ft(gr);
              }
              return N(Kt, { width: Mr, height: Mr, color: er });
            }
            var $t = Array(6);
            return Kt(ur), N(Kt, { faces: $t, resize: function(er) {
              var cr = 0 | er;
              if (cr === Kt.width)
                return Kt;
              var gr = Kt.color;
              for (er = 0; er < gr.length; ++er)
                gr[er].resize(cr);
              for (er = 0; 6 > er; ++er)
                $t[er].resize(cr);
              return Kt.width = Kt.height = cr, Kt;
            }, _reglType: "framebufferCube", destroy: function() {
              $t.forEach(function(er) {
                er.destroy();
              });
            } });
          }, clear: function() {
            ue(Tr).forEach(We);
          }, restore: function() {
            Mt.cur = null, Mt.next = null, Mt.dirty = !0, ue(Tr).forEach(function(ur) {
              ur.framebuffer = he.createFramebuffer(), nt(ur);
            });
          } });
        }
        function I() {
          this.w = this.z = this.y = this.x = this.state = 0, this.buffer = null, this.size = 0, this.normalized = !1, this.type = 5126, this.divisor = this.stride = this.offset = 0;
        }
        function P(he, be, Re, Ue, Xe, qe, st) {
          function it() {
            this.id = ++rt, this.attributes = [], this.elements = null, this.ownsElements = !1, this.offset = this.count = 0, this.instances = -1, this.primitive = 4;
            var wt = be.oes_vertex_array_object;
            this.vao = wt ? wt.createVertexArrayOES() : null, ut[this.id] = this, this.buffers = [];
          }
          var Tt = Re.maxAttributes, Pt = Array(Tt);
          for (Re = 0; Re < Tt; ++Re)
            Pt[Re] = new I();
          var rt = 0, ut = {}, Bt = { Record: I, scope: {}, state: Pt, currentVAO: null, targetVAO: null, restore: be.oes_vertex_array_object ? function() {
            be.oes_vertex_array_object && ue(ut).forEach(function(wt) {
              wt.refresh();
            });
          } : function() {
          }, createVAO: function(wt) {
            function Lt(We) {
              var nt;
              Array.isArray(We) ? (nt = We, Se.elements && Se.ownsElements && Se.elements.destroy(), Se.elements = null, Se.ownsElements = !1, Se.offset = 0, Se.count = 0, Se.instances = -1, Se.primitive = 4) : (We.elements ? (nt = We.elements, Se.ownsElements ? (typeof nt == "function" && nt._reglType === "elements" ? Se.elements.destroy() : Se.elements(nt), Se.ownsElements = !1) : qe.getElements(We.elements) ? (Se.elements = We.elements, Se.ownsElements = !1) : (Se.elements = qe.create(We.elements), Se.ownsElements = !0)) : (Se.elements = null, Se.ownsElements = !1), nt = We.attributes, Se.offset = 0, Se.count = -1, Se.instances = -1, Se.primitive = 4, Se.elements && (Se.count = Se.elements._elements.vertCount, Se.primitive = Se.elements._elements.primType), "offset" in We && (Se.offset = 0 | We.offset), "count" in We && (Se.count = 0 | We.count), "instances" in We && (Se.instances = 0 | We.instances), "primitive" in We && (Se.primitive = Te[We.primitive])), We = {};
              var ft = Se.attributes;
              ft.length = nt.length;
              for (var Mt = 0; Mt < nt.length; ++Mt) {
                var Nt, Zt = nt[Mt], Ut = ft[Mt] = new I(), fr = Zt.data || Zt;
                Array.isArray(fr) || ve(fr) || t(fr) ? (Se.buffers[Mt] && (Nt = Se.buffers[Mt], ve(fr) && Nt._buffer.byteLength >= fr.byteLength ? Nt.subdata(fr) : (Nt.destroy(), Se.buffers[Mt] = null)), Se.buffers[Mt] || (Nt = Se.buffers[Mt] = Xe.create(Zt, 34962, !1, !0)), Ut.buffer = Xe.getBuffer(Nt), Ut.size = 0 | Ut.buffer.dimension, Ut.normalized = !1, Ut.type = Ut.buffer.dtype, Ut.offset = 0, Ut.stride = 0, Ut.divisor = 0, Ut.state = 1, We[Mt] = 1) : Xe.getBuffer(Zt) ? (Ut.buffer = Xe.getBuffer(Zt), Ut.size = 0 | Ut.buffer.dimension, Ut.normalized = !1, Ut.type = Ut.buffer.dtype, Ut.offset = 0, Ut.stride = 0, Ut.divisor = 0, Ut.state = 1) : Xe.getBuffer(Zt.buffer) ? (Ut.buffer = Xe.getBuffer(Zt.buffer), Ut.size = 0 | (+Zt.size || Ut.buffer.dimension), Ut.normalized = !!Zt.normalized || !1, Ut.type = "type" in Zt ? pe[Zt.type] : Ut.buffer.dtype, Ut.offset = 0 | (Zt.offset || 0), Ut.stride = 0 | (Zt.stride || 0), Ut.divisor = 0 | (Zt.divisor || 0), Ut.state = 1) : "x" in Zt && (Ut.x = +Zt.x || 0, Ut.y = +Zt.y || 0, Ut.z = +Zt.z || 0, Ut.w = +Zt.w || 0, Ut.state = 2);
              }
              for (Nt = 0; Nt < Se.buffers.length; ++Nt)
                !We[Nt] && Se.buffers[Nt] && (Se.buffers[Nt].destroy(), Se.buffers[Nt] = null);
              return Se.refresh(), Lt;
            }
            var Se = new it();
            return Ue.vaoCount += 1, Lt.destroy = function() {
              for (var We = 0; We < Se.buffers.length; ++We)
                Se.buffers[We] && Se.buffers[We].destroy();
              Se.buffers.length = 0, Se.ownsElements && (Se.elements.destroy(), Se.elements = null, Se.ownsElements = !1), Se.destroy();
            }, Lt._vao = Se, Lt._reglType = "vao", Lt(wt);
          }, getVAO: function(wt) {
            return typeof wt == "function" && wt._vao ? wt._vao : null;
          }, destroyBuffer: function(wt) {
            for (var Lt = 0; Lt < Pt.length; ++Lt) {
              var Se = Pt[Lt];
              Se.buffer === wt && (he.disableVertexAttribArray(Lt), Se.buffer = null);
            }
          }, setVAO: be.oes_vertex_array_object ? function(wt) {
            if (wt !== Bt.currentVAO) {
              var Lt = be.oes_vertex_array_object;
              wt ? Lt.bindVertexArrayOES(wt.vao) : Lt.bindVertexArrayOES(null), Bt.currentVAO = wt;
            }
          } : function(wt) {
            if (wt !== Bt.currentVAO) {
              if (wt)
                wt.bindAttrs();
              else {
                for (var Lt = be.angle_instanced_arrays, Se = 0; Se < Pt.length; ++Se) {
                  var We = Pt[Se];
                  We.buffer ? (he.enableVertexAttribArray(Se), We.buffer.bind(), he.vertexAttribPointer(Se, We.size, We.type, We.normalized, We.stride, We.offfset), Lt && We.divisor && Lt.vertexAttribDivisorANGLE(Se, We.divisor)) : (he.disableVertexAttribArray(Se), he.vertexAttrib4f(Se, We.x, We.y, We.z, We.w));
                }
                st.elements ? he.bindBuffer(34963, st.elements.buffer.buffer) : he.bindBuffer(34963, null);
              }
              Bt.currentVAO = wt;
            }
          }, clear: be.oes_vertex_array_object ? function() {
            ue(ut).forEach(function(wt) {
              wt.destroy();
            });
          } : function() {
          } };
          return it.prototype.bindAttrs = function() {
            for (var wt = be.angle_instanced_arrays, Lt = this.attributes, Se = 0; Se < Lt.length; ++Se) {
              var We = Lt[Se];
              We.buffer ? (he.enableVertexAttribArray(Se), he.bindBuffer(34962, We.buffer.buffer), he.vertexAttribPointer(Se, We.size, We.type, We.normalized, We.stride, We.offset), wt && We.divisor && wt.vertexAttribDivisorANGLE(Se, We.divisor)) : (he.disableVertexAttribArray(Se), he.vertexAttrib4f(Se, We.x, We.y, We.z, We.w));
            }
            for (wt = Lt.length; wt < Tt; ++wt)
              he.disableVertexAttribArray(wt);
            (wt = qe.getElements(this.elements)) ? he.bindBuffer(34963, wt.buffer.buffer) : he.bindBuffer(34963, null);
          }, it.prototype.refresh = function() {
            var wt = be.oes_vertex_array_object;
            wt && (wt.bindVertexArrayOES(this.vao), this.bindAttrs(), Bt.currentVAO = null, wt.bindVertexArrayOES(null));
          }, it.prototype.destroy = function() {
            if (this.vao) {
              var wt = be.oes_vertex_array_object;
              this === Bt.currentVAO && (Bt.currentVAO = null, wt.bindVertexArrayOES(null)), wt.deleteVertexArrayOES(this.vao), this.vao = null;
            }
            this.ownsElements && (this.elements.destroy(), this.elements = null, this.ownsElements = !1), ut[this.id] && (delete ut[this.id], --Ue.vaoCount);
          }, Bt;
        }
        function S(he, be, Re, Ue) {
          function Xe(Lt, Se, We, nt) {
            this.name = Lt, this.id = Se, this.location = We, this.info = nt;
          }
          function qe(Lt, Se) {
            for (var We = 0; We < Lt.length; ++We)
              if (Lt[We].id === Se.id)
                return void (Lt[We].location = Se.location);
            Lt.push(Se);
          }
          function st(Lt, Se, We) {
            if (!(ft = (We = Lt === 35632 ? Pt : rt)[Se])) {
              var nt = be.str(Se), ft = he.createShader(Lt);
              he.shaderSource(ft, nt), he.compileShader(ft), We[Se] = ft;
            }
            return ft;
          }
          function it(Lt, Se) {
            this.id = wt++, this.fragId = Lt, this.vertId = Se, this.program = null, this.uniforms = [], this.attributes = [], this.refCount = 1, Ue.profile && (this.stats = { uniformsCount: 0, attributesCount: 0 });
          }
          function Tt(Lt, Se, We) {
            var nt;
            nt = st(35632, Lt.fragId);
            var ft = st(35633, Lt.vertId);
            if (Se = Lt.program = he.createProgram(), he.attachShader(Se, nt), he.attachShader(Se, ft), We)
              for (nt = 0; nt < We.length; ++nt)
                ft = We[nt], he.bindAttribLocation(Se, ft[0], ft[1]);
            he.linkProgram(Se), ft = he.getProgramParameter(Se, 35718), Ue.profile && (Lt.stats.uniformsCount = ft);
            var Mt = Lt.uniforms;
            for (nt = 0; nt < ft; ++nt)
              if (We = he.getActiveUniform(Se, nt))
                if (1 < We.size)
                  for (var Nt = 0; Nt < We.size; ++Nt) {
                    var Zt = We.name.replace("[0]", "[" + Nt + "]");
                    qe(Mt, new Xe(Zt, be.id(Zt), he.getUniformLocation(Se, Zt), We));
                  }
                else
                  qe(Mt, new Xe(We.name, be.id(We.name), he.getUniformLocation(Se, We.name), We));
            for (ft = he.getProgramParameter(Se, 35721), Ue.profile && (Lt.stats.attributesCount = ft), Lt = Lt.attributes, nt = 0; nt < ft; ++nt)
              (We = he.getActiveAttrib(Se, nt)) && qe(Lt, new Xe(We.name, be.id(We.name), he.getAttribLocation(Se, We.name), We));
          }
          var Pt = {}, rt = {}, ut = {}, Bt = [], wt = 0;
          return Ue.profile && (Re.getMaxUniformsCount = function() {
            var Lt = 0;
            return Bt.forEach(function(Se) {
              Se.stats.uniformsCount > Lt && (Lt = Se.stats.uniformsCount);
            }), Lt;
          }, Re.getMaxAttributesCount = function() {
            var Lt = 0;
            return Bt.forEach(function(Se) {
              Se.stats.attributesCount > Lt && (Lt = Se.stats.attributesCount);
            }), Lt;
          }), { clear: function() {
            var Lt = he.deleteShader.bind(he);
            ue(Pt).forEach(Lt), Pt = {}, ue(rt).forEach(Lt), rt = {}, Bt.forEach(function(Se) {
              he.deleteProgram(Se.program);
            }), Bt.length = 0, ut = {}, Re.shaderCount = 0;
          }, program: function(Lt, Se, We, nt) {
            var ft = ut[Se];
            ft || (ft = ut[Se] = {});
            var Mt = ft[Lt];
            if (Mt && (Mt.refCount++, !nt))
              return Mt;
            var Nt = new it(Se, Lt);
            return Re.shaderCount++, Tt(Nt, We, nt), Mt || (ft[Lt] = Nt), Bt.push(Nt), N(Nt, { destroy: function() {
              if (Nt.refCount--, 0 >= Nt.refCount) {
                he.deleteProgram(Nt.program);
                var Zt = Bt.indexOf(Nt);
                Bt.splice(Zt, 1), Re.shaderCount--;
              }
              0 >= ft[Nt.vertId].refCount && (he.deleteShader(rt[Nt.vertId]), delete rt[Nt.vertId], delete ut[Nt.fragId][Nt.vertId]), Object.keys(ut[Nt.fragId]).length || (he.deleteShader(Pt[Nt.fragId]), delete Pt[Nt.fragId], delete ut[Nt.fragId]);
            } });
          }, restore: function() {
            Pt = {}, rt = {};
            for (var Lt = 0; Lt < Bt.length; ++Lt)
              Tt(Bt[Lt], null, Bt[Lt].attributes.map(function(Se) {
                return [Se.location, Se.name];
              }));
          }, shader: st, frag: -1, vert: -1 };
        }
        function E(he, be, Re, Ue, Xe, qe, st) {
          function it(Tt) {
            var Pt;
            Pt = be.next === null ? 5121 : be.next.colorAttachments[0].texture._texture.type;
            var rt = 0, ut = 0, Bt = Ue.framebufferWidth, wt = Ue.framebufferHeight, Lt = null;
            return ve(Tt) ? Lt = Tt : Tt && (rt = 0 | Tt.x, ut = 0 | Tt.y, Bt = 0 | (Tt.width || Ue.framebufferWidth - rt), wt = 0 | (Tt.height || Ue.framebufferHeight - ut), Lt = Tt.data || null), Re(), Tt = Bt * wt * 4, Lt || (Pt === 5121 ? Lt = new Uint8Array(Tt) : Pt === 5126 && (Lt = Lt || new Float32Array(Tt))), he.pixelStorei(3333, 4), he.readPixels(rt, ut, Bt, wt, 6408, Pt, Lt), Lt;
          }
          return function(Tt) {
            return Tt && "framebuffer" in Tt ? function(Pt) {
              var rt;
              return be.setFBO({ framebuffer: Pt.framebuffer }, function() {
                rt = it(Pt);
              }), rt;
            }(Tt) : it(Tt);
          };
        }
        function R(he, be) {
          return he >>> be | he << 32 - be;
        }
        function z(he, be) {
          var Re = (65535 & he) + (65535 & be);
          return (he >> 16) + (be >> 16) + (Re >> 16) << 16 | 65535 & Re;
        }
        function j(he) {
          return Array.prototype.slice.call(he);
        }
        function H(he) {
          return j(he).join("");
        }
        function Y(he) {
          function be() {
            var rt = [], ut = [];
            return N(function() {
              rt.push.apply(rt, j(arguments));
            }, { def: function() {
              var Bt = "v" + Xe++;
              return ut.push(Bt), 0 < arguments.length && (rt.push(Bt, "="), rt.push.apply(rt, j(arguments)), rt.push(";")), Bt;
            }, toString: function() {
              return H([0 < ut.length ? "var " + ut.join(",") + ";" : "", H(rt)]);
            } });
          }
          function Re() {
            function rt(Se, We) {
              Bt(Se, We, "=", ut.def(Se, We), ";");
            }
            var ut = be(), Bt = be(), wt = ut.toString, Lt = Bt.toString;
            return N(function() {
              ut.apply(ut, j(arguments));
            }, { def: ut.def, entry: ut, exit: Bt, save: rt, set: function(Se, We, nt) {
              rt(Se, We), ut(Se, We, "=", nt, ";");
            }, toString: function() {
              return wt() + Lt();
            } });
          }
          var Ue = he && he.cache, Xe = 0, qe = [], st = [], it = [], Tt = be(), Pt = {};
          return { global: Tt, link: function(rt, ut) {
            var Bt = ut && ut.stable;
            if (!Bt) {
              for (var wt = 0; wt < st.length; ++wt)
                if (st[wt] === rt && !it[wt])
                  return qe[wt];
            }
            return wt = "g" + Xe++, qe.push(wt), st.push(rt), it.push(Bt), wt;
          }, block: be, proc: function(rt, ut) {
            function Bt() {
              var We = "a" + wt.length;
              return wt.push(We), We;
            }
            var wt = [];
            ut = ut || 0;
            for (var Lt = 0; Lt < ut; ++Lt)
              Bt();
            var Se = (Lt = Re()).toString;
            return Pt[rt] = N(Lt, { arg: Bt, toString: function() {
              return H(["function(", wt.join(), "){", Se(), "}"]);
            } });
          }, scope: Re, cond: function() {
            var rt = H(arguments), ut = Re(), Bt = Re(), wt = ut.toString, Lt = Bt.toString;
            return N(ut, { then: function() {
              return ut.apply(ut, j(arguments)), this;
            }, else: function() {
              return Bt.apply(Bt, j(arguments)), this;
            }, toString: function() {
              var Se = Lt();
              return Se && (Se = "else{" + Se + "}"), H(["if(", rt, "){", wt(), "}", Se]);
            } });
          }, compile: function() {
            var rt = ['"use strict";', Tt, "return {"];
            Object.keys(Pt).forEach(function(wt) {
              rt.push('"', wt, '":', Pt[wt].toString(), ",");
            }), rt.push("}");
            var ut, Bt = H(rt).replace(/;/g, `;
`).replace(/}/g, `}
`).replace(/{/g, `{
`);
            return Ue && (ut = function(wt) {
              for (var Lt, Se = "", We = 0; We < wt.length; We++)
                Lt = wt.charCodeAt(We), Se += "0123456789abcdef".charAt(Lt >>> 4 & 15) + "0123456789abcdef".charAt(15 & Lt);
              return Se;
            }(function(wt) {
              for (var Lt = Array(wt.length >> 2), Se = 0; Se < Lt.length; Se++)
                Lt[Se] = 0;
              for (Se = 0; Se < 8 * wt.length; Se += 8)
                Lt[Se >> 5] |= (255 & wt.charCodeAt(Se / 8)) << 24 - Se % 32;
              var We, nt, ft, Mt, Nt, Zt, Ut, fr, Tr, ur, Kt, $t = 8 * wt.length;
              for (wt = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225], Se = Array(64), Lt[$t >> 5] |= 128 << 24 - $t % 32, Lt[15 + ($t + 64 >> 9 << 4)] = $t, fr = 0; fr < Lt.length; fr += 16) {
                for ($t = wt[0], We = wt[1], nt = wt[2], ft = wt[3], Mt = wt[4], Nt = wt[5], Zt = wt[6], Ut = wt[7], Tr = 0; 64 > Tr; Tr++) {
                  var er;
                  16 > Tr ? Se[Tr] = Lt[Tr + fr] : (ur = Tr, Kt = z(Kt = R(Kt = Se[Tr - 2], 17) ^ R(Kt, 19) ^ Kt >>> 10, Se[Tr - 7]), er = R(er = Se[Tr - 15], 7) ^ R(er, 18) ^ er >>> 3, Se[ur] = z(z(Kt, er), Se[Tr - 16])), ur = z(z(z(z(Ut, ur = R(ur = Mt, 6) ^ R(ur, 11) ^ R(ur, 25)), Mt & Nt ^ ~Mt & Zt), Ft[Tr]), Se[Tr]), Kt = z(Ut = R(Ut = $t, 2) ^ R(Ut, 13) ^ R(Ut, 22), $t & We ^ $t & nt ^ We & nt), Ut = Zt, Zt = Nt, Nt = Mt, Mt = z(ft, ur), ft = nt, nt = We, We = $t, $t = z(ur, Kt);
                }
                wt[0] = z($t, wt[0]), wt[1] = z(We, wt[1]), wt[2] = z(nt, wt[2]), wt[3] = z(ft, wt[3]), wt[4] = z(Mt, wt[4]), wt[5] = z(Nt, wt[5]), wt[6] = z(Zt, wt[6]), wt[7] = z(Ut, wt[7]);
              }
              for (Lt = "", Se = 0; Se < 32 * wt.length; Se += 8)
                Lt += String.fromCharCode(wt[Se >> 5] >>> 24 - Se % 32 & 255);
              return Lt;
            }(function(wt) {
              for (var Lt, Se, We = "", nt = -1; ++nt < wt.length; )
                Lt = wt.charCodeAt(nt), Se = nt + 1 < wt.length ? wt.charCodeAt(nt + 1) : 0, 55296 <= Lt && 56319 >= Lt && 56320 <= Se && 57343 >= Se && (Lt = 65536 + ((1023 & Lt) << 10) + (1023 & Se), nt++), 127 >= Lt ? We += String.fromCharCode(Lt) : 2047 >= Lt ? We += String.fromCharCode(192 | Lt >>> 6 & 31, 128 | 63 & Lt) : 65535 >= Lt ? We += String.fromCharCode(224 | Lt >>> 12 & 15, 128 | Lt >>> 6 & 63, 128 | 63 & Lt) : 2097151 >= Lt && (We += String.fromCharCode(240 | Lt >>> 18 & 7, 128 | Lt >>> 12 & 63, 128 | Lt >>> 6 & 63, 128 | 63 & Lt));
              return We;
            }(Bt))), Ue[ut]) ? Ue[ut].apply(null, st) : (Bt = Function.apply(null, qe.concat(Bt)), Ue && (Ue[ut] = Bt), Bt.apply(null, st));
          } };
        }
        function J(he) {
          return Array.isArray(he) || ve(he) || t(he);
        }
        function W(he) {
          return he.sort(function(be, Re) {
            return be === "viewport" ? -1 : Re === "viewport" ? 1 : be < Re ? -1 : 1;
          });
        }
        function Z(he, be, Re, Ue) {
          this.thisDep = he, this.contextDep = be, this.propDep = Re, this.append = Ue;
        }
        function re(he) {
          return he && !(he.thisDep || he.contextDep || he.propDep);
        }
        function V(he) {
          return new Z(!1, !1, !1, he);
        }
        function B(he, be) {
          var Re = he.type;
          if (Re === 0)
            return new Z(!0, 1 <= (Re = he.data.length), 2 <= Re, be);
          if (Re === 4)
            return new Z((Re = he.data).thisDep, Re.contextDep, Re.propDep, be);
          if (Re === 5)
            return new Z(!1, !1, !1, be);
          if (Re === 6) {
            for (var Ue = Re = !1, Xe = !1, qe = 0; qe < he.data.length; ++qe) {
              var st = he.data[qe];
              st.type === 1 ? Xe = !0 : st.type === 2 ? Ue = !0 : st.type === 3 ? Re = !0 : st.type === 0 ? (Re = !0, 1 <= (st = st.data) && (Ue = !0), 2 <= st && (Xe = !0)) : st.type === 4 && (Re = Re || st.data.thisDep, Ue = Ue || st.data.contextDep, Xe = Xe || st.data.propDep);
            }
            return new Z(Re, Ue, Xe, be);
          }
          return new Z(Re === 3, Re === 2, Re === 1, be);
        }
        function U(he, be, Re, Ue, Xe, qe, st, it, Tt, Pt, rt, ut, Bt, wt, Lt, Se) {
          function We(Ct) {
            return Ct.replace(".", "_");
          }
          function nt(Ct, or, hr) {
            var Rr = We(Ct);
            Hn.push(Ct), cn[Rr] = Qr[Rr] = !!hr, _n[Rr] = or;
          }
          function ft(Ct, or, hr) {
            var Rr = We(Ct);
            Hn.push(Ct), Array.isArray(hr) ? (Qr[Rr] = hr.slice(), cn[Rr] = hr.slice()) : Qr[Rr] = cn[Rr] = hr, En[Rr] = or;
          }
          function Mt() {
            var Ct = Y({ cache: Lt }), or = Ct.link, hr = Ct.global;
            Ct.id = mr++, Ct.batchId = "0";
            var Rr = or(aa), Dr = Ct.shared = { props: "a0" };
            Object.keys(aa).forEach(function(wr) {
              Dr[wr] = hr.def(Rr, ".", wr);
            });
            var Or = Ct.next = {}, Ar = Ct.current = {};
            Object.keys(En).forEach(function(wr) {
              Array.isArray(Qr[wr]) && (Or[wr] = hr.def(Dr.next, ".", wr), Ar[wr] = hr.def(Dr.current, ".", wr));
            });
            var vr = Ct.constants = {};
            Object.keys(tr).forEach(function(wr) {
              vr[wr] = hr.def(JSON.stringify(tr[wr]));
            }), Ct.invoke = function(wr, Er) {
              switch (Er.type) {
                case 0:
                  var Hr = ["this", Dr.context, Dr.props, Ct.batchId];
                  return wr.def(or(Er.data), ".call(", Hr.slice(0, Math.max(Er.data.length + 1, 4)), ")");
                case 1:
                  return wr.def(Dr.props, Er.data);
                case 2:
                  return wr.def(Dr.context, Er.data);
                case 3:
                  return wr.def("this", Er.data);
                case 4:
                  return Er.data.append(Ct, wr), Er.data.ref;
                case 5:
                  return Er.data.toString();
                case 6:
                  return Er.data.map(function(Vr) {
                    return Ct.invoke(wr, Vr);
                  });
              }
            }, Ct.attribCache = {};
            var xr = {};
            return Ct.scopeAttrib = function(wr) {
              if ((wr = be.id(wr)) in xr)
                return xr[wr];
              var Er = Pt.scope[wr];
              return Er || (Er = Pt.scope[wr] = new xn()), xr[wr] = or(Er);
            }, Ct;
          }
          function Nt(Ct, or) {
            var hr = Ct.static, Rr = Ct.dynamic;
            if ("framebuffer" in hr) {
              var Dr = hr.framebuffer;
              return Dr ? (Dr = it.getFramebuffer(Dr), V(function(Ar, vr) {
                var xr = Ar.link(Dr), wr = Ar.shared;
                return vr.set(wr.framebuffer, ".next", xr), wr = wr.context, vr.set(wr, ".framebufferWidth", xr + ".width"), vr.set(wr, ".framebufferHeight", xr + ".height"), xr;
              })) : V(function(Ar, vr) {
                var xr = Ar.shared;
                return vr.set(xr.framebuffer, ".next", "null"), xr = xr.context, vr.set(xr, ".framebufferWidth", xr + ".drawingBufferWidth"), vr.set(xr, ".framebufferHeight", xr + ".drawingBufferHeight"), "null";
              });
            }
            if ("framebuffer" in Rr) {
              var Or = Rr.framebuffer;
              return B(Or, function(Ar, vr) {
                var xr = Ar.invoke(vr, Or), wr = Ar.shared, Er = wr.framebuffer;
                return xr = vr.def(Er, ".getFramebuffer(", xr, ")"), vr.set(Er, ".next", xr), wr = wr.context, vr.set(wr, ".framebufferWidth", xr + "?" + xr + ".width:" + wr + ".drawingBufferWidth"), vr.set(wr, ".framebufferHeight", xr + "?" + xr + ".height:" + wr + ".drawingBufferHeight"), xr;
              });
            }
            return null;
          }
          function Zt(Ct, or, hr) {
            function Rr(wr) {
              if (wr in Dr) {
                var Er = be.id(Dr[wr]);
                return (wr = V(function() {
                  return Er;
                })).id = Er, wr;
              }
              if (wr in Or) {
                var Hr = Or[wr];
                return B(Hr, function(Vr, Kr) {
                  var en = Vr.invoke(Kr, Hr);
                  return Kr.def(Vr.shared.strings, ".id(", en, ")");
                });
              }
              return null;
            }
            var Dr = Ct.static, Or = Ct.dynamic, Ar = Rr("frag"), vr = Rr("vert"), xr = null;
            return re(Ar) && re(vr) ? (xr = rt.program(vr.id, Ar.id, null, hr), Ct = V(function(wr, Er) {
              return wr.link(xr);
            })) : Ct = new Z(Ar && Ar.thisDep || vr && vr.thisDep, Ar && Ar.contextDep || vr && vr.contextDep, Ar && Ar.propDep || vr && vr.propDep, function(wr, Er) {
              var Hr, Vr, Kr = wr.shared.shader;
              return Hr = Ar ? Ar.append(wr, Er) : Er.def(Kr, ".", "frag"), Vr = vr ? vr.append(wr, Er) : Er.def(Kr, ".", "vert"), Er.def(Kr + ".program(" + Vr + "," + Hr + ")");
            }), { frag: Ar, vert: vr, progVar: Ct, program: xr };
          }
          function Ut(Ct, or) {
            function hr(en, gn) {
              if (en in Rr) {
                var bn = 0 | Rr[en];
                return gn ? Or.offset = bn : Or.instances = bn, V(function(Ln, In) {
                  return gn && (Ln.OFFSET = bn), bn;
                });
              }
              if (en in Dr) {
                var wn = Dr[en];
                return B(wn, function(Ln, In) {
                  var Yn = Ln.invoke(In, wn);
                  return gn && (Ln.OFFSET = Yn), Yn;
                });
              }
              if (gn) {
                if (xr)
                  return V(function(Ln, In) {
                    return Ln.OFFSET = 0;
                  });
                if (Ar)
                  return new Z(vr.thisDep, vr.contextDep, vr.propDep, function(Ln, In) {
                    return In.def(Ln.shared.vao + ".currentVAO?" + Ln.shared.vao + ".currentVAO.offset:0");
                  });
              } else if (Ar)
                return new Z(vr.thisDep, vr.contextDep, vr.propDep, function(Ln, In) {
                  return In.def(Ln.shared.vao + ".currentVAO?" + Ln.shared.vao + ".currentVAO.instances:-1");
                });
              return null;
            }
            var Rr = Ct.static, Dr = Ct.dynamic, Or = {}, Ar = !1, vr = function() {
              if ("vao" in Rr) {
                var en = Rr.vao;
                return en !== null && Pt.getVAO(en) === null && (en = Pt.createVAO(en)), Ar = !0, Or.vao = en, V(function(bn) {
                  var wn = Pt.getVAO(en);
                  return wn ? bn.link(wn) : "null";
                });
              }
              if ("vao" in Dr) {
                Ar = !0;
                var gn = Dr.vao;
                return B(gn, function(bn, wn) {
                  var Ln = bn.invoke(wn, gn);
                  return wn.def(bn.shared.vao + ".getVAO(" + Ln + ")");
                });
              }
              return null;
            }(), xr = !1, wr = function() {
              if ("elements" in Rr) {
                var en = Rr.elements;
                if (Or.elements = en, J(en)) {
                  var gn = Or.elements = qe.create(en, !0);
                  en = qe.getElements(gn), xr = !0;
                } else
                  en && (en = qe.getElements(en), xr = !0);
                return (gn = V(function(wn, Ln) {
                  if (en) {
                    var In = wn.link(en);
                    return wn.ELEMENTS = In;
                  }
                  return wn.ELEMENTS = null;
                })).value = en, gn;
              }
              if ("elements" in Dr) {
                xr = !0;
                var bn = Dr.elements;
                return B(bn, function(wn, Ln) {
                  var In = (Yn = wn.shared).isBufferArgs, Yn = Yn.elements, ka = wn.invoke(Ln, bn), Ta = Ln.def("null");
                  return In = Ln.def(In, "(", ka, ")"), ka = wn.cond(In).then(Ta, "=", Yn, ".createStream(", ka, ");").else(Ta, "=", Yn, ".getElements(", ka, ");"), Ln.entry(ka), Ln.exit(wn.cond(In).then(Yn, ".destroyStream(", Ta, ");")), wn.ELEMENTS = Ta;
                });
              }
              return Ar ? new Z(vr.thisDep, vr.contextDep, vr.propDep, function(wn, Ln) {
                return Ln.def(wn.shared.vao + ".currentVAO?" + wn.shared.elements + ".getElements(" + wn.shared.vao + ".currentVAO.elements):null");
              }) : null;
            }(), Er = hr("offset", !0), Hr = function() {
              if ("primitive" in Rr) {
                var en = Rr.primitive;
                return Or.primitive = en, V(function(bn, wn) {
                  return Te[en];
                });
              }
              if ("primitive" in Dr) {
                var gn = Dr.primitive;
                return B(gn, function(bn, wn) {
                  var Ln = bn.constants.primTypes, In = bn.invoke(wn, gn);
                  return wn.def(Ln, "[", In, "]");
                });
              }
              return xr ? re(wr) ? wr.value ? V(function(bn, wn) {
                return wn.def(bn.ELEMENTS, ".primType");
              }) : V(function() {
                return 4;
              }) : new Z(wr.thisDep, wr.contextDep, wr.propDep, function(bn, wn) {
                var Ln = bn.ELEMENTS;
                return wn.def(Ln, "?", Ln, ".primType:", 4);
              }) : Ar ? new Z(vr.thisDep, vr.contextDep, vr.propDep, function(bn, wn) {
                return wn.def(bn.shared.vao + ".currentVAO?" + bn.shared.vao + ".currentVAO.primitive:4");
              }) : null;
            }(), Vr = function() {
              if ("count" in Rr) {
                var en = 0 | Rr.count;
                return Or.count = en, V(function() {
                  return en;
                });
              }
              if ("count" in Dr) {
                var gn = Dr.count;
                return B(gn, function(bn, wn) {
                  return bn.invoke(wn, gn);
                });
              }
              return xr ? re(wr) ? wr ? Er ? new Z(Er.thisDep, Er.contextDep, Er.propDep, function(bn, wn) {
                return wn.def(bn.ELEMENTS, ".vertCount-", bn.OFFSET);
              }) : V(function(bn, wn) {
                return wn.def(bn.ELEMENTS, ".vertCount");
              }) : V(function() {
                return -1;
              }) : new Z(wr.thisDep || Er.thisDep, wr.contextDep || Er.contextDep, wr.propDep || Er.propDep, function(bn, wn) {
                var Ln = bn.ELEMENTS;
                return bn.OFFSET ? wn.def(Ln, "?", Ln, ".vertCount-", bn.OFFSET, ":-1") : wn.def(Ln, "?", Ln, ".vertCount:-1");
              }) : Ar ? new Z(vr.thisDep, vr.contextDep, vr.propDep, function(bn, wn) {
                return wn.def(bn.shared.vao, ".currentVAO?", bn.shared.vao, ".currentVAO.count:-1");
              }) : null;
            }(), Kr = hr("instances", !1);
            return { elements: wr, primitive: Hr, count: Vr, instances: Kr, offset: Er, vao: vr, vaoActive: Ar, elementsActive: xr, static: Or };
          }
          function fr(Ct, or) {
            var hr = Ct.static, Rr = Ct.dynamic, Dr = {};
            return Object.keys(hr).forEach(function(Or) {
              var Ar = hr[Or], vr = be.id(Or), xr = new xn();
              if (J(Ar))
                xr.state = 1, xr.buffer = Xe.getBuffer(Xe.create(Ar, 34962, !1, !0)), xr.type = 0;
              else if (Er = Xe.getBuffer(Ar))
                xr.state = 1, xr.buffer = Er, xr.type = 0;
              else if ("constant" in Ar) {
                var wr = Ar.constant;
                xr.buffer = "null", xr.state = 2, typeof wr == "number" ? xr.x = wr : Vt.forEach(function(bn, wn) {
                  wn < wr.length && (xr[bn] = wr[wn]);
                });
              } else {
                var Er = J(Ar.buffer) ? Xe.getBuffer(Xe.create(Ar.buffer, 34962, !1, !0)) : Xe.getBuffer(Ar.buffer), Hr = 0 | Ar.offset, Vr = 0 | Ar.stride, Kr = 0 | Ar.size, en = !!Ar.normalized, gn = 0;
                "type" in Ar && (gn = pe[Ar.type]), Ar = 0 | Ar.divisor, xr.buffer = Er, xr.state = 1, xr.size = Kr, xr.normalized = en, xr.type = gn || Er.dtype, xr.offset = Hr, xr.stride = Vr, xr.divisor = Ar;
              }
              Dr[Or] = V(function(bn, wn) {
                var Ln = bn.attribCache;
                if (vr in Ln)
                  return Ln[vr];
                var In = { isStream: !1 };
                return Object.keys(xr).forEach(function(Yn) {
                  In[Yn] = xr[Yn];
                }), xr.buffer && (In.buffer = bn.link(xr.buffer), In.type = In.type || In.buffer + ".dtype"), Ln[vr] = In;
              });
            }), Object.keys(Rr).forEach(function(Or) {
              var Ar = Rr[Or];
              Dr[Or] = B(Ar, function(vr, xr) {
                function wr(Ln) {
                  xr(en[Ln], "=", Er, ".", Ln, "|0;");
                }
                var Er = vr.invoke(xr, Ar), Hr = vr.shared, Vr = vr.constants, Kr = Hr.isBufferArgs, en = (Hr = Hr.buffer, { isStream: xr.def(!1) }), gn = new xn();
                gn.state = 1, Object.keys(gn).forEach(function(Ln) {
                  en[Ln] = xr.def("" + gn[Ln]);
                });
                var bn = en.buffer, wn = en.type;
                return xr("if(", Kr, "(", Er, ")){", en.isStream, "=true;", bn, "=", Hr, ".createStream(", 34962, ",", Er, ");", wn, "=", bn, ".dtype;", "}else{", bn, "=", Hr, ".getBuffer(", Er, ");", "if(", bn, "){", wn, "=", bn, ".dtype;", '}else if("constant" in ', Er, "){", en.state, "=", 2, ";", "if(typeof " + Er + '.constant === "number"){', en[Vt[0]], "=", Er, ".constant;", Vt.slice(1).map(function(Ln) {
                  return en[Ln];
                }).join("="), "=0;", "}else{", Vt.map(function(Ln, In) {
                  return en[Ln] + "=" + Er + ".constant.length>" + In + "?" + Er + ".constant[" + In + "]:0;";
                }).join(""), "}}else{", "if(", Kr, "(", Er, ".buffer)){", bn, "=", Hr, ".createStream(", 34962, ",", Er, ".buffer);", "}else{", bn, "=", Hr, ".getBuffer(", Er, ".buffer);", "}", wn, '="type" in ', Er, "?", Vr.glTypes, "[", Er, ".type]:", bn, ".dtype;", en.normalized, "=!!", Er, ".normalized;"), wr("size"), wr("offset"), wr("stride"), wr("divisor"), xr("}}"), xr.exit("if(", en.isStream, "){", Hr, ".destroyStream(", bn, ");", "}"), en;
              });
            }), Dr;
          }
          function Tr(Ct, or, hr, Rr, Dr) {
            function Or(gn) {
              var bn = vr[gn];
              bn && (wr[gn] = bn);
            }
            var Ar = function(gn, bn) {
              if (typeof (wn = gn.static).frag == "string" && typeof wn.vert == "string") {
                if (0 < Object.keys(bn.dynamic).length)
                  return null;
                var wn = bn.static, Ln = Object.keys(wn);
                if (0 < Ln.length && typeof wn[Ln[0]] == "number") {
                  for (var In = [], Yn = 0; Yn < Ln.length; ++Yn)
                    In.push([0 | wn[Ln[Yn]], Ln[Yn]]);
                  return In;
                }
              }
              return null;
            }(Ct, or), vr = function(gn, bn, wn) {
              function Ln(Ta) {
                if (Ta in In) {
                  var An = In[Ta];
                  Ta = !0;
                  var Kn, Xn, Ia = 0 | An.x, hi = 0 | An.y;
                  return "width" in An ? Kn = 0 | An.width : Ta = !1, "height" in An ? Xn = 0 | An.height : Ta = !1, new Z(!Ta && bn && bn.thisDep, !Ta && bn && bn.contextDep, !Ta && bn && bn.propDep, function(so, Ga) {
                    var Ya = so.shared.context, Zi = Kn;
                    "width" in An || (Zi = Ga.def(Ya, ".", "framebufferWidth", "-", Ia));
                    var Fa = Xn;
                    return "height" in An || (Fa = Ga.def(Ya, ".", "framebufferHeight", "-", hi)), [Ia, hi, Zi, Fa];
                  });
                }
                if (Ta in Yn) {
                  var Ii = Yn[Ta];
                  return Ta = B(Ii, function(so, Ga) {
                    var Ya = so.invoke(Ga, Ii), Zi = so.shared.context, Fa = Ga.def(Ya, ".x|0"), lo = Ga.def(Ya, ".y|0");
                    return [Fa, lo, Ga.def('"width" in ', Ya, "?", Ya, ".width|0:", "(", Zi, ".", "framebufferWidth", "-", Fa, ")"), Ya = Ga.def('"height" in ', Ya, "?", Ya, ".height|0:", "(", Zi, ".", "framebufferHeight", "-", lo, ")")];
                  }), bn && (Ta.thisDep = Ta.thisDep || bn.thisDep, Ta.contextDep = Ta.contextDep || bn.contextDep, Ta.propDep = Ta.propDep || bn.propDep), Ta;
                }
                return bn ? new Z(bn.thisDep, bn.contextDep, bn.propDep, function(so, Ga) {
                  var Ya = so.shared.context;
                  return [0, 0, Ga.def(Ya, ".", "framebufferWidth"), Ga.def(Ya, ".", "framebufferHeight")];
                }) : null;
              }
              var In = gn.static, Yn = gn.dynamic;
              if (gn = Ln("viewport")) {
                var ka = gn;
                gn = new Z(gn.thisDep, gn.contextDep, gn.propDep, function(Ta, An) {
                  var Kn = ka.append(Ta, An), Xn = Ta.shared.context;
                  return An.set(Xn, ".viewportWidth", Kn[2]), An.set(Xn, ".viewportHeight", Kn[3]), Kn;
                });
              }
              return { viewport: gn, scissor_box: Ln("scissor.box") };
            }(Ct, Hr = Nt(Ct)), xr = Ut(Ct), wr = function(gn, bn) {
              var wn = gn.static, Ln = gn.dynamic, In = {};
              return Hn.forEach(function(Yn) {
                function ka(An, Kn) {
                  if (Yn in wn) {
                    var Xn = An(wn[Yn]);
                    In[Ta] = V(function() {
                      return Xn;
                    });
                  } else if (Yn in Ln) {
                    var Ia = Ln[Yn];
                    In[Ta] = B(Ia, function(hi, Ii) {
                      return Kn(hi, Ii, hi.invoke(Ii, Ia));
                    });
                  }
                }
                var Ta = We(Yn);
                switch (Yn) {
                  case "cull.enable":
                  case "blend.enable":
                  case "dither":
                  case "stencil.enable":
                  case "depth.enable":
                  case "scissor.enable":
                  case "polygonOffset.enable":
                  case "sample.alpha":
                  case "sample.enable":
                  case "depth.mask":
                    return ka(function(An) {
                      return An;
                    }, function(An, Kn, Xn) {
                      return Xn;
                    });
                  case "depth.func":
                    return ka(function(An) {
                      return nr[An];
                    }, function(An, Kn, Xn) {
                      return Kn.def(An.constants.compareFuncs, "[", Xn, "]");
                    });
                  case "depth.range":
                    return ka(function(An) {
                      return An;
                    }, function(An, Kn, Xn) {
                      return [Kn.def("+", Xn, "[0]"), Kn = Kn.def("+", Xn, "[1]")];
                    });
                  case "blend.func":
                    return ka(function(An) {
                      return [Gt["srcRGB" in An ? An.srcRGB : An.src], Gt["dstRGB" in An ? An.dstRGB : An.dst], Gt["srcAlpha" in An ? An.srcAlpha : An.src], Gt["dstAlpha" in An ? An.dstAlpha : An.dst]];
                    }, function(An, Kn, Xn) {
                      function Ia(Ga, Ya) {
                        return Kn.def('"', Ga, Ya, '" in ', Xn, "?", Xn, ".", Ga, Ya, ":", Xn, ".", Ga);
                      }
                      An = An.constants.blendFuncs;
                      var hi = Ia("src", "RGB"), Ii = Ia("dst", "RGB"), so = (hi = Kn.def(An, "[", hi, "]"), Kn.def(An, "[", Ia("src", "Alpha"), "]"));
                      return [hi, Ii = Kn.def(An, "[", Ii, "]"), so, An = Kn.def(An, "[", Ia("dst", "Alpha"), "]")];
                    });
                  case "blend.equation":
                    return ka(function(An) {
                      return typeof An == "string" ? [$n[An], $n[An]] : typeof An == "object" ? [$n[An.rgb], $n[An.alpha]] : void 0;
                    }, function(An, Kn, Xn) {
                      var Ia = An.constants.blendEquations, hi = Kn.def(), Ii = Kn.def();
                      return (An = An.cond("typeof ", Xn, '==="string"')).then(hi, "=", Ii, "=", Ia, "[", Xn, "];"), An.else(hi, "=", Ia, "[", Xn, ".rgb];", Ii, "=", Ia, "[", Xn, ".alpha];"), Kn(An), [hi, Ii];
                    });
                  case "blend.color":
                    return ka(function(An) {
                      return r(4, function(Kn) {
                        return +An[Kn];
                      });
                    }, function(An, Kn, Xn) {
                      return r(4, function(Ia) {
                        return Kn.def("+", Xn, "[", Ia, "]");
                      });
                    });
                  case "stencil.mask":
                    return ka(function(An) {
                      return 0 | An;
                    }, function(An, Kn, Xn) {
                      return Kn.def(Xn, "|0");
                    });
                  case "stencil.func":
                    return ka(function(An) {
                      return [nr[An.cmp || "keep"], An.ref || 0, "mask" in An ? An.mask : -1];
                    }, function(An, Kn, Xn) {
                      return [An = Kn.def('"cmp" in ', Xn, "?", An.constants.compareFuncs, "[", Xn, ".cmp]", ":", 7680), Kn.def(Xn, ".ref|0"), Kn = Kn.def('"mask" in ', Xn, "?", Xn, ".mask|0:-1")];
                    });
                  case "stencil.opFront":
                  case "stencil.opBack":
                    return ka(function(An) {
                      return [Yn === "stencil.opBack" ? 1029 : 1028, It[An.fail || "keep"], It[An.zfail || "keep"], It[An.zpass || "keep"]];
                    }, function(An, Kn, Xn) {
                      function Ia(Ii) {
                        return Kn.def('"', Ii, '" in ', Xn, "?", hi, "[", Xn, ".", Ii, "]:", 7680);
                      }
                      var hi = An.constants.stencilOps;
                      return [Yn === "stencil.opBack" ? 1029 : 1028, Ia("fail"), Ia("zfail"), Ia("zpass")];
                    });
                  case "polygonOffset.offset":
                    return ka(function(An) {
                      return [0 | An.factor, 0 | An.units];
                    }, function(An, Kn, Xn) {
                      return [Kn.def(Xn, ".factor|0"), Kn = Kn.def(Xn, ".units|0")];
                    });
                  case "cull.face":
                    return ka(function(An) {
                      var Kn = 0;
                      return An === "front" ? Kn = 1028 : An === "back" && (Kn = 1029), Kn;
                    }, function(An, Kn, Xn) {
                      return Kn.def(Xn, '==="front"?', 1028, ":", 1029);
                    });
                  case "lineWidth":
                    return ka(function(An) {
                      return An;
                    }, function(An, Kn, Xn) {
                      return Xn;
                    });
                  case "frontFace":
                    return ka(function(An) {
                      return Be[An];
                    }, function(An, Kn, Xn) {
                      return Kn.def(Xn + '==="cw"?2304:2305');
                    });
                  case "colorMask":
                    return ka(function(An) {
                      return An.map(function(Kn) {
                        return !!Kn;
                      });
                    }, function(An, Kn, Xn) {
                      return r(4, function(Ia) {
                        return "!!" + Xn + "[" + Ia + "]";
                      });
                    });
                  case "sample.coverage":
                    return ka(function(An) {
                      return ["value" in An ? An.value : 1, !!An.invert];
                    }, function(An, Kn, Xn) {
                      return [Kn.def('"value" in ', Xn, "?+", Xn, ".value:1"), Kn = Kn.def("!!", Xn, ".invert")];
                    });
                }
              }), In;
            }(Ct), Er = Zt(Ct, 0, Ar);
            Or("viewport"), Or(We("scissor.box"));
            var Hr, Vr = 0 < Object.keys(wr).length;
            if ((Hr = { framebuffer: Hr, draw: xr, shader: Er, state: wr, dirty: Vr, scopeVAO: null, drawVAO: null, useVAO: !1, attributes: {} }).profile = function(gn) {
              var bn, wn = gn.static;
              if (gn = gn.dynamic, "profile" in wn) {
                var Ln = !!wn.profile;
                (bn = V(function(Yn, ka) {
                  return Ln;
                })).enable = Ln;
              } else if ("profile" in gn) {
                var In = gn.profile;
                bn = B(In, function(Yn, ka) {
                  return Yn.invoke(ka, In);
                });
              }
              return bn;
            }(Ct), Hr.uniforms = function(gn, bn) {
              var wn = gn.static, Ln = gn.dynamic, In = {};
              return Object.keys(wn).forEach(function(Yn) {
                var ka, Ta = wn[Yn];
                if (typeof Ta == "number" || typeof Ta == "boolean")
                  ka = V(function() {
                    return Ta;
                  });
                else if (typeof Ta == "function") {
                  var An = Ta._reglType;
                  An === "texture2d" || An === "textureCube" ? ka = V(function(Kn) {
                    return Kn.link(Ta);
                  }) : An !== "framebuffer" && An !== "framebufferCube" || (ka = V(function(Kn) {
                    return Kn.link(Ta.color[0]);
                  }));
                } else
                  c(Ta) && (ka = V(function(Kn) {
                    return Kn.global.def("[", r(Ta.length, function(Xn) {
                      return Ta[Xn];
                    }), "]");
                  }));
                ka.value = Ta, In[Yn] = ka;
              }), Object.keys(Ln).forEach(function(Yn) {
                var ka = Ln[Yn];
                In[Yn] = B(ka, function(Ta, An) {
                  return Ta.invoke(An, ka);
                });
              }), In;
            }(hr), Hr.drawVAO = Hr.scopeVAO = xr.vao, !Hr.drawVAO && Er.program && !Ar && Re.angle_instanced_arrays && xr.static.elements) {
              var Kr = !0;
              if (Ct = Er.program.attributes.map(function(gn) {
                return gn = or.static[gn], Kr = Kr && !!gn, gn;
              }), Kr && 0 < Ct.length) {
                var en = Pt.getVAO(Pt.createVAO({ attributes: Ct, elements: xr.static.elements }));
                Hr.drawVAO = new Z(null, null, null, function(gn, bn) {
                  return gn.link(en);
                }), Hr.useVAO = !0;
              }
            }
            return Ar ? Hr.useVAO = !0 : Hr.attributes = fr(or), Hr.context = function(gn) {
              var bn = gn.static, wn = gn.dynamic, Ln = {};
              return Object.keys(bn).forEach(function(In) {
                var Yn = bn[In];
                Ln[In] = V(function(ka, Ta) {
                  return typeof Yn == "number" || typeof Yn == "boolean" ? "" + Yn : ka.link(Yn);
                });
              }), Object.keys(wn).forEach(function(In) {
                var Yn = wn[In];
                Ln[In] = B(Yn, function(ka, Ta) {
                  return ka.invoke(Ta, Yn);
                });
              }), Ln;
            }(Rr), Hr;
          }
          function ur(Ct, or, hr) {
            var Rr = Ct.shared.context, Dr = Ct.scope();
            Object.keys(hr).forEach(function(Or) {
              or.save(Rr, "." + Or);
              var Ar = hr[Or].append(Ct, or);
              Array.isArray(Ar) ? Dr(Rr, ".", Or, "=[", Ar.join(), "];") : Dr(Rr, ".", Or, "=", Ar, ";");
            }), or(Dr);
          }
          function Kt(Ct, or, hr, Rr) {
            var Dr, Or = (vr = Ct.shared).gl, Ar = vr.framebuffer;
            tn && (Dr = or.def(vr.extensions, ".webgl_draw_buffers"));
            var vr = (xr = Ct.constants).drawBuffer, xr = xr.backBuffer;
            Ct = hr ? hr.append(Ct, or) : or.def(Ar, ".next"), Rr || or("if(", Ct, "!==", Ar, ".cur){"), or("if(", Ct, "){", Or, ".bindFramebuffer(", 36160, ",", Ct, ".framebuffer);"), tn && or(Dr, ".drawBuffersWEBGL(", vr, "[", Ct, ".colorAttachments.length]);"), or("}else{", Or, ".bindFramebuffer(", 36160, ",null);"), tn && or(Dr, ".drawBuffersWEBGL(", xr, ");"), or("}", Ar, ".cur=", Ct, ";"), Rr || or("}");
          }
          function $t(Ct, or, hr) {
            var Rr = Ct.shared, Dr = Rr.gl, Or = Ct.current, Ar = Ct.next, vr = Rr.current, xr = Rr.next, wr = Ct.cond(vr, ".dirty");
            Hn.forEach(function(Er) {
              var Hr, Vr;
              if (!((Er = We(Er)) in hr.state))
                if (Er in Ar) {
                  Hr = Ar[Er], Vr = Or[Er];
                  var Kr = r(Qr[Er].length, function(en) {
                    return wr.def(Hr, "[", en, "]");
                  });
                  wr(Ct.cond(Kr.map(function(en, gn) {
                    return en + "!==" + Vr + "[" + gn + "]";
                  }).join("||")).then(Dr, ".", En[Er], "(", Kr, ");", Kr.map(function(en, gn) {
                    return Vr + "[" + gn + "]=" + en;
                  }).join(";"), ";"));
                } else
                  Hr = wr.def(xr, ".", Er), Kr = Ct.cond(Hr, "!==", vr, ".", Er), wr(Kr), Er in _n ? Kr(Ct.cond(Hr).then(Dr, ".enable(", _n[Er], ");").else(Dr, ".disable(", _n[Er], ");"), vr, ".", Er, "=", Hr, ";") : Kr(Dr, ".", En[Er], "(", Hr, ");", vr, ".", Er, "=", Hr, ";");
            }), Object.keys(hr.state).length === 0 && wr(vr, ".dirty=false;"), or(wr);
          }
          function er(Ct, or, hr, Rr) {
            var Dr, Or = Ct.shared, Ar = Ct.current, vr = Or.current, xr = Or.gl;
            W(Object.keys(hr)).forEach(function(wr) {
              var Er = hr[wr];
              if (!Rr || Rr(Er)) {
                var Hr = Er.append(Ct, or);
                if (_n[wr]) {
                  var Vr = _n[wr];
                  re(Er) ? (Dr = Ct.link(Hr, { stable: !0 }), or(Ct.cond(Dr).then(xr, ".enable(", Vr, ");").else(xr, ".disable(", Vr, ");")), or(vr, ".", wr, "=", Dr, ";")) : (or(Ct.cond(Hr).then(xr, ".enable(", Vr, ");").else(xr, ".disable(", Vr, ");")), or(vr, ".", wr, "=", Hr, ";"));
                } else if (c(Hr)) {
                  var Kr = Ar[wr];
                  or(xr, ".", En[wr], "(", Hr, ");", Hr.map(function(en, gn) {
                    return Kr + "[" + gn + "]=" + en;
                  }).join(";"), ";");
                } else
                  re(Er) ? (Dr = Ct.link(Hr, { stable: !0 }), or(xr, ".", En[wr], "(", Dr, ");", vr, ".", wr, "=", Dr, ";")) : or(xr, ".", En[wr], "(", Hr, ");", vr, ".", wr, "=", Hr, ";");
              }
            });
          }
          function cr(Ct, or) {
            Br && (Ct.instancing = or.def(Ct.shared.extensions, ".angle_instanced_arrays"));
          }
          function gr(Ct, or, hr, Rr, Dr) {
            function Or() {
              return typeof performance > "u" ? "Date.now()" : "performance.now()";
            }
            function Ar(gn) {
              gn(wr = or.def(), "=", Or(), ";"), typeof Dr == "string" ? gn(Vr, ".count+=", Dr, ";") : gn(Vr, ".count++;"), wt && (Rr ? gn(Er = or.def(), "=", en, ".getNumPendingQueries();") : gn(en, ".beginQuery(", Vr, ");"));
            }
            function vr(gn) {
              gn(Vr, ".cpuTime+=", Or(), "-", wr, ";"), wt && (Rr ? gn(en, ".pushScopeStats(", Er, ",", en, ".getNumPendingQueries(),", Vr, ");") : gn(en, ".endQuery();"));
            }
            function xr(gn) {
              var bn = or.def(Kr, ".profile");
              or(Kr, ".profile=", gn, ";"), or.exit(Kr, ".profile=", bn, ";");
            }
            var wr, Er, Hr = Ct.shared, Vr = Ct.stats, Kr = Hr.current, en = Hr.timer;
            if (hr = hr.profile) {
              if (re(hr))
                return void (hr.enable ? (Ar(or), vr(or.exit), xr("true")) : xr("false"));
              xr(hr = hr.append(Ct, or));
            } else
              hr = or.def(Kr, ".profile");
            Ar(Hr = Ct.block()), or("if(", hr, "){", Hr, "}"), vr(Ct = Ct.block()), or.exit("if(", hr, "){", Ct, "}");
          }
          function Mr(Ct, or, hr, Rr, Dr) {
            function Or(vr, xr, wr) {
              function Er() {
                or("if(!", en, ".buffer){", Vr, ".enableVertexAttribArray(", Kr, ");}");
                var Ln, In = wr.type;
                Ln = wr.size ? or.def(wr.size, "||", xr) : xr, or("if(", en, ".type!==", In, "||", en, ".size!==", Ln, "||", wn.map(function(Yn) {
                  return en + "." + Yn + "!==" + wr[Yn];
                }).join("||"), "){", Vr, ".bindBuffer(", 34962, ",", gn, ".buffer);", Vr, ".vertexAttribPointer(", [Kr, Ln, In, wr.normalized, wr.stride, wr.offset], ");", en, ".type=", In, ";", en, ".size=", Ln, ";", wn.map(function(Yn) {
                  return en + "." + Yn + "=" + wr[Yn] + ";";
                }).join(""), "}"), Br && (In = wr.divisor, or("if(", en, ".divisor!==", In, "){", Ct.instancing, ".vertexAttribDivisorANGLE(", [Kr, In], ");", en, ".divisor=", In, ";}"));
              }
              function Hr() {
                or("if(", en, ".buffer){", Vr, ".disableVertexAttribArray(", Kr, ");", en, ".buffer=null;", "}if(", Vt.map(function(Ln, In) {
                  return en + "." + Ln + "!==" + bn[In];
                }).join("||"), "){", Vr, ".vertexAttrib4f(", Kr, ",", bn, ");", Vt.map(function(Ln, In) {
                  return en + "." + Ln + "=" + bn[In] + ";";
                }).join(""), "}");
              }
              var Vr = Ar.gl, Kr = or.def(vr, ".location"), en = or.def(Ar.attributes, "[", Kr, "]");
              vr = wr.state;
              var gn = wr.buffer, bn = [wr.x, wr.y, wr.z, wr.w], wn = ["buffer", "normalized", "offset", "stride"];
              vr === 1 ? Er() : vr === 2 ? Hr() : (or("if(", vr, "===", 1, "){"), Er(), or("}else{"), Hr(), or("}"));
            }
            var Ar = Ct.shared;
            Rr.forEach(function(vr) {
              var xr, wr = vr.name, Er = hr.attributes[wr];
              if (Er) {
                if (!Dr(Er))
                  return;
                xr = Er.append(Ct, or);
              } else {
                if (!Dr(He))
                  return;
                var Hr = Ct.scopeAttrib(wr);
                xr = {}, Object.keys(new xn()).forEach(function(Vr) {
                  xr[Vr] = or.def(Hr, ".", Vr);
                });
              }
              Or(Ct.link(vr), function(Vr) {
                switch (Vr) {
                  case 35664:
                  case 35667:
                  case 35671:
                    return 2;
                  case 35665:
                  case 35668:
                  case 35672:
                    return 3;
                  case 35666:
                  case 35669:
                  case 35673:
                    return 4;
                  default:
                    return 1;
                }
              }(vr.info.type), xr);
            });
          }
          function Ir(Ct, or, hr, Rr, Dr, Or) {
            for (var Ar, vr = Ct.shared, xr = vr.gl, wr = 0; wr < Rr.length; ++wr) {
              var Er, Hr = (en = Rr[wr]).name, Vr = en.info.type, Kr = hr.uniforms[Hr], en = Ct.link(en) + ".location";
              if (Kr) {
                if (!Dr(Kr))
                  continue;
                if (re(Kr)) {
                  if (Hr = Kr.value, Vr === 35678 || Vr === 35680)
                    or(xr, ".uniform1i(", en, ",", (Vr = Ct.link(Hr._texture || Hr.color[0]._texture)) + ".bind());"), or.exit(Vr, ".unbind();");
                  else if (Vr === 35674 || Vr === 35675 || Vr === 35676)
                    Kr = 2, Vr === 35675 ? Kr = 3 : Vr === 35676 && (Kr = 4), or(xr, ".uniformMatrix", Kr, "fv(", en, ",false,", Hr = Ct.global.def("new Float32Array([" + Array.prototype.slice.call(Hr) + "])"), ");");
                  else {
                    switch (Vr) {
                      case 5126:
                        Ar = "1f";
                        break;
                      case 35664:
                        Ar = "2f";
                        break;
                      case 35665:
                        Ar = "3f";
                        break;
                      case 35666:
                        Ar = "4f";
                        break;
                      case 35670:
                      case 5124:
                        Ar = "1i";
                        break;
                      case 35671:
                      case 35667:
                        Ar = "2i";
                        break;
                      case 35672:
                      case 35668:
                        Ar = "3i";
                        break;
                      case 35673:
                        Ar = "4i";
                        break;
                      case 35669:
                        Ar = "4i";
                    }
                    or(xr, ".uniform", Ar, "(", en, ",", c(Hr) ? Array.prototype.slice.call(Hr) : Hr, ");");
                  }
                  continue;
                }
                Er = Kr.append(Ct, or);
              } else {
                if (!Dr(He))
                  continue;
                Er = or.def(vr.uniforms, "[", be.id(Hr), "]");
              }
              switch (Vr === 35678 ? or("if(", Er, "&&", Er, '._reglType==="framebuffer"){', Er, "=", Er, ".color[0];", "}") : Vr === 35680 && or("if(", Er, "&&", Er, '._reglType==="framebufferCube"){', Er, "=", Er, ".color[0];", "}"), Hr = 1, Vr) {
                case 35678:
                case 35680:
                  Vr = or.def(Er, "._texture"), or(xr, ".uniform1i(", en, ",", Vr, ".bind());"), or.exit(Vr, ".unbind();");
                  continue;
                case 5124:
                case 35670:
                  Ar = "1i";
                  break;
                case 35667:
                case 35671:
                  Ar = "2i", Hr = 2;
                  break;
                case 35668:
                case 35672:
                  Ar = "3i", Hr = 3;
                  break;
                case 35669:
                case 35673:
                  Ar = "4i", Hr = 4;
                  break;
                case 5126:
                  Ar = "1f";
                  break;
                case 35664:
                  Ar = "2f", Hr = 2;
                  break;
                case 35665:
                  Ar = "3f", Hr = 3;
                  break;
                case 35666:
                  Ar = "4f", Hr = 4;
                  break;
                case 35674:
                  Ar = "Matrix2fv";
                  break;
                case 35675:
                  Ar = "Matrix3fv";
                  break;
                case 35676:
                  Ar = "Matrix4fv";
              }
              if (Ar.charAt(0) === "M") {
                or(xr, ".uniform", Ar, "(", en, ","), en = Math.pow(Vr - 35674 + 2, 2);
                var gn = Ct.global.def("new Float32Array(", en, ")");
                Array.isArray(Er) ? or("false,(", r(en, function(wn) {
                  return gn + "[" + wn + "]=" + Er[wn];
                }), ",", gn, ")") : or("false,(Array.isArray(", Er, ")||", Er, " instanceof Float32Array)?", Er, ":(", r(en, function(wn) {
                  return gn + "[" + wn + "]=" + Er + "[" + wn + "]";
                }), ",", gn, ")"), or(");");
              } else {
                if (1 < Hr) {
                  Vr = [];
                  var bn = [];
                  for (Kr = 0; Kr < Hr; ++Kr)
                    Array.isArray(Er) ? bn.push(Er[Kr]) : bn.push(or.def(Er + "[" + Kr + "]")), Or && Vr.push(or.def());
                  Or && or("if(!", Ct.batchId, "||", Vr.map(function(wn, Ln) {
                    return wn + "!==" + bn[Ln];
                  }).join("||"), "){", Vr.map(function(wn, Ln) {
                    return wn + "=" + bn[Ln] + ";";
                  }).join("")), or(xr, ".uniform", Ar, "(", en, ",", bn.join(","), ");");
                } else
                  Or && (Vr = or.def(), or("if(!", Ct.batchId, "||", Vr, "!==", Er, "){", Vr, "=", Er, ";")), or(xr, ".uniform", Ar, "(", en, ",", Er, ");");
                Or && or("}");
              }
            }
          }
          function Fr(Ct, or, hr, Rr) {
            function Dr(In) {
              var Yn = Vr[In];
              return Yn ? Yn.contextDep && Rr.contextDynamic || Yn.propDep ? Yn.append(Ct, hr) : Yn.append(Ct, or) : or.def(Hr, ".", In);
            }
            function Or() {
              function In() {
                hr(xr, ".drawElementsInstancedANGLE(", [en, bn, wn, gn + "<<((" + wn + "-5121)>>1)", vr], ");");
              }
              function Yn() {
                hr(xr, ".drawArraysInstancedANGLE(", [en, gn, bn, vr], ");");
              }
              Kr && Kr !== "null" ? Ln ? In() : (hr("if(", Kr, "){"), In(), hr("}else{"), Yn(), hr("}")) : Yn();
            }
            function Ar() {
              function In() {
                hr(Er + ".drawElements(" + [en, bn, wn, gn + "<<((" + wn + "-5121)>>1)"] + ");");
              }
              function Yn() {
                hr(Er + ".drawArrays(" + [en, gn, bn] + ");");
              }
              Kr && Kr !== "null" ? Ln ? In() : (hr("if(", Kr, "){"), In(), hr("}else{"), Yn(), hr("}")) : Yn();
            }
            var vr, xr, wr = Ct.shared, Er = wr.gl, Hr = wr.draw, Vr = Rr.draw, Kr = function() {
              var In = Vr.elements, Yn = or;
              return In ? ((In.contextDep && Rr.contextDynamic || In.propDep) && (Yn = hr), In = In.append(Ct, Yn), Vr.elementsActive && Yn("if(" + In + ")" + Er + ".bindBuffer(34963," + In + ".buffer.buffer);")) : (In = Yn.def(), Yn(In, "=", Hr, ".", "elements", ";", "if(", In, "){", Er, ".bindBuffer(", 34963, ",", In, ".buffer.buffer);}", "else if(", wr.vao, ".currentVAO){", In, "=", Ct.shared.elements + ".getElements(" + wr.vao, ".currentVAO.elements);", mn ? "" : "if(" + In + ")" + Er + ".bindBuffer(34963," + In + ".buffer.buffer);", "}")), In;
            }(), en = Dr("primitive"), gn = Dr("offset"), bn = function() {
              var In = Vr.count, Yn = or;
              return In ? ((In.contextDep && Rr.contextDynamic || In.propDep) && (Yn = hr), In = In.append(Ct, Yn)) : In = Yn.def(Hr, ".", "count"), In;
            }();
            if (typeof bn == "number") {
              if (bn === 0)
                return;
            } else
              hr("if(", bn, "){"), hr.exit("}");
            Br && (vr = Dr("instances"), xr = Ct.instancing);
            var wn = Kr + ".type", Ln = Vr.elements && re(Vr.elements) && !Vr.vaoActive;
            Br && (typeof vr != "number" || 0 <= vr) ? typeof vr == "string" ? (hr("if(", vr, ">0){"), Or(), hr("}else if(", vr, "<0){"), Ar(), hr("}")) : Or() : Ar();
          }
          function Gr(Ct, or, hr, Rr, Dr) {
            return Dr = (or = Mt()).proc("body", Dr), Br && (or.instancing = Dr.def(or.shared.extensions, ".angle_instanced_arrays")), Ct(or, Dr, hr, Rr), or.compile().body;
          }
          function un(Ct, or, hr, Rr) {
            cr(Ct, or), hr.useVAO ? hr.drawVAO ? or(Ct.shared.vao, ".setVAO(", hr.drawVAO.append(Ct, or), ");") : or(Ct.shared.vao, ".setVAO(", Ct.shared.vao, ".targetVAO);") : (or(Ct.shared.vao, ".setVAO(null);"), Mr(Ct, or, hr, Rr.attributes, function() {
              return !0;
            })), Ir(Ct, or, hr, Rr.uniforms, function() {
              return !0;
            }, !1), Fr(Ct, or, or, hr);
          }
          function $r(Ct, or, hr, Rr) {
            function Dr() {
              return !0;
            }
            Ct.batchId = "a1", cr(Ct, or), Mr(Ct, or, hr, Rr.attributes, Dr), Ir(Ct, or, hr, Rr.uniforms, Dr, !1), Fr(Ct, or, or, hr);
          }
          function Dn(Ct, or, hr, Rr) {
            function Dr(Hr) {
              return Hr.contextDep && Ar || Hr.propDep;
            }
            function Or(Hr) {
              return !Dr(Hr);
            }
            cr(Ct, or);
            var Ar = hr.contextDep, vr = or.def(), xr = or.def();
            Ct.shared.props = xr, Ct.batchId = vr;
            var wr = Ct.scope(), Er = Ct.scope();
            or(wr.entry, "for(", vr, "=0;", vr, "<", "a1", ";++", vr, "){", xr, "=", "a0", "[", vr, "];", Er, "}", wr.exit), hr.needsContext && ur(Ct, Er, hr.context), hr.needsFramebuffer && Kt(Ct, Er, hr.framebuffer), er(Ct, Er, hr.state, Dr), hr.profile && Dr(hr.profile) && gr(Ct, Er, hr, !1, !0), Rr ? (hr.useVAO ? hr.drawVAO ? Dr(hr.drawVAO) ? Er(Ct.shared.vao, ".setVAO(", hr.drawVAO.append(Ct, Er), ");") : wr(Ct.shared.vao, ".setVAO(", hr.drawVAO.append(Ct, wr), ");") : wr(Ct.shared.vao, ".setVAO(", Ct.shared.vao, ".targetVAO);") : (wr(Ct.shared.vao, ".setVAO(null);"), Mr(Ct, wr, hr, Rr.attributes, Or), Mr(Ct, Er, hr, Rr.attributes, Dr)), Ir(Ct, wr, hr, Rr.uniforms, Or, !1), Ir(Ct, Er, hr, Rr.uniforms, Dr, !0), Fr(Ct, wr, Er, hr)) : (or = Ct.global.def("{}"), Rr = hr.shader.progVar.append(Ct, Er), xr = Er.def(Rr, ".id"), wr = Er.def(or, "[", xr, "]"), Er(Ct.shared.gl, ".useProgram(", Rr, ".program);", "if(!", wr, "){", wr, "=", or, "[", xr, "]=", Ct.link(function(Hr) {
              return Gr($r, Ct, hr, Hr, 2);
            }), "(", Rr, ");}", wr, ".call(this,a0[", vr, "],", vr, ");"));
          }
          function rn(Ct, or) {
            function hr(vr) {
              var xr = or.shader[vr];
              xr && (xr = xr.append(Ct, Rr), isNaN(xr) ? Rr.set(Dr.shader, "." + vr, xr) : Rr.set(Dr.shader, "." + vr, Ct.link(xr, { stable: !0 })));
            }
            var Rr = Ct.proc("scope", 3);
            Ct.batchId = "a2";
            var Dr = Ct.shared, Or = Dr.current;
            if (ur(Ct, Rr, or.context), or.framebuffer && or.framebuffer.append(Ct, Rr), W(Object.keys(or.state)).forEach(function(vr) {
              var xr = or.state[vr], wr = xr.append(Ct, Rr);
              c(wr) ? wr.forEach(function(Er, Hr) {
                isNaN(Er) ? Rr.set(Ct.next[vr], "[" + Hr + "]", Er) : Rr.set(Ct.next[vr], "[" + Hr + "]", Ct.link(Er, { stable: !0 }));
              }) : re(xr) ? Rr.set(Dr.next, "." + vr, Ct.link(wr, { stable: !0 })) : Rr.set(Dr.next, "." + vr, wr);
            }), gr(Ct, Rr, or, !0, !0), ["elements", "offset", "count", "instances", "primitive"].forEach(function(vr) {
              var xr = or.draw[vr];
              xr && (xr = xr.append(Ct, Rr), isNaN(xr) ? Rr.set(Dr.draw, "." + vr, xr) : Rr.set(Dr.draw, "." + vr, Ct.link(xr), { stable: !0 }));
            }), Object.keys(or.uniforms).forEach(function(vr) {
              var xr = or.uniforms[vr].append(Ct, Rr);
              Array.isArray(xr) && (xr = "[" + xr.map(function(wr) {
                return isNaN(wr) ? wr : Ct.link(wr, { stable: !0 });
              }) + "]"), Rr.set(Dr.uniforms, "[" + Ct.link(be.id(vr), { stable: !0 }) + "]", xr);
            }), Object.keys(or.attributes).forEach(function(vr) {
              var xr = or.attributes[vr].append(Ct, Rr), wr = Ct.scopeAttrib(vr);
              Object.keys(new xn()).forEach(function(Er) {
                Rr.set(wr, "." + Er, xr[Er]);
              });
            }), or.scopeVAO) {
              var Ar = or.scopeVAO.append(Ct, Rr);
              isNaN(Ar) ? Rr.set(Dr.vao, ".targetVAO", Ar) : Rr.set(Dr.vao, ".targetVAO", Ct.link(Ar, { stable: !0 }));
            }
            hr("vert"), hr("frag"), 0 < Object.keys(or.state).length && (Rr(Or, ".dirty=true;"), Rr.exit(Or, ".dirty=true;")), Rr("a1(", Ct.shared.context, ",a0,", Ct.batchId, ");");
          }
          function vn(Ct, or, hr) {
            var Rr = or.static[hr];
            if (Rr && function(Er) {
              if (typeof Er == "object" && !c(Er)) {
                for (var Hr = Object.keys(Er), Vr = 0; Vr < Hr.length; ++Vr)
                  if (X.isDynamic(Er[Hr[Vr]]))
                    return !0;
                return !1;
              }
            }(Rr)) {
              var Dr = Ct.global, Or = Object.keys(Rr), Ar = !1, vr = !1, xr = !1, wr = Ct.global.def("{}");
              Or.forEach(function(Er) {
                var Hr = Rr[Er];
                if (X.isDynamic(Hr))
                  typeof Hr == "function" && (Hr = Rr[Er] = X.unbox(Hr)), Er = B(Hr, null), Ar = Ar || Er.thisDep, xr = xr || Er.propDep, vr = vr || Er.contextDep;
                else {
                  switch (Dr(wr, ".", Er, "="), typeof Hr) {
                    case "number":
                      Dr(Hr);
                      break;
                    case "string":
                      Dr('"', Hr, '"');
                      break;
                    case "object":
                      Array.isArray(Hr) && Dr("[", Hr.join(), "]");
                      break;
                    default:
                      Dr(Ct.link(Hr));
                  }
                  Dr(";");
                }
              }), or.dynamic[hr] = new X.DynamicVariable(4, { thisDep: Ar, contextDep: vr, propDep: xr, ref: wr, append: function(Er, Hr) {
                Or.forEach(function(Vr) {
                  var Kr = Rr[Vr];
                  X.isDynamic(Kr) && (Kr = Er.invoke(Hr, Kr), Hr(wr, ".", Vr, "=", Kr, ";"));
                });
              } }), delete or.static[hr];
            }
          }
          var xn = Pt.Record, $n = { add: 32774, subtract: 32778, "reverse subtract": 32779 };
          Re.ext_blend_minmax && ($n.min = 32775, $n.max = 32776);
          var Br = Re.angle_instanced_arrays, tn = Re.webgl_draw_buffers, mn = Re.oes_vertex_array_object, Qr = { dirty: !0, profile: Se.profile }, cn = {}, Hn = [], _n = {}, En = {};
          nt("dither", 3024), nt("blend.enable", 3042), ft("blend.color", "blendColor", [0, 0, 0, 0]), ft("blend.equation", "blendEquationSeparate", [32774, 32774]), ft("blend.func", "blendFuncSeparate", [1, 0, 1, 0]), nt("depth.enable", 2929, !0), ft("depth.func", "depthFunc", 513), ft("depth.range", "depthRange", [0, 1]), ft("depth.mask", "depthMask", !0), ft("colorMask", "colorMask", [!0, !0, !0, !0]), nt("cull.enable", 2884), ft("cull.face", "cullFace", 1029), ft("frontFace", "frontFace", 2305), ft("lineWidth", "lineWidth", 1), nt("polygonOffset.enable", 32823), ft("polygonOffset.offset", "polygonOffset", [0, 0]), nt("sample.alpha", 32926), nt("sample.enable", 32928), ft("sample.coverage", "sampleCoverage", [1, !1]), nt("stencil.enable", 2960), ft("stencil.mask", "stencilMask", -1), ft("stencil.func", "stencilFunc", [519, 0, -1]), ft("stencil.opFront", "stencilOpSeparate", [1028, 7680, 7680, 7680]), ft("stencil.opBack", "stencilOpSeparate", [1029, 7680, 7680, 7680]), nt("scissor.enable", 3089), ft("scissor.box", "scissor", [0, 0, he.drawingBufferWidth, he.drawingBufferHeight]), ft("viewport", "viewport", [0, 0, he.drawingBufferWidth, he.drawingBufferHeight]);
          var aa = { gl: he, context: Bt, strings: be, next: cn, current: Qr, draw: ut, elements: qe, buffer: Xe, shader: rt, attributes: Pt.state, vao: Pt, uniforms: Tt, framebuffer: it, extensions: Re, timer: wt, isBufferArgs: J }, tr = { primTypes: Te, compareFuncs: nr, blendFuncs: Gt, blendEquations: $n, stencilOps: It, glTypes: pe, orientationType: Be };
          tn && (tr.backBuffer = [1029], tr.drawBuffer = r(Ue.maxDrawbuffers, function(Ct) {
            return Ct === 0 ? [0] : r(Ct, function(or) {
              return 36064 + or;
            });
          }));
          var mr = 0;
          return { next: cn, current: Qr, procs: function() {
            var Ct = Mt(), or = Ct.proc("poll"), hr = Ct.proc("refresh"), Rr = Ct.block();
            or(Rr), hr(Rr);
            var Dr, Or = (xr = Ct.shared).gl, Ar = xr.next, vr = xr.current;
            Rr(vr, ".dirty=false;"), Kt(Ct, or), Kt(Ct, hr, null, !0), Br && (Dr = Ct.link(Br)), Re.oes_vertex_array_object && hr(Ct.link(Re.oes_vertex_array_object), ".bindVertexArrayOES(null);");
            var xr = hr.def(xr.attributes), wr = hr.def(0), Er = Ct.cond(wr, ".buffer");
            Er.then(Or, ".enableVertexAttribArray(i);", Or, ".bindBuffer(", 34962, ",", wr, ".buffer.buffer);", Or, ".vertexAttribPointer(i,", wr, ".size,", wr, ".type,", wr, ".normalized,", wr, ".stride,", wr, ".offset);").else(Or, ".disableVertexAttribArray(i);", Or, ".vertexAttrib4f(i,", wr, ".x,", wr, ".y,", wr, ".z,", wr, ".w);", wr, ".buffer=null;");
            var Hr = Ct.link(Ue.maxAttributes, { stable: !0 });
            return hr("for(var i=0;i<", Hr, ";++i){", wr, "=", xr, "[i];", Er, "}"), Br && hr("for(var i=0;i<", Hr, ";++i){", Dr, ".vertexAttribDivisorANGLE(i,", xr, "[i].divisor);", "}"), hr(Ct.shared.vao, ".currentVAO=null;", Ct.shared.vao, ".setVAO(", Ct.shared.vao, ".targetVAO);"), Object.keys(_n).forEach(function(Vr) {
              var Kr = _n[Vr], en = Rr.def(Ar, ".", Vr), gn = Ct.block();
              gn("if(", en, "){", Or, ".enable(", Kr, ")}else{", Or, ".disable(", Kr, ")}", vr, ".", Vr, "=", en, ";"), hr(gn), or("if(", en, "!==", vr, ".", Vr, "){", gn, "}");
            }), Object.keys(En).forEach(function(Vr) {
              var Kr, en, gn = En[Vr], bn = Qr[Vr], wn = Ct.block();
              wn(Or, ".", gn, "("), c(bn) ? (gn = bn.length, Kr = Ct.global.def(Ar, ".", Vr), en = Ct.global.def(vr, ".", Vr), wn(r(gn, function(Ln) {
                return Kr + "[" + Ln + "]";
              }), ");", r(gn, function(Ln) {
                return en + "[" + Ln + "]=" + Kr + "[" + Ln + "];";
              }).join("")), or("if(", r(gn, function(Ln) {
                return Kr + "[" + Ln + "]!==" + en + "[" + Ln + "]";
              }).join("||"), "){", wn, "}")) : (Kr = Rr.def(Ar, ".", Vr), en = Rr.def(vr, ".", Vr), wn(Kr, ");", vr, ".", Vr, "=", Kr, ";"), or("if(", Kr, "!==", en, "){", wn, "}")), hr(wn);
            }), Ct.compile();
          }(), compile: function(Ct, or, hr, Rr, Dr) {
            var Or = Mt();
            Or.stats = Or.link(Dr), Object.keys(or.static).forEach(function(vr) {
              vn(Or, or, vr);
            }), Xt.forEach(function(vr) {
              vn(Or, Ct, vr);
            });
            var Ar = Tr(Ct, or, hr, Rr);
            return Ar.shader.program && (Ar.shader.program.attributes.sort(function(vr, xr) {
              return vr.name < xr.name ? -1 : 1;
            }), Ar.shader.program.uniforms.sort(function(vr, xr) {
              return vr.name < xr.name ? -1 : 1;
            })), function(vr, xr) {
              var wr = vr.proc("draw", 1);
              cr(vr, wr), ur(vr, wr, xr.context), Kt(vr, wr, xr.framebuffer), $t(vr, wr, xr), er(vr, wr, xr.state), gr(vr, wr, xr, !1, !0);
              var Er = xr.shader.progVar.append(vr, wr);
              if (wr(vr.shared.gl, ".useProgram(", Er, ".program);"), xr.shader.program)
                un(vr, wr, xr, xr.shader.program);
              else {
                wr(vr.shared.vao, ".setVAO(null);");
                var Hr = vr.global.def("{}"), Vr = wr.def(Er, ".id"), Kr = wr.def(Hr, "[", Vr, "]");
                wr(vr.cond(Kr).then(Kr, ".call(this,a0);").else(Kr, "=", Hr, "[", Vr, "]=", vr.link(function(en) {
                  return Gr(un, vr, xr, en, 1);
                }), "(", Er, ");", Kr, ".call(this,a0);"));
              }
              0 < Object.keys(xr.state).length && wr(vr.shared.current, ".dirty=true;"), vr.shared.vao && wr(vr.shared.vao, ".setVAO(null);");
            }(Or, Ar), rn(Or, Ar), function(vr, xr) {
              function wr(bn) {
                return bn.contextDep && Hr || bn.propDep;
              }
              var Er = vr.proc("batch", 2);
              vr.batchId = "0", cr(vr, Er);
              var Hr = !1, Vr = !0;
              Object.keys(xr.context).forEach(function(bn) {
                Hr = Hr || xr.context[bn].propDep;
              }), Hr || (ur(vr, Er, xr.context), Vr = !1);
              var Kr = !1;
              if ((en = xr.framebuffer) ? (en.propDep ? Hr = Kr = !0 : en.contextDep && Hr && (Kr = !0), Kr || Kt(vr, Er, en)) : Kt(vr, Er, null), xr.state.viewport && xr.state.viewport.propDep && (Hr = !0), $t(vr, Er, xr), er(vr, Er, xr.state, function(bn) {
                return !wr(bn);
              }), xr.profile && wr(xr.profile) || gr(vr, Er, xr, !1, "a1"), xr.contextDep = Hr, xr.needsContext = Vr, xr.needsFramebuffer = Kr, (Vr = xr.shader.progVar).contextDep && Hr || Vr.propDep)
                Dn(vr, Er, xr, null);
              else if (Vr = Vr.append(vr, Er), Er(vr.shared.gl, ".useProgram(", Vr, ".program);"), xr.shader.program)
                Dn(vr, Er, xr, xr.shader.program);
              else {
                Er(vr.shared.vao, ".setVAO(null);");
                var en = vr.global.def("{}"), gn = (Kr = Er.def(Vr, ".id"), Er.def(en, "[", Kr, "]"));
                Er(vr.cond(gn).then(gn, ".call(this,a0,a1);").else(gn, "=", en, "[", Kr, "]=", vr.link(function(bn) {
                  return Gr(Dn, vr, xr, bn, 2);
                }), "(", Vr, ");", gn, ".call(this,a0,a1);"));
              }
              0 < Object.keys(xr.state).length && Er(vr.shared.current, ".dirty=true;"), vr.shared.vao && Er(vr.shared.vao, ".setVAO(null);");
            }(Or, Ar), N(Or.compile(), { destroy: function() {
              Ar.shader.program.destroy();
            } });
          } };
        }
        function ee(he, be) {
          for (var Re = 0; Re < he.length; ++Re)
            if (he[Re] === be)
              return Re;
          return -1;
        }
        var N = function(he, be) {
          for (var Re = Object.keys(be), Ue = 0; Ue < Re.length; ++Ue)
            he[Re[Ue]] = be[Re[Ue]];
          return he;
        }, K = 0, X = { DynamicVariable: m, define: function(he, be) {
          return new m(he, g(be + ""));
        }, isDynamic: function(he) {
          return typeof he == "function" && !he._reglType || he instanceof m;
        }, unbox: function he(be, Re) {
          return typeof be == "function" ? new m(0, be) : typeof be == "number" || typeof be == "boolean" ? new m(5, be) : Array.isArray(be) ? new m(6, be.map(function(Ue, Xe) {
            return he(Ue);
          })) : be instanceof m ? be : void 0;
        }, accessor: g }, te = { next: typeof requestAnimationFrame == "function" ? function(he) {
          return requestAnimationFrame(he);
        } : function(he) {
          return setTimeout(he, 16);
        }, cancel: typeof cancelAnimationFrame == "function" ? function(he) {
          return cancelAnimationFrame(he);
        } : clearTimeout }, ie = typeof performance < "u" && performance.now ? function() {
          return performance.now();
        } : function() {
          return +new Date();
        }, le = s();
        le.zero = s();
        var oe = function(he, be) {
          var Re = 1;
          be.ext_texture_filter_anisotropic && (Re = he.getParameter(34047));
          var Ue = 1, Xe = 1;
          be.webgl_draw_buffers && (Ue = he.getParameter(34852), Xe = he.getParameter(36063));
          var qe = !!be.oes_texture_float;
          if (qe) {
            qe = he.createTexture(), he.bindTexture(3553, qe), he.texImage2D(3553, 0, 6408, 1, 1, 0, 6408, 5126, null);
            var st = he.createFramebuffer();
            if (he.bindFramebuffer(36160, st), he.framebufferTexture2D(36160, 36064, 3553, qe, 0), he.bindTexture(3553, null), he.checkFramebufferStatus(36160) !== 36053)
              qe = !1;
            else {
              he.viewport(0, 0, 1, 1), he.clearColor(1, 0, 0, 1), he.clear(16384);
              var it = le.allocType(5126, 4);
              he.readPixels(0, 0, 1, 1, 6408, 5126, it), he.getError() ? qe = !1 : (he.deleteFramebuffer(st), he.deleteTexture(qe), qe = it[0] === 1), le.freeType(it);
            }
          }
          return it = !0, typeof navigator < "u" && (/MSIE/.test(navigator.userAgent) || /Trident\//.test(navigator.appVersion) || /Edge/.test(navigator.userAgent)) || (it = he.createTexture(), st = le.allocType(5121, 36), he.activeTexture(33984), he.bindTexture(34067, it), he.texImage2D(34069, 0, 6408, 3, 3, 0, 6408, 5121, st), le.freeType(st), he.bindTexture(34067, null), he.deleteTexture(it), it = !he.getError()), { colorBits: [he.getParameter(3410), he.getParameter(3411), he.getParameter(3412), he.getParameter(3413)], depthBits: he.getParameter(3414), stencilBits: he.getParameter(3415), subpixelBits: he.getParameter(3408), extensions: Object.keys(be).filter(function(Tt) {
            return !!be[Tt];
          }), maxAnisotropic: Re, maxDrawbuffers: Ue, maxColorAttachments: Xe, pointSizeDims: he.getParameter(33901), lineWidthDims: he.getParameter(33902), maxViewportDims: he.getParameter(3386), maxCombinedTextureUnits: he.getParameter(35661), maxCubeMapSize: he.getParameter(34076), maxRenderbufferSize: he.getParameter(34024), maxTextureUnits: he.getParameter(34930), maxTextureSize: he.getParameter(3379), maxAttributes: he.getParameter(34921), maxVertexUniforms: he.getParameter(36347), maxVertexTextureUnits: he.getParameter(35660), maxVaryingVectors: he.getParameter(36348), maxFragmentUniforms: he.getParameter(36349), glsl: he.getParameter(35724), renderer: he.getParameter(7937), vendor: he.getParameter(7936), version: he.getParameter(7938), readFloat: qe, npotTextureCube: it };
        }, ve = function(he) {
          return he instanceof Uint8Array || he instanceof Uint16Array || he instanceof Uint32Array || he instanceof Int8Array || he instanceof Int16Array || he instanceof Int32Array || he instanceof Float32Array || he instanceof Float64Array || he instanceof Uint8ClampedArray;
        }, ue = function(he) {
          return Object.keys(he).map(function(be) {
            return he[be];
          });
        }, ye = { shape: function(he) {
          for (var be = []; he.length; he = he[0])
            be.push(he.length);
          return be;
        }, flatten: function(he, be, Re, Ue) {
          var Xe = 1;
          if (be.length)
            for (var qe = 0; qe < be.length; ++qe)
              Xe *= be[qe];
          else
            Xe = 0;
          switch (Re = Ue || le.allocType(Re, Xe), be.length) {
            case 0:
              break;
            case 1:
              for (Ue = be[0], be = 0; be < Ue; ++be)
                Re[be] = he[be];
              break;
            case 2:
              for (Ue = be[0], be = be[1], qe = Xe = 0; qe < Ue; ++qe)
                for (var st = he[qe], it = 0; it < be; ++it)
                  Re[Xe++] = st[it];
              break;
            case 3:
              d(he, be[0], be[1], be[2], Re, 0);
              break;
            default:
              (function Tt(Pt, rt, ut, Bt, wt) {
                for (var Lt = 1, Se = ut + 1; Se < rt.length; ++Se)
                  Lt *= rt[Se];
                var We = rt[ut];
                if (rt.length - ut == 4) {
                  var nt = rt[ut + 1], ft = rt[ut + 2];
                  for (rt = rt[ut + 3], Se = 0; Se < We; ++Se)
                    d(Pt[Se], nt, ft, rt, Bt, wt), wt += Lt;
                } else
                  for (Se = 0; Se < We; ++Se)
                    Tt(Pt[Se], rt, ut + 1, Bt, wt), wt += Lt;
              })(he, be, 0, Re, 0);
          }
          return Re;
        } }, Ae = { "[object Int8Array]": 5120, "[object Int16Array]": 5122, "[object Int32Array]": 5124, "[object Uint8Array]": 5121, "[object Uint8ClampedArray]": 5121, "[object Uint16Array]": 5123, "[object Uint32Array]": 5125, "[object Float32Array]": 5126, "[object Float64Array]": 5121, "[object ArrayBuffer]": 5121 }, pe = { int8: 5120, int16: 5122, int32: 5124, uint8: 5121, uint16: 5123, uint32: 5125, float: 5126, float32: 5126 }, ge = { dynamic: 35048, stream: 35040, static: 35044 }, we = ye.flatten, se = ye.shape, de = [];
        de[5120] = 1, de[5122] = 2, de[5124] = 4, de[5121] = 1, de[5123] = 2, de[5125] = 4, de[5126] = 4;
        var Te = { points: 0, point: 0, lines: 1, line: 1, triangles: 4, triangle: 4, "line loop": 2, "line strip": 3, "triangle strip": 5, "triangle fan": 6 }, Ee = new Float32Array(1), Me = new Uint32Array(Ee.buffer), ze = [9984, 9986, 9985, 9987], Ie = [0, 6409, 6410, 6407, 6408], Oe = {};
        Oe[6409] = Oe[6406] = Oe[6402] = 1, Oe[34041] = Oe[6410] = 2, Oe[6407] = Oe[35904] = 3, Oe[6408] = Oe[35906] = 4;
        var Ze = a("HTMLCanvasElement"), Fe = a("OffscreenCanvas"), Pe = a("CanvasRenderingContext2D"), De = a("ImageBitmap"), Ge = a("HTMLImageElement"), Qe = a("HTMLVideoElement"), ot = Object.keys(Ae).concat([Ze, Fe, Pe, De, Ge, Qe]), vt = [];
        vt[5121] = 1, vt[5126] = 4, vt[36193] = 2, vt[5123] = 2, vt[5125] = 4;
        var bt = [];
        bt[32854] = 2, bt[32855] = 2, bt[36194] = 2, bt[34041] = 4, bt[33776] = 0.5, bt[33777] = 0.5, bt[33778] = 1, bt[33779] = 1, bt[35986] = 0.5, bt[35987] = 1, bt[34798] = 1, bt[35840] = 0.5, bt[35841] = 0.25, bt[35842] = 0.5, bt[35843] = 0.25, bt[36196] = 0.5;
        var yt = [];
        yt[32854] = 2, yt[32855] = 2, yt[36194] = 2, yt[33189] = 2, yt[36168] = 1, yt[34041] = 4, yt[35907] = 4, yt[34836] = 16, yt[34842] = 8, yt[34843] = 6;
        var tt = function(he, be, Re, Ue, Xe) {
          function qe(ut) {
            this.id = Pt++, this.refCount = 1, this.renderbuffer = ut, this.format = 32854, this.height = this.width = 0, Xe.profile && (this.stats = { size: 0 });
          }
          function st(ut) {
            var Bt = ut.renderbuffer;
            he.bindRenderbuffer(36161, null), he.deleteRenderbuffer(Bt), ut.renderbuffer = null, ut.refCount = 0, delete rt[ut.id], Ue.renderbufferCount--;
          }
          var it = { rgba4: 32854, rgb565: 36194, "rgb5 a1": 32855, depth: 33189, stencil: 36168, "depth stencil": 34041 };
          be.ext_srgb && (it.srgba = 35907), be.ext_color_buffer_half_float && (it.rgba16f = 34842, it.rgb16f = 34843), be.webgl_color_buffer_float && (it.rgba32f = 34836);
          var Tt = [];
          Object.keys(it).forEach(function(ut) {
            Tt[it[ut]] = ut;
          });
          var Pt = 0, rt = {};
          return qe.prototype.decRef = function() {
            0 >= --this.refCount && st(this);
          }, Xe.profile && (Ue.getTotalRenderbufferSize = function() {
            var ut = 0;
            return Object.keys(rt).forEach(function(Bt) {
              ut += rt[Bt].stats.size;
            }), ut;
          }), { create: function(ut, Bt) {
            function wt(Se, We) {
              var nt = 0, ft = 0, Mt = 32854;
              if (typeof Se == "object" && Se ? ("shape" in Se ? (nt = 0 | (ft = Se.shape)[0], ft = 0 | ft[1]) : ("radius" in Se && (nt = ft = 0 | Se.radius), "width" in Se && (nt = 0 | Se.width), "height" in Se && (ft = 0 | Se.height)), "format" in Se && (Mt = it[Se.format])) : typeof Se == "number" ? (nt = 0 | Se, ft = typeof We == "number" ? 0 | We : nt) : Se || (nt = ft = 1), nt !== Lt.width || ft !== Lt.height || Mt !== Lt.format)
                return wt.width = Lt.width = nt, wt.height = Lt.height = ft, Lt.format = Mt, he.bindRenderbuffer(36161, Lt.renderbuffer), he.renderbufferStorage(36161, Mt, nt, ft), Xe.profile && (Lt.stats.size = yt[Lt.format] * Lt.width * Lt.height), wt.format = Tt[Lt.format], wt;
            }
            var Lt = new qe(he.createRenderbuffer());
            return rt[Lt.id] = Lt, Ue.renderbufferCount++, wt(ut, Bt), wt.resize = function(Se, We) {
              var nt = 0 | Se, ft = 0 | We || nt;
              return nt === Lt.width && ft === Lt.height || (wt.width = Lt.width = nt, wt.height = Lt.height = ft, he.bindRenderbuffer(36161, Lt.renderbuffer), he.renderbufferStorage(36161, Lt.format, nt, ft), Xe.profile && (Lt.stats.size = yt[Lt.format] * Lt.width * Lt.height)), wt;
            }, wt._reglType = "renderbuffer", wt._renderbuffer = Lt, Xe.profile && (wt.stats = Lt.stats), wt.destroy = function() {
              Lt.decRef();
            }, wt;
          }, clear: function() {
            ue(rt).forEach(st);
          }, restore: function() {
            ue(rt).forEach(function(ut) {
              ut.renderbuffer = he.createRenderbuffer(), he.bindRenderbuffer(36161, ut.renderbuffer), he.renderbufferStorage(36161, ut.format, ut.width, ut.height);
            }), he.bindRenderbuffer(36161, null);
          } };
        }, Ke = [];
        Ke[6408] = 4, Ke[6407] = 3;
        var mt = [];
        mt[5121] = 1, mt[5126] = 4, mt[36193] = 2;
        var Ft = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998], Vt = ["x", "y", "z", "w"], Xt = "blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "), Gt = { 0: 0, 1: 1, zero: 0, one: 1, "src color": 768, "one minus src color": 769, "src alpha": 770, "one minus src alpha": 771, "dst color": 774, "one minus dst color": 775, "dst alpha": 772, "one minus dst alpha": 773, "constant color": 32769, "one minus constant color": 32770, "constant alpha": 32771, "one minus constant alpha": 32772, "src alpha saturate": 776 }, nr = { never: 512, less: 513, "<": 513, equal: 514, "=": 514, "==": 514, "===": 514, lequal: 515, "<=": 515, greater: 516, ">": 516, notequal: 517, "!=": 517, "!==": 517, gequal: 518, ">=": 518, always: 519 }, It = { 0: 0, zero: 0, keep: 7680, replace: 7681, increment: 7682, decrement: 7683, "increment wrap": 34055, "decrement wrap": 34056, invert: 5386 }, Be = { cw: 2304, ccw: 2305 }, He = new Z(!1, !1, !1, function() {
        });
        return function(he) {
          function be() {
            if ($r.length === 0)
              Nt && Nt.update(), xn = null;
            else {
              xn = te.next(be), rt();
              for (var Br = $r.length - 1; 0 <= Br; --Br) {
                var tn = $r[Br];
                tn && tn(Tr, null, 0);
              }
              wt.flush(), Nt && Nt.update();
            }
          }
          function Re() {
            !xn && 0 < $r.length && (xn = te.next(be));
          }
          function Ue() {
            xn && (te.cancel(be), xn = null);
          }
          function Xe(Br) {
            Br.preventDefault(), Ue(), Dn.forEach(function(tn) {
              tn();
            });
          }
          function qe(Br) {
            wt.getError(), Se.restore(), cr.restore(), Kt.restore(), gr.restore(), Mr.restore(), Ir.restore(), er.restore(), Nt && Nt.restore(), Fr.procs.refresh(), Re(), rn.forEach(function(tn) {
              tn();
            });
          }
          function st(Br) {
            function tn(Ct, or) {
              var hr = {}, Rr = {};
              return Object.keys(Ct).forEach(function(Dr) {
                var Or = Ct[Dr];
                if (X.isDynamic(Or))
                  Rr[Dr] = X.unbox(Or, Dr);
                else {
                  if (or && Array.isArray(Or)) {
                    for (var Ar = 0; Ar < Or.length; ++Ar)
                      if (X.isDynamic(Or[Ar]))
                        return void (Rr[Dr] = X.unbox(Or, Dr));
                  }
                  hr[Dr] = Or;
                }
              }), { dynamic: Rr, static: hr };
            }
            var mn = tn(Br.context || {}, !0), Qr = tn(Br.uniforms || {}, !0), cn = tn(Br.attributes || {}, !1);
            Br = tn(function(Ct) {
              function or(Rr) {
                if (Rr in hr) {
                  var Dr = hr[Rr];
                  delete hr[Rr], Object.keys(Dr).forEach(function(Or) {
                    hr[Rr + "." + Or] = Dr[Or];
                  });
                }
              }
              var hr = N({}, Ct);
              return delete hr.uniforms, delete hr.attributes, delete hr.context, delete hr.vao, "stencil" in hr && hr.stencil.op && (hr.stencil.opBack = hr.stencil.opFront = hr.stencil.op, delete hr.stencil.op), or("blend"), or("depth"), or("cull"), or("stencil"), or("polygonOffset"), or("scissor"), or("sample"), "vao" in Ct && (hr.vao = Ct.vao), hr;
            }(Br), !1);
            var Hn = { gpuTime: 0, cpuTime: 0, count: 0 }, _n = Fr.compile(Br, cn, Qr, mn, Hn), En = _n.draw, aa = _n.batch, tr = _n.scope, mr = [];
            return N(function(Ct, or) {
              var hr;
              if (typeof Ct == "function")
                return tr.call(this, null, Ct, 0);
              if (typeof or == "function")
                if (typeof Ct == "number")
                  for (hr = 0; hr < Ct; ++hr)
                    tr.call(this, null, or, hr);
                else {
                  if (!Array.isArray(Ct))
                    return tr.call(this, Ct, or, 0);
                  for (hr = 0; hr < Ct.length; ++hr)
                    tr.call(this, Ct[hr], or, hr);
                }
              else if (typeof Ct == "number") {
                if (0 < Ct)
                  return aa.call(this, function(Rr) {
                    for (; mr.length < Rr; )
                      mr.push(null);
                    return mr;
                  }(0 | Ct), 0 | Ct);
              } else {
                if (!Array.isArray(Ct))
                  return En.call(this, Ct);
                if (Ct.length)
                  return aa.call(this, Ct, Ct.length);
              }
            }, { stats: Hn, destroy: function() {
              _n.destroy();
            } });
          }
          function it(Br, tn) {
            var mn = 0;
            Fr.procs.poll();
            var Qr = tn.color;
            Qr && (wt.clearColor(+Qr[0] || 0, +Qr[1] || 0, +Qr[2] || 0, +Qr[3] || 0), mn |= 16384), "depth" in tn && (wt.clearDepth(+tn.depth), mn |= 256), "stencil" in tn && (wt.clearStencil(0 | tn.stencil), mn |= 1024), wt.clear(mn);
          }
          function Tt(Br) {
            return $r.push(Br), Re(), { cancel: function() {
              var tn = ee($r, Br);
              $r[tn] = function mn() {
                var Qr = ee($r, mn);
                $r[Qr] = $r[$r.length - 1], --$r.length, 0 >= $r.length && Ue();
              };
            } };
          }
          function Pt() {
            var Br = Gr.viewport, tn = Gr.scissor_box;
            Br[0] = Br[1] = tn[0] = tn[1] = 0, Tr.viewportWidth = Tr.framebufferWidth = Tr.drawingBufferWidth = Br[2] = tn[2] = wt.drawingBufferWidth, Tr.viewportHeight = Tr.framebufferHeight = Tr.drawingBufferHeight = Br[3] = tn[3] = wt.drawingBufferHeight;
          }
          function rt() {
            Tr.tick += 1, Tr.time = Bt(), Pt(), Fr.procs.poll();
          }
          function ut() {
            gr.refresh(), Pt(), Fr.procs.refresh(), Nt && Nt.update();
          }
          function Bt() {
            return (ie() - Zt) / 1e3;
          }
          if (!(he = e(he)))
            return null;
          var wt = he.gl, Lt = wt.getContextAttributes();
          wt.isContextLost();
          var Se = function(Br, tn) {
            function mn(_n) {
              var En;
              _n = _n.toLowerCase();
              try {
                En = Qr[_n] = Br.getExtension(_n);
              } catch {
              }
              return !!En;
            }
            for (var Qr = {}, cn = 0; cn < tn.extensions.length; ++cn) {
              var Hn = tn.extensions[cn];
              if (!mn(Hn))
                return tn.onDestroy(), tn.onDone('"' + Hn + '" extension is not supported by the current WebGL context, try upgrading your system or a different browser'), null;
            }
            return tn.optionalExtensions.forEach(mn), { extensions: Qr, restore: function() {
              Object.keys(Qr).forEach(function(_n) {
                if (Qr[_n] && !mn(_n))
                  throw Error("(regl): error restoring extension " + _n);
              });
            } };
          }(wt, he);
          if (!Se)
            return null;
          var We = function() {
            var Br = { "": 0 }, tn = [""];
            return { id: function(mn) {
              var Qr = Br[mn];
              return Qr || (Qr = Br[mn] = tn.length, tn.push(mn), Qr);
            }, str: function(mn) {
              return tn[mn];
            } };
          }(), nt = { vaoCount: 0, bufferCount: 0, elementsCount: 0, framebufferCount: 0, shaderCount: 0, textureCount: 0, cubeCount: 0, renderbufferCount: 0, maxTextureUnits: 0 }, ft = he.cachedCode || {}, Mt = Se.extensions, Nt = function(Br, tn) {
            function mn() {
              this.endQueryIndex = this.startQueryIndex = -1, this.sum = 0, this.stats = null;
            }
            function Qr(mr, Ct, or) {
              var hr = _n.pop() || new mn();
              hr.startQueryIndex = mr, hr.endQueryIndex = Ct, hr.sum = 0, hr.stats = or, En.push(hr);
            }
            if (!tn.ext_disjoint_timer_query)
              return null;
            var cn = [], Hn = [], _n = [], En = [], aa = [], tr = [];
            return { beginQuery: function(mr) {
              var Ct = cn.pop() || tn.ext_disjoint_timer_query.createQueryEXT();
              tn.ext_disjoint_timer_query.beginQueryEXT(35007, Ct), Hn.push(Ct), Qr(Hn.length - 1, Hn.length, mr);
            }, endQuery: function() {
              tn.ext_disjoint_timer_query.endQueryEXT(35007);
            }, pushScopeStats: Qr, update: function() {
              var mr, Ct;
              if ((mr = Hn.length) !== 0) {
                tr.length = Math.max(tr.length, mr + 1), aa.length = Math.max(aa.length, mr + 1), aa[0] = 0;
                var or = tr[0] = 0;
                for (Ct = mr = 0; Ct < Hn.length; ++Ct) {
                  var hr = Hn[Ct];
                  tn.ext_disjoint_timer_query.getQueryObjectEXT(hr, 34919) ? (or += tn.ext_disjoint_timer_query.getQueryObjectEXT(hr, 34918), cn.push(hr)) : Hn[mr++] = hr, aa[Ct + 1] = or, tr[Ct + 1] = mr;
                }
                for (Hn.length = mr, Ct = mr = 0; Ct < En.length; ++Ct) {
                  var Rr = (or = En[Ct]).startQueryIndex;
                  hr = or.endQueryIndex, or.sum += aa[hr] - aa[Rr], Rr = tr[Rr], (hr = tr[hr]) === Rr ? (or.stats.gpuTime += or.sum / 1e6, _n.push(or)) : (or.startQueryIndex = Rr, or.endQueryIndex = hr, En[mr++] = or);
                }
                En.length = mr;
              }
            }, getNumPendingQueries: function() {
              return Hn.length;
            }, clear: function() {
              cn.push.apply(cn, Hn);
              for (var mr = 0; mr < cn.length; mr++)
                tn.ext_disjoint_timer_query.deleteQueryEXT(cn[mr]);
              Hn.length = 0, cn.length = 0;
            }, restore: function() {
              Hn.length = 0, cn.length = 0;
            } };
          }(0, Mt), Zt = ie(), Ut = wt.drawingBufferWidth, fr = wt.drawingBufferHeight, Tr = { tick: 0, time: 0, viewportWidth: Ut, viewportHeight: fr, framebufferWidth: Ut, framebufferHeight: fr, drawingBufferWidth: Ut, drawingBufferHeight: fr, pixelRatio: he.pixelRatio }, ur = (Ut = { elements: null, primitive: 4, count: -1, offset: 0, instances: -1 }, oe(wt, Mt)), Kt = l(wt, nt, he, function(Br) {
            return er.destroyBuffer(Br);
          }), $t = i(wt, Mt, Kt, nt), er = P(wt, Mt, ur, nt, Kt, $t, Ut), cr = S(wt, We, nt, he), gr = L(wt, Mt, ur, function() {
            Fr.procs.poll();
          }, Tr, nt, he), Mr = tt(wt, Mt, 0, nt, he), Ir = A(wt, Mt, ur, gr, Mr, nt), Fr = U(wt, We, Mt, ur, Kt, $t, 0, Ir, {}, er, cr, Ut, Tr, Nt, ft, he), Gr = (We = E(wt, Ir, Fr.procs.poll, Tr), Fr.next), un = wt.canvas, $r = [], Dn = [], rn = [], vn = [he.onDestroy], xn = null;
          un && (un.addEventListener("webglcontextlost", Xe, !1), un.addEventListener("webglcontextrestored", qe, !1));
          var $n = Ir.setFBO = st({ framebuffer: X.define.call(null, 1, "framebuffer") });
          return ut(), Lt = N(st, { clear: function(Br) {
            if ("framebuffer" in Br)
              if (Br.framebuffer && Br.framebuffer_reglType === "framebufferCube")
                for (var tn = 0; 6 > tn; ++tn)
                  $n(N({ framebuffer: Br.framebuffer.faces[tn] }, Br), it);
              else
                $n(Br, it);
            else
              it(0, Br);
          }, prop: X.define.bind(null, 1), context: X.define.bind(null, 2), this: X.define.bind(null, 3), draw: st({}), buffer: function(Br) {
            return Kt.create(Br, 34962, !1, !1);
          }, elements: function(Br) {
            return $t.create(Br, !1);
          }, texture: gr.create2D, cube: gr.createCube, renderbuffer: Mr.create, framebuffer: Ir.create, framebufferCube: Ir.createCube, vao: er.createVAO, attributes: Lt, frame: Tt, on: function(Br, tn) {
            var mn;
            switch (Br) {
              case "frame":
                return Tt(tn);
              case "lost":
                mn = Dn;
                break;
              case "restore":
                mn = rn;
                break;
              case "destroy":
                mn = vn;
            }
            return mn.push(tn), { cancel: function() {
              for (var Qr = 0; Qr < mn.length; ++Qr)
                if (mn[Qr] === tn) {
                  mn[Qr] = mn[mn.length - 1], mn.pop();
                  break;
                }
            } };
          }, limits: ur, hasExtension: function(Br) {
            return 0 <= ur.extensions.indexOf(Br.toLowerCase());
          }, read: We, destroy: function() {
            $r.length = 0, Ue(), un && (un.removeEventListener("webglcontextlost", Xe), un.removeEventListener("webglcontextrestored", qe)), cr.clear(), Ir.clear(), Mr.clear(), er.clear(), gr.clear(), $t.clear(), Kt.clear(), Nt && Nt.clear(), vn.forEach(function(Br) {
              Br();
            });
          }, _gl: wt, _refresh: ut, poll: function() {
            rt(), Nt && Nt.update();
          }, now: Bt, stats: nt, getCachedCode: function() {
            return ft;
          }, preloadCachedCode: function(Br) {
            Object.entries(Br).forEach(function(tn) {
              ft[tn[0]] = tn[1];
            });
          } }), he.onDone(null, Lt), Lt;
        };
      });
    }, {}], 285: [function(v, Q, $) {
      var m = v("buffer"), g = m.Buffer;
      function k(e, r) {
        for (var n in e)
          r[n] = e[n];
      }
      function x(e, r, n) {
        return g(e, r, n);
      }
      g.from && g.alloc && g.allocUnsafe && g.allocUnsafeSlow ? Q.exports = m : (k(m, $), $.Buffer = x), x.prototype = Object.create(g.prototype), k(g, x), x.from = function(e, r, n) {
        if (typeof e == "number")
          throw new TypeError("Argument must not be a number");
        return g(e, r, n);
      }, x.alloc = function(e, r, n) {
        if (typeof e != "number")
          throw new TypeError("Argument must be a number");
        var s = g(e);
        return r !== void 0 ? typeof n == "string" ? s.fill(r, n) : s.fill(r) : s.fill(0), s;
      }, x.allocUnsafe = function(e) {
        if (typeof e != "number")
          throw new TypeError("Argument must be a number");
        return g(e);
      }, x.allocUnsafeSlow = function(e) {
        if (typeof e != "number")
          throw new TypeError("Argument must be a number");
        return m.SlowBuffer(e);
      };
    }, { buffer: 85 }], 286: [function(v, Q, $) {
      Q.exports = g;
      var m = v("events").EventEmitter;
      function g() {
        m.call(this);
      }
      v("inherits")(g, m), g.Readable = v("readable-stream/lib/_stream_readable.js"), g.Writable = v("readable-stream/lib/_stream_writable.js"), g.Duplex = v("readable-stream/lib/_stream_duplex.js"), g.Transform = v("readable-stream/lib/_stream_transform.js"), g.PassThrough = v("readable-stream/lib/_stream_passthrough.js"), g.finished = v("readable-stream/lib/internal/streams/end-of-stream.js"), g.pipeline = v("readable-stream/lib/internal/streams/pipeline.js"), g.Stream = g, g.prototype.pipe = function(k, x) {
        var e = this;
        function r(h) {
          k.writable && k.write(h) === !1 && e.pause && e.pause();
        }
        function n() {
          e.readable && e.resume && e.resume();
        }
        e.on("data", r), k.on("drain", n), k._isStdio || x && x.end === !1 || (e.on("end", t), e.on("close", d));
        var s = !1;
        function t() {
          s || (s = !0, k.end());
        }
        function d() {
          s || (s = !0, typeof k.destroy == "function" && k.destroy());
        }
        function u(h) {
          if (o(), m.listenerCount(this, "error") === 0)
            throw h;
        }
        function o() {
          e.removeListener("data", r), k.removeListener("drain", n), e.removeListener("end", t), e.removeListener("close", d), e.removeListener("error", u), k.removeListener("error", u), e.removeListener("end", o), e.removeListener("close", o), k.removeListener("close", o);
        }
        return e.on("error", u), k.on("error", u), e.on("end", o), e.on("close", o), k.on("close", o), k.emit("pipe", e), k;
      };
    }, { events: 84, inherits: 231, "readable-stream/lib/_stream_duplex.js": 288, "readable-stream/lib/_stream_passthrough.js": 289, "readable-stream/lib/_stream_readable.js": 290, "readable-stream/lib/_stream_transform.js": 291, "readable-stream/lib/_stream_writable.js": 292, "readable-stream/lib/internal/streams/end-of-stream.js": 296, "readable-stream/lib/internal/streams/pipeline.js": 298 }], 287: [function(v, Q, $) {
      var m = {};
      function g(x, e, r) {
        r || (r = Error);
        var n = function(s) {
          var t, d;
          function u(o, h, l) {
            return s.call(this, function(i, p, c) {
              return typeof e == "string" ? e : e(i, p, c);
            }(o, h, l)) || this;
          }
          return d = s, (t = u).prototype = Object.create(d.prototype), t.prototype.constructor = t, t.__proto__ = d, u;
        }(r);
        n.prototype.name = r.name, n.prototype.code = x, m[x] = n;
      }
      function k(x, e) {
        if (Array.isArray(x)) {
          var r = x.length;
          return x = x.map(function(n) {
            return String(n);
          }), r > 2 ? "one of ".concat(e, " ").concat(x.slice(0, r - 1).join(", "), ", or ") + x[r - 1] : r === 2 ? "one of ".concat(e, " ").concat(x[0], " or ").concat(x[1]) : "of ".concat(e, " ").concat(x[0]);
        }
        return "of ".concat(e, " ").concat(String(x));
      }
      g("ERR_INVALID_OPT_VALUE", function(x, e) {
        return 'The value "' + e + '" is invalid for option "' + x + '"';
      }, TypeError), g("ERR_INVALID_ARG_TYPE", function(x, e, r) {
        var n, s, t;
        if (typeof e == "string" && (s = "not ", e.substr(0, s.length) === s) ? (n = "must not be", e = e.replace(/^not /, "")) : n = "must be", function(u, o, h) {
          return (h === void 0 || h > u.length) && (h = u.length), u.substring(h - o.length, h) === o;
        }(x, " argument"))
          t = "The ".concat(x, " ").concat(n, " ").concat(k(e, "type"));
        else {
          var d = function(u, o, h) {
            return typeof h != "number" && (h = 0), !(h + o.length > u.length) && u.indexOf(o, h) !== -1;
          }(x, ".") ? "property" : "argument";
          t = 'The "'.concat(x, '" ').concat(d, " ").concat(n, " ").concat(k(e, "type"));
        }
        return t += ". Received type ".concat(typeof r);
      }, TypeError), g("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), g("ERR_METHOD_NOT_IMPLEMENTED", function(x) {
        return "The " + x + " method is not implemented";
      }), g("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), g("ERR_STREAM_DESTROYED", function(x) {
        return "Cannot call " + x + " after a stream was destroyed";
      }), g("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), g("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), g("ERR_STREAM_WRITE_AFTER_END", "write after end"), g("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), g("ERR_UNKNOWN_ENCODING", function(x) {
        return "Unknown encoding: " + x;
      }, TypeError), g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), Q.exports.codes = m;
    }, {}], 288: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = Object.keys || function(u) {
            var o = [];
            for (var h in u)
              o.push(h);
            return o;
          };
          Q.exports = s;
          var k = v("./_stream_readable"), x = v("./_stream_writable");
          v("inherits")(s, k);
          for (var e = g(x.prototype), r = 0; r < e.length; r++) {
            var n = e[r];
            s.prototype[n] || (s.prototype[n] = x.prototype[n]);
          }
          function s(u) {
            if (!(this instanceof s))
              return new s(u);
            k.call(this, u), x.call(this, u), this.allowHalfOpen = !0, u && (u.readable === !1 && (this.readable = !1), u.writable === !1 && (this.writable = !1), u.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", t)));
          }
          function t() {
            this._writableState.ended || m.nextTick(d, this);
          }
          function d(u) {
            u.end();
          }
          Object.defineProperty(s.prototype, "writableHighWaterMark", { enumerable: !1, get: function() {
            return this._writableState.highWaterMark;
          } }), Object.defineProperty(s.prototype, "writableBuffer", { enumerable: !1, get: function() {
            return this._writableState && this._writableState.getBuffer();
          } }), Object.defineProperty(s.prototype, "writableLength", { enumerable: !1, get: function() {
            return this._writableState.length;
          } }), Object.defineProperty(s.prototype, "destroyed", { enumerable: !1, get: function() {
            return this._readableState !== void 0 && this._writableState !== void 0 && this._readableState.destroyed && this._writableState.destroyed;
          }, set: function(u) {
            this._readableState !== void 0 && this._writableState !== void 0 && (this._readableState.destroyed = u, this._writableState.destroyed = u);
          } });
        }).call(this);
      }).call(this, v("_process"));
    }, { "./_stream_readable": 290, "./_stream_writable": 292, _process: 278, inherits: 231 }], 289: [function(v, Q, $) {
      Q.exports = g;
      var m = v("./_stream_transform");
      function g(k) {
        if (!(this instanceof g))
          return new g(k);
        m.call(this, k);
      }
      v("inherits")(g, m), g.prototype._transform = function(k, x, e) {
        e(null, k);
      };
    }, { "./_stream_transform": 291, inherits: 231 }], 290: [function(v, Q, $) {
      (function(m, g) {
        (function() {
          var k;
          Q.exports = T, T.ReadableState = w, v("events").EventEmitter;
          var x = function(V, B) {
            return V.listeners(B).length;
          }, e = v("./internal/streams/stream"), r = v("buffer").Buffer, n = g.Uint8Array || function() {
          }, s, t = v("util");
          s = t && t.debuglog ? t.debuglog("stream") : function() {
          };
          var d, u, o, h = v("./internal/streams/buffer_list"), l = v("./internal/streams/destroy"), i = v("./internal/streams/state").getHighWaterMark, p = v("../errors").codes, c = p.ERR_INVALID_ARG_TYPE, a = p.ERR_STREAM_PUSH_AFTER_EOF, y = p.ERR_METHOD_NOT_IMPLEMENTED, f = p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
          v("inherits")(T, e);
          var _ = l.errorOrDestroy, b = ["error", "close", "destroy", "pause", "resume"];
          function w(V, B, U) {
            k = k || v("./_stream_duplex"), V = V || {}, typeof U != "boolean" && (U = B instanceof k), this.objectMode = !!V.objectMode, U && (this.objectMode = this.objectMode || !!V.readableObjectMode), this.highWaterMark = i(this, V, "readableHighWaterMark", U), this.buffer = new h(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = V.emitClose !== !1, this.autoDestroy = !!V.autoDestroy, this.destroyed = !1, this.defaultEncoding = V.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, V.encoding && (d || (d = v("string_decoder/").StringDecoder), this.decoder = new d(V.encoding), this.encoding = V.encoding);
          }
          function T(V) {
            if (k = k || v("./_stream_duplex"), !(this instanceof T))
              return new T(V);
            var B = this instanceof k;
            this._readableState = new w(V, this, B), this.readable = !0, V && (typeof V.read == "function" && (this._read = V.read), typeof V.destroy == "function" && (this._destroy = V.destroy)), e.call(this);
          }
          function L(V, B, U, ee, N) {
            s("readableAddChunk", B);
            var K, X = V._readableState;
            if (B === null)
              X.reading = !1, function(te, ie) {
                if (s("onEofChunk"), !ie.ended) {
                  if (ie.decoder) {
                    var le = ie.decoder.end();
                    le && le.length && (ie.buffer.push(le), ie.length += ie.objectMode ? 1 : le.length);
                  }
                  ie.ended = !0, ie.sync ? P(te) : (ie.needReadable = !1, ie.emittedReadable || (ie.emittedReadable = !0, S(te)));
                }
              }(V, X);
            else if (N || (K = function(te, ie) {
              var le;
              oe = ie, r.isBuffer(oe) || oe instanceof n || typeof ie == "string" || ie === void 0 || te.objectMode || (le = new c("chunk", ["string", "Buffer", "Uint8Array"], ie));
              var oe;
              return le;
            }(X, B)), K)
              _(V, K);
            else if (X.objectMode || B && B.length > 0)
              if (typeof B == "string" || X.objectMode || Object.getPrototypeOf(B) === r.prototype || (B = function(te) {
                return r.from(te);
              }(B)), ee)
                X.endEmitted ? _(V, new f()) : A(V, X, B, !0);
              else if (X.ended)
                _(V, new a());
              else {
                if (X.destroyed)
                  return !1;
                X.reading = !1, X.decoder && !U ? (B = X.decoder.write(B), X.objectMode || B.length !== 0 ? A(V, X, B, !1) : E(V, X)) : A(V, X, B, !1);
              }
            else
              ee || (X.reading = !1, E(V, X));
            return !X.ended && (X.length < X.highWaterMark || X.length === 0);
          }
          function A(V, B, U, ee) {
            B.flowing && B.length === 0 && !B.sync ? (B.awaitDrain = 0, V.emit("data", U)) : (B.length += B.objectMode ? 1 : U.length, ee ? B.buffer.unshift(U) : B.buffer.push(U), B.needReadable && P(V)), E(V, B);
          }
          Object.defineProperty(T.prototype, "destroyed", { enumerable: !1, get: function() {
            return this._readableState !== void 0 && this._readableState.destroyed;
          }, set: function(V) {
            this._readableState && (this._readableState.destroyed = V);
          } }), T.prototype.destroy = l.destroy, T.prototype._undestroy = l.undestroy, T.prototype._destroy = function(V, B) {
            B(V);
          }, T.prototype.push = function(V, B) {
            var U, ee = this._readableState;
            return ee.objectMode ? U = !0 : typeof V == "string" && ((B = B || ee.defaultEncoding) !== ee.encoding && (V = r.from(V, B), B = ""), U = !0), L(this, V, B, !1, U);
          }, T.prototype.unshift = function(V) {
            return L(this, V, null, !0, !1);
          }, T.prototype.isPaused = function() {
            return this._readableState.flowing === !1;
          }, T.prototype.setEncoding = function(V) {
            d || (d = v("string_decoder/").StringDecoder);
            var B = new d(V);
            this._readableState.decoder = B, this._readableState.encoding = this._readableState.decoder.encoding;
            for (var U = this._readableState.buffer.head, ee = ""; U !== null; )
              ee += B.write(U.data), U = U.next;
            return this._readableState.buffer.clear(), ee !== "" && this._readableState.buffer.push(ee), this._readableState.length = ee.length, this;
          };
          function I(V, B) {
            return V <= 0 || B.length === 0 && B.ended ? 0 : B.objectMode ? 1 : V != V ? B.flowing && B.length ? B.buffer.head.data.length : B.length : (V > B.highWaterMark && (B.highWaterMark = function(U) {
              return U >= 1073741824 ? U = 1073741824 : (U--, U |= U >>> 1, U |= U >>> 2, U |= U >>> 4, U |= U >>> 8, U |= U >>> 16, U++), U;
            }(V)), V <= B.length ? V : B.ended ? B.length : (B.needReadable = !0, 0));
          }
          function P(V) {
            var B = V._readableState;
            s("emitReadable", B.needReadable, B.emittedReadable), B.needReadable = !1, B.emittedReadable || (s("emitReadable", B.flowing), B.emittedReadable = !0, m.nextTick(S, V));
          }
          function S(V) {
            var B = V._readableState;
            s("emitReadable_", B.destroyed, B.length, B.ended), B.destroyed || !B.length && !B.ended || (V.emit("readable"), B.emittedReadable = !1), B.needReadable = !B.flowing && !B.ended && B.length <= B.highWaterMark, Y(V);
          }
          function E(V, B) {
            B.readingMore || (B.readingMore = !0, m.nextTick(R, V, B));
          }
          function R(V, B) {
            for (; !B.reading && !B.ended && (B.length < B.highWaterMark || B.flowing && B.length === 0); ) {
              var U = B.length;
              if (s("maybeReadMore read 0"), V.read(0), U === B.length)
                break;
            }
            B.readingMore = !1;
          }
          function z(V) {
            var B = V._readableState;
            B.readableListening = V.listenerCount("readable") > 0, B.resumeScheduled && !B.paused ? B.flowing = !0 : V.listenerCount("data") > 0 && V.resume();
          }
          function j(V) {
            s("readable nexttick read 0"), V.read(0);
          }
          function H(V, B) {
            s("resume", B.reading), B.reading || V.read(0), B.resumeScheduled = !1, V.emit("resume"), Y(V), B.flowing && !B.reading && V.read(0);
          }
          function Y(V) {
            var B = V._readableState;
            for (s("flow", B.flowing); B.flowing && V.read() !== null; )
              ;
          }
          function J(V, B) {
            return B.length === 0 ? null : (B.objectMode ? U = B.buffer.shift() : !V || V >= B.length ? (U = B.decoder ? B.buffer.join("") : B.buffer.length === 1 ? B.buffer.first() : B.buffer.concat(B.length), B.buffer.clear()) : U = B.buffer.consume(V, B.decoder), U);
            var U;
          }
          function W(V) {
            var B = V._readableState;
            s("endReadable", B.endEmitted), B.endEmitted || (B.ended = !0, m.nextTick(Z, B, V));
          }
          function Z(V, B) {
            if (s("endReadableNT", V.endEmitted, V.length), !V.endEmitted && V.length === 0 && (V.endEmitted = !0, B.readable = !1, B.emit("end"), V.autoDestroy)) {
              var U = B._writableState;
              (!U || U.autoDestroy && U.finished) && B.destroy();
            }
          }
          function re(V, B) {
            for (var U = 0, ee = V.length; U < ee; U++)
              if (V[U] === B)
                return U;
            return -1;
          }
          T.prototype.read = function(V) {
            s("read", V), V = parseInt(V, 10);
            var B = this._readableState, U = V;
            if (V !== 0 && (B.emittedReadable = !1), V === 0 && B.needReadable && ((B.highWaterMark !== 0 ? B.length >= B.highWaterMark : B.length > 0) || B.ended))
              return s("read: emitReadable", B.length, B.ended), B.length === 0 && B.ended ? W(this) : P(this), null;
            if ((V = I(V, B)) === 0 && B.ended)
              return B.length === 0 && W(this), null;
            var ee, N = B.needReadable;
            return s("need readable", N), (B.length === 0 || B.length - V < B.highWaterMark) && s("length less than watermark", N = !0), B.ended || B.reading ? s("reading or ended", N = !1) : N && (s("do read"), B.reading = !0, B.sync = !0, B.length === 0 && (B.needReadable = !0), this._read(B.highWaterMark), B.sync = !1, B.reading || (V = I(U, B))), (ee = V > 0 ? J(V, B) : null) === null ? (B.needReadable = B.length <= B.highWaterMark, V = 0) : (B.length -= V, B.awaitDrain = 0), B.length === 0 && (B.ended || (B.needReadable = !0), U !== V && B.ended && W(this)), ee !== null && this.emit("data", ee), ee;
          }, T.prototype._read = function(V) {
            _(this, new y("_read()"));
          }, T.prototype.pipe = function(V, B) {
            var U = this, ee = this._readableState;
            switch (ee.pipesCount) {
              case 0:
                ee.pipes = V;
                break;
              case 1:
                ee.pipes = [ee.pipes, V];
                break;
              default:
                ee.pipes.push(V);
            }
            ee.pipesCount += 1, s("pipe count=%d opts=%j", ee.pipesCount, B);
            var N = (!B || B.end !== !1) && V !== m.stdout && V !== m.stderr ? X : ye;
            function K(Ae, pe) {
              s("onunpipe"), Ae === U && pe && pe.hasUnpiped === !1 && (pe.hasUnpiped = !0, s("cleanup"), V.removeListener("close", ve), V.removeListener("finish", ue), V.removeListener("drain", te), V.removeListener("error", oe), V.removeListener("unpipe", K), U.removeListener("end", X), U.removeListener("end", ye), U.removeListener("data", le), ie = !0, !ee.awaitDrain || V._writableState && !V._writableState.needDrain || te());
            }
            function X() {
              s("onend"), V.end();
            }
            ee.endEmitted ? m.nextTick(N) : U.once("end", N), V.on("unpipe", K);
            var te = function(Ae) {
              return function() {
                var pe = Ae._readableState;
                s("pipeOnDrain", pe.awaitDrain), pe.awaitDrain && pe.awaitDrain--, pe.awaitDrain === 0 && x(Ae, "data") && (pe.flowing = !0, Y(Ae));
              };
            }(U);
            V.on("drain", te);
            var ie = !1;
            function le(Ae) {
              s("ondata");
              var pe = V.write(Ae);
              s("dest.write", pe), pe === !1 && ((ee.pipesCount === 1 && ee.pipes === V || ee.pipesCount > 1 && re(ee.pipes, V) !== -1) && !ie && (s("false write response, pause", ee.awaitDrain), ee.awaitDrain++), U.pause());
            }
            function oe(Ae) {
              s("onerror", Ae), ye(), V.removeListener("error", oe), x(V, "error") === 0 && _(V, Ae);
            }
            function ve() {
              V.removeListener("finish", ue), ye();
            }
            function ue() {
              s("onfinish"), V.removeListener("close", ve), ye();
            }
            function ye() {
              s("unpipe"), U.unpipe(V);
            }
            return U.on("data", le), function(Ae, pe, ge) {
              if (typeof Ae.prependListener == "function")
                return Ae.prependListener(pe, ge);
              Ae._events && Ae._events[pe] ? Array.isArray(Ae._events[pe]) ? Ae._events[pe].unshift(ge) : Ae._events[pe] = [ge, Ae._events[pe]] : Ae.on(pe, ge);
            }(V, "error", oe), V.once("close", ve), V.once("finish", ue), V.emit("pipe", U), ee.flowing || (s("pipe resume"), U.resume()), V;
          }, T.prototype.unpipe = function(V) {
            var B = this._readableState, U = { hasUnpiped: !1 };
            if (B.pipesCount === 0)
              return this;
            if (B.pipesCount === 1)
              return V && V !== B.pipes || (V || (V = B.pipes), B.pipes = null, B.pipesCount = 0, B.flowing = !1, V && V.emit("unpipe", this, U)), this;
            if (!V) {
              var ee = B.pipes, N = B.pipesCount;
              B.pipes = null, B.pipesCount = 0, B.flowing = !1;
              for (var K = 0; K < N; K++)
                ee[K].emit("unpipe", this, { hasUnpiped: !1 });
              return this;
            }
            var X = re(B.pipes, V);
            return X === -1 || (B.pipes.splice(X, 1), B.pipesCount -= 1, B.pipesCount === 1 && (B.pipes = B.pipes[0]), V.emit("unpipe", this, U)), this;
          }, T.prototype.on = function(V, B) {
            var U = e.prototype.on.call(this, V, B), ee = this._readableState;
            return V === "data" ? (ee.readableListening = this.listenerCount("readable") > 0, ee.flowing !== !1 && this.resume()) : V === "readable" && (ee.endEmitted || ee.readableListening || (ee.readableListening = ee.needReadable = !0, ee.flowing = !1, ee.emittedReadable = !1, s("on readable", ee.length, ee.reading), ee.length ? P(this) : ee.reading || m.nextTick(j, this))), U;
          }, T.prototype.addListener = T.prototype.on, T.prototype.removeListener = function(V, B) {
            var U = e.prototype.removeListener.call(this, V, B);
            return V === "readable" && m.nextTick(z, this), U;
          }, T.prototype.removeAllListeners = function(V) {
            var B = e.prototype.removeAllListeners.apply(this, arguments);
            return V !== "readable" && V !== void 0 || m.nextTick(z, this), B;
          }, T.prototype.resume = function() {
            var V = this._readableState;
            return V.flowing || (s("resume"), V.flowing = !V.readableListening, function(B, U) {
              U.resumeScheduled || (U.resumeScheduled = !0, m.nextTick(H, B, U));
            }(this, V)), V.paused = !1, this;
          }, T.prototype.pause = function() {
            return s("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (s("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
          }, T.prototype.wrap = function(V) {
            var B = this, U = this._readableState, ee = !1;
            for (var N in V.on("end", function() {
              if (s("wrapped end"), U.decoder && !U.ended) {
                var X = U.decoder.end();
                X && X.length && B.push(X);
              }
              B.push(null);
            }), V.on("data", function(X) {
              s("wrapped data"), U.decoder && (X = U.decoder.write(X)), U.objectMode && X == null || (U.objectMode || X && X.length) && (B.push(X) || (ee = !0, V.pause()));
            }), V)
              this[N] === void 0 && typeof V[N] == "function" && (this[N] = function(X) {
                return function() {
                  return V[X].apply(V, arguments);
                };
              }(N));
            for (var K = 0; K < b.length; K++)
              V.on(b[K], this.emit.bind(this, b[K]));
            return this._read = function(X) {
              s("wrapped _read", X), ee && (ee = !1, V.resume());
            }, this;
          }, typeof Symbol == "function" && (T.prototype[Symbol.asyncIterator] = function() {
            return u === void 0 && (u = v("./internal/streams/async_iterator")), u(this);
          }), Object.defineProperty(T.prototype, "readableHighWaterMark", { enumerable: !1, get: function() {
            return this._readableState.highWaterMark;
          } }), Object.defineProperty(T.prototype, "readableBuffer", { enumerable: !1, get: function() {
            return this._readableState && this._readableState.buffer;
          } }), Object.defineProperty(T.prototype, "readableFlowing", { enumerable: !1, get: function() {
            return this._readableState.flowing;
          }, set: function(V) {
            this._readableState && (this._readableState.flowing = V);
          } }), T._fromList = J, Object.defineProperty(T.prototype, "readableLength", { enumerable: !1, get: function() {
            return this._readableState.length;
          } }), typeof Symbol == "function" && (T.from = function(V, B) {
            return o === void 0 && (o = v("./internal/streams/from")), o(T, V, B);
          });
        }).call(this);
      }).call(this, v("_process"), typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "../errors": 287, "./_stream_duplex": 288, "./internal/streams/async_iterator": 293, "./internal/streams/buffer_list": 294, "./internal/streams/destroy": 295, "./internal/streams/from": 297, "./internal/streams/state": 299, "./internal/streams/stream": 300, _process: 278, buffer: 85, events: 84, inherits: 231, "string_decoder/": 301, util: 83 }], 291: [function(v, Q, $) {
      Q.exports = s;
      var m = v("../errors").codes, g = m.ERR_METHOD_NOT_IMPLEMENTED, k = m.ERR_MULTIPLE_CALLBACK, x = m.ERR_TRANSFORM_ALREADY_TRANSFORMING, e = m.ERR_TRANSFORM_WITH_LENGTH_0, r = v("./_stream_duplex");
      function n(u, o) {
        var h = this._transformState;
        h.transforming = !1;
        var l = h.writecb;
        if (l === null)
          return this.emit("error", new k());
        h.writechunk = null, h.writecb = null, o != null && this.push(o), l(u);
        var i = this._readableState;
        i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
      }
      function s(u) {
        if (!(this instanceof s))
          return new s(u);
        r.call(this, u), this._transformState = { afterTransform: n.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = !0, this._readableState.sync = !1, u && (typeof u.transform == "function" && (this._transform = u.transform), typeof u.flush == "function" && (this._flush = u.flush)), this.on("prefinish", t);
      }
      function t() {
        var u = this;
        typeof this._flush != "function" || this._readableState.destroyed ? d(this, null, null) : this._flush(function(o, h) {
          d(u, o, h);
        });
      }
      function d(u, o, h) {
        if (o)
          return u.emit("error", o);
        if (h != null && u.push(h), u._writableState.length)
          throw new e();
        if (u._transformState.transforming)
          throw new x();
        return u.push(null);
      }
      v("inherits")(s, r), s.prototype.push = function(u, o) {
        return this._transformState.needTransform = !1, r.prototype.push.call(this, u, o);
      }, s.prototype._transform = function(u, o, h) {
        h(new g("_transform()"));
      }, s.prototype._write = function(u, o, h) {
        var l = this._transformState;
        if (l.writecb = h, l.writechunk = u, l.writeencoding = o, !l.transforming) {
          var i = this._readableState;
          (l.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
        }
      }, s.prototype._read = function(u) {
        var o = this._transformState;
        o.writechunk === null || o.transforming ? o.needTransform = !0 : (o.transforming = !0, this._transform(o.writechunk, o.writeencoding, o.afterTransform));
      }, s.prototype._destroy = function(u, o) {
        r.prototype._destroy.call(this, u, function(h) {
          o(h);
        });
      };
    }, { "../errors": 287, "./_stream_duplex": 288, inherits: 231 }], 292: [function(v, Q, $) {
      (function(m, g) {
        (function() {
          function k(R) {
            var z = this;
            this.next = null, this.entry = null, this.finish = function() {
              (function(j, H, Y) {
                var J = j.entry;
                for (j.entry = null; J; ) {
                  var W = J.callback;
                  H.pendingcb--, W(Y), J = J.next;
                }
                H.corkedRequestsFree.next = j;
              })(z, R);
            };
          }
          var x;
          Q.exports = T, T.WritableState = w;
          var e = { deprecate: v("util-deprecate") }, r = v("./internal/streams/stream"), n = v("buffer").Buffer, s = g.Uint8Array || function() {
          }, t, d = v("./internal/streams/destroy"), u = v("./internal/streams/state").getHighWaterMark, o = v("../errors").codes, h = o.ERR_INVALID_ARG_TYPE, l = o.ERR_METHOD_NOT_IMPLEMENTED, i = o.ERR_MULTIPLE_CALLBACK, p = o.ERR_STREAM_CANNOT_PIPE, c = o.ERR_STREAM_DESTROYED, a = o.ERR_STREAM_NULL_VALUES, y = o.ERR_STREAM_WRITE_AFTER_END, f = o.ERR_UNKNOWN_ENCODING, _ = d.errorOrDestroy;
          function b() {
          }
          function w(R, z, j) {
            x = x || v("./_stream_duplex"), R = R || {}, typeof j != "boolean" && (j = z instanceof x), this.objectMode = !!R.objectMode, j && (this.objectMode = this.objectMode || !!R.writableObjectMode), this.highWaterMark = u(this, R, "writableHighWaterMark", j), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
            var H = R.decodeStrings === !1;
            this.decodeStrings = !H, this.defaultEncoding = R.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(Y) {
              (function(J, W) {
                var Z = J._writableState, re = Z.sync, V = Z.writecb;
                if (typeof V != "function")
                  throw new i();
                if (function(U) {
                  U.writing = !1, U.writecb = null, U.length -= U.writelen, U.writelen = 0;
                }(Z), W)
                  (function(U, ee, N, K, X) {
                    --ee.pendingcb, N ? (m.nextTick(X, K), m.nextTick(E, U, ee), U._writableState.errorEmitted = !0, _(U, K)) : (X(K), U._writableState.errorEmitted = !0, _(U, K), E(U, ee));
                  })(J, Z, re, W, V);
                else {
                  var B = P(Z) || J.destroyed;
                  B || Z.corked || Z.bufferProcessing || !Z.bufferedRequest || I(J, Z), re ? m.nextTick(A, J, Z, B, V) : A(J, Z, B, V);
                }
              })(z, Y);
            }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = R.emitClose !== !1, this.autoDestroy = !!R.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new k(this);
          }
          function T(R) {
            var z = this instanceof (x = x || v("./_stream_duplex"));
            if (!z && !t.call(T, this))
              return new T(R);
            this._writableState = new w(R, this, z), this.writable = !0, R && (typeof R.write == "function" && (this._write = R.write), typeof R.writev == "function" && (this._writev = R.writev), typeof R.destroy == "function" && (this._destroy = R.destroy), typeof R.final == "function" && (this._final = R.final)), r.call(this);
          }
          function L(R, z, j, H, Y, J, W) {
            z.writelen = H, z.writecb = W, z.writing = !0, z.sync = !0, z.destroyed ? z.onwrite(new c("write")) : j ? R._writev(Y, z.onwrite) : R._write(Y, J, z.onwrite), z.sync = !1;
          }
          function A(R, z, j, H) {
            j || function(Y, J) {
              J.length === 0 && J.needDrain && (J.needDrain = !1, Y.emit("drain"));
            }(R, z), z.pendingcb--, H(), E(R, z);
          }
          function I(R, z) {
            z.bufferProcessing = !0;
            var j = z.bufferedRequest;
            if (R._writev && j && j.next) {
              var H = z.bufferedRequestCount, Y = new Array(H), J = z.corkedRequestsFree;
              J.entry = j;
              for (var W = 0, Z = !0; j; )
                Y[W] = j, j.isBuf || (Z = !1), j = j.next, W += 1;
              Y.allBuffers = Z, L(R, z, !0, z.length, Y, "", J.finish), z.pendingcb++, z.lastBufferedRequest = null, J.next ? (z.corkedRequestsFree = J.next, J.next = null) : z.corkedRequestsFree = new k(z), z.bufferedRequestCount = 0;
            } else {
              for (; j; ) {
                var re = j.chunk, V = j.encoding, B = j.callback;
                if (L(R, z, !1, z.objectMode ? 1 : re.length, re, V, B), j = j.next, z.bufferedRequestCount--, z.writing)
                  break;
              }
              j === null && (z.lastBufferedRequest = null);
            }
            z.bufferedRequest = j, z.bufferProcessing = !1;
          }
          function P(R) {
            return R.ending && R.length === 0 && R.bufferedRequest === null && !R.finished && !R.writing;
          }
          function S(R, z) {
            R._final(function(j) {
              z.pendingcb--, j && _(R, j), z.prefinished = !0, R.emit("prefinish"), E(R, z);
            });
          }
          function E(R, z) {
            var j = P(z);
            if (j && (function(Y, J) {
              J.prefinished || J.finalCalled || (typeof Y._final != "function" || J.destroyed ? (J.prefinished = !0, Y.emit("prefinish")) : (J.pendingcb++, J.finalCalled = !0, m.nextTick(S, Y, J)));
            }(R, z), z.pendingcb === 0 && (z.finished = !0, R.emit("finish"), z.autoDestroy))) {
              var H = R._readableState;
              (!H || H.autoDestroy && H.endEmitted) && R.destroy();
            }
            return j;
          }
          v("inherits")(T, r), w.prototype.getBuffer = function() {
            for (var R = this.bufferedRequest, z = []; R; )
              z.push(R), R = R.next;
            return z;
          }, function() {
            try {
              Object.defineProperty(w.prototype, "buffer", { get: e.deprecate(function() {
                return this.getBuffer();
              }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") });
            } catch {
            }
          }(), typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (t = Function.prototype[Symbol.hasInstance], Object.defineProperty(T, Symbol.hasInstance, { value: function(R) {
            return !!t.call(this, R) || this === T && R && R._writableState instanceof w;
          } })) : t = function(R) {
            return R instanceof this;
          }, T.prototype.pipe = function() {
            _(this, new p());
          }, T.prototype.write = function(R, z, j) {
            var H, Y = this._writableState, J = !1, W = !Y.objectMode && (H = R, n.isBuffer(H) || H instanceof s);
            return W && !n.isBuffer(R) && (R = function(Z) {
              return n.from(Z);
            }(R)), typeof z == "function" && (j = z, z = null), W ? z = "buffer" : z || (z = Y.defaultEncoding), typeof j != "function" && (j = b), Y.ending ? function(Z, re) {
              var V = new y();
              _(Z, V), m.nextTick(re, V);
            }(this, j) : (W || function(Z, re, V, B) {
              var U;
              return V === null ? U = new a() : typeof V == "string" || re.objectMode || (U = new h("chunk", ["string", "Buffer"], V)), !U || (_(Z, U), m.nextTick(B, U), !1);
            }(this, Y, R, j)) && (Y.pendingcb++, J = function(Z, re, V, B, U, ee) {
              if (!V) {
                var N = function(ie, le, oe) {
                  return ie.objectMode || ie.decodeStrings === !1 || typeof le != "string" || (le = n.from(le, oe)), le;
                }(re, B, U);
                B !== N && (V = !0, U = "buffer", B = N);
              }
              var K = re.objectMode ? 1 : B.length;
              re.length += K;
              var X = re.length < re.highWaterMark;
              if (X || (re.needDrain = !0), re.writing || re.corked) {
                var te = re.lastBufferedRequest;
                re.lastBufferedRequest = { chunk: B, encoding: U, isBuf: V, callback: ee, next: null }, te ? te.next = re.lastBufferedRequest : re.bufferedRequest = re.lastBufferedRequest, re.bufferedRequestCount += 1;
              } else
                L(Z, re, !1, K, B, U, ee);
              return X;
            }(this, Y, W, R, z, j)), J;
          }, T.prototype.cork = function() {
            this._writableState.corked++;
          }, T.prototype.uncork = function() {
            var R = this._writableState;
            R.corked && (R.corked--, R.writing || R.corked || R.bufferProcessing || !R.bufferedRequest || I(this, R));
          }, T.prototype.setDefaultEncoding = function(R) {
            if (typeof R == "string" && (R = R.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((R + "").toLowerCase()) > -1))
              throw new f(R);
            return this._writableState.defaultEncoding = R, this;
          }, Object.defineProperty(T.prototype, "writableBuffer", { enumerable: !1, get: function() {
            return this._writableState && this._writableState.getBuffer();
          } }), Object.defineProperty(T.prototype, "writableHighWaterMark", { enumerable: !1, get: function() {
            return this._writableState.highWaterMark;
          } }), T.prototype._write = function(R, z, j) {
            j(new l("_write()"));
          }, T.prototype._writev = null, T.prototype.end = function(R, z, j) {
            var H = this._writableState;
            return typeof R == "function" ? (j = R, R = null, z = null) : typeof z == "function" && (j = z, z = null), R != null && this.write(R, z), H.corked && (H.corked = 1, this.uncork()), H.ending || function(Y, J, W) {
              J.ending = !0, E(Y, J), W && (J.finished ? m.nextTick(W) : Y.once("finish", W)), J.ended = !0, Y.writable = !1;
            }(this, H, j), this;
          }, Object.defineProperty(T.prototype, "writableLength", { enumerable: !1, get: function() {
            return this._writableState.length;
          } }), Object.defineProperty(T.prototype, "destroyed", { enumerable: !1, get: function() {
            return this._writableState !== void 0 && this._writableState.destroyed;
          }, set: function(R) {
            this._writableState && (this._writableState.destroyed = R);
          } }), T.prototype.destroy = d.destroy, T.prototype._undestroy = d.undestroy, T.prototype._destroy = function(R, z) {
            z(R);
          };
        }).call(this);
      }).call(this, v("_process"), typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "../errors": 287, "./_stream_duplex": 288, "./internal/streams/destroy": 295, "./internal/streams/state": 299, "./internal/streams/stream": 300, _process: 278, buffer: 85, inherits: 231, "util-deprecate": 331 }], 293: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g;
          function k(c, a, y) {
            return a in c ? Object.defineProperty(c, a, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : c[a] = y, c;
          }
          var x = v("./end-of-stream"), e = Symbol("lastResolve"), r = Symbol("lastReject"), n = Symbol("error"), s = Symbol("ended"), t = Symbol("lastPromise"), d = Symbol("handlePromise"), u = Symbol("stream");
          function o(c, a) {
            return { value: c, done: a };
          }
          function h(c) {
            var a = c[e];
            if (a !== null) {
              var y = c[u].read();
              y !== null && (c[t] = null, c[e] = null, c[r] = null, a(o(y, !1)));
            }
          }
          function l(c) {
            m.nextTick(h, c);
          }
          var i = Object.getPrototypeOf(function() {
          }), p = Object.setPrototypeOf((k(g = { get stream() {
            return this[u];
          }, next: function() {
            var c = this, a = this[n];
            if (a !== null)
              return Promise.reject(a);
            if (this[s])
              return Promise.resolve(o(void 0, !0));
            if (this[u].destroyed)
              return new Promise(function(b, w) {
                m.nextTick(function() {
                  c[n] ? w(c[n]) : b(o(void 0, !0));
                });
              });
            var y, f = this[t];
            if (f)
              y = new Promise(function(b, w) {
                return function(T, L) {
                  b.then(function() {
                    w[s] ? T(o(void 0, !0)) : w[d](T, L);
                  }, L);
                };
              }(f, this));
            else {
              var _ = this[u].read();
              if (_ !== null)
                return Promise.resolve(o(_, !1));
              y = new Promise(this[d]);
            }
            return this[t] = y, y;
          } }, Symbol.asyncIterator, function() {
            return this;
          }), k(g, "return", function() {
            var c = this;
            return new Promise(function(a, y) {
              c[u].destroy(null, function(f) {
                f ? y(f) : a(o(void 0, !0));
              });
            });
          }), g), i);
          Q.exports = function(c) {
            var a, y = Object.create(p, (k(a = {}, u, { value: c, writable: !0 }), k(a, e, { value: null, writable: !0 }), k(a, r, { value: null, writable: !0 }), k(a, n, { value: null, writable: !0 }), k(a, s, { value: c._readableState.endEmitted, writable: !0 }), k(a, d, { value: function(f, _) {
              var b = y[u].read();
              b ? (y[t] = null, y[e] = null, y[r] = null, f(o(b, !1))) : (y[e] = f, y[r] = _);
            }, writable: !0 }), a));
            return y[t] = null, x(c, function(f) {
              if (f && f.code !== "ERR_STREAM_PREMATURE_CLOSE") {
                var _ = y[r];
                return _ !== null && (y[t] = null, y[e] = null, y[r] = null, _(f)), void (y[n] = f);
              }
              var b = y[e];
              b !== null && (y[t] = null, y[e] = null, y[r] = null, b(o(void 0, !0))), y[s] = !0;
            }), c.on("readable", l.bind(null, y)), y;
          };
        }).call(this);
      }).call(this, v("_process"));
    }, { "./end-of-stream": 296, _process: 278 }], 294: [function(v, Q, $) {
      function m(n, s) {
        var t = Object.keys(n);
        if (Object.getOwnPropertySymbols) {
          var d = Object.getOwnPropertySymbols(n);
          s && (d = d.filter(function(u) {
            return Object.getOwnPropertyDescriptor(n, u).enumerable;
          })), t.push.apply(t, d);
        }
        return t;
      }
      function g(n, s, t) {
        return s in n ? Object.defineProperty(n, s, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[s] = t, n;
      }
      function k(n, s) {
        for (var t = 0; t < s.length; t++) {
          var d = s[t];
          d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(n, d.key, d);
        }
      }
      var x = v("buffer").Buffer, e = v("util").inspect, r = e && e.custom || "inspect";
      Q.exports = function() {
        function n() {
          (function(d, u) {
            if (!(d instanceof u))
              throw new TypeError("Cannot call a class as a function");
          })(this, n), this.head = null, this.tail = null, this.length = 0;
        }
        var s, t;
        return s = n, (t = [{ key: "push", value: function(d) {
          var u = { data: d, next: null };
          this.length > 0 ? this.tail.next = u : this.head = u, this.tail = u, ++this.length;
        } }, { key: "unshift", value: function(d) {
          var u = { data: d, next: this.head };
          this.length === 0 && (this.tail = u), this.head = u, ++this.length;
        } }, { key: "shift", value: function() {
          if (this.length !== 0) {
            var d = this.head.data;
            return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, d;
          }
        } }, { key: "clear", value: function() {
          this.head = this.tail = null, this.length = 0;
        } }, { key: "join", value: function(d) {
          if (this.length === 0)
            return "";
          for (var u = this.head, o = "" + u.data; u = u.next; )
            o += d + u.data;
          return o;
        } }, { key: "concat", value: function(d) {
          if (this.length === 0)
            return x.alloc(0);
          for (var u, o, h, l = x.allocUnsafe(d >>> 0), i = this.head, p = 0; i; )
            u = i.data, o = l, h = p, x.prototype.copy.call(u, o, h), p += i.data.length, i = i.next;
          return l;
        } }, { key: "consume", value: function(d, u) {
          var o;
          return d < this.head.data.length ? (o = this.head.data.slice(0, d), this.head.data = this.head.data.slice(d)) : o = d === this.head.data.length ? this.shift() : u ? this._getString(d) : this._getBuffer(d), o;
        } }, { key: "first", value: function() {
          return this.head.data;
        } }, { key: "_getString", value: function(d) {
          var u = this.head, o = 1, h = u.data;
          for (d -= h.length; u = u.next; ) {
            var l = u.data, i = d > l.length ? l.length : d;
            if (i === l.length ? h += l : h += l.slice(0, d), (d -= i) == 0) {
              i === l.length ? (++o, u.next ? this.head = u.next : this.head = this.tail = null) : (this.head = u, u.data = l.slice(i));
              break;
            }
            ++o;
          }
          return this.length -= o, h;
        } }, { key: "_getBuffer", value: function(d) {
          var u = x.allocUnsafe(d), o = this.head, h = 1;
          for (o.data.copy(u), d -= o.data.length; o = o.next; ) {
            var l = o.data, i = d > l.length ? l.length : d;
            if (l.copy(u, u.length - d, 0, i), (d -= i) == 0) {
              i === l.length ? (++h, o.next ? this.head = o.next : this.head = this.tail = null) : (this.head = o, o.data = l.slice(i));
              break;
            }
            ++h;
          }
          return this.length -= h, u;
        } }, { key: r, value: function(d, u) {
          return e(this, function(o) {
            for (var h = 1; h < arguments.length; h++) {
              var l = arguments[h] != null ? arguments[h] : {};
              h % 2 ? m(Object(l), !0).forEach(function(i) {
                g(o, i, l[i]);
              }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(l)) : m(Object(l)).forEach(function(i) {
                Object.defineProperty(o, i, Object.getOwnPropertyDescriptor(l, i));
              });
            }
            return o;
          }({}, u, { depth: 0, customInspect: !1 }));
        } }]) && k(s.prototype, t), n;
      }();
    }, { buffer: 85, util: 83 }], 295: [function(v, Q, $) {
      (function(m) {
        (function() {
          function g(e, r) {
            x(e, r), k(e);
          }
          function k(e) {
            e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
          }
          function x(e, r) {
            e.emit("error", r);
          }
          Q.exports = { destroy: function(e, r) {
            var n = this, s = this._readableState && this._readableState.destroyed, t = this._writableState && this._writableState.destroyed;
            return s || t ? (r ? r(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, m.nextTick(x, this, e)) : m.nextTick(x, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(d) {
              !r && d ? n._writableState ? n._writableState.errorEmitted ? m.nextTick(k, n) : (n._writableState.errorEmitted = !0, m.nextTick(g, n, d)) : m.nextTick(g, n, d) : r ? (m.nextTick(k, n), r(d)) : m.nextTick(k, n);
            }), this);
          }, undestroy: function() {
            this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
          }, errorOrDestroy: function(e, r) {
            var n = e._readableState, s = e._writableState;
            n && n.autoDestroy || s && s.autoDestroy ? e.destroy(r) : e.emit("error", r);
          } };
        }).call(this);
      }).call(this, v("_process"));
    }, { _process: 278 }], 296: [function(v, Q, $) {
      var m = v("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;
      function g() {
      }
      Q.exports = function k(x, e, r) {
        if (typeof e == "function")
          return k(x, null, e);
        e || (e = {}), r = function(c) {
          var a = !1;
          return function() {
            if (!a) {
              a = !0;
              for (var y = arguments.length, f = new Array(y), _ = 0; _ < y; _++)
                f[_] = arguments[_];
              c.apply(this, f);
            }
          };
        }(r || g);
        var n = e.readable || e.readable !== !1 && x.readable, s = e.writable || e.writable !== !1 && x.writable, t = function() {
          x.writable || u();
        }, d = x._writableState && x._writableState.finished, u = function() {
          s = !1, d = !0, n || r.call(x);
        }, o = x._readableState && x._readableState.endEmitted, h = function() {
          n = !1, o = !0, s || r.call(x);
        }, l = function(c) {
          r.call(x, c);
        }, i = function() {
          var c;
          return n && !o ? (x._readableState && x._readableState.ended || (c = new m()), r.call(x, c)) : s && !d ? (x._writableState && x._writableState.ended || (c = new m()), r.call(x, c)) : void 0;
        }, p = function() {
          x.req.on("finish", u);
        };
        return function(c) {
          return c.setHeader && typeof c.abort == "function";
        }(x) ? (x.on("complete", u), x.on("abort", i), x.req ? p() : x.on("request", p)) : s && !x._writableState && (x.on("end", t), x.on("close", t)), x.on("end", h), x.on("finish", u), e.error !== !1 && x.on("error", l), x.on("close", i), function() {
          x.removeListener("complete", u), x.removeListener("abort", i), x.removeListener("request", p), x.req && x.req.removeListener("finish", u), x.removeListener("end", t), x.removeListener("close", t), x.removeListener("finish", u), x.removeListener("end", h), x.removeListener("error", l), x.removeListener("close", i);
        };
      };
    }, { "../../../errors": 287 }], 297: [function(v, Q, $) {
      Q.exports = function() {
        throw new Error("Readable.from is not available in the browser");
      };
    }, {}], 298: [function(v, Q, $) {
      var m, g = v("../../../errors").codes, k = g.ERR_MISSING_ARGS, x = g.ERR_STREAM_DESTROYED;
      function e(d) {
        if (d)
          throw d;
      }
      function r(d, u, o, h) {
        h = function(p) {
          var c = !1;
          return function() {
            c || (c = !0, p.apply(void 0, arguments));
          };
        }(h);
        var l = !1;
        d.on("close", function() {
          l = !0;
        }), m === void 0 && (m = v("./end-of-stream")), m(d, { readable: u, writable: o }, function(p) {
          if (p)
            return h(p);
          l = !0, h();
        });
        var i = !1;
        return function(p) {
          if (!l && !i)
            return i = !0, function(c) {
              return c.setHeader && typeof c.abort == "function";
            }(d) ? d.abort() : typeof d.destroy == "function" ? d.destroy() : void h(p || new x("pipe"));
        };
      }
      function n(d) {
        d();
      }
      function s(d, u) {
        return d.pipe(u);
      }
      function t(d) {
        return d.length ? typeof d[d.length - 1] != "function" ? e : d.pop() : e;
      }
      Q.exports = function() {
        for (var d = arguments.length, u = new Array(d), o = 0; o < d; o++)
          u[o] = arguments[o];
        var h, l = t(u);
        if (Array.isArray(u[0]) && (u = u[0]), u.length < 2)
          throw new k("streams");
        var i = u.map(function(p, c) {
          var a = c < u.length - 1;
          return r(p, a, c > 0, function(y) {
            h || (h = y), y && i.forEach(n), a || (i.forEach(n), l(h));
          });
        });
        return u.reduce(s);
      };
    }, { "../../../errors": 287, "./end-of-stream": 296 }], 299: [function(v, Q, $) {
      var m = v("../../../errors").codes.ERR_INVALID_OPT_VALUE;
      Q.exports = { getHighWaterMark: function(g, k, x, e) {
        var r = function(n, s, t) {
          return n.highWaterMark != null ? n.highWaterMark : s ? n[t] : null;
        }(k, e, x);
        if (r != null) {
          if (!isFinite(r) || Math.floor(r) !== r || r < 0)
            throw new m(e ? x : "highWaterMark", r);
          return Math.floor(r);
        }
        return g.objectMode ? 16 : 16384;
      } };
    }, { "../../../errors": 287 }], 300: [function(v, Q, $) {
      Q.exports = v("events").EventEmitter;
    }, { events: 84 }], 301: [function(v, Q, $) {
      var m = v("safe-buffer").Buffer, g = m.isEncoding || function(o) {
        switch ((o = "" + o) && o.toLowerCase()) {
          case "hex":
          case "utf8":
          case "utf-8":
          case "ascii":
          case "binary":
          case "base64":
          case "ucs2":
          case "ucs-2":
          case "utf16le":
          case "utf-16le":
          case "raw":
            return !0;
          default:
            return !1;
        }
      };
      function k(o) {
        var h;
        switch (this.encoding = function(l) {
          var i = function(p) {
            if (!p)
              return "utf8";
            for (var c; ; )
              switch (p) {
                case "utf8":
                case "utf-8":
                  return "utf8";
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return "utf16le";
                case "latin1":
                case "binary":
                  return "latin1";
                case "base64":
                case "ascii":
                case "hex":
                  return p;
                default:
                  if (c)
                    return;
                  p = ("" + p).toLowerCase(), c = !0;
              }
          }(l);
          if (typeof i != "string" && (m.isEncoding === g || !g(l)))
            throw new Error("Unknown encoding: " + l);
          return i || l;
        }(o), this.encoding) {
          case "utf16le":
            this.text = r, this.end = n, h = 4;
            break;
          case "utf8":
            this.fillLast = e, h = 4;
            break;
          case "base64":
            this.text = s, this.end = t, h = 3;
            break;
          default:
            return this.write = d, void (this.end = u);
        }
        this.lastNeed = 0, this.lastTotal = 0, this.lastChar = m.allocUnsafe(h);
      }
      function x(o) {
        return o <= 127 ? 0 : o >> 5 == 6 ? 2 : o >> 4 == 14 ? 3 : o >> 3 == 30 ? 4 : o >> 6 == 2 ? -1 : -2;
      }
      function e(o) {
        var h = this.lastTotal - this.lastNeed, l = function(i, p, c) {
          if ((192 & p[0]) != 128)
            return i.lastNeed = 0, "\uFFFD";
          if (i.lastNeed > 1 && p.length > 1) {
            if ((192 & p[1]) != 128)
              return i.lastNeed = 1, "\uFFFD";
            if (i.lastNeed > 2 && p.length > 2 && (192 & p[2]) != 128)
              return i.lastNeed = 2, "\uFFFD";
          }
        }(this, o);
        return l !== void 0 ? l : this.lastNeed <= o.length ? (o.copy(this.lastChar, h, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (o.copy(this.lastChar, h, 0, o.length), void (this.lastNeed -= o.length));
      }
      function r(o, h) {
        if ((o.length - h) % 2 == 0) {
          var l = o.toString("utf16le", h);
          if (l) {
            var i = l.charCodeAt(l.length - 1);
            if (i >= 55296 && i <= 56319)
              return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = o[o.length - 2], this.lastChar[1] = o[o.length - 1], l.slice(0, -1);
          }
          return l;
        }
        return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = o[o.length - 1], o.toString("utf16le", h, o.length - 1);
      }
      function n(o) {
        var h = o && o.length ? this.write(o) : "";
        if (this.lastNeed) {
          var l = this.lastTotal - this.lastNeed;
          return h + this.lastChar.toString("utf16le", 0, l);
        }
        return h;
      }
      function s(o, h) {
        var l = (o.length - h) % 3;
        return l === 0 ? o.toString("base64", h) : (this.lastNeed = 3 - l, this.lastTotal = 3, l === 1 ? this.lastChar[0] = o[o.length - 1] : (this.lastChar[0] = o[o.length - 2], this.lastChar[1] = o[o.length - 1]), o.toString("base64", h, o.length - l));
      }
      function t(o) {
        var h = o && o.length ? this.write(o) : "";
        return this.lastNeed ? h + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : h;
      }
      function d(o) {
        return o.toString(this.encoding);
      }
      function u(o) {
        return o && o.length ? this.write(o) : "";
      }
      $.StringDecoder = k, k.prototype.write = function(o) {
        if (o.length === 0)
          return "";
        var h, l;
        if (this.lastNeed) {
          if ((h = this.fillLast(o)) === void 0)
            return "";
          l = this.lastNeed, this.lastNeed = 0;
        } else
          l = 0;
        return l < o.length ? h ? h + this.text(o, l) : this.text(o, l) : h || "";
      }, k.prototype.end = function(o) {
        var h = o && o.length ? this.write(o) : "";
        return this.lastNeed ? h + "\uFFFD" : h;
      }, k.prototype.text = function(o, h) {
        var l = function(p, c, a) {
          var y = c.length - 1;
          if (y < a)
            return 0;
          var f = x(c[y]);
          return f >= 0 ? (f > 0 && (p.lastNeed = f - 1), f) : --y < a || f === -2 ? 0 : (f = x(c[y])) >= 0 ? (f > 0 && (p.lastNeed = f - 2), f) : --y < a || f === -2 ? 0 : (f = x(c[y])) >= 0 ? (f > 0 && (f === 2 ? f = 0 : p.lastNeed = f - 3), f) : 0;
        }(this, o, h);
        if (!this.lastNeed)
          return o.toString("utf8", h);
        this.lastTotal = l;
        var i = o.length - (l - this.lastNeed);
        return o.copy(this.lastChar, 0, i), o.toString("utf8", h, i);
      }, k.prototype.fillLast = function(o) {
        if (this.lastNeed <= o.length)
          return o.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
        o.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, o.length), this.lastNeed -= o.length;
      };
    }, { "safe-buffer": 285 }], 302: [function(v, Q, $) {
      (function(m, g) {
        (function() {
          var k = v("assert"), x = v("debug")("stream-parser");
          Q.exports = function(l) {
            var i = l && typeof l._transform == "function", p = l && typeof l._write == "function";
            if (!i && !p)
              throw new Error("must pass a Writable or Transform stream in");
            x("extending Parser into stream"), l._bytes = r, l._skipBytes = n, i && (l._passthrough = s), i ? l._transform = d : l._write = t;
          };
          function e(l) {
            x("initializing parser stream"), l._parserBytesLeft = 0, l._parserBuffers = [], l._parserBuffered = 0, l._parserState = -1, l._parserCallback = null, typeof l.push == "function" && (l._parserOutput = l.push.bind(l)), l._parserInit = !0;
          }
          function r(l, i) {
            k(!this._parserCallback, 'there is already a "callback" set!'), k(isFinite(l) && l > 0, 'can only buffer a finite number of bytes > 0, got "' + l + '"'), this._parserInit || e(this), x("buffering %o bytes", l), this._parserBytesLeft = l, this._parserCallback = i, this._parserState = 0;
          }
          function n(l, i) {
            k(!this._parserCallback, 'there is already a "callback" set!'), k(l > 0, 'can only skip > 0 bytes, got "' + l + '"'), this._parserInit || e(this), x("skipping %o bytes", l), this._parserBytesLeft = l, this._parserCallback = i, this._parserState = 1;
          }
          function s(l, i) {
            k(!this._parserCallback, 'There is already a "callback" set!'), k(l > 0, 'can only pass through > 0 bytes, got "' + l + '"'), this._parserInit || e(this), x("passing through %o bytes", l), this._parserBytesLeft = l, this._parserCallback = i, this._parserState = 2;
          }
          function t(l, i, p) {
            this._parserInit || e(this), x("write(%o bytes)", l.length), typeof i == "function" && (p = i), o(this, l, null, p);
          }
          function d(l, i, p) {
            this._parserInit || e(this), x("transform(%o bytes)", l.length), typeof i != "function" && (i = this._parserOutput), o(this, l, i, p);
          }
          function u(l, i, p, c) {
            if (l._parserBytesLeft -= i.length, x("%o bytes left for stream piece", l._parserBytesLeft), l._parserState === 0 ? (l._parserBuffers.push(i), l._parserBuffered += i.length) : l._parserState === 2 && p(i), l._parserBytesLeft !== 0)
              return c;
            var a = l._parserCallback;
            if (a && l._parserState === 0 && l._parserBuffers.length > 1 && (i = g.concat(l._parserBuffers, l._parserBuffered)), l._parserState !== 0 && (i = null), l._parserCallback = null, l._parserBuffered = 0, l._parserState = -1, l._parserBuffers.splice(0), a) {
              var y = [];
              i && y.push(i), p && y.push(p);
              var f = a.length > y.length;
              f && y.push(h(c));
              var _ = a.apply(l, y);
              if (!f || c === _)
                return c;
            }
          }
          var o = h(function l(i, p, c, a) {
            return i._parserBytesLeft <= 0 ? a(new Error("got data but not currently parsing anything")) : p.length <= i._parserBytesLeft ? function() {
              return u(i, p, c, a);
            } : function() {
              var y = p.slice(0, i._parserBytesLeft);
              return u(i, y, c, function(f) {
                return f ? a(f) : p.length > y.length ? function() {
                  return l(i, p.slice(y.length), c, a);
                } : void 0;
              });
            };
          });
          function h(l) {
            return function() {
              for (var i = l.apply(this, arguments); typeof i == "function"; )
                i = i();
              return i;
            };
          }
        }).call(this);
      }).call(this, v("_process"), v("buffer").Buffer);
    }, { _process: 278, assert: 75, buffer: 85, debug: 303 }], 303: [function(v, Q, $) {
      (function(m) {
        (function() {
          function g() {
            var k;
            try {
              k = $.storage.debug;
            } catch {
            }
            return !k && m !== void 0 && "env" in m && (k = m.env.DEBUG), k;
          }
          ($ = Q.exports = v("./debug")).log = function() {
            return typeof console == "object" && console.log && Function.prototype.apply.call(console.log, console, arguments);
          }, $.formatArgs = function(k) {
            var x = this.useColors;
            if (k[0] = (x ? "%c" : "") + this.namespace + (x ? " %c" : " ") + k[0] + (x ? "%c " : " ") + "+" + $.humanize(this.diff), !!x) {
              var e = "color: " + this.color;
              k.splice(1, 0, e, "color: inherit");
              var r = 0, n = 0;
              k[0].replace(/%[a-zA-Z%]/g, function(s) {
                s !== "%%" && (r++, s === "%c" && (n = r));
              }), k.splice(n, 0, e);
            }
          }, $.save = function(k) {
            try {
              k == null ? $.storage.removeItem("debug") : $.storage.debug = k;
            } catch {
            }
          }, $.load = g, $.useColors = function() {
            return typeof window < "u" && window.process && window.process.type === "renderer" ? !0 : typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
          }, $.storage = typeof chrome < "u" && chrome.storage !== void 0 ? chrome.storage.local : function() {
            try {
              return window.localStorage;
            } catch {
            }
          }(), $.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], $.formatters.j = function(k) {
            try {
              return JSON.stringify(k);
            } catch (x) {
              return "[UnexpectedJSONParseError]: " + x.message;
            }
          }, $.enable(g());
        }).call(this);
      }).call(this, v("_process"));
    }, { "./debug": 304, _process: 278 }], 304: [function(v, Q, $) {
      var m;
      function g(k) {
        function x() {
          if (x.enabled) {
            var e = x, r = +new Date(), n = r - (m || r);
            e.diff = n, e.prev = m, e.curr = r, m = r;
            for (var s = new Array(arguments.length), t = 0; t < s.length; t++)
              s[t] = arguments[t];
            s[0] = $.coerce(s[0]), typeof s[0] != "string" && s.unshift("%O");
            var d = 0;
            s[0] = s[0].replace(/%([a-zA-Z%])/g, function(o, h) {
              if (o === "%%")
                return o;
              d++;
              var l = $.formatters[h];
              if (typeof l == "function") {
                var i = s[d];
                o = l.call(e, i), s.splice(d, 1), d--;
              }
              return o;
            }), $.formatArgs.call(e, s);
            var u = x.log || $.log || console.log.bind(console);
            u.apply(e, s);
          }
        }
        return x.namespace = k, x.enabled = $.enabled(k), x.useColors = $.useColors(), x.color = function(e) {
          var r, n = 0;
          for (r in e)
            n = (n << 5) - n + e.charCodeAt(r), n |= 0;
          return $.colors[Math.abs(n) % $.colors.length];
        }(k), typeof $.init == "function" && $.init(x), x;
      }
      ($ = Q.exports = g.debug = g.default = g).coerce = function(k) {
        return k instanceof Error ? k.stack || k.message : k;
      }, $.disable = function() {
        $.enable("");
      }, $.enable = function(k) {
        $.save(k), $.names = [], $.skips = [];
        for (var x = (typeof k == "string" ? k : "").split(/[\s,]+/), e = x.length, r = 0; r < e; r++)
          x[r] && ((k = x[r].replace(/\*/g, ".*?"))[0] === "-" ? $.skips.push(new RegExp("^" + k.substr(1) + "$")) : $.names.push(new RegExp("^" + k + "$")));
      }, $.enabled = function(k) {
        var x, e;
        for (x = 0, e = $.skips.length; x < e; x++)
          if ($.skips[x].test(k))
            return !1;
        for (x = 0, e = $.names.length; x < e; x++)
          if ($.names[x].test(k))
            return !0;
        return !1;
      }, $.humanize = v("ms"), $.names = [], $.skips = [], $.formatters = {};
    }, { ms: 305 }], 305: [function(v, Q, $) {
      var m = 1e3, g = 6e4, k = 60 * g, x = 24 * k;
      function e(r, n, s) {
        if (!(r < n))
          return r < 1.5 * n ? Math.floor(r / n) + " " + s : Math.ceil(r / n) + " " + s + "s";
      }
      Q.exports = function(r, n) {
        n = n || {};
        var s, t = typeof r;
        if (t === "string" && r.length > 0)
          return function(d) {
            if (!((d = String(d)).length > 100)) {
              var u = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(d);
              if (!!u) {
                var o = parseFloat(u[1]);
                switch ((u[2] || "ms").toLowerCase()) {
                  case "years":
                  case "year":
                  case "yrs":
                  case "yr":
                  case "y":
                    return 315576e5 * o;
                  case "days":
                  case "day":
                  case "d":
                    return o * x;
                  case "hours":
                  case "hour":
                  case "hrs":
                  case "hr":
                  case "h":
                    return o * k;
                  case "minutes":
                  case "minute":
                  case "mins":
                  case "min":
                  case "m":
                    return o * g;
                  case "seconds":
                  case "second":
                  case "secs":
                  case "sec":
                  case "s":
                    return o * m;
                  case "milliseconds":
                  case "millisecond":
                  case "msecs":
                  case "msec":
                  case "ms":
                    return o;
                  default:
                    return;
                }
              }
            }
          }(r);
        if (t === "number" && isNaN(r) === !1)
          return n.long ? e(s = r, x, "day") || e(s, k, "hour") || e(s, g, "minute") || e(s, m, "second") || s + " ms" : function(d) {
            return d >= x ? Math.round(d / x) + "d" : d >= k ? Math.round(d / k) + "h" : d >= g ? Math.round(d / g) + "m" : d >= m ? Math.round(d / m) + "s" : d + "ms";
          }(r);
        throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(r));
      };
    }, {}], 306: [function(v, Q, $) {
      var m = v("parenthesis");
      Q.exports = function(g, k, x) {
        if (g == null)
          throw Error("First argument should be a string");
        if (k == null)
          throw Error("Separator should be a string or a RegExp");
        x ? (typeof x == "string" || Array.isArray(x)) && (x = { ignore: x }) : x = {}, x.escape == null && (x.escape = !0), x.ignore == null ? x.ignore = ["[]", "()", "{}", "<>", '""', "''", "``", "\u201C\u201D", "\xAB\xBB"] : (typeof x.ignore == "string" && (x.ignore = [x.ignore]), x.ignore = x.ignore.map(function(u) {
          return u.length === 1 && (u += u), u;
        }));
        var e = m.parse(g, { flat: !0, brackets: x.ignore }), r = e[0].split(k);
        if (x.escape) {
          for (var n = [], s = 0; s < r.length; s++) {
            var t = r[s], d = r[s + 1];
            t[t.length - 1] === "\\" && t[t.length - 2] !== "\\" ? (n.push(t + k + d), s++) : n.push(t);
          }
          r = n;
        }
        for (s = 0; s < r.length; s++)
          e[0] = r[s], r[s] = m.stringify(e, { flat: !0 });
        return r;
      };
    }, { parenthesis: 248 }], 307: [function(v, Q, $) {
      Q.exports = function(m) {
        for (var g = m.length, k = new Array(g), x = new Array(g), e = new Array(g), r = new Array(g), n = new Array(g), s = new Array(g), t = 0; t < g; ++t)
          k[t] = -1, x[t] = 0, e[t] = !1, r[t] = 0, n[t] = -1, s[t] = [];
        var d, u = 0, o = [], h = [];
        function l(c) {
          var a = [c], y = [c];
          for (k[c] = x[c] = u, e[c] = !0, u += 1; y.length > 0; ) {
            c = y[y.length - 1];
            var f = m[c];
            if (r[c] < f.length) {
              for (var _ = r[c]; _ < f.length; ++_) {
                var b = f[_];
                if (k[b] < 0) {
                  k[b] = x[b] = u, e[b] = !0, u += 1, a.push(b), y.push(b);
                  break;
                }
                e[b] && (x[c] = 0 | Math.min(x[c], x[b])), n[b] >= 0 && s[c].push(n[b]);
              }
              r[c] = _;
            } else {
              if (x[c] === k[c]) {
                var w = [], T = [], L = 0;
                for (_ = a.length - 1; _ >= 0; --_) {
                  var A = a[_];
                  if (e[A] = !1, w.push(A), T.push(s[A]), L += s[A].length, n[A] = o.length, A === c) {
                    a.length = _;
                    break;
                  }
                }
                o.push(w);
                var I = new Array(L);
                for (_ = 0; _ < T.length; _++)
                  for (var P = 0; P < T[_].length; P++)
                    I[--L] = T[_][P];
                h.push(I);
              }
              y.pop();
            }
          }
        }
        for (t = 0; t < g; ++t)
          k[t] < 0 && l(t);
        for (t = 0; t < h.length; t++) {
          var i = h[t];
          if (i.length !== 0) {
            i.sort(function(c, a) {
              return c - a;
            }), d = [i[0]];
            for (var p = 1; p < i.length; p++)
              i[p] !== i[p - 1] && d.push(i[p]);
            h[t] = d;
          }
        }
        return { components: o, adjacencyList: h };
      };
    }, {}], 308: [function(v, Q, $) {
      Object.defineProperty($, "__esModule", { value: !0 });
      var m = function(r, n) {
        if (Array.isArray(r))
          return r;
        if (Symbol.iterator in Object(r))
          return function(s, t) {
            var d = [], u = !0, o = !1, h = void 0;
            try {
              for (var l, i = s[Symbol.iterator](); !(u = (l = i.next()).done) && (d.push(l.value), !t || d.length !== t); u = !0)
                ;
            } catch (p) {
              o = !0, h = p;
            } finally {
              try {
                !u && i.return && i.return();
              } finally {
                if (o)
                  throw h;
              }
            }
            return d;
          }(r, n);
        throw new TypeError("Invalid attempt to destructure non-iterable instance");
      }, g = 2 * Math.PI, k = function(r, n, s, t, d, u, o) {
        var h = r.x, l = r.y;
        return { x: t * (h *= n) - d * (l *= s) + u, y: d * h + t * l + o };
      }, x = function(r, n) {
        var s = n === 1.5707963267948966 ? 0.551915024494 : n === -1.5707963267948966 ? -0.551915024494 : 1.3333333333333333 * Math.tan(n / 4), t = Math.cos(r), d = Math.sin(r), u = Math.cos(r + n), o = Math.sin(r + n);
        return [{ x: t - d * s, y: d + t * s }, { x: u + o * s, y: o - u * s }, { x: u, y: o }];
      }, e = function(r, n, s, t) {
        var d = r * s + n * t;
        return d > 1 && (d = 1), d < -1 && (d = -1), (r * t - n * s < 0 ? -1 : 1) * Math.acos(d);
      };
      $.default = function(r) {
        var n = r.px, s = r.py, t = r.cx, d = r.cy, u = r.rx, o = r.ry, h = r.xAxisRotation, l = h === void 0 ? 0 : h, i = r.largeArcFlag, p = i === void 0 ? 0 : i, c = r.sweepFlag, a = c === void 0 ? 0 : c, y = [];
        if (u === 0 || o === 0)
          return [];
        var f = Math.sin(l * g / 360), _ = Math.cos(l * g / 360), b = _ * (n - t) / 2 + f * (s - d) / 2, w = -f * (n - t) / 2 + _ * (s - d) / 2;
        if (b === 0 && w === 0)
          return [];
        u = Math.abs(u), o = Math.abs(o);
        var T = Math.pow(b, 2) / Math.pow(u, 2) + Math.pow(w, 2) / Math.pow(o, 2);
        T > 1 && (u *= Math.sqrt(T), o *= Math.sqrt(T));
        var L = function(H, Y, J, W, Z, re, V, B, U, ee, N, K) {
          var X = Math.pow(Z, 2), te = Math.pow(re, 2), ie = Math.pow(N, 2), le = Math.pow(K, 2), oe = X * te - X * le - te * ie;
          oe < 0 && (oe = 0), oe /= X * le + te * ie;
          var ve = (oe = Math.sqrt(oe) * (V === B ? -1 : 1)) * Z / re * K, ue = oe * -re / Z * N, ye = ee * ve - U * ue + (H + J) / 2, Ae = U * ve + ee * ue + (Y + W) / 2, pe = (N - ve) / Z, ge = (K - ue) / re, we = (-N - ve) / Z, se = (-K - ue) / re, de = e(1, 0, pe, ge), Te = e(pe, ge, we, se);
          return B === 0 && Te > 0 && (Te -= g), B === 1 && Te < 0 && (Te += g), [ye, Ae, de, Te];
        }(n, s, t, d, u, o, p, a, f, _, b, w), A = m(L, 4), I = A[0], P = A[1], S = A[2], E = A[3], R = Math.abs(E) / (g / 4);
        Math.abs(1 - R) < 1e-7 && (R = 1);
        var z = Math.max(Math.ceil(R), 1);
        E /= z;
        for (var j = 0; j < z; j++)
          y.push(x(S, E)), S += E;
        return y.map(function(H) {
          var Y = k(H[0], u, o, _, f, I, P), J = Y.x, W = Y.y, Z = k(H[1], u, o, _, f, I, P), re = Z.x, V = Z.y, B = k(H[2], u, o, _, f, I, P);
          return { x1: J, y1: W, x2: re, y2: V, x: B.x, y: B.y };
        });
      }, Q.exports = $.default;
    }, {}], 309: [function(v, Q, $) {
      var m = v("parse-svg-path"), g = v("abs-svg-path"), k = v("normalize-svg-path"), x = v("is-svg-path"), e = v("assert");
      Q.exports = function(r) {
        if (Array.isArray(r) && r.length === 1 && typeof r[0] == "string" && (r = r[0]), typeof r == "string" && (e(x(r), "String is not an SVG path."), r = m(r)), e(Array.isArray(r), "Argument should be a string or an array of path segments."), r = g(r), !(r = k(r)).length)
          return [0, 0, 0, 0];
        for (var n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], s = 0, t = r.length; s < t; s++)
          for (var d = r[s].slice(1), u = 0; u < d.length; u += 2)
            d[u + 0] < n[0] && (n[0] = d[u + 0]), d[u + 1] < n[1] && (n[1] = d[u + 1]), d[u + 0] > n[2] && (n[2] = d[u + 0]), d[u + 1] > n[3] && (n[3] = d[u + 1]);
        return n;
      };
    }, { "abs-svg-path": 70, assert: 75, "is-svg-path": 238, "normalize-svg-path": 310, "parse-svg-path": 250 }], 310: [function(v, Q, $) {
      Q.exports = function(x) {
        for (var e, r = [], n = 0, s = 0, t = 0, d = 0, u = null, o = null, h = 0, l = 0, i = 0, p = x.length; i < p; i++) {
          var c = x[i], a = c[0];
          switch (a) {
            case "M":
              t = c[1], d = c[2];
              break;
            case "A":
              var y = m({ px: h, py: l, cx: c[6], cy: c[7], rx: c[1], ry: c[2], xAxisRotation: c[3], largeArcFlag: c[4], sweepFlag: c[5] });
              if (!y.length)
                continue;
              for (var f, _ = 0; _ < y.length; _++)
                f = y[_], c = ["C", f.x1, f.y1, f.x2, f.y2, f.x, f.y], _ < y.length - 1 && r.push(c);
              break;
            case "S":
              var b = h, w = l;
              e != "C" && e != "S" || (b += b - n, w += w - s), c = ["C", b, w, c[1], c[2], c[3], c[4]];
              break;
            case "T":
              e == "Q" || e == "T" ? (u = 2 * h - u, o = 2 * l - o) : (u = h, o = l), c = k(h, l, u, o, c[1], c[2]);
              break;
            case "Q":
              u = c[1], o = c[2], c = k(h, l, c[1], c[2], c[3], c[4]);
              break;
            case "L":
              c = g(h, l, c[1], c[2]);
              break;
            case "H":
              c = g(h, l, c[1], l);
              break;
            case "V":
              c = g(h, l, h, c[1]);
              break;
            case "Z":
              c = g(h, l, t, d);
          }
          e = a, h = c[c.length - 2], l = c[c.length - 1], c.length > 4 ? (n = c[c.length - 4], s = c[c.length - 3]) : (n = h, s = l), r.push(c);
        }
        return r;
      };
      var m = v("svg-arc-to-cubic-bezier");
      function g(x, e, r, n) {
        return ["C", x, e, r, n, r, n];
      }
      function k(x, e, r, n, s, t) {
        return ["C", x / 3 + 2 / 3 * r, e / 3 + 2 / 3 * n, s / 3 + 2 / 3 * r, t / 3 + 2 / 3 * n, s, t];
      }
    }, { "svg-arc-to-cubic-bezier": 308 }], 311: [function(v, Q, $) {
      var m, g = v("svg-path-bounds"), k = v("parse-svg-path"), x = v("draw-svg-path"), e = v("is-svg-path"), r = v("bitmap-sdf"), n = document.createElement("canvas"), s = n.getContext("2d");
      Q.exports = function(t, d) {
        if (!e(t))
          throw Error("Argument should be valid svg path string");
        d || (d = {});
        var u, o;
        d.shape ? (u = d.shape[0], o = d.shape[1]) : (u = n.width = d.w || d.width || 200, o = n.height = d.h || d.height || 200);
        var h = Math.min(u, o), l = d.stroke || 0, i = d.viewbox || d.viewBox || g(t), p = [u / (i[2] - i[0]), o / (i[3] - i[1])], c = Math.min(p[0] || 0, p[1] || 0) / 2;
        if (s.fillStyle = "black", s.fillRect(0, 0, u, o), s.fillStyle = "white", l && (typeof l != "number" && (l = 1), s.strokeStyle = l > 0 ? "white" : "black", s.lineWidth = Math.abs(l)), s.translate(0.5 * u, 0.5 * o), s.scale(c, c), function() {
          if (m != null)
            return m;
          var f = document.createElement("canvas").getContext("2d");
          if (f.canvas.width = f.canvas.height = 1, !window.Path2D)
            return m = !1;
          var _ = new Path2D("M0,0h1v1h-1v-1Z");
          f.fillStyle = "black", f.fill(_);
          var b = f.getImageData(0, 0, 1, 1);
          return m = b && b.data && b.data[3] === 255;
        }()) {
          var a = new Path2D(t);
          s.fill(a), l && s.stroke(a);
        } else {
          var y = k(t);
          x(s, y), s.fill(), l && s.stroke();
        }
        return s.setTransform(1, 0, 0, 1, 0, 0), r(s, { cutoff: d.cutoff != null ? d.cutoff : 0.5, radius: d.radius != null ? d.radius : 0.5 * h });
      };
    }, { "bitmap-sdf": 82, "draw-svg-path": 126, "is-svg-path": 238, "parse-svg-path": 250, "svg-path-bounds": 309 }], 312: [function(v, Q, $) {
      (function(m, g) {
        (function() {
          var k = v("process/browser.js").nextTick, x = Function.prototype.apply, e = Array.prototype.slice, r = {}, n = 0;
          function s(t, d) {
            this._id = t, this._clearFn = d;
          }
          $.setTimeout = function() {
            return new s(x.call(setTimeout, window, arguments), clearTimeout);
          }, $.setInterval = function() {
            return new s(x.call(setInterval, window, arguments), clearInterval);
          }, $.clearTimeout = $.clearInterval = function(t) {
            t.close();
          }, s.prototype.unref = s.prototype.ref = function() {
          }, s.prototype.close = function() {
            this._clearFn.call(window, this._id);
          }, $.enroll = function(t, d) {
            clearTimeout(t._idleTimeoutId), t._idleTimeout = d;
          }, $.unenroll = function(t) {
            clearTimeout(t._idleTimeoutId), t._idleTimeout = -1;
          }, $._unrefActive = $.active = function(t) {
            clearTimeout(t._idleTimeoutId);
            var d = t._idleTimeout;
            d >= 0 && (t._idleTimeoutId = setTimeout(function() {
              t._onTimeout && t._onTimeout();
            }, d));
          }, $.setImmediate = typeof m == "function" ? m : function(t) {
            var d = n++, u = !(arguments.length < 2) && e.call(arguments, 1);
            return r[d] = !0, k(function() {
              r[d] && (u ? t.apply(null, u) : t.call(null), $.clearImmediate(d));
            }), d;
          }, $.clearImmediate = typeof g == "function" ? g : function(t) {
            delete r[t];
          };
        }).call(this);
      }).call(this, v("timers").setImmediate, v("timers").clearImmediate);
    }, { "process/browser.js": 278, timers: 312 }], 313: [function(v, Q, $) {
      (function(m) {
        var g = /^\s+/, k = /\s+$/, x = 0, e = m.round, r = m.min, n = m.max, s = m.random;
        function t(U, ee) {
          if (ee = ee || {}, (U = U || "") instanceof t)
            return U;
          if (!(this instanceof t))
            return new t(U, ee);
          var N = function(K) {
            var X = { r: 0, g: 0, b: 0 }, te = 1, ie = null, le = null, oe = null, ve = !1, ue = !1;
            typeof K == "string" && (K = function(ge) {
              ge = ge.replace(g, "").replace(k, "").toLowerCase();
              var we, se = !1;
              if (I[ge])
                ge = I[ge], se = !0;
              else if (ge == "transparent")
                return { r: 0, g: 0, b: 0, a: 0, format: "name" };
              return (we = V.rgb.exec(ge)) ? { r: we[1], g: we[2], b: we[3] } : (we = V.rgba.exec(ge)) ? { r: we[1], g: we[2], b: we[3], a: we[4] } : (we = V.hsl.exec(ge)) ? { h: we[1], s: we[2], l: we[3] } : (we = V.hsla.exec(ge)) ? { h: we[1], s: we[2], l: we[3], a: we[4] } : (we = V.hsv.exec(ge)) ? { h: we[1], s: we[2], v: we[3] } : (we = V.hsva.exec(ge)) ? { h: we[1], s: we[2], v: we[3], a: we[4] } : (we = V.hex8.exec(ge)) ? { r: z(we[1]), g: z(we[2]), b: z(we[3]), a: J(we[4]), format: se ? "name" : "hex8" } : (we = V.hex6.exec(ge)) ? { r: z(we[1]), g: z(we[2]), b: z(we[3]), format: se ? "name" : "hex" } : (we = V.hex4.exec(ge)) ? { r: z(we[1] + "" + we[1]), g: z(we[2] + "" + we[2]), b: z(we[3] + "" + we[3]), a: J(we[4] + "" + we[4]), format: se ? "name" : "hex8" } : (we = V.hex3.exec(ge)) ? { r: z(we[1] + "" + we[1]), g: z(we[2] + "" + we[2]), b: z(we[3] + "" + we[3]), format: se ? "name" : "hex" } : !1;
            }(K)), typeof K == "object" && (B(K.r) && B(K.g) && B(K.b) ? (ye = K.r, Ae = K.g, pe = K.b, X = { r: 255 * E(ye, 255), g: 255 * E(Ae, 255), b: 255 * E(pe, 255) }, ve = !0, ue = String(K.r).substr(-1) === "%" ? "prgb" : "rgb") : B(K.h) && B(K.s) && B(K.v) ? (ie = H(K.s), le = H(K.v), X = function(ge, we, se) {
              ge = 6 * E(ge, 360), we = E(we, 100), se = E(se, 100);
              var de = m.floor(ge), Te = ge - de, Ee = se * (1 - we), Me = se * (1 - Te * we), ze = se * (1 - (1 - Te) * we), Ie = de % 6;
              return { r: 255 * [se, Me, Ee, Ee, ze, se][Ie], g: 255 * [ze, se, se, Me, Ee, Ee][Ie], b: 255 * [Ee, Ee, ze, se, se, Me][Ie] };
            }(K.h, ie, le), ve = !0, ue = "hsv") : B(K.h) && B(K.s) && B(K.l) && (ie = H(K.s), oe = H(K.l), X = function(ge, we, se) {
              var de, Te, Ee;
              function Me(Oe, Ze, Fe) {
                return Fe < 0 && (Fe += 1), Fe > 1 && (Fe -= 1), Fe < 1 / 6 ? Oe + 6 * (Ze - Oe) * Fe : Fe < 0.5 ? Ze : Fe < 2 / 3 ? Oe + (Ze - Oe) * (2 / 3 - Fe) * 6 : Oe;
              }
              if (ge = E(ge, 360), we = E(we, 100), se = E(se, 100), we === 0)
                de = Te = Ee = se;
              else {
                var ze = se < 0.5 ? se * (1 + we) : se + we - se * we, Ie = 2 * se - ze;
                de = Me(Ie, ze, ge + 1 / 3), Te = Me(Ie, ze, ge), Ee = Me(Ie, ze, ge - 1 / 3);
              }
              return { r: 255 * de, g: 255 * Te, b: 255 * Ee };
            }(K.h, ie, oe), ve = !0, ue = "hsl"), K.hasOwnProperty("a") && (te = K.a));
            var ye, Ae, pe;
            return te = S(te), { ok: ve, format: K.format || ue, r: r(255, n(X.r, 0)), g: r(255, n(X.g, 0)), b: r(255, n(X.b, 0)), a: te };
          }(U);
          this._originalInput = U, this._r = N.r, this._g = N.g, this._b = N.b, this._a = N.a, this._roundA = e(100 * this._a) / 100, this._format = ee.format || N.format, this._gradientType = ee.gradientType, this._r < 1 && (this._r = e(this._r)), this._g < 1 && (this._g = e(this._g)), this._b < 1 && (this._b = e(this._b)), this._ok = N.ok, this._tc_id = x++;
        }
        function d(U, ee, N) {
          U = E(U, 255), ee = E(ee, 255), N = E(N, 255);
          var K, X, te = n(U, ee, N), ie = r(U, ee, N), le = (te + ie) / 2;
          if (te == ie)
            K = X = 0;
          else {
            var oe = te - ie;
            switch (X = le > 0.5 ? oe / (2 - te - ie) : oe / (te + ie), te) {
              case U:
                K = (ee - N) / oe + (ee < N ? 6 : 0);
                break;
              case ee:
                K = (N - U) / oe + 2;
                break;
              case N:
                K = (U - ee) / oe + 4;
            }
            K /= 6;
          }
          return { h: K, s: X, l: le };
        }
        function u(U, ee, N) {
          U = E(U, 255), ee = E(ee, 255), N = E(N, 255);
          var K, X, te = n(U, ee, N), ie = r(U, ee, N), le = te, oe = te - ie;
          if (X = te === 0 ? 0 : oe / te, te == ie)
            K = 0;
          else {
            switch (te) {
              case U:
                K = (ee - N) / oe + (ee < N ? 6 : 0);
                break;
              case ee:
                K = (N - U) / oe + 2;
                break;
              case N:
                K = (U - ee) / oe + 4;
            }
            K /= 6;
          }
          return { h: K, s: X, v: le };
        }
        function o(U, ee, N, K) {
          var X = [j(e(U).toString(16)), j(e(ee).toString(16)), j(e(N).toString(16))];
          return K && X[0].charAt(0) == X[0].charAt(1) && X[1].charAt(0) == X[1].charAt(1) && X[2].charAt(0) == X[2].charAt(1) ? X[0].charAt(0) + X[1].charAt(0) + X[2].charAt(0) : X.join("");
        }
        function h(U, ee, N, K) {
          return [j(Y(K)), j(e(U).toString(16)), j(e(ee).toString(16)), j(e(N).toString(16))].join("");
        }
        function l(U, ee) {
          ee = ee === 0 ? 0 : ee || 10;
          var N = t(U).toHsl();
          return N.s -= ee / 100, N.s = R(N.s), t(N);
        }
        function i(U, ee) {
          ee = ee === 0 ? 0 : ee || 10;
          var N = t(U).toHsl();
          return N.s += ee / 100, N.s = R(N.s), t(N);
        }
        function p(U) {
          return t(U).desaturate(100);
        }
        function c(U, ee) {
          ee = ee === 0 ? 0 : ee || 10;
          var N = t(U).toHsl();
          return N.l += ee / 100, N.l = R(N.l), t(N);
        }
        function a(U, ee) {
          ee = ee === 0 ? 0 : ee || 10;
          var N = t(U).toRgb();
          return N.r = n(0, r(255, N.r - e(-ee / 100 * 255))), N.g = n(0, r(255, N.g - e(-ee / 100 * 255))), N.b = n(0, r(255, N.b - e(-ee / 100 * 255))), t(N);
        }
        function y(U, ee) {
          ee = ee === 0 ? 0 : ee || 10;
          var N = t(U).toHsl();
          return N.l -= ee / 100, N.l = R(N.l), t(N);
        }
        function f(U, ee) {
          var N = t(U).toHsl(), K = (N.h + ee) % 360;
          return N.h = K < 0 ? 360 + K : K, t(N);
        }
        function _(U) {
          var ee = t(U).toHsl();
          return ee.h = (ee.h + 180) % 360, t(ee);
        }
        function b(U) {
          var ee = t(U).toHsl(), N = ee.h;
          return [t(U), t({ h: (N + 120) % 360, s: ee.s, l: ee.l }), t({ h: (N + 240) % 360, s: ee.s, l: ee.l })];
        }
        function w(U) {
          var ee = t(U).toHsl(), N = ee.h;
          return [t(U), t({ h: (N + 90) % 360, s: ee.s, l: ee.l }), t({ h: (N + 180) % 360, s: ee.s, l: ee.l }), t({ h: (N + 270) % 360, s: ee.s, l: ee.l })];
        }
        function T(U) {
          var ee = t(U).toHsl(), N = ee.h;
          return [t(U), t({ h: (N + 72) % 360, s: ee.s, l: ee.l }), t({ h: (N + 216) % 360, s: ee.s, l: ee.l })];
        }
        function L(U, ee, N) {
          ee = ee || 6, N = N || 30;
          var K = t(U).toHsl(), X = 360 / N, te = [t(U)];
          for (K.h = (K.h - (X * ee >> 1) + 720) % 360; --ee; )
            K.h = (K.h + X) % 360, te.push(t(K));
          return te;
        }
        function A(U, ee) {
          ee = ee || 6;
          for (var N = t(U).toHsv(), K = N.h, X = N.s, te = N.v, ie = [], le = 1 / ee; ee--; )
            ie.push(t({ h: K, s: X, v: te })), te = (te + le) % 1;
          return ie;
        }
        t.prototype = { isDark: function() {
          return this.getBrightness() < 128;
        }, isLight: function() {
          return !this.isDark();
        }, isValid: function() {
          return this._ok;
        }, getOriginalInput: function() {
          return this._originalInput;
        }, getFormat: function() {
          return this._format;
        }, getAlpha: function() {
          return this._a;
        }, getBrightness: function() {
          var U = this.toRgb();
          return (299 * U.r + 587 * U.g + 114 * U.b) / 1e3;
        }, getLuminance: function() {
          var U, ee, N, K = this.toRgb();
          return U = K.r / 255, ee = K.g / 255, N = K.b / 255, 0.2126 * (U <= 0.03928 ? U / 12.92 : m.pow((U + 0.055) / 1.055, 2.4)) + 0.7152 * (ee <= 0.03928 ? ee / 12.92 : m.pow((ee + 0.055) / 1.055, 2.4)) + 0.0722 * (N <= 0.03928 ? N / 12.92 : m.pow((N + 0.055) / 1.055, 2.4));
        }, setAlpha: function(U) {
          return this._a = S(U), this._roundA = e(100 * this._a) / 100, this;
        }, toHsv: function() {
          var U = u(this._r, this._g, this._b);
          return { h: 360 * U.h, s: U.s, v: U.v, a: this._a };
        }, toHsvString: function() {
          var U = u(this._r, this._g, this._b), ee = e(360 * U.h), N = e(100 * U.s), K = e(100 * U.v);
          return this._a == 1 ? "hsv(" + ee + ", " + N + "%, " + K + "%)" : "hsva(" + ee + ", " + N + "%, " + K + "%, " + this._roundA + ")";
        }, toHsl: function() {
          var U = d(this._r, this._g, this._b);
          return { h: 360 * U.h, s: U.s, l: U.l, a: this._a };
        }, toHslString: function() {
          var U = d(this._r, this._g, this._b), ee = e(360 * U.h), N = e(100 * U.s), K = e(100 * U.l);
          return this._a == 1 ? "hsl(" + ee + ", " + N + "%, " + K + "%)" : "hsla(" + ee + ", " + N + "%, " + K + "%, " + this._roundA + ")";
        }, toHex: function(U) {
          return o(this._r, this._g, this._b, U);
        }, toHexString: function(U) {
          return "#" + this.toHex(U);
        }, toHex8: function(U) {
          return function(ee, N, K, X, te) {
            var ie = [j(e(ee).toString(16)), j(e(N).toString(16)), j(e(K).toString(16)), j(Y(X))];
            return te && ie[0].charAt(0) == ie[0].charAt(1) && ie[1].charAt(0) == ie[1].charAt(1) && ie[2].charAt(0) == ie[2].charAt(1) && ie[3].charAt(0) == ie[3].charAt(1) ? ie[0].charAt(0) + ie[1].charAt(0) + ie[2].charAt(0) + ie[3].charAt(0) : ie.join("");
          }(this._r, this._g, this._b, this._a, U);
        }, toHex8String: function(U) {
          return "#" + this.toHex8(U);
        }, toRgb: function() {
          return { r: e(this._r), g: e(this._g), b: e(this._b), a: this._a };
        }, toRgbString: function() {
          return this._a == 1 ? "rgb(" + e(this._r) + ", " + e(this._g) + ", " + e(this._b) + ")" : "rgba(" + e(this._r) + ", " + e(this._g) + ", " + e(this._b) + ", " + this._roundA + ")";
        }, toPercentageRgb: function() {
          return { r: e(100 * E(this._r, 255)) + "%", g: e(100 * E(this._g, 255)) + "%", b: e(100 * E(this._b, 255)) + "%", a: this._a };
        }, toPercentageRgbString: function() {
          return this._a == 1 ? "rgb(" + e(100 * E(this._r, 255)) + "%, " + e(100 * E(this._g, 255)) + "%, " + e(100 * E(this._b, 255)) + "%)" : "rgba(" + e(100 * E(this._r, 255)) + "%, " + e(100 * E(this._g, 255)) + "%, " + e(100 * E(this._b, 255)) + "%, " + this._roundA + ")";
        }, toName: function() {
          return this._a === 0 ? "transparent" : !(this._a < 1) && (P[o(this._r, this._g, this._b, !0)] || !1);
        }, toFilter: function(U) {
          var ee = "#" + h(this._r, this._g, this._b, this._a), N = ee, K = this._gradientType ? "GradientType = 1, " : "";
          if (U) {
            var X = t(U);
            N = "#" + h(X._r, X._g, X._b, X._a);
          }
          return "progid:DXImageTransform.Microsoft.gradient(" + K + "startColorstr=" + ee + ",endColorstr=" + N + ")";
        }, toString: function(U) {
          var ee = !!U;
          U = U || this._format;
          var N = !1, K = this._a < 1 && this._a >= 0;
          return ee || !K || U !== "hex" && U !== "hex6" && U !== "hex3" && U !== "hex4" && U !== "hex8" && U !== "name" ? (U === "rgb" && (N = this.toRgbString()), U === "prgb" && (N = this.toPercentageRgbString()), U !== "hex" && U !== "hex6" || (N = this.toHexString()), U === "hex3" && (N = this.toHexString(!0)), U === "hex4" && (N = this.toHex8String(!0)), U === "hex8" && (N = this.toHex8String()), U === "name" && (N = this.toName()), U === "hsl" && (N = this.toHslString()), U === "hsv" && (N = this.toHsvString()), N || this.toHexString()) : U === "name" && this._a === 0 ? this.toName() : this.toRgbString();
        }, clone: function() {
          return t(this.toString());
        }, _applyModification: function(U, ee) {
          var N = U.apply(null, [this].concat([].slice.call(ee)));
          return this._r = N._r, this._g = N._g, this._b = N._b, this.setAlpha(N._a), this;
        }, lighten: function() {
          return this._applyModification(c, arguments);
        }, brighten: function() {
          return this._applyModification(a, arguments);
        }, darken: function() {
          return this._applyModification(y, arguments);
        }, desaturate: function() {
          return this._applyModification(l, arguments);
        }, saturate: function() {
          return this._applyModification(i, arguments);
        }, greyscale: function() {
          return this._applyModification(p, arguments);
        }, spin: function() {
          return this._applyModification(f, arguments);
        }, _applyCombination: function(U, ee) {
          return U.apply(null, [this].concat([].slice.call(ee)));
        }, analogous: function() {
          return this._applyCombination(L, arguments);
        }, complement: function() {
          return this._applyCombination(_, arguments);
        }, monochromatic: function() {
          return this._applyCombination(A, arguments);
        }, splitcomplement: function() {
          return this._applyCombination(T, arguments);
        }, triad: function() {
          return this._applyCombination(b, arguments);
        }, tetrad: function() {
          return this._applyCombination(w, arguments);
        } }, t.fromRatio = function(U, ee) {
          if (typeof U == "object") {
            var N = {};
            for (var K in U)
              U.hasOwnProperty(K) && (N[K] = K === "a" ? U[K] : H(U[K]));
            U = N;
          }
          return t(U, ee);
        }, t.equals = function(U, ee) {
          return !(!U || !ee) && t(U).toRgbString() == t(ee).toRgbString();
        }, t.random = function() {
          return t.fromRatio({ r: s(), g: s(), b: s() });
        }, t.mix = function(U, ee, N) {
          N = N === 0 ? 0 : N || 50;
          var K = t(U).toRgb(), X = t(ee).toRgb(), te = N / 100;
          return t({ r: (X.r - K.r) * te + K.r, g: (X.g - K.g) * te + K.g, b: (X.b - K.b) * te + K.b, a: (X.a - K.a) * te + K.a });
        }, t.readability = function(U, ee) {
          var N = t(U), K = t(ee);
          return (m.max(N.getLuminance(), K.getLuminance()) + 0.05) / (m.min(N.getLuminance(), K.getLuminance()) + 0.05);
        }, t.isReadable = function(U, ee, N) {
          var K, X, te = t.readability(U, ee);
          switch (X = !1, (K = function(ie) {
            var le, oe;
            return le = ((ie = ie || { level: "AA", size: "small" }).level || "AA").toUpperCase(), oe = (ie.size || "small").toLowerCase(), le !== "AA" && le !== "AAA" && (le = "AA"), oe !== "small" && oe !== "large" && (oe = "small"), { level: le, size: oe };
          }(N)).level + K.size) {
            case "AAsmall":
            case "AAAlarge":
              X = te >= 4.5;
              break;
            case "AAlarge":
              X = te >= 3;
              break;
            case "AAAsmall":
              X = te >= 7;
          }
          return X;
        }, t.mostReadable = function(U, ee, N) {
          var K, X, te, ie, le = null, oe = 0;
          X = (N = N || {}).includeFallbackColors, te = N.level, ie = N.size;
          for (var ve = 0; ve < ee.length; ve++)
            (K = t.readability(U, ee[ve])) > oe && (oe = K, le = t(ee[ve]));
          return t.isReadable(U, le, { level: te, size: ie }) || !X ? le : (N.includeFallbackColors = !1, t.mostReadable(U, ["#fff", "#000"], N));
        };
        var I = t.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }, P = t.hexNames = function(U) {
          var ee = {};
          for (var N in U)
            U.hasOwnProperty(N) && (ee[U[N]] = N);
          return ee;
        }(I);
        function S(U) {
          return U = parseFloat(U), (isNaN(U) || U < 0 || U > 1) && (U = 1), U;
        }
        function E(U, ee) {
          (function(K) {
            return typeof K == "string" && K.indexOf(".") != -1 && parseFloat(K) === 1;
          })(U) && (U = "100%");
          var N = function(K) {
            return typeof K == "string" && K.indexOf("%") != -1;
          }(U);
          return U = r(ee, n(0, parseFloat(U))), N && (U = parseInt(U * ee, 10) / 100), m.abs(U - ee) < 1e-6 ? 1 : U % ee / parseFloat(ee);
        }
        function R(U) {
          return r(1, n(0, U));
        }
        function z(U) {
          return parseInt(U, 16);
        }
        function j(U) {
          return U.length == 1 ? "0" + U : "" + U;
        }
        function H(U) {
          return U <= 1 && (U = 100 * U + "%"), U;
        }
        function Y(U) {
          return m.round(255 * parseFloat(U)).toString(16);
        }
        function J(U) {
          return z(U) / 255;
        }
        var W, Z, re, V = (Z = "[\\s|\\(]+(" + (W = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)") + ")[,|\\s]+(" + W + ")[,|\\s]+(" + W + ")\\s*\\)?", re = "[\\s|\\(]+(" + W + ")[,|\\s]+(" + W + ")[,|\\s]+(" + W + ")[,|\\s]+(" + W + ")\\s*\\)?", { CSS_UNIT: new RegExp(W), rgb: new RegExp("rgb" + Z), rgba: new RegExp("rgba" + re), hsl: new RegExp("hsl" + Z), hsla: new RegExp("hsla" + re), hsv: new RegExp("hsv" + Z), hsva: new RegExp("hsva" + re), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ });
        function B(U) {
          return !!V.CSS_UNIT.exec(U);
        }
        Q !== void 0 && Q.exports ? Q.exports = t : window.tinycolor = t;
      })(Math);
    }, {}], 314: [function(v, Q, $) {
      Q.exports = g, Q.exports.float32 = Q.exports.float = g, Q.exports.fract32 = Q.exports.fract = function(k, x) {
        if (k.length) {
          if (k instanceof Float32Array)
            return new Float32Array(k.length);
          x instanceof Float32Array || (x = g(k));
          for (var e = 0, r = x.length; e < r; e++)
            x[e] = k[e] - x[e];
          return x;
        }
        return g(k - g(k));
      };
      var m = new Float32Array(1);
      function g(k) {
        return k.length ? k instanceof Float32Array ? k : new Float32Array(k) : (m[0] = k, m[0]);
      }
    }, {}], 315: [function(v, Q, $) {
      var m = v("parse-unit");
      Q.exports = k;
      function g(x, e) {
        var r = m(getComputedStyle(x).getPropertyValue(e));
        return r[0] * k(r[1], x);
      }
      function k(x, e) {
        switch (e = e || document.body, x = (x || "px").trim().toLowerCase(), e !== window && e !== document || (e = document.body), x) {
          case "%":
            return e.clientHeight / 100;
          case "ch":
          case "ex":
            return function(r, n) {
              var s = document.createElement("div");
              s.style["font-size"] = "128" + r, n.appendChild(s);
              var t = g(s, "font-size") / 128;
              return n.removeChild(s), t;
            }(x, e);
          case "em":
            return g(e, "font-size");
          case "rem":
            return g(document.body, "font-size");
          case "vw":
            return window.innerWidth / 100;
          case "vh":
            return window.innerHeight / 100;
          case "vmin":
            return Math.min(window.innerWidth, window.innerHeight) / 100;
          case "vmax":
            return Math.max(window.innerWidth, window.innerHeight) / 100;
          case "in":
            return 96;
          case "cm":
            return 96 / 2.54;
          case "mm":
            return 96 / 25.4;
          case "pt":
            return 96 / 72;
          case "pc":
            return 16;
        }
        return 1;
      }
    }, { "parse-unit": 251 }], 316: [function(v, Q, $) {
      (function(m, g) {
        g(typeof $ == "object" && Q !== void 0 ? $ : (m = m || self).topojson = m.topojson || {});
      })(this, function(m) {
        function g(h) {
          return h;
        }
        function k(h) {
          if (h == null)
            return g;
          var l, i, p = h.scale[0], c = h.scale[1], a = h.translate[0], y = h.translate[1];
          return function(f, _) {
            _ || (l = i = 0);
            var b = 2, w = f.length, T = new Array(w);
            for (T[0] = (l += f[0]) * p + a, T[1] = (i += f[1]) * c + y; b < w; )
              T[b] = f[b], ++b;
            return T;
          };
        }
        function x(h) {
          var l, i = k(h.transform), p = 1 / 0, c = p, a = -p, y = -p;
          function f(b) {
            (b = i(b))[0] < p && (p = b[0]), b[0] > a && (a = b[0]), b[1] < c && (c = b[1]), b[1] > y && (y = b[1]);
          }
          function _(b) {
            switch (b.type) {
              case "GeometryCollection":
                b.geometries.forEach(_);
                break;
              case "Point":
                f(b.coordinates);
                break;
              case "MultiPoint":
                b.coordinates.forEach(f);
            }
          }
          for (l in h.arcs.forEach(function(b) {
            for (var w, T = -1, L = b.length; ++T < L; )
              (w = i(b[T], T))[0] < p && (p = w[0]), w[0] > a && (a = w[0]), w[1] < c && (c = w[1]), w[1] > y && (y = w[1]);
          }), h.objects)
            _(h.objects[l]);
          return [p, c, a, y];
        }
        function e(h, l) {
          var i = l.id, p = l.bbox, c = l.properties == null ? {} : l.properties, a = r(h, l);
          return i == null && p == null ? { type: "Feature", properties: c, geometry: a } : p == null ? { type: "Feature", id: i, properties: c, geometry: a } : { type: "Feature", id: i, bbox: p, properties: c, geometry: a };
        }
        function r(h, l) {
          var i = k(h.transform), p = h.arcs;
          function c(b, w) {
            w.length && w.pop();
            for (var T = p[b < 0 ? ~b : b], L = 0, A = T.length; L < A; ++L)
              w.push(i(T[L], L));
            b < 0 && function(I, P) {
              for (var S, E = I.length, R = E - P; R < --E; )
                S = I[R], I[R++] = I[E], I[E] = S;
            }(w, A);
          }
          function a(b) {
            return i(b);
          }
          function y(b) {
            for (var w = [], T = 0, L = b.length; T < L; ++T)
              c(b[T], w);
            return w.length < 2 && w.push(w[0]), w;
          }
          function f(b) {
            for (var w = y(b); w.length < 4; )
              w.push(w[0]);
            return w;
          }
          function _(b) {
            return b.map(f);
          }
          return function b(w) {
            var T, L = w.type;
            switch (L) {
              case "GeometryCollection":
                return { type: L, geometries: w.geometries.map(b) };
              case "Point":
                T = a(w.coordinates);
                break;
              case "MultiPoint":
                T = w.coordinates.map(a);
                break;
              case "LineString":
                T = y(w.arcs);
                break;
              case "MultiLineString":
                T = w.arcs.map(y);
                break;
              case "Polygon":
                T = _(w.arcs);
                break;
              case "MultiPolygon":
                T = w.arcs.map(_);
                break;
              default:
                return null;
            }
            return { type: L, coordinates: T };
          }(l);
        }
        function n(h, l) {
          var i = {}, p = {}, c = {}, a = [], y = -1;
          function f(_, b) {
            for (var w in _) {
              var T = _[w];
              delete b[T.start], delete T.start, delete T.end, T.forEach(function(L) {
                i[L < 0 ? ~L : L] = 1;
              }), a.push(T);
            }
          }
          return l.forEach(function(_, b) {
            var w, T = h.arcs[_ < 0 ? ~_ : _];
            T.length < 3 && !T[1][0] && !T[1][1] && (w = l[++y], l[y] = _, l[b] = w);
          }), l.forEach(function(_) {
            var b, w, T = function(S) {
              var E, R = h.arcs[S < 0 ? ~S : S], z = R[0];
              return h.transform ? (E = [0, 0], R.forEach(function(j) {
                E[0] += j[0], E[1] += j[1];
              })) : E = R[R.length - 1], S < 0 ? [E, z] : [z, E];
            }(_), L = T[0], A = T[1];
            if (b = c[L])
              if (delete c[b.end], b.push(_), b.end = A, w = p[A]) {
                delete p[w.start];
                var I = w === b ? b : b.concat(w);
                p[I.start = b.start] = c[I.end = w.end] = I;
              } else
                p[b.start] = c[b.end] = b;
            else if (b = p[A])
              if (delete p[b.start], b.unshift(_), b.start = L, w = c[L]) {
                delete c[w.end];
                var P = w === b ? b : w.concat(b);
                p[P.start = w.start] = c[P.end = b.end] = P;
              } else
                p[b.start] = c[b.end] = b;
            else
              p[(b = [_]).start = L] = c[b.end = A] = b;
          }), f(c, p), f(p, c), l.forEach(function(_) {
            i[_ < 0 ? ~_ : _] || a.push([_]);
          }), a;
        }
        function s(h, l, i) {
          var p, c, a;
          if (arguments.length > 1)
            p = t(h, l, i);
          else
            for (c = 0, p = new Array(a = h.arcs.length); c < a; ++c)
              p[c] = c;
          return { type: "MultiLineString", arcs: n(h, p) };
        }
        function t(h, l, i) {
          var p, c = [], a = [];
          function y(b) {
            var w = b < 0 ? ~b : b;
            (a[w] || (a[w] = [])).push({ i: b, g: p });
          }
          function f(b) {
            b.forEach(y);
          }
          function _(b) {
            b.forEach(f);
          }
          return function b(w) {
            switch (p = w, w.type) {
              case "GeometryCollection":
                w.geometries.forEach(b);
                break;
              case "LineString":
                f(w.arcs);
                break;
              case "MultiLineString":
              case "Polygon":
                _(w.arcs);
                break;
              case "MultiPolygon":
                (function(T) {
                  T.forEach(_);
                })(w.arcs);
            }
          }(l), a.forEach(i == null ? function(b) {
            c.push(b[0].i);
          } : function(b) {
            i(b[0].g, b[b.length - 1].g) && c.push(b[0].i);
          }), c;
        }
        function d(h, l) {
          var i = {}, p = [], c = [];
          function a(f) {
            f.forEach(function(_) {
              _.forEach(function(b) {
                (i[b = b < 0 ? ~b : b] || (i[b] = [])).push(f);
              });
            }), p.push(f);
          }
          function y(f) {
            return function(_) {
              for (var b, w = -1, T = _.length, L = _[T - 1], A = 0; ++w < T; )
                b = L, L = _[w], A += b[0] * L[1] - b[1] * L[0];
              return Math.abs(A);
            }(r(h, { type: "Polygon", arcs: [f] }).coordinates[0]);
          }
          return l.forEach(function f(_) {
            switch (_.type) {
              case "GeometryCollection":
                _.geometries.forEach(f);
                break;
              case "Polygon":
                a(_.arcs);
                break;
              case "MultiPolygon":
                _.arcs.forEach(a);
            }
          }), p.forEach(function(f) {
            if (!f._) {
              var _ = [], b = [f];
              for (f._ = 1, c.push(_); f = b.pop(); )
                _.push(f), f.forEach(function(w) {
                  w.forEach(function(T) {
                    i[T < 0 ? ~T : T].forEach(function(L) {
                      L._ || (L._ = 1, b.push(L));
                    });
                  });
                });
            }
          }), p.forEach(function(f) {
            delete f._;
          }), { type: "MultiPolygon", arcs: c.map(function(f) {
            var _, b = [];
            if (f.forEach(function(I) {
              I.forEach(function(P) {
                P.forEach(function(S) {
                  i[S < 0 ? ~S : S].length < 2 && b.push(S);
                });
              });
            }), (_ = (b = n(h, b)).length) > 1)
              for (var w, T, L = 1, A = y(b[0]); L < _; ++L)
                (w = y(b[L])) > A && (T = b[0], b[0] = b[L], b[L] = T, A = w);
            return b;
          }).filter(function(f) {
            return f.length > 0;
          }) };
        }
        function u(h, l) {
          for (var i = 0, p = h.length; i < p; ) {
            var c = i + p >>> 1;
            h[c] < l ? i = c + 1 : p = c;
          }
          return i;
        }
        function o(h) {
          if (h == null)
            return g;
          var l, i, p = h.scale[0], c = h.scale[1], a = h.translate[0], y = h.translate[1];
          return function(f, _) {
            _ || (l = i = 0);
            var b = 2, w = f.length, T = new Array(w), L = Math.round((f[0] - a) / p), A = Math.round((f[1] - y) / c);
            for (T[0] = L - l, l = L, T[1] = A - i, i = A; b < w; )
              T[b] = f[b], ++b;
            return T;
          };
        }
        m.bbox = x, m.feature = function(h, l) {
          return typeof l == "string" && (l = h.objects[l]), l.type === "GeometryCollection" ? { type: "FeatureCollection", features: l.geometries.map(function(i) {
            return e(h, i);
          }) } : e(h, l);
        }, m.merge = function(h) {
          return r(h, d.apply(this, arguments));
        }, m.mergeArcs = d, m.mesh = function(h) {
          return r(h, s.apply(this, arguments));
        }, m.meshArcs = s, m.neighbors = function(h) {
          var l = {}, i = h.map(function() {
            return [];
          });
          function p(I, P) {
            I.forEach(function(S) {
              S < 0 && (S = ~S);
              var E = l[S];
              E ? E.push(P) : l[S] = [P];
            });
          }
          function c(I, P) {
            I.forEach(function(S) {
              p(S, P);
            });
          }
          var a = { LineString: p, MultiLineString: c, Polygon: c, MultiPolygon: function(I, P) {
            I.forEach(function(S) {
              c(S, P);
            });
          } };
          for (var y in h.forEach(function I(P, S) {
            P.type === "GeometryCollection" ? P.geometries.forEach(function(E) {
              I(E, S);
            }) : P.type in a && a[P.type](P.arcs, S);
          }), l)
            for (var f = l[y], _ = f.length, b = 0; b < _; ++b)
              for (var w = b + 1; w < _; ++w) {
                var T, L = f[b], A = f[w];
                (T = i[L])[y = u(T, A)] !== A && T.splice(y, 0, A), (T = i[A])[y = u(T, L)] !== L && T.splice(y, 0, L);
              }
          return i;
        }, m.quantize = function(h, l) {
          if (h.transform)
            throw new Error("already quantized");
          if (l && l.scale)
            f = h.bbox;
          else {
            if (!((i = Math.floor(l)) >= 2))
              throw new Error("n must be \u22652");
            var i, p = (f = h.bbox || x(h))[0], c = f[1], a = f[2], y = f[3];
            l = { scale: [a - p ? (a - p) / (i - 1) : 1, y - c ? (y - c) / (i - 1) : 1], translate: [p, c] };
          }
          var f, _, b = o(l), w = h.objects, T = {};
          function L(I) {
            return b(I);
          }
          function A(I) {
            var P;
            switch (I.type) {
              case "GeometryCollection":
                P = { type: "GeometryCollection", geometries: I.geometries.map(A) };
                break;
              case "Point":
                P = { type: "Point", coordinates: L(I.coordinates) };
                break;
              case "MultiPoint":
                P = { type: "MultiPoint", coordinates: I.coordinates.map(L) };
                break;
              default:
                return I;
            }
            return I.id != null && (P.id = I.id), I.bbox != null && (P.bbox = I.bbox), I.properties != null && (P.properties = I.properties), P;
          }
          for (_ in w)
            T[_] = A(w[_]);
          return { type: "Topology", bbox: f, transform: l, objects: T, arcs: h.arcs.map(function(I) {
            var P, S = 0, E = 1, R = I.length, z = new Array(R);
            for (z[0] = b(I[0], 0); ++S < R; )
              ((P = b(I[S], S))[0] || P[1]) && (z[E++] = P);
            return E === 1 && (z[E++] = [0, 0]), z.length = E, z;
          }) };
        }, m.transform = k, m.untransform = o, Object.defineProperty(m, "__esModule", { value: !0 });
      });
    }, {}], 317: [function(v, Q, $) {
      var m = v("../prototype/is");
      Q.exports = function(g) {
        if (typeof g != "function" || !hasOwnProperty.call(g, "length"))
          return !1;
        try {
          if (typeof g.length != "number" || typeof g.call != "function" || typeof g.apply != "function")
            return !1;
        } catch {
          return !1;
        }
        return !m(g);
      };
    }, { "../prototype/is": 324 }], 318: [function(v, Q, $) {
      var m = v("../value/is"), g = v("../object/is"), k = v("../string/coerce"), x = v("./to-short-string"), e = function(r, n) {
        return r.replace("%v", x(n));
      };
      Q.exports = function(r, n, s) {
        if (!g(s))
          throw new TypeError(e(n, r));
        if (!m(r)) {
          if ("default" in s)
            return s.default;
          if (s.isOptional)
            return null;
        }
        var t = k(s.errorMessage);
        throw m(t) || (t = n), new TypeError(e(t, r));
      };
    }, { "../object/is": 321, "../string/coerce": 325, "../value/is": 327, "./to-short-string": 320 }], 319: [function(v, Q, $) {
      Q.exports = function(m) {
        try {
          return m.toString();
        } catch {
          try {
            return String(m);
          } catch {
            return null;
          }
        }
      };
    }, {}], 320: [function(v, Q, $) {
      var m = v("./safe-to-string"), g = /[\n\r\u2028\u2029]/g;
      Q.exports = function(k) {
        var x = m(k);
        return x === null ? "<Non-coercible to string value>" : (x.length > 100 && (x = x.slice(0, 99) + "\u2026"), x = x.replace(g, function(e) {
          switch (e) {
            case `
`:
              return "\\n";
            case "\r":
              return "\\r";
            case "\u2028":
              return "\\u2028";
            case "\u2029":
              return "\\u2029";
            default:
              throw new Error("Unexpected character");
          }
        }));
      };
    }, { "./safe-to-string": 319 }], 321: [function(v, Q, $) {
      var m = v("../value/is"), g = { object: !0, function: !0, undefined: !0 };
      Q.exports = function(k) {
        return !!m(k) && hasOwnProperty.call(g, typeof k);
      };
    }, { "../value/is": 327 }], 322: [function(v, Q, $) {
      var m = v("../lib/resolve-exception"), g = v("./is");
      Q.exports = function(k) {
        return g(k) ? k : m(k, "%v is not a plain function", arguments[1]);
      };
    }, { "../lib/resolve-exception": 318, "./is": 323 }], 323: [function(v, Q, $) {
      var m = v("../function/is"), g = /^\s*class[\s{/}]/, k = Function.prototype.toString;
      Q.exports = function(x) {
        return !!m(x) && !g.test(k.call(x));
      };
    }, { "../function/is": 317 }], 324: [function(v, Q, $) {
      var m = v("../object/is");
      Q.exports = function(g) {
        if (!m(g))
          return !1;
        try {
          return !!g.constructor && g.constructor.prototype === g;
        } catch {
          return !1;
        }
      };
    }, { "../object/is": 321 }], 325: [function(v, Q, $) {
      var m = v("../value/is"), g = v("../object/is"), k = Object.prototype.toString;
      Q.exports = function(x) {
        if (!m(x))
          return null;
        if (g(x)) {
          var e = x.toString;
          if (typeof e != "function" || e === k)
            return null;
        }
        try {
          return "" + x;
        } catch {
          return null;
        }
      };
    }, { "../object/is": 321, "../value/is": 327 }], 326: [function(v, Q, $) {
      var m = v("../lib/resolve-exception"), g = v("./is");
      Q.exports = function(k) {
        return g(k) ? k : m(k, "Cannot use %v", arguments[1]);
      };
    }, { "../lib/resolve-exception": 318, "./is": 327 }], 327: [function(v, Q, $) {
      Q.exports = function(m) {
        return m != null;
      };
    }, {}], 328: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = v("bit-twiddle"), k = v("dup"), x = v("buffer").Buffer;
          m.__TYPEDARRAY_POOL || (m.__TYPEDARRAY_POOL = { UINT8: k([32, 0]), UINT16: k([32, 0]), UINT32: k([32, 0]), BIGUINT64: k([32, 0]), INT8: k([32, 0]), INT16: k([32, 0]), INT32: k([32, 0]), BIGINT64: k([32, 0]), FLOAT: k([32, 0]), DOUBLE: k([32, 0]), DATA: k([32, 0]), UINT8C: k([32, 0]), BUFFER: k([32, 0]) });
          var e = typeof Uint8ClampedArray < "u", r = typeof BigUint64Array < "u", n = typeof BigInt64Array < "u", s = m.__TYPEDARRAY_POOL;
          s.UINT8C || (s.UINT8C = k([32, 0])), s.BIGUINT64 || (s.BIGUINT64 = k([32, 0])), s.BIGINT64 || (s.BIGINT64 = k([32, 0])), s.BUFFER || (s.BUFFER = k([32, 0]));
          var t = s.DATA, d = s.BUFFER;
          function u(A) {
            if (A) {
              var I = A.length || A.byteLength, P = g.log2(I);
              t[P].push(A);
            }
          }
          function o(A) {
            A = g.nextPow2(A);
            var I = g.log2(A), P = t[I];
            return P.length > 0 ? P.pop() : new ArrayBuffer(A);
          }
          function h(A) {
            return new Uint8Array(o(A), 0, A);
          }
          function l(A) {
            return new Uint16Array(o(2 * A), 0, A);
          }
          function i(A) {
            return new Uint32Array(o(4 * A), 0, A);
          }
          function p(A) {
            return new Int8Array(o(A), 0, A);
          }
          function c(A) {
            return new Int16Array(o(2 * A), 0, A);
          }
          function a(A) {
            return new Int32Array(o(4 * A), 0, A);
          }
          function y(A) {
            return new Float32Array(o(4 * A), 0, A);
          }
          function f(A) {
            return new Float64Array(o(8 * A), 0, A);
          }
          function _(A) {
            return e ? new Uint8ClampedArray(o(A), 0, A) : h(A);
          }
          function b(A) {
            return r ? new BigUint64Array(o(8 * A), 0, A) : null;
          }
          function w(A) {
            return n ? new BigInt64Array(o(8 * A), 0, A) : null;
          }
          function T(A) {
            return new DataView(o(A), 0, A);
          }
          function L(A) {
            A = g.nextPow2(A);
            var I = g.log2(A), P = d[I];
            return P.length > 0 ? P.pop() : new x(A);
          }
          $.free = function(A) {
            if (x.isBuffer(A))
              d[g.log2(A.length)].push(A);
            else {
              if (Object.prototype.toString.call(A) !== "[object ArrayBuffer]" && (A = A.buffer), !A)
                return;
              var I = A.length || A.byteLength, P = 0 | g.log2(I);
              t[P].push(A);
            }
          }, $.freeUint8 = $.freeUint16 = $.freeUint32 = $.freeBigUint64 = $.freeInt8 = $.freeInt16 = $.freeInt32 = $.freeBigInt64 = $.freeFloat32 = $.freeFloat = $.freeFloat64 = $.freeDouble = $.freeUint8Clamped = $.freeDataView = function(A) {
            u(A.buffer);
          }, $.freeArrayBuffer = u, $.freeBuffer = function(A) {
            d[g.log2(A.length)].push(A);
          }, $.malloc = function(A, I) {
            if (I === void 0 || I === "arraybuffer")
              return o(A);
            switch (I) {
              case "uint8":
                return h(A);
              case "uint16":
                return l(A);
              case "uint32":
                return i(A);
              case "int8":
                return p(A);
              case "int16":
                return c(A);
              case "int32":
                return a(A);
              case "float":
              case "float32":
                return y(A);
              case "double":
              case "float64":
                return f(A);
              case "uint8_clamped":
                return _(A);
              case "bigint64":
                return w(A);
              case "biguint64":
                return b(A);
              case "buffer":
                return L(A);
              case "data":
              case "dataview":
                return T(A);
              default:
                return null;
            }
            return null;
          }, $.mallocArrayBuffer = o, $.mallocUint8 = h, $.mallocUint16 = l, $.mallocUint32 = i, $.mallocInt8 = p, $.mallocInt16 = c, $.mallocInt32 = a, $.mallocFloat32 = $.mallocFloat = y, $.mallocFloat64 = $.mallocDouble = f, $.mallocUint8Clamped = _, $.mallocBigUint64 = b, $.mallocBigInt64 = w, $.mallocDataView = T, $.mallocBuffer = L, $.clearCache = function() {
            for (var A = 0; A < 32; ++A)
              s.UINT8[A].length = 0, s.UINT16[A].length = 0, s.UINT32[A].length = 0, s.INT8[A].length = 0, s.INT16[A].length = 0, s.INT32[A].length = 0, s.FLOAT[A].length = 0, s.DOUBLE[A].length = 0, s.BIGUINT64[A].length = 0, s.BIGINT64[A].length = 0, s.UINT8C[A].length = 0, t[A].length = 0, d[A].length = 0;
          };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "bit-twiddle": 81, buffer: 85, dup: 128 }], 329: [function(v, Q, $) {
      var m = /[\'\"]/;
      Q.exports = function(g) {
        return g ? (m.test(g.charAt(0)) && (g = g.substr(1)), m.test(g.charAt(g.length - 1)) && (g = g.substr(0, g.length - 1)), g) : "";
      };
    }, {}], 330: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        Array.isArray(k) || (k = [].slice.call(arguments, 2));
        for (var x = 0, e = k.length; x < e; x++) {
          var r = k[x];
          for (var n in r)
            if ((g[n] === void 0 || Array.isArray(g[n]) || m[n] !== g[n]) && n in g) {
              var s;
              if (r[n] === !0)
                s = g[n];
              else if (r[n] === !1 || typeof r[n] == "function" && (s = r[n](g[n], m, g)) === void 0)
                continue;
              m[n] = s;
            }
        }
        return m;
      };
    }, {}], 331: [function(v, Q, $) {
      (function(m) {
        (function() {
          function g(k) {
            try {
              if (!m.localStorage)
                return !1;
            } catch {
              return !1;
            }
            var x = m.localStorage[k];
            return x != null && String(x).toLowerCase() === "true";
          }
          Q.exports = function(k, x) {
            if (g("noDeprecation"))
              return k;
            var e = !1;
            return function() {
              if (!e) {
                if (g("throwDeprecation"))
                  throw new Error(x);
                g("traceDeprecation") ? console.trace(x) : console.warn(x), e = !0;
              }
              return k.apply(this, arguments);
            };
          };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, {}], 332: [function(v, Q, $) {
      var m = v("get-canvas-context");
      Q.exports = function(g) {
        return m("webgl", g);
      };
    }, { "get-canvas-context": 194 }], 333: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign"), k = m.instance();
      function x(u) {
        this.local = this.regionalOptions[u || ""] || this.regionalOptions[""];
      }
      x.prototype = new m.baseCalendar(), g(x.prototype, { name: "Chinese", jdEpoch: 17214255e-1, hasYearZero: !1, minMonth: 0, firstMonth: 0, minDay: 1, regionalOptions: { "": { name: "Chinese", epochs: ["BEC", "EC"], monthNumbers: function(u, o) {
        if (typeof u == "string") {
          var h = u.match(r);
          return h ? h[0] : "";
        }
        var l = this._validateYear(u), i = u.month(), p = "" + this.toChineseMonth(l, i);
        return o && p.length < 2 && (p = "0" + p), this.isIntercalaryMonth(l, i) && (p += "i"), p;
      }, monthNames: function(u) {
        if (typeof u == "string") {
          var o = u.match(n);
          return o ? o[0] : "";
        }
        var h = this._validateYear(u), l = u.month(), i = ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"][this.toChineseMonth(h, l) - 1];
        return this.isIntercalaryMonth(h, l) && (i = "\u95F0" + i), i;
      }, monthNamesShort: function(u) {
        if (typeof u == "string") {
          var o = u.match(s);
          return o ? o[0] : "";
        }
        var h = this._validateYear(u), l = u.month(), i = ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D", "\u5341", "\u5341\u4E00", "\u5341\u4E8C"][this.toChineseMonth(h, l) - 1];
        return this.isIntercalaryMonth(h, l) && (i = "\u95F0" + i), i;
      }, parseMonth: function(u, o) {
        u = this._validateYear(u);
        var h, l = parseInt(o);
        if (isNaN(l))
          o[0] === "\u95F0" && (h = !0, o = o.substring(1)), o[o.length - 1] === "\u6708" && (o = o.substring(0, o.length - 1)), l = 1 + ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D", "\u5341", "\u5341\u4E00", "\u5341\u4E8C"].indexOf(o);
        else {
          var i = o[o.length - 1];
          h = i === "i" || i === "I";
        }
        return this.toMonthIndex(u, l, h);
      }, dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 1, isRTL: !1 } }, _validateYear: function(u, o) {
        if (u.year && (u = u.year()), typeof u != "number" || u < 1888 || u > 2111)
          throw o.replace(/\{0\}/, this.local.name);
        return u;
      }, toMonthIndex: function(u, o, h) {
        var l = this.intercalaryMonth(u);
        if (h && o !== l || o < 1 || o > 12)
          throw m.local.invalidMonth.replace(/\{0\}/, this.local.name);
        return l ? !h && o <= l ? o - 1 : o : o - 1;
      }, toChineseMonth: function(u, o) {
        u.year && (o = (u = u.year()).month());
        var h = this.intercalaryMonth(u);
        if (o < 0 || o > (h ? 12 : 11))
          throw m.local.invalidMonth.replace(/\{0\}/, this.local.name);
        return h ? o < h ? o + 1 : o : o + 1;
      }, intercalaryMonth: function(u) {
        return u = this._validateYear(u), t[u - t[0]] >> 13;
      }, isIntercalaryMonth: function(u, o) {
        u.year && (o = (u = u.year()).month());
        var h = this.intercalaryMonth(u);
        return !!h && h === o;
      }, leapYear: function(u) {
        return this.intercalaryMonth(u) !== 0;
      }, weekOfYear: function(u, o, h) {
        var l, i = this._validateYear(u, m.local.invalidyear), p = d[i - d[0]], c = p >> 9 & 4095, a = p >> 5 & 15, y = 31 & p;
        (l = k.newDate(c, a, y)).add(4 - (l.dayOfWeek() || 7), "d");
        var f = this.toJD(u, o, h) - l.toJD();
        return 1 + Math.floor(f / 7);
      }, monthsInYear: function(u) {
        return this.leapYear(u) ? 13 : 12;
      }, daysInMonth: function(u, o) {
        u.year && (o = u.month(), u = u.year()), u = this._validateYear(u);
        var h = t[u - t[0]];
        if (o > (h >> 13 ? 12 : 11))
          throw m.local.invalidMonth.replace(/\{0\}/, this.local.name);
        return h & 1 << 12 - o ? 30 : 29;
      }, weekDay: function(u, o, h) {
        return (this.dayOfWeek(u, o, h) || 7) < 6;
      }, toJD: function(u, o, h) {
        var l = this._validate(u, p, h, m.local.invalidDate);
        u = this._validateYear(l.year()), o = l.month(), h = l.day();
        var i = this.isIntercalaryMonth(u, o), p = this.toChineseMonth(u, o), c = function(a, y, f, _, b) {
          var w, T, L;
          if (typeof a == "object")
            T = a, w = y || {};
          else {
            var A;
            if (!(typeof a == "number" && a >= 1888 && a <= 2111))
              throw new Error("Lunar year outside range 1888-2111");
            if (!(typeof y == "number" && y >= 1 && y <= 12))
              throw new Error("Lunar month outside range 1 - 12");
            if (!(typeof f == "number" && f >= 1 && f <= 30))
              throw new Error("Lunar day outside range 1 - 30");
            typeof _ == "object" ? (A = !1, w = _) : (A = !!_, w = b || {}), T = { year: a, month: y, day: f, isIntercalary: A };
          }
          L = T.day - 1;
          var I, P = t[T.year - t[0]], S = P >> 13;
          I = S && (T.month > S || T.isIntercalary) ? T.month : T.month - 1;
          for (var E = 0; E < I; E++)
            L += P & 1 << 12 - E ? 30 : 29;
          var R = d[T.year - d[0]], z = new Date(R >> 9 & 4095, (R >> 5 & 15) - 1, (31 & R) + L);
          return w.year = z.getFullYear(), w.month = 1 + z.getMonth(), w.day = z.getDate(), w;
        }(u, p, h, i);
        return k.toJD(c.year, c.month, c.day);
      }, fromJD: function(u) {
        var o = k.fromJD(u), h = function(i, p, c, a) {
          var y, f;
          if (typeof i == "object")
            y = i, f = p || {};
          else {
            if (!(typeof i == "number" && i >= 1888 && i <= 2111))
              throw new Error("Solar year outside range 1888-2111");
            if (!(typeof p == "number" && p >= 1 && p <= 12))
              throw new Error("Solar month outside range 1 - 12");
            if (!(typeof c == "number" && c >= 1 && c <= 31))
              throw new Error("Solar day outside range 1 - 31");
            y = { year: i, month: p, day: c }, f = a || {};
          }
          var _ = d[y.year - d[0]], b = y.year << 9 | y.month << 5 | y.day;
          f.year = b >= _ ? y.year : y.year - 1, _ = d[f.year - d[0]];
          var w, T = new Date(_ >> 9 & 4095, (_ >> 5 & 15) - 1, 31 & _), L = new Date(y.year, y.month - 1, y.day);
          w = Math.round((L - T) / 864e5);
          var A, I = t[f.year - t[0]];
          for (A = 0; A < 13; A++) {
            var P = I & 1 << 12 - A ? 30 : 29;
            if (w < P)
              break;
            w -= P;
          }
          var S = I >> 13;
          return !S || A < S ? (f.isIntercalary = !1, f.month = 1 + A) : A === S ? (f.isIntercalary = !0, f.month = A) : (f.isIntercalary = !1, f.month = A), f.day = 1 + w, f;
        }(o.year(), o.month(), o.day()), l = this.toMonthIndex(h.year, h.month, h.isIntercalary);
        return this.newDate(h.year, l, h.day);
      }, fromString: function(u) {
        var o = u.match(e), h = this._validateYear(+o[1]), l = +o[2], i = !!o[3], p = this.toMonthIndex(h, l, i), c = +o[4];
        return this.newDate(h, p, c);
      }, add: function(u, o, h) {
        var l = u.year(), i = u.month(), p = this.isIntercalaryMonth(l, i), c = this.toChineseMonth(l, i), a = Object.getPrototypeOf(x.prototype).add.call(this, u, o, h);
        if (h === "y") {
          var y = a.year(), f = a.month(), _ = this.isIntercalaryMonth(y, c), b = p && _ ? this.toMonthIndex(y, c, !0) : this.toMonthIndex(y, c, !1);
          b !== f && a.month(b);
        }
        return a;
      } });
      var e = /^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m, r = /^\d?\d[iI]?/m, n = /^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m, s = /^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;
      m.calendars.chinese = x;
      var t = [1887, 5780, 5802, 19157, 2742, 50359, 1198, 2646, 46378, 7466, 3412, 30122, 5482, 67949, 2396, 5294, 43597, 6732, 6954, 36181, 2772, 4954, 18781, 2396, 54427, 5274, 6730, 47781, 5800, 6868, 21210, 4790, 59703, 2350, 5270, 46667, 3402, 3496, 38325, 1388, 4782, 18735, 2350, 52374, 6804, 7498, 44457, 2906, 1388, 29294, 4700, 63789, 6442, 6804, 56138, 5802, 2772, 38235, 1210, 4698, 22827, 5418, 63125, 3476, 5802, 43701, 2484, 5302, 27223, 2646, 70954, 7466, 3412, 54698, 5482, 2412, 38062, 5294, 2636, 32038, 6954, 60245, 2772, 4826, 43357, 2394, 5274, 39501, 6730, 72357, 5800, 5844, 53978, 4790, 2358, 38039, 5270, 87627, 3402, 3496, 54708, 5484, 4782, 43311, 2350, 3222, 27978, 7498, 68965, 2904, 5484, 45677, 4700, 6444, 39573, 6804, 6986, 19285, 2772, 62811, 1210, 4698, 47403, 5418, 5780, 38570, 5546, 76469, 2420, 5302, 51799, 2646, 5414, 36501, 3412, 5546, 18869, 2412, 54446, 5276, 6732, 48422, 6822, 2900, 28010, 4826, 92509, 2394, 5274, 55883, 6730, 6820, 47956, 5812, 2778, 18779, 2358, 62615, 5270, 5450, 46757, 3492, 5556, 27318, 4718, 67887, 2350, 3222, 52554, 7498, 3428, 38252, 5468, 4700, 31022, 6444, 64149, 6804, 6986, 43861, 2772, 5338, 35421, 2650, 70955, 5418, 5780, 54954, 5546, 2740, 38074, 5302, 2646, 29991, 3366, 61011, 3412, 5546, 43445, 2412, 5294, 35406, 6732, 72998, 6820, 6996, 52586, 2778, 2396, 38045, 5274, 6698, 23333, 6820, 64338, 5812, 2746, 43355, 2358, 5270, 39499, 5450, 79525, 3492, 5548], d = [1887, 966732, 967231, 967733, 968265, 968766, 969297, 969798, 970298, 970829, 971330, 971830, 972362, 972863, 973395, 973896, 974397, 974928, 975428, 975929, 976461, 976962, 977462, 977994, 978494, 979026, 979526, 980026, 980558, 981059, 981559, 982091, 982593, 983124, 983624, 984124, 984656, 985157, 985656, 986189, 986690, 987191, 987722, 988222, 988753, 989254, 989754, 990286, 990788, 991288, 991819, 992319, 992851, 993352, 993851, 994383, 994885, 995385, 995917, 996418, 996918, 997450, 997949, 998481, 998982, 999483, 1000014, 1000515, 1001016, 1001548, 1002047, 1002578, 1003080, 1003580, 1004111, 1004613, 1005113, 1005645, 1006146, 1006645, 1007177, 1007678, 1008209, 1008710, 1009211, 1009743, 1010243, 1010743, 1011275, 1011775, 1012306, 1012807, 1013308, 1013840, 1014341, 1014841, 1015373, 1015874, 1016404, 1016905, 1017405, 1017937, 1018438, 1018939, 1019471, 1019972, 1020471, 1021002, 1021503, 1022035, 1022535, 1023036, 1023568, 1024069, 1024568, 1025100, 1025601, 1026102, 1026633, 1027133, 1027666, 1028167, 1028666, 1029198, 1029699, 1030199, 1030730, 1031231, 1031763, 1032264, 1032764, 1033296, 1033797, 1034297, 1034828, 1035329, 1035830, 1036362, 1036861, 1037393, 1037894, 1038394, 1038925, 1039427, 1039927, 1040459, 1040959, 1041491, 1041992, 1042492, 1043023, 1043524, 1044024, 1044556, 1045057, 1045558, 1046090, 1046590, 1047121, 1047622, 1048122, 1048654, 1049154, 1049655, 1050187, 1050689, 1051219, 1051720, 1052220, 1052751, 1053252, 1053752, 1054284, 1054786, 1055285, 1055817, 1056317, 1056849, 1057349, 1057850, 1058382, 1058883, 1059383, 1059915, 1060415, 1060947, 1061447, 1061947, 1062479, 1062981, 1063480, 1064012, 1064514, 1065014, 1065545, 1066045, 1066577, 1067078, 1067578, 1068110, 1068611, 1069112, 1069642, 1070142, 1070674, 1071175, 1071675, 1072207, 1072709, 1073209, 1073740, 1074241, 1074741, 1075273, 1075773, 1076305, 1076807, 1077308, 1077839, 1078340, 1078840, 1079372, 1079871, 1080403, 1080904];
    }, { "../main": 347, "object-assign": 247 }], 334: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(x) {
        this.local = this.regionalOptions[x || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Coptic", jdEpoch: 18250295e-1, daysPerMonth: [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Coptic", epochs: ["BAM", "AM"], monthNames: ["Thout", "Paopi", "Hathor", "Koiak", "Tobi", "Meshir", "Paremhat", "Paremoude", "Pashons", "Paoni", "Epip", "Mesori", "Pi Kogi Enavot"], monthNamesShort: ["Tho", "Pao", "Hath", "Koi", "Tob", "Mesh", "Pat", "Pad", "Pash", "Pao", "Epi", "Meso", "PiK"], dayNames: ["Tkyriaka", "Pesnau", "Pshoment", "Peftoou", "Ptiou", "Psoou", "Psabbaton"], dayNamesShort: ["Tky", "Pes", "Psh", "Pef", "Pti", "Pso", "Psa"], dayNamesMin: ["Tk", "Pes", "Psh", "Pef", "Pt", "Pso", "Psa"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(x) {
        var e = this._validate(x, this.minMonth, this.minDay, m.local.invalidYear);
        return (x = e.year() + (e.year() < 0 ? 1 : 0)) % 4 == 3 || x % 4 == -1;
      }, monthsInYear: function(x) {
        return this._validate(x, this.minMonth, this.minDay, m.local.invalidYear || m.regionalOptions[""].invalidYear), 13;
      }, weekOfYear: function(x, e, r) {
        var n = this.newDate(x, e, r);
        return n.add(-n.dayOfWeek(), "d"), Math.floor((n.dayOfYear() - 1) / 7) + 1;
      }, daysInMonth: function(x, e) {
        var r = this._validate(x, e, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[r.month() - 1] + (r.month() === 13 && this.leapYear(r.year()) ? 1 : 0);
      }, weekDay: function(x, e, r) {
        return (this.dayOfWeek(x, e, r) || 7) < 6;
      }, toJD: function(x, e, r) {
        var n = this._validate(x, e, r, m.local.invalidDate);
        return (x = n.year()) < 0 && x++, n.day() + 30 * (n.month() - 1) + 365 * (x - 1) + Math.floor(x / 4) + this.jdEpoch - 1;
      }, fromJD: function(x) {
        var e = Math.floor(x) + 0.5 - this.jdEpoch, r = Math.floor((e - Math.floor((e + 366) / 1461)) / 365) + 1;
        r <= 0 && r--, e = Math.floor(x) + 0.5 - this.newDate(r, 1, 1).toJD();
        var n = Math.floor(e / 30) + 1, s = e - 30 * (n - 1) + 1;
        return this.newDate(r, n, s);
      } }), m.calendars.coptic = k;
    }, { "../main": 347, "object-assign": 247 }], 335: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Discworld", jdEpoch: 17214255e-1, daysPerMonth: [16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Discworld", epochs: ["BUC", "UC"], monthNames: ["Ick", "Offle", "February", "March", "April", "May", "June", "Grune", "August", "Spune", "Sektober", "Ember", "December"], monthNamesShort: ["Ick", "Off", "Feb", "Mar", "Apr", "May", "Jun", "Gru", "Aug", "Spu", "Sek", "Emb", "Dec"], dayNames: ["Sunday", "Octeday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Oct", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Oc", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 2, isRTL: !1 } }, leapYear: function(e) {
        return this._validate(e, this.minMonth, this.minDay, m.local.invalidYear), !1;
      }, monthsInYear: function(e) {
        return this._validate(e, this.minMonth, this.minDay, m.local.invalidYear), 13;
      }, daysInYear: function(e) {
        return this._validate(e, this.minMonth, this.minDay, m.local.invalidYear), 400;
      }, weekOfYear: function(e, r, n) {
        var s = this.newDate(e, r, n);
        return s.add(-s.dayOfWeek(), "d"), Math.floor((s.dayOfYear() - 1) / 8) + 1;
      }, daysInMonth: function(e, r) {
        var n = this._validate(e, r, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[n.month() - 1];
      }, daysInWeek: function() {
        return 8;
      }, dayOfWeek: function(e, r, n) {
        return (this._validate(e, r, n, m.local.invalidDate).day() + 1) % 8;
      }, weekDay: function(e, r, n) {
        var s = this.dayOfWeek(e, r, n);
        return s >= 2 && s <= 6;
      }, extraInfo: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        return { century: x[Math.floor((s.year() - 1) / 100) + 1] || "" };
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        return e = s.year() + (s.year() < 0 ? 1 : 0), r = s.month(), (n = s.day()) + (r > 1 ? 16 : 0) + (r > 2 ? 32 * (r - 2) : 0) + 400 * (e - 1) + this.jdEpoch - 1;
      }, fromJD: function(e) {
        e = Math.floor(e + 0.5) - Math.floor(this.jdEpoch) - 1;
        var r = Math.floor(e / 400) + 1;
        e -= 400 * (r - 1), e += e > 15 ? 16 : 0;
        var n = Math.floor(e / 32) + 1, s = e - 32 * (n - 1) + 1;
        return this.newDate(r <= 0 ? r - 1 : r, n, s);
      } });
      var x = { 20: "Fruitbat", 21: "Anchovy" };
      m.calendars.discworld = k;
    }, { "../main": 347, "object-assign": 247 }], 336: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(x) {
        this.local = this.regionalOptions[x || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Ethiopian", jdEpoch: 17242205e-1, daysPerMonth: [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Ethiopian", epochs: ["BEE", "EE"], monthNames: ["Meskerem", "Tikemet", "Hidar", "Tahesas", "Tir", "Yekatit", "Megabit", "Miazia", "Genbot", "Sene", "Hamle", "Nehase", "Pagume"], monthNamesShort: ["Mes", "Tik", "Hid", "Tah", "Tir", "Yek", "Meg", "Mia", "Gen", "Sen", "Ham", "Neh", "Pag"], dayNames: ["Ehud", "Segno", "Maksegno", "Irob", "Hamus", "Arb", "Kidame"], dayNamesShort: ["Ehu", "Seg", "Mak", "Iro", "Ham", "Arb", "Kid"], dayNamesMin: ["Eh", "Se", "Ma", "Ir", "Ha", "Ar", "Ki"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(x) {
        var e = this._validate(x, this.minMonth, this.minDay, m.local.invalidYear);
        return (x = e.year() + (e.year() < 0 ? 1 : 0)) % 4 == 3 || x % 4 == -1;
      }, monthsInYear: function(x) {
        return this._validate(x, this.minMonth, this.minDay, m.local.invalidYear || m.regionalOptions[""].invalidYear), 13;
      }, weekOfYear: function(x, e, r) {
        var n = this.newDate(x, e, r);
        return n.add(-n.dayOfWeek(), "d"), Math.floor((n.dayOfYear() - 1) / 7) + 1;
      }, daysInMonth: function(x, e) {
        var r = this._validate(x, e, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[r.month() - 1] + (r.month() === 13 && this.leapYear(r.year()) ? 1 : 0);
      }, weekDay: function(x, e, r) {
        return (this.dayOfWeek(x, e, r) || 7) < 6;
      }, toJD: function(x, e, r) {
        var n = this._validate(x, e, r, m.local.invalidDate);
        return (x = n.year()) < 0 && x++, n.day() + 30 * (n.month() - 1) + 365 * (x - 1) + Math.floor(x / 4) + this.jdEpoch - 1;
      }, fromJD: function(x) {
        var e = Math.floor(x) + 0.5 - this.jdEpoch, r = Math.floor((e - Math.floor((e + 366) / 1461)) / 365) + 1;
        r <= 0 && r--, e = Math.floor(x) + 0.5 - this.newDate(r, 1, 1).toJD();
        var n = Math.floor(e / 30) + 1, s = e - 30 * (n - 1) + 1;
        return this.newDate(r, n, s);
      } }), m.calendars.ethiopian = k;
    }, { "../main": 347, "object-assign": 247 }], 337: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      function x(e, r) {
        return e - r * Math.floor(e / r);
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Hebrew", jdEpoch: 347995.5, daysPerMonth: [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29], hasYearZero: !1, minMonth: 1, firstMonth: 7, minDay: 1, regionalOptions: { "": { name: "Hebrew", epochs: ["BAM", "AM"], monthNames: ["Nisan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II"], monthNamesShort: ["Nis", "Iya", "Siv", "Tam", "Av", "Elu", "Tis", "Che", "Kis", "Tev", "She", "Ada", "Ad2"], dayNames: ["Yom Rishon", "Yom Sheni", "Yom Shlishi", "Yom Revi'i", "Yom Chamishi", "Yom Shishi", "Yom Shabbat"], dayNamesShort: ["Ris", "She", "Shl", "Rev", "Cha", "Shi", "Sha"], dayNamesMin: ["Ri", "She", "Shl", "Re", "Ch", "Shi", "Sha"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(e) {
        var r = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return this._leapYear(r.year());
      }, _leapYear: function(e) {
        return x(7 * (e = e < 0 ? e + 1 : e) + 1, 19) < 7;
      }, monthsInYear: function(e) {
        return this._validate(e, this.minMonth, this.minDay, m.local.invalidYear), this._leapYear(e.year ? e.year() : e) ? 13 : 12;
      }, weekOfYear: function(e, r, n) {
        var s = this.newDate(e, r, n);
        return s.add(-s.dayOfWeek(), "d"), Math.floor((s.dayOfYear() - 1) / 7) + 1;
      }, daysInYear: function(e) {
        return e = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear).year(), this.toJD(e === -1 ? 1 : e + 1, 7, 1) - this.toJD(e, 7, 1);
      }, daysInMonth: function(e, r) {
        return e.year && (r = e.month(), e = e.year()), this._validate(e, r, this.minDay, m.local.invalidMonth), r === 12 && this.leapYear(e) || r === 8 && x(this.daysInYear(e), 10) === 5 ? 30 : r === 9 && x(this.daysInYear(e), 10) === 3 ? 29 : this.daysPerMonth[r - 1];
      }, weekDay: function(e, r, n) {
        return this.dayOfWeek(e, r, n) !== 6;
      }, extraInfo: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        return { yearType: (this.leapYear(s) ? "embolismic" : "common") + " " + ["deficient", "regular", "complete"][this.daysInYear(s) % 10 - 3] };
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        e = s.year(), r = s.month(), n = s.day();
        var t = e <= 0 ? e + 1 : e, d = this.jdEpoch + this._delay1(t) + this._delay2(t) + n + 1;
        if (r < 7) {
          for (var u = 7; u <= this.monthsInYear(e); u++)
            d += this.daysInMonth(e, u);
          for (u = 1; u < r; u++)
            d += this.daysInMonth(e, u);
        } else
          for (u = 7; u < r; u++)
            d += this.daysInMonth(e, u);
        return d;
      }, _delay1: function(e) {
        var r = Math.floor((235 * e - 234) / 19), n = 12084 + 13753 * r, s = 29 * r + Math.floor(n / 25920);
        return x(3 * (s + 1), 7) < 3 && s++, s;
      }, _delay2: function(e) {
        var r = this._delay1(e - 1), n = this._delay1(e);
        return this._delay1(e + 1) - n == 356 ? 2 : n - r == 382 ? 1 : 0;
      }, fromJD: function(e) {
        e = Math.floor(e) + 0.5;
        for (var r = Math.floor(98496 * (e - this.jdEpoch) / 35975351) - 1; e >= this.toJD(r === -1 ? 1 : r + 1, 7, 1); )
          r++;
        for (var n = e < this.toJD(r, 1, 1) ? 7 : 1; e > this.toJD(r, n, this.daysInMonth(r, n)); )
          n++;
        var s = e - this.toJD(r, n, 1) + 1;
        return this.newDate(r, n, s);
      } }), m.calendars.hebrew = k;
    }, { "../main": 347, "object-assign": 247 }], 338: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(x) {
        this.local = this.regionalOptions[x || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Islamic", jdEpoch: 19484395e-1, daysPerMonth: [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Islamic", epochs: ["BH", "AH"], monthNames: ["Muharram", "Safar", "Rabi' al-awwal", "Rabi' al-thani", "Jumada al-awwal", "Jumada al-thani", "Rajab", "Sha'aban", "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah"], monthNamesShort: ["Muh", "Saf", "Rab1", "Rab2", "Jum1", "Jum2", "Raj", "Sha'", "Ram", "Shaw", "DhuQ", "DhuH"], dayNames: ["Yawm al-ahad", "Yawm al-ithnayn", "Yawm ath-thulaathaa'", "Yawm al-arbi'aa'", "Yawm al-kham\u012Bs", "Yawm al-jum'a", "Yawm as-sabt"], dayNamesShort: ["Aha", "Ith", "Thu", "Arb", "Kha", "Jum", "Sab"], dayNamesMin: ["Ah", "It", "Th", "Ar", "Kh", "Ju", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 6, isRTL: !1 } }, leapYear: function(x) {
        return (11 * this._validate(x, this.minMonth, this.minDay, m.local.invalidYear).year() + 14) % 30 < 11;
      }, weekOfYear: function(x, e, r) {
        var n = this.newDate(x, e, r);
        return n.add(-n.dayOfWeek(), "d"), Math.floor((n.dayOfYear() - 1) / 7) + 1;
      }, daysInYear: function(x) {
        return this.leapYear(x) ? 355 : 354;
      }, daysInMonth: function(x, e) {
        var r = this._validate(x, e, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[r.month() - 1] + (r.month() === 12 && this.leapYear(r.year()) ? 1 : 0);
      }, weekDay: function(x, e, r) {
        return this.dayOfWeek(x, e, r) !== 5;
      }, toJD: function(x, e, r) {
        var n = this._validate(x, e, r, m.local.invalidDate);
        return x = n.year(), e = n.month(), x = x <= 0 ? x + 1 : x, (r = n.day()) + Math.ceil(29.5 * (e - 1)) + 354 * (x - 1) + Math.floor((3 + 11 * x) / 30) + this.jdEpoch - 1;
      }, fromJD: function(x) {
        x = Math.floor(x) + 0.5;
        var e = Math.floor((30 * (x - this.jdEpoch) + 10646) / 10631);
        e = e <= 0 ? e - 1 : e;
        var r = Math.min(12, Math.ceil((x - 29 - this.toJD(e, 1, 1)) / 29.5) + 1), n = x - this.toJD(e, r, 1) + 1;
        return this.newDate(e, r, n);
      } }), m.calendars.islamic = k;
    }, { "../main": 347, "object-assign": 247 }], 339: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(x) {
        this.local = this.regionalOptions[x || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Julian", jdEpoch: 17214235e-1, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Julian", epochs: ["BC", "AD"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "mm/dd/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(x) {
        var e = this._validate(x, this.minMonth, this.minDay, m.local.invalidYear);
        return (x = e.year() < 0 ? e.year() + 1 : e.year()) % 4 == 0;
      }, weekOfYear: function(x, e, r) {
        var n = this.newDate(x, e, r);
        return n.add(4 - (n.dayOfWeek() || 7), "d"), Math.floor((n.dayOfYear() - 1) / 7) + 1;
      }, daysInMonth: function(x, e) {
        var r = this._validate(x, e, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[r.month() - 1] + (r.month() === 2 && this.leapYear(r.year()) ? 1 : 0);
      }, weekDay: function(x, e, r) {
        return (this.dayOfWeek(x, e, r) || 7) < 6;
      }, toJD: function(x, e, r) {
        var n = this._validate(x, e, r, m.local.invalidDate);
        return x = n.year(), e = n.month(), r = n.day(), x < 0 && x++, e <= 2 && (x--, e += 12), Math.floor(365.25 * (x + 4716)) + Math.floor(30.6001 * (e + 1)) + r - 1524.5;
      }, fromJD: function(x) {
        var e = Math.floor(x + 0.5) + 1524, r = Math.floor((e - 122.1) / 365.25), n = Math.floor(365.25 * r), s = Math.floor((e - n) / 30.6001), t = s - Math.floor(s < 14 ? 1 : 13), d = r - Math.floor(t > 2 ? 4716 : 4715), u = e - n - Math.floor(30.6001 * s);
        return d <= 0 && d--, this.newDate(d, t, u);
      } }), m.calendars.julian = k;
    }, { "../main": 347, "object-assign": 247 }], 340: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(r) {
        this.local = this.regionalOptions[r || ""] || this.regionalOptions[""];
      }
      function x(r, n) {
        return r - n * Math.floor(r / n);
      }
      function e(r, n) {
        return x(r - 1, n) + 1;
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Mayan", jdEpoch: 584282.5, hasYearZero: !0, minMonth: 0, firstMonth: 0, minDay: 0, regionalOptions: { "": { name: "Mayan", epochs: ["", ""], monthNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17"], monthNamesShort: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17"], dayNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], dayNamesShort: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], dayNamesMin: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], digits: null, dateFormat: "YYYY.m.d", firstDay: 0, isRTL: !1, haabMonths: ["Pop", "Uo", "Zip", "Zotz", "Tzec", "Xul", "Yaxkin", "Mol", "Chen", "Yax", "Zac", "Ceh", "Mac", "Kankin", "Muan", "Pax", "Kayab", "Cumku", "Uayeb"], tzolkinMonths: ["Imix", "Ik", "Akbal", "Kan", "Chicchan", "Cimi", "Manik", "Lamat", "Muluc", "Oc", "Chuen", "Eb", "Ben", "Ix", "Men", "Cib", "Caban", "Etznab", "Cauac", "Ahau"] } }, leapYear: function(r) {
        return this._validate(r, this.minMonth, this.minDay, m.local.invalidYear), !1;
      }, formatYear: function(r) {
        r = this._validate(r, this.minMonth, this.minDay, m.local.invalidYear).year();
        var n = Math.floor(r / 400);
        return r %= 400, r += r < 0 ? 400 : 0, n + "." + Math.floor(r / 20) + "." + r % 20;
      }, forYear: function(r) {
        if ((r = r.split(".")).length < 3)
          throw "Invalid Mayan year";
        for (var n = 0, s = 0; s < r.length; s++) {
          var t = parseInt(r[s], 10);
          if (Math.abs(t) > 19 || s > 0 && t < 0)
            throw "Invalid Mayan year";
          n = 20 * n + t;
        }
        return n;
      }, monthsInYear: function(r) {
        return this._validate(r, this.minMonth, this.minDay, m.local.invalidYear), 18;
      }, weekOfYear: function(r, n, s) {
        return this._validate(r, n, s, m.local.invalidDate), 0;
      }, daysInYear: function(r) {
        return this._validate(r, this.minMonth, this.minDay, m.local.invalidYear), 360;
      }, daysInMonth: function(r, n) {
        return this._validate(r, n, this.minDay, m.local.invalidMonth), 20;
      }, daysInWeek: function() {
        return 5;
      }, dayOfWeek: function(r, n, s) {
        return this._validate(r, n, s, m.local.invalidDate).day();
      }, weekDay: function(r, n, s) {
        return this._validate(r, n, s, m.local.invalidDate), !0;
      }, extraInfo: function(r, n, s) {
        var t = this._validate(r, n, s, m.local.invalidDate).toJD(), d = this._toHaab(t), u = this._toTzolkin(t);
        return { haabMonthName: this.local.haabMonths[d[0] - 1], haabMonth: d[0], haabDay: d[1], tzolkinDayName: this.local.tzolkinMonths[u[0] - 1], tzolkinDay: u[0], tzolkinTrecena: u[1] };
      }, _toHaab: function(r) {
        var n = x((r -= this.jdEpoch) + 8 + 340, 365);
        return [Math.floor(n / 20) + 1, x(n, 20)];
      }, _toTzolkin: function(r) {
        return [e((r -= this.jdEpoch) + 20, 20), e(r + 4, 13)];
      }, toJD: function(r, n, s) {
        var t = this._validate(r, n, s, m.local.invalidDate);
        return t.day() + 20 * t.month() + 360 * t.year() + this.jdEpoch;
      }, fromJD: function(r) {
        r = Math.floor(r) + 0.5 - this.jdEpoch;
        var n = Math.floor(r / 360);
        r %= 360, r += r < 0 ? 360 : 0;
        var s = Math.floor(r / 20), t = r % 20;
        return this.newDate(n, s, t);
      } }), m.calendars.mayan = k;
    }, { "../main": 347, "object-assign": 247 }], 341: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar();
      var x = m.instance("gregorian");
      g(k.prototype, { name: "Nanakshahi", jdEpoch: 22576735e-1, daysPerMonth: [31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 30, 30], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Nanakshahi", epochs: ["BN", "AN"], monthNames: ["Chet", "Vaisakh", "Jeth", "Harh", "Sawan", "Bhadon", "Assu", "Katak", "Maghar", "Poh", "Magh", "Phagun"], monthNamesShort: ["Che", "Vai", "Jet", "Har", "Saw", "Bha", "Ass", "Kat", "Mgr", "Poh", "Mgh", "Pha"], dayNames: ["Somvaar", "Mangalvar", "Budhvaar", "Veervaar", "Shukarvaar", "Sanicharvaar", "Etvaar"], dayNamesShort: ["Som", "Mangal", "Budh", "Veer", "Shukar", "Sanichar", "Et"], dayNamesMin: ["So", "Ma", "Bu", "Ve", "Sh", "Sa", "Et"], digits: null, dateFormat: "dd-mm-yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(e) {
        var r = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear || m.regionalOptions[""].invalidYear);
        return x.leapYear(r.year() + (r.year() < 1 ? 1 : 0) + 1469);
      }, weekOfYear: function(e, r, n) {
        var s = this.newDate(e, r, n);
        return s.add(1 - (s.dayOfWeek() || 7), "d"), Math.floor((s.dayOfYear() - 1) / 7) + 1;
      }, daysInMonth: function(e, r) {
        var n = this._validate(e, r, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[n.month() - 1] + (n.month() === 12 && this.leapYear(n.year()) ? 1 : 0);
      }, weekDay: function(e, r, n) {
        return (this.dayOfWeek(e, r, n) || 7) < 6;
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidMonth);
        (e = s.year()) < 0 && e++;
        for (var t = s.day(), d = 1; d < s.month(); d++)
          t += this.daysPerMonth[d - 1];
        return t + x.toJD(e + 1468, 3, 13);
      }, fromJD: function(e) {
        e = Math.floor(e + 0.5);
        for (var r = Math.floor((e - (this.jdEpoch - 1)) / 366); e >= this.toJD(r + 1, 1, 1); )
          r++;
        for (var n = e - Math.floor(this.toJD(r, 1, 1) + 0.5) + 1, s = 1; n > this.daysInMonth(r, s); )
          n -= this.daysInMonth(r, s), s++;
        return this.newDate(r, s, n);
      } }), m.calendars.nanakshahi = k;
    }, { "../main": 347, "object-assign": 247 }], 342: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(x) {
        this.local = this.regionalOptions[x || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Nepali", jdEpoch: 17007095e-1, daysPerMonth: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, daysPerYear: 365, regionalOptions: { "": { name: "Nepali", epochs: ["BBS", "ABS"], monthNames: ["Baisakh", "Jestha", "Ashadh", "Shrawan", "Bhadra", "Ashwin", "Kartik", "Mangsir", "Paush", "Mangh", "Falgun", "Chaitra"], monthNamesShort: ["Bai", "Je", "As", "Shra", "Bha", "Ash", "Kar", "Mang", "Pau", "Ma", "Fal", "Chai"], dayNames: ["Aaitabaar", "Sombaar", "Manglbaar", "Budhabaar", "Bihibaar", "Shukrabaar", "Shanibaar"], dayNamesShort: ["Aaita", "Som", "Mangl", "Budha", "Bihi", "Shukra", "Shani"], dayNamesMin: ["Aai", "So", "Man", "Bu", "Bi", "Shu", "Sha"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 1, isRTL: !1 } }, leapYear: function(x) {
        return this.daysInYear(x) !== this.daysPerYear;
      }, weekOfYear: function(x, e, r) {
        var n = this.newDate(x, e, r);
        return n.add(-n.dayOfWeek(), "d"), Math.floor((n.dayOfYear() - 1) / 7) + 1;
      }, daysInYear: function(x) {
        if (x = this._validate(x, this.minMonth, this.minDay, m.local.invalidYear).year(), this.NEPALI_CALENDAR_DATA[x] === void 0)
          return this.daysPerYear;
        for (var e = 0, r = this.minMonth; r <= 12; r++)
          e += this.NEPALI_CALENDAR_DATA[x][r];
        return e;
      }, daysInMonth: function(x, e) {
        return x.year && (e = x.month(), x = x.year()), this._validate(x, e, this.minDay, m.local.invalidMonth), this.NEPALI_CALENDAR_DATA[x] === void 0 ? this.daysPerMonth[e - 1] : this.NEPALI_CALENDAR_DATA[x][e];
      }, weekDay: function(x, e, r) {
        return this.dayOfWeek(x, e, r) !== 6;
      }, toJD: function(x, e, r) {
        var n = this._validate(x, e, r, m.local.invalidDate);
        x = n.year(), e = n.month(), r = n.day();
        var s = m.instance(), t = 0, d = e, u = x;
        this._createMissingCalendarData(x);
        var o = x - (d > 9 || d === 9 && r >= this.NEPALI_CALENDAR_DATA[u][0] ? 56 : 57);
        for (e !== 9 && (t = r, d--); d !== 9; )
          d <= 0 && (d = 12, u--), t += this.NEPALI_CALENDAR_DATA[u][d], d--;
        return e === 9 ? (t += r - this.NEPALI_CALENDAR_DATA[u][0]) < 0 && (t += s.daysInYear(o)) : t += this.NEPALI_CALENDAR_DATA[u][9] - this.NEPALI_CALENDAR_DATA[u][0], s.newDate(o, 1, 1).add(t, "d").toJD();
      }, fromJD: function(x) {
        var e = m.instance().fromJD(x), r = e.year(), n = e.dayOfYear(), s = r + 56;
        this._createMissingCalendarData(s);
        for (var t = 9, d = this.NEPALI_CALENDAR_DATA[s][0], u = this.NEPALI_CALENDAR_DATA[s][t] - d + 1; n > u; )
          ++t > 12 && (t = 1, s++), u += this.NEPALI_CALENDAR_DATA[s][t];
        var o = this.NEPALI_CALENDAR_DATA[s][t] - (u - n);
        return this.newDate(s, t, o);
      }, _createMissingCalendarData: function(x) {
        var e = this.daysPerMonth.slice(0);
        e.unshift(17);
        for (var r = x - 1; r < x + 2; r++)
          this.NEPALI_CALENDAR_DATA[r] === void 0 && (this.NEPALI_CALENDAR_DATA[r] = e);
      }, NEPALI_CALENDAR_DATA: { 1970: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1971: [18, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 1972: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 1973: [19, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 1974: [19, 31, 31, 32, 30, 31, 31, 30, 29, 30, 29, 30, 30], 1975: [18, 31, 31, 32, 32, 30, 31, 30, 29, 30, 29, 30, 30], 1976: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1977: [18, 31, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], 1978: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1979: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1980: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1981: [18, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 1982: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1983: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1984: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1985: [18, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 1986: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1987: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1988: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1989: [18, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 1990: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1991: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1992: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 1993: [18, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 1994: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1995: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 1996: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 1997: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1998: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1999: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2e3: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2001: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2002: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2003: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2004: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2005: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2006: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2007: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2008: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 2009: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2010: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2011: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2012: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2013: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2014: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2015: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2016: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2017: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2018: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2019: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2020: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2021: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2022: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2023: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2024: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2025: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2026: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2027: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2028: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2029: [18, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 2030: [17, 31, 32, 31, 32, 31, 30, 30, 30, 30, 30, 30, 31], 2031: [17, 31, 32, 31, 32, 31, 31, 31, 31, 31, 31, 31, 31], 2032: [17, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32], 2033: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2034: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2035: [17, 30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 2036: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2037: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2038: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2039: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2040: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2041: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2042: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2043: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2044: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2045: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2046: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2047: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2048: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2049: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2050: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2051: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2052: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2053: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2054: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2055: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 29, 30], 2056: [17, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 2057: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2058: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2059: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2060: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2061: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2062: [17, 30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], 2063: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2064: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2065: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2066: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 2067: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2068: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2069: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2070: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2071: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2072: [17, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2073: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2074: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2075: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2076: [16, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2077: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2078: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2079: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2080: [16, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2081: [17, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2082: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2083: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], 2084: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], 2085: [17, 31, 32, 31, 32, 31, 31, 30, 30, 29, 30, 30, 30], 2086: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2087: [16, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], 2088: [16, 30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30], 2089: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2090: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2091: [16, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], 2092: [16, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2093: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2094: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], 2095: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30], 2096: [17, 30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2097: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2098: [17, 31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 30, 31], 2099: [17, 31, 31, 32, 31, 31, 31, 30, 29, 29, 30, 30, 30], 2100: [17, 31, 32, 31, 32, 30, 31, 30, 29, 30, 29, 30, 30] } }), m.calendars.nepali = k;
    }, { "../main": 347, "object-assign": 247 }], 343: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      function x(e, r) {
        return e - r * Math.floor(e / r);
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "Persian", jdEpoch: 19483205e-1, daysPerMonth: [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Persian", epochs: ["BP", "AP"], monthNames: ["Farvardin", "Ordibehesht", "Khordad", "Tir", "Mordad", "Shahrivar", "Mehr", "Aban", "Azar", "Day", "Bahman", "Esfand"], monthNamesShort: ["Far", "Ord", "Kho", "Tir", "Mor", "Sha", "Meh", "Aba", "Aza", "Day", "Bah", "Esf"], dayNames: ["Yekshambe", "Doshambe", "Seshambe", "Ch\xE6harshambe", "Panjshambe", "Jom'e", "Shambe"], dayNamesShort: ["Yek", "Do", "Se", "Ch\xE6", "Panj", "Jom", "Sha"], dayNamesMin: ["Ye", "Do", "Se", "Ch", "Pa", "Jo", "Sh"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 6, isRTL: !1 } }, leapYear: function(e) {
        var r = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return 682 * ((r.year() - (r.year() > 0 ? 474 : 473)) % 2820 + 474 + 38) % 2816 < 682;
      }, weekOfYear: function(e, r, n) {
        var s = this.newDate(e, r, n);
        return s.add(-(s.dayOfWeek() + 1) % 7, "d"), Math.floor((s.dayOfYear() - 1) / 7) + 1;
      }, daysInMonth: function(e, r) {
        var n = this._validate(e, r, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[n.month() - 1] + (n.month() === 12 && this.leapYear(n.year()) ? 1 : 0);
      }, weekDay: function(e, r, n) {
        return this.dayOfWeek(e, r, n) !== 5;
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        e = s.year(), r = s.month(), n = s.day();
        var t = e - (e >= 0 ? 474 : 473), d = 474 + x(t, 2820);
        return n + (r <= 7 ? 31 * (r - 1) : 30 * (r - 1) + 6) + Math.floor((682 * d - 110) / 2816) + 365 * (d - 1) + 1029983 * Math.floor(t / 2820) + this.jdEpoch - 1;
      }, fromJD: function(e) {
        var r = (e = Math.floor(e) + 0.5) - this.toJD(475, 1, 1), n = Math.floor(r / 1029983), s = x(r, 1029983), t = 2820;
        if (s !== 1029982) {
          var d = Math.floor(s / 366), u = x(s, 366);
          t = Math.floor((2134 * d + 2816 * u + 2815) / 1028522) + d + 1;
        }
        var o = t + 2820 * n + 474;
        o = o <= 0 ? o - 1 : o;
        var h = e - this.toJD(o, 1, 1) + 1, l = h <= 186 ? Math.ceil(h / 31) : Math.ceil((h - 6) / 30), i = e - this.toJD(o, l, 1) + 1;
        return this.newDate(o, l, i);
      } }), m.calendars.persian = k, m.calendars.jalali = k;
    }, { "../main": 347, "object-assign": 247 }], 344: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign"), k = m.instance();
      function x(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      x.prototype = new m.baseCalendar(), g(x.prototype, { name: "Taiwan", jdEpoch: 24194025e-1, yearsOffset: 1911, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Taiwan", epochs: ["BROC", "ROC"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 1, isRTL: !1 } }, leapYear: function(e) {
        var r = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return e = this._t2gYear(r.year()), k.leapYear(e);
      }, weekOfYear: function(e, r, n) {
        var s = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return e = this._t2gYear(s.year()), k.weekOfYear(e, s.month(), s.day());
      }, daysInMonth: function(e, r) {
        var n = this._validate(e, r, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[n.month() - 1] + (n.month() === 2 && this.leapYear(n.year()) ? 1 : 0);
      }, weekDay: function(e, r, n) {
        return (this.dayOfWeek(e, r, n) || 7) < 6;
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        return e = this._t2gYear(s.year()), k.toJD(e, s.month(), s.day());
      }, fromJD: function(e) {
        var r = k.fromJD(e), n = this._g2tYear(r.year());
        return this.newDate(n, r.month(), r.day());
      }, _t2gYear: function(e) {
        return e + this.yearsOffset + (e >= -this.yearsOffset && e <= -1 ? 1 : 0);
      }, _g2tYear: function(e) {
        return e - this.yearsOffset - (e >= 1 && e <= this.yearsOffset ? 1 : 0);
      } }), m.calendars.taiwan = x;
    }, { "../main": 347, "object-assign": 247 }], 345: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign"), k = m.instance();
      function x(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      x.prototype = new m.baseCalendar(), g(x.prototype, { name: "Thai", jdEpoch: 15230985e-1, yearsOffset: 543, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Thai", epochs: ["BBE", "BE"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(e) {
        var r = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return e = this._t2gYear(r.year()), k.leapYear(e);
      }, weekOfYear: function(e, r, n) {
        var s = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return e = this._t2gYear(s.year()), k.weekOfYear(e, s.month(), s.day());
      }, daysInMonth: function(e, r) {
        var n = this._validate(e, r, this.minDay, m.local.invalidMonth);
        return this.daysPerMonth[n.month() - 1] + (n.month() === 2 && this.leapYear(n.year()) ? 1 : 0);
      }, weekDay: function(e, r, n) {
        return (this.dayOfWeek(e, r, n) || 7) < 6;
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate);
        return e = this._t2gYear(s.year()), k.toJD(e, s.month(), s.day());
      }, fromJD: function(e) {
        var r = k.fromJD(e), n = this._g2tYear(r.year());
        return this.newDate(n, r.month(), r.day());
      }, _t2gYear: function(e) {
        return e - this.yearsOffset - (e >= 1 && e <= this.yearsOffset ? 1 : 0);
      }, _g2tYear: function(e) {
        return e + this.yearsOffset + (e >= -this.yearsOffset && e <= -1 ? 1 : 0);
      } }), m.calendars.thai = x;
    }, { "../main": 347, "object-assign": 247 }], 346: [function(v, Q, $) {
      var m = v("../main"), g = v("object-assign");
      function k(e) {
        this.local = this.regionalOptions[e || ""] || this.regionalOptions[""];
      }
      k.prototype = new m.baseCalendar(), g(k.prototype, { name: "UmmAlQura", hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Umm al-Qura", epochs: ["BH", "AH"], monthNames: ["Al-Muharram", "Safar", "Rabi' al-awwal", "Rabi' Al-Thani", "Jumada Al-Awwal", "Jumada Al-Thani", "Rajab", "Sha'aban", "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah"], monthNamesShort: ["Muh", "Saf", "Rab1", "Rab2", "Jum1", "Jum2", "Raj", "Sha'", "Ram", "Shaw", "DhuQ", "DhuH"], dayNames: ["Yawm al-Ahad", "Yawm al-Ithnain", "Yawm al-Thal\u0101th\u0101\u2019", "Yawm al-Arba\u2018\u0101\u2019", "Yawm al-Kham\u012Bs", "Yawm al-Jum\u2018a", "Yawm al-Sabt"], dayNamesMin: ["Ah", "Ith", "Th", "Ar", "Kh", "Ju", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 6, isRTL: !0 } }, leapYear: function(e) {
        var r = this._validate(e, this.minMonth, this.minDay, m.local.invalidYear);
        return this.daysInYear(r.year()) === 355;
      }, weekOfYear: function(e, r, n) {
        var s = this.newDate(e, r, n);
        return s.add(-s.dayOfWeek(), "d"), Math.floor((s.dayOfYear() - 1) / 7) + 1;
      }, daysInYear: function(e) {
        for (var r = 0, n = 1; n <= 12; n++)
          r += this.daysInMonth(e, n);
        return r;
      }, daysInMonth: function(e, r) {
        for (var n = this._validate(e, r, this.minDay, m.local.invalidMonth).toJD() - 24e5 + 0.5, s = 0, t = 0; t < x.length; t++) {
          if (x[t] > n)
            return x[s] - x[s - 1];
          s++;
        }
        return 30;
      }, weekDay: function(e, r, n) {
        return this.dayOfWeek(e, r, n) !== 5;
      }, toJD: function(e, r, n) {
        var s = this._validate(e, r, n, m.local.invalidDate), t = 12 * (s.year() - 1) + s.month() - 15292;
        return s.day() + x[t - 1] - 1 + 24e5 - 0.5;
      }, fromJD: function(e) {
        for (var r = e - 24e5 + 0.5, n = 0, s = 0; s < x.length && !(x[s] > r); s++)
          n++;
        var t = n + 15292, d = Math.floor((t - 1) / 12), u = d + 1, o = t - 12 * d, h = r - x[n - 1] + 1;
        return this.newDate(u, o, h);
      }, isValid: function(e, r, n) {
        var s = m.baseCalendar.prototype.isValid.apply(this, arguments);
        return s && (s = (e = e.year != null ? e.year : e) >= 1276 && e <= 1500), s;
      }, _validate: function(e, r, n, s) {
        var t = m.baseCalendar.prototype._validate.apply(this, arguments);
        if (t.year < 1276 || t.year > 1500)
          throw s.replace(/\{0\}/, this.local.name);
        return t;
      } }), m.calendars.ummalqura = k;
      var x = [20, 50, 79, 109, 138, 168, 197, 227, 256, 286, 315, 345, 374, 404, 433, 463, 492, 522, 551, 581, 611, 641, 670, 700, 729, 759, 788, 818, 847, 877, 906, 936, 965, 995, 1024, 1054, 1083, 1113, 1142, 1172, 1201, 1231, 1260, 1290, 1320, 1350, 1379, 1409, 1438, 1468, 1497, 1527, 1556, 1586, 1615, 1645, 1674, 1704, 1733, 1763, 1792, 1822, 1851, 1881, 1910, 1940, 1969, 1999, 2028, 2058, 2087, 2117, 2146, 2176, 2205, 2235, 2264, 2294, 2323, 2353, 2383, 2413, 2442, 2472, 2501, 2531, 2560, 2590, 2619, 2649, 2678, 2708, 2737, 2767, 2796, 2826, 2855, 2885, 2914, 2944, 2973, 3003, 3032, 3062, 3091, 3121, 3150, 3180, 3209, 3239, 3268, 3298, 3327, 3357, 3386, 3416, 3446, 3476, 3505, 3535, 3564, 3594, 3623, 3653, 3682, 3712, 3741, 3771, 3800, 3830, 3859, 3889, 3918, 3948, 3977, 4007, 4036, 4066, 4095, 4125, 4155, 4185, 4214, 4244, 4273, 4303, 4332, 4362, 4391, 4421, 4450, 4480, 4509, 4539, 4568, 4598, 4627, 4657, 4686, 4716, 4745, 4775, 4804, 4834, 4863, 4893, 4922, 4952, 4981, 5011, 5040, 5070, 5099, 5129, 5158, 5188, 5218, 5248, 5277, 5307, 5336, 5366, 5395, 5425, 5454, 5484, 5513, 5543, 5572, 5602, 5631, 5661, 5690, 5720, 5749, 5779, 5808, 5838, 5867, 5897, 5926, 5956, 5985, 6015, 6044, 6074, 6103, 6133, 6162, 6192, 6221, 6251, 6281, 6311, 6340, 6370, 6399, 6429, 6458, 6488, 6517, 6547, 6576, 6606, 6635, 6665, 6694, 6724, 6753, 6783, 6812, 6842, 6871, 6901, 6930, 6960, 6989, 7019, 7048, 7078, 7107, 7137, 7166, 7196, 7225, 7255, 7284, 7314, 7344, 7374, 7403, 7433, 7462, 7492, 7521, 7551, 7580, 7610, 7639, 7669, 7698, 7728, 7757, 7787, 7816, 7846, 7875, 7905, 7934, 7964, 7993, 8023, 8053, 8083, 8112, 8142, 8171, 8201, 8230, 8260, 8289, 8319, 8348, 8378, 8407, 8437, 8466, 8496, 8525, 8555, 8584, 8614, 8643, 8673, 8702, 8732, 8761, 8791, 8821, 8850, 8880, 8909, 8938, 8968, 8997, 9027, 9056, 9086, 9115, 9145, 9175, 9205, 9234, 9264, 9293, 9322, 9352, 9381, 9410, 9440, 9470, 9499, 9529, 9559, 9589, 9618, 9648, 9677, 9706, 9736, 9765, 9794, 9824, 9853, 9883, 9913, 9943, 9972, 10002, 10032, 10061, 10090, 10120, 10149, 10178, 10208, 10237, 10267, 10297, 10326, 10356, 10386, 10415, 10445, 10474, 10504, 10533, 10562, 10592, 10621, 10651, 10680, 10710, 10740, 10770, 10799, 10829, 10858, 10888, 10917, 10947, 10976, 11005, 11035, 11064, 11094, 11124, 11153, 11183, 11213, 11242, 11272, 11301, 11331, 11360, 11389, 11419, 11448, 11478, 11507, 11537, 11567, 11596, 11626, 11655, 11685, 11715, 11744, 11774, 11803, 11832, 11862, 11891, 11921, 11950, 11980, 12010, 12039, 12069, 12099, 12128, 12158, 12187, 12216, 12246, 12275, 12304, 12334, 12364, 12393, 12423, 12453, 12483, 12512, 12542, 12571, 12600, 12630, 12659, 12688, 12718, 12747, 12777, 12807, 12837, 12866, 12896, 12926, 12955, 12984, 13014, 13043, 13072, 13102, 13131, 13161, 13191, 13220, 13250, 13280, 13310, 13339, 13368, 13398, 13427, 13456, 13486, 13515, 13545, 13574, 13604, 13634, 13664, 13693, 13723, 13752, 13782, 13811, 13840, 13870, 13899, 13929, 13958, 13988, 14018, 14047, 14077, 14107, 14136, 14166, 14195, 14224, 14254, 14283, 14313, 14342, 14372, 14401, 14431, 14461, 14490, 14520, 14550, 14579, 14609, 14638, 14667, 14697, 14726, 14756, 14785, 14815, 14844, 14874, 14904, 14933, 14963, 14993, 15021, 15051, 15081, 15110, 15140, 15169, 15199, 15228, 15258, 15287, 15317, 15347, 15377, 15406, 15436, 15465, 15494, 15524, 15553, 15582, 15612, 15641, 15671, 15701, 15731, 15760, 15790, 15820, 15849, 15878, 15908, 15937, 15966, 15996, 16025, 16055, 16085, 16114, 16144, 16174, 16204, 16233, 16262, 16292, 16321, 16350, 16380, 16409, 16439, 16468, 16498, 16528, 16558, 16587, 16617, 16646, 16676, 16705, 16734, 16764, 16793, 16823, 16852, 16882, 16912, 16941, 16971, 17001, 17030, 17060, 17089, 17118, 17148, 17177, 17207, 17236, 17266, 17295, 17325, 17355, 17384, 17414, 17444, 17473, 17502, 17532, 17561, 17591, 17620, 17650, 17679, 17709, 17738, 17768, 17798, 17827, 17857, 17886, 17916, 17945, 17975, 18004, 18034, 18063, 18093, 18122, 18152, 18181, 18211, 18241, 18270, 18300, 18330, 18359, 18388, 18418, 18447, 18476, 18506, 18535, 18565, 18595, 18625, 18654, 18684, 18714, 18743, 18772, 18802, 18831, 18860, 18890, 18919, 18949, 18979, 19008, 19038, 19068, 19098, 19127, 19156, 19186, 19215, 19244, 19274, 19303, 19333, 19362, 19392, 19422, 19452, 19481, 19511, 19540, 19570, 19599, 19628, 19658, 19687, 19717, 19746, 19776, 19806, 19836, 19865, 19895, 19924, 19954, 19983, 20012, 20042, 20071, 20101, 20130, 20160, 20190, 20219, 20249, 20279, 20308, 20338, 20367, 20396, 20426, 20455, 20485, 20514, 20544, 20573, 20603, 20633, 20662, 20692, 20721, 20751, 20780, 20810, 20839, 20869, 20898, 20928, 20957, 20987, 21016, 21046, 21076, 21105, 21135, 21164, 21194, 21223, 21253, 21282, 21312, 21341, 21371, 21400, 21430, 21459, 21489, 21519, 21548, 21578, 21607, 21637, 21666, 21696, 21725, 21754, 21784, 21813, 21843, 21873, 21902, 21932, 21962, 21991, 22021, 22050, 22080, 22109, 22138, 22168, 22197, 22227, 22256, 22286, 22316, 22346, 22375, 22405, 22434, 22464, 22493, 22522, 22552, 22581, 22611, 22640, 22670, 22700, 22730, 22759, 22789, 22818, 22848, 22877, 22906, 22936, 22965, 22994, 23024, 23054, 23083, 23113, 23143, 23173, 23202, 23232, 23261, 23290, 23320, 23349, 23379, 23408, 23438, 23467, 23497, 23527, 23556, 23586, 23616, 23645, 23674, 23704, 23733, 23763, 23792, 23822, 23851, 23881, 23910, 23940, 23970, 23999, 24029, 24058, 24088, 24117, 24147, 24176, 24206, 24235, 24265, 24294, 24324, 24353, 24383, 24413, 24442, 24472, 24501, 24531, 24560, 24590, 24619, 24648, 24678, 24707, 24737, 24767, 24796, 24826, 24856, 24885, 24915, 24944, 24974, 25003, 25032, 25062, 25091, 25121, 25150, 25180, 25210, 25240, 25269, 25299, 25328, 25358, 25387, 25416, 25446, 25475, 25505, 25534, 25564, 25594, 25624, 25653, 25683, 25712, 25742, 25771, 25800, 25830, 25859, 25888, 25918, 25948, 25977, 26007, 26037, 26067, 26096, 26126, 26155, 26184, 26214, 26243, 26272, 26302, 26332, 26361, 26391, 26421, 26451, 26480, 26510, 26539, 26568, 26598, 26627, 26656, 26686, 26715, 26745, 26775, 26805, 26834, 26864, 26893, 26923, 26952, 26982, 27011, 27041, 27070, 27099, 27129, 27159, 27188, 27218, 27248, 27277, 27307, 27336, 27366, 27395, 27425, 27454, 27484, 27513, 27542, 27572, 27602, 27631, 27661, 27691, 27720, 27750, 27779, 27809, 27838, 27868, 27897, 27926, 27956, 27985, 28015, 28045, 28074, 28104, 28134, 28163, 28193, 28222, 28252, 28281, 28310, 28340, 28369, 28399, 28428, 28458, 28488, 28517, 28547, 28577, 28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348, 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939, 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530, 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120, 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711, 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302, 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893, 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483, 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074, 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665, 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254, 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845, 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436, 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027, 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617, 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208, 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798, 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389, 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980, 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570, 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161, 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751, 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342, 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932, 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523, 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114, 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704, 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295, 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885, 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476, 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066, 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657, 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248, 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838, 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429, 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019, 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611, 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200, 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792, 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383, 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973, 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564, 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154, 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745, 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335, 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926, 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517, 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107, 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698, 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288, 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879, 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469, 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061, 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651, 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242, 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832, 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423, 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014, 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603, 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195, 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785, 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376, 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967, 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557, 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68e3, 68030, 68060, 68089, 68119, 68148, 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738, 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330, 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919, 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510, 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101, 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691, 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282, 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872, 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464, 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053, 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645, 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235, 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826, 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416, 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007, 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598, 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188, 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779, 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369, 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960, 79990];
    }, { "../main": 347, "object-assign": 247 }], 347: [function(v, Q, $) {
      var m = v("object-assign");
      function g() {
        this.regionalOptions = [], this.regionalOptions[""] = { invalidCalendar: "Calendar {0} not found", invalidDate: "Invalid {0} date", invalidMonth: "Invalid {0} month", invalidYear: "Invalid {0} year", differentCalendars: "Cannot mix {0} and {1} dates" }, this.local = this.regionalOptions[""], this.calendars = {}, this._localCals = {};
      }
      function k(s, t, d, u) {
        if (this._calendar = s, this._year = t, this._month = d, this._day = u, this._calendar._validateLevel === 0 && !this._calendar.isValid(this._year, this._month, this._day))
          throw (n.local.invalidDate || n.regionalOptions[""].invalidDate).replace(/\{0\}/, this._calendar.local.name);
      }
      function x(s, t) {
        return "000000".substring(0, t - (s = "" + s).length) + s;
      }
      function e() {
        this.shortYearCutoff = "+10";
      }
      function r(s) {
        this.local = this.regionalOptions[s] || this.regionalOptions[""];
      }
      m(g.prototype, { instance: function(s, t) {
        s = (s || "gregorian").toLowerCase(), t = t || "";
        var d = this._localCals[s + "-" + t];
        if (!d && this.calendars[s] && (d = new this.calendars[s](t), this._localCals[s + "-" + t] = d), !d)
          throw (this.local.invalidCalendar || this.regionalOptions[""].invalidCalendar).replace(/\{0\}/, s);
        return d;
      }, newDate: function(s, t, d, u, o) {
        return (u = (s != null && s.year ? s.calendar() : typeof u == "string" ? this.instance(u, o) : u) || this.instance()).newDate(s, t, d);
      }, substituteDigits: function(s) {
        return function(t) {
          return (t + "").replace(/[0-9]/g, function(d) {
            return s[d];
          });
        };
      }, substituteChineseDigits: function(s, t) {
        return function(d) {
          for (var u = "", o = 0; d > 0; ) {
            var h = d % 10;
            u = (h === 0 ? "" : s[h] + t[o]) + u, o++, d = Math.floor(d / 10);
          }
          return u.indexOf(s[1] + t[1]) === 0 && (u = u.substr(1)), u || s[0];
        };
      } }), m(k.prototype, { newDate: function(s, t, d) {
        return this._calendar.newDate(s == null ? this : s, t, d);
      }, year: function(s) {
        return arguments.length === 0 ? this._year : this.set(s, "y");
      }, month: function(s) {
        return arguments.length === 0 ? this._month : this.set(s, "m");
      }, day: function(s) {
        return arguments.length === 0 ? this._day : this.set(s, "d");
      }, date: function(s, t, d) {
        if (!this._calendar.isValid(s, t, d))
          throw (n.local.invalidDate || n.regionalOptions[""].invalidDate).replace(/\{0\}/, this._calendar.local.name);
        return this._year = s, this._month = t, this._day = d, this;
      }, leapYear: function() {
        return this._calendar.leapYear(this);
      }, epoch: function() {
        return this._calendar.epoch(this);
      }, formatYear: function() {
        return this._calendar.formatYear(this);
      }, monthOfYear: function() {
        return this._calendar.monthOfYear(this);
      }, weekOfYear: function() {
        return this._calendar.weekOfYear(this);
      }, daysInYear: function() {
        return this._calendar.daysInYear(this);
      }, dayOfYear: function() {
        return this._calendar.dayOfYear(this);
      }, daysInMonth: function() {
        return this._calendar.daysInMonth(this);
      }, dayOfWeek: function() {
        return this._calendar.dayOfWeek(this);
      }, weekDay: function() {
        return this._calendar.weekDay(this);
      }, extraInfo: function() {
        return this._calendar.extraInfo(this);
      }, add: function(s, t) {
        return this._calendar.add(this, s, t);
      }, set: function(s, t) {
        return this._calendar.set(this, s, t);
      }, compareTo: function(s) {
        if (this._calendar.name !== s._calendar.name)
          throw (n.local.differentCalendars || n.regionalOptions[""].differentCalendars).replace(/\{0\}/, this._calendar.local.name).replace(/\{1\}/, s._calendar.local.name);
        var t = this._year !== s._year ? this._year - s._year : this._month !== s._month ? this.monthOfYear() - s.monthOfYear() : this._day - s._day;
        return t === 0 ? 0 : t < 0 ? -1 : 1;
      }, calendar: function() {
        return this._calendar;
      }, toJD: function() {
        return this._calendar.toJD(this);
      }, fromJD: function(s) {
        return this._calendar.fromJD(s);
      }, toJSDate: function() {
        return this._calendar.toJSDate(this);
      }, fromJSDate: function(s) {
        return this._calendar.fromJSDate(s);
      }, toString: function() {
        return (this.year() < 0 ? "-" : "") + x(Math.abs(this.year()), 4) + "-" + x(this.month(), 2) + "-" + x(this.day(), 2);
      } }), m(e.prototype, { _validateLevel: 0, newDate: function(s, t, d) {
        return s == null ? this.today() : (s.year && (this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate), d = s.day(), t = s.month(), s = s.year()), new k(this, s, t, d));
      }, today: function() {
        return this.fromJSDate(new Date());
      }, epoch: function(s) {
        return this._validate(s, this.minMonth, this.minDay, n.local.invalidYear || n.regionalOptions[""].invalidYear).year() < 0 ? this.local.epochs[0] : this.local.epochs[1];
      }, formatYear: function(s) {
        var t = this._validate(s, this.minMonth, this.minDay, n.local.invalidYear || n.regionalOptions[""].invalidYear);
        return (t.year() < 0 ? "-" : "") + x(Math.abs(t.year()), 4);
      }, monthsInYear: function(s) {
        return this._validate(s, this.minMonth, this.minDay, n.local.invalidYear || n.regionalOptions[""].invalidYear), 12;
      }, monthOfYear: function(s, t) {
        var d = this._validate(s, t, this.minDay, n.local.invalidMonth || n.regionalOptions[""].invalidMonth);
        return (d.month() + this.monthsInYear(d) - this.firstMonth) % this.monthsInYear(d) + this.minMonth;
      }, fromMonthOfYear: function(s, t) {
        var d = (t + this.firstMonth - 2 * this.minMonth) % this.monthsInYear(s) + this.minMonth;
        return this._validate(s, d, this.minDay, n.local.invalidMonth || n.regionalOptions[""].invalidMonth), d;
      }, daysInYear: function(s) {
        var t = this._validate(s, this.minMonth, this.minDay, n.local.invalidYear || n.regionalOptions[""].invalidYear);
        return this.leapYear(t) ? 366 : 365;
      }, dayOfYear: function(s, t, d) {
        var u = this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate);
        return u.toJD() - this.newDate(u.year(), this.fromMonthOfYear(u.year(), this.minMonth), this.minDay).toJD() + 1;
      }, daysInWeek: function() {
        return 7;
      }, dayOfWeek: function(s, t, d) {
        var u = this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate);
        return (Math.floor(this.toJD(u)) + 2) % this.daysInWeek();
      }, extraInfo: function(s, t, d) {
        return this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate), {};
      }, add: function(s, t, d) {
        return this._validate(s, this.minMonth, this.minDay, n.local.invalidDate || n.regionalOptions[""].invalidDate), this._correctAdd(s, this._add(s, t, d), t, d);
      }, _add: function(s, t, d) {
        if (this._validateLevel++, d === "d" || d === "w") {
          var u = s.toJD() + t * (d === "w" ? this.daysInWeek() : 1), o = s.calendar().fromJD(u);
          return this._validateLevel--, [o.year(), o.month(), o.day()];
        }
        try {
          var h = s.year() + (d === "y" ? t : 0), l = s.monthOfYear() + (d === "m" ? t : 0);
          o = s.day(), d === "y" ? (s.month() !== this.fromMonthOfYear(h, l) && (l = this.newDate(h, s.month(), this.minDay).monthOfYear()), l = Math.min(l, this.monthsInYear(h)), o = Math.min(o, this.daysInMonth(h, this.fromMonthOfYear(h, l)))) : d === "m" && (function(p) {
            for (; l < p.minMonth; )
              h--, l += p.monthsInYear(h);
            for (var c = p.monthsInYear(h); l > c - 1 + p.minMonth; )
              h++, l -= c, c = p.monthsInYear(h);
          }(this), o = Math.min(o, this.daysInMonth(h, this.fromMonthOfYear(h, l))));
          var i = [h, this.fromMonthOfYear(h, l), o];
          return this._validateLevel--, i;
        } catch (p) {
          throw this._validateLevel--, p;
        }
      }, _correctAdd: function(s, t, d, u) {
        if (!(this.hasYearZero || u !== "y" && u !== "m" || t[0] !== 0 && s.year() > 0 == t[0] > 0)) {
          var o = { y: [1, 1, "y"], m: [1, this.monthsInYear(-1), "m"], w: [this.daysInWeek(), this.daysInYear(-1), "d"], d: [1, this.daysInYear(-1), "d"] }[u], h = d < 0 ? -1 : 1;
          t = this._add(s, d * o[0] + h * o[1], o[2]);
        }
        return s.date(t[0], t[1], t[2]);
      }, set: function(s, t, d) {
        this._validate(s, this.minMonth, this.minDay, n.local.invalidDate || n.regionalOptions[""].invalidDate);
        var u = d === "y" ? t : s.year(), o = d === "m" ? t : s.month(), h = d === "d" ? t : s.day();
        return d !== "y" && d !== "m" || (h = Math.min(h, this.daysInMonth(u, o))), s.date(u, o, h);
      }, isValid: function(s, t, d) {
        this._validateLevel++;
        var u = this.hasYearZero || s !== 0;
        if (u) {
          var o = this.newDate(s, t, this.minDay);
          u = t >= this.minMonth && t - this.minMonth < this.monthsInYear(o) && d >= this.minDay && d - this.minDay < this.daysInMonth(o);
        }
        return this._validateLevel--, u;
      }, toJSDate: function(s, t, d) {
        var u = this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate);
        return n.instance().fromJD(this.toJD(u)).toJSDate();
      }, fromJSDate: function(s) {
        return this.fromJD(n.instance().fromJSDate(s).toJD());
      }, _validate: function(s, t, d, u) {
        if (s.year) {
          if (this._validateLevel === 0 && this.name !== s.calendar().name)
            throw (n.local.differentCalendars || n.regionalOptions[""].differentCalendars).replace(/\{0\}/, this.local.name).replace(/\{1\}/, s.calendar().local.name);
          return s;
        }
        try {
          if (this._validateLevel++, this._validateLevel === 1 && !this.isValid(s, t, d))
            throw u.replace(/\{0\}/, this.local.name);
          var o = this.newDate(s, t, d);
          return this._validateLevel--, o;
        } catch (h) {
          throw this._validateLevel--, h;
        }
      } }), r.prototype = new e(), m(r.prototype, { name: "Gregorian", jdEpoch: 17214255e-1, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Gregorian", epochs: ["BCE", "CE"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "mm/dd/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(s) {
        var t = this._validate(s, this.minMonth, this.minDay, n.local.invalidYear || n.regionalOptions[""].invalidYear);
        return (s = t.year() + (t.year() < 0 ? 1 : 0)) % 4 == 0 && (s % 100 != 0 || s % 400 == 0);
      }, weekOfYear: function(s, t, d) {
        var u = this.newDate(s, t, d);
        return u.add(4 - (u.dayOfWeek() || 7), "d"), Math.floor((u.dayOfYear() - 1) / 7) + 1;
      }, daysInMonth: function(s, t) {
        var d = this._validate(s, t, this.minDay, n.local.invalidMonth || n.regionalOptions[""].invalidMonth);
        return this.daysPerMonth[d.month() - 1] + (d.month() === 2 && this.leapYear(d.year()) ? 1 : 0);
      }, weekDay: function(s, t, d) {
        return (this.dayOfWeek(s, t, d) || 7) < 6;
      }, toJD: function(s, t, d) {
        var u = this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate);
        s = u.year(), t = u.month(), d = u.day(), s < 0 && s++, t < 3 && (t += 12, s--);
        var o = Math.floor(s / 100), h = 2 - o + Math.floor(o / 4);
        return Math.floor(365.25 * (s + 4716)) + Math.floor(30.6001 * (t + 1)) + d + h - 1524.5;
      }, fromJD: function(s) {
        var t = Math.floor(s + 0.5), d = Math.floor((t - 186721625e-2) / 36524.25), u = (d = t + 1 + d - Math.floor(d / 4)) + 1524, o = Math.floor((u - 122.1) / 365.25), h = Math.floor(365.25 * o), l = Math.floor((u - h) / 30.6001), i = u - h - Math.floor(30.6001 * l), p = l - (l > 13.5 ? 13 : 1), c = o - (p > 2.5 ? 4716 : 4715);
        return c <= 0 && c--, this.newDate(c, p, i);
      }, toJSDate: function(s, t, d) {
        var u = this._validate(s, t, d, n.local.invalidDate || n.regionalOptions[""].invalidDate), o = new Date(u.year(), u.month() - 1, u.day());
        return o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0), o.setHours(o.getHours() > 12 ? o.getHours() + 2 : 0), o;
      }, fromJSDate: function(s) {
        return this.newDate(s.getFullYear(), s.getMonth() + 1, s.getDate());
      } });
      var n = Q.exports = new g();
      n.cdate = k, n.baseCalendar = e, n.calendars.gregorian = r;
    }, { "object-assign": 247 }], 348: [function(v, Q, $) {
      var m = v("object-assign"), g = v("./main");
      m(g.regionalOptions[""], { invalidArguments: "Invalid arguments", invalidFormat: "Cannot format a date from another calendar", missingNumberAt: "Missing number at position {0}", unknownNameAt: "Unknown name at position {0}", unexpectedLiteralAt: "Unexpected literal at position {0}", unexpectedText: "Additional text found at end" }), g.local = g.regionalOptions[""], m(g.cdate.prototype, { formatDate: function(k, x) {
        return typeof k != "string" && (x = k, k = ""), this._calendar.formatDate(k || "", this, x);
      } }), m(g.baseCalendar.prototype, { UNIX_EPOCH: g.instance().newDate(1970, 1, 1).toJD(), SECS_PER_DAY: 86400, TICKS_EPOCH: g.instance().jdEpoch, TICKS_PER_DAY: 864e9, ATOM: "yyyy-mm-dd", COOKIE: "D, dd M yyyy", FULL: "DD, MM d, yyyy", ISO_8601: "yyyy-mm-dd", JULIAN: "J", RFC_822: "D, d M yy", RFC_850: "DD, dd-M-yy", RFC_1036: "D, d M yy", RFC_1123: "D, d M yyyy", RFC_2822: "D, d M yyyy", RSS: "D, d M yy", TICKS: "!", TIMESTAMP: "@", W3C: "yyyy-mm-dd", formatDate: function(k, x, e) {
        if (typeof k != "string" && (e = x, x = k, k = ""), !x)
          return "";
        if (x.calendar() !== this)
          throw g.local.invalidFormat || g.regionalOptions[""].invalidFormat;
        k = k || this.local.dateFormat;
        for (var r, n, s, t, d = (e = e || {}).dayNamesShort || this.local.dayNamesShort, u = e.dayNames || this.local.dayNames, o = e.monthNumbers || this.local.monthNumbers, h = e.monthNamesShort || this.local.monthNamesShort, l = e.monthNames || this.local.monthNames, i = (e.calculateWeek || this.local.calculateWeek, function(L, A) {
          for (var I = 1; T + I < k.length && k.charAt(T + I) === L; )
            I++;
          return T += I - 1, Math.floor(I / (A || 1)) > 1;
        }), p = function(L, A, I, P) {
          var S = "" + A;
          if (i(L, P))
            for (; S.length < I; )
              S = "0" + S;
          return S;
        }, c = this, a = function(L) {
          return typeof o == "function" ? o.call(c, L, i("m")) : _(p("m", L.month(), 2));
        }, y = function(L, A) {
          return A ? typeof l == "function" ? l.call(c, L) : l[L.month() - c.minMonth] : typeof h == "function" ? h.call(c, L) : h[L.month() - c.minMonth];
        }, f = this.local.digits, _ = function(L) {
          return e.localNumbers && f ? f(L) : L;
        }, b = "", w = !1, T = 0; T < k.length; T++)
          if (w)
            k.charAt(T) !== "'" || i("'") ? b += k.charAt(T) : w = !1;
          else
            switch (k.charAt(T)) {
              case "d":
                b += _(p("d", x.day(), 2));
                break;
              case "D":
                b += (r = "D", n = x.dayOfWeek(), s = d, t = u, i(r) ? t[n] : s[n]);
                break;
              case "o":
                b += p("o", x.dayOfYear(), 3);
                break;
              case "w":
                b += p("w", x.weekOfYear(), 2);
                break;
              case "m":
                b += a(x);
                break;
              case "M":
                b += y(x, i("M"));
                break;
              case "y":
                b += i("y", 2) ? x.year() : (x.year() % 100 < 10 ? "0" : "") + x.year() % 100;
                break;
              case "Y":
                i("Y", 2), b += x.formatYear();
                break;
              case "J":
                b += x.toJD();
                break;
              case "@":
                b += (x.toJD() - this.UNIX_EPOCH) * this.SECS_PER_DAY;
                break;
              case "!":
                b += (x.toJD() - this.TICKS_EPOCH) * this.TICKS_PER_DAY;
                break;
              case "'":
                i("'") ? b += "'" : w = !0;
                break;
              default:
                b += k.charAt(T);
            }
        return b;
      }, parseDate: function(k, x, e) {
        if (x == null)
          throw g.local.invalidArguments || g.regionalOptions[""].invalidArguments;
        if ((x = typeof x == "object" ? x.toString() : x + "") === "")
          return null;
        k = k || this.local.dateFormat;
        var r = (e = e || {}).shortYearCutoff || this.shortYearCutoff;
        r = typeof r != "string" ? r : this.today().year() % 100 + parseInt(r, 10);
        for (var n = e.dayNamesShort || this.local.dayNamesShort, s = e.dayNames || this.local.dayNames, t = e.parseMonth || this.local.parseMonth, d = e.monthNumbers || this.local.monthNumbers, u = e.monthNamesShort || this.local.monthNamesShort, o = e.monthNames || this.local.monthNames, h = -1, l = -1, i = -1, p = -1, c = -1, a = !1, y = !1, f = function(R, z) {
          for (var j = 1; P + j < k.length && k.charAt(P + j) === R; )
            j++;
          return P += j - 1, Math.floor(j / (z || 1)) > 1;
        }, _ = function(R, z) {
          var j = f(R, z), H = [2, 3, j ? 4 : 2, j ? 4 : 2, 10, 11, 20]["oyYJ@!".indexOf(R) + 1], Y = new RegExp("^-?\\d{1," + H + "}"), J = x.substring(I).match(Y);
          if (!J)
            throw (g.local.missingNumberAt || g.regionalOptions[""].missingNumberAt).replace(/\{0\}/, I);
          return I += J[0].length, parseInt(J[0], 10);
        }, b = this, w = function() {
          if (typeof d == "function") {
            f("m");
            var R = d.call(b, x.substring(I));
            return I += R.length, R;
          }
          return _("m");
        }, T = function(R, z, j, H) {
          for (var Y = f(R, H) ? j : z, J = 0; J < Y.length; J++)
            if (x.substr(I, Y[J].length).toLowerCase() === Y[J].toLowerCase())
              return I += Y[J].length, J + b.minMonth;
          throw (g.local.unknownNameAt || g.regionalOptions[""].unknownNameAt).replace(/\{0\}/, I);
        }, L = function() {
          if (typeof o == "function") {
            var R = f("M") ? o.call(b, x.substring(I)) : u.call(b, x.substring(I));
            return I += R.length, R;
          }
          return T("M", u, o);
        }, A = function() {
          if (x.charAt(I) !== k.charAt(P))
            throw (g.local.unexpectedLiteralAt || g.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/, I);
          I++;
        }, I = 0, P = 0; P < k.length; P++)
          if (y)
            k.charAt(P) !== "'" || f("'") ? A() : y = !1;
          else
            switch (k.charAt(P)) {
              case "d":
                p = _("d");
                break;
              case "D":
                T("D", n, s);
                break;
              case "o":
                c = _("o");
                break;
              case "w":
                _("w");
                break;
              case "m":
                i = w();
                break;
              case "M":
                i = L();
                break;
              case "y":
                var S = P;
                a = !f("y", 2), P = S, l = _("y", 2);
                break;
              case "Y":
                l = _("Y", 2);
                break;
              case "J":
                h = _("J") + 0.5, x.charAt(I) === "." && (I++, _("J"));
                break;
              case "@":
                h = _("@") / this.SECS_PER_DAY + this.UNIX_EPOCH;
                break;
              case "!":
                h = _("!") / this.TICKS_PER_DAY + this.TICKS_EPOCH;
                break;
              case "*":
                I = x.length;
                break;
              case "'":
                f("'") ? A() : y = !0;
                break;
              default:
                A();
            }
        if (I < x.length)
          throw g.local.unexpectedText || g.regionalOptions[""].unexpectedText;
        if (l === -1 ? l = this.today().year() : l < 100 && a && (l += r === -1 ? 1900 : this.today().year() - this.today().year() % 100 - (l <= r ? 0 : 100)), typeof i == "string" && (i = t.call(this, l, i)), c > -1) {
          i = 1, p = c;
          for (var E = this.daysInMonth(l, i); p > E; E = this.daysInMonth(l, i))
            i++, p -= E;
        }
        return h > -1 ? this.fromJD(h) : this.newDate(l, i, p);
      }, determineDate: function(k, x, e, r, n) {
        e && typeof e != "object" && (n = r, r = e, e = null), typeof r != "string" && (n = r, r = "");
        var s = this;
        return x = x ? x.newDate() : null, k = k == null ? x : typeof k == "string" ? function(t) {
          try {
            return s.parseDate(r, t, n);
          } catch {
          }
          for (var d = ((t = t.toLowerCase()).match(/^c/) && e ? e.newDate() : null) || s.today(), u = /([+-]?[0-9]+)\s*(d|w|m|y)?/g, o = u.exec(t); o; )
            d.add(parseInt(o[1], 10), o[2] || "d"), o = u.exec(t);
          return d;
        }(k) : typeof k == "number" ? isNaN(k) || k === 1 / 0 || k === -1 / 0 ? x : s.today().add(k, "d") : s.newDate(k);
      } });
    }, { "./main": 347, "object-assign": 247 }], 349: [function(v, Q, $) {
      Q.exports = [{ path: "", backoff: 0 }, { path: "M-2.4,-3V3L0.6,0Z", backoff: 0.6 }, { path: "M-3.7,-2.5V2.5L1.3,0Z", backoff: 1.3 }, { path: "M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z", backoff: 1.55 }, { path: "M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z", backoff: 1.6 }, { path: "M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z", backoff: 2 }, { path: "M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z", backoff: 0, noRotate: !0 }, { path: "M2,2V-2H-2V2Z", backoff: 0, noRotate: !0 }];
    }, {}], 350: [function(v, Q, $) {
      var m = v("./arrow_paths"), g = v("../../plots/font_attributes"), k = v("../../plots/cartesian/constants"), x = v("../../plot_api/plot_template").templatedArray;
      v("../../constants/axis_placeable_objects"), Q.exports = x("annotation", { visible: { valType: "boolean", dflt: !0, editType: "calc+arraydraw" }, text: { valType: "string", editType: "calc+arraydraw" }, textangle: { valType: "angle", dflt: 0, editType: "calc+arraydraw" }, font: g({ editType: "calc+arraydraw", colorEditType: "arraydraw" }), width: { valType: "number", min: 1, dflt: null, editType: "calc+arraydraw" }, height: { valType: "number", min: 1, dflt: null, editType: "calc+arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "arraydraw" }, align: { valType: "enumerated", values: ["left", "center", "right"], dflt: "center", editType: "arraydraw" }, valign: { valType: "enumerated", values: ["top", "middle", "bottom"], dflt: "middle", editType: "arraydraw" }, bgcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "arraydraw" }, bordercolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "arraydraw" }, borderpad: { valType: "number", min: 0, dflt: 1, editType: "calc+arraydraw" }, borderwidth: { valType: "number", min: 0, dflt: 1, editType: "calc+arraydraw" }, showarrow: { valType: "boolean", dflt: !0, editType: "calc+arraydraw" }, arrowcolor: { valType: "color", editType: "arraydraw" }, arrowhead: { valType: "integer", min: 0, max: m.length, dflt: 1, editType: "arraydraw" }, startarrowhead: { valType: "integer", min: 0, max: m.length, dflt: 1, editType: "arraydraw" }, arrowside: { valType: "flaglist", flags: ["end", "start"], extras: ["none"], dflt: "end", editType: "arraydraw" }, arrowsize: { valType: "number", min: 0.3, dflt: 1, editType: "calc+arraydraw" }, startarrowsize: { valType: "number", min: 0.3, dflt: 1, editType: "calc+arraydraw" }, arrowwidth: { valType: "number", min: 0.1, editType: "calc+arraydraw" }, standoff: { valType: "number", min: 0, dflt: 0, editType: "calc+arraydraw" }, startstandoff: { valType: "number", min: 0, dflt: 0, editType: "calc+arraydraw" }, ax: { valType: "any", editType: "calc+arraydraw" }, ay: { valType: "any", editType: "calc+arraydraw" }, axref: { valType: "enumerated", dflt: "pixel", values: ["pixel", k.idRegex.x.toString()], editType: "calc" }, ayref: { valType: "enumerated", dflt: "pixel", values: ["pixel", k.idRegex.y.toString()], editType: "calc" }, xref: { valType: "enumerated", values: ["paper", k.idRegex.x.toString()], editType: "calc" }, x: { valType: "any", editType: "calc+arraydraw" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "auto", editType: "calc+arraydraw" }, xshift: { valType: "number", dflt: 0, editType: "calc+arraydraw" }, yref: { valType: "enumerated", values: ["paper", k.idRegex.y.toString()], editType: "calc" }, y: { valType: "any", editType: "calc+arraydraw" }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "auto", editType: "calc+arraydraw" }, yshift: { valType: "number", dflt: 0, editType: "calc+arraydraw" }, clicktoshow: { valType: "enumerated", values: [!1, "onoff", "onout"], dflt: !1, editType: "arraydraw" }, xclick: { valType: "any", editType: "arraydraw" }, yclick: { valType: "any", editType: "arraydraw" }, hovertext: { valType: "string", editType: "arraydraw" }, hoverlabel: { bgcolor: { valType: "color", editType: "arraydraw" }, bordercolor: { valType: "color", editType: "arraydraw" }, font: g({ editType: "arraydraw" }), editType: "arraydraw" }, captureevents: { valType: "boolean", editType: "arraydraw" }, editType: "calc", _deprecated: { ref: { valType: "string", editType: "calc" } } });
    }, { "../../constants/axis_placeable_objects": 484, "../../plot_api/plot_template": 555, "../../plots/cartesian/constants": 573, "../../plots/font_attributes": 594, "./arrow_paths": 349 }], 351: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("./draw").draw;
      function x(r) {
        var n = r._fullLayout;
        m.filterVisible(n.annotations).forEach(function(s) {
          var t = g.getFromId(r, s.xref), d = g.getFromId(r, s.yref), u = g.getRefType(s.xref), o = g.getRefType(s.yref);
          s._extremes = {}, u === "range" && e(s, t), o === "range" && e(s, d);
        });
      }
      function e(r, n) {
        var s, t = n._id, d = t.charAt(0), u = r[d], o = r["a" + d], h = r[d + "ref"], l = r["a" + d + "ref"], i = r["_" + d + "padplus"], p = r["_" + d + "padminus"], c = { x: 1, y: -1 }[d] * r[d + "shift"], a = 3 * r.arrowsize * r.arrowwidth || 0, y = a + c, f = a - c, _ = 3 * r.startarrowsize * r.arrowwidth || 0, b = _ + c, w = _ - c;
        if (l === h) {
          var T = g.findExtremes(n, [n.r2c(u)], { ppadplus: y, ppadminus: f }), L = g.findExtremes(n, [n.r2c(o)], { ppadplus: Math.max(i, b), ppadminus: Math.max(p, w) });
          s = { min: [T.min[0], L.min[0]], max: [T.max[0], L.max[0]] };
        } else
          b = o ? b + o : b, w = o ? w - o : w, s = g.findExtremes(n, [n.r2c(u)], { ppadplus: Math.max(i, y, b), ppadminus: Math.max(p, f, w) });
        r._extremes[t] = s;
      }
      Q.exports = function(r) {
        var n = r._fullLayout;
        if (m.filterVisible(n.annotations).length && r._fullData.length)
          return m.syncOrAsync([k, x], r);
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "./draw": 356 }], 352: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry"), k = v("../../plot_api/plot_template").arrayEditor;
      function x(r, n) {
        var s, t, d, u, o, h, l, i = r._fullLayout.annotations, p = [], c = [], a = [], y = (n || []).length;
        for (s = 0; s < i.length; s++)
          if (u = (d = i[s]).clicktoshow) {
            for (t = 0; t < y; t++)
              if (h = (o = n[t]).xaxis, l = o.yaxis, h._id === d.xref && l._id === d.yref && h.d2r(o.x) === e(d._xclick, h) && l.d2r(o.y) === e(d._yclick, l)) {
                (d.visible ? u === "onout" ? c : a : p).push(s);
                break;
              }
            t === y && d.visible && u === "onout" && c.push(s);
          }
        return { on: p, off: c, explicitOff: a };
      }
      function e(r, n) {
        return n.type === "log" ? n.l2r(r) : n.d2r(r);
      }
      Q.exports = { hasClickToShow: function(r, n) {
        var s = x(r, n);
        return s.on.length > 0 || s.explicitOff.length > 0;
      }, onClick: function(r, n) {
        var s, t, d = x(r, n), u = d.on, o = d.off.concat(d.explicitOff), h = {}, l = r._fullLayout.annotations;
        if (!(!u.length && !o.length)) {
          for (s = 0; s < u.length; s++)
            (t = k(r.layout, "annotations", l[u[s]])).modifyItem("visible", !0), m.extendFlat(h, t.getUpdateObj());
          for (s = 0; s < o.length; s++)
            (t = k(r.layout, "annotations", l[o[s]])).modifyItem("visible", !1), m.extendFlat(h, t.getUpdateObj());
          return g.call("update", r, {}, h);
        }
      } };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../registry": 647 }], 353: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../color");
      Q.exports = function(k, x, e, r) {
        r("opacity");
        var n = r("bgcolor"), s = r("bordercolor"), t = g.opacity(s);
        r("borderpad");
        var d = r("borderwidth"), u = r("showarrow");
        if (r("text", u ? " " : e._dfltTitle.annotation), r("textangle"), m.coerceFont(r, "font", e.font), r("width"), r("align"), r("height") && r("valign"), u) {
          var o, h, l = r("arrowside");
          l.indexOf("end") !== -1 && (o = r("arrowhead"), h = r("arrowsize")), l.indexOf("start") !== -1 && (r("startarrowhead", o), r("startarrowsize", h)), r("arrowcolor", t ? x.bordercolor : g.defaultLine), r("arrowwidth", 2 * (t && d || 1)), r("standoff"), r("startstandoff");
        }
        var i = r("hovertext"), p = e.hoverlabel || {};
        if (i) {
          var c = r("hoverlabel.bgcolor", p.bgcolor || (g.opacity(n) ? g.rgb(n) : g.defaultLine)), a = r("hoverlabel.bordercolor", p.bordercolor || g.contrast(c));
          m.coerceFont(r, "hoverlabel.font", { family: p.font.family, size: p.font.size, color: p.font.color || a });
        }
        r("captureevents", !!i);
      };
    }, { "../../lib": 515, "../color": 367 }], 354: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib/to_log_range");
      Q.exports = function(k, x, e, r) {
        x = x || {};
        var n = e === "log" && x.type === "linear", s = e === "linear" && x.type === "log";
        if (n || s)
          for (var t, d, u = k._fullLayout.annotations, o = x._id.charAt(0), h = 0; h < u.length; h++)
            t = u[h], d = "annotations[" + h + "].", t[o + "ref"] === x._id && l(o), t["a" + o + "ref"] === x._id && l("a" + o);
        function l(i) {
          var p = t[i], c = null;
          c = n ? g(p, x.range) : Math.pow(10, p), m(c) || (c = null), r(d + i, c);
        }
      };
    }, { "../../lib/to_log_range": 543, "fast-isnumeric": 190 }], 355: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../../plots/array_container_defaults"), x = v("./common_defaults"), e = v("./attributes");
      function r(n, s, t) {
        function d(L, A) {
          return m.coerce(n, s, e, L, A);
        }
        var u = d("visible"), o = d("clicktoshow");
        if (u || o) {
          x(n, s, t, d);
          for (var h = s.showarrow, l = ["x", "y"], i = [-10, -30], p = { _fullLayout: t }, c = 0; c < 2; c++) {
            var a = l[c], y = g.coerceRef(n, s, p, a, "", "paper");
            if (y !== "paper" && g.getFromId(p, y)._annIndices.push(s._index), g.coercePosition(s, p, d, y, a, 0.5), h) {
              var f = "a" + a, _ = g.coerceRef(n, s, p, f, "pixel", ["pixel", "paper"]);
              _ !== "pixel" && _ !== y && (_ = s[f] = "pixel");
              var b = _ === "pixel" ? i[c] : 0.4;
              g.coercePosition(s, p, d, _, f, b);
            }
            d(a + "anchor"), d(a + "shift");
          }
          if (m.noneOrAll(n, s, ["x", "y"]), h && m.noneOrAll(n, s, ["ax", "ay"]), o) {
            var w = d("xclick"), T = d("yclick");
            s._xclick = w === void 0 ? s.x : g.cleanPosition(w, p, s.xref), s._yclick = T === void 0 ? s.y : g.cleanPosition(T, p, s.yref);
          }
        }
      }
      Q.exports = function(n, s) {
        k(n, s, { name: "annotations", handleItemDefaults: r });
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/cartesian/axes": 566, "./attributes": 350, "./common_defaults": 353 }], 356: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../plots/plots"), x = v("../../lib"), e = x.strTranslate, r = v("../../plots/cartesian/axes"), n = v("../color"), s = v("../drawing"), t = v("../fx"), d = v("../../lib/svg_text_utils"), u = v("../../lib/setcursor"), o = v("../dragelement"), h = v("../../plot_api/plot_template").arrayEditor, l = v("./draw_arrow_head");
      function i(a, y) {
        var f = a._fullLayout.annotations[y] || {}, _ = r.getFromId(a, f.xref), b = r.getFromId(a, f.yref);
        _ && _.setScale(), b && b.setScale(), c(a, f, y, !1, _, b);
      }
      function p(a, y, f, _, b) {
        var w = b[f], T = b[f + "ref"], L = f.indexOf("y") !== -1, A = r.getRefType(T) === "domain", I = L ? _.h : _.w;
        return a ? A ? w + (L ? -y : y) / a._length : a.p2r(a.r2p(w) + y) : w + (L ? -y : y) / I;
      }
      function c(a, y, f, _, b, w) {
        var T, L, A = a._fullLayout, I = a._fullLayout._size, P = a._context.edits;
        _ ? (T = "annotation-" + _, L = _ + ".annotations") : (T = "annotation", L = "annotations");
        var S = h(a.layout, L, y), E = S.modifyBase, R = S.modifyItem, z = S.getUpdateObj;
        A._infolayer.selectAll("." + T + '[data-index="' + f + '"]').remove();
        var j = "clip" + A._uid + "_ann" + f;
        if (y._input && y.visible !== !1) {
          var H = { x: {}, y: {} }, Y = +y.textangle || 0, J = A._infolayer.append("g").classed(T, !0).attr("data-index", String(f)).style("opacity", y.opacity), W = J.append("g").classed("annotation-text-g", !0), Z = P[y.showarrow ? "annotationTail" : "annotationPosition"], re = y.captureevents || P.annotationText || Z, V = W.append("g").style("pointer-events", re ? "all" : null).call(u, "pointer").on("click", function() {
            a._dragging = !1, a.emit("plotly_clickannotation", oe(m.event));
          });
          y.hovertext && V.on("mouseover", function() {
            var ye = y.hoverlabel, Ae = ye.font, pe = this.getBoundingClientRect(), ge = a.getBoundingClientRect();
            t.loneHover({ x0: pe.left - ge.left, x1: pe.right - ge.left, y: (pe.top + pe.bottom) / 2 - ge.top, text: y.hovertext, color: ye.bgcolor, borderColor: ye.bordercolor, fontFamily: Ae.family, fontSize: Ae.size, fontColor: Ae.color }, { container: A._hoverlayer.node(), outerContainer: A._paper.node(), gd: a });
          }).on("mouseout", function() {
            t.loneUnhover(A._hoverlayer.node());
          });
          var B = y.borderwidth, U = y.borderpad, ee = B + U, N = V.append("rect").attr("class", "bg").style("stroke-width", B + "px").call(n.stroke, y.bordercolor).call(n.fill, y.bgcolor), K = y.width || y.height, X = A._topclips.selectAll("#" + j).data(K ? [0] : []);
          X.enter().append("clipPath").classed("annclip", !0).attr("id", j).append("rect"), X.exit().remove();
          var te = y.font, ie = A._meta ? x.templateString(y.text, A._meta) : y.text, le = V.append("text").classed("annotation-text", !0).text(ie);
          P.annotationText ? le.call(d.makeEditable, { delegate: V, gd: a }).call(ve).on("edit", function(ye) {
            y.text = ye, this.call(ve), R("text", ye), b && b.autorange && E(b._name + ".autorange", !0), w && w.autorange && E(w._name + ".autorange", !0), g.call("_guiRelayout", a, z());
          }) : le.call(ve);
        } else
          m.selectAll("#" + j).remove();
        function oe(ye) {
          var Ae = { index: f, annotation: y._input, fullAnnotation: y, event: ye };
          return _ && (Ae.subplotId = _), Ae;
        }
        function ve(ye) {
          return ye.call(s.font, te).attr({ "text-anchor": { left: "start", right: "end" }[y.align] || "middle" }), d.convertToTspans(ye, a, ue), ye;
        }
        function ue() {
          var ye = le.selectAll("a");
          ye.size() === 1 && ye.text() === le.text() && V.insert("a", ":first-child").attr({ "xlink:xlink:href": ye.attr("xlink:href"), "xlink:xlink:show": ye.attr("xlink:show") }).style({ cursor: "pointer" }).node().appendChild(N.node());
          var Ae = V.select(".annotation-text-math-group"), pe = !Ae.empty(), ge = s.bBox((pe ? Ae : le).node()), we = ge.width, se = ge.height, de = y.width || we, Te = y.height || se, Ee = Math.round(de + 2 * ee), Me = Math.round(Te + 2 * ee);
          function ze(rt, ut) {
            return ut === "auto" && (ut = rt < 1 / 3 ? "left" : rt > 2 / 3 ? "right" : "center"), { center: 0, middle: 0, left: 0.5, bottom: -0.5, right: -0.5, top: 0.5 }[ut];
          }
          for (var Ie = !1, Oe = ["x", "y"], Ze = 0; Ze < Oe.length; Ze++) {
            var Fe, Pe, De, Ge, Qe, ot = Oe[Ze], vt = y[ot + "ref"] || ot, bt = y["a" + ot + "ref"], yt = { x: b, y: w }[ot], tt = (Y + (ot === "x" ? 0 : -90)) * Math.PI / 180, Ke = Ee * Math.cos(tt), mt = Me * Math.sin(tt), Ft = Math.abs(Ke) + Math.abs(mt), Vt = y[ot + "anchor"], Xt = y[ot + "shift"] * (ot === "x" ? 1 : -1), Gt = H[ot], nr = r.getRefType(vt);
            if (yt && nr !== "domain") {
              var It = yt.r2fraction(y[ot]);
              (It < 0 || It > 1) && (bt === vt ? ((It = yt.r2fraction(y["a" + ot])) < 0 || It > 1) && (Ie = !0) : Ie = !0), Fe = yt._offset + yt.r2p(y[ot]), Ge = 0.5;
            } else {
              var Be = nr === "domain";
              ot === "x" ? (De = y[ot], Fe = Be ? yt._offset + yt._length * De : Fe = I.l + I.w * De) : (De = 1 - y[ot], Fe = Be ? yt._offset + yt._length * De : Fe = I.t + I.h * De), Ge = y.showarrow ? 0.5 : De;
            }
            if (y.showarrow) {
              Gt.head = Fe;
              var He = y["a" + ot];
              if (Qe = Ke * ze(0.5, y.xanchor) - mt * ze(0.5, y.yanchor), bt === vt) {
                var he = r.getRefType(bt);
                he === "domain" ? (ot === "y" && (He = 1 - He), Gt.tail = yt._offset + yt._length * He) : he === "paper" ? ot === "y" ? (He = 1 - He, Gt.tail = I.t + I.h * He) : Gt.tail = I.l + I.w * He : Gt.tail = yt._offset + yt.r2p(He), Pe = Qe;
              } else
                Gt.tail = Fe + He, Pe = Qe + He;
              Gt.text = Gt.tail + Qe;
              var be = A[ot === "x" ? "width" : "height"];
              if (vt === "paper" && (Gt.head = x.constrain(Gt.head, 1, be - 1)), bt === "pixel") {
                var Re = -Math.max(Gt.tail - 3, Gt.text), Ue = Math.min(Gt.tail + 3, Gt.text) - be;
                Re > 0 ? (Gt.tail += Re, Gt.text += Re) : Ue > 0 && (Gt.tail -= Ue, Gt.text -= Ue);
              }
              Gt.tail += Xt, Gt.head += Xt;
            } else
              Pe = Qe = Ft * ze(Ge, Vt), Gt.text = Fe + Qe;
            Gt.text += Xt, Qe += Xt, Pe += Xt, y["_" + ot + "padplus"] = Ft / 2 + Pe, y["_" + ot + "padminus"] = Ft / 2 - Pe, y["_" + ot + "size"] = Ft, y["_" + ot + "shift"] = Qe;
          }
          if (Ie)
            V.remove();
          else {
            var Xe = 0, qe = 0;
            if (y.align !== "left" && (Xe = (de - we) * (y.align === "center" ? 0.5 : 1)), y.valign !== "top" && (qe = (Te - se) * (y.valign === "middle" ? 0.5 : 1)), pe)
              Ae.select("svg").attr({ x: ee + Xe - 1, y: ee + qe }).call(s.setClipUrl, K ? j : null, a);
            else {
              var st = ee + qe - ge.top, it = ee + Xe - ge.left;
              le.call(d.positionText, it, st).call(s.setClipUrl, K ? j : null, a);
            }
            X.select("rect").call(s.setRect, ee, ee, de, Te), N.call(s.setRect, B / 2, B / 2, Ee - B, Me - B), V.call(s.setTranslate, Math.round(H.x.text - Ee / 2), Math.round(H.y.text - Me / 2)), W.attr({ transform: "rotate(" + Y + "," + H.x.text + "," + H.y.text + ")" });
            var Tt, Pt = function(rt, ut) {
              J.selectAll(".annotation-arrow-g").remove();
              var Bt = H.x.head, wt = H.y.head, Lt = H.x.tail + rt, Se = H.y.tail + ut, We = H.x.text + rt, nt = H.y.text + ut, ft = x.rotationXYMatrix(Y, We, nt), Mt = x.apply2DTransform(ft), Nt = x.apply2DTransform2(ft), Zt = +N.attr("width"), Ut = +N.attr("height"), fr = We - 0.5 * Zt, Tr = fr + Zt, ur = nt - 0.5 * Ut, Kt = ur + Ut, $t = [[fr, ur, fr, Kt], [fr, Kt, Tr, Kt], [Tr, Kt, Tr, ur], [Tr, ur, fr, ur]].map(Nt);
              if (!$t.reduce(function(vn, xn) {
                return vn ^ !!x.segmentsIntersect(Bt, wt, Bt + 1e6, wt + 1e6, xn[0], xn[1], xn[2], xn[3]);
              }, !1)) {
                $t.forEach(function(vn) {
                  var xn = x.segmentsIntersect(Lt, Se, Bt, wt, vn[0], vn[1], vn[2], vn[3]);
                  xn && (Lt = xn.x, Se = xn.y);
                });
                var er = y.arrowwidth, cr = y.arrowcolor, gr = y.arrowside, Mr = J.append("g").style({ opacity: n.opacity(cr) }).classed("annotation-arrow-g", !0), Ir = Mr.append("path").attr("d", "M" + Lt + "," + Se + "L" + Bt + "," + wt).style("stroke-width", er + "px").call(n.stroke, n.rgb(cr));
                if (l(Ir, gr, y), P.annotationPosition && Ir.node().parentNode && !_) {
                  var Fr = Bt, Gr = wt;
                  if (y.standoff) {
                    var un = Math.sqrt(Math.pow(Bt - Lt, 2) + Math.pow(wt - Se, 2));
                    Fr += y.standoff * (Lt - Bt) / un, Gr += y.standoff * (Se - wt) / un;
                  }
                  var $r, Dn, rn = Mr.append("path").classed("annotation-arrow", !0).classed("anndrag", !0).classed("cursor-move", !0).attr({ d: "M3,3H-3V-3H3ZM0,0L" + (Lt - Fr) + "," + (Se - Gr), transform: e(Fr, Gr) }).style("stroke-width", er + 6 + "px").call(n.stroke, "rgba(0,0,0,0)").call(n.fill, "rgba(0,0,0,0)");
                  o.init({ element: rn.node(), gd: a, prepFn: function() {
                    var vn = s.getTranslate(V);
                    $r = vn.x, Dn = vn.y, b && b.autorange && E(b._name + ".autorange", !0), w && w.autorange && E(w._name + ".autorange", !0);
                  }, moveFn: function(vn, xn) {
                    var $n = Mt($r, Dn), Br = $n[0] + vn, tn = $n[1] + xn;
                    V.call(s.setTranslate, Br, tn), R("x", p(b, vn, "x", I, y)), R("y", p(w, xn, "y", I, y)), y.axref === y.xref && R("ax", p(b, vn, "ax", I, y)), y.ayref === y.yref && R("ay", p(w, xn, "ay", I, y)), Mr.attr("transform", e(vn, xn)), W.attr({ transform: "rotate(" + Y + "," + Br + "," + tn + ")" });
                  }, doneFn: function() {
                    g.call("_guiRelayout", a, z());
                    var vn = document.querySelector(".js-notes-box-panel");
                    vn && vn.redraw(vn.selectedObj);
                  } });
                }
              }
            };
            y.showarrow && Pt(0, 0), Z && o.init({ element: V.node(), gd: a, prepFn: function() {
              Tt = W.attr("transform");
            }, moveFn: function(rt, ut) {
              var Bt = "pointer";
              if (y.showarrow)
                y.axref === y.xref ? R("ax", p(b, rt, "ax", I, y)) : R("ax", y.ax + rt), y.ayref === y.yref ? R("ay", p(w, ut, "ay", I.w, y)) : R("ay", y.ay + ut), Pt(rt, ut);
              else {
                if (_)
                  return;
                var wt, Lt;
                if (b)
                  wt = p(b, rt, "x", I, y);
                else {
                  var Se = y._xsize / I.w, We = y.x + (y._xshift - y.xshift) / I.w - Se / 2;
                  wt = o.align(We + rt / I.w, Se, 0, 1, y.xanchor);
                }
                if (w)
                  Lt = p(w, ut, "y", I, y);
                else {
                  var nt = y._ysize / I.h, ft = y.y - (y._yshift + y.yshift) / I.h - nt / 2;
                  Lt = o.align(ft - ut / I.h, nt, 0, 1, y.yanchor);
                }
                R("x", wt), R("y", Lt), b && w || (Bt = o.getCursor(b ? 0.5 : wt, w ? 0.5 : Lt, y.xanchor, y.yanchor));
              }
              W.attr({ transform: e(rt, ut) + Tt }), u(V, Bt);
            }, clickFn: function(rt, ut) {
              y.captureevents && a.emit("plotly_clickannotation", oe(ut));
            }, doneFn: function() {
              u(V), g.call("_guiRelayout", a, z());
              var rt = document.querySelector(".js-notes-box-panel");
              rt && rt.redraw(rt.selectedObj);
            } });
          }
        }
      }
      Q.exports = { draw: function(a) {
        var y = a._fullLayout;
        y._infolayer.selectAll(".annotation").remove();
        for (var f = 0; f < y.annotations.length; f++)
          y.annotations[f].visible && i(a, f);
        return k.previousPromises(a);
      }, drawOne: i, drawRaw: c };
    }, { "../../lib": 515, "../../lib/setcursor": 536, "../../lib/svg_text_utils": 541, "../../plot_api/plot_template": 555, "../../plots/cartesian/axes": 566, "../../plots/plots": 628, "../../registry": 647, "../color": 367, "../dragelement": 386, "../drawing": 389, "../fx": 407, "./draw_arrow_head": 357, "@plotly/d3": 58 }], 357: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../color"), k = v("./arrow_paths"), x = v("../../lib"), e = x.strScale, r = x.strRotate, n = x.strTranslate;
      Q.exports = function(s, t, d) {
        var u, o, h, l, i = s.node(), p = k[d.arrowhead || 0], c = k[d.startarrowhead || 0], a = (d.arrowwidth || 1) * (d.arrowsize || 1), y = (d.arrowwidth || 1) * (d.startarrowsize || 1), f = t.indexOf("start") >= 0, _ = t.indexOf("end") >= 0, b = p.backoff * a + d.standoff, w = c.backoff * y + d.startstandoff;
        if (i.nodeName === "line") {
          u = { x: +s.attr("x1"), y: +s.attr("y1") }, o = { x: +s.attr("x2"), y: +s.attr("y2") };
          var T = u.x - o.x, L = u.y - o.y;
          if (l = (h = Math.atan2(L, T)) + Math.PI, b && w && b + w > Math.sqrt(T * T + L * L))
            return void J();
          if (b) {
            if (b * b > T * T + L * L)
              return void J();
            var A = b * Math.cos(h), I = b * Math.sin(h);
            o.x += A, o.y += I, s.attr({ x2: o.x, y2: o.y });
          }
          if (w) {
            if (w * w > T * T + L * L)
              return void J();
            var P = w * Math.cos(h), S = w * Math.sin(h);
            u.x -= P, u.y -= S, s.attr({ x1: u.x, y1: u.y });
          }
        } else if (i.nodeName === "path") {
          var E = i.getTotalLength(), R = "";
          if (E < b + w)
            return void J();
          var z = i.getPointAtLength(0), j = i.getPointAtLength(0.1);
          h = Math.atan2(z.y - j.y, z.x - j.x), u = i.getPointAtLength(Math.min(w, E)), R = "0px," + w + "px,";
          var H = i.getPointAtLength(E), Y = i.getPointAtLength(E - 0.1);
          l = Math.atan2(H.y - Y.y, H.x - Y.x), o = i.getPointAtLength(Math.max(0, E - b)), R += E - (R ? w + b : b) + "px," + E + "px", s.style("stroke-dasharray", R);
        }
        function J() {
          s.style("stroke-dasharray", "0px,100px");
        }
        function W(Z, re, V, B) {
          Z.path && (Z.noRotate && (V = 0), m.select(i.parentNode).append("path").attr({ class: s.attr("class"), d: Z.path, transform: n(re.x, re.y) + r(180 * V / Math.PI) + e(B) }).style({ fill: g.rgb(d.arrowcolor), "stroke-width": 0 }));
        }
        f && W(c, u, h, y), _ && W(p, o, l, a);
      };
    }, { "../../lib": 515, "../color": 367, "./arrow_paths": 349, "@plotly/d3": 58 }], 358: [function(v, Q, $) {
      var m = v("./draw"), g = v("./click");
      Q.exports = { moduleType: "component", name: "annotations", layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), includeBasePlot: v("../../plots/cartesian/include_components")("annotations"), calcAutorange: v("./calc_autorange"), draw: m.draw, drawOne: m.drawOne, drawRaw: m.drawRaw, hasClickToShow: g.hasClickToShow, onClick: g.onClick, convertCoords: v("./convert_coords") };
    }, { "../../plots/cartesian/include_components": 577, "./attributes": 350, "./calc_autorange": 351, "./click": 352, "./convert_coords": 354, "./defaults": 355, "./draw": 356 }], 359: [function(v, Q, $) {
      var m = v("../annotations/attributes"), g = v("../../plot_api/edit_types").overrideAll, k = v("../../plot_api/plot_template").templatedArray;
      Q.exports = g(k("annotation", { visible: m.visible, x: { valType: "any" }, y: { valType: "any" }, z: { valType: "any" }, ax: { valType: "number" }, ay: { valType: "number" }, xanchor: m.xanchor, xshift: m.xshift, yanchor: m.yanchor, yshift: m.yshift, text: m.text, textangle: m.textangle, font: m.font, width: m.width, height: m.height, opacity: m.opacity, align: m.align, valign: m.valign, bgcolor: m.bgcolor, bordercolor: m.bordercolor, borderpad: m.borderpad, borderwidth: m.borderwidth, showarrow: m.showarrow, arrowcolor: m.arrowcolor, arrowhead: m.arrowhead, startarrowhead: m.startarrowhead, arrowside: m.arrowside, arrowsize: m.arrowsize, startarrowsize: m.startarrowsize, arrowwidth: m.arrowwidth, standoff: m.standoff, startstandoff: m.startstandoff, hovertext: m.hovertext, hoverlabel: m.hoverlabel, captureevents: m.captureevents }), "calc", "from-root");
    }, { "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../annotations/attributes": 350 }], 360: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes");
      function k(x, e) {
        var r = e.fullSceneLayout.domain, n = e.fullLayout._size, s = { pdata: null, type: "linear", autorange: !1, range: [-1 / 0, 1 / 0] };
        x._xa = {}, m.extendFlat(x._xa, s), g.setConvert(x._xa), x._xa._offset = n.l + r.x[0] * n.w, x._xa.l2p = function() {
          return 0.5 * (1 + x._pdata[0] / x._pdata[3]) * n.w * (r.x[1] - r.x[0]);
        }, x._ya = {}, m.extendFlat(x._ya, s), g.setConvert(x._ya), x._ya._offset = n.t + (1 - r.y[1]) * n.h, x._ya.l2p = function() {
          return 0.5 * (1 - x._pdata[1] / x._pdata[3]) * n.h * (r.y[1] - r.y[0]);
        };
      }
      Q.exports = function(x) {
        for (var e = x.fullSceneLayout.annotations, r = 0; r < e.length; r++)
          k(e[r], x);
        x.fullLayout._infolayer.selectAll(".annotation-" + x.id).remove();
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566 }], 361: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../../plots/array_container_defaults"), x = v("../annotations/common_defaults"), e = v("./attributes");
      function r(n, s, t, d) {
        function u(h, l) {
          return m.coerce(n, s, e, h, l);
        }
        function o(h) {
          var l = h + "axis", i = { _fullLayout: {} };
          return i._fullLayout[l] = t[l], g.coercePosition(s, i, u, h, h, 0.5);
        }
        u("visible") && (x(n, s, d.fullLayout, u), o("x"), o("y"), o("z"), m.noneOrAll(n, s, ["x", "y", "z"]), s.xref = "x", s.yref = "y", s.zref = "z", u("xanchor"), u("yanchor"), u("xshift"), u("yshift"), s.showarrow && (s.axref = "pixel", s.ayref = "pixel", u("ax", -10), u("ay", -30), m.noneOrAll(n, s, ["ax", "ay"])));
      }
      Q.exports = function(n, s, t) {
        k(n, s, { name: "annotations", handleItemDefaults: r, fullLayout: t.fullLayout });
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/cartesian/axes": 566, "../annotations/common_defaults": 353, "./attributes": 359 }], 362: [function(v, Q, $) {
      var m = v("../annotations/draw").drawRaw, g = v("../../plots/gl3d/project"), k = ["x", "y", "z"];
      Q.exports = function(x) {
        for (var e = x.fullSceneLayout, r = x.dataScale, n = e.annotations, s = 0; s < n.length; s++) {
          for (var t = n[s], d = !1, u = 0; u < 3; u++) {
            var o = k[u], h = t[o], l = e[o + "axis"].r2fraction(h);
            if (l < 0 || l > 1) {
              d = !0;
              break;
            }
          }
          d ? x.fullLayout._infolayer.select(".annotation-" + x.id + '[data-index="' + s + '"]').remove() : (t._pdata = g(x.glplot.cameraParams, [e.xaxis.r2l(t.x) * r[0], e.yaxis.r2l(t.y) * r[1], e.zaxis.r2l(t.z) * r[2]]), m(x.graphDiv, t, s, x.id, t._xa, t._ya));
        }
      };
    }, { "../../plots/gl3d/project": 616, "../annotations/draw": 356 }], 363: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib");
      Q.exports = { moduleType: "component", name: "annotations3d", schema: { subplots: { scene: { annotations: v("./attributes") } } }, layoutAttributes: v("./attributes"), handleDefaults: v("./defaults"), includeBasePlot: function(k, x) {
        var e = m.subplotsRegistry.gl3d;
        if (!!e)
          for (var r = e.attrRegex, n = Object.keys(k), s = 0; s < n.length; s++) {
            var t = n[s];
            r.test(t) && (k[t].annotations || []).length && (g.pushUnique(x._basePlotModules, e), g.pushUnique(x._subplots.gl3d, t));
          }
      }, convert: v("./convert"), draw: v("./draw") };
    }, { "../../lib": 515, "../../registry": 647, "./attributes": 359, "./convert": 360, "./defaults": 361, "./draw": 362 }], 364: [function(v, Q, $) {
      Q.exports = v("world-calendars/dist/main"), v("world-calendars/dist/plus"), v("world-calendars/dist/calendars/chinese"), v("world-calendars/dist/calendars/coptic"), v("world-calendars/dist/calendars/discworld"), v("world-calendars/dist/calendars/ethiopian"), v("world-calendars/dist/calendars/hebrew"), v("world-calendars/dist/calendars/islamic"), v("world-calendars/dist/calendars/julian"), v("world-calendars/dist/calendars/mayan"), v("world-calendars/dist/calendars/nanakshahi"), v("world-calendars/dist/calendars/nepali"), v("world-calendars/dist/calendars/persian"), v("world-calendars/dist/calendars/taiwan"), v("world-calendars/dist/calendars/thai"), v("world-calendars/dist/calendars/ummalqura");
    }, { "world-calendars/dist/calendars/chinese": 333, "world-calendars/dist/calendars/coptic": 334, "world-calendars/dist/calendars/discworld": 335, "world-calendars/dist/calendars/ethiopian": 336, "world-calendars/dist/calendars/hebrew": 337, "world-calendars/dist/calendars/islamic": 338, "world-calendars/dist/calendars/julian": 339, "world-calendars/dist/calendars/mayan": 340, "world-calendars/dist/calendars/nanakshahi": 341, "world-calendars/dist/calendars/nepali": 342, "world-calendars/dist/calendars/persian": 343, "world-calendars/dist/calendars/taiwan": 344, "world-calendars/dist/calendars/thai": 345, "world-calendars/dist/calendars/ummalqura": 346, "world-calendars/dist/main": 347, "world-calendars/dist/plus": 348 }], 365: [function(v, Q, $) {
      var m = v("./calendars"), g = v("../../lib"), k = v("../../constants/numerical"), x = k.EPOCHJD, e = k.ONEDAY, r = { valType: "enumerated", values: g.sortObjectKeys(m.calendars), editType: "calc", dflt: "gregorian" }, n = function(c, a, y, f) {
        var _ = {};
        return _[y] = r, g.coerce(c, a, _, y, f);
      }, s = { d: { 0: "dd", "-": "d" }, e: { 0: "d", "-": "d" }, a: { 0: "D", "-": "D" }, A: { 0: "DD", "-": "DD" }, j: { 0: "oo", "-": "o" }, W: { 0: "ww", "-": "w" }, m: { 0: "mm", "-": "m" }, b: { 0: "M", "-": "M" }, B: { 0: "MM", "-": "MM" }, y: { 0: "yy", "-": "yy" }, Y: { 0: "yyyy", "-": "yyyy" }, U: "##", w: "##", c: { 0: "D M d %X yyyy", "-": "D M d %X yyyy" }, x: { 0: "mm/dd/yyyy", "-": "mm/dd/yyyy" } }, t = {};
      function d(c) {
        var a = t[c];
        return a || (a = t[c] = m.instance(c));
      }
      function u(c) {
        return g.extendFlat({}, r, { description: c });
      }
      function o(c) {
        return "Sets the calendar system to use with `" + c + "` date data.";
      }
      var h = { xcalendar: u(o("x")) }, l = g.extendFlat({}, h, { ycalendar: u(o("y")) }), i = g.extendFlat({}, l, { zcalendar: u(o("z")) }), p = u(["Sets the calendar system to use for `range` and `tick0`", "if this is a date axis. This does not set the calendar for", "interpreting data on this axis, that's specified in the trace", "or via the global `layout.calendar`"].join(" "));
      Q.exports = { moduleType: "component", name: "calendars", schema: { traces: { scatter: l, bar: l, box: l, heatmap: l, contour: l, histogram: l, histogram2d: l, histogram2dcontour: l, scatter3d: i, surface: i, mesh3d: i, scattergl: l, ohlc: h, candlestick: h }, layout: { calendar: u(["Sets the default calendar system to use for interpreting and", "displaying dates throughout the plot."].join(" ")) }, subplots: { xaxis: { calendar: p }, yaxis: { calendar: p }, scene: { xaxis: { calendar: p }, yaxis: { calendar: p }, zaxis: { calendar: p } }, polar: { radialaxis: { calendar: p } } }, transforms: { filter: { valuecalendar: u(["WARNING: All transforms are deprecated and may be removed from the API in next major version.", "Sets the calendar system to use for `value`, if it is a date."].join(" ")), targetcalendar: u(["WARNING: All transforms are deprecated and may be removed from the API in next major version.", "Sets the calendar system to use for `target`, if it is an", "array of dates. If `target` is a string (eg *x*) we use the", "corresponding trace attribute (eg `xcalendar`) if it exists,", "even if `targetcalendar` is provided."].join(" ")) } } }, layoutAttributes: r, handleDefaults: n, handleTraceDefaults: function(c, a, y, f) {
        for (var _ = 0; _ < y.length; _++)
          n(c, a, y[_] + "calendar", f.calendar);
      }, CANONICAL_SUNDAY: { chinese: "2000-01-02", coptic: "2000-01-03", discworld: "2000-01-03", ethiopian: "2000-01-05", hebrew: "5000-01-01", islamic: "1000-01-02", julian: "2000-01-03", mayan: "5000-01-01", nanakshahi: "1000-01-05", nepali: "2000-01-05", persian: "1000-01-01", jalali: "1000-01-01", taiwan: "1000-01-04", thai: "2000-01-04", ummalqura: "1400-01-06" }, CANONICAL_TICK: { chinese: "2000-01-01", coptic: "2000-01-01", discworld: "2000-01-01", ethiopian: "2000-01-01", hebrew: "5000-01-01", islamic: "1000-01-01", julian: "2000-01-01", mayan: "5000-01-01", nanakshahi: "1000-01-01", nepali: "2000-01-01", persian: "1000-01-01", jalali: "1000-01-01", taiwan: "1000-01-01", thai: "2000-01-01", ummalqura: "1400-01-01" }, DFLTRANGE: { chinese: ["2000-01-01", "2001-01-01"], coptic: ["1700-01-01", "1701-01-01"], discworld: ["1800-01-01", "1801-01-01"], ethiopian: ["2000-01-01", "2001-01-01"], hebrew: ["5700-01-01", "5701-01-01"], islamic: ["1400-01-01", "1401-01-01"], julian: ["2000-01-01", "2001-01-01"], mayan: ["5200-01-01", "5201-01-01"], nanakshahi: ["0500-01-01", "0501-01-01"], nepali: ["2000-01-01", "2001-01-01"], persian: ["1400-01-01", "1401-01-01"], jalali: ["1400-01-01", "1401-01-01"], taiwan: ["0100-01-01", "0101-01-01"], thai: ["2500-01-01", "2501-01-01"], ummalqura: ["1400-01-01", "1401-01-01"] }, getCal: d, worldCalFmt: function(c, a, y) {
        for (var f, _, b, w, T, L = Math.floor((a + 0.05) / e) + x, A = d(y).fromJD(L), I = 0; (I = c.indexOf("%", I)) !== -1; )
          (f = c.charAt(I + 1)) === "0" || f === "-" || f === "_" ? (b = 3, _ = c.charAt(I + 2), f === "_" && (f = "-")) : (_ = f, f = "0", b = 2), (w = s[_]) ? (T = w === "##" ? "##" : A.formatDate(w[f]), c = c.substr(0, I) + T + c.substr(I + b), I += T.length) : I += b;
        return c;
      } };
    }, { "../../constants/numerical": 491, "../../lib": 515, "./calendars": 364 }], 366: [function(v, Q, $) {
      $.defaults = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"], $.defaultLine = "#444", $.lightLine = "#eee", $.background = "#fff", $.borderLine = "#BEC8D9", $.lightFraction = 1e3 / 11;
    }, {}], 367: [function(v, Q, $) {
      var m = v("tinycolor2"), g = v("fast-isnumeric"), k = v("../../lib/array").isTypedArray, x = Q.exports = {}, e = v("./attributes");
      x.defaults = e.defaults;
      var r = x.defaultLine = e.defaultLine;
      x.lightLine = e.lightLine;
      var n = x.background = e.background;
      function s(t) {
        if (g(t) || typeof t != "string")
          return t;
        var d = t.trim();
        if (d.substr(0, 3) !== "rgb")
          return t;
        var u = d.match(/^rgba?\s*\(([^()]*)\)$/);
        if (!u)
          return t;
        var o = u[1].trim().split(/\s*[\s,]\s*/), h = d.charAt(3) === "a" && o.length === 4;
        if (!h && o.length !== 3)
          return t;
        for (var l = 0; l < o.length; l++) {
          if (!o[l].length || (o[l] = Number(o[l]), !(o[l] >= 0)))
            return t;
          if (l === 3)
            o[l] > 1 && (o[l] = 1);
          else if (o[l] >= 1)
            return t;
        }
        var i = Math.round(255 * o[0]) + ", " + Math.round(255 * o[1]) + ", " + Math.round(255 * o[2]);
        return h ? "rgba(" + i + ", " + o[3] + ")" : "rgb(" + i + ")";
      }
      x.tinyRGB = function(t) {
        var d = t.toRgb();
        return "rgb(" + Math.round(d.r) + ", " + Math.round(d.g) + ", " + Math.round(d.b) + ")";
      }, x.rgb = function(t) {
        return x.tinyRGB(m(t));
      }, x.opacity = function(t) {
        return t ? m(t).getAlpha() : 0;
      }, x.addOpacity = function(t, d) {
        var u = m(t).toRgb();
        return "rgba(" + Math.round(u.r) + ", " + Math.round(u.g) + ", " + Math.round(u.b) + ", " + d + ")";
      }, x.combine = function(t, d) {
        var u = m(t).toRgb();
        if (u.a === 1)
          return m(t).toRgbString();
        var o = m(d || n).toRgb(), h = o.a === 1 ? o : { r: 255 * (1 - o.a) + o.r * o.a, g: 255 * (1 - o.a) + o.g * o.a, b: 255 * (1 - o.a) + o.b * o.a }, l = { r: h.r * (1 - u.a) + u.r * u.a, g: h.g * (1 - u.a) + u.g * u.a, b: h.b * (1 - u.a) + u.b * u.a };
        return m(l).toRgbString();
      }, x.contrast = function(t, d, u) {
        var o = m(t);
        return o.getAlpha() !== 1 && (o = m(x.combine(t, n))), (o.isDark() ? d ? o.lighten(d) : n : u ? o.darken(u) : r).toString();
      }, x.stroke = function(t, d) {
        var u = m(d);
        t.style({ stroke: x.tinyRGB(u), "stroke-opacity": u.getAlpha() });
      }, x.fill = function(t, d) {
        var u = m(d);
        t.style({ fill: x.tinyRGB(u), "fill-opacity": u.getAlpha() });
      }, x.clean = function(t) {
        if (t && typeof t == "object") {
          var d, u, o, h, l = Object.keys(t);
          for (d = 0; d < l.length; d++)
            if (h = t[o = l[d]], o.substr(o.length - 5) === "color")
              if (Array.isArray(h))
                for (u = 0; u < h.length; u++)
                  h[u] = s(h[u]);
              else
                t[o] = s(h);
            else if (o.substr(o.length - 10) === "colorscale" && Array.isArray(h))
              for (u = 0; u < h.length; u++)
                Array.isArray(h[u]) && (h[u][1] = s(h[u][1]));
            else if (Array.isArray(h)) {
              var i = h[0];
              if (!Array.isArray(i) && i && typeof i == "object")
                for (u = 0; u < h.length; u++)
                  x.clean(h[u]);
            } else
              h && typeof h == "object" && !k(h) && x.clean(h);
        }
      };
    }, { "../../lib/array": 497, "./attributes": 366, "fast-isnumeric": 190, tinycolor2: 313 }], 368: [function(v, Q, $) {
      var m = v("../../plots/cartesian/layout_attributes"), g = v("../../plots/font_attributes"), k = v("../../lib/extend").extendFlat, x = v("../../plot_api/edit_types").overrideAll;
      Q.exports = x({ orientation: { valType: "enumerated", values: ["h", "v"], dflt: "v" }, thicknessmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "pixels" }, thickness: { valType: "number", min: 0, dflt: 30 }, lenmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "fraction" }, len: { valType: "number", min: 0, dflt: 1 }, x: { valType: "number", min: -2, max: 3 }, xanchor: { valType: "enumerated", values: ["left", "center", "right"] }, xpad: { valType: "number", min: 0, dflt: 10 }, y: { valType: "number", min: -2, max: 3 }, yanchor: { valType: "enumerated", values: ["top", "middle", "bottom"] }, ypad: { valType: "number", min: 0, dflt: 10 }, outlinecolor: m.linecolor, outlinewidth: m.linewidth, bordercolor: m.linecolor, borderwidth: { valType: "number", min: 0, dflt: 0 }, bgcolor: { valType: "color", dflt: "rgba(0,0,0,0)" }, tickmode: m.tickmode, nticks: m.nticks, tick0: m.tick0, dtick: m.dtick, tickvals: m.tickvals, ticktext: m.ticktext, ticks: k({}, m.ticks, { dflt: "" }), ticklabeloverflow: k({}, m.ticklabeloverflow, {}), ticklabelposition: { valType: "enumerated", values: ["outside", "inside", "outside top", "inside top", "outside left", "inside left", "outside right", "inside right", "outside bottom", "inside bottom"], dflt: "outside" }, ticklen: m.ticklen, tickwidth: m.tickwidth, tickcolor: m.tickcolor, ticklabelstep: m.ticklabelstep, showticklabels: m.showticklabels, tickfont: g({}), tickangle: m.tickangle, tickformat: m.tickformat, tickformatstops: m.tickformatstops, tickprefix: m.tickprefix, showtickprefix: m.showtickprefix, ticksuffix: m.ticksuffix, showticksuffix: m.showticksuffix, separatethousands: m.separatethousands, exponentformat: m.exponentformat, minexponent: m.minexponent, showexponent: m.showexponent, title: { text: { valType: "string" }, font: g({}), side: { valType: "enumerated", values: ["right", "top", "bottom"] } }, _deprecated: { title: { valType: "string" }, titlefont: g({}), titleside: { valType: "enumerated", values: ["right", "top", "bottom"], dflt: "top" } } }, "colorbars", "from-root");
    }, { "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/cartesian/layout_attributes": 579, "../../plots/font_attributes": 594 }], 369: [function(v, Q, $) {
      Q.exports = { cn: { colorbar: "colorbar", cbbg: "cbbg", cbfill: "cbfill", cbfills: "cbfills", cbline: "cbline", cblines: "cblines", cbaxis: "cbaxis", cbtitleunshift: "cbtitleunshift", cbtitle: "cbtitle", cboutline: "cboutline", crisp: "crisp", jsPlaceholder: "js-placeholder" } };
    }, {}], 370: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plot_api/plot_template"), k = v("../../plots/cartesian/tick_value_defaults"), x = v("../../plots/cartesian/tick_mark_defaults"), e = v("../../plots/cartesian/tick_label_defaults"), r = v("../../plots/cartesian/prefix_suffix_defaults"), n = v("./attributes");
      Q.exports = function(s, t, d) {
        var u = g.newContainer(t, "colorbar"), o = s.colorbar || {};
        function h(L, A) {
          return m.coerce(o, u, n, L, A);
        }
        var l = d.margin || { t: 0, b: 0, l: 0, r: 0 }, i = d.width - l.l - l.r, p = d.height - l.t - l.b, c = h("orientation") === "v", a = h("thicknessmode");
        h("thickness", a === "fraction" ? 30 / (c ? i : p) : 30);
        var y = h("lenmode");
        h("len", y === "fraction" ? 1 : c ? p : i), h("x", c ? 1.02 : 0.5), h("xanchor", c ? "left" : "center"), h("xpad"), h("y", c ? 0.5 : 1.02), h("yanchor", c ? "middle" : "bottom"), h("ypad"), m.noneOrAll(o, u, ["x", "y"]), h("outlinecolor"), h("outlinewidth"), h("bordercolor"), h("borderwidth"), h("bgcolor");
        var f = m.coerce(o, u, { ticklabelposition: { valType: "enumerated", dflt: "outside", values: c ? ["outside", "inside", "outside top", "inside top", "outside bottom", "inside bottom"] : ["outside", "inside", "outside left", "inside left", "outside right", "inside right"] } }, "ticklabelposition");
        h("ticklabeloverflow", f.indexOf("inside") !== -1 ? "hide past domain" : "hide past div"), k(o, u, h, "linear");
        var _ = d.font, b = { outerTicks: !1, font: _ };
        f.indexOf("inside") !== -1 && (b.bgColor = "black"), r(o, u, h, "linear", b), e(o, u, h, "linear", b), x(o, u, h, "linear", b), h("title.text", d._dfltTitle.colorbar);
        var w = u.tickfont, T = m.extendFlat({}, w, { color: _.color, size: m.bigFont(w.size) });
        m.coerceFont(h, "title.font", T), h("title.side", c ? "top" : "right");
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../plots/cartesian/prefix_suffix_defaults": 583, "../../plots/cartesian/tick_label_defaults": 587, "../../plots/cartesian/tick_mark_defaults": 588, "../../plots/cartesian/tick_value_defaults": 589, "./attributes": 368 }], 371: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("tinycolor2"), k = v("../../plots/plots"), x = v("../../registry"), e = v("../../plots/cartesian/axes"), r = v("../dragelement"), n = v("../../lib"), s = n.strTranslate, t = v("../../lib/extend").extendFlat, d = v("../../lib/setcursor"), u = v("../drawing"), o = v("../color"), h = v("../titles"), l = v("../../lib/svg_text_utils"), i = v("../colorscale/helpers").flipScale, p = v("../../plots/cartesian/axis_defaults"), c = v("../../plots/cartesian/position_defaults"), a = v("../../plots/cartesian/layout_attributes"), y = v("../../constants/alignment"), f = y.LINE_SPACING, _ = y.FROM_TL, b = y.FROM_BR, w = v("./constants").cn;
      Q.exports = { draw: function(T) {
        var L = T._fullLayout._infolayer.selectAll("g." + w.colorbar).data(function(A) {
          var I, P, S, E, R = A._fullLayout, z = A.calcdata, j = [];
          function H(K) {
            return t(K, { _fillcolor: null, _line: { color: null, width: null, dash: null }, _levels: { start: null, end: null, size: null }, _filllevels: null, _fillgradient: null, _zrange: null });
          }
          function Y() {
            typeof E.calc == "function" ? E.calc(A, S, I) : (I._fillgradient = P.reversescale ? i(P.colorscale) : P.colorscale, I._zrange = [P[E.min], P[E.max]]);
          }
          for (var J = 0; J < z.length; J++) {
            var W = z[J], Z = (S = W[0].trace)._module.colorbar;
            if (S.visible === !0 && Z)
              for (var re = Array.isArray(Z), V = re ? Z : [Z], B = 0; B < V.length; B++) {
                var U = (E = V[B]).container;
                (P = U ? S[U] : S) && P.showscale && ((I = H(P.colorbar))._id = "cb" + S.uid + (re && U ? "-" + U : ""), I._traceIndex = S.index, I._propPrefix = (U ? U + "." : "") + "colorbar.", I._meta = S._meta, Y(), j.push(I));
              }
          }
          for (var ee in R._colorAxes)
            if ((P = R[ee]).showscale) {
              var N = R._colorAxes[ee];
              (I = H(P.colorbar))._id = "cb" + ee, I._propPrefix = ee + ".colorbar.", I._meta = R._meta, E = { min: "cmin", max: "cmax" }, N[0] !== "heatmap" && (S = N[1], E.calc = S._module.colorbar.calc), Y(), j.push(I);
            }
          return j;
        }(T), function(A) {
          return A._id;
        });
        L.enter().append("g").attr("class", function(A) {
          return A._id;
        }).classed(w.colorbar, !0), L.each(function(A) {
          var I = m.select(this);
          n.ensureSingle(I, "rect", w.cbbg), n.ensureSingle(I, "g", w.cbfills), n.ensureSingle(I, "g", w.cblines), n.ensureSingle(I, "g", w.cbaxis, function(S) {
            S.classed(w.crisp, !0);
          }), n.ensureSingle(I, "g", w.cbtitleunshift, function(S) {
            S.append("g").classed(w.cbtitle, !0);
          }), n.ensureSingle(I, "rect", w.cboutline);
          var P = function(S, E, R) {
            var z = E.orientation === "v", j = E.len, H = E.lenmode, Y = E.thickness, J = E.thicknessmode, W = E.outlinewidth, Z = E.borderwidth, re = E.bgcolor, V = E.xanchor, B = E.yanchor, U = E.xpad, ee = E.ypad, N = E.x, K = z ? E.y : 1 - E.y, X = R._fullLayout, te = X._size, ie = E._fillcolor, le = E._line, oe = E.title, ve = oe.side, ue = E._zrange || m.extent((typeof ie == "function" ? ie : le.color).domain()), ye = typeof le.color == "function" ? le.color : function() {
              return le.color;
            }, Ae = typeof ie == "function" ? ie : function() {
              return ie;
            }, pe = E._levels, ge = function(nr, It, Be) {
              var He, he, be = It._levels, Re = [], Ue = [], Xe = be.end + be.size / 100, qe = be.size, st = 1.001 * Be[0] - 1e-3 * Be[1], it = 1.001 * Be[1] - 1e-3 * Be[0];
              for (he = 0; he < 1e5 && (He = be.start + he * qe, !(qe > 0 ? He >= Xe : He <= Xe)); he++)
                He > st && He < it && Re.push(He);
              if (It._fillgradient)
                Ue = [0];
              else if (typeof It._fillcolor == "function") {
                var Tt = It._filllevels;
                if (Tt)
                  for (Xe = Tt.end + Tt.size / 100, qe = Tt.size, he = 0; he < 1e5 && (He = Tt.start + he * qe, !(qe > 0 ? He >= Xe : He <= Xe)); he++)
                    He > Be[0] && He < Be[1] && Ue.push(He);
                else
                  (Ue = Re.map(function(Pt) {
                    return Pt - be.size / 2;
                  })).push(Ue[Ue.length - 1] + be.size);
              } else
                It._fillcolor && typeof It._fillcolor == "string" && (Ue = [0]);
              return be.size < 0 && (Re.reverse(), Ue.reverse()), { line: Re, fill: Ue };
            }(0, E, ue), we = ge.fill, se = ge.line, de = Math.round(Y * (J === "fraction" ? z ? te.w : te.h : 1)), Te = de / (z ? te.w : te.h), Ee = Math.round(j * (H === "fraction" ? z ? te.h : te.w : 1)), Me = Ee / (z ? te.h : te.w), ze = Math.round(z ? N * te.w + U : K * te.h + ee), Ie = { center: 0.5, right: 1 }[V] || 0, Oe = { top: 1, middle: 0.5 }[B] || 0, Ze = z ? N - Ie * Te : K - Oe * Te, Fe = z ? K - Oe * Me : N - Ie * Me, Pe = Math.round(z ? te.h * (1 - Fe) : te.w * Fe);
            E._lenFrac = Me, E._thickFrac = Te, E._uFrac = Ze, E._vFrac = Fe;
            var De = E._axis = function(nr, It, Be) {
              var He = nr._fullLayout, he = It.orientation === "v", be = { type: "linear", range: Be, tickmode: It.tickmode, nticks: It.nticks, tick0: It.tick0, dtick: It.dtick, tickvals: It.tickvals, ticktext: It.ticktext, ticks: It.ticks, ticklen: It.ticklen, tickwidth: It.tickwidth, tickcolor: It.tickcolor, showticklabels: It.showticklabels, ticklabelposition: It.ticklabelposition, ticklabeloverflow: It.ticklabeloverflow, ticklabelstep: It.ticklabelstep, tickfont: It.tickfont, tickangle: It.tickangle, tickformat: It.tickformat, exponentformat: It.exponentformat, minexponent: It.minexponent, separatethousands: It.separatethousands, showexponent: It.showexponent, showtickprefix: It.showtickprefix, tickprefix: It.tickprefix, showticksuffix: It.showticksuffix, ticksuffix: It.ticksuffix, title: It.title, showline: !0, anchor: "free", side: he ? "right" : "bottom", position: 1 }, Re = he ? "y" : "x", Ue = { type: "linear", _id: Re + It._id }, Xe = { letter: Re, font: He.font, noHover: !0, noTickson: !0, noTicklabelmode: !0, calendar: He.calendar };
              function qe(st, it) {
                return n.coerce(be, Ue, a, st, it);
              }
              return p(be, Ue, qe, Xe, He), c(be, Ue, qe, Xe), Ue;
            }(R, E, ue);
            De.position = Te + (z ? N + U / te.w : K + ee / te.h);
            var Ge = ["top", "bottom"].indexOf(ve) !== -1;
            if (z && Ge && (De.title.side = ve, De.titlex = N + U / te.w, De.titley = Fe + (oe.side === "top" ? Me - ee / te.h : ee / te.h)), z || Ge || (De.title.side = ve, De.titley = K + ee / te.h, De.titlex = Fe + U / te.w), le.color && E.tickmode === "auto") {
              De.tickmode = "linear", De.tick0 = pe.start;
              var Qe = pe.size, ot = n.constrain(Ee / 50, 4, 15) + 1, vt = (ue[1] - ue[0]) / ((E.nticks || ot) * Qe);
              if (vt > 1) {
                var bt = Math.pow(10, Math.floor(Math.log(vt) / Math.LN10));
                Qe *= bt * n.roundUp(vt / bt, [2, 5, 10]), (Math.abs(pe.start) / pe.size + 1e-6) % 1 < 2e-6 && (De.tick0 = 0);
              }
              De.dtick = Qe;
            }
            De.domain = z ? [Fe + ee / te.h, Fe + Me - ee / te.h] : [Fe + U / te.w, Fe + Me - U / te.w], De.setScale(), S.attr("transform", s(Math.round(te.l), Math.round(te.t)));
            var yt, tt = S.select("." + w.cbtitleunshift).attr("transform", s(-Math.round(te.l), -Math.round(te.t))), Ke = De.ticklabelposition, mt = De.title.font.size, Ft = S.select("." + w.cbaxis), Vt = 0, Xt = 0;
            function Gt(nr, It) {
              var Be = { propContainer: De, propName: E._propPrefix + "title", traceIndex: E._traceIndex, _meta: E._meta, placeholder: X._dfltTitle.colorbar, containerGroup: S.select("." + w.cbtitle) }, He = nr.charAt(0) === "h" ? nr.substr(1) : "h" + nr;
              S.selectAll("." + He + ",." + He + "-math-group").remove(), h.draw(R, nr, t(Be, It || {}));
            }
            return n.syncOrAsync([k.previousPromises, function() {
              var nr, It;
              (z && Ge || !z && !Ge) && (ve === "top" && (nr = U + te.l + te.w * N, It = ee + te.t + te.h * (1 - Fe - Me) + 3 + 0.75 * mt), ve === "bottom" && (nr = U + te.l + te.w * N, It = ee + te.t + te.h * (1 - Fe) - 3 - 0.25 * mt), ve === "right" && (It = ee + te.t + te.h * K + 3 + 0.75 * mt, nr = U + te.l + te.w * Fe), Gt(De._id + "title", { attributes: { x: nr, y: It, "text-anchor": z ? "start" : "middle" } }));
            }, function() {
              if (!z && !Ge || z && Ge) {
                var nr, It = S.select("." + w.cbtitle), Be = It.select("text"), He = [-W / 2, W / 2], he = It.select(".h" + De._id + "title-math-group").node(), be = 15.6;
                if (Be.node() && (be = parseInt(Be.node().style.fontSize, 10) * f), he ? (nr = u.bBox(he), Xt = nr.width, (Vt = nr.height) > be && (He[1] -= (Vt - be) / 2)) : Be.node() && !Be.classed(w.jsPlaceholder) && (nr = u.bBox(Be.node()), Xt = nr.width, Vt = nr.height), z) {
                  if (Vt) {
                    if (Vt += 5, ve === "top")
                      De.domain[1] -= Vt / te.h, He[1] *= -1;
                    else {
                      De.domain[0] += Vt / te.h;
                      var Re = l.lineCount(Be);
                      He[1] += (1 - Re) * be;
                    }
                    It.attr("transform", s(He[0], He[1])), De.setScale();
                  }
                } else
                  Xt && (ve === "right" && (De.domain[0] += (Xt + mt / 2) / te.w), It.attr("transform", s(He[0], He[1])), De.setScale());
              }
              S.selectAll("." + w.cbfills + ",." + w.cblines).attr("transform", z ? s(0, Math.round(te.h * (1 - De.domain[1]))) : s(Math.round(te.w * De.domain[0]), 0)), Ft.attr("transform", z ? s(0, Math.round(-te.t)) : s(Math.round(-te.l), 0));
              var Ue = S.select("." + w.cbfills).selectAll("rect." + w.cbfill).attr("style", "").data(we);
              Ue.enter().append("rect").classed(w.cbfill, !0).style("stroke", "none"), Ue.exit().remove();
              var Xe = ue.map(De.c2p).map(Math.round).sort(function(Pt, rt) {
                return Pt - rt;
              });
              Ue.each(function(Pt, rt) {
                var ut = [rt === 0 ? ue[0] : (we[rt] + we[rt - 1]) / 2, rt === we.length - 1 ? ue[1] : (we[rt] + we[rt + 1]) / 2].map(De.c2p).map(Math.round);
                z && (ut[1] = n.constrain(ut[1] + (ut[1] > ut[0]) ? 1 : -1, Xe[0], Xe[1]));
                var Bt = m.select(this).attr(z ? "x" : "y", ze).attr(z ? "y" : "x", m.min(ut)).attr(z ? "width" : "height", Math.max(de, 2)).attr(z ? "height" : "width", Math.max(m.max(ut) - m.min(ut), 2));
                if (E._fillgradient)
                  u.gradient(Bt, R, E._id, z ? "vertical" : "horizontalreversed", E._fillgradient, "fill");
                else {
                  var wt = Ae(Pt).replace("e-", "");
                  Bt.attr("fill", g(wt).toHexString());
                }
              });
              var qe = S.select("." + w.cblines).selectAll("path." + w.cbline).data(le.color && le.width ? se : []);
              qe.enter().append("path").classed(w.cbline, !0), qe.exit().remove(), qe.each(function(Pt) {
                var rt = ze, ut = Math.round(De.c2p(Pt)) + le.width / 2 % 1;
                m.select(this).attr("d", "M" + (z ? rt + "," + ut : ut + "," + rt) + (z ? "h" : "v") + de).call(u.lineGroupStyle, le.width, ye(Pt), le.dash);
              }), Ft.selectAll("g." + De._id + "tick,path").remove();
              var st = ze + de + (W || 0) / 2 - (E.ticks === "outside" ? 1 : 0), it = e.calcTicks(De), Tt = e.getTickSigns(De)[2];
              return e.drawTicks(R, De, { vals: De.ticks === "inside" ? e.clipEnds(De, it) : it, layer: Ft, path: e.makeTickPath(De, st, Tt), transFn: e.makeTransTickFn(De) }), e.drawLabels(R, De, { vals: it, layer: Ft, transFn: e.makeTransTickLabelFn(De), labelFns: e.makeLabelFns(De, st) });
            }, function() {
              if (z && !Ge || !z && Ge) {
                var nr, It, Be = De.position || 0, He = De._offset + De._length / 2;
                if (ve === "right")
                  It = He, nr = te.l + te.w * Be + 10 + mt * (De.showticklabels ? 1 : 0.5);
                else if (nr = He, ve === "bottom" && (It = te.t + te.h * Be + 10 + (Ke.indexOf("inside") === -1 ? De.tickfont.size : 0) + (De.ticks !== "intside" && E.ticklen || 0)), ve === "top") {
                  var he = oe.text.split("<br>").length;
                  It = te.t + te.h * Be + 10 - de - f * mt * he;
                }
                Gt((z ? "h" : "v") + De._id + "title", { avoid: { selection: m.select(R).selectAll("g." + De._id + "tick"), side: ve, offsetTop: z ? 0 : te.t, offsetLeft: z ? te.l : 0, maxShift: z ? X.width : X.height }, attributes: { x: nr, y: It, "text-anchor": "middle" }, transform: { rotate: z ? -90 : 0, offset: 0 } });
              }
            }, k.previousPromises, function() {
              var nr, It = de + W / 2;
              Ke.indexOf("inside") === -1 && (nr = u.bBox(Ft.node()), It += z ? nr.width : nr.height), yt = tt.select("text");
              var Be = 0, He = z && ve === "top", he = !z && ve === "right", be = 0;
              if (yt.node() && !yt.classed(w.jsPlaceholder)) {
                var Re, Ue = tt.select(".h" + De._id + "title-math-group").node();
                Ue && (z && Ge || !z && !Ge) ? (Be = (nr = u.bBox(Ue)).width, Re = nr.height) : (Be = (nr = u.bBox(tt.node())).right - te.l - (z ? ze : Pe), Re = nr.bottom - te.t - (z ? Pe : ze), z || ve !== "top" || (It += nr.height, be = nr.height)), he && (yt.attr("transform", s(Be / 2 + mt / 2, 0)), Be *= 2), It = Math.max(It, z ? Be : Re);
              }
              var Xe = 2 * (z ? U : ee) + It + Z + W / 2, qe = 0;
              !z && oe.text && B === "bottom" && K <= 0 && (Xe += qe = Xe / 2, be += qe), X._hColorbarMoveTitle = qe, X._hColorbarMoveCBTitle = be;
              var st = Z + W;
              S.select("." + w.cbbg).attr("x", (z ? ze : Pe) - st / 2 - (z ? U : 0)).attr("y", (z ? Pe : ze) - (z ? Ee : ee + be - qe)).attr(z ? "width" : "height", Math.max(Xe - qe, 2)).attr(z ? "height" : "width", Math.max(Ee + st, 2)).call(o.fill, re).call(o.stroke, E.bordercolor).style("stroke-width", Z);
              var it = he ? Math.max(Be - 10, 0) : 0;
              if (S.selectAll("." + w.cboutline).attr("x", (z ? ze : Pe + U) + it).attr("y", (z ? Pe + ee - Ee : ze) + (He ? Vt : 0)).attr(z ? "width" : "height", Math.max(de, 2)).attr(z ? "height" : "width", Math.max(Ee - (z ? 2 * ee + Vt : 2 * U + it), 2)).call(o.stroke, E.outlinecolor).style({ fill: "none", "stroke-width": W }), S.attr("transform", s(te.l - (z ? Ie * Xe : 0), te.t - (z ? 0 : (1 - Oe) * Xe - be))), !z && (Z || g(re).getAlpha() && !g.equals(X.paper_bgcolor, re))) {
                var Tt = Ft.selectAll("text"), Pt = Tt[0].length, rt = S.select("." + w.cbbg).node(), ut = u.bBox(rt), Bt = u.getTranslate(S);
                Tt.each(function(Mt, Nt) {
                  var Zt = Pt - 1;
                  if (Nt === 0 || Nt === Zt) {
                    var Ut, fr = u.bBox(this), Tr = u.getTranslate(this);
                    if (Nt === Zt) {
                      var ur = fr.right + Tr.x;
                      (Ut = ut.right + Bt.x + Pe - Z - 2 + N - ur) > 0 && (Ut = 0);
                    } else if (Nt === 0) {
                      var Kt = fr.left + Tr.x;
                      (Ut = ut.left + Bt.x + Pe + Z + 2 - Kt) < 0 && (Ut = 0);
                    }
                    Ut && (Pt < 3 ? this.setAttribute("transform", "translate(" + Ut + ",0) " + this.getAttribute("transform")) : this.setAttribute("visibility", "hidden"));
                  }
                });
              }
              var wt = {}, Lt = _[V], Se = b[V], We = _[B], nt = b[B], ft = Xe - de;
              z ? (H === "pixels" ? (wt.y = K, wt.t = Ee * We, wt.b = Ee * nt) : (wt.t = wt.b = 0, wt.yt = K + j * We, wt.yb = K - j * nt), J === "pixels" ? (wt.x = N, wt.l = Xe * Lt, wt.r = Xe * Se) : (wt.l = ft * Lt, wt.r = ft * Se, wt.xl = N - Y * Lt, wt.xr = N + Y * Se)) : (H === "pixels" ? (wt.x = N, wt.l = Ee * Lt, wt.r = Ee * Se) : (wt.l = wt.r = 0, wt.xl = N + j * Lt, wt.xr = N - j * Se), J === "pixels" ? (wt.y = 1 - K, wt.t = Xe * We, wt.b = Xe * nt) : (wt.t = ft * We, wt.b = ft * nt, wt.yt = K - Y * We, wt.yb = K + Y * nt)), k.autoMargin(R, E._id, wt);
            }], R);
          }(I, A, T);
          P && P.then && (T._promises || []).push(P), T._context.edits.colorbarPosition && function(S, E, R) {
            var z, j, H, Y = E.orientation === "v", J = R._fullLayout._size;
            r.init({ element: S.node(), gd: R, prepFn: function() {
              z = S.attr("transform"), d(S);
            }, moveFn: function(W, Z) {
              S.attr("transform", z + s(W, Z)), j = r.align((Y ? E._uFrac : E._vFrac) + W / J.w, Y ? E._thickFrac : E._lenFrac, 0, 1, E.xanchor), H = r.align((Y ? E._vFrac : 1 - E._uFrac) - Z / J.h, Y ? E._lenFrac : E._thickFrac, 0, 1, E.yanchor);
              var re = r.getCursor(j, H, E.xanchor, E.yanchor);
              d(S, re);
            }, doneFn: function() {
              if (d(S), j !== void 0 && H !== void 0) {
                var W = {};
                W[E._propPrefix + "x"] = j, W[E._propPrefix + "y"] = H, E._traceIndex !== void 0 ? x.call("_guiRestyle", R, W, E._traceIndex) : x.call("_guiRelayout", R, W);
              }
            } });
          }(I, A, T);
        }), L.exit().each(function(A) {
          k.autoMargin(T, A._id);
        }).remove(), L.order();
      } };
    }, { "../../constants/alignment": 483, "../../lib": 515, "../../lib/extend": 505, "../../lib/setcursor": 536, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "../../plots/cartesian/axis_defaults": 568, "../../plots/cartesian/layout_attributes": 579, "../../plots/cartesian/position_defaults": 582, "../../plots/plots": 628, "../../registry": 647, "../color": 367, "../colorscale/helpers": 378, "../dragelement": 386, "../drawing": 389, "../titles": 476, "./constants": 369, "@plotly/d3": 58, tinycolor2: 313 }], 372: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g) {
        return m.isPlainObject(g.colorbar);
      };
    }, { "../../lib": 515 }], 373: [function(v, Q, $) {
      Q.exports = { moduleType: "component", name: "colorbar", attributes: v("./attributes"), supplyDefaults: v("./defaults"), draw: v("./draw").draw, hasColorbar: v("./has_colorbar") };
    }, { "./attributes": 368, "./defaults": 370, "./draw": 371, "./has_colorbar": 372 }], 374: [function(v, Q, $) {
      var m = v("../colorbar/attributes"), g = v("../../lib/regex").counter, k = v("../../lib/sort_object_keys"), x = v("./scales.js").scales;
      k(x);
      function e(r) {
        return "`" + r + "`";
      }
      Q.exports = function(r, n) {
        r = r || "";
        var s, t = (n = n || {}).cLetter || "c", d = ("onlyIfNumerical" in n ? n.onlyIfNumerical : Boolean(r), "noScale" in n ? n.noScale : r === "marker.line"), u = "showScaleDflt" in n ? n.showScaleDflt : t === "z", o = typeof n.colorscaleDflt == "string" ? x[n.colorscaleDflt] : null, h = n.editTypeOverride || "", l = r ? r + "." : "";
        "colorAttr" in n ? (s = n.colorAttr, n.colorAttr) : e(l + (s = { z: "z", c: "color" }[t]));
        var i = t + "auto", p = t + "min", c = t + "max", a = t + "mid", y = {};
        y[p] = y[c] = void 0;
        var f = {};
        f[i] = !1;
        var _ = {};
        return s === "color" && (_.color = { valType: "color", arrayOk: !0, editType: h || "style" }, n.anim && (_.color.anim = !0)), _[i] = { valType: "boolean", dflt: !0, editType: "calc", impliedEdits: y }, _[p] = { valType: "number", dflt: null, editType: h || "plot", impliedEdits: f }, _[c] = { valType: "number", dflt: null, editType: h || "plot", impliedEdits: f }, _[a] = { valType: "number", dflt: null, editType: "calc", impliedEdits: y }, _.colorscale = { valType: "colorscale", editType: "calc", dflt: o, impliedEdits: { autocolorscale: !1 } }, _.autocolorscale = { valType: "boolean", dflt: n.autoColorDflt !== !1, editType: "calc", impliedEdits: { colorscale: void 0 } }, _.reversescale = { valType: "boolean", dflt: !1, editType: "plot" }, d || (_.showscale = { valType: "boolean", dflt: u, editType: "calc" }, _.colorbar = m), n.noColorAxis || (_.coloraxis = { valType: "subplotid", regex: g("coloraxis"), dflt: null, editType: "calc" }), _;
      };
    }, { "../../lib/regex": 532, "../../lib/sort_object_keys": 538, "../colorbar/attributes": 368, "./scales.js": 382 }], 375: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("./helpers").extractOpts;
      Q.exports = function(x, e, r) {
        var n, s = x._fullLayout, t = r.vals, d = r.containerStr, u = d ? g.nestedProperty(e, d).get() : e, o = k(u), h = o.auto !== !1, l = o.min, i = o.max, p = o.mid, c = function() {
          return g.aggNums(Math.min, null, t);
        }, a = function() {
          return g.aggNums(Math.max, null, t);
        };
        l === void 0 ? l = c() : h && (l = u._colorAx && m(l) ? Math.min(l, c()) : c()), i === void 0 ? i = a() : h && (i = u._colorAx && m(i) ? Math.max(i, a()) : a()), h && p !== void 0 && (i - p > p - l ? l = p - (i - p) : i - p < p - l && (i = p + (p - l))), l === i && (l -= 0.5, i += 0.5), o._sync("min", l), o._sync("max", i), o.autocolorscale && (n = l * i < 0 ? s.colorscale.diverging : l >= 0 ? s.colorscale.sequential : s.colorscale.sequentialminus, o._sync("colorscale", n));
      };
    }, { "../../lib": 515, "./helpers": 378, "fast-isnumeric": 190 }], 376: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./helpers").hasColorscale, k = v("./helpers").extractOpts;
      Q.exports = function(x, e) {
        function r(h, l) {
          var i = h["_" + l];
          i !== void 0 && (h[l] = i);
        }
        function n(h, l) {
          var i = l.container ? m.nestedProperty(h, l.container).get() : h;
          if (i)
            if (i.coloraxis)
              i._colorAx = e[i.coloraxis];
            else {
              var p = k(i), c = p.auto;
              (c || p.min === void 0) && r(i, l.min), (c || p.max === void 0) && r(i, l.max), p.autocolorscale && r(i, "colorscale");
            }
        }
        for (var s = 0; s < x.length; s++) {
          var t = x[s], d = t._module.colorbar;
          if (d)
            if (Array.isArray(d))
              for (var u = 0; u < d.length; u++)
                n(t, d[u]);
            else
              n(t, d);
          g(t, "marker.line") && n(t, { container: "marker.line", min: "cmin", max: "cmax" });
        }
        for (var o in e._colorAxes)
          n(e[o], { min: "cmin", max: "cmax" });
      };
    }, { "../../lib": 515, "./helpers": 378 }], 377: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../colorbar/has_colorbar"), x = v("../colorbar/defaults"), e = v("./scales").isValid, r = v("../../registry").traceIs;
      function n(s, t) {
        var d = t.slice(0, t.length - 1);
        return t ? g.nestedProperty(s, d).get() || {} : s;
      }
      Q.exports = function s(t, d, u, o, h) {
        var l = h.prefix, i = h.cLetter, p = "_module" in d, c = n(t, l), a = n(d, l), y = n(d._template || {}, l) || {}, f = function() {
          return delete t.coloraxis, delete d.coloraxis, s(t, d, u, o, h);
        };
        if (p) {
          var _ = u._colorAxes || {}, b = o(l + "coloraxis");
          if (b) {
            var w = r(d, "contour") && g.nestedProperty(d, "contours.coloring").get() || "heatmap", T = _[b];
            return void (T ? (T[2].push(f), T[0] !== w && (T[0] = !1, g.warn(["Ignoring coloraxis:", b, "setting", "as it is linked to incompatible colorscales."].join(" ")))) : _[b] = [w, d, [f]]);
          }
        }
        var L = c[i + "min"], A = c[i + "max"], I = m(L) && m(A) && L < A;
        o(l + i + "auto", !I) ? o(l + i + "mid") : (o(l + i + "min"), o(l + i + "max"));
        var P, S, E = c.colorscale, R = y.colorscale;
        E !== void 0 && (P = !e(E)), R !== void 0 && (P = !e(R)), o(l + "autocolorscale", P), o(l + "colorscale"), o(l + "reversescale"), l !== "marker.line." && (l && p && (S = k(c)), o(l + "showscale", S) && (l && y && (a._template = y), x(c, a, u)));
      };
    }, { "../../lib": 515, "../../registry": 647, "../colorbar/defaults": 370, "../colorbar/has_colorbar": 372, "./scales": 382, "fast-isnumeric": 190 }], 378: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("tinycolor2"), k = v("fast-isnumeric"), x = v("../../lib"), e = v("../color"), r = v("./scales").isValid, n = ["showscale", "autocolorscale", "colorscale", "reversescale", "colorbar"], s = ["min", "max", "mid", "auto"];
      function t(l) {
        var i, p, c, a = l._colorAx, y = a || l, f = {};
        for (p = 0; p < n.length; p++)
          f[c = n[p]] = y[c];
        if (a)
          for (i = "c", p = 0; p < s.length; p++)
            f[c = s[p]] = y["c" + c];
        else {
          var _;
          for (p = 0; p < s.length; p++)
            ((_ = "c" + (c = s[p])) in y || (_ = "z" + c) in y) && (f[c] = y[_]);
          i = _.charAt(0);
        }
        return f._sync = function(b, w) {
          var T = s.indexOf(b) !== -1 ? i + b : b;
          y[T] = y["_" + T] = w;
        }, f;
      }
      function d(l) {
        for (var i = t(l), p = i.min, c = i.max, a = i.reversescale ? u(i.colorscale) : i.colorscale, y = a.length, f = new Array(y), _ = new Array(y), b = 0; b < y; b++) {
          var w = a[b];
          f[b] = p + w[0] * (c - p), _[b] = w[1];
        }
        return { domain: f, range: _ };
      }
      function u(l) {
        for (var i = l.length, p = new Array(i), c = i - 1, a = 0; c >= 0; c--, a++) {
          var y = l[c];
          p[a] = [1 - y[0], y[1]];
        }
        return p;
      }
      function o(l, i) {
        i = i || {};
        for (var p = l.domain, c = l.range, a = c.length, y = new Array(a), f = 0; f < a; f++) {
          var _ = g(c[f]).toRgb();
          y[f] = [_.r, _.g, _.b, _.a];
        }
        var b, w = m.scale.linear().domain(p).range(y).clamp(!0), T = i.noNumericCheck, L = i.returnArray;
        return (b = T && L ? w : T ? function(A) {
          return h(w(A));
        } : L ? function(A) {
          return k(A) ? w(A) : g(A).isValid() ? A : e.defaultLine;
        } : function(A) {
          return k(A) ? h(w(A)) : g(A).isValid() ? A : e.defaultLine;
        }).domain = w.domain, b.range = function() {
          return c;
        }, b;
      }
      function h(l) {
        var i = { r: l[0], g: l[1], b: l[2], a: l[3] };
        return g(i).toRgbString();
      }
      Q.exports = { hasColorscale: function(l, i, p) {
        var c = i ? x.nestedProperty(l, i).get() || {} : l, a = c[p || "color"], y = !1;
        if (x.isArrayOrTypedArray(a)) {
          for (var f = 0; f < a.length; f++)
            if (k(a[f])) {
              y = !0;
              break;
            }
        }
        return x.isPlainObject(c) && (y || c.showscale === !0 || k(c.cmin) && k(c.cmax) || r(c.colorscale) || x.isPlainObject(c.colorbar));
      }, extractOpts: t, extractScale: d, flipScale: u, makeColorScaleFunc: o, makeColorScaleFuncFromTrace: function(l, i) {
        return o(d(l), i);
      } };
    }, { "../../lib": 515, "../color": 367, "./scales": 382, "@plotly/d3": 58, "fast-isnumeric": 190, tinycolor2: 313 }], 379: [function(v, Q, $) {
      var m = v("./scales"), g = v("./helpers");
      Q.exports = { moduleType: "component", name: "colorscale", attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyLayoutDefaults: v("./layout_defaults"), handleDefaults: v("./defaults"), crossTraceDefaults: v("./cross_trace_defaults"), calc: v("./calc"), scales: m.scales, defaultScale: m.defaultScale, getScale: m.get, isValidScale: m.isValid, hasColorscale: g.hasColorscale, extractOpts: g.extractOpts, extractScale: g.extractScale, flipScale: g.flipScale, makeColorScaleFunc: g.makeColorScaleFunc, makeColorScaleFuncFromTrace: g.makeColorScaleFuncFromTrace };
    }, { "./attributes": 374, "./calc": 375, "./cross_trace_defaults": 376, "./defaults": 377, "./helpers": 378, "./layout_attributes": 380, "./layout_defaults": 381, "./scales": 382 }], 380: [function(v, Q, $) {
      var m = v("../../lib/extend").extendFlat, g = v("./attributes"), k = v("./scales").scales;
      Q.exports = { editType: "calc", colorscale: { editType: "calc", sequential: { valType: "colorscale", dflt: k.Reds, editType: "calc" }, sequentialminus: { valType: "colorscale", dflt: k.Blues, editType: "calc" }, diverging: { valType: "colorscale", dflt: k.RdBu, editType: "calc" } }, coloraxis: m({ _isSubplotObj: !0, editType: "calc" }, g("", { colorAttr: "corresponding trace color array(s)", noColorAxis: !0, showScaleDflt: !0 })) };
    }, { "../../lib/extend": 505, "./attributes": 374, "./scales": 382 }], 381: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plot_api/plot_template"), k = v("./layout_attributes"), x = v("./defaults");
      Q.exports = function(e, r) {
        function n(i, p) {
          return m.coerce(e, r, k, i, p);
        }
        n("colorscale.sequential"), n("colorscale.sequentialminus"), n("colorscale.diverging");
        var s, t, d = r._colorAxes;
        function u(i, p) {
          return m.coerce(s, t, k.coloraxis, i, p);
        }
        for (var o in d) {
          var h = d[o];
          if (h[0])
            s = e[o] || {}, (t = g.newContainer(r, o, "coloraxis"))._name = o, x(s, t, r, u, { prefix: "", cLetter: "c" });
          else {
            for (var l = 0; l < h[2].length; l++)
              h[2][l]();
            delete r._colorAxes[o];
          }
        }
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "./defaults": 377, "./layout_attributes": 380 }], 382: [function(v, Q, $) {
      var m = v("tinycolor2"), g = { Greys: [[0, "rgb(0,0,0)"], [1, "rgb(255,255,255)"]], YlGnBu: [[0, "rgb(8,29,88)"], [0.125, "rgb(37,52,148)"], [0.25, "rgb(34,94,168)"], [0.375, "rgb(29,145,192)"], [0.5, "rgb(65,182,196)"], [0.625, "rgb(127,205,187)"], [0.75, "rgb(199,233,180)"], [0.875, "rgb(237,248,217)"], [1, "rgb(255,255,217)"]], Greens: [[0, "rgb(0,68,27)"], [0.125, "rgb(0,109,44)"], [0.25, "rgb(35,139,69)"], [0.375, "rgb(65,171,93)"], [0.5, "rgb(116,196,118)"], [0.625, "rgb(161,217,155)"], [0.75, "rgb(199,233,192)"], [0.875, "rgb(229,245,224)"], [1, "rgb(247,252,245)"]], YlOrRd: [[0, "rgb(128,0,38)"], [0.125, "rgb(189,0,38)"], [0.25, "rgb(227,26,28)"], [0.375, "rgb(252,78,42)"], [0.5, "rgb(253,141,60)"], [0.625, "rgb(254,178,76)"], [0.75, "rgb(254,217,118)"], [0.875, "rgb(255,237,160)"], [1, "rgb(255,255,204)"]], Bluered: [[0, "rgb(0,0,255)"], [1, "rgb(255,0,0)"]], RdBu: [[0, "rgb(5,10,172)"], [0.35, "rgb(106,137,247)"], [0.5, "rgb(190,190,190)"], [0.6, "rgb(220,170,132)"], [0.7, "rgb(230,145,90)"], [1, "rgb(178,10,28)"]], Reds: [[0, "rgb(220,220,220)"], [0.2, "rgb(245,195,157)"], [0.4, "rgb(245,160,105)"], [1, "rgb(178,10,28)"]], Blues: [[0, "rgb(5,10,172)"], [0.35, "rgb(40,60,190)"], [0.5, "rgb(70,100,245)"], [0.6, "rgb(90,120,245)"], [0.7, "rgb(106,137,247)"], [1, "rgb(220,220,220)"]], Picnic: [[0, "rgb(0,0,255)"], [0.1, "rgb(51,153,255)"], [0.2, "rgb(102,204,255)"], [0.3, "rgb(153,204,255)"], [0.4, "rgb(204,204,255)"], [0.5, "rgb(255,255,255)"], [0.6, "rgb(255,204,255)"], [0.7, "rgb(255,153,255)"], [0.8, "rgb(255,102,204)"], [0.9, "rgb(255,102,102)"], [1, "rgb(255,0,0)"]], Rainbow: [[0, "rgb(150,0,90)"], [0.125, "rgb(0,0,200)"], [0.25, "rgb(0,25,255)"], [0.375, "rgb(0,152,255)"], [0.5, "rgb(44,255,150)"], [0.625, "rgb(151,255,0)"], [0.75, "rgb(255,234,0)"], [0.875, "rgb(255,111,0)"], [1, "rgb(255,0,0)"]], Portland: [[0, "rgb(12,51,131)"], [0.25, "rgb(10,136,186)"], [0.5, "rgb(242,211,56)"], [0.75, "rgb(242,143,56)"], [1, "rgb(217,30,30)"]], Jet: [[0, "rgb(0,0,131)"], [0.125, "rgb(0,60,170)"], [0.375, "rgb(5,255,255)"], [0.625, "rgb(255,255,0)"], [0.875, "rgb(250,0,0)"], [1, "rgb(128,0,0)"]], Hot: [[0, "rgb(0,0,0)"], [0.3, "rgb(230,0,0)"], [0.6, "rgb(255,210,0)"], [1, "rgb(255,255,255)"]], Blackbody: [[0, "rgb(0,0,0)"], [0.2, "rgb(230,0,0)"], [0.4, "rgb(230,210,0)"], [0.7, "rgb(255,255,255)"], [1, "rgb(160,200,255)"]], Earth: [[0, "rgb(0,0,130)"], [0.1, "rgb(0,180,180)"], [0.2, "rgb(40,210,40)"], [0.4, "rgb(230,230,50)"], [0.6, "rgb(120,70,20)"], [1, "rgb(255,255,255)"]], Electric: [[0, "rgb(0,0,0)"], [0.15, "rgb(30,0,100)"], [0.4, "rgb(120,0,100)"], [0.6, "rgb(160,90,0)"], [0.8, "rgb(230,200,0)"], [1, "rgb(255,250,220)"]], Viridis: [[0, "#440154"], [0.06274509803921569, "#48186a"], [0.12549019607843137, "#472d7b"], [0.18823529411764706, "#424086"], [0.25098039215686274, "#3b528b"], [0.3137254901960784, "#33638d"], [0.3764705882352941, "#2c728e"], [0.4392156862745098, "#26828e"], [0.5019607843137255, "#21918c"], [0.5647058823529412, "#1fa088"], [0.6274509803921569, "#28ae80"], [0.6901960784313725, "#3fbc73"], [0.7529411764705882, "#5ec962"], [0.8156862745098039, "#84d44b"], [0.8784313725490196, "#addc30"], [0.9411764705882353, "#d8e219"], [1, "#fde725"]], Cividis: [[0, "rgb(0,32,76)"], [0.058824, "rgb(0,42,102)"], [0.117647, "rgb(0,52,110)"], [0.176471, "rgb(39,63,108)"], [0.235294, "rgb(60,74,107)"], [0.294118, "rgb(76,85,107)"], [0.352941, "rgb(91,95,109)"], [0.411765, "rgb(104,106,112)"], [0.470588, "rgb(117,117,117)"], [0.529412, "rgb(131,129,120)"], [0.588235, "rgb(146,140,120)"], [0.647059, "rgb(161,152,118)"], [0.705882, "rgb(176,165,114)"], [0.764706, "rgb(192,177,109)"], [0.823529, "rgb(209,191,102)"], [0.882353, "rgb(225,204,92)"], [0.941176, "rgb(243,219,79)"], [1, "rgb(255,233,69)"]] }, k = g.RdBu;
      function x(e) {
        var r = 0;
        if (!Array.isArray(e) || e.length < 2 || !e[0] || !e[e.length - 1] || +e[0][0] != 0 || +e[e.length - 1][0] != 1)
          return !1;
        for (var n = 0; n < e.length; n++) {
          var s = e[n];
          if (s.length !== 2 || +s[0] < r || !m(s[1]).isValid())
            return !1;
          r = +s[0];
        }
        return !0;
      }
      Q.exports = { scales: g, defaultScale: k, get: function(e, r) {
        if (r || (r = k), !e)
          return r;
        function n() {
          try {
            e = g[e] || JSON.parse(e);
          } catch {
            e = r;
          }
        }
        return typeof e == "string" && (n(), typeof e == "string" && n()), x(e) ? e : r;
      }, isValid: function(e) {
        return g[e] !== void 0 || x(e);
      } };
    }, { tinycolor2: 313 }], 383: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        var r = (m - k) / (x - k), n = r + g / (x - k), s = (r + n) / 2;
        return e === "left" || e === "bottom" ? r : e === "center" || e === "middle" ? s : e === "right" || e === "top" ? n : r < 2 / 3 - s ? r : n > 4 / 3 - s ? n : s;
      };
    }, {}], 384: [function(v, Q, $) {
      var m = v("../../lib"), g = [["sw-resize", "s-resize", "se-resize"], ["w-resize", "move", "e-resize"], ["nw-resize", "n-resize", "ne-resize"]];
      Q.exports = function(k, x, e, r) {
        return k = e === "left" ? 0 : e === "center" ? 1 : e === "right" ? 2 : m.constrain(Math.floor(3 * k), 0, 2), x = r === "bottom" ? 0 : r === "middle" ? 1 : r === "top" ? 2 : m.constrain(Math.floor(3 * x), 0, 2), g[x][k];
      };
    }, { "../../lib": 515 }], 385: [function(v, Q, $) {
      $.selectMode = function(m) {
        return m === "lasso" || m === "select";
      }, $.drawMode = function(m) {
        return m === "drawclosedpath" || m === "drawopenpath" || m === "drawline" || m === "drawrect" || m === "drawcircle";
      }, $.openMode = function(m) {
        return m === "drawline" || m === "drawopenpath";
      }, $.rectMode = function(m) {
        return m === "select" || m === "drawline" || m === "drawrect" || m === "drawcircle";
      }, $.freeMode = function(m) {
        return m === "lasso" || m === "drawclosedpath" || m === "drawopenpath";
      }, $.selectingOrDrawing = function(m) {
        return $.freeMode(m) || $.rectMode(m);
      };
    }, {}], 386: [function(v, Q, $) {
      var m = v("mouse-event-offset"), g = v("has-hover"), k = v("has-passive-events"), x = v("../../lib").removeElement, e = v("../../plots/cartesian/constants"), r = Q.exports = {};
      r.align = v("./align"), r.getCursor = v("./cursor");
      var n = v("./unhover");
      function s() {
        var d = document.createElement("div");
        d.className = "dragcover";
        var u = d.style;
        return u.position = "fixed", u.left = 0, u.right = 0, u.top = 0, u.bottom = 0, u.zIndex = 999999999, u.background = "none", document.body.appendChild(d), d;
      }
      function t(d) {
        return m(d.changedTouches ? d.changedTouches[0] : d, document.body);
      }
      r.unhover = n.wrapped, r.unhoverRaw = n.raw, r.init = function(d) {
        var u, o, h, l, i, p, c, a, y = d.gd, f = 1, _ = y._context.doubleClickDelay, b = d.element;
        y._mouseDownTime || (y._mouseDownTime = 0), b.style.pointerEvents = "all", b.onmousedown = T, k ? (b._ontouchstart && b.removeEventListener("touchstart", b._ontouchstart), b._ontouchstart = T, b.addEventListener("touchstart", T, { passive: !1 })) : b.ontouchstart = T;
        var w = d.clampFn || function(I, P, S) {
          return Math.abs(I) < S && (I = 0), Math.abs(P) < S && (P = 0), [I, P];
        };
        function T(I) {
          y._dragged = !1, y._dragging = !0;
          var P = t(I);
          u = P[0], o = P[1], c = I.target, p = I, a = I.buttons === 2 || I.ctrlKey, I.clientX === void 0 && I.clientY === void 0 && (I.clientX = u, I.clientY = o), (h = new Date().getTime()) - y._mouseDownTime < _ ? f += 1 : (f = 1, y._mouseDownTime = h), d.prepFn && d.prepFn(I, u, o), g && !a ? (i = s()).style.cursor = window.getComputedStyle(b).cursor : g || (i = document, l = window.getComputedStyle(document.documentElement).cursor, document.documentElement.style.cursor = window.getComputedStyle(b).cursor), document.addEventListener("mouseup", A), document.addEventListener("touchend", A), d.dragmode !== !1 && (I.preventDefault(), document.addEventListener("mousemove", L), document.addEventListener("touchmove", L, { passive: !1 }));
        }
        function L(I) {
          I.preventDefault();
          var P = t(I), S = d.minDrag || e.MINDRAG, E = w(P[0] - u, P[1] - o, S), R = E[0], z = E[1];
          (R || z) && (y._dragged = !0, r.unhover(y, I)), y._dragged && d.moveFn && !a && (y._dragdata = { element: b, dx: R, dy: z }, d.moveFn(R, z));
        }
        function A(I) {
          if (delete y._dragdata, d.dragmode !== !1 && (I.preventDefault(), document.removeEventListener("mousemove", L), document.removeEventListener("touchmove", L)), document.removeEventListener("mouseup", A), document.removeEventListener("touchend", A), g ? x(i) : l && (i.documentElement.style.cursor = l, l = null), y._dragging) {
            if (y._dragging = !1, new Date().getTime() - y._mouseDownTime > _ && (f = Math.max(f - 1, 1)), y._dragged)
              d.doneFn && d.doneFn();
            else if (d.clickFn && d.clickFn(f, p), !a) {
              var P;
              try {
                P = new MouseEvent("click", I);
              } catch {
                var S = t(I);
                (P = document.createEvent("MouseEvents")).initMouseEvent("click", I.bubbles, I.cancelable, I.view, I.detail, I.screenX, I.screenY, S[0], S[1], I.ctrlKey, I.altKey, I.shiftKey, I.metaKey, I.button, I.relatedTarget);
              }
              c.dispatchEvent(P);
            }
            y._dragging = !1, y._dragged = !1;
          } else
            y._dragged = !1;
        }
      }, r.coverSlip = s;
    }, { "../../lib": 515, "../../plots/cartesian/constants": 573, "./align": 383, "./cursor": 384, "./unhover": 387, "has-hover": 228, "has-passive-events": 229, "mouse-event-offset": 242 }], 387: [function(v, Q, $) {
      var m = v("../../lib/events"), g = v("../../lib/throttle"), k = v("../../lib/dom").getGraphDiv, x = v("../fx/constants"), e = Q.exports = {};
      e.wrapped = function(r, n, s) {
        (r = k(r))._fullLayout && g.clear(r._fullLayout._uid + x.HOVERID), e.raw(r, n, s);
      }, e.raw = function(r, n) {
        var s = r._fullLayout, t = r._hoverdata;
        n || (n = {}), n.target && !r._dragged && m.triggerHandler(r, "plotly_beforehover", n) === !1 || (s._hoverlayer.selectAll("g").remove(), s._hoverlayer.selectAll("line").remove(), s._hoverlayer.selectAll("circle").remove(), r._hoverdata = void 0, n.target && t && r.emit("plotly_unhover", { event: n, points: t }));
      };
    }, { "../../lib/dom": 503, "../../lib/events": 504, "../../lib/throttle": 542, "../fx/constants": 401 }], 388: [function(v, Q, $) {
      $.dash = { valType: "string", values: ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"], dflt: "solid", editType: "style" }, $.pattern = { shape: { valType: "enumerated", values: ["", "/", "\\", "x", "-", "|", "+", "."], dflt: "", arrayOk: !0, editType: "style" }, fillmode: { valType: "enumerated", values: ["replace", "overlay"], dflt: "replace", editType: "style" }, bgcolor: { valType: "color", arrayOk: !0, editType: "style" }, fgcolor: { valType: "color", arrayOk: !0, editType: "style" }, fgopacity: { valType: "number", editType: "style", min: 0, max: 1 }, size: { valType: "number", min: 0, dflt: 8, arrayOk: !0, editType: "style" }, solidity: { valType: "number", min: 0, max: 1, dflt: 0.3, arrayOk: !0, editType: "style" }, editType: "style" };
    }, {}], 389: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = g.numberFormat, x = v("fast-isnumeric"), e = v("tinycolor2"), r = v("../../registry"), n = v("../color"), s = v("../colorscale"), t = g.strTranslate, d = v("../../lib/svg_text_utils"), u = v("../../constants/xmlns_namespaces"), o = v("../../constants/alignment").LINE_SPACING, h = v("../../constants/interactions").DESELECTDIM, l = v("../../traces/scatter/subtypes"), i = v("../../traces/scatter/make_bubble_size_func"), p = v("../../components/fx/helpers").appendArrayPointValue, c = Q.exports = {};
      function a(pe, ge, we) {
        var se = ge.fillpattern, de = se && c.getPatternAttr(se.shape, 0, "");
        if (de) {
          var Te = c.getPatternAttr(se.bgcolor, 0, null), Ee = c.getPatternAttr(se.fgcolor, 0, null), Me = se.fgopacity, ze = c.getPatternAttr(se.size, 0, 8), Ie = c.getPatternAttr(se.solidity, 0, 0.3), Oe = ge.uid;
          c.pattern(pe, "point", we, Oe, de, ze, Ie, void 0, se.fillmode, Te, Ee, Me);
        } else
          ge.fillcolor && pe.call(n.fill, ge.fillcolor);
      }
      c.font = function(pe, ge, we, se) {
        g.isPlainObject(ge) && (se = ge.color, we = ge.size, ge = ge.family), ge && pe.style("font-family", ge), we + 1 && pe.style("font-size", we + "px"), se && pe.call(n.fill, se);
      }, c.setPosition = function(pe, ge, we) {
        pe.attr("x", ge).attr("y", we);
      }, c.setSize = function(pe, ge, we) {
        pe.attr("width", ge).attr("height", we);
      }, c.setRect = function(pe, ge, we, se, de) {
        pe.call(c.setPosition, ge, we).call(c.setSize, se, de);
      }, c.translatePoint = function(pe, ge, we, se) {
        var de = we.c2p(pe.x), Te = se.c2p(pe.y);
        return !!(x(de) && x(Te) && ge.node()) && (ge.node().nodeName === "text" ? ge.attr("x", de).attr("y", Te) : ge.attr("transform", t(de, Te)), !0);
      }, c.translatePoints = function(pe, ge, we) {
        pe.each(function(se) {
          var de = m.select(this);
          c.translatePoint(se, de, ge, we);
        });
      }, c.hideOutsideRangePoint = function(pe, ge, we, se, de, Te) {
        ge.attr("display", we.isPtWithinRange(pe, de) && se.isPtWithinRange(pe, Te) ? null : "none");
      }, c.hideOutsideRangePoints = function(pe, ge) {
        if (ge._hasClipOnAxisFalse) {
          var we = ge.xaxis, se = ge.yaxis;
          pe.each(function(de) {
            var Te = de[0].trace, Ee = Te.xcalendar, Me = Te.ycalendar, ze = r.traceIs(Te, "bar-like") ? ".bartext" : ".point,.textpoint";
            pe.selectAll(ze).each(function(Ie) {
              c.hideOutsideRangePoint(Ie, m.select(this), we, se, Ee, Me);
            });
          });
        }
      }, c.crispRound = function(pe, ge, we) {
        return ge && x(ge) ? pe._context.staticPlot ? ge : ge < 1 ? 1 : Math.round(ge) : we || 0;
      }, c.singleLineStyle = function(pe, ge, we, se, de) {
        ge.style("fill", "none");
        var Te = (((pe || [])[0] || {}).trace || {}).line || {}, Ee = we || Te.width || 0, Me = de || Te.dash || "";
        n.stroke(ge, se || Te.color), c.dashLine(ge, Me, Ee);
      }, c.lineGroupStyle = function(pe, ge, we, se) {
        pe.style("fill", "none").each(function(de) {
          var Te = (((de || [])[0] || {}).trace || {}).line || {}, Ee = ge || Te.width || 0, Me = se || Te.dash || "";
          m.select(this).call(n.stroke, we || Te.color).call(c.dashLine, Me, Ee);
        });
      }, c.dashLine = function(pe, ge, we) {
        we = +we || 0, ge = c.dashStyle(ge, we), pe.style({ "stroke-dasharray": ge, "stroke-width": we + "px" });
      }, c.dashStyle = function(pe, ge) {
        ge = +ge || 1;
        var we = Math.max(ge, 3);
        return pe === "solid" ? pe = "" : pe === "dot" ? pe = we + "px," + we + "px" : pe === "dash" ? pe = 3 * we + "px," + 3 * we + "px" : pe === "longdash" ? pe = 5 * we + "px," + 5 * we + "px" : pe === "dashdot" ? pe = 3 * we + "px," + we + "px," + we + "px," + we + "px" : pe === "longdashdot" && (pe = 5 * we + "px," + 2 * we + "px," + we + "px," + 2 * we + "px"), pe;
      }, c.singleFillStyle = function(pe, ge) {
        var we = m.select(pe.node());
        a(pe, ((we.data()[0] || [])[0] || {}).trace || {}, ge);
      }, c.fillGroupStyle = function(pe, ge) {
        pe.style("stroke-width", 0).each(function(we) {
          var se = m.select(this);
          we[0].trace && a(se, we[0].trace, ge);
        });
      };
      var y = v("./symbol_defs");
      c.symbolNames = [], c.symbolFuncs = [], c.symbolBackOffs = [], c.symbolNeedLines = {}, c.symbolNoDot = {}, c.symbolNoFill = {}, c.symbolList = [], Object.keys(y).forEach(function(pe) {
        var ge = y[pe], we = ge.n;
        c.symbolList.push(we, String(we), pe, we + 100, String(we + 100), pe + "-open"), c.symbolNames[we] = pe, c.symbolFuncs[we] = ge.f, c.symbolBackOffs[we] = ge.backoff || 0, ge.needLine && (c.symbolNeedLines[we] = !0), ge.noDot ? c.symbolNoDot[we] = !0 : c.symbolList.push(we + 200, String(we + 200), pe + "-dot", we + 300, String(we + 300), pe + "-open-dot"), ge.noFill && (c.symbolNoFill[we] = !0);
      });
      var f = c.symbolNames.length;
      function _(pe, ge, we, se) {
        var de = pe % 100;
        return c.symbolFuncs[de](ge, we, se) + (pe >= 200 ? "M0,0.5L0.5,0L0,-0.5L-0.5,0Z" : "");
      }
      c.symbolNumber = function(pe) {
        if (x(pe))
          pe = +pe;
        else if (typeof pe == "string") {
          var ge = 0;
          pe.indexOf("-open") > 0 && (ge = 100, pe = pe.replace("-open", "")), pe.indexOf("-dot") > 0 && (ge += 200, pe = pe.replace("-dot", "")), (pe = c.symbolNames.indexOf(pe)) >= 0 && (pe += ge);
        }
        return pe % 100 >= f || pe >= 400 ? 0 : Math.floor(Math.max(pe, 0));
      };
      var b = { x1: 1, x2: 0, y1: 0, y2: 0 }, w = { x1: 0, x2: 0, y1: 1, y2: 0 }, T = k("~f"), L = { radial: { node: "radialGradient" }, radialreversed: { node: "radialGradient", reversed: !0 }, horizontal: { node: "linearGradient", attrs: b }, horizontalreversed: { node: "linearGradient", attrs: b, reversed: !0 }, vertical: { node: "linearGradient", attrs: w }, verticalreversed: { node: "linearGradient", attrs: w, reversed: !0 } };
      c.gradient = function(pe, ge, we, se, de, Te) {
        for (var Ee = de.length, Me = L[se], ze = new Array(Ee), Ie = 0; Ie < Ee; Ie++)
          Me.reversed ? ze[Ee - 1 - Ie] = [T(100 * (1 - de[Ie][0])), de[Ie][1]] : ze[Ie] = [T(100 * de[Ie][0]), de[Ie][1]];
        var Oe = ge._fullLayout, Ze = "g" + Oe._uid + "-" + we, Fe = Oe._defs.select(".gradients").selectAll("#" + Ze).data([se + ze.join(";")], g.identity);
        Fe.exit().remove(), Fe.enter().append(Me.node).each(function() {
          var Pe = m.select(this);
          Me.attrs && Pe.attr(Me.attrs), Pe.attr("id", Ze);
          var De = Pe.selectAll("stop").data(ze);
          De.exit().remove(), De.enter().append("stop"), De.each(function(Ge) {
            var Qe = e(Ge[1]);
            m.select(this).attr({ offset: Ge[0] + "%", "stop-color": n.tinyRGB(Qe), "stop-opacity": Qe.getAlpha() });
          });
        }), pe.style(Te, V(Ze, ge)).style(Te + "-opacity", null), pe.classed("gradient_filled", !0);
      }, c.pattern = function(pe, ge, we, se, de, Te, Ee, Me, ze, Ie, Oe, Ze) {
        var Fe = ge === "legend";
        Me && (ze === "overlay" ? (Ie = Me, Oe = n.contrast(Ie)) : (Ie = void 0, Oe = Me));
        var Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke, mt, Ft = we._fullLayout, Vt = "p" + Ft._uid + "-" + se, Xt = {}, Gt = e(Oe), nr = n.tinyRGB(Gt), It = Ze * Gt.getAlpha();
        switch (de) {
          case "/":
            Pe = Te * Math.sqrt(2), De = Te * Math.sqrt(2), vt = "path", Xt = { d: Ge = "M-" + Pe / 4 + "," + De / 4 + "l" + Pe / 2 + ",-" + De / 2 + "M0," + De + "L" + Pe + ",0M" + Pe / 4 * 3 + "," + De / 4 * 5 + "l" + Pe / 2 + ",-" + De / 2, opacity: It, stroke: nr, "stroke-width": (Qe = Ee * Te) + "px" };
            break;
          case "\\":
            Pe = Te * Math.sqrt(2), De = Te * Math.sqrt(2), vt = "path", Xt = { d: Ge = "M" + Pe / 4 * 3 + ",-" + De / 4 + "l" + Pe / 2 + "," + De / 2 + "M0,0L" + Pe + "," + De + "M-" + Pe / 4 + "," + De / 4 * 3 + "l" + Pe / 2 + "," + De / 2, opacity: It, stroke: nr, "stroke-width": (Qe = Ee * Te) + "px" };
            break;
          case "x":
            Pe = Te * Math.sqrt(2), De = Te * Math.sqrt(2), Ge = "M-" + Pe / 4 + "," + De / 4 + "l" + Pe / 2 + ",-" + De / 2 + "M0," + De + "L" + Pe + ",0M" + Pe / 4 * 3 + "," + De / 4 * 5 + "l" + Pe / 2 + ",-" + De / 2 + "M" + Pe / 4 * 3 + ",-" + De / 4 + "l" + Pe / 2 + "," + De / 2 + "M0,0L" + Pe + "," + De + "M-" + Pe / 4 + "," + De / 4 * 3 + "l" + Pe / 2 + "," + De / 2, Qe = Te - Te * Math.sqrt(1 - Ee), vt = "path", Xt = { d: Ge, opacity: It, stroke: nr, "stroke-width": Qe + "px" };
            break;
          case "|":
            vt = "path", vt = "path", Xt = { d: Ge = "M" + (Pe = Te) / 2 + ",0L" + Pe / 2 + "," + (De = Te), opacity: It, stroke: nr, "stroke-width": (Qe = Ee * Te) + "px" };
            break;
          case "-":
            vt = "path", vt = "path", Xt = { d: Ge = "M0," + (De = Te) / 2 + "L" + (Pe = Te) + "," + De / 2, opacity: It, stroke: nr, "stroke-width": (Qe = Ee * Te) + "px" };
            break;
          case "+":
            vt = "path", Ge = "M" + (Pe = Te) / 2 + ",0L" + Pe / 2 + "," + (De = Te) + "M0," + De / 2 + "L" + Pe + "," + De / 2, Qe = Te - Te * Math.sqrt(1 - Ee), vt = "path", Xt = { d: Ge, opacity: It, stroke: nr, "stroke-width": Qe + "px" };
            break;
          case ".":
            Pe = Te, De = Te, Ee < Math.PI / 4 ? ot = Math.sqrt(Ee * Te * Te / Math.PI) : (bt = Ee, yt = Math.PI / 4, tt = 1, Ke = Te / 2, mt = Te / Math.sqrt(2), ot = Ke + (mt - Ke) * (bt - yt) / (tt - yt)), vt = "circle", Xt = { cx: Pe / 2, cy: De / 2, r: ot, opacity: It, fill: nr };
        }
        var Be = [de || "noSh", Ie || "noBg", Oe || "noFg", Te, Ee].join(";"), He = Ft._defs.select(".patterns").selectAll("#" + Vt).data([Be], g.identity);
        He.exit().remove(), He.enter().append("pattern").each(function() {
          var he = m.select(this);
          if (he.attr({ id: Vt, width: Pe + "px", height: De + "px", patternUnits: "userSpaceOnUse", patternTransform: Fe ? "scale(0.8)" : "" }), Ie) {
            var be = e(Ie), Re = n.tinyRGB(be), Ue = be.getAlpha(), Xe = he.selectAll("rect").data([0]);
            Xe.exit().remove(), Xe.enter().append("rect").attr({ width: Pe + "px", height: De + "px", fill: Re, "fill-opacity": Ue });
          }
          var qe = he.selectAll(vt).data([0]);
          qe.exit().remove(), qe.enter().append(vt).attr(Xt);
        }), pe.style("fill", V(Vt, we)).style("fill-opacity", null), pe.classed("pattern_filled", !0);
      }, c.initGradients = function(pe) {
        var ge = pe._fullLayout;
        g.ensureSingle(ge._defs, "g", "gradients").selectAll("linearGradient,radialGradient").remove(), m.select(pe).selectAll(".gradient_filled").classed("gradient_filled", !1);
      }, c.initPatterns = function(pe) {
        var ge = pe._fullLayout;
        g.ensureSingle(ge._defs, "g", "patterns").selectAll("pattern").remove(), m.select(pe).selectAll(".pattern_filled").classed("pattern_filled", !1);
      }, c.getPatternAttr = function(pe, ge, we) {
        return pe && g.isArrayOrTypedArray(pe) ? ge < pe.length ? pe[ge] : we : pe;
      }, c.pointStyle = function(pe, ge, we) {
        if (pe.size()) {
          var se = c.makePointStyleFns(ge);
          pe.each(function(de) {
            c.singlePointStyle(de, m.select(this), ge, se, we);
          });
        }
      }, c.singlePointStyle = function(pe, ge, we, se, de) {
        var Te = we.marker, Ee = Te.line;
        if (ge.style("opacity", se.selectedOpacityFn ? se.selectedOpacityFn(pe) : pe.mo === void 0 ? Te.opacity : pe.mo), se.ms2mrc) {
          var Me;
          Me = pe.ms === "various" || Te.size === "various" ? 3 : se.ms2mrc(pe.ms), pe.mrc = Me, se.selectedSizeFn && (Me = pe.mrc = se.selectedSizeFn(pe));
          var ze = c.symbolNumber(pe.mx || Te.symbol) || 0;
          pe.om = ze % 200 >= 100;
          var Ie = Ae(pe, we), Oe = ee(pe, we);
          ge.attr("d", _(ze, Me, Ie, Oe));
        }
        var Ze, Fe, Pe, De = !1;
        if (pe.so)
          Pe = Ee.outlierwidth, Fe = Ee.outliercolor, Ze = Te.outliercolor;
        else {
          var Ge = (Ee || {}).width;
          Pe = (pe.mlw + 1 || Ge + 1 || (pe.trace ? (pe.trace.marker.line || {}).width : 0) + 1) - 1 || 0, Fe = "mlc" in pe ? pe.mlcc = se.lineScale(pe.mlc) : g.isArrayOrTypedArray(Ee.color) ? n.defaultLine : Ee.color, g.isArrayOrTypedArray(Te.color) && (Ze = n.defaultLine, De = !0), Ze = "mc" in pe ? pe.mcc = se.markerScale(pe.mc) : Te.color || "rgba(0,0,0,0)", se.selectedColorFn && (Ze = se.selectedColorFn(pe));
        }
        if (pe.om)
          ge.call(n.stroke, Ze).style({ "stroke-width": (Pe || 1) + "px", fill: "none" });
        else {
          ge.style("stroke-width", (pe.isBlank ? 0 : Pe) + "px");
          var Qe = Te.gradient, ot = pe.mgt;
          ot ? De = !0 : ot = Qe && Qe.type, g.isArrayOrTypedArray(ot) && (ot = ot[0], L[ot] || (ot = 0));
          var vt = Te.pattern, bt = vt && c.getPatternAttr(vt.shape, pe.i, "");
          if (ot && ot !== "none") {
            var yt = pe.mgc;
            yt ? De = !0 : yt = Qe.color;
            var tt = we.uid;
            De && (tt += "-" + pe.i), c.gradient(ge, de, tt, ot, [[0, yt], [1, Ze]], "fill");
          } else if (bt) {
            var Ke = c.getPatternAttr(vt.bgcolor, pe.i, null), mt = c.getPatternAttr(vt.fgcolor, pe.i, null), Ft = vt.fgopacity, Vt = c.getPatternAttr(vt.size, pe.i, 8), Xt = c.getPatternAttr(vt.solidity, pe.i, 0.3), Gt = pe.mcc || g.isArrayOrTypedArray(vt.shape) || g.isArrayOrTypedArray(vt.bgcolor) || g.isArrayOrTypedArray(vt.size) || g.isArrayOrTypedArray(vt.solidity), nr = we.uid;
            Gt && (nr += "-" + pe.i), c.pattern(ge, "point", de, nr, bt, Vt, Xt, pe.mcc, vt.fillmode, Ke, mt, Ft);
          } else
            n.fill(ge, Ze);
          Pe && n.stroke(ge, Fe);
        }
      }, c.makePointStyleFns = function(pe) {
        var ge = {}, we = pe.marker;
        return ge.markerScale = c.tryColorscale(we, ""), ge.lineScale = c.tryColorscale(we, "line"), r.traceIs(pe, "symbols") && (ge.ms2mrc = l.isBubble(pe) ? i(pe) : function() {
          return (we.size || 6) / 2;
        }), pe.selectedpoints && g.extendFlat(ge, c.makeSelectedPointStyleFns(pe)), ge;
      }, c.makeSelectedPointStyleFns = function(pe) {
        var ge = {}, we = pe.selected || {}, se = pe.unselected || {}, de = pe.marker || {}, Te = we.marker || {}, Ee = se.marker || {}, Me = de.opacity, ze = Te.opacity, Ie = Ee.opacity, Oe = ze !== void 0, Ze = Ie !== void 0;
        (g.isArrayOrTypedArray(Me) || Oe || Ze) && (ge.selectedOpacityFn = function(yt) {
          var tt = yt.mo === void 0 ? de.opacity : yt.mo;
          return yt.selected ? Oe ? ze : tt : Ze ? Ie : h * tt;
        });
        var Fe = de.color, Pe = Te.color, De = Ee.color;
        (Pe || De) && (ge.selectedColorFn = function(yt) {
          var tt = yt.mcc || Fe;
          return yt.selected ? Pe || tt : De || tt;
        });
        var Ge = de.size, Qe = Te.size, ot = Ee.size, vt = Qe !== void 0, bt = ot !== void 0;
        return r.traceIs(pe, "symbols") && (vt || bt) && (ge.selectedSizeFn = function(yt) {
          var tt = yt.mrc || Ge / 2;
          return yt.selected ? vt ? Qe / 2 : tt : bt ? ot / 2 : tt;
        }), ge;
      }, c.makeSelectedTextStyleFns = function(pe) {
        var ge = {}, we = pe.selected || {}, se = pe.unselected || {}, de = pe.textfont || {}, Te = we.textfont || {}, Ee = se.textfont || {}, Me = de.color, ze = Te.color, Ie = Ee.color;
        return ge.selectedTextColorFn = function(Oe) {
          var Ze = Oe.tc || Me;
          return Oe.selected ? ze || Ze : Ie || (ze ? Ze : n.addOpacity(Ze, h));
        }, ge;
      }, c.selectedPointStyle = function(pe, ge) {
        if (pe.size() && ge.selectedpoints) {
          var we = c.makeSelectedPointStyleFns(ge), se = ge.marker || {}, de = [];
          we.selectedOpacityFn && de.push(function(Te, Ee) {
            Te.style("opacity", we.selectedOpacityFn(Ee));
          }), we.selectedColorFn && de.push(function(Te, Ee) {
            n.fill(Te, we.selectedColorFn(Ee));
          }), we.selectedSizeFn && de.push(function(Te, Ee) {
            var Me = Ee.mx || se.symbol || 0, ze = we.selectedSizeFn(Ee);
            Te.attr("d", _(c.symbolNumber(Me), ze, Ae(Ee, ge), ee(Ee, ge))), Ee.mrc2 = ze;
          }), de.length && pe.each(function(Te) {
            for (var Ee = m.select(this), Me = 0; Me < de.length; Me++)
              de[Me](Ee, Te);
          });
        }
      }, c.tryColorscale = function(pe, ge) {
        var we = ge ? g.nestedProperty(pe, ge).get() : pe;
        if (we) {
          var se = we.color;
          if ((we.colorscale || we._colorAx) && g.isArrayOrTypedArray(se))
            return s.makeColorScaleFuncFromTrace(we);
        }
        return g.identity;
      };
      var A = { start: 1, end: -1, middle: 0, bottom: 1, top: -1 };
      function I(pe, ge, we, se, de) {
        var Te = m.select(pe.node().parentNode), Ee = ge.indexOf("top") !== -1 ? "top" : ge.indexOf("bottom") !== -1 ? "bottom" : "middle", Me = ge.indexOf("left") !== -1 ? "end" : ge.indexOf("right") !== -1 ? "start" : "middle", ze = se ? se / 0.8 + 1 : 0, Ie = (d.lineCount(pe) - 1) * o + 1, Oe = A[Me] * ze, Ze = 0.75 * we + A[Ee] * ze + (A[Ee] - 1) * Ie * we / 2;
        pe.attr("text-anchor", Me), de || Te.attr("transform", t(Oe, Ze));
      }
      function P(pe, ge) {
        var we = pe.ts || ge.textfont.size;
        return x(we) && we > 0 ? we : 0;
      }
      c.textPointStyle = function(pe, ge, we) {
        if (pe.size()) {
          var se;
          if (ge.selectedpoints) {
            var de = c.makeSelectedTextStyleFns(ge);
            se = de.selectedTextColorFn;
          }
          var Te = ge.texttemplate, Ee = we._fullLayout;
          pe.each(function(Me) {
            var ze = m.select(this), Ie = Te ? g.extractOption(Me, ge, "txt", "texttemplate") : g.extractOption(Me, ge, "tx", "text");
            if (Ie || Ie === 0) {
              if (Te) {
                var Oe = ge._module.formatLabels, Ze = Oe ? Oe(Me, ge, Ee) : {}, Fe = {};
                p(Fe, ge, Me.i);
                var Pe = ge._meta || {};
                Ie = g.texttemplateString(Ie, Ze, Ee._d3locale, Fe, Me, Pe);
              }
              var De = Me.tp || ge.textposition, Ge = P(Me, ge), Qe = se ? se(Me) : Me.tc || ge.textfont.color;
              ze.call(c.font, Me.tf || ge.textfont.family, Ge, Qe).text(Ie).call(d.convertToTspans, we).call(I, De, Ge, Me.mrc);
            } else
              ze.remove();
          });
        }
      }, c.selectedTextStyle = function(pe, ge) {
        if (pe.size() && ge.selectedpoints) {
          var we = c.makeSelectedTextStyleFns(ge);
          pe.each(function(se) {
            var de = m.select(this), Te = we.selectedTextColorFn(se), Ee = se.tp || ge.textposition, Me = P(se, ge);
            n.fill(de, Te);
            var ze = r.traceIs(ge, "bar-like");
            I(de, Ee, Me, se.mrc2 || se.mrc, ze);
          });
        }
      };
      var S, E;
      function R(pe, ge, we) {
        return we && (pe = W(pe)), ge ? j(pe[1]) : z(pe[0]);
      }
      function z(pe) {
        var ge = m.round(pe, 2);
        return S = ge, ge;
      }
      function j(pe) {
        var ge = m.round(pe, 2);
        return E = ge, ge;
      }
      function H(pe, ge, we, se) {
        var de = pe[0] - ge[0], Te = pe[1] - ge[1], Ee = we[0] - ge[0], Me = we[1] - ge[1], ze = Math.pow(de * de + Te * Te, 0.25), Ie = Math.pow(Ee * Ee + Me * Me, 0.25), Oe = (Ie * Ie * de - ze * ze * Ee) * se, Ze = (Ie * Ie * Te - ze * ze * Me) * se, Fe = 3 * Ie * (ze + Ie), Pe = 3 * ze * (ze + Ie);
        return [[z(ge[0] + (Fe && Oe / Fe)), j(ge[1] + (Fe && Ze / Fe))], [z(ge[0] - (Pe && Oe / Pe)), j(ge[1] - (Pe && Ze / Pe))]];
      }
      c.smoothopen = function(pe, ge) {
        if (pe.length < 3)
          return "M" + pe.join("L");
        var we, se = "M" + pe[0], de = [];
        for (we = 1; we < pe.length - 1; we++)
          de.push(H(pe[we - 1], pe[we], pe[we + 1], ge));
        for (se += "Q" + de[0][0] + " " + pe[1], we = 2; we < pe.length - 1; we++)
          se += "C" + de[we - 2][1] + " " + de[we - 1][0] + " " + pe[we];
        return se += "Q" + de[pe.length - 3][1] + " " + pe[pe.length - 1];
      }, c.smoothclosed = function(pe, ge) {
        if (pe.length < 3)
          return "M" + pe.join("L") + "Z";
        var we, se = "M" + pe[0], de = pe.length - 1, Te = [H(pe[de], pe[0], pe[1], ge)];
        for (we = 1; we < de; we++)
          Te.push(H(pe[we - 1], pe[we], pe[we + 1], ge));
        for (Te.push(H(pe[de - 1], pe[de], pe[0], ge)), we = 1; we <= de; we++)
          se += "C" + Te[we - 1][1] + " " + Te[we][0] + " " + pe[we];
        return se += "C" + Te[de][1] + " " + Te[0][0] + " " + pe[0] + "Z";
      };
      var Y = { hv: function(pe, ge, we) {
        return "H" + z(ge[0]) + "V" + R(ge, 1, we);
      }, vh: function(pe, ge, we) {
        return "V" + j(ge[1]) + "H" + R(ge, 0, we);
      }, hvh: function(pe, ge, we) {
        return "H" + z((pe[0] + ge[0]) / 2) + "V" + j(ge[1]) + "H" + R(ge, 0, we);
      }, vhv: function(pe, ge, we) {
        return "V" + j((pe[1] + ge[1]) / 2) + "H" + z(ge[0]) + "V" + R(ge, 1, we);
      } }, J = function(pe, ge, we) {
        return "L" + R(ge, 0, we) + "," + R(ge, 1, we);
      };
      function W(pe, ge) {
        var we = pe.backoff, se = pe.trace, de = pe.d, Te = pe.i;
        if (we && se && se.marker && se.marker.angle % 360 == 0 && se.line && se.line.shape !== "spline") {
          var Ee = g.isArrayOrTypedArray(we), Me = pe, ze = ge ? ge[0] : S || 0, Ie = ge ? ge[1] : E || 0, Oe = Me[0], Ze = Me[1], Fe = Oe - ze, Pe = Ze - Ie, De = Math.atan2(Pe, Fe), Ge = Ee ? we[Te] : we;
          if (Ge === "auto") {
            var Qe = Me.i;
            se.type === "scatter" && Qe--;
            var ot = Me.marker;
            Ge = ot ? c.symbolBackOffs[c.symbolNumber(ot.symbol)] * ot.size : 0, Ge += c.getMarkerStandoff(de[Qe], se) || 0;
          }
          var vt = Oe - Ge * Math.cos(De), bt = Ze - Ge * Math.sin(De);
          (vt <= Oe && vt >= ze || vt >= Oe && vt <= ze) && (bt <= Ze && bt >= Ie || bt >= Ze && bt <= Ie) && (pe = [vt, bt]);
        }
        return pe;
      }
      c.steps = function(pe) {
        var ge = Y[pe] || J;
        return function(we) {
          for (var se = "M" + z(we[0][0]) + "," + j(we[0][1]), de = we.length, Te = 1; Te < de; Te++)
            se += ge(we[Te - 1], we[Te], Te === de - 1);
          return se;
        };
      }, c.applyBackoff = W, c.makeTester = function() {
        var pe = g.ensureSingleById(m.select("body"), "svg", "js-plotly-tester", function(we) {
          we.attr(u.svgAttrs).style({ position: "absolute", left: "-10000px", top: "-10000px", width: "9000px", height: "9000px", "z-index": "1" });
        }), ge = g.ensureSingle(pe, "path", "js-reference-point", function(we) {
          we.attr("d", "M0,0H1V1H0Z").style({ "stroke-width": 0, fill: "black" });
        });
        c.tester = pe, c.testref = ge;
      }, c.savedBBoxes = {};
      var Z = 0;
      function re(pe) {
        var ge = pe.getAttribute("data-unformatted");
        if (ge !== null)
          return ge + pe.getAttribute("data-math") + pe.getAttribute("text-anchor") + pe.getAttribute("style");
      }
      function V(pe, ge) {
        if (!pe)
          return null;
        var we = ge._context, se = we._exportedPlot ? "" : we._baseUrl || "";
        return se ? "url('" + se + "#" + pe + "')" : "url(#" + pe + ")";
      }
      c.bBox = function(pe, ge, we) {
        var se, de, Te;
        if (we || (we = re(pe)), we) {
          if (se = c.savedBBoxes[we])
            return g.extendFlat({}, se);
        } else if (pe.childNodes.length === 1) {
          var Ee = pe.childNodes[0];
          if (we = re(Ee)) {
            var Me = +Ee.getAttribute("x") || 0, ze = +Ee.getAttribute("y") || 0, Ie = Ee.getAttribute("transform");
            if (!Ie) {
              var Oe = c.bBox(Ee, !1, we);
              return Me && (Oe.left += Me, Oe.right += Me), ze && (Oe.top += ze, Oe.bottom += ze), Oe;
            }
            if (we += "~" + Me + "~" + ze + "~" + Ie, se = c.savedBBoxes[we])
              return g.extendFlat({}, se);
          }
        }
        ge ? de = pe : (Te = c.tester.node(), de = pe.cloneNode(!0), Te.appendChild(de)), m.select(de).attr("transform", null).call(d.positionText, 0, 0);
        var Ze = de.getBoundingClientRect(), Fe = c.testref.node().getBoundingClientRect();
        ge || Te.removeChild(de);
        var Pe = { height: Ze.height, width: Ze.width, left: Ze.left - Fe.left, top: Ze.top - Fe.top, right: Ze.right - Fe.left, bottom: Ze.bottom - Fe.top };
        return Z >= 1e4 && (c.savedBBoxes = {}, Z = 0), we && (c.savedBBoxes[we] = Pe), Z++, g.extendFlat({}, Pe);
      }, c.setClipUrl = function(pe, ge, we) {
        pe.attr("clip-path", V(ge, we));
      }, c.getTranslate = function(pe) {
        var ge = (pe[pe.attr ? "attr" : "getAttribute"]("transform") || "").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/, function(we, se, de) {
          return [se, de].join(" ");
        }).split(" ");
        return { x: +ge[0] || 0, y: +ge[1] || 0 };
      }, c.setTranslate = function(pe, ge, we) {
        var se = pe.attr ? "attr" : "getAttribute", de = pe.attr ? "attr" : "setAttribute", Te = pe[se]("transform") || "";
        return ge = ge || 0, we = we || 0, Te = Te.replace(/(\btranslate\(.*?\);?)/, "").trim(), Te = (Te += t(ge, we)).trim(), pe[de]("transform", Te), Te;
      }, c.getScale = function(pe) {
        var ge = (pe[pe.attr ? "attr" : "getAttribute"]("transform") || "").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/, function(we, se, de) {
          return [se, de].join(" ");
        }).split(" ");
        return { x: +ge[0] || 1, y: +ge[1] || 1 };
      }, c.setScale = function(pe, ge, we) {
        var se = pe.attr ? "attr" : "getAttribute", de = pe.attr ? "attr" : "setAttribute", Te = pe[se]("transform") || "";
        return ge = ge || 1, we = we || 1, Te = Te.replace(/(\bscale\(.*?\);?)/, "").trim(), Te = (Te += "scale(" + ge + "," + we + ")").trim(), pe[de]("transform", Te), Te;
      };
      var B = /\s*sc.*/;
      c.setPointGroupScale = function(pe, ge, we) {
        if (ge = ge || 1, we = we || 1, pe) {
          var se = ge === 1 && we === 1 ? "" : "scale(" + ge + "," + we + ")";
          pe.each(function() {
            var de = (this.getAttribute("transform") || "").replace(B, "");
            de = (de += se).trim(), this.setAttribute("transform", de);
          });
        }
      };
      var U = /translate\([^)]*\)\s*$/;
      function ee(pe, ge) {
        var we;
        return pe && (we = pe.mf), we === void 0 && (we = ge.marker && ge.marker.standoff || 0), ge._geo || ge._xA ? we : -we;
      }
      c.setTextPointsScale = function(pe, ge, we) {
        pe && pe.each(function() {
          var se, de = m.select(this), Te = de.select("text");
          if (Te.node()) {
            var Ee = parseFloat(Te.attr("x") || 0), Me = parseFloat(Te.attr("y") || 0), ze = (de.attr("transform") || "").match(U);
            se = ge === 1 && we === 1 ? [] : [t(Ee, Me), "scale(" + ge + "," + we + ")", t(-Ee, -Me)], ze && se.push(ze), de.attr("transform", se.join(""));
          }
        });
      }, c.getMarkerStandoff = ee;
      var N, K, X, te, ie, le, oe = Math.atan2, ve = Math.cos, ue = Math.sin;
      function ye(pe, ge) {
        var we = ge[0], se = ge[1];
        return [we * ve(pe) - se * ue(pe), we * ue(pe) + se * ve(pe)];
      }
      function Ae(pe, ge) {
        var we, se, de = pe.ma;
        de === void 0 && (de = ge.marker.angle || 0);
        var Te = ge.marker.angleref;
        if (Te === "previous" || Te === "north") {
          if (ge._geo) {
            var Ee = ge._geo.project(pe.lonlat);
            we = Ee[0], se = Ee[1];
          } else {
            var Me = ge._xA, ze = ge._yA;
            if (!Me || !ze)
              return 90;
            we = Me.c2p(pe.x), se = ze.c2p(pe.y);
          }
          if (ge._geo) {
            var Ie, Oe = pe.lonlat[0], Ze = pe.lonlat[1], Fe = ge._geo.project([Oe, Ze + 1e-5]), Pe = ge._geo.project([Oe + 1e-5, Ze]), De = oe(Pe[1] - se, Pe[0] - we), Ge = oe(Fe[1] - se, Fe[0] - we);
            if (Te === "north")
              Ie = de / 180 * Math.PI;
            else if (Te === "previous") {
              var Qe = Oe / 180 * Math.PI, ot = Ze / 180 * Math.PI, vt = N / 180 * Math.PI, bt = K / 180 * Math.PI, yt = vt - Qe, tt = ve(bt) * ue(yt), Ke = ue(bt) * ve(ot) - ve(bt) * ue(ot) * ve(yt);
              Ie = -oe(tt, Ke) - Math.PI, N = Oe, K = Ze;
            }
            var mt = ye(De, [ve(Ie), 0]), Ft = ye(Ge, [ue(Ie), 0]);
            de = oe(mt[1] + Ft[1], mt[0] + Ft[0]) / Math.PI * 180, Te !== "previous" || le === ge.uid && pe.i === ie + 1 || (de = null);
          }
          if (Te === "previous" && !ge._geo)
            if (le === ge.uid && pe.i === ie + 1 && x(we) && x(se)) {
              var Vt = we - X, Xt = se - te, Gt = ge.line && ge.line.shape || "", nr = Gt.slice(Gt.length - 1);
              nr === "h" && (Xt = 0), nr === "v" && (Vt = 0), de += oe(Xt, Vt) / Math.PI * 180 + 90;
            } else
              de = null;
        }
        return X = we, te = se, ie = pe.i, le = ge.uid, de;
      }
      c.getMarkerAngle = Ae;
    }, { "../../components/fx/helpers": 403, "../../constants/alignment": 483, "../../constants/interactions": 490, "../../constants/xmlns_namespaces": 492, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../registry": 647, "../../traces/scatter/make_bubble_size_func": 953, "../../traces/scatter/subtypes": 961, "../color": 367, "../colorscale": 379, "./symbol_defs": 390, "@plotly/d3": 58, "fast-isnumeric": 190, tinycolor2: 313 }], 390: [function(v, Q, $) {
      var m, g, k, x, e = v("parse-svg-path"), r = v("@plotly/d3").round, n = Math.sqrt(2), s = Math.sqrt(3), t = Math.PI, d = Math.cos, u = Math.sin;
      function o(l) {
        return l === null;
      }
      function h(l, i, p) {
        if (!(l && l % 360 != 0 || i))
          return p;
        if (k === l && x === i && m === p)
          return g;
        function c(E, R) {
          var z = d(E), j = u(E), H = R[0], Y = R[1] + (i || 0);
          return [H * z - Y * j, H * j + Y * z];
        }
        k = l, x = i, m = p;
        for (var a = l / 180 * t, y = 0, f = 0, _ = e(p), b = "", w = 0; w < _.length; w++) {
          var T = _[w], L = T[0], A = y, I = f;
          if (L === "M" || L === "L")
            y = +T[1], f = +T[2];
          else if (L === "m" || L === "l")
            y += +T[1], f += +T[2];
          else if (L === "H")
            y = +T[1];
          else if (L === "h")
            y += +T[1];
          else if (L === "V")
            f = +T[1];
          else if (L === "v")
            f += +T[1];
          else if (L === "A") {
            y = +T[1], f = +T[2];
            var P = c(a, [+T[6], +T[7]]);
            T[6] = P[0], T[7] = P[1], T[3] = +T[3] + l;
          }
          L !== "H" && L !== "V" || (L = "L"), L !== "h" && L !== "v" || (L = "l"), L !== "m" && L !== "l" || (y -= A, f -= I);
          var S = c(a, [y, f]);
          L !== "H" && L !== "V" || (L = "L"), L !== "M" && L !== "L" && L !== "m" && L !== "l" || (T[1] = S[0], T[2] = S[1]), T[0] = L, b += T[0] + T.slice(1).join(",");
        }
        return g = b, b;
      }
      Q.exports = { circle: { n: 0, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2), a = "M" + c + ",0A" + c + "," + c + " 0 1,1 0,-" + c + "A" + c + "," + c + " 0 0,1 " + c + ",0Z";
        return p ? h(i, p, a) : a;
      } }, square: { n: 1, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + "," + c + "H-" + c + "V-" + c + "H" + c + "Z");
      } }, diamond: { n: 2, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.3 * l, 2);
        return h(i, p, "M" + c + ",0L0," + c + "L-" + c + ",0L0,-" + c + "Z");
      } }, cross: { n: 3, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.4 * l, 2), a = r(1.2 * l, 2);
        return h(i, p, "M" + a + "," + c + "H" + c + "V" + a + "H-" + c + "V" + c + "H-" + a + "V-" + c + "H-" + c + "V-" + a + "H" + c + "V-" + c + "H" + a + "Z");
      } }, x: { n: 4, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.8 * l / n, 2), a = "l" + c + "," + c, y = "l" + c + ",-" + c, f = "l-" + c + ",-" + c, _ = "l-" + c + "," + c;
        return h(i, p, "M0," + c + a + y + f + y + f + _ + f + _ + a + _ + a + "Z");
      } }, "triangle-up": { n: 5, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l / s, 2);
        return h(i, p, "M-" + c + "," + r(l / 2, 2) + "H" + c + "L0,-" + r(l, 2) + "Z");
      } }, "triangle-down": { n: 6, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l / s, 2);
        return h(i, p, "M-" + c + ",-" + r(l / 2, 2) + "H" + c + "L0," + r(l, 2) + "Z");
      } }, "triangle-left": { n: 7, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l / s, 2);
        return h(i, p, "M" + r(l / 2, 2) + ",-" + c + "V" + c + "L-" + r(l, 2) + ",0Z");
      } }, "triangle-right": { n: 8, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l / s, 2);
        return h(i, p, "M-" + r(l / 2, 2) + ",-" + c + "V" + c + "L" + r(l, 2) + ",0Z");
      } }, "triangle-ne": { n: 9, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.6 * l, 2), a = r(1.2 * l, 2);
        return h(i, p, "M-" + a + ",-" + c + "H" + c + "V" + a + "Z");
      } }, "triangle-se": { n: 10, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.6 * l, 2), a = r(1.2 * l, 2);
        return h(i, p, "M" + c + ",-" + a + "V" + c + "H-" + a + "Z");
      } }, "triangle-sw": { n: 11, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.6 * l, 2), a = r(1.2 * l, 2);
        return h(i, p, "M" + a + "," + c + "H-" + c + "V-" + a + "Z");
      } }, "triangle-nw": { n: 12, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.6 * l, 2), a = r(1.2 * l, 2);
        return h(i, p, "M-" + c + "," + a + "V-" + c + "H" + a + "Z");
      } }, pentagon: { n: 13, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.951 * l, 2), a = r(0.588 * l, 2), y = r(-l, 2), f = r(-0.309 * l, 2);
        return h(i, p, "M" + c + "," + f + "L" + a + "," + r(0.809 * l, 2) + "H-" + a + "L-" + c + "," + f + "L0," + y + "Z");
      } }, hexagon: { n: 14, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2), a = r(l / 2, 2), y = r(l * s / 2, 2);
        return h(i, p, "M" + y + ",-" + a + "V" + a + "L0," + c + "L-" + y + "," + a + "V-" + a + "L0,-" + c + "Z");
      } }, hexagon2: { n: 15, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2), a = r(l / 2, 2), y = r(l * s / 2, 2);
        return h(i, p, "M-" + a + "," + y + "H" + a + "L" + c + ",0L" + a + ",-" + y + "H-" + a + "L-" + c + ",0Z");
      } }, octagon: { n: 16, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.924 * l, 2), a = r(0.383 * l, 2);
        return h(i, p, "M-" + a + ",-" + c + "H" + a + "L" + c + ",-" + a + "V" + a + "L" + a + "," + c + "H-" + a + "L-" + c + "," + a + "V-" + a + "Z");
      } }, star: { n: 17, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = 1.4 * l, a = r(0.225 * c, 2), y = r(0.951 * c, 2), f = r(0.363 * c, 2), _ = r(0.588 * c, 2), b = r(-c, 2), w = r(-0.309 * c, 2), T = r(0.118 * c, 2), L = r(0.809 * c, 2);
        return h(i, p, "M" + a + "," + w + "H" + y + "L" + f + "," + T + "L" + _ + "," + L + "L0," + r(0.382 * c, 2) + "L-" + _ + "," + L + "L-" + f + "," + T + "L-" + y + "," + w + "H-" + a + "L0," + b + "Z");
      } }, hexagram: { n: 18, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.66 * l, 2), a = r(0.38 * l, 2), y = r(0.76 * l, 2);
        return h(i, p, "M-" + y + ",0l-" + a + ",-" + c + "h" + y + "l" + a + ",-" + c + "l" + a + "," + c + "h" + y + "l-" + a + "," + c + "l" + a + "," + c + "h-" + y + "l-" + a + "," + c + "l-" + a + ",-" + c + "h-" + y + "Z");
      } }, "star-triangle-up": { n: 19, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l * s * 0.8, 2), a = r(0.8 * l, 2), y = r(1.6 * l, 2), f = r(4 * l, 2), _ = "A " + f + "," + f + " 0 0 1 ";
        return h(i, p, "M-" + c + "," + a + _ + c + "," + a + _ + "0,-" + y + _ + "-" + c + "," + a + "Z");
      } }, "star-triangle-down": { n: 20, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l * s * 0.8, 2), a = r(0.8 * l, 2), y = r(1.6 * l, 2), f = r(4 * l, 2), _ = "A " + f + "," + f + " 0 0 1 ";
        return h(i, p, "M" + c + ",-" + a + _ + "-" + c + ",-" + a + _ + "0," + y + _ + c + ",-" + a + "Z");
      } }, "star-square": { n: 21, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.1 * l, 2), a = r(2 * l, 2), y = "A " + a + "," + a + " 0 0 1 ";
        return h(i, p, "M-" + c + ",-" + c + y + "-" + c + "," + c + y + c + "," + c + y + c + ",-" + c + y + "-" + c + ",-" + c + "Z");
      } }, "star-diamond": { n: 22, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.4 * l, 2), a = r(1.9 * l, 2), y = "A " + a + "," + a + " 0 0 1 ";
        return h(i, p, "M-" + c + ",0" + y + "0," + c + y + c + ",0" + y + "0,-" + c + y + "-" + c + ",0Z");
      } }, "diamond-tall": { n: 23, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(0.7 * l, 2), a = r(1.4 * l, 2);
        return h(i, p, "M0," + a + "L" + c + ",0L0,-" + a + "L-" + c + ",0Z");
      } }, "diamond-wide": { n: 24, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.4 * l, 2), a = r(0.7 * l, 2);
        return h(i, p, "M0," + a + "L" + c + ",0L0,-" + a + "L-" + c + ",0Z");
      } }, hourglass: { n: 25, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + "," + c + "H-" + c + "L" + c + ",-" + c + "H-" + c + "Z");
      }, noDot: !0 }, bowtie: { n: 26, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + "," + c + "V-" + c + "L-" + c + "," + c + "V-" + c + "Z");
      }, noDot: !0 }, "circle-cross": { n: 27, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M0," + c + "V-" + c + "M" + c + ",0H-" + c + "M" + c + ",0A" + c + "," + c + " 0 1,1 0,-" + c + "A" + c + "," + c + " 0 0,1 " + c + ",0Z");
      }, needLine: !0, noDot: !0 }, "circle-x": { n: 28, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2), a = r(l / n, 2);
        return h(i, p, "M" + a + "," + a + "L-" + a + ",-" + a + "M" + a + ",-" + a + "L-" + a + "," + a + "M" + c + ",0A" + c + "," + c + " 0 1,1 0,-" + c + "A" + c + "," + c + " 0 0,1 " + c + ",0Z");
      }, needLine: !0, noDot: !0 }, "square-cross": { n: 29, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M0," + c + "V-" + c + "M" + c + ",0H-" + c + "M" + c + "," + c + "H-" + c + "V-" + c + "H" + c + "Z");
      }, needLine: !0, noDot: !0 }, "square-x": { n: 30, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + "," + c + "L-" + c + ",-" + c + "M" + c + ",-" + c + "L-" + c + "," + c + "M" + c + "," + c + "H-" + c + "V-" + c + "H" + c + "Z");
      }, needLine: !0, noDot: !0 }, "diamond-cross": { n: 31, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.3 * l, 2);
        return h(i, p, "M" + c + ",0L0," + c + "L-" + c + ",0L0,-" + c + "ZM0,-" + c + "V" + c + "M-" + c + ",0H" + c);
      }, needLine: !0, noDot: !0 }, "diamond-x": { n: 32, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.3 * l, 2), a = r(0.65 * l, 2);
        return h(i, p, "M" + c + ",0L0," + c + "L-" + c + ",0L0,-" + c + "ZM-" + a + ",-" + a + "L" + a + "," + a + "M-" + a + "," + a + "L" + a + ",-" + a);
      }, needLine: !0, noDot: !0 }, "cross-thin": { n: 33, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.4 * l, 2);
        return h(i, p, "M0," + c + "V-" + c + "M" + c + ",0H-" + c);
      }, needLine: !0, noDot: !0, noFill: !0 }, "x-thin": { n: 34, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + "," + c + "L-" + c + ",-" + c + "M" + c + ",-" + c + "L-" + c + "," + c);
      }, needLine: !0, noDot: !0, noFill: !0 }, asterisk: { n: 35, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.2 * l, 2), a = r(0.85 * l, 2);
        return h(i, p, "M0," + c + "V-" + c + "M" + c + ",0H-" + c + "M" + a + "," + a + "L-" + a + ",-" + a + "M" + a + ",-" + a + "L-" + a + "," + a);
      }, needLine: !0, noDot: !0, noFill: !0 }, hash: { n: 36, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l / 2, 2), a = r(l, 2);
        return h(i, p, "M" + c + "," + a + "V-" + a + "M" + (c - a) + ",-" + a + "V" + a + "M" + a + "," + c + "H-" + a + "M-" + a + "," + (c - a) + "H" + a);
      }, needLine: !0, noFill: !0 }, "y-up": { n: 37, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.2 * l, 2), a = r(1.6 * l, 2), y = r(0.8 * l, 2);
        return h(i, p, "M-" + c + "," + y + "L0,0M" + c + "," + y + "L0,0M0,-" + a + "L0,0");
      }, needLine: !0, noDot: !0, noFill: !0 }, "y-down": { n: 38, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.2 * l, 2), a = r(1.6 * l, 2), y = r(0.8 * l, 2);
        return h(i, p, "M-" + c + ",-" + y + "L0,0M" + c + ",-" + y + "L0,0M0," + a + "L0,0");
      }, needLine: !0, noDot: !0, noFill: !0 }, "y-left": { n: 39, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.2 * l, 2), a = r(1.6 * l, 2), y = r(0.8 * l, 2);
        return h(i, p, "M" + y + "," + c + "L0,0M" + y + ",-" + c + "L0,0M-" + a + ",0L0,0");
      }, needLine: !0, noDot: !0, noFill: !0 }, "y-right": { n: 40, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.2 * l, 2), a = r(1.6 * l, 2), y = r(0.8 * l, 2);
        return h(i, p, "M-" + y + "," + c + "L0,0M-" + y + ",-" + c + "L0,0M" + a + ",0L0,0");
      }, needLine: !0, noDot: !0, noFill: !0 }, "line-ew": { n: 41, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.4 * l, 2);
        return h(i, p, "M" + c + ",0H-" + c);
      }, needLine: !0, noDot: !0, noFill: !0 }, "line-ns": { n: 42, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(1.4 * l, 2);
        return h(i, p, "M0," + c + "V-" + c);
      }, needLine: !0, noDot: !0, noFill: !0 }, "line-ne": { n: 43, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + ",-" + c + "L-" + c + "," + c);
      }, needLine: !0, noDot: !0, noFill: !0 }, "line-nw": { n: 44, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M" + c + "," + c + "L-" + c + ",-" + c);
      }, needLine: !0, noDot: !0, noFill: !0 }, "arrow-up": { n: 45, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M0,0L-" + c + "," + r(2 * l, 2) + "H" + c + "Z");
      }, backoff: 1, noDot: !0 }, "arrow-down": { n: 46, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M0,0L-" + c + ",-" + r(2 * l, 2) + "H" + c + "Z");
      }, noDot: !0 }, "arrow-left": { n: 47, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l, 2), a = r(l, 2);
        return h(i, p, "M0,0L" + c + ",-" + a + "V" + a + "Z");
      }, noDot: !0 }, "arrow-right": { n: 48, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l, 2), a = r(l, 2);
        return h(i, p, "M0,0L-" + c + ",-" + a + "V" + a + "Z");
      }, noDot: !0 }, "arrow-bar-up": { n: 49, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M-" + c + ",0H" + c + "M0,0L-" + c + "," + r(2 * l, 2) + "H" + c + "Z");
      }, backoff: 1, needLine: !0, noDot: !0 }, "arrow-bar-down": { n: 50, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(l, 2);
        return h(i, p, "M-" + c + ",0H" + c + "M0,0L-" + c + ",-" + r(2 * l, 2) + "H" + c + "Z");
      }, needLine: !0, noDot: !0 }, "arrow-bar-left": { n: 51, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l, 2), a = r(l, 2);
        return h(i, p, "M0,-" + a + "V" + a + "M0,0L" + c + ",-" + a + "V" + a + "Z");
      }, needLine: !0, noDot: !0 }, "arrow-bar-right": { n: 52, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = r(2 * l, 2), a = r(l, 2);
        return h(i, p, "M0,-" + a + "V" + a + "M0,0L-" + c + ",-" + a + "V" + a + "Z");
      }, needLine: !0, noDot: !0 }, arrow: { n: 53, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = t / 2.5, a = 2 * l * d(c), y = 2 * l * u(c);
        return h(i, p, "M0,0L" + -a + "," + y + "L" + a + "," + y + "Z");
      }, backoff: 0.9, noDot: !0 }, "arrow-wide": { n: 54, f: function(l, i, p) {
        if (o(i))
          return "M0,0Z";
        var c = t / 4, a = 2 * l * d(c), y = 2 * l * u(c);
        return h(i, p, "M0,0L" + -a + "," + y + "A " + 2 * l + "," + 2 * l + " 0 0 1 " + a + "," + y + "Z");
      }, backoff: 0.4, noDot: !0 } };
    }, { "@plotly/d3": 58, "parse-svg-path": 250 }], 391: [function(v, Q, $) {
      Q.exports = { visible: { valType: "boolean", editType: "calc" }, type: { valType: "enumerated", values: ["percent", "constant", "sqrt", "data"], editType: "calc" }, symmetric: { valType: "boolean", editType: "calc" }, array: { valType: "data_array", editType: "calc" }, arrayminus: { valType: "data_array", editType: "calc" }, value: { valType: "number", min: 0, dflt: 10, editType: "calc" }, valueminus: { valType: "number", min: 0, dflt: 10, editType: "calc" }, traceref: { valType: "integer", min: 0, dflt: 0, editType: "style" }, tracerefminus: { valType: "integer", min: 0, dflt: 0, editType: "style" }, copy_ystyle: { valType: "boolean", editType: "plot" }, copy_zstyle: { valType: "boolean", editType: "style" }, color: { valType: "color", editType: "style" }, thickness: { valType: "number", min: 0, dflt: 2, editType: "style" }, width: { valType: "number", min: 0, editType: "plot" }, editType: "calc", _deprecated: { opacity: { valType: "number", editType: "style" } } };
    }, {}], 392: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../registry"), k = v("../../plots/cartesian/axes"), x = v("../../lib"), e = v("./compute_error");
      function r(n, s, t, d) {
        var u = s["error_" + d] || {}, o = [];
        if (u.visible && ["linear", "log"].indexOf(t.type) !== -1) {
          for (var h = e(u), l = 0; l < n.length; l++) {
            var i = n[l], p = i.i;
            if (p === void 0)
              p = l;
            else if (p === null)
              continue;
            var c = i[d];
            if (m(t.c2l(c))) {
              var a = h(c, p);
              if (m(a[0]) && m(a[1])) {
                var y = i[d + "s"] = c - a[0], f = i[d + "h"] = c + a[1];
                o.push(y, f);
              }
            }
          }
          var _ = t._id, b = s._extremes[_], w = k.findExtremes(t, o, x.extendFlat({ tozero: b.opts.tozero }, { padded: !0 }));
          b.min = b.min.concat(w.min), b.max = b.max.concat(w.max);
        }
      }
      Q.exports = function(n) {
        for (var s = n.calcdata, t = 0; t < s.length; t++) {
          var d = s[t], u = d[0].trace;
          if (u.visible === !0 && g.traceIs(u, "errorBarsOK")) {
            var o = k.getFromId(n, u.xaxis), h = k.getFromId(n, u.yaxis);
            r(d, u, o, "x"), r(d, u, h, "y");
          }
        }
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "../../registry": 647, "./compute_error": 393, "fast-isnumeric": 190 }], 393: [function(v, Q, $) {
      function m(g, k) {
        return g === "percent" ? function(x) {
          return Math.abs(x * k / 100);
        } : g === "constant" ? function() {
          return Math.abs(k);
        } : g === "sqrt" ? function(x) {
          return Math.sqrt(Math.abs(x));
        } : void 0;
      }
      Q.exports = function(g) {
        var k = g.type, x = g.symmetric;
        if (k === "data") {
          var e = g.array || [];
          if (x)
            return function(t, d) {
              var u = +e[d];
              return [u, u];
            };
          var r = g.arrayminus || [];
          return function(t, d) {
            var u = +e[d], o = +r[d];
            return isNaN(u) && isNaN(o) ? [NaN, NaN] : [o || 0, u || 0];
          };
        }
        var n = m(k, g.value), s = m(k, g.valueminus);
        return x || g.valueminus === void 0 ? function(t) {
          var d = n(t);
          return [d, d];
        } : function(t) {
          return [s(t), n(t)];
        };
      };
    }, {}], 394: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../registry"), k = v("../../lib"), x = v("../../plot_api/plot_template"), e = v("./attributes");
      Q.exports = function(r, n, s, t) {
        var d = "error_" + t.axis, u = x.newContainer(n, d), o = r[d] || {};
        function h(c, a) {
          return k.coerce(o, u, e, c, a);
        }
        if (h("visible", o.array !== void 0 || o.value !== void 0 || o.type === "sqrt") !== !1) {
          var l = h("type", "array" in o ? "data" : "percent"), i = !0;
          l !== "sqrt" && (i = h("symmetric", !((l === "data" ? "arrayminus" : "valueminus") in o))), l === "data" ? (h("array"), h("traceref"), i || (h("arrayminus"), h("tracerefminus"))) : l !== "percent" && l !== "constant" || (h("value"), i || h("valueminus"));
          var p = "copy_" + t.inherit + "style";
          t.inherit && (n["error_" + t.inherit] || {}).visible && h(p, !(o.color || m(o.thickness) || m(o.width))), t.inherit && u[p] || (h("color", s), h("thickness"), h("width", g.traceIs(n, "gl3d") ? 0 : 4));
        }
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../registry": 647, "./attributes": 391, "fast-isnumeric": 190 }], 395: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plot_api/edit_types").overrideAll, k = v("./attributes"), x = { error_x: m.extendFlat({}, k), error_y: m.extendFlat({}, k) };
      delete x.error_x.copy_zstyle, delete x.error_y.copy_zstyle, delete x.error_y.copy_ystyle;
      var e = { error_x: m.extendFlat({}, k), error_y: m.extendFlat({}, k), error_z: m.extendFlat({}, k) };
      delete e.error_x.copy_ystyle, delete e.error_y.copy_ystyle, delete e.error_z.copy_ystyle, delete e.error_z.copy_zstyle, Q.exports = { moduleType: "component", name: "errorbars", schema: { traces: { scatter: x, bar: x, histogram: x, scatter3d: g(e, "calc", "nested"), scattergl: g(x, "calc", "nested") } }, supplyDefaults: v("./defaults"), calc: v("./calc"), makeComputeError: v("./compute_error"), plot: v("./plot"), style: v("./style"), hoverInfo: function(r, n, s) {
        (n.error_y || {}).visible && (s.yerr = r.yh - r.y, n.error_y.symmetric || (s.yerrneg = r.y - r.ys)), (n.error_x || {}).visible && (s.xerr = r.xh - r.x, n.error_x.symmetric || (s.xerrneg = r.x - r.xs));
      } };
    }, { "../../lib": 515, "../../plot_api/edit_types": 548, "./attributes": 391, "./calc": 392, "./compute_error": 393, "./defaults": 394, "./plot": 396, "./style": 397 }], 396: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../drawing"), x = v("../../traces/scatter/subtypes");
      Q.exports = function(e, r, n, s) {
        var t = n.xaxis, d = n.yaxis, u = s && s.duration > 0;
        r.each(function(o) {
          var h, l = o[0].trace, i = l.error_x || {}, p = l.error_y || {};
          l.ids && (h = function(f) {
            return f.id;
          });
          var c = x.hasMarkers(l) && l.marker.maxdisplayed > 0;
          p.visible || i.visible || (o = []);
          var a = m.select(this).selectAll("g.errorbar").data(o, h);
          if (a.exit().remove(), o.length) {
            i.visible || a.selectAll("path.xerror").remove(), p.visible || a.selectAll("path.yerror").remove(), a.style("opacity", 1);
            var y = a.enter().append("g").classed("errorbar", !0);
            u && y.style("opacity", 0).transition().duration(s.duration).style("opacity", 1), k.setClipUrl(a, n.layerClipId, e), a.each(function(f) {
              var _ = m.select(this), b = function(P, S, E) {
                var R = { x: S.c2p(P.x), y: E.c2p(P.y) };
                return P.yh !== void 0 && (R.yh = E.c2p(P.yh), R.ys = E.c2p(P.ys), g(R.ys) || (R.noYS = !0, R.ys = E.c2p(P.ys, !0))), P.xh !== void 0 && (R.xh = S.c2p(P.xh), R.xs = S.c2p(P.xs), g(R.xs) || (R.noXS = !0, R.xs = S.c2p(P.xs, !0))), R;
              }(f, t, d);
              if (!c || f.vis) {
                var w, T = _.select("path.yerror");
                if (p.visible && g(b.x) && g(b.yh) && g(b.ys)) {
                  var L = p.width;
                  w = "M" + (b.x - L) + "," + b.yh + "h" + 2 * L + "m-" + L + ",0V" + b.ys, b.noYS || (w += "m-" + L + ",0h" + 2 * L), T.size() ? u && (T = T.transition().duration(s.duration).ease(s.easing)) : T = _.append("path").style("vector-effect", "non-scaling-stroke").classed("yerror", !0), T.attr("d", w);
                } else
                  T.remove();
                var A = _.select("path.xerror");
                if (i.visible && g(b.y) && g(b.xh) && g(b.xs)) {
                  var I = (i.copy_ystyle ? p : i).width;
                  w = "M" + b.xh + "," + (b.y - I) + "v" + 2 * I + "m0,-" + I + "H" + b.xs, b.noXS || (w += "m0,-" + I + "v" + 2 * I), A.size() ? u && (A = A.transition().duration(s.duration).ease(s.easing)) : A = _.append("path").style("vector-effect", "non-scaling-stroke").classed("xerror", !0), A.attr("d", w);
                } else
                  A.remove();
              }
            });
          }
        });
      };
    }, { "../../traces/scatter/subtypes": 961, "../drawing": 389, "@plotly/d3": 58, "fast-isnumeric": 190 }], 397: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../color");
      Q.exports = function(k) {
        k.each(function(x) {
          var e = x[0].trace, r = e.error_y || {}, n = e.error_x || {}, s = m.select(this);
          s.selectAll("path.yerror").style("stroke-width", r.thickness + "px").call(g.stroke, r.color), n.copy_ystyle && (n = r), s.selectAll("path.xerror").style("stroke-width", n.thickness + "px").call(g.stroke, n.color);
        });
      };
    }, { "../color": 367, "@plotly/d3": 58 }], 398: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("./layout_attributes").hoverlabel, k = v("../../lib/extend").extendFlat;
      Q.exports = { hoverlabel: { bgcolor: k({}, g.bgcolor, { arrayOk: !0 }), bordercolor: k({}, g.bordercolor, { arrayOk: !0 }), font: m({ arrayOk: !0, editType: "none" }), align: k({}, g.align, { arrayOk: !0 }), namelength: k({}, g.namelength, { arrayOk: !0 }), editType: "none" } };
    }, { "../../lib/extend": 505, "../../plots/font_attributes": 594, "./layout_attributes": 408 }], 399: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry");
      function k(x, e, r, n) {
        n = n || m.identity, Array.isArray(x) && (e[0][r] = n(x));
      }
      Q.exports = function(x) {
        var e = x.calcdata, r = x._fullLayout;
        function n(o) {
          return function(h) {
            return m.coerceHoverinfo({ hoverinfo: h }, { _module: o._module }, r);
          };
        }
        for (var s = 0; s < e.length; s++) {
          var t = e[s], d = t[0].trace;
          if (!g.traceIs(d, "pie-like")) {
            var u = g.traceIs(d, "2dMap") ? k : m.fillArray;
            u(d.hoverinfo, t, "hi", n(d)), d.hovertemplate && u(d.hovertemplate, t, "ht"), d.hoverlabel && (u(d.hoverlabel.bgcolor, t, "hbg"), u(d.hoverlabel.bordercolor, t, "hbc"), u(d.hoverlabel.font.size, t, "hts"), u(d.hoverlabel.font.color, t, "htc"), u(d.hoverlabel.font.family, t, "htf"), u(d.hoverlabel.namelength, t, "hnl"), u(d.hoverlabel.align, t, "hta"));
          }
        }
      };
    }, { "../../lib": 515, "../../registry": 647 }], 400: [function(v, Q, $) {
      var m = v("../../registry"), g = v("./hover").hover;
      Q.exports = function(k, x, e) {
        var r = m.getComponentMethod("annotations", "onClick")(k, k._hoverdata);
        function n() {
          k.emit("plotly_click", { points: k._hoverdata, event: x });
        }
        e !== void 0 && g(k, x, e, !0), k._hoverdata && x && x.target && (r && r.then ? r.then(n) : n(), x.stopImmediatePropagation && x.stopImmediatePropagation());
      };
    }, { "../../registry": 647, "./hover": 404 }], 401: [function(v, Q, $) {
      Q.exports = { YANGLE: 60, HOVERARROWSIZE: 6, HOVERTEXTPAD: 3, HOVERFONTSIZE: 13, HOVERFONT: "Arial, sans-serif", HOVERMINTIME: 50, HOVERID: "-hover" };
    }, {}], 402: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("./hoverlabel_defaults");
      Q.exports = function(x, e, r, n) {
        var s = m.extendFlat({}, n.hoverlabel);
        e.hovertemplate && (s.namelength = -1), k(x, e, function(t, d) {
          return m.coerce(x, e, g, t, d);
        }, s);
      };
    }, { "../../lib": 515, "./attributes": 398, "./hoverlabel_defaults": 405 }], 403: [function(v, Q, $) {
      var m = v("../../lib");
      $.getSubplot = function(n) {
        return n.subplot || n.xaxis + n.yaxis || n.geo;
      }, $.isTraceInSubplots = function(n, s) {
        if (n.type === "splom") {
          for (var t = n.xaxes || [], d = n.yaxes || [], u = 0; u < t.length; u++)
            for (var o = 0; o < d.length; o++)
              if (s.indexOf(t[u] + d[o]) !== -1)
                return !0;
          return !1;
        }
        return s.indexOf($.getSubplot(n)) !== -1;
      }, $.flat = function(n, s) {
        for (var t = new Array(n.length), d = 0; d < n.length; d++)
          t[d] = s;
        return t;
      }, $.p2c = function(n, s) {
        for (var t = new Array(n.length), d = 0; d < n.length; d++)
          t[d] = n[d].p2c(s);
        return t;
      }, $.getDistanceFunction = function(n, s, t, d) {
        return n === "closest" ? d || $.quadrature(s, t) : n.charAt(0) === "x" ? s : t;
      }, $.getClosest = function(n, s, t) {
        if (t.index !== !1)
          t.index >= 0 && t.index < n.length ? t.distance = 0 : t.index = !1;
        else
          for (var d = 0; d < n.length; d++) {
            var u = s(n[d]);
            u <= t.distance && (t.index = d, t.distance = u);
          }
        return t;
      }, $.inbox = function(n, s, t) {
        return n * s < 0 || n === 0 ? t : 1 / 0;
      }, $.quadrature = function(n, s) {
        return function(t) {
          var d = n(t), u = s(t);
          return Math.sqrt(d * d + u * u);
        };
      }, $.makeEventData = function(n, s, t) {
        var d = "index" in n ? n.index : n.pointNumber, u = { data: s._input, fullData: s, curveNumber: s.index, pointNumber: d };
        if (s._indexToPoints) {
          var o = s._indexToPoints[d];
          o.length === 1 ? u.pointIndex = o[0] : u.pointIndices = o;
        } else
          u.pointIndex = d;
        return s._module.eventData ? u = s._module.eventData(u, n, s, t, d) : ("xVal" in n ? u.x = n.xVal : "x" in n && (u.x = n.x), "yVal" in n ? u.y = n.yVal : "y" in n && (u.y = n.y), n.xa && (u.xaxis = n.xa), n.ya && (u.yaxis = n.ya), n.zLabelVal !== void 0 && (u.z = n.zLabelVal)), $.appendArrayPointValue(u, s, d), u;
      }, $.appendArrayPointValue = function(n, s, t) {
        var d = s._arrayAttrs;
        if (d)
          for (var u = 0; u < d.length; u++) {
            var o = d[u], h = k(o);
            if (n[h] === void 0) {
              var l = x(m.nestedProperty(s, o).get(), t);
              l !== void 0 && (n[h] = l);
            }
          }
      }, $.appendArrayMultiPointValues = function(n, s, t) {
        var d = s._arrayAttrs;
        if (d)
          for (var u = 0; u < d.length; u++) {
            var o = d[u], h = k(o);
            if (n[h] === void 0) {
              for (var l = m.nestedProperty(s, o).get(), i = new Array(t.length), p = 0; p < t.length; p++)
                i[p] = x(l, t[p]);
              n[h] = i;
            }
          }
      };
      var g = { ids: "id", locations: "location", labels: "label", values: "value", "marker.colors": "color", parents: "parent" };
      function k(n) {
        return g[n] || n;
      }
      function x(n, s) {
        return Array.isArray(s) ? Array.isArray(n) && Array.isArray(n[s[0]]) ? n[s[0]][s[1]] : void 0 : n[s];
      }
      var e = { x: !0, y: !0 }, r = { "x unified": !0, "y unified": !0 };
      $.isUnifiedHover = function(n) {
        return typeof n == "string" && !!r[n];
      }, $.isXYhover = function(n) {
        return typeof n == "string" && !!e[n];
      };
    }, { "../../lib": 515 }], 404: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("tinycolor2"), x = v("../../lib"), e = x.strTranslate, r = x.strRotate, n = v("../../lib/events"), s = v("../../lib/svg_text_utils"), t = v("../../lib/override_cursor"), d = v("../drawing"), u = v("../color"), o = v("../dragelement"), h = v("../../plots/cartesian/axes"), l = v("../../registry"), i = v("./helpers"), p = v("./constants"), c = v("../legend/defaults"), a = v("../legend/draw"), y = p.YANGLE, f = Math.PI * y / 180, _ = 1 / Math.sin(f), b = Math.cos(f), w = Math.sin(f), T = p.HOVERARROWSIZE, L = p.HOVERTEXTPAD, A = { box: !0, ohlc: !0, violin: !0, candlestick: !0 }, I = { scatter: !0, scattergl: !0, splom: !0 };
      function P(B) {
        return [B.trace.index, B.index, B.x0, B.y0, B.name, B.attr, B.xa ? B.xa._id : "", B.ya ? B.ya._id : ""].join(",");
      }
      $.hover = function(B, U, ee, N) {
        B = x.getGraphDiv(B);
        var K = U.target;
        x.throttle(B._fullLayout._uid + p.HOVERID, p.HOVERMINTIME, function() {
          (function(X, te, ie, le, oe) {
            ie || (ie = "xy");
            var ve = Array.isArray(ie) ? ie : [ie], ue = X._fullLayout, ye = ue._plots || [], Ae = ye[ie], pe = ue._has("cartesian");
            if (Ae) {
              var ge = Ae.overlays.map(function(Br) {
                return Br.id;
              });
              ve = ve.concat(ge);
            }
            for (var we = ve.length, se = new Array(we), de = new Array(we), Te = !1, Ee = 0; Ee < we; Ee++) {
              var Me = ve[Ee];
              if (ye[Me])
                Te = !0, se[Ee] = ye[Me].xaxis, de[Ee] = ye[Me].yaxis;
              else {
                if (!ue[Me] || !ue[Me]._subplot)
                  return void x.warn("Unrecognized subplot: " + Me);
                var ze = ue[Me]._subplot;
                se[Ee] = ze.xaxis, de[Ee] = ze.yaxis;
              }
            }
            var Ie = te.hovermode || ue.hovermode;
            if (Ie && !Te && (Ie = "closest"), ["x", "y", "closest", "x unified", "y unified"].indexOf(Ie) === -1 || !X.calcdata || X.querySelector(".zoombox") || X._dragging)
              return o.unhoverRaw(X, te);
            var Oe = ue.hoverdistance;
            Oe === -1 && (Oe = 1 / 0);
            var Ze = ue.spikedistance;
            Ze === -1 && (Ze = 1 / 0);
            var Fe, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke, mt, Ft, Vt = [], Xt = [], Gt = { hLinePoint: null, vLinePoint: null }, nr = !1;
            if (Array.isArray(te))
              for (Ie = "array", De = 0; De < te.length; De++)
                (Qe = X.calcdata[te[De].curveNumber || 0]) && (ot = Qe[0].trace, Qe[0].trace.hoverinfo !== "skip" && (Xt.push(Qe), ot.orientation === "h" && (nr = !0)));
            else {
              for (Ge = 0; Ge < X.calcdata.length; Ge++)
                Qe = X.calcdata[Ge], (ot = Qe[0].trace).hoverinfo !== "skip" && i.isTraceInSubplots(ot, ve) && (Xt.push(Qe), ot.orientation === "h" && (nr = !0));
              var It, Be;
              if (!oe)
                It = "xpx" in te ? te.xpx : se[0]._length / 2, Be = "ypx" in te ? te.ypx : de[0]._length / 2;
              else {
                if (n.triggerHandler(X, "plotly_beforehover", te) === !1)
                  return;
                var He = oe.getBoundingClientRect();
                It = te.clientX - He.left, Be = te.clientY - He.top, ue._calcInverseTransform(X);
                var he = x.apply3DTransform(ue._invTransform)(It, Be);
                if (It = he[0], Be = he[1], It < 0 || It > se[0]._length || Be < 0 || Be > de[0]._length)
                  return o.unhoverRaw(X, te);
              }
              if (te.pointerX = It + se[0]._offset, te.pointerY = Be + de[0]._offset, Fe = "xval" in te ? i.flat(ve, te.xval) : i.p2c(se, It), Pe = "yval" in te ? i.flat(ve, te.yval) : i.p2c(de, Be), !g(Fe[0]) || !g(Pe[0]))
                return x.warn("Fx.hover failed", te, X), o.unhoverRaw(X, te);
            }
            var be = 1 / 0;
            function Re(Br, tn) {
              for (Ge = 0; Ge < Xt.length; Ge++)
                if ((Qe = Xt[Ge]) && Qe[0] && Qe[0].trace && (ot = Qe[0].trace).visible === !0 && ot._length !== 0 && ["carpet", "contourcarpet"].indexOf(ot._module.name) === -1) {
                  if (ot.type === "splom" ? vt = ve[bt = 0] : (vt = i.getSubplot(ot), bt = ve.indexOf(vt)), yt = Ie, i.isUnifiedHover(yt) && (yt = yt.charAt(0)), mt = { cd: Qe, trace: ot, xa: se[bt], ya: de[bt], maxHoverDistance: Oe, maxSpikeDistance: Ze, index: !1, distance: Math.min(be, Oe), spikeDistance: 1 / 0, xSpike: void 0, ySpike: void 0, color: u.defaultLine, name: ot.name, x0: void 0, x1: void 0, y0: void 0, y1: void 0, xLabelVal: void 0, yLabelVal: void 0, zLabelVal: void 0, text: void 0 }, ue[vt] && (mt.subplot = ue[vt]._subplot), ue._splomScenes && ue._splomScenes[ot.uid] && (mt.scene = ue._splomScenes[ot.uid]), Ft = Vt.length, yt === "array") {
                    var mn = te[Ge];
                    "pointNumber" in mn ? (mt.index = mn.pointNumber, yt = "closest") : (yt = "", "xval" in mn && (tt = mn.xval, yt = "x"), "yval" in mn && (Ke = mn.yval, yt = yt ? "closest" : "y"));
                  } else
                    Br !== void 0 && tn !== void 0 ? (tt = Br, Ke = tn) : (tt = Fe[bt], Ke = Pe[bt]);
                  if (Oe !== 0)
                    if (ot._module && ot._module.hoverPoints) {
                      var Qr = ot._module.hoverPoints(mt, tt, Ke, yt, { finiteRange: !0, hoverLayer: ue._hoverlayer });
                      if (Qr)
                        for (var cn, Hn = 0; Hn < Qr.length; Hn++)
                          cn = Qr[Hn], g(cn.x0) && g(cn.y0) && Vt.push(j(cn, Ie));
                    } else
                      x.log("Unrecognized trace type in hover:", ot);
                  if (Ie === "closest" && Vt.length > Ft && (Vt.splice(0, Ft), be = Vt[0].distance), pe && Ze !== 0 && Vt.length === 0) {
                    mt.distance = Ze, mt.index = !1;
                    var _n = ot._module.hoverPoints(mt, tt, Ke, "closest", { hoverLayer: ue._hoverlayer });
                    if (_n && (_n = _n.filter(function(or) {
                      return or.spikeDistance <= Ze;
                    })), _n && _n.length) {
                      var En, aa = _n.filter(function(or) {
                        return or.xa.showspikes && or.xa.spikesnap !== "hovered data";
                      });
                      if (aa.length) {
                        var tr = aa[0];
                        g(tr.x0) && g(tr.y0) && (En = Xe(tr), (!Gt.vLinePoint || Gt.vLinePoint.spikeDistance > En.spikeDistance) && (Gt.vLinePoint = En));
                      }
                      var mr = _n.filter(function(or) {
                        return or.ya.showspikes && or.ya.spikesnap !== "hovered data";
                      });
                      if (mr.length) {
                        var Ct = mr[0];
                        g(Ct.x0) && g(Ct.y0) && (En = Xe(Ct), (!Gt.hLinePoint || Gt.hLinePoint.spikeDistance > En.spikeDistance) && (Gt.hLinePoint = En));
                      }
                    }
                  }
                }
            }
            function Ue(Br, tn, mn) {
              for (var Qr, cn = null, Hn = 1 / 0, _n = 0; _n < Br.length; _n++)
                Qr = Br[_n].spikeDistance, mn && _n === 0 && (Qr = -1 / 0), Qr <= Hn && Qr <= tn && (cn = Br[_n], Hn = Qr);
              return cn;
            }
            function Xe(Br) {
              return Br ? { xa: Br.xa, ya: Br.ya, x: Br.xSpike !== void 0 ? Br.xSpike : (Br.x0 + Br.x1) / 2, y: Br.ySpike !== void 0 ? Br.ySpike : (Br.y0 + Br.y1) / 2, distance: Br.distance, spikeDistance: Br.spikeDistance, curveNumber: Br.trace.index, color: Br.color, pointNumber: Br.index } : null;
            }
            Re();
            var qe = { fullLayout: ue, container: ue._hoverlayer, event: te }, st = X._spikepoints, it = { vLinePoint: Gt.vLinePoint, hLinePoint: Gt.hLinePoint };
            X._spikepoints = it;
            var Tt = function() {
              Vt.sort(function(Br, tn) {
                return Br.distance - tn.distance;
              }), Vt = function(Br, tn) {
                for (var mn = tn.charAt(0), Qr = [], cn = [], Hn = [], _n = 0; _n < Br.length; _n++) {
                  var En = Br[_n];
                  l.traceIs(En.trace, "bar-like") || l.traceIs(En.trace, "box-violin") ? Hn.push(En) : En.trace[mn + "period"] ? cn.push(En) : Qr.push(En);
                }
                return Qr.concat(cn).concat(Hn);
              }(Vt, Ie);
            };
            Tt();
            var Pt = Ie.charAt(0), rt = (Pt === "x" || Pt === "y") && Vt[0] && I[Vt[0].trace.type];
            if (pe && Ze !== 0 && Vt.length !== 0) {
              var ut = Ue(Vt.filter(function(Br) {
                return Br.ya.showspikes;
              }), Ze, rt);
              Gt.hLinePoint = Xe(ut);
              var Bt = Ue(Vt.filter(function(Br) {
                return Br.xa.showspikes;
              }), Ze, rt);
              Gt.vLinePoint = Xe(Bt);
            }
            if (Vt.length === 0) {
              var wt = o.unhoverRaw(X, te);
              return !pe || Gt.hLinePoint === null && Gt.vLinePoint === null || Y(st) && H(X, Gt, qe), wt;
            }
            if (pe && Y(st) && H(X, Gt, qe), i.isXYhover(yt) && Vt[0].length !== 0 && Vt[0].trace.type !== "splom") {
              var Lt = Vt[0], Se = (Vt = A[Lt.trace.type] ? Vt.filter(function(Br) {
                return Br.trace.index === Lt.trace.index;
              }) : [Lt]).length, We = W("x", Lt, ue), nt = W("y", Lt, ue);
              Re(We, nt);
              var ft, Mt = [], Nt = {}, Zt = 0, Ut = function(Br) {
                var tn = A[Br.trace.type] ? P(Br) : Br.trace.index;
                if (Nt[tn]) {
                  var mn = Nt[tn] - 1, Qr = Mt[mn];
                  mn > 0 && Math.abs(Br.distance) < Math.abs(Qr.distance) && (Mt[mn] = Br);
                } else
                  Zt++, Nt[tn] = Zt, Mt.push(Br);
              };
              for (ft = 0; ft < Se; ft++)
                Ut(Vt[ft]);
              for (ft = Vt.length - 1; ft > Se - 1; ft--)
                Ut(Vt[ft]);
              Vt = Mt, Tt();
            }
            var fr = X._hoverdata, Tr = [], ur = Z(X), Kt = re(X);
            for (De = 0; De < Vt.length; De++) {
              var $t = Vt[De], er = i.makeEventData($t, $t.trace, $t.cd);
              if ($t.hovertemplate !== !1) {
                var cr = !1;
                $t.cd[$t.index] && $t.cd[$t.index].ht && (cr = $t.cd[$t.index].ht), $t.hovertemplate = cr || $t.trace.hovertemplate || !1;
              }
              if ($t.xa && $t.ya) {
                var gr = $t.x0 + $t.xa._offset, Mr = $t.x1 + $t.xa._offset, Ir = $t.y0 + $t.ya._offset, Fr = $t.y1 + $t.ya._offset, Gr = Math.min(gr, Mr), un = Math.max(gr, Mr), $r = Math.min(Ir, Fr), Dn = Math.max(Ir, Fr);
                er.bbox = { x0: Gr + Kt, x1: un + Kt, y0: $r + ur, y1: Dn + ur };
              }
              $t.eventData = [er], Tr.push(er);
            }
            X._hoverdata = Tr;
            var rn = Ie === "y" && (Xt.length > 1 || Vt.length > 1) || Ie === "closest" && nr && Vt.length > 1, vn = u.combine(ue.plot_bgcolor || u.background, ue.paper_bgcolor), xn = E(Vt, { gd: X, hovermode: Ie, rotateLabels: rn, bgColor: vn, container: ue._hoverlayer, outerContainer: ue._paper.node(), commonLabelOpts: ue.hoverlabel, hoverdistance: ue.hoverdistance });
            if (i.isUnifiedHover(Ie) || (function(Br, tn, mn) {
              var Qr, cn, Hn, _n, En, aa, tr, mr = 0, Ct = 1, or = Br.size(), hr = new Array(or), Rr = 0;
              function Dr(Vr) {
                var Kr = Vr[0], en = Vr[Vr.length - 1];
                if (cn = Kr.pmin - Kr.pos - Kr.dp + Kr.size, Hn = en.pos + en.dp + en.size - Kr.pmax, cn > 0.01) {
                  for (En = Vr.length - 1; En >= 0; En--)
                    Vr[En].dp += cn;
                  Qr = !1;
                }
                if (!(Hn < 0.01)) {
                  if (cn < -0.01) {
                    for (En = Vr.length - 1; En >= 0; En--)
                      Vr[En].dp -= Hn;
                    Qr = !1;
                  }
                  if (Qr) {
                    var gn = 0;
                    for (_n = 0; _n < Vr.length; _n++)
                      (aa = Vr[_n]).pos + aa.dp + aa.size > Kr.pmax && gn++;
                    for (_n = Vr.length - 1; _n >= 0 && !(gn <= 0); _n--)
                      (aa = Vr[_n]).pos > Kr.pmax - 1 && (aa.del = !0, gn--);
                    for (_n = 0; _n < Vr.length && !(gn <= 0); _n++)
                      if ((aa = Vr[_n]).pos < Kr.pmin + 1)
                        for (aa.del = !0, gn--, Hn = 2 * aa.size, En = Vr.length - 1; En >= 0; En--)
                          Vr[En].dp -= Hn;
                    for (_n = Vr.length - 1; _n >= 0 && !(gn <= 0); _n--)
                      (aa = Vr[_n]).pos + aa.dp + aa.size > Kr.pmax && (aa.del = !0, gn--);
                  }
                }
              }
              for (Br.each(function(Vr) {
                var Kr = Vr[tn], en = Kr._id.charAt(0) === "x", gn = Kr.range;
                Rr === 0 && gn && gn[0] > gn[1] !== en && (Ct = -1), hr[Rr++] = [{ datum: Vr, traceIndex: Vr.trace.index, dp: 0, pos: Vr.pos, posref: Vr.posref, size: Vr.by * (en ? _ : 1) / 2, pmin: 0, pmax: en ? mn.width : mn.height }];
              }), hr.sort(function(Vr, Kr) {
                return Vr[0].posref - Kr[0].posref || Ct * (Kr[0].traceIndex - Vr[0].traceIndex);
              }); !Qr && mr <= or; ) {
                for (mr++, Qr = !0, _n = 0; _n < hr.length - 1; ) {
                  var Or = hr[_n], Ar = hr[_n + 1], vr = Or[Or.length - 1], xr = Ar[0];
                  if ((cn = vr.pos + vr.dp + vr.size - xr.pos - xr.dp + xr.size) > 0.01 && vr.pmin === xr.pmin && vr.pmax === xr.pmax) {
                    for (En = Ar.length - 1; En >= 0; En--)
                      Ar[En].dp += cn;
                    for (Or.push.apply(Or, Ar), hr.splice(_n + 1, 1), tr = 0, En = Or.length - 1; En >= 0; En--)
                      tr += Or[En].dp;
                    for (Hn = tr / Or.length, En = Or.length - 1; En >= 0; En--)
                      Or[En].dp -= Hn;
                    Qr = !1;
                  } else
                    _n++;
                }
                hr.forEach(Dr);
              }
              for (_n = hr.length - 1; _n >= 0; _n--) {
                var wr = hr[_n];
                for (En = wr.length - 1; En >= 0; En--) {
                  var Er = wr[En], Hr = Er.datum;
                  Hr.offset = Er.dp, Hr.del = Er.del;
                }
              }
            }(xn, rn ? "xa" : "ya", ue), z(xn, rn, ue._invScaleX, ue._invScaleY)), oe && oe.tagName) {
              var $n = l.getComponentMethod("annotations", "hasClickToShow")(X, Tr);
              t(m.select(oe), $n ? "pointer" : "");
            }
            !oe || le || !function(Br, tn, mn) {
              if (!mn || mn.length !== Br._hoverdata.length)
                return !0;
              for (var Qr = mn.length - 1; Qr >= 0; Qr--) {
                var cn = mn[Qr], Hn = Br._hoverdata[Qr];
                if (cn.curveNumber !== Hn.curveNumber || String(cn.pointNumber) !== String(Hn.pointNumber) || String(cn.pointNumbers) !== String(Hn.pointNumbers))
                  return !0;
              }
              return !1;
            }(X, 0, fr) || (fr && X.emit("plotly_unhover", { event: te, points: fr }), X.emit("plotly_hover", { event: te, points: X._hoverdata, xaxes: se, yaxes: de, xvals: Fe, yvals: Pe }));
          })(B, U, ee, N, K);
        });
      }, $.loneHover = function(B, U) {
        var ee = !0;
        Array.isArray(B) || (ee = !1, B = [B]);
        var N = U.gd, K = Z(N), X = re(N), te = E(B.map(function(oe) {
          var ve = oe._x0 || oe.x0 || oe.x || 0, ue = oe._x1 || oe.x1 || oe.x || 0, ye = oe._y0 || oe.y0 || oe.y || 0, Ae = oe._y1 || oe.y1 || oe.y || 0, pe = oe.eventData;
          if (pe) {
            var ge = Math.min(ve, ue), we = Math.max(ve, ue), se = Math.min(ye, Ae), de = Math.max(ye, Ae), Te = oe.trace;
            if (l.traceIs(Te, "gl3d")) {
              var Ee = N._fullLayout[Te.scene]._scene.container, Me = Ee.offsetLeft, ze = Ee.offsetTop;
              ge += Me, we += Me, se += ze, de += ze;
            }
            pe.bbox = { x0: ge + X, x1: we + X, y0: se + K, y1: de + K }, U.inOut_bbox && U.inOut_bbox.push(pe.bbox);
          } else
            pe = !1;
          return { color: oe.color || u.defaultLine, x0: oe.x0 || oe.x || 0, x1: oe.x1 || oe.x || 0, y0: oe.y0 || oe.y || 0, y1: oe.y1 || oe.y || 0, xLabel: oe.xLabel, yLabel: oe.yLabel, zLabel: oe.zLabel, text: oe.text, name: oe.name, idealAlign: oe.idealAlign, borderColor: oe.borderColor, fontFamily: oe.fontFamily, fontSize: oe.fontSize, fontColor: oe.fontColor, nameLength: oe.nameLength, textAlign: oe.textAlign, trace: oe.trace || { index: 0, hoverinfo: "" }, xa: { _offset: 0 }, ya: { _offset: 0 }, index: 0, hovertemplate: oe.hovertemplate || !1, hovertemplateLabels: oe.hovertemplateLabels || !1, eventData: pe };
        }), { gd: N, hovermode: "closest", rotateLabels: !1, bgColor: U.bgColor || u.background, container: m.select(U.container), outerContainer: U.outerContainer || U.container }), ie = 0, le = 0;
        return te.sort(function(oe, ve) {
          return oe.y0 - ve.y0;
        }).each(function(oe, ve) {
          var ue = oe.y0 - oe.by / 2;
          oe.offset = ue - 5 < ie ? ie - ue + 5 : 0, ie = ue + oe.by + oe.offset, ve === U.anchorIndex && (le = oe.offset);
        }).each(function(oe) {
          oe.offset -= le;
        }), z(te, !1, N._fullLayout._invScaleX, N._fullLayout._invScaleY), ee ? te : te.node();
      };
      var S = /<extra>([\s\S]*)<\/extra>/;
      function E(B, U) {
        var ee = U.gd, N = ee._fullLayout, K = U.hovermode, X = U.rotateLabels, te = U.bgColor, ie = U.container, le = U.outerContainer, oe = U.commonLabelOpts || {};
        if (B.length === 0)
          return [[]];
        var ve = U.fontFamily || p.HOVERFONT, ue = U.fontSize || p.HOVERFONTSIZE, ye = B[0], Ae = ye.xa, pe = ye.ya, ge = K.charAt(0), we = ye[ge + "Label"], se = V(ee, le), de = se.top, Te = se.width, Ee = se.height, Me = we !== void 0 && ye.distance <= U.hoverdistance && (K === "x" || K === "y");
        if (Me) {
          var ze, Ie, Oe = !0;
          for (ze = 0; ze < B.length; ze++)
            if (Oe && B[ze].zLabel === void 0 && (Oe = !1), Ie = B[ze].hoverinfo || B[ze].trace.hoverinfo) {
              var Ze = Array.isArray(Ie) ? Ie : Ie.split("+");
              if (Ze.indexOf("all") === -1 && Ze.indexOf(K) === -1) {
                Me = !1;
                break;
              }
            }
          Oe && (Me = !1);
        }
        var Fe = ie.selectAll("g.axistext").data(Me ? [0] : []);
        if (Fe.enter().append("g").classed("axistext", !0), Fe.exit().remove(), Fe.each(function() {
          var rt = m.select(this), ut = x.ensureSingle(rt, "path", "", function(Mr) {
            Mr.style({ "stroke-width": "1px" });
          }), Bt = x.ensureSingle(rt, "text", "", function(Mr) {
            Mr.attr("data-notex", 1);
          }), wt = oe.bgcolor || u.defaultLine, Lt = oe.bordercolor || u.contrast(wt), Se = u.contrast(wt), We = { family: oe.font.family || ve, size: oe.font.size || ue, color: oe.font.color || Se };
          ut.style({ fill: wt, stroke: Lt }), Bt.text(we).call(d.font, We).call(s.positionText, 0, 0).call(s.convertToTspans, ee), rt.attr("transform", "");
          var nt, ft, Mt = V(ee, Bt.node());
          if (K === "x") {
            var Nt = Ae.side === "top" ? "-" : "";
            Bt.attr("text-anchor", "middle").call(s.positionText, 0, Ae.side === "top" ? de - Mt.bottom - T - L : de - Mt.top + T + L), nt = Ae._offset + (ye.x0 + ye.x1) / 2, ft = pe._offset + (Ae.side === "top" ? 0 : pe._length);
            var Zt = Mt.width / 2 + L;
            nt < Zt ? (nt = Zt, ut.attr("d", "M-" + (Zt - T) + ",0L-" + (Zt - 2 * T) + "," + Nt + T + "H" + (L + Mt.width / 2) + "v" + Nt + (2 * L + Mt.height) + "H-" + Zt + "V" + Nt + T + "Z")) : nt > N.width - Zt ? (nt = N.width - Zt, ut.attr("d", "M" + (Zt - T) + ",0L" + Zt + "," + Nt + T + "v" + Nt + (2 * L + Mt.height) + "H-" + Zt + "V" + Nt + T + "H" + (Zt - 2 * T) + "Z")) : ut.attr("d", "M0,0L" + T + "," + Nt + T + "H" + (L + Mt.width / 2) + "v" + Nt + (2 * L + Mt.height) + "H-" + (L + Mt.width / 2) + "V" + Nt + T + "H-" + T + "Z");
          } else {
            var Ut, fr, Tr;
            pe.side === "right" ? (Ut = "start", fr = 1, Tr = "", nt = Ae._offset + Ae._length) : (Ut = "end", fr = -1, Tr = "-", nt = Ae._offset), ft = pe._offset + (ye.y0 + ye.y1) / 2, Bt.attr("text-anchor", Ut), ut.attr("d", "M0,0L" + Tr + T + "," + T + "V" + (L + Mt.height / 2) + "h" + Tr + (2 * L + Mt.width) + "V-" + (L + Mt.height / 2) + "H" + Tr + T + "V-" + T + "Z");
            var ur, Kt = Mt.height / 2, $t = de - Mt.top - Kt, er = "clip" + N._uid + "commonlabel" + pe._id;
            if (nt < Mt.width + 2 * L + T) {
              ur = "M-" + (T + L) + "-" + Kt + "h-" + (Mt.width - L) + "V" + Kt + "h" + (Mt.width - L) + "Z";
              var cr = Mt.width - nt + L;
              s.positionText(Bt, cr, $t), Ut === "end" && Bt.selectAll("tspan").each(function() {
                var Mr = m.select(this), Ir = d.tester.append("text").text(Mr.text()).call(d.font, We), Fr = V(ee, Ir.node());
                Math.round(Fr.width) < Math.round(Mt.width) && Mr.attr("x", cr - Fr.width), Ir.remove();
              });
            } else
              s.positionText(Bt, fr * (L + T), $t), ur = null;
            var gr = N._topclips.selectAll("#" + er).data(ur ? [0] : []);
            gr.enter().append("clipPath").attr("id", er).append("path"), gr.exit().remove(), gr.select("path").attr("d", ur), d.setClipUrl(Bt, ur ? er : null, ee);
          }
          rt.attr("transform", e(nt, ft));
        }), i.isUnifiedHover(K)) {
          ie.selectAll("g.hovertext").remove();
          var Pe = B.filter(function(rt) {
            return rt.hoverinfo !== "none";
          });
          if (Pe.length === 0)
            return;
          var De = N.hoverlabel, Ge = De.font, Qe = { showlegend: !0, legend: { title: { text: we, font: Ge }, font: Ge, bgcolor: De.bgcolor, bordercolor: De.bordercolor, borderwidth: 1, tracegroupgap: 7, traceorder: N.legend ? N.legend.traceorder : void 0, orientation: "v" } }, ot = { font: Ge };
          c(Qe, ot, ee._fullData);
          var vt = ot.legend;
          vt.entries = [];
          for (var bt = 0; bt < Pe.length; bt++) {
            var yt = Pe[bt];
            if (yt.hoverinfo !== "none") {
              var tt = R(yt, !0, K, N, we), Ke = tt[0], mt = tt[1];
              yt.name = mt, yt.text = mt !== "" ? mt + " : " + Ke : Ke;
              var Ft = yt.cd[yt.index];
              Ft && (Ft.mc && (yt.mc = Ft.mc), Ft.mcc && (yt.mc = Ft.mcc), Ft.mlc && (yt.mlc = Ft.mlc), Ft.mlcc && (yt.mlc = Ft.mlcc), Ft.mlw && (yt.mlw = Ft.mlw), Ft.mrc && (yt.mrc = Ft.mrc), Ft.dir && (yt.dir = Ft.dir)), yt._distinct = !0, vt.entries.push([yt]);
            }
          }
          vt.entries.sort(function(rt, ut) {
            return rt[0].trace.index - ut[0].trace.index;
          }), vt.layer = ie, vt._inHover = !0, vt._groupTitleFont = De.grouptitlefont, a(ee, vt);
          var Vt, Xt, Gt, nr, It = ie.select("g.legend"), Be = V(ee, It.node()), He = Be.width + 2 * L, he = Be.height + 2 * L, be = Pe[0], Re = (be.x0 + be.x1) / 2, Ue = (be.y0 + be.y1) / 2, Xe = !(l.traceIs(be.trace, "bar-like") || l.traceIs(be.trace, "box-violin"));
          ge === "y" ? Xe ? (Xt = Ue - L, Vt = Ue + L) : (Xt = Math.min.apply(null, Pe.map(function(rt) {
            return Math.min(rt.y0, rt.y1);
          })), Vt = Math.max.apply(null, Pe.map(function(rt) {
            return Math.max(rt.y0, rt.y1);
          }))) : Xt = Vt = x.mean(Pe.map(function(rt) {
            return (rt.y0 + rt.y1) / 2;
          })) - he / 2, ge === "x" ? Xe ? (Gt = Re + L, nr = Re - L) : (Gt = Math.max.apply(null, Pe.map(function(rt) {
            return Math.max(rt.x0, rt.x1);
          })), nr = Math.min.apply(null, Pe.map(function(rt) {
            return Math.min(rt.x0, rt.x1);
          }))) : Gt = nr = x.mean(Pe.map(function(rt) {
            return (rt.x0 + rt.x1) / 2;
          })) - He / 2;
          var qe, st, it = Ae._offset, Tt = pe._offset;
          return nr += it - He, Xt += Tt - he, qe = (Gt += it) + He < Te && Gt >= 0 ? Gt : nr + He < Te && nr >= 0 ? nr : it + He < Te ? it : Gt - Re < Re - nr + He ? Te - He : 0, qe += L, st = (Vt += Tt) + he < Ee && Vt >= 0 ? Vt : Xt + he < Ee && Xt >= 0 ? Xt : Tt + he < Ee ? Tt : Vt - Ue < Ue - Xt + he ? Ee - he : 0, st += L, It.attr("transform", e(qe - 1, st - 1)), It;
        }
        var Pt = ie.selectAll("g.hovertext").data(B, function(rt) {
          return P(rt);
        });
        return Pt.enter().append("g").classed("hovertext", !0).each(function() {
          var rt = m.select(this);
          rt.append("rect").call(u.fill, u.addOpacity(te, 0.8)), rt.append("text").classed("name", !0), rt.append("path").style("stroke-width", "1px"), rt.append("text").classed("nums", !0).call(d.font, ve, ue);
        }), Pt.exit().remove(), Pt.each(function(rt) {
          var ut = m.select(this).attr("transform", ""), Bt = rt.color;
          Array.isArray(Bt) && (Bt = Bt[rt.eventData[0].pointNumber]);
          var wt = rt.bgcolor || Bt, Lt = u.combine(u.opacity(wt) ? wt : u.defaultLine, te), Se = u.combine(u.opacity(Bt) ? Bt : u.defaultLine, te), We = rt.borderColor || u.contrast(Lt), nt = R(rt, Me, K, N, we, ut), ft = nt[0], Mt = nt[1], Nt = ut.select("text.nums").call(d.font, rt.fontFamily || ve, rt.fontSize || ue, rt.fontColor || We).text(ft).attr("data-notex", 1).call(s.positionText, 0, 0).call(s.convertToTspans, ee), Zt = ut.select("text.name"), Ut = 0, fr = 0;
          if (Mt && Mt !== ft) {
            Zt.call(d.font, rt.fontFamily || ve, rt.fontSize || ue, Se).text(Mt).attr("data-notex", 1).call(s.positionText, 0, 0).call(s.convertToTspans, ee);
            var Tr = V(ee, Zt.node());
            Ut = Tr.width + 2 * L, fr = Tr.height + 2 * L;
          } else
            Zt.remove(), ut.select("rect").remove();
          ut.select("path").style({ fill: Lt, stroke: We });
          var ur = rt.xa._offset + (rt.x0 + rt.x1) / 2, Kt = rt.ya._offset + (rt.y0 + rt.y1) / 2, $t = Math.abs(rt.x1 - rt.x0), er = Math.abs(rt.y1 - rt.y0), cr = V(ee, Nt.node()), gr = cr.width / N._invScaleX, Mr = cr.height / N._invScaleY;
          rt.ty0 = (de - cr.top) / N._invScaleY, rt.bx = gr + 2 * L, rt.by = Math.max(Mr + 2 * L, fr), rt.anchor = "start", rt.txwidth = gr, rt.tx2width = Ut, rt.offset = 0;
          var Ir, Fr, Gr = (gr + T + L + Ut) * N._invScaleX;
          if (X)
            rt.pos = ur, Ir = Kt + er / 2 + Gr <= Ee, Fr = Kt - er / 2 - Gr >= 0, rt.idealAlign !== "top" && Ir || !Fr ? Ir ? (Kt += er / 2, rt.anchor = "start") : rt.anchor = "middle" : (Kt -= er / 2, rt.anchor = "end");
          else if (rt.pos = Kt, Ir = ur + $t / 2 + Gr <= Te, Fr = ur - $t / 2 - Gr >= 0, rt.idealAlign !== "left" && Ir || !Fr)
            if (Ir)
              ur += $t / 2, rt.anchor = "start";
            else {
              rt.anchor = "middle";
              var un = Gr / 2, $r = ur + un - Te, Dn = ur - un;
              $r > 0 && (ur -= $r), Dn < 0 && (ur += -Dn);
            }
          else
            ur -= $t / 2, rt.anchor = "end";
          Nt.attr("text-anchor", rt.anchor), Ut && Zt.attr("text-anchor", rt.anchor), ut.attr("transform", e(ur, Kt) + (X ? r(y) : ""));
        }), Pt;
      }
      function R(B, U, ee, N, K, X) {
        var te = "", ie = "";
        B.nameOverride !== void 0 && (B.name = B.nameOverride), B.name && (B.trace._meta && (B.name = x.templateString(B.name, B.trace._meta)), te = J(B.name, B.nameLength));
        var le = ee.charAt(0), oe = le === "x" ? "y" : "x";
        B.zLabel !== void 0 ? (B.xLabel !== void 0 && (ie += "x: " + B.xLabel + "<br>"), B.yLabel !== void 0 && (ie += "y: " + B.yLabel + "<br>"), B.trace.type !== "choropleth" && B.trace.type !== "choroplethmapbox" && (ie += (ie ? "z: " : "") + B.zLabel)) : U && B[le + "Label"] === K ? ie = B[oe + "Label"] || "" : B.xLabel === void 0 ? B.yLabel !== void 0 && B.trace.type !== "scattercarpet" && (ie = B.yLabel) : ie = B.yLabel === void 0 ? B.xLabel : "(" + B.xLabel + ", " + B.yLabel + ")", !B.text && B.text !== 0 || Array.isArray(B.text) || (ie += (ie ? "<br>" : "") + B.text), B.extraText !== void 0 && (ie += (ie ? "<br>" : "") + B.extraText), X && ie === "" && !B.hovertemplate && (te === "" && X.remove(), ie = te);
        var ve = B.hovertemplate || !1;
        if (ve) {
          var ue = B.hovertemplateLabels || B;
          B[le + "Label"] !== K && (ue[le + "other"] = ue[le + "Val"], ue[le + "otherLabel"] = ue[le + "Label"]), ie = (ie = x.hovertemplateString(ve, ue, N._d3locale, B.eventData[0] || {}, B.trace._meta)).replace(S, function(ye, Ae) {
            return te = J(Ae, B.nameLength), "";
          });
        }
        return [ie, te];
      }
      function z(B, U, ee, N) {
        var K = function(te) {
          return te * ee;
        }, X = function(te) {
          return te * N;
        };
        B.each(function(te) {
          var ie = m.select(this);
          if (te.del)
            return ie.remove();
          var le = ie.select("text.nums"), oe = te.anchor, ve = oe === "end" ? -1 : 1, ue = { start: 1, end: -1, middle: 0 }[oe], ye = ue * (T + L), Ae = ye + ue * (te.txwidth + L), pe = 0, ge = te.offset, we = oe === "middle";
          we && (ye -= te.tx2width / 2, Ae += te.txwidth / 2 + L), U && (ge *= -w, pe = te.offset * b), ie.select("path").attr("d", we ? "M-" + K(te.bx / 2 + te.tx2width / 2) + "," + X(ge - te.by / 2) + "h" + K(te.bx) + "v" + X(te.by) + "h-" + K(te.bx) + "Z" : "M0,0L" + K(ve * T + pe) + "," + X(T + ge) + "v" + X(te.by / 2 - T) + "h" + K(ve * te.bx) + "v-" + X(te.by) + "H" + K(ve * T + pe) + "V" + X(ge - T) + "Z");
          var se = pe + ye, de = ge + te.ty0 - te.by / 2 + L, Te = te.textAlign || "auto";
          Te !== "auto" && (Te === "left" && oe !== "start" ? (le.attr("text-anchor", "start"), se = we ? -te.bx / 2 - te.tx2width / 2 + L : -te.bx - L) : Te === "right" && oe !== "end" && (le.attr("text-anchor", "end"), se = we ? te.bx / 2 - te.tx2width / 2 - L : te.bx + L)), le.call(s.positionText, K(se), X(de)), te.tx2width && (ie.select("text.name").call(s.positionText, K(Ae + ue * L + pe), X(ge + te.ty0 - te.by / 2 + L)), ie.select("rect").call(d.setRect, K(Ae + (ue - 1) * te.tx2width / 2 + pe), X(ge - te.by / 2 - 1), K(te.tx2width), X(te.by + 2)));
        });
      }
      function j(B, U) {
        var ee = B.index, N = B.trace || {}, K = B.cd[0], X = B.cd[ee] || {};
        function te(ye) {
          return ye || g(ye) && ye === 0;
        }
        var ie = Array.isArray(ee) ? function(ye, Ae) {
          var pe = x.castOption(K, ee, ye);
          return te(pe) ? pe : x.extractOption({}, N, "", Ae);
        } : function(ye, Ae) {
          return x.extractOption(X, N, ye, Ae);
        };
        function le(ye, Ae, pe) {
          var ge = ie(Ae, pe);
          te(ge) && (B[ye] = ge);
        }
        if (le("hoverinfo", "hi", "hoverinfo"), le("bgcolor", "hbg", "hoverlabel.bgcolor"), le("borderColor", "hbc", "hoverlabel.bordercolor"), le("fontFamily", "htf", "hoverlabel.font.family"), le("fontSize", "hts", "hoverlabel.font.size"), le("fontColor", "htc", "hoverlabel.font.color"), le("nameLength", "hnl", "hoverlabel.namelength"), le("textAlign", "hta", "hoverlabel.align"), B.posref = U === "y" || U === "closest" && N.orientation === "h" ? B.xa._offset + (B.x0 + B.x1) / 2 : B.ya._offset + (B.y0 + B.y1) / 2, B.x0 = x.constrain(B.x0, 0, B.xa._length), B.x1 = x.constrain(B.x1, 0, B.xa._length), B.y0 = x.constrain(B.y0, 0, B.ya._length), B.y1 = x.constrain(B.y1, 0, B.ya._length), B.xLabelVal !== void 0 && (B.xLabel = "xLabel" in B ? B.xLabel : h.hoverLabelText(B.xa, B.xLabelVal, N.xhoverformat), B.xVal = B.xa.c2d(B.xLabelVal)), B.yLabelVal !== void 0 && (B.yLabel = "yLabel" in B ? B.yLabel : h.hoverLabelText(B.ya, B.yLabelVal, N.yhoverformat), B.yVal = B.ya.c2d(B.yLabelVal)), B.zLabelVal !== void 0 && B.zLabel === void 0 && (B.zLabel = String(B.zLabelVal)), !(isNaN(B.xerr) || B.xa.type === "log" && B.xerr <= 0)) {
          var oe = h.tickText(B.xa, B.xa.c2l(B.xerr), "hover").text;
          B.xerrneg !== void 0 ? B.xLabel += " +" + oe + " / -" + h.tickText(B.xa, B.xa.c2l(B.xerrneg), "hover").text : B.xLabel += " \xB1 " + oe, U === "x" && (B.distance += 1);
        }
        if (!(isNaN(B.yerr) || B.ya.type === "log" && B.yerr <= 0)) {
          var ve = h.tickText(B.ya, B.ya.c2l(B.yerr), "hover").text;
          B.yerrneg !== void 0 ? B.yLabel += " +" + ve + " / -" + h.tickText(B.ya, B.ya.c2l(B.yerrneg), "hover").text : B.yLabel += " \xB1 " + ve, U === "y" && (B.distance += 1);
        }
        var ue = B.hoverinfo || B.trace.hoverinfo;
        return ue && ue !== "all" && ((ue = Array.isArray(ue) ? ue : ue.split("+")).indexOf("x") === -1 && (B.xLabel = void 0), ue.indexOf("y") === -1 && (B.yLabel = void 0), ue.indexOf("z") === -1 && (B.zLabel = void 0), ue.indexOf("text") === -1 && (B.text = void 0), ue.indexOf("name") === -1 && (B.name = void 0)), B;
      }
      function H(B, U, ee) {
        var N, K, X = ee.container, te = ee.fullLayout, ie = te._size, le = ee.event, oe = !!U.hLinePoint, ve = !!U.vLinePoint;
        if (X.selectAll(".spikeline").remove(), ve || oe) {
          var ue = u.combine(te.plot_bgcolor, te.paper_bgcolor);
          if (oe) {
            var ye, Ae, pe = U.hLinePoint;
            N = pe && pe.xa, (K = pe && pe.ya).spikesnap === "cursor" ? (ye = le.pointerX, Ae = le.pointerY) : (ye = N._offset + pe.x, Ae = K._offset + pe.y);
            var ge, we, se = k.readability(pe.color, ue) < 1.5 ? u.contrast(ue) : pe.color, de = K.spikemode, Te = K.spikethickness, Ee = K.spikecolor || se, Me = h.getPxPosition(B, K);
            if (de.indexOf("toaxis") !== -1 || de.indexOf("across") !== -1) {
              if (de.indexOf("toaxis") !== -1 && (ge = Me, we = ye), de.indexOf("across") !== -1) {
                var ze = K._counterDomainMin, Ie = K._counterDomainMax;
                K.anchor === "free" && (ze = Math.min(ze, K.position), Ie = Math.max(Ie, K.position)), ge = ie.l + ze * ie.w, we = ie.l + Ie * ie.w;
              }
              X.insert("line", ":first-child").attr({ x1: ge, x2: we, y1: Ae, y2: Ae, "stroke-width": Te, stroke: Ee, "stroke-dasharray": d.dashStyle(K.spikedash, Te) }).classed("spikeline", !0).classed("crisp", !0), X.insert("line", ":first-child").attr({ x1: ge, x2: we, y1: Ae, y2: Ae, "stroke-width": Te + 2, stroke: ue }).classed("spikeline", !0).classed("crisp", !0);
            }
            de.indexOf("marker") !== -1 && X.insert("circle", ":first-child").attr({ cx: Me + (K.side !== "right" ? Te : -Te), cy: Ae, r: Te, fill: Ee }).classed("spikeline", !0);
          }
          if (ve) {
            var Oe, Ze, Fe = U.vLinePoint;
            N = Fe && Fe.xa, K = Fe && Fe.ya, N.spikesnap === "cursor" ? (Oe = le.pointerX, Ze = le.pointerY) : (Oe = N._offset + Fe.x, Ze = K._offset + Fe.y);
            var Pe, De, Ge = k.readability(Fe.color, ue) < 1.5 ? u.contrast(ue) : Fe.color, Qe = N.spikemode, ot = N.spikethickness, vt = N.spikecolor || Ge, bt = h.getPxPosition(B, N);
            if (Qe.indexOf("toaxis") !== -1 || Qe.indexOf("across") !== -1) {
              if (Qe.indexOf("toaxis") !== -1 && (Pe = bt, De = Ze), Qe.indexOf("across") !== -1) {
                var yt = N._counterDomainMin, tt = N._counterDomainMax;
                N.anchor === "free" && (yt = Math.min(yt, N.position), tt = Math.max(tt, N.position)), Pe = ie.t + (1 - tt) * ie.h, De = ie.t + (1 - yt) * ie.h;
              }
              X.insert("line", ":first-child").attr({ x1: Oe, x2: Oe, y1: Pe, y2: De, "stroke-width": ot, stroke: vt, "stroke-dasharray": d.dashStyle(N.spikedash, ot) }).classed("spikeline", !0).classed("crisp", !0), X.insert("line", ":first-child").attr({ x1: Oe, x2: Oe, y1: Pe, y2: De, "stroke-width": ot + 2, stroke: ue }).classed("spikeline", !0).classed("crisp", !0);
            }
            Qe.indexOf("marker") !== -1 && X.insert("circle", ":first-child").attr({ cx: Oe, cy: bt - (N.side !== "top" ? ot : -ot), r: ot, fill: vt }).classed("spikeline", !0);
          }
        }
      }
      function Y(B, U) {
        return !U || U.vLinePoint !== B._spikepoints.vLinePoint || U.hLinePoint !== B._spikepoints.hLinePoint;
      }
      function J(B, U) {
        return s.plainText(B || "", { len: U, allowedTags: ["br", "sub", "sup", "b", "i", "em"] });
      }
      function W(B, U, ee) {
        var N = U[B + "a"], K = U[B + "Val"], X = U.cd[0];
        if (N.type === "category")
          K = N._categoriesMap[K];
        else if (N.type === "date") {
          var te = U.trace[B + "periodalignment"];
          if (te) {
            var ie = U.cd[U.index], le = ie[B + "Start"];
            le === void 0 && (le = ie[B]);
            var oe = ie[B + "End"];
            oe === void 0 && (oe = ie[B]);
            var ve = oe - le;
            te === "end" ? K += ve : te === "middle" && (K += ve / 2);
          }
          K = N.d2c(K);
        }
        return X && X.t && X.t.posLetter === N._id && (ee.boxmode !== "group" && ee.violinmode !== "group" || (K += X.t.dPos)), K;
      }
      function Z(B) {
        return B.offsetTop + B.clientTop;
      }
      function re(B) {
        return B.offsetLeft + B.clientLeft;
      }
      function V(B, U) {
        var ee = B._fullLayout, N = U.getBoundingClientRect(), K = N.x, X = N.y, te = K + N.width, ie = X + N.height, le = x.apply3DTransform(ee._invTransform)(K, X), oe = x.apply3DTransform(ee._invTransform)(te, ie), ve = le[0], ue = le[1], ye = oe[0], Ae = oe[1];
        return { x: ve, y: ue, width: ye - ve, height: Ae - ue, top: Math.min(ue, Ae), left: Math.min(ve, ye), right: Math.max(ve, ye), bottom: Math.max(ue, Ae) };
      }
    }, { "../../lib": 515, "../../lib/events": 504, "../../lib/override_cursor": 526, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "../../registry": 647, "../color": 367, "../dragelement": 386, "../drawing": 389, "../legend/defaults": 419, "../legend/draw": 420, "./constants": 401, "./helpers": 403, "@plotly/d3": 58, "fast-isnumeric": 190, tinycolor2: 313 }], 405: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../color"), k = v("./helpers").isUnifiedHover;
      Q.exports = function(x, e, r, n) {
        n = n || {};
        var s = e.legend;
        function t(d) {
          n.font[d] || (n.font[d] = s ? e.legend.font[d] : e.font[d]);
        }
        e && k(e.hovermode) && (n.font || (n.font = {}), t("size"), t("family"), t("color"), s ? (n.bgcolor || (n.bgcolor = g.combine(e.legend.bgcolor, e.paper_bgcolor)), n.bordercolor || (n.bordercolor = e.legend.bordercolor)) : n.bgcolor || (n.bgcolor = e.paper_bgcolor)), r("hoverlabel.bgcolor", n.bgcolor), r("hoverlabel.bordercolor", n.bordercolor), r("hoverlabel.namelength", n.namelength), m.coerceFont(r, "hoverlabel.font", n.font), r("hoverlabel.align", n.align);
      };
    }, { "../../lib": 515, "../color": 367, "./helpers": 403 }], 406: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x) {
        function e(r, n) {
          return x[r] !== void 0 ? x[r] : m.coerce(k, x, g, r, n);
        }
        return e("clickmode"), e("hovermode");
      };
    }, { "../../lib": 515, "./layout_attributes": 408 }], 407: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../dragelement"), x = v("./helpers"), e = v("./layout_attributes"), r = v("./hover");
      Q.exports = { moduleType: "component", name: "fx", constants: v("./constants"), schema: { layout: e }, attributes: v("./attributes"), layoutAttributes: e, supplyLayoutGlobalDefaults: v("./layout_global_defaults"), supplyDefaults: v("./defaults"), supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc"), getDistanceFunction: x.getDistanceFunction, getClosest: x.getClosest, inbox: x.inbox, quadrature: x.quadrature, appendArrayPointValue: x.appendArrayPointValue, castHoverOption: function(n, s, t) {
        return g.castOption(n, s, "hoverlabel." + t);
      }, castHoverinfo: function(n, s, t) {
        return g.castOption(n, t, "hoverinfo", function(d) {
          return g.coerceHoverinfo({ hoverinfo: d }, { _module: n._module }, s);
        });
      }, hover: r.hover, unhover: k.unhover, loneHover: r.loneHover, loneUnhover: function(n) {
        var s = g.isD3Selection(n) ? n : m.select(n);
        s.selectAll("g.hovertext").remove(), s.selectAll(".spikeline").remove();
      }, click: v("./click") };
    }, { "../../lib": 515, "../dragelement": 386, "./attributes": 398, "./calc": 399, "./click": 400, "./constants": 401, "./defaults": 402, "./helpers": 403, "./hover": 404, "./layout_attributes": 408, "./layout_defaults": 409, "./layout_global_defaults": 410, "@plotly/d3": 58 }], 408: [function(v, Q, $) {
      var m = v("./constants"), g = v("../../plots/font_attributes"), k = g({ editType: "none" });
      k.family.dflt = m.HOVERFONT, k.size.dflt = m.HOVERFONTSIZE, Q.exports = { clickmode: { valType: "flaglist", flags: ["event", "select"], dflt: "event", editType: "plot", extras: ["none"] }, dragmode: { valType: "enumerated", values: ["zoom", "pan", "select", "lasso", "drawclosedpath", "drawopenpath", "drawline", "drawrect", "drawcircle", "orbit", "turntable", !1], dflt: "zoom", editType: "modebar" }, hovermode: { valType: "enumerated", values: ["x", "y", "closest", !1, "x unified", "y unified"], dflt: "closest", editType: "modebar" }, hoverdistance: { valType: "integer", min: -1, dflt: 20, editType: "none" }, spikedistance: { valType: "integer", min: -1, dflt: -1, editType: "none" }, hoverlabel: { bgcolor: { valType: "color", editType: "none" }, bordercolor: { valType: "color", editType: "none" }, font: k, grouptitlefont: g({ editType: "none" }), align: { valType: "enumerated", values: ["left", "right", "auto"], dflt: "auto", editType: "none" }, namelength: { valType: "integer", min: -1, dflt: 15, editType: "none" }, editType: "none" }, selectdirection: { valType: "enumerated", values: ["h", "v", "d", "any"], dflt: "any", editType: "none" } };
    }, { "../../plots/font_attributes": 594, "./constants": 401 }], 409: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes"), k = v("./hovermode_defaults"), x = v("./hoverlabel_defaults");
      Q.exports = function(e, r) {
        function n(u, o) {
          return m.coerce(e, r, g, u, o);
        }
        k(e, r) && (n("hoverdistance"), n("spikedistance")), n("dragmode") === "select" && n("selectdirection");
        var s = r._has("mapbox"), t = r._has("geo"), d = r._basePlotModules.length;
        r.dragmode === "zoom" && ((s || t) && d === 1 || s && t && d === 2) && (r.dragmode = "pan"), x(e, r, n), m.coerceFont(n, "hoverlabel.grouptitlefont", r.hoverlabel.font);
      };
    }, { "../../lib": 515, "./hoverlabel_defaults": 405, "./hovermode_defaults": 406, "./layout_attributes": 408 }], 410: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./hoverlabel_defaults"), k = v("./layout_attributes");
      Q.exports = function(x, e) {
        g(x, e, function(r, n) {
          return m.coerce(x, e, k, r, n);
        });
      };
    }, { "../../lib": 515, "./hoverlabel_defaults": 405, "./layout_attributes": 408 }], 411: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../lib/regex").counter, k = v("../../plots/domain").attributes, x = v("../../plots/cartesian/constants").idRegex, e = v("../../plot_api/plot_template"), r = { rows: { valType: "integer", min: 1, editType: "plot" }, roworder: { valType: "enumerated", values: ["top to bottom", "bottom to top"], dflt: "top to bottom", editType: "plot" }, columns: { valType: "integer", min: 1, editType: "plot" }, subplots: { valType: "info_array", freeLength: !0, dimensions: 2, items: { valType: "enumerated", values: [g("xy").toString(), ""], editType: "plot" }, editType: "plot" }, xaxes: { valType: "info_array", freeLength: !0, items: { valType: "enumerated", values: [x.x.toString(), ""], editType: "plot" }, editType: "plot" }, yaxes: { valType: "info_array", freeLength: !0, items: { valType: "enumerated", values: [x.y.toString(), ""], editType: "plot" }, editType: "plot" }, pattern: { valType: "enumerated", values: ["independent", "coupled"], dflt: "coupled", editType: "plot" }, xgap: { valType: "number", min: 0, max: 1, editType: "plot" }, ygap: { valType: "number", min: 0, max: 1, editType: "plot" }, domain: k({ name: "grid", editType: "plot", noGridCell: !0 }, {}), xside: { valType: "enumerated", values: ["bottom", "bottom plot", "top plot", "top"], dflt: "bottom plot", editType: "plot" }, yside: { valType: "enumerated", values: ["left", "left plot", "right plot", "right"], dflt: "left plot", editType: "plot" }, editType: "plot" };
      function n(d, u, o) {
        var h = u[o + "axes"], l = Object.keys((d._splomAxes || {})[o] || {});
        return Array.isArray(h) ? h : l.length ? l : void 0;
      }
      function s(d, u, o, h, l, i) {
        var p = u(d + "gap", o), c = u("domain." + d);
        u(d + "side", h);
        for (var a = new Array(l), y = c[0], f = (c[1] - y) / (l - p), _ = f * (1 - p), b = 0; b < l; b++) {
          var w = y + f * b;
          a[i ? l - 1 - b : b] = [w, w + _];
        }
        return a;
      }
      function t(d, u, o, h, l) {
        var i, p = new Array(o);
        function c(a, y) {
          u.indexOf(y) !== -1 && h[y] === void 0 ? (p[a] = y, h[y] = a) : p[a] = "";
        }
        if (Array.isArray(d))
          for (i = 0; i < o; i++)
            c(i, d[i]);
        else
          for (c(0, l), i = 1; i < o; i++)
            c(i, l + (i + 1));
        return p;
      }
      Q.exports = { moduleType: "component", name: "grid", schema: { layout: { grid: r } }, layoutAttributes: r, sizeDefaults: function(d, u) {
        var o = d.grid || {}, h = n(u, o, "x"), l = n(u, o, "y");
        if (d.grid || h || l) {
          var i, p, c = Array.isArray(o.subplots) && Array.isArray(o.subplots[0]), a = Array.isArray(h), y = Array.isArray(l), f = a && h !== o.xaxes && y && l !== o.yaxes;
          c ? (i = o.subplots.length, p = o.subplots[0].length) : (y && (i = l.length), a && (p = h.length));
          var _ = e.newContainer(u, "grid"), b = S("rows", i), w = S("columns", p);
          if (b * w > 1) {
            !c && !a && !y && S("pattern") === "independent" && (c = !0), _._hasSubplotGrid = c;
            var T, L, A = S("roworder") === "top to bottom", I = c ? 0.2 : 0.1, P = c ? 0.3 : 0.1;
            f && u._splomGridDflt && (T = u._splomGridDflt.xside, L = u._splomGridDflt.yside), _._domains = { x: s("x", S, I, T, w), y: s("y", S, P, L, b, A) };
          } else
            delete u.grid;
        }
        function S(E, R) {
          return m.coerce(o, _, r, E, R);
        }
      }, contentDefaults: function(d, u) {
        var o = u.grid;
        if (o && o._domains) {
          var h, l, i, p, c, a, y, f = d.grid || {}, _ = u._subplots, b = o._hasSubplotGrid, w = o.rows, T = o.columns, L = o.pattern === "independent", A = o._axisMap = {};
          if (b) {
            var I = f.subplots || [];
            a = o.subplots = new Array(w);
            var P = 1;
            for (h = 0; h < w; h++) {
              var S = a[h] = new Array(T), E = I[h] || [];
              for (l = 0; l < T; l++)
                if (L ? (c = P === 1 ? "xy" : "x" + P + "y" + P, P++) : c = E[l], S[l] = "", _.cartesian.indexOf(c) !== -1) {
                  if (y = c.indexOf("y"), i = c.slice(0, y), p = c.slice(y), A[i] !== void 0 && A[i] !== l || A[p] !== void 0 && A[p] !== h)
                    continue;
                  S[l] = c, A[i] = l, A[p] = h;
                }
            }
          } else {
            var R = n(u, f, "x"), z = n(u, f, "y");
            o.xaxes = t(R, _.xaxis, T, A, "x"), o.yaxes = t(z, _.yaxis, w, A, "y");
          }
          var j = o._anchors = {}, H = o.roworder === "top to bottom";
          for (var Y in A) {
            var J, W, Z, re = Y.charAt(0), V = o[re + "side"];
            if (V.length < 8)
              j[Y] = "free";
            else if (re === "x") {
              if (V.charAt(0) === "t" === H ? (J = 0, W = 1, Z = w) : (J = w - 1, W = -1, Z = -1), b) {
                var B = A[Y];
                for (h = J; h !== Z; h += W)
                  if ((c = a[h][B]) && (y = c.indexOf("y"), c.slice(0, y) === Y)) {
                    j[Y] = c.slice(y);
                    break;
                  }
              } else
                for (h = J; h !== Z; h += W)
                  if (p = o.yaxes[h], _.cartesian.indexOf(Y + p) !== -1) {
                    j[Y] = p;
                    break;
                  }
            } else if (V.charAt(0) === "l" ? (J = 0, W = 1, Z = T) : (J = T - 1, W = -1, Z = -1), b) {
              var U = A[Y];
              for (h = J; h !== Z; h += W)
                if ((c = a[U][h]) && (y = c.indexOf("y"), c.slice(y) === Y)) {
                  j[Y] = c.slice(0, y);
                  break;
                }
            } else
              for (h = J; h !== Z; h += W)
                if (i = o.xaxes[h], _.cartesian.indexOf(i + Y) !== -1) {
                  j[Y] = i;
                  break;
                }
          }
        }
      } };
    }, { "../../lib": 515, "../../lib/regex": 532, "../../plot_api/plot_template": 555, "../../plots/cartesian/constants": 573, "../../plots/domain": 593 }], 412: [function(v, Q, $) {
      var m = v("../../plots/cartesian/constants"), g = v("../../plot_api/plot_template").templatedArray;
      v("../../constants/axis_placeable_objects"), Q.exports = g("image", { visible: { valType: "boolean", dflt: !0, editType: "arraydraw" }, source: { valType: "string", editType: "arraydraw" }, layer: { valType: "enumerated", values: ["below", "above"], dflt: "above", editType: "arraydraw" }, sizex: { valType: "number", dflt: 0, editType: "arraydraw" }, sizey: { valType: "number", dflt: 0, editType: "arraydraw" }, sizing: { valType: "enumerated", values: ["fill", "contain", "stretch"], dflt: "contain", editType: "arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "arraydraw" }, x: { valType: "any", dflt: 0, editType: "arraydraw" }, y: { valType: "any", dflt: 0, editType: "arraydraw" }, xanchor: { valType: "enumerated", values: ["left", "center", "right"], dflt: "left", editType: "arraydraw" }, yanchor: { valType: "enumerated", values: ["top", "middle", "bottom"], dflt: "top", editType: "arraydraw" }, xref: { valType: "enumerated", values: ["paper", m.idRegex.x.toString()], dflt: "paper", editType: "arraydraw" }, yref: { valType: "enumerated", values: ["paper", m.idRegex.y.toString()], dflt: "paper", editType: "arraydraw" }, editType: "arraydraw" });
    }, { "../../constants/axis_placeable_objects": 484, "../../plot_api/plot_template": 555, "../../plots/cartesian/constants": 573 }], 413: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib/to_log_range");
      Q.exports = function(k, x, e, r) {
        x = x || {};
        var n = e === "log" && x.type === "linear", s = e === "linear" && x.type === "log";
        if (n || s) {
          for (var t, d, u = k._fullLayout.images, o = x._id.charAt(0), h = 0; h < u.length; h++)
            if (d = "images[" + h + "].", (t = u[h])[o + "ref"] === x._id) {
              var l = t[o], i = t["size" + o], p = null, c = null;
              if (n) {
                p = g(l, x.range);
                var a = i / Math.pow(10, p) / 2;
                c = 2 * Math.log(a + Math.sqrt(1 + a * a)) / Math.LN10;
              } else
                c = (p = Math.pow(10, l)) * (Math.pow(10, i / 2) - Math.pow(10, -i / 2));
              m(p) ? m(c) || (c = null) : (p = null, c = null), r(d + o, p), r(d + "size" + o, c);
            }
        }
      };
    }, { "../../lib/to_log_range": 543, "fast-isnumeric": 190 }], 414: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../../plots/array_container_defaults"), x = v("./attributes");
      function e(r, n, s) {
        function t(p, c) {
          return m.coerce(r, n, x, p, c);
        }
        var d = t("source");
        if (!t("visible", !!d))
          return n;
        t("layer"), t("xanchor"), t("yanchor"), t("sizex"), t("sizey"), t("sizing"), t("opacity");
        for (var u = { _fullLayout: s }, o = ["x", "y"], h = 0; h < 2; h++) {
          var l = o[h], i = g.coerceRef(r, n, u, l, "paper", void 0);
          i !== "paper" && g.getFromId(u, i)._imgIndices.push(n._index), g.coercePosition(n, u, t, i, l, 0);
        }
        return n;
      }
      Q.exports = function(r, n) {
        k(r, n, { name: "images", handleItemDefaults: e });
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/cartesian/axes": 566, "./attributes": 412 }], 415: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../drawing"), k = v("../../plots/cartesian/axes"), x = v("../../plots/cartesian/axis_ids"), e = v("../../constants/xmlns_namespaces");
      Q.exports = function(r) {
        var n, s, t = r._fullLayout, d = [], u = {}, o = [];
        for (s = 0; s < t.images.length; s++) {
          var h = t.images[s];
          if (h.visible)
            if (h.layer === "below" && h.xref !== "paper" && h.yref !== "paper") {
              n = x.ref2id(h.xref) + x.ref2id(h.yref);
              var l = t._plots[n];
              if (!l) {
                o.push(h);
                continue;
              }
              l.mainplot && (n = l.mainplot.id), u[n] || (u[n] = []), u[n].push(h);
            } else
              h.layer === "above" ? d.push(h) : o.push(h);
        }
        var i = { left: { sizing: "xMin", offset: 0 }, center: { sizing: "xMid", offset: -0.5 }, right: { sizing: "xMax", offset: -1 } }, p = { top: { sizing: "YMin", offset: 0 }, middle: { sizing: "YMid", offset: -0.5 }, bottom: { sizing: "YMax", offset: -1 } };
        function c(T) {
          var L = m.select(this);
          if (this._imgSrc !== T.source)
            if (L.attr("xmlns", e.svg), T.source && T.source.slice(0, 5) === "data:")
              L.attr("xlink:href", T.source), this._imgSrc = T.source;
            else {
              var A = new Promise(function(I) {
                var P = new Image();
                function S() {
                  L.remove(), I();
                }
                this.img = P, P.setAttribute("crossOrigin", "anonymous"), P.onerror = S, P.onload = function() {
                  var E = document.createElement("canvas");
                  E.width = this.width, E.height = this.height, E.getContext("2d", { willReadFrequently: !0 }).drawImage(this, 0, 0);
                  var R = E.toDataURL("image/png");
                  L.attr("xlink:href", R), I();
                }, L.on("error", S), P.src = T.source, this._imgSrc = T.source;
              }.bind(this));
              r._promises.push(A);
            }
        }
        function a(T) {
          var L, A, I = m.select(this), P = k.getFromId(r, T.xref), S = k.getFromId(r, T.yref), E = k.getRefType(T.xref) === "domain", R = k.getRefType(T.yref) === "domain", z = t._size;
          L = P !== void 0 ? typeof T.xref == "string" && E ? P._length * T.sizex : Math.abs(P.l2p(T.sizex) - P.l2p(0)) : T.sizex * z.w, A = S !== void 0 ? typeof T.yref == "string" && R ? S._length * T.sizey : Math.abs(S.l2p(T.sizey) - S.l2p(0)) : T.sizey * z.h;
          var j, H, Y = L * i[T.xanchor].offset, J = A * p[T.yanchor].offset, W = i[T.xanchor].sizing + p[T.yanchor].sizing;
          switch (j = P !== void 0 ? typeof T.xref == "string" && E ? P._length * T.x + P._offset : P.r2p(T.x) + P._offset : T.x * z.w + z.l, j += Y, H = S !== void 0 ? typeof T.yref == "string" && R ? S._length * (1 - T.y) + S._offset : S.r2p(T.y) + S._offset : z.h - T.y * z.h + z.t, H += J, T.sizing) {
            case "fill":
              W += " slice";
              break;
            case "stretch":
              W = "none";
          }
          I.attr({ x: j, y: H, width: L, height: A, preserveAspectRatio: W, opacity: T.opacity });
          var Z = (P && k.getRefType(T.xref) !== "domain" ? P._id : "") + (S && k.getRefType(T.yref) !== "domain" ? S._id : "");
          g.setClipUrl(I, Z ? "clip" + t._uid + Z : null, r);
        }
        var y = t._imageLowerLayer.selectAll("image").data(o), f = t._imageUpperLayer.selectAll("image").data(d);
        y.enter().append("image"), f.enter().append("image"), y.exit().remove(), f.exit().remove(), y.each(function(T) {
          c.bind(this)(T), a.bind(this)(T);
        }), f.each(function(T) {
          c.bind(this)(T), a.bind(this)(T);
        });
        var _ = Object.keys(t._plots);
        for (s = 0; s < _.length; s++) {
          n = _[s];
          var b = t._plots[n];
          if (b.imagelayer) {
            var w = b.imagelayer.selectAll("image").data(u[n] || []);
            w.enter().append("image"), w.exit().remove(), w.each(function(T) {
              c.bind(this)(T), a.bind(this)(T);
            });
          }
        }
      };
    }, { "../../constants/xmlns_namespaces": 492, "../../plots/cartesian/axes": 566, "../../plots/cartesian/axis_ids": 570, "../drawing": 389, "@plotly/d3": 58 }], 416: [function(v, Q, $) {
      Q.exports = { moduleType: "component", name: "images", layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), includeBasePlot: v("../../plots/cartesian/include_components")("images"), draw: v("./draw"), convertCoords: v("./convert_coords") };
    }, { "../../plots/cartesian/include_components": 577, "./attributes": 412, "./convert_coords": 413, "./defaults": 414, "./draw": 415 }], 417: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("../color/attributes");
      Q.exports = { bgcolor: { valType: "color", editType: "legend" }, bordercolor: { valType: "color", dflt: g.defaultLine, editType: "legend" }, borderwidth: { valType: "number", min: 0, dflt: 0, editType: "legend" }, font: m({ editType: "legend" }), grouptitlefont: m({ editType: "legend" }), orientation: { valType: "enumerated", values: ["v", "h"], dflt: "v", editType: "legend" }, traceorder: { valType: "flaglist", flags: ["reversed", "grouped"], extras: ["normal"], editType: "legend" }, tracegroupgap: { valType: "number", min: 0, dflt: 10, editType: "legend" }, entrywidth: { valType: "number", min: 0, editType: "legend" }, entrywidthmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "pixels", editType: "legend" }, itemsizing: { valType: "enumerated", values: ["trace", "constant"], dflt: "trace", editType: "legend" }, itemwidth: { valType: "number", min: 30, dflt: 30, editType: "legend" }, itemclick: { valType: "enumerated", values: ["toggle", "toggleothers", !1], dflt: "toggle", editType: "legend" }, itemdoubleclick: { valType: "enumerated", values: ["toggle", "toggleothers", !1], dflt: "toggleothers", editType: "legend" }, groupclick: { valType: "enumerated", values: ["toggleitem", "togglegroup"], dflt: "togglegroup", editType: "legend" }, x: { valType: "number", min: -2, max: 3, editType: "legend" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "left", editType: "legend" }, y: { valType: "number", min: -2, max: 3, editType: "legend" }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], editType: "legend" }, uirevision: { valType: "any", editType: "none" }, valign: { valType: "enumerated", values: ["top", "middle", "bottom"], dflt: "middle", editType: "legend" }, title: { text: { valType: "string", dflt: "", editType: "legend" }, font: m({ editType: "legend" }), side: { valType: "enumerated", values: ["top", "left", "top left"], editType: "legend" }, editType: "legend" }, editType: "legend" };
    }, { "../../plots/font_attributes": 594, "../color/attributes": 366 }], 418: [function(v, Q, $) {
      Q.exports = { scrollBarWidth: 6, scrollBarMinHeight: 20, scrollBarColor: "#808BA4", scrollBarMargin: 4, scrollBarEnterAttrs: { rx: 20, ry: 3, width: 0, height: 0 }, titlePad: 2, itemGap: 5 };
    }, {}], 419: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../../plot_api/plot_template"), x = v("../../plots/attributes"), e = v("./attributes"), r = v("../../plots/layout_attributes"), n = v("./helpers");
      Q.exports = function(s, t, d) {
        var u, o = s.legend || {}, h = k.newContainer(t, "legend");
        function l(S, E) {
          return g.coerce(o, h, e, S, E);
        }
        for (var i = function(S, E) {
          var R = u._input, z = u;
          return g.coerce(R, z, x, S, E);
        }, p = t.font || {}, c = g.coerceFont(l, "grouptitlefont", g.extendFlat({}, p, { size: Math.round(1.1 * p.size) })), a = 0, y = !1, f = "normal", _ = 0; _ < d.length; _++)
          (u = d[_]).visible && ((u.showlegend || u._dfltShowLegend && !(u._module && u._module.attributes && u._module.attributes.showlegend && u._module.attributes.showlegend.dflt === !1)) && (a++, u.showlegend && (y = !0, (m.traceIs(u, "pie-like") || u._input.showlegend === !0) && a++), g.coerceFont(i, "legendgrouptitle.font", c)), (m.traceIs(u, "bar") && t.barmode === "stack" || ["tonextx", "tonexty"].indexOf(u.fill) !== -1) && (f = n.isGrouped({ traceorder: f }) ? "grouped+reversed" : "reversed"), u.legendgroup !== void 0 && u.legendgroup !== "" && (f = n.isReversed({ traceorder: f }) ? "reversed+grouped" : "grouped"));
        var b = g.coerce(s, t, r, "showlegend", y && a > 1);
        if (b === !1 && (t.legend = void 0), (b !== !1 || o.uirevision) && (l("uirevision", t.uirevision), b !== !1)) {
          l("bgcolor", t.paper_bgcolor), l("bordercolor"), l("borderwidth");
          var w, T, L, A = g.coerceFont(l, "font", t.font), I = l("orientation") === "h";
          if (I ? (w = 0, m.getComponentMethod("rangeslider", "isVisible")(s.xaxis) ? (T = 1.1, L = "bottom") : (T = -0.1, L = "top")) : (w = 1.02, T = 1, L = "auto"), l("traceorder", f), n.isGrouped(t.legend) && l("tracegroupgap"), l("entrywidth"), l("entrywidthmode"), l("itemsizing"), l("itemwidth"), l("itemclick"), l("itemdoubleclick"), l("groupclick"), l("x", w), l("xanchor"), l("y", T), l("yanchor", L), l("valign"), g.noneOrAll(o, h, ["x", "y"]), l("title.text")) {
            l("title.side", I ? "left" : "top");
            var P = g.extendFlat({}, A, { size: g.bigFont(A.size) });
            g.coerceFont(l, "title.font", P);
          }
        }
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../plots/attributes": 562, "../../plots/layout_attributes": 619, "../../registry": 647, "./attributes": 417, "./helpers": 423 }], 420: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../plots/plots"), x = v("../../registry"), e = v("../../lib/events"), r = v("../dragelement"), n = v("../drawing"), s = v("../color"), t = v("../../lib/svg_text_utils"), d = v("./handle_click"), u = v("./constants"), o = v("../../constants/alignment"), h = o.LINE_SPACING, l = o.FROM_TL, i = o.FROM_BR, p = v("./get_legend_data"), c = v("./style"), a = v("./helpers");
      function y(I, P, S) {
        var E = I[0], R = E.width, z = P.entrywidthmode, j = E.trace.legendwidth || P.entrywidth;
        return z === "fraction" ? P._maxWidth * j : S + (j || R);
      }
      function f(I, P, S, E, R) {
        var z = S.data()[0][0].trace, j = { event: R, node: S.node(), curveNumber: z.index, expandedIndex: z._expandedIndex, data: I.data, layout: I.layout, frames: I._transitionData._frames, config: I._context, fullData: I._fullData, fullLayout: I._fullLayout };
        z._group && (j.group = z._group), x.traceIs(z, "pie-like") && (j.label = S.datum()[0].label), e.triggerHandler(I, "plotly_legendclick", j) !== !1 && (E === 1 ? P._clickTimeout = setTimeout(function() {
          I._fullLayout && d(S, I, E);
        }, I._context.doubleClickDelay) : E === 2 && (P._clickTimeout && clearTimeout(P._clickTimeout), I._legendMouseDownTime = 0, e.triggerHandler(I, "plotly_legenddoubleclick", j) !== !1 && d(S, I, E)));
      }
      function _(I, P, S) {
        var E, R, z = I.data()[0][0], j = z.trace, H = x.traceIs(j, "pie-like"), Y = !S._inHover && P._context.edits.legendText && !H, J = S._maxNameLength;
        z.groupTitle ? (E = z.groupTitle.text, R = z.groupTitle.font) : (R = S.font, S.entries ? E = z.text : (E = H ? z.label : j.name, j._meta && (E = g.templateString(E, j._meta))));
        var W = g.ensureSingle(I, "text", "legendtext");
        W.attr("text-anchor", "start").call(n.font, R).text(Y ? b(E, J) : E);
        var Z = S.itemwidth + 2 * u.itemGap;
        t.positionText(W, Z, 0), Y ? W.call(t.makeEditable, { gd: P, text: E }).call(T, I, P, S).on("edit", function(re) {
          this.text(b(re, J)).call(T, I, P, S);
          var V = z.trace._fullInput || {}, B = {};
          if (x.hasTransform(V, "groupby")) {
            var U = x.getTransformIndices(V, "groupby"), ee = U[U.length - 1], N = g.keyedContainer(V, "transforms[" + ee + "].styles", "target", "value.name");
            N.set(z.trace._group, re), B = N.constructUpdate();
          } else
            B.name = re;
          return x.call("_guiRestyle", P, B, j.index);
        }) : T(W, I, P, S);
      }
      function b(I, P) {
        var S = Math.max(4, P);
        if (I && I.trim().length >= S / 2)
          return I;
        for (var E = S - (I = I || "").length; E > 0; E--)
          I += " ";
        return I;
      }
      function w(I, P) {
        var S, E = P._context.doubleClickDelay, R = 1, z = g.ensureSingle(I, "rect", "legendtoggle", function(j) {
          P._context.staticPlot || j.style("cursor", "pointer").attr("pointer-events", "all"), j.call(s.fill, "rgba(0,0,0,0)");
        });
        P._context.staticPlot || (z.on("mousedown", function() {
          (S = new Date().getTime()) - P._legendMouseDownTime < E ? R += 1 : (R = 1, P._legendMouseDownTime = S);
        }), z.on("mouseup", function() {
          if (!P._dragged && !P._editing) {
            var j = P._fullLayout.legend;
            new Date().getTime() - P._legendMouseDownTime > E && (R = Math.max(R - 1, 1)), f(P, j, I, R, m.event);
          }
        }));
      }
      function T(I, P, S, E, R) {
        E._inHover && I.attr("data-notex", !0), t.convertToTspans(I, S, function() {
          (function(z, j, H, Y) {
            var J = z.data()[0][0];
            if (!H._inHover && J && !J.trace.showlegend)
              return void z.remove();
            var W = z.select("g[class*=math-group]"), Z = W.node();
            H || (H = j._fullLayout.legend);
            var re, V = H.borderwidth;
            re = Y === 1 ? H.title.font : J.groupTitle ? J.groupTitle.font : H.font;
            var B, U, ee = re.size * h;
            if (Z) {
              var N = n.bBox(Z);
              B = N.height, U = N.width, Y === 1 ? n.setTranslate(W, V, V + 0.75 * B) : n.setTranslate(W, 0, 0.25 * B);
            } else {
              var K = z.select(Y === 1 ? ".legendtitletext" : ".legendtext"), X = t.lineCount(K), te = K.node();
              if (B = ee * X, U = te ? n.bBox(te).width : 0, Y === 1)
                H.title.side === "left" && (U += 2 * u.itemGap), t.positionText(K, V + u.titlePad, V + ee);
              else {
                var ie = 2 * u.itemGap + H.itemwidth;
                J.groupTitle && (ie = u.itemGap, U -= H.itemwidth), t.positionText(K, ie, -ee * ((X - 1) / 2 - 0.3));
              }
            }
            Y === 1 ? (H._titleWidth = U, H._titleHeight = B) : (J.lineHeight = ee, J.height = Math.max(B, 16) + 3, J.width = U);
          })(P, S, E, R);
        });
      }
      function L(I) {
        return g.isRightAnchor(I) ? "right" : g.isCenterAnchor(I) ? "center" : "left";
      }
      function A(I) {
        return g.isBottomAnchor(I) ? "bottom" : g.isMiddleAnchor(I) ? "middle" : "top";
      }
      Q.exports = function(I, P) {
        return P || (P = I._fullLayout.legend || {}), function(S, E) {
          var R, z, j = S._fullLayout, H = "legend" + j._uid, Y = E._inHover;
          if (Y ? (R = E.layer, H += "-hover") : R = j._infolayer, !!R) {
            if (S._legendMouseDownTime || (S._legendMouseDownTime = 0), Y) {
              if (!E.entries)
                return;
              z = p(E.entries, E);
            } else {
              if (!S.calcdata)
                return;
              z = j.showlegend && p(S.calcdata, E);
            }
            var J = j.hiddenlabels || [];
            if (!(Y || j.showlegend && z.length))
              return R.selectAll(".legend").remove(), j._topdefs.select("#" + H).remove(), k.autoMargin(S, "legend");
            var W = g.ensureSingle(R, "g", "legend", function(X) {
              Y || X.attr("pointer-events", "all");
            }), Z = g.ensureSingleById(j._topdefs, "clipPath", H, function(X) {
              X.append("rect");
            }), re = g.ensureSingle(W, "rect", "bg", function(X) {
              X.attr("shape-rendering", "crispEdges");
            });
            re.call(s.stroke, E.bordercolor).call(s.fill, E.bgcolor).style("stroke-width", E.borderwidth + "px");
            var V = g.ensureSingle(W, "g", "scrollbox"), B = E.title;
            if (E._titleWidth = 0, E._titleHeight = 0, B.text) {
              var U = g.ensureSingle(V, "text", "legendtitletext");
              U.attr("text-anchor", "start").call(n.font, B.font).text(B.text), T(U, V, S, E, 1);
            } else
              V.selectAll(".legendtitletext").remove();
            var ee = g.ensureSingle(W, "rect", "scrollbar", function(X) {
              X.attr(u.scrollBarEnterAttrs).call(s.fill, u.scrollBarColor);
            }), N = V.selectAll("g.groups").data(z);
            N.enter().append("g").attr("class", "groups"), N.exit().remove();
            var K = N.selectAll("g.traces").data(g.identity);
            K.enter().append("g").attr("class", "traces"), K.exit().remove(), K.style("opacity", function(X) {
              var te = X[0].trace;
              return x.traceIs(te, "pie-like") ? J.indexOf(X[0].label) !== -1 ? 0.5 : 1 : te.visible === "legendonly" ? 0.5 : 1;
            }).each(function() {
              m.select(this).call(_, S, E);
            }).call(c, S, E).each(function() {
              Y || m.select(this).call(w, S);
            }), g.syncOrAsync([k.previousPromises, function() {
              return function(X, te, ie, le) {
                var oe = X._fullLayout;
                le || (le = oe.legend);
                var ve = oe._size, ue = a.isVertical(le), ye = a.isGrouped(le), Ae = le.entrywidthmode === "fraction", pe = le.borderwidth, ge = 2 * pe, we = u.itemGap, se = le.itemwidth + 2 * we, de = 2 * (pe + we), Te = A(le), Ee = le.y < 0 || le.y === 0 && Te === "top", Me = le.y > 1 || le.y === 1 && Te === "bottom", ze = le.tracegroupgap, Ie = {};
                le._maxHeight = Math.max(Ee || Me ? oe.height / 2 : ve.h, 30);
                var Oe = 0;
                le._width = 0, le._height = 0;
                var Ze = function(He) {
                  var he = 0, be = 0, Re = He.title.side;
                  return Re && (Re.indexOf("left") !== -1 && (he = He._titleWidth), Re.indexOf("top") !== -1 && (be = He._titleHeight)), [he, be];
                }(le);
                if (ue)
                  ie.each(function(He) {
                    var he = He[0].height;
                    n.setTranslate(this, pe + Ze[0], pe + Ze[1] + le._height + he / 2 + we), le._height += he, le._width = Math.max(le._width, He[0].width);
                  }), Oe = se + le._width, le._width += we + se + ge, le._height += de, ye && (te.each(function(He, he) {
                    n.setTranslate(this, 0, he * le.tracegroupgap);
                  }), le._height += (le._lgroupsLength - 1) * le.tracegroupgap);
                else {
                  var Fe = L(le), Pe = le.x < 0 || le.x === 0 && Fe === "right", De = le.x > 1 || le.x === 1 && Fe === "left", Ge = Me || Ee, Qe = oe.width / 2;
                  le._maxWidth = Math.max(Pe ? Ge && Fe === "left" ? ve.l + ve.w : Qe : De ? Ge && Fe === "right" ? ve.r + ve.w : Qe : ve.w, 2 * se);
                  var ot = 0, vt = 0;
                  ie.each(function(He) {
                    var he = y(He, le, se);
                    ot = Math.max(ot, he), vt += he;
                  }), Oe = null;
                  var bt = 0;
                  if (ye) {
                    var yt = 0, tt = 0, Ke = 0;
                    te.each(function() {
                      var He = 0, he = 0;
                      m.select(this).selectAll("g.traces").each(function(Re) {
                        var Ue = y(Re, le, se), Xe = Re[0].height;
                        n.setTranslate(this, Ze[0], Ze[1] + pe + we + Xe / 2 + he), he += Xe, He = Math.max(He, Ue), Ie[Re[0].trace.legendgroup] = He;
                      });
                      var be = He + we;
                      tt > 0 && be + pe + tt > le._maxWidth ? (bt = Math.max(bt, tt), tt = 0, Ke += yt + ze, yt = he) : yt = Math.max(yt, he), n.setTranslate(this, tt, Ke), tt += be;
                    }), le._width = Math.max(bt, tt) + pe, le._height = Ke + yt + de;
                  } else {
                    var mt = ie.size(), Ft = vt + ge + (mt - 1) * we < le._maxWidth, Vt = 0, Xt = 0, Gt = 0, nr = 0;
                    ie.each(function(He) {
                      var he = He[0].height, be = y(He, le, se), Re = Ft ? be : ot;
                      Ae || (Re += we), Re + pe + Xt - we >= le._maxWidth && (bt = Math.max(bt, nr), Xt = 0, Gt += Vt, le._height += Vt, Vt = 0), n.setTranslate(this, Ze[0] + pe + Xt, Ze[1] + pe + Gt + he / 2 + we), nr = Xt + be + we, Xt += Re, Vt = Math.max(Vt, he);
                    }), Ft ? (le._width = Xt + ge, le._height = Vt + de) : (le._width = Math.max(bt, nr) + ge, le._height += Vt + de);
                  }
                }
                le._width = Math.ceil(Math.max(le._width + Ze[0], le._titleWidth + 2 * (pe + u.titlePad))), le._height = Math.ceil(Math.max(le._height + Ze[1], le._titleHeight + 2 * (pe + u.itemGap))), le._effHeight = Math.min(le._height, le._maxHeight);
                var It = X._context.edits, Be = It.legendText || It.legendPosition;
                ie.each(function(He) {
                  var he = m.select(this).select(".legendtoggle"), be = He[0].height, Re = He[0].trace.legendgroup, Ue = y(He, le, se);
                  ye && Re !== "" && (Ue = Ie[Re]);
                  var Xe = Be ? se : Oe || Ue;
                  ue || Ae || (Xe += we / 2), n.setRect(he, 0, -be / 2, Xe, be);
                });
              }(S, N, K, E);
            }, function() {
              var X, te, ie, le, oe = j._size, ve = E.borderwidth;
              if (!Y) {
                if (function(Pe) {
                  var De = Pe._fullLayout.legend, Ge = L(De), Qe = A(De);
                  return k.autoMargin(Pe, "legend", { x: De.x, y: De.y, l: De._width * l[Ge], r: De._width * i[Ge], b: De._effHeight * i[Qe], t: De._effHeight * l[Qe] });
                }(S))
                  return;
                var ue = oe.l + oe.w * E.x - l[L(E)] * E._width, ye = oe.t + oe.h * (1 - E.y) - l[A(E)] * E._effHeight;
                if (j.margin.autoexpand) {
                  var Ae = ue, pe = ye;
                  ue = g.constrain(ue, 0, j.width - E._width), ye = g.constrain(ye, 0, j.height - E._effHeight), ue !== Ae && g.log("Constrain legend.x to make legend fit inside graph"), ye !== pe && g.log("Constrain legend.y to make legend fit inside graph");
                }
                n.setTranslate(W, ue, ye);
              }
              if (ee.on(".drag", null), W.on("wheel", null), Y || E._height <= E._maxHeight || S._context.staticPlot) {
                var ge = E._effHeight;
                Y && (ge = E._height), re.attr({ width: E._width - ve, height: ge - ve, x: ve / 2, y: ve / 2 }), n.setTranslate(V, 0, 0), Z.select("rect").attr({ width: E._width - 2 * ve, height: ge - 2 * ve, x: ve, y: ve }), n.setClipUrl(V, H, S), n.setRect(ee, 0, 0, 0, 0), delete E._scrollY;
              } else {
                var we, se, de, Te = Math.max(u.scrollBarMinHeight, E._effHeight * E._effHeight / E._height), Ee = E._effHeight - Te - 2 * u.scrollBarMargin, Me = E._height - E._effHeight, ze = Ee / Me, Ie = Math.min(E._scrollY || 0, Me);
                re.attr({ width: E._width - 2 * ve + u.scrollBarWidth + u.scrollBarMargin, height: E._effHeight - ve, x: ve / 2, y: ve / 2 }), Z.select("rect").attr({ width: E._width - 2 * ve + u.scrollBarWidth + u.scrollBarMargin, height: E._effHeight - 2 * ve, x: ve, y: ve + Ie }), n.setClipUrl(V, H, S), Fe(Ie, Te, ze), W.on("wheel", function() {
                  Fe(Ie = g.constrain(E._scrollY + m.event.deltaY / Ee * Me, 0, Me), Te, ze), Ie !== 0 && Ie !== Me && m.event.preventDefault();
                });
                var Oe = m.behavior.drag().on("dragstart", function() {
                  var Pe = m.event.sourceEvent;
                  we = Pe.type === "touchstart" ? Pe.changedTouches[0].clientY : Pe.clientY, de = Ie;
                }).on("drag", function() {
                  var Pe = m.event.sourceEvent;
                  Pe.buttons === 2 || Pe.ctrlKey || (se = Pe.type === "touchmove" ? Pe.changedTouches[0].clientY : Pe.clientY, Fe(Ie = function(De, Ge, Qe) {
                    var ot = (Qe - Ge) / ze + De;
                    return g.constrain(ot, 0, Me);
                  }(de, we, se), Te, ze));
                });
                ee.call(Oe);
                var Ze = m.behavior.drag().on("dragstart", function() {
                  var Pe = m.event.sourceEvent;
                  Pe.type === "touchstart" && (we = Pe.changedTouches[0].clientY, de = Ie);
                }).on("drag", function() {
                  var Pe = m.event.sourceEvent;
                  Pe.type === "touchmove" && (se = Pe.changedTouches[0].clientY, Fe(Ie = function(De, Ge, Qe) {
                    var ot = (Ge - Qe) / ze + De;
                    return g.constrain(ot, 0, Me);
                  }(de, we, se), Te, ze));
                });
                V.call(Ze);
              }
              function Fe(Pe, De, Ge) {
                E._scrollY = S._fullLayout.legend._scrollY = Pe, n.setTranslate(V, 0, -Pe), n.setRect(ee, E._width, u.scrollBarMargin + Pe * Ge, u.scrollBarWidth, De), Z.select("rect").attr("y", ve + Pe);
              }
              S._context.edits.legendPosition && (W.classed("cursor-move", !0), r.init({ element: W.node(), gd: S, prepFn: function() {
                var Pe = n.getTranslate(W);
                ie = Pe.x, le = Pe.y;
              }, moveFn: function(Pe, De) {
                var Ge = ie + Pe, Qe = le + De;
                n.setTranslate(W, Ge, Qe), X = r.align(Ge, 0, oe.l, oe.l + oe.w, E.xanchor), te = r.align(Qe, 0, oe.t + oe.h, oe.t, E.yanchor);
              }, doneFn: function() {
                X !== void 0 && te !== void 0 && x.call("_guiRelayout", S, { "legend.x": X, "legend.y": te });
              }, clickFn: function(Pe, De) {
                var Ge = R.selectAll("g.traces").filter(function() {
                  var Qe = this.getBoundingClientRect();
                  return De.clientX >= Qe.left && De.clientX <= Qe.right && De.clientY >= Qe.top && De.clientY <= Qe.bottom;
                });
                Ge.size() > 0 && f(S, W, Ge, Pe, De);
              } }));
            }], S);
          }
        }(I, P);
      };
    }, { "../../constants/alignment": 483, "../../lib": 515, "../../lib/events": 504, "../../lib/svg_text_utils": 541, "../../plots/plots": 628, "../../registry": 647, "../color": 367, "../dragelement": 386, "../drawing": 389, "./constants": 418, "./get_legend_data": 421, "./handle_click": 422, "./helpers": 423, "./style": 425, "@plotly/d3": 58 }], 421: [function(v, Q, $) {
      var m = v("../../registry"), g = v("./helpers");
      Q.exports = function(k, x) {
        var e, r, n = x._inHover, s = g.isGrouped(x), t = g.isReversed(x), d = {}, u = [], o = !1, h = {}, l = 0, i = 0;
        function p(z, j) {
          if (z !== "" && g.isGrouped(x))
            u.indexOf(z) === -1 ? (u.push(z), o = !0, d[z] = [j]) : d[z].push(j);
          else {
            var H = "~~i" + l;
            u.push(H), d[H] = [j], l++;
          }
        }
        for (e = 0; e < k.length; e++) {
          var c = k[e], a = c[0], y = a.trace, f = y.legendgroup;
          if (n || y.visible && y.showlegend)
            if (m.traceIs(y, "pie-like"))
              for (h[f] || (h[f] = {}), r = 0; r < c.length; r++) {
                var _ = c[r].label;
                h[f][_] || (p(f, { label: _, color: c[r].color, i: c[r].i, trace: y, pts: c[r].pts }), h[f][_] = !0, i = Math.max(i, (_ || "").length));
              }
            else
              p(f, a), i = Math.max(i, (y.name || "").length);
        }
        if (!u.length)
          return [];
        var b = !o || !s, w = [];
        for (e = 0; e < u.length; e++) {
          var T = d[u[e]];
          b ? w.push(T[0]) : w.push(T);
        }
        for (b && (w = [w]), e = 0; e < w.length; e++) {
          var L = 1 / 0;
          for (r = 0; r < w[e].length; r++) {
            var A = w[e][r].trace.legendrank;
            L > A && (L = A);
          }
          w[e][0]._groupMinRank = L, w[e][0]._preGroupSort = e;
        }
        var I = function(z, j) {
          return z.trace.legendrank - j.trace.legendrank || z._preSort - j._preSort;
        };
        for (w.forEach(function(z, j) {
          z[0]._preGroupSort = j;
        }), w.sort(function(z, j) {
          return z[0]._groupMinRank - j[0]._groupMinRank || z[0]._preGroupSort - j[0]._preGroupSort;
        }), e = 0; e < w.length; e++) {
          w[e].forEach(function(z, j) {
            z._preSort = j;
          }), w[e].sort(I);
          var P = w[e][0].trace, S = null;
          for (r = 0; r < w[e].length; r++) {
            var E = w[e][r].trace.legendgrouptitle;
            if (E && E.text) {
              S = E, n && (E.font = x._groupTitleFont);
              break;
            }
          }
          if (t && w[e].reverse(), S) {
            var R = !1;
            for (r = 0; r < w[e].length; r++)
              if (m.traceIs(w[e][r].trace, "pie-like")) {
                R = !0;
                break;
              }
            w[e].unshift({ i: -1, groupTitle: S, noClick: R, trace: { showlegend: P.showlegend, legendgroup: P.legendgroup, visible: x.groupclick === "toggleitem" || P.visible } });
          }
          for (r = 0; r < w[e].length; r++)
            w[e][r] = [w[e][r]];
        }
        return x._lgroupsLength = w.length, x._maxNameLength = i, w;
      };
    }, { "../../registry": 647, "./helpers": 423 }], 422: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry"), k = !0;
      Q.exports = function(x, e, r) {
        var n = e._fullLayout;
        if (!e._dragged && !e._editing) {
          var s, t = n.legend.itemclick, d = n.legend.itemdoubleclick, u = n.legend.groupclick;
          if (r === 1 && t === "toggle" && d === "toggleothers" && k && e.data && e._context.showTips && m.notifier(m._(e, "Double-click on legend to isolate one trace"), "long"), k = !1, r === 1 ? s = t : r === 2 && (s = d), s) {
            var o = u === "togglegroup", h = n.hiddenlabels ? n.hiddenlabels.slice() : [], l = x.data()[0][0];
            if (!l.groupTitle || !l.noClick) {
              var i, p, c, a, y, f = e._fullData, _ = l.trace, b = _.legendgroup, w = {}, T = [], L = [], A = [];
              if (g.traceIs(_, "pie-like")) {
                var I = l.label, P = h.indexOf(I);
                s === "toggle" ? P === -1 ? h.push(I) : h.splice(P, 1) : s === "toggleothers" && (h = [], e.calcdata[0].forEach(function(U) {
                  I !== U.label && h.push(U.label);
                }), e._fullLayout.hiddenlabels && e._fullLayout.hiddenlabels.length === h.length && P === -1 && (h = [])), g.call("_guiRelayout", e, "hiddenlabels", h);
              } else {
                var S, E = b && b.length, R = [];
                if (E)
                  for (i = 0; i < f.length; i++)
                    (S = f[i]).visible && S.legendgroup === b && R.push(i);
                if (s === "toggle") {
                  var z;
                  switch (_.visible) {
                    case !0:
                      z = "legendonly";
                      break;
                    case !1:
                      z = !1;
                      break;
                    case "legendonly":
                      z = !0;
                  }
                  if (E)
                    if (o)
                      for (i = 0; i < f.length; i++)
                        f[i].visible !== !1 && f[i].legendgroup === b && B(f[i], z);
                    else
                      B(_, z);
                  else
                    B(_, z);
                } else if (s === "toggleothers") {
                  var j, H, Y, J, W = !0;
                  for (i = 0; i < f.length; i++)
                    if (j = f[i] === _, Y = f[i].showlegend !== !0, !(j || Y || (H = E && f[i].legendgroup === b) || f[i].visible !== !0 || g.traceIs(f[i], "notLegendIsolatable"))) {
                      W = !1;
                      break;
                    }
                  for (i = 0; i < f.length; i++)
                    if (f[i].visible !== !1 && !g.traceIs(f[i], "notLegendIsolatable"))
                      switch (_.visible) {
                        case "legendonly":
                          B(f[i], !0);
                          break;
                        case !0:
                          J = !!W || "legendonly", j = f[i] === _, Y = f[i].showlegend !== !0 && !f[i].legendgroup, H = j || E && f[i].legendgroup === b, B(f[i], !(!H && !Y) || J);
                      }
                }
                for (i = 0; i < L.length; i++)
                  if (c = L[i]) {
                    var Z = c.constructUpdate(), re = Object.keys(Z);
                    for (p = 0; p < re.length; p++)
                      a = re[p], (w[a] = w[a] || [])[A[i]] = Z[a];
                  }
                for (y = Object.keys(w), i = 0; i < y.length; i++)
                  for (a = y[i], p = 0; p < T.length; p++)
                    w[a].hasOwnProperty(p) || (w[a][p] = void 0);
                g.call("_guiRestyle", e, w, T);
              }
            }
          }
        }
        function V(U, ee, N) {
          var K = T.indexOf(U), X = w[ee];
          return X || (X = w[ee] = []), T.indexOf(U) === -1 && (T.push(U), K = T.length - 1), X[K] = N, K;
        }
        function B(U, ee) {
          if (!l.groupTitle || o) {
            var N = U._fullInput;
            if (g.hasTransform(N, "groupby")) {
              var K = L[N.index];
              if (!K) {
                var X = g.getTransformIndices(N, "groupby"), te = X[X.length - 1];
                K = m.keyedContainer(N, "transforms[" + te + "].styles", "target", "value.visible"), L[N.index] = K;
              }
              var ie = K.get(U._group);
              ie === void 0 && (ie = !0), ie !== !1 && K.set(U._group, ee), A[N.index] = V(N.index, "visible", N.visible !== !1);
            } else {
              var le = N.visible !== !1 && ee;
              V(N.index, "visible", le);
            }
          }
        }
      };
    }, { "../../lib": 515, "../../registry": 647 }], 423: [function(v, Q, $) {
      $.isGrouped = function(m) {
        return (m.traceorder || "").indexOf("grouped") !== -1;
      }, $.isVertical = function(m) {
        return m.orientation !== "h";
      }, $.isReversed = function(m) {
        return (m.traceorder || "").indexOf("reversed") !== -1;
      };
    }, {}], 424: [function(v, Q, $) {
      Q.exports = { moduleType: "component", name: "legend", layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), draw: v("./draw"), style: v("./style") };
    }, { "./attributes": 417, "./defaults": 419, "./draw": 420, "./style": 425 }], 425: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../lib"), x = k.strTranslate, e = v("../drawing"), r = v("../color"), n = v("../colorscale/helpers").extractOpts, s = v("../../traces/scatter/subtypes"), t = v("../../traces/pie/style_one"), d = v("../../traces/pie/helpers").castOption, u = v("./constants");
      function o(i, p) {
        return (p ? "radial" : "horizontal") + (i ? "" : "reversed");
      }
      function h(i) {
        var p = i[0].trace, c = p.contours, a = s.hasLines(p), y = s.hasMarkers(p), f = p.visible && p.fill && p.fill !== "none", _ = !1, b = !1;
        if (c) {
          var w = c.coloring;
          w === "lines" ? _ = !0 : a = w === "none" || w === "heatmap" || c.showlines, c.type === "constraint" ? f = c._operation !== "=" : w !== "fill" && w !== "heatmap" || (b = !0);
        }
        return { showMarker: y, showLine: a, showFill: f, showGradientLine: _, showGradientFill: b, anyLine: a || _, anyFill: f || b };
      }
      function l(i, p, c) {
        return i && k.isArrayOrTypedArray(i) ? p : i > c ? c : i;
      }
      Q.exports = function(i, p, c) {
        var a = p._fullLayout;
        c || (c = a.legend);
        var y = c.itemsizing === "constant", f = c.itemwidth, _ = (f + 2 * u.itemGap) / 2, b = x(_, 0), w = function(A, I, P, S) {
          var E;
          if (A + 1)
            E = A;
          else {
            if (!(I && I.width > 0))
              return 0;
            E = I.width;
          }
          return y ? S : Math.min(E, P);
        };
        function T(A, I, P) {
          var S = A[0].trace, E = S.marker || {}, R = E.line || {}, z = P ? S.visible && S.type === P : g.traceIs(S, "bar"), j = m.select(I).select("g.legendpoints").selectAll("path.legend" + P).data(z ? [A] : []);
          j.enter().append("path").classed("legend" + P, !0).attr("d", "M6,6H-6V-6H6Z").attr("transform", b), j.exit().remove(), j.each(function(H) {
            var Y = m.select(this), J = H[0], W = w(J.mlw, E.line, 5, 2);
            Y.style("stroke-width", W + "px");
            var Z = J.mcc;
            if (!c._inHover && "mc" in J) {
              var re = n(E), V = re.mid;
              V === void 0 && (V = (re.max + re.min) / 2), Z = e.tryColorscale(E, "")(V);
            }
            var B = Z || J.mc || E.color, U = E.pattern, ee = U && e.getPatternAttr(U.shape, 0, "");
            if (ee) {
              var N = e.getPatternAttr(U.bgcolor, 0, null), K = e.getPatternAttr(U.fgcolor, 0, null), X = U.fgopacity, te = l(U.size, 8, 10), ie = l(U.solidity, 0.5, 1), le = "legend-" + S.uid;
              Y.call(e.pattern, "legend", p, le, ee, te, ie, Z, U.fillmode, N, K, X);
            } else
              Y.call(r.fill, B);
            W && r.stroke(Y, J.mlc || R.color);
          });
        }
        function L(A, I, P) {
          var S = A[0], E = S.trace, R = P ? E.visible && E.type === P : g.traceIs(E, P), z = m.select(I).select("g.legendpoints").selectAll("path.legend" + P).data(R ? [A] : []);
          if (z.enter().append("path").classed("legend" + P, !0).attr("d", "M6,6H-6V-6H6Z").attr("transform", b), z.exit().remove(), z.size()) {
            var j = (E.marker || {}).line, H = w(d(j.width, S.pts), j, 5, 2), Y = k.minExtend(E, { marker: { line: { width: H } } });
            Y.marker.line.color = j.color;
            var J = k.minExtend(S, { trace: Y });
            t(z, J, Y);
          }
        }
        i.each(function(A) {
          var I = m.select(this), P = k.ensureSingle(I, "g", "layers");
          P.style("opacity", A[0].trace.opacity);
          var S = c.valign, E = A[0].lineHeight, R = A[0].height;
          if (S !== "middle" && E && R) {
            var z = { top: 1, bottom: -1 }[S] * (0.5 * (E - R + 3));
            P.attr("transform", x(0, z));
          } else
            P.attr("transform", null);
          P.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill", !0), P.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines", !0);
          var j = P.selectAll("g.legendsymbols").data([A]);
          j.enter().append("g").classed("legendsymbols", !0), j.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints", !0);
        }).each(function(A) {
          var I, P = A[0].trace, S = [];
          if (P.visible)
            switch (P.type) {
              case "histogram2d":
              case "heatmap":
                S = [["M-15,-2V4H15V-2Z"]], I = !0;
                break;
              case "choropleth":
              case "choroplethmapbox":
                S = [["M-6,-6V6H6V-6Z"]], I = !0;
                break;
              case "densitymapbox":
                S = [["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]], I = "radial";
                break;
              case "cone":
                S = [["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"], ["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"], ["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]], I = !1;
                break;
              case "streamtube":
                S = [["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"], ["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"], ["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]], I = !1;
                break;
              case "surface":
                S = [["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"], ["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]], I = !0;
                break;
              case "mesh3d":
                S = [["M-6,6H0L-6,-6Z"], ["M6,6H0L6,-6Z"], ["M-6,-6H6L0,6Z"]], I = !1;
                break;
              case "volume":
                S = [["M-6,6H0L-6,-6Z"], ["M6,6H0L6,-6Z"], ["M-6,-6H6L0,6Z"]], I = !0;
                break;
              case "isosurface":
                S = [["M-6,6H0L-6,-6Z"], ["M6,6H0L6,-6Z"], ["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]], I = !1;
            }
          var E = m.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(S);
          E.enter().append("path").classed("legend3dandfriends", !0).attr("transform", b).style("stroke-miterlimit", 1), E.exit().remove(), E.each(function(R, z) {
            var j, H = m.select(this), Y = n(P), J = Y.colorscale, W = Y.reversescale;
            if (J) {
              if (!I) {
                var Z = J.length;
                j = z === 0 ? J[W ? Z - 1 : 0][1] : z === 1 ? J[W ? 0 : Z - 1][1] : J[Math.floor((Z - 1) / 2)][1];
              }
            } else {
              var re = P.vertexcolor || P.facecolor || P.color;
              j = k.isArrayOrTypedArray(re) ? re[z] || re[0] : re;
            }
            H.attr("d", R[0]), j ? H.call(r.fill, j) : H.call(function(V) {
              if (V.size()) {
                var B = "legendfill-" + P.uid;
                e.gradient(V, p, B, o(W, I === "radial"), J, "fill");
              }
            });
          });
        }).each(function(A) {
          var I = A[0].trace, P = I.type === "waterfall";
          if (A[0]._distinct && P) {
            var S = A[0].trace[A[0].dir].marker;
            return A[0].mc = S.color, A[0].mlw = S.line.width, A[0].mlc = S.line.color, T(A, this, "waterfall");
          }
          var E = [];
          I.visible && P && (E = A[0].hasTotals ? [["increasing", "M-6,-6V6H0Z"], ["totals", "M6,6H0L-6,-6H-0Z"], ["decreasing", "M6,6V-6H0Z"]] : [["increasing", "M-6,-6V6H6Z"], ["decreasing", "M6,6V-6H-6Z"]]);
          var R = m.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);
          R.enter().append("path").classed("legendwaterfall", !0).attr("transform", b).style("stroke-miterlimit", 1), R.exit().remove(), R.each(function(z) {
            var j = m.select(this), H = I[z[0]].marker, Y = w(void 0, H.line, 5, 2);
            j.attr("d", z[1]).style("stroke-width", Y + "px").call(r.fill, H.color), Y && j.call(r.stroke, H.line.color);
          });
        }).each(function(A) {
          T(A, this, "funnel");
        }).each(function(A) {
          T(A, this);
        }).each(function(A) {
          var I = A[0].trace, P = m.select(this).select("g.legendpoints").selectAll("path.legendbox").data(I.visible && g.traceIs(I, "box-violin") ? [A] : []);
          P.enter().append("path").classed("legendbox", !0).attr("d", "M6,6H-6V-6H6Z").attr("transform", b), P.exit().remove(), P.each(function() {
            var S = m.select(this);
            if (I.boxpoints !== "all" && I.points !== "all" || r.opacity(I.fillcolor) !== 0 || r.opacity((I.line || {}).color) !== 0) {
              var E = w(void 0, I.line, 5, 2);
              S.style("stroke-width", E + "px").call(r.fill, I.fillcolor), E && r.stroke(S, I.line.color);
            } else {
              var R = k.minExtend(I, { marker: { size: y ? 12 : k.constrain(I.marker.size, 2, 16), sizeref: 1, sizemin: 1, sizemode: "diameter" } });
              P.call(e.pointStyle, R, p);
            }
          });
        }).each(function(A) {
          L(A, this, "funnelarea");
        }).each(function(A) {
          L(A, this, "pie");
        }).each(function(A) {
          var I, P, S = h(A), E = S.showFill, R = S.showLine, z = S.showGradientLine, j = S.showGradientFill, H = S.anyFill, Y = S.anyLine, J = A[0], W = J.trace, Z = n(W), re = Z.colorscale, V = Z.reversescale, B = s.hasMarkers(W) || !H ? "M5,0" : Y ? "M5,-2" : "M5,-3", U = m.select(this), ee = U.select(".legendfill").selectAll("path").data(E || j ? [A] : []);
          if (ee.enter().append("path").classed("js-fill", !0), ee.exit().remove(), ee.attr("d", B + "h" + f + "v6h-" + f + "z").call(function(X) {
            if (X.size())
              if (E)
                e.fillGroupStyle(X, p);
              else {
                var te = "legendfill-" + W.uid;
                e.gradient(X, p, te, o(V), re, "fill");
              }
          }), R || z) {
            var N = w(void 0, W.line, 10, 5);
            P = k.minExtend(W, { line: { width: N } }), I = [k.minExtend(J, { trace: P })];
          }
          var K = U.select(".legendlines").selectAll("path").data(R || z ? [I] : []);
          K.enter().append("path").classed("js-line", !0), K.exit().remove(), K.attr("d", B + (z ? "l" + f + ",0.0001" : "h" + f)).call(R ? e.lineGroupStyle : function(X) {
            if (X.size()) {
              var te = "legendline-" + W.uid;
              e.lineGroupStyle(X), e.gradient(X, p, te, o(V), re, "stroke");
            }
          });
        }).each(function(A) {
          var I, P, S = h(A), E = S.anyFill, R = S.anyLine, z = S.showLine, j = S.showMarker, H = A[0], Y = H.trace, J = !j && !R && !E && s.hasText(Y);
          function W(K, X, te, ie) {
            var le = k.nestedProperty(Y, K).get(), oe = k.isArrayOrTypedArray(le) && X ? X(le) : le;
            if (y && oe && ie !== void 0 && (oe = ie), te) {
              if (oe < te[0])
                return te[0];
              if (oe > te[1])
                return te[1];
            }
            return oe;
          }
          function Z(K) {
            return H._distinct && H.index && K[H.index] ? K[H.index] : K[0];
          }
          if (j || J || z) {
            var re = {}, V = {};
            if (j) {
              re.mc = W("marker.color", Z), re.mx = W("marker.symbol", Z), re.mo = W("marker.opacity", k.mean, [0.2, 1]), re.mlc = W("marker.line.color", Z), re.mlw = W("marker.line.width", k.mean, [0, 5], 2), V.marker = { sizeref: 1, sizemin: 1, sizemode: "diameter" };
              var B = W("marker.size", k.mean, [2, 16], 12);
              re.ms = B, V.marker.size = B;
            }
            z && (V.line = { width: W("line.width", Z, [0, 10], 5) }), J && (re.tx = "Aa", re.tp = W("textposition", Z), re.ts = 10, re.tc = W("textfont.color", Z), re.tf = W("textfont.family", Z)), I = [k.minExtend(H, re)], (P = k.minExtend(Y, V)).selectedpoints = null, P.texttemplate = null;
          }
          var U = m.select(this).select("g.legendpoints"), ee = U.selectAll("path.scatterpts").data(j ? I : []);
          ee.enter().insert("path", ":first-child").classed("scatterpts", !0).attr("transform", b), ee.exit().remove(), ee.call(e.pointStyle, P, p), j && (I[0].mrc = 3);
          var N = U.selectAll("g.pointtext").data(J ? I : []);
          N.enter().append("g").classed("pointtext", !0).append("text").attr("transform", b), N.exit().remove(), N.selectAll("text").call(e.textPointStyle, P, p);
        }).each(function(A) {
          var I = A[0].trace, P = m.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(I.visible && I.type === "candlestick" ? [A, A] : []);
          P.enter().append("path").classed("legendcandle", !0).attr("d", function(S, E) {
            return E ? "M-15,0H-8M-8,6V-6H8Z" : "M15,0H8M8,-6V6H-8Z";
          }).attr("transform", b).style("stroke-miterlimit", 1), P.exit().remove(), P.each(function(S, E) {
            var R = m.select(this), z = I[E ? "increasing" : "decreasing"], j = w(void 0, z.line, 5, 2);
            R.style("stroke-width", j + "px").call(r.fill, z.fillcolor), j && r.stroke(R, z.line.color);
          });
        }).each(function(A) {
          var I = A[0].trace, P = m.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(I.visible && I.type === "ohlc" ? [A, A] : []);
          P.enter().append("path").classed("legendohlc", !0).attr("d", function(S, E) {
            return E ? "M-15,0H0M-8,-6V0" : "M15,0H0M8,6V0";
          }).attr("transform", b).style("stroke-miterlimit", 1), P.exit().remove(), P.each(function(S, E) {
            var R = m.select(this), z = I[E ? "increasing" : "decreasing"], j = w(void 0, z.line, 5, 2);
            R.style("fill", "none").call(e.dashLine, z.line.dash, j), j && r.stroke(R, z.line.color);
          });
        });
      };
    }, { "../../lib": 515, "../../registry": 647, "../../traces/pie/helpers": 915, "../../traces/pie/style_one": 921, "../../traces/scatter/subtypes": 961, "../color": 367, "../colorscale/helpers": 378, "../drawing": 389, "./constants": 418, "@plotly/d3": 58 }], 426: [function(v, Q, $) {
      v("./constants"), Q.exports = { editType: "modebar", orientation: { valType: "enumerated", values: ["v", "h"], dflt: "h", editType: "modebar" }, bgcolor: { valType: "color", editType: "modebar" }, color: { valType: "color", editType: "modebar" }, activecolor: { valType: "color", editType: "modebar" }, uirevision: { valType: "any", editType: "none" }, add: { valType: "string", arrayOk: !0, dflt: "", editType: "modebar" }, remove: { valType: "string", arrayOk: !0, dflt: "", editType: "modebar" } };
    }, { "./constants": 428 }], 427: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../plots/plots"), k = v("../../plots/cartesian/axis_ids"), x = v("../../fonts/ploticon"), e = v("../shapes/draw").eraseActiveShape, r = v("../../lib"), n = r._, s = Q.exports = {};
      function t(a, y) {
        var f, _, b = y.currentTarget, w = b.getAttribute("data-attr"), T = b.getAttribute("data-val") || !0, L = a._fullLayout, A = {}, I = k.list(a, null, !0), P = L._cartesianSpikesEnabled;
        if (w === "zoom") {
          var S, E = T === "in" ? 0.5 : 2, R = (1 + E) / 2, z = (1 - E) / 2;
          for (_ = 0; _ < I.length; _++)
            if (!(f = I[_]).fixedrange)
              if (S = f._name, T === "auto")
                A[S + ".autorange"] = !0;
              else if (T === "reset") {
                if (f._rangeInitial === void 0)
                  A[S + ".autorange"] = !0;
                else {
                  var j = f._rangeInitial.slice();
                  A[S + ".range[0]"] = j[0], A[S + ".range[1]"] = j[1];
                }
                f._showSpikeInitial !== void 0 && (A[S + ".showspikes"] = f._showSpikeInitial, P !== "on" || f._showSpikeInitial || (P = "off"));
              } else {
                var H = [f.r2l(f.range[0]), f.r2l(f.range[1])], Y = [R * H[0] + z * H[1], R * H[1] + z * H[0]];
                A[S + ".range[0]"] = f.l2r(Y[0]), A[S + ".range[1]"] = f.l2r(Y[1]);
              }
        } else
          w !== "hovermode" || T !== "x" && T !== "y" || (T = L._isHoriz ? "y" : "x", b.setAttribute("data-val", T)), A[w] = T;
        L._cartesianSpikesEnabled = P, m.call("_guiRelayout", a, A);
      }
      function d(a, y) {
        for (var f = y.currentTarget, _ = f.getAttribute("data-attr"), b = f.getAttribute("data-val") || !0, w = a._fullLayout._subplots.gl3d || [], T = {}, L = _.split("."), A = 0; A < w.length; A++)
          T[w[A] + "." + L[1]] = b;
        var I = b === "pan" ? b : "zoom";
        T.dragmode = I, m.call("_guiRelayout", a, T);
      }
      function u(a, y) {
        for (var f = y.currentTarget.getAttribute("data-attr"), _ = f === "resetLastSave", b = f === "resetDefault", w = a._fullLayout, T = w._subplots.gl3d || [], L = {}, A = 0; A < T.length; A++) {
          var I, P = T[A], S = P + ".camera", E = P + ".aspectratio", R = P + ".aspectmode", z = w[P]._scene;
          _ ? (L[S + ".up"] = z.viewInitial.up, L[S + ".eye"] = z.viewInitial.eye, L[S + ".center"] = z.viewInitial.center, I = !0) : b && (L[S + ".up"] = null, L[S + ".eye"] = null, L[S + ".center"] = null, I = !0), I && (L[E + ".x"] = z.viewInitial.aspectratio.x, L[E + ".y"] = z.viewInitial.aspectratio.y, L[E + ".z"] = z.viewInitial.aspectratio.z, L[R] = z.viewInitial.aspectmode);
        }
        m.call("_guiRelayout", a, L);
      }
      function o(a, y) {
        var f = y.currentTarget, _ = f._previousVal, b = a._fullLayout, w = b._subplots.gl3d || [], T = ["xaxis", "yaxis", "zaxis"], L = {}, A = {};
        if (_)
          A = _, f._previousVal = null;
        else {
          for (var I = 0; I < w.length; I++) {
            var P = w[I], S = b[P], E = P + ".hovermode";
            L[E] = S.hovermode, A[E] = !1;
            for (var R = 0; R < 3; R++) {
              var z = T[R], j = P + "." + z + ".showspikes";
              A[j] = !1, L[j] = S[z].showspikes;
            }
          }
          f._previousVal = L;
        }
        return A;
      }
      function h(a, y) {
        for (var f = y.currentTarget, _ = f.getAttribute("data-attr"), b = f.getAttribute("data-val") || !0, w = a._fullLayout, T = w._subplots.geo || [], L = 0; L < T.length; L++) {
          var A = T[L], I = w[A];
          if (_ === "zoom") {
            var P = I.projection.scale, S = b === "in" ? 2 * P : 0.5 * P;
            m.call("_guiRelayout", a, A + ".projection.scale", S);
          }
        }
        _ === "reset" && c(a, "geo");
      }
      function l(a) {
        var y = a._fullLayout;
        return !y.hovermode && (y._has("cartesian") ? y._isHoriz ? "y" : "x" : "closest");
      }
      function i(a) {
        var y = l(a);
        m.call("_guiRelayout", a, "hovermode", y);
      }
      function p(a, y) {
        for (var f = y.currentTarget.getAttribute("data-val"), _ = a._fullLayout, b = _._subplots.mapbox || [], w = {}, T = 0; T < b.length; T++) {
          var L = b[T], A = _[L].zoom, I = f === "in" ? 1.05 * A : A / 1.05;
          w[L + ".zoom"] = I;
        }
        m.call("_guiRelayout", a, w);
      }
      function c(a, y) {
        for (var f = a._fullLayout, _ = f._subplots[y] || [], b = {}, w = 0; w < _.length; w++)
          for (var T = _[w], L = f[T]._subplot.viewInitial, A = Object.keys(L), I = 0; I < A.length; I++) {
            var P = A[I];
            b[T + "." + P] = L[P];
          }
        m.call("_guiRelayout", a, b);
      }
      s.toImage = { name: "toImage", title: function(a) {
        var y = (a._context.toImageButtonOptions || {}).format || "png";
        return n(a, y === "png" ? "Download plot as a png" : "Download plot");
      }, icon: x.camera, click: function(a) {
        var y = a._context.toImageButtonOptions, f = { format: y.format || "png" };
        r.notifier(n(a, "Taking snapshot - this may take a few seconds"), "long"), f.format !== "svg" && r.isIE() && (r.notifier(n(a, "IE only supports svg.  Changing format to svg."), "long"), f.format = "svg"), ["filename", "width", "height", "scale"].forEach(function(_) {
          _ in y && (f[_] = y[_]);
        }), m.call("downloadImage", a, f).then(function(_) {
          r.notifier(n(a, "Snapshot succeeded") + " - " + _, "long");
        }).catch(function() {
          r.notifier(n(a, "Sorry, there was a problem downloading your snapshot!"), "long");
        });
      } }, s.sendDataToCloud = { name: "sendDataToCloud", title: function(a) {
        return n(a, "Edit in Chart Studio");
      }, icon: x.disk, click: function(a) {
        g.sendDataToCloud(a);
      } }, s.editInChartStudio = { name: "editInChartStudio", title: function(a) {
        return n(a, "Edit in Chart Studio");
      }, icon: x.pencil, click: function(a) {
        g.sendDataToCloud(a);
      } }, s.zoom2d = { name: "zoom2d", _cat: "zoom", title: function(a) {
        return n(a, "Zoom");
      }, attr: "dragmode", val: "zoom", icon: x.zoombox, click: t }, s.pan2d = { name: "pan2d", _cat: "pan", title: function(a) {
        return n(a, "Pan");
      }, attr: "dragmode", val: "pan", icon: x.pan, click: t }, s.select2d = { name: "select2d", _cat: "select", title: function(a) {
        return n(a, "Box Select");
      }, attr: "dragmode", val: "select", icon: x.selectbox, click: t }, s.lasso2d = { name: "lasso2d", _cat: "lasso", title: function(a) {
        return n(a, "Lasso Select");
      }, attr: "dragmode", val: "lasso", icon: x.lasso, click: t }, s.drawclosedpath = { name: "drawclosedpath", title: function(a) {
        return n(a, "Draw closed freeform");
      }, attr: "dragmode", val: "drawclosedpath", icon: x.drawclosedpath, click: t }, s.drawopenpath = { name: "drawopenpath", title: function(a) {
        return n(a, "Draw open freeform");
      }, attr: "dragmode", val: "drawopenpath", icon: x.drawopenpath, click: t }, s.drawline = { name: "drawline", title: function(a) {
        return n(a, "Draw line");
      }, attr: "dragmode", val: "drawline", icon: x.drawline, click: t }, s.drawrect = { name: "drawrect", title: function(a) {
        return n(a, "Draw rectangle");
      }, attr: "dragmode", val: "drawrect", icon: x.drawrect, click: t }, s.drawcircle = { name: "drawcircle", title: function(a) {
        return n(a, "Draw circle");
      }, attr: "dragmode", val: "drawcircle", icon: x.drawcircle, click: t }, s.eraseshape = { name: "eraseshape", title: function(a) {
        return n(a, "Erase active shape");
      }, icon: x.eraseshape, click: e }, s.zoomIn2d = { name: "zoomIn2d", _cat: "zoomin", title: function(a) {
        return n(a, "Zoom in");
      }, attr: "zoom", val: "in", icon: x.zoom_plus, click: t }, s.zoomOut2d = { name: "zoomOut2d", _cat: "zoomout", title: function(a) {
        return n(a, "Zoom out");
      }, attr: "zoom", val: "out", icon: x.zoom_minus, click: t }, s.autoScale2d = { name: "autoScale2d", _cat: "autoscale", title: function(a) {
        return n(a, "Autoscale");
      }, attr: "zoom", val: "auto", icon: x.autoscale, click: t }, s.resetScale2d = { name: "resetScale2d", _cat: "resetscale", title: function(a) {
        return n(a, "Reset axes");
      }, attr: "zoom", val: "reset", icon: x.home, click: t }, s.hoverClosestCartesian = { name: "hoverClosestCartesian", _cat: "hoverclosest", title: function(a) {
        return n(a, "Show closest data on hover");
      }, attr: "hovermode", val: "closest", icon: x.tooltip_basic, gravity: "ne", click: t }, s.hoverCompareCartesian = { name: "hoverCompareCartesian", _cat: "hoverCompare", title: function(a) {
        return n(a, "Compare data on hover");
      }, attr: "hovermode", val: function(a) {
        return a._fullLayout._isHoriz ? "y" : "x";
      }, icon: x.tooltip_compare, gravity: "ne", click: t }, s.zoom3d = { name: "zoom3d", _cat: "zoom", title: function(a) {
        return n(a, "Zoom");
      }, attr: "scene.dragmode", val: "zoom", icon: x.zoombox, click: d }, s.pan3d = { name: "pan3d", _cat: "pan", title: function(a) {
        return n(a, "Pan");
      }, attr: "scene.dragmode", val: "pan", icon: x.pan, click: d }, s.orbitRotation = { name: "orbitRotation", title: function(a) {
        return n(a, "Orbital rotation");
      }, attr: "scene.dragmode", val: "orbit", icon: x["3d_rotate"], click: d }, s.tableRotation = { name: "tableRotation", title: function(a) {
        return n(a, "Turntable rotation");
      }, attr: "scene.dragmode", val: "turntable", icon: x["z-axis"], click: d }, s.resetCameraDefault3d = { name: "resetCameraDefault3d", _cat: "resetCameraDefault", title: function(a) {
        return n(a, "Reset camera to default");
      }, attr: "resetDefault", icon: x.home, click: u }, s.resetCameraLastSave3d = { name: "resetCameraLastSave3d", _cat: "resetCameraLastSave", title: function(a) {
        return n(a, "Reset camera to last save");
      }, attr: "resetLastSave", icon: x.movie, click: u }, s.hoverClosest3d = { name: "hoverClosest3d", _cat: "hoverclosest", title: function(a) {
        return n(a, "Toggle show closest data on hover");
      }, attr: "hovermode", val: null, toggle: !0, icon: x.tooltip_basic, gravity: "ne", click: function(a, y) {
        var f = o(a, y);
        m.call("_guiRelayout", a, f);
      } }, s.zoomInGeo = { name: "zoomInGeo", _cat: "zoomin", title: function(a) {
        return n(a, "Zoom in");
      }, attr: "zoom", val: "in", icon: x.zoom_plus, click: h }, s.zoomOutGeo = { name: "zoomOutGeo", _cat: "zoomout", title: function(a) {
        return n(a, "Zoom out");
      }, attr: "zoom", val: "out", icon: x.zoom_minus, click: h }, s.resetGeo = { name: "resetGeo", _cat: "reset", title: function(a) {
        return n(a, "Reset");
      }, attr: "reset", val: null, icon: x.autoscale, click: h }, s.hoverClosestGeo = { name: "hoverClosestGeo", _cat: "hoverclosest", title: function(a) {
        return n(a, "Toggle show closest data on hover");
      }, attr: "hovermode", val: null, toggle: !0, icon: x.tooltip_basic, gravity: "ne", click: i }, s.hoverClosestGl2d = { name: "hoverClosestGl2d", _cat: "hoverclosest", title: function(a) {
        return n(a, "Toggle show closest data on hover");
      }, attr: "hovermode", val: null, toggle: !0, icon: x.tooltip_basic, gravity: "ne", click: i }, s.hoverClosestPie = { name: "hoverClosestPie", _cat: "hoverclosest", title: function(a) {
        return n(a, "Toggle show closest data on hover");
      }, attr: "hovermode", val: "closest", icon: x.tooltip_basic, gravity: "ne", click: i }, s.resetViewSankey = { name: "resetSankeyGroup", title: function(a) {
        return n(a, "Reset view");
      }, icon: x.home, click: function(a) {
        for (var y = { "node.groups": [], "node.x": [], "node.y": [] }, f = 0; f < a._fullData.length; f++) {
          var _ = a._fullData[f]._viewInitial;
          y["node.groups"].push(_.node.groups.slice()), y["node.x"].push(_.node.x.slice()), y["node.y"].push(_.node.y.slice());
        }
        m.call("restyle", a, y);
      } }, s.toggleHover = { name: "toggleHover", title: function(a) {
        return n(a, "Toggle show closest data on hover");
      }, attr: "hovermode", val: null, toggle: !0, icon: x.tooltip_basic, gravity: "ne", click: function(a, y) {
        var f = o(a, y);
        f.hovermode = l(a), m.call("_guiRelayout", a, f);
      } }, s.resetViews = { name: "resetViews", title: function(a) {
        return n(a, "Reset views");
      }, icon: x.home, click: function(a, y) {
        var f = y.currentTarget;
        f.setAttribute("data-attr", "zoom"), f.setAttribute("data-val", "reset"), t(a, y), f.setAttribute("data-attr", "resetLastSave"), u(a, y), c(a, "geo"), c(a, "mapbox");
      } }, s.toggleSpikelines = { name: "toggleSpikelines", title: function(a) {
        return n(a, "Toggle Spike Lines");
      }, icon: x.spikeline, attr: "_cartesianSpikesEnabled", val: "on", click: function(a) {
        var y = a._fullLayout, f = y._cartesianSpikesEnabled;
        y._cartesianSpikesEnabled = f === "on" ? "off" : "on", m.call("_guiRelayout", a, function(_) {
          for (var b = _._fullLayout._cartesianSpikesEnabled === "on", w = k.list(_, null, !0), T = {}, L = 0; L < w.length; L++) {
            var A = w[L];
            T[A._name + ".showspikes"] = !!b || A._showSpikeInitial;
          }
          return T;
        }(a));
      } }, s.resetViewMapbox = { name: "resetViewMapbox", _cat: "resetView", title: function(a) {
        return n(a, "Reset view");
      }, attr: "reset", icon: x.home, click: function(a) {
        c(a, "mapbox");
      } }, s.zoomInMapbox = { name: "zoomInMapbox", _cat: "zoomin", title: function(a) {
        return n(a, "Zoom in");
      }, attr: "zoom", val: "in", icon: x.zoom_plus, click: p }, s.zoomOutMapbox = { name: "zoomOutMapbox", _cat: "zoomout", title: function(a) {
        return n(a, "Zoom out");
      }, attr: "zoom", val: "out", icon: x.zoom_minus, click: p };
    }, { "../../fonts/ploticon": 494, "../../lib": 515, "../../plots/cartesian/axis_ids": 570, "../../plots/plots": 628, "../../registry": 647, "../shapes/draw": 462 }], 428: [function(v, Q, $) {
      var m = v("./buttons"), g = Object.keys(m), k = ["drawline", "drawopenpath", "drawclosedpath", "drawcircle", "drawrect", "eraseshape"], x = ["v1hovermode", "hoverclosest", "hovercompare", "togglehover", "togglespikelines"].concat(k), e = [];
      g.forEach(function(r) {
        (function(n) {
          if (x.indexOf(n._cat || n.name) === -1) {
            var s = n.name, t = (n._cat || n.name).toLowerCase();
            e.indexOf(s) === -1 && e.push(s), e.indexOf(t) === -1 && e.push(t);
          }
        })(m[r]);
      }), e.sort(), Q.exports = { DRAW_MODES: k, backButtons: x, foreButtons: e };
    }, { "./buttons": 427 }], 429: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../color"), k = v("../../plot_api/plot_template"), x = v("./attributes");
      Q.exports = function(e, r) {
        var n = e.modebar || {}, s = k.newContainer(r, "modebar");
        function t(u, o) {
          return m.coerce(n, s, x, u, o);
        }
        t("orientation"), t("bgcolor", g.addOpacity(r.paper_bgcolor, 0.5));
        var d = g.contrast(g.rgb(r.modebar.bgcolor));
        t("color", g.addOpacity(d, 0.3)), t("activecolor", g.addOpacity(d, 0.7)), t("uirevision", r.uirevision), t("add"), t("remove");
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../color": 367, "./attributes": 426 }], 430: [function(v, Q, $) {
      Q.exports = { moduleType: "component", name: "modebar", layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), manage: v("./manage") };
    }, { "./attributes": 426, "./defaults": 429, "./manage": 431 }], 431: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axis_ids"), g = v("../../traces/scatter/subtypes"), k = v("../../registry"), x = v("../fx/helpers").isUnifiedHover, e = v("./modebar"), r = v("./buttons"), n = v("./constants").DRAW_MODES, s = v("../../lib").extendDeep;
      Q.exports = function(t) {
        var d = t._fullLayout, u = t._context, o = d._modeBar;
        if (u.displayModeBar || u.watermark) {
          if (!Array.isArray(u.modeBarButtonsToRemove))
            throw new Error(["*modeBarButtonsToRemove* configuration options", "must be an array."].join(" "));
          if (!Array.isArray(u.modeBarButtonsToAdd))
            throw new Error(["*modeBarButtonsToAdd* configuration options", "must be an array."].join(" "));
          var h, l = u.modeBarButtons;
          h = Array.isArray(l) && l.length ? function(i) {
            for (var p = s([], i), c = 0; c < p.length; c++)
              for (var a = p[c], y = 0; y < a.length; y++) {
                var f = a[y];
                if (typeof f == "string") {
                  if (r[f] === void 0)
                    throw new Error(["*modeBarButtons* configuration options", "invalid button name"].join(" "));
                  p[c][y] = r[f];
                }
              }
            return p;
          }(l) : !u.displayModeBar && u.watermark ? [] : function(i) {
            var p = i._fullLayout, c = i._fullData, a = i._context;
            function y(le, oe) {
              if (typeof oe == "string") {
                if (oe.toLowerCase() === le.toLowerCase())
                  return !0;
              } else {
                var ve = oe.name, ue = oe._cat || oe.name;
                if (ve === le || ue === le.toLowerCase())
                  return !0;
              }
              return !1;
            }
            var f = p.modebar.add;
            typeof f == "string" && (f = [f]);
            var _ = p.modebar.remove;
            typeof _ == "string" && (_ = [_]);
            var b = a.modeBarButtonsToAdd.concat(f.filter(function(le) {
              for (var oe = 0; oe < a.modeBarButtonsToRemove.length; oe++)
                if (y(le, a.modeBarButtonsToRemove[oe]))
                  return !1;
              return !0;
            })), w = a.modeBarButtonsToRemove.concat(_.filter(function(le) {
              for (var oe = 0; oe < a.modeBarButtonsToAdd.length; oe++)
                if (y(le, a.modeBarButtonsToAdd[oe]))
                  return !1;
              return !0;
            })), T = p._has("cartesian"), L = p._has("gl3d"), A = p._has("geo"), I = p._has("pie"), P = p._has("funnelarea"), S = p._has("gl2d"), E = p._has("ternary"), R = p._has("mapbox"), z = p._has("polar"), j = p._has("smith"), H = p._has("sankey"), Y = function(le) {
              for (var oe = m.list({ _fullLayout: le }, null, !0), ve = 0; ve < oe.length; ve++)
                if (!oe[ve].fixedrange)
                  return !1;
              return !0;
            }(p), J = x(p.hovermode), W = [];
            function Z(le) {
              if (le.length) {
                for (var oe = [], ve = 0; ve < le.length; ve++) {
                  for (var ue = le[ve], ye = r[ue], Ae = ye.name.toLowerCase(), pe = (ye._cat || ye.name).toLowerCase(), ge = !1, we = 0; we < w.length; we++) {
                    var se = w[we].toLowerCase();
                    if (se === Ae || se === pe) {
                      ge = !0;
                      break;
                    }
                  }
                  ge || oe.push(r[ue]);
                }
                W.push(oe);
              }
            }
            var re = ["toImage"];
            a.showEditInChartStudio ? re.push("editInChartStudio") : a.showSendToCloud && re.push("sendDataToCloud"), Z(re);
            var V = [], B = [], U = [], ee = [];
            (T || S || I || P || E) + A + L + R + z + j > 1 ? (B = ["toggleHover"], U = ["resetViews"]) : A ? (V = ["zoomInGeo", "zoomOutGeo"], B = ["hoverClosestGeo"], U = ["resetGeo"]) : L ? (B = ["hoverClosest3d"], U = ["resetCameraDefault3d", "resetCameraLastSave3d"]) : R ? (V = ["zoomInMapbox", "zoomOutMapbox"], B = ["toggleHover"], U = ["resetViewMapbox"]) : S ? B = ["hoverClosestGl2d"] : I ? B = ["hoverClosestPie"] : H ? (B = ["hoverClosestCartesian", "hoverCompareCartesian"], U = ["resetViewSankey"]) : B = ["toggleHover"], T && (B = ["toggleSpikelines", "hoverClosestCartesian", "hoverCompareCartesian"]), (function(le) {
              for (var oe = 0; oe < le.length; oe++)
                if (!k.traceIs(le[oe], "noHover"))
                  return !1;
              return !0;
            }(c) || J) && (B = []), !T && !S || Y || (V = ["zoomIn2d", "zoomOut2d", "autoScale2d"], U[0] !== "resetViews" && (U = ["resetScale2d"])), L ? ee = ["zoom3d", "pan3d", "orbitRotation", "tableRotation"] : (T || S) && !Y || E ? ee = ["zoom2d", "pan2d"] : R || A ? ee = ["pan2d"] : z && (ee = ["zoom2d"]), function(le) {
              for (var oe = !1, ve = 0; ve < le.length && !oe; ve++) {
                var ue = le[ve];
                ue._module && ue._module.selectPoints && (k.traceIs(ue, "scatter-like") ? (g.hasMarkers(ue) || g.hasText(ue)) && (oe = !0) : k.traceIs(ue, "box-violin") && ue.boxpoints !== "all" && ue.points !== "all" || (oe = !0));
              }
              return oe;
            }(c) && ee.push("select2d", "lasso2d");
            var N = [], K = function(le) {
              N.indexOf(le) === -1 && B.indexOf(le) !== -1 && N.push(le);
            };
            if (Array.isArray(b)) {
              for (var X = [], te = 0; te < b.length; te++) {
                var ie = b[te];
                typeof ie == "string" ? (ie = ie.toLowerCase(), n.indexOf(ie) !== -1 ? (p._has("mapbox") || p._has("cartesian")) && ee.push(ie) : ie === "togglespikelines" ? K("toggleSpikelines") : ie === "togglehover" ? K("toggleHover") : ie === "hovercompare" ? K("hoverCompareCartesian") : ie === "hoverclosest" ? (K("hoverClosestCartesian"), K("hoverClosestGeo"), K("hoverClosest3d"), K("hoverClosestGl2d"), K("hoverClosestPie")) : ie === "v1hovermode" && (K("toggleHover"), K("hoverClosestCartesian"), K("hoverCompareCartesian"), K("hoverClosestGeo"), K("hoverClosest3d"), K("hoverClosestGl2d"), K("hoverClosestPie"))) : X.push(ie);
              }
              b = X;
            }
            return Z(ee), Z(V.concat(U)), Z(N), function(le, oe) {
              if (oe.length)
                if (Array.isArray(oe[0]))
                  for (var ve = 0; ve < oe.length; ve++)
                    le.push(oe[ve]);
                else
                  le.push(oe);
              return le;
            }(W, b);
          }(t), o ? o.update(t, h) : d._modeBar = e(t, h);
        } else
          o && (o.destroy(), delete d._modeBar);
      };
    }, { "../../lib": 515, "../../plots/cartesian/axis_ids": 570, "../../registry": 647, "../../traces/scatter/subtypes": 961, "../fx/helpers": 403, "./buttons": 427, "./constants": 428, "./modebar": 432 }], 432: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../../lib"), x = v("../../fonts/ploticon"), e = v("../../version").version, r = new DOMParser();
      function n(t) {
        this.container = t.container, this.element = document.createElement("div"), this.update(t.graphInfo, t.buttons), this.container.appendChild(this.element);
      }
      var s = n.prototype;
      s.update = function(t, d) {
        this.graphInfo = t;
        var u = this.graphInfo._context, o = this.graphInfo._fullLayout, h = "modebar-" + o._uid;
        this.element.setAttribute("id", h), this._uid = h, this.element.className = "modebar", u.displayModeBar === "hover" && (this.element.className += " modebar--hover ease-bg"), o.modebar.orientation === "v" && (this.element.className += " vertical", d = d.reverse());
        var l = o.modebar, i = u.displayModeBar === "hover" ? ".js-plotly-plot .plotly:hover " : "";
        k.deleteRelatedStyleRule(h), k.addRelatedStyleRule(h, i + "#" + h + " .modebar-group", "background-color: " + l.bgcolor), k.addRelatedStyleRule(h, "#" + h + " .modebar-btn .icon path", "fill: " + l.color), k.addRelatedStyleRule(h, "#" + h + " .modebar-btn:hover .icon path", "fill: " + l.activecolor), k.addRelatedStyleRule(h, "#" + h + " .modebar-btn.active .icon path", "fill: " + l.activecolor);
        var p = !this.hasButtons(d), c = this.hasLogo !== u.displaylogo, a = this.locale !== u.locale;
        if (this.locale = u.locale, (p || c || a) && (this.removeAllButtons(), this.updateButtons(d), u.watermark || u.displaylogo)) {
          var y = this.getLogo();
          u.watermark && (y.className = y.className + " watermark"), o.modebar.orientation === "v" ? this.element.insertBefore(y, this.element.childNodes[0]) : this.element.appendChild(y), this.hasLogo = !0;
        }
        this.updateActiveButton();
      }, s.updateButtons = function(t) {
        var d = this;
        this.buttons = t, this.buttonElements = [], this.buttonsNames = [], this.buttons.forEach(function(u) {
          var o = d.createGroup();
          u.forEach(function(h) {
            var l = h.name;
            if (!l)
              throw new Error("must provide button 'name' in button config");
            if (d.buttonsNames.indexOf(l) !== -1)
              throw new Error("button name '" + l + "' is taken");
            d.buttonsNames.push(l);
            var i = d.createButton(h);
            d.buttonElements.push(i), o.appendChild(i);
          }), d.element.appendChild(o);
        });
      }, s.createGroup = function() {
        var t = document.createElement("div");
        return t.className = "modebar-group", t;
      }, s.createButton = function(t) {
        var d = this, u = document.createElement("a");
        u.setAttribute("rel", "tooltip"), u.className = "modebar-btn";
        var o = t.title;
        o === void 0 ? o = t.name : typeof o == "function" && (o = o(this.graphInfo)), (o || o === 0) && u.setAttribute("data-title", o), t.attr !== void 0 && u.setAttribute("data-attr", t.attr);
        var h = t.val;
        if (h !== void 0 && (typeof h == "function" && (h = h(this.graphInfo)), u.setAttribute("data-val", h)), typeof t.click != "function")
          throw new Error("must provide button 'click' function in button config");
        u.addEventListener("click", function(i) {
          t.click(d.graphInfo, i), d.updateActiveButton(i.currentTarget);
        }), u.setAttribute("data-toggle", t.toggle || !1), t.toggle && m.select(u).classed("active", !0);
        var l = t.icon;
        return typeof l == "function" ? u.appendChild(l()) : u.appendChild(this.createIcon(l || x.question)), u.setAttribute("data-gravity", t.gravity || "n"), u;
      }, s.createIcon = function(t) {
        var d, u = g(t.height) ? Number(t.height) : t.ascent - t.descent, o = "http://www.w3.org/2000/svg";
        if (t.path) {
          (d = document.createElementNS(o, "svg")).setAttribute("viewBox", [0, 0, t.width, u].join(" ")), d.setAttribute("class", "icon");
          var h = document.createElementNS(o, "path");
          h.setAttribute("d", t.path), t.transform ? h.setAttribute("transform", t.transform) : t.ascent !== void 0 && h.setAttribute("transform", "matrix(1 0 0 -1 0 " + t.ascent + ")"), d.appendChild(h);
        }
        return t.svg && (d = r.parseFromString(t.svg, "application/xml").childNodes[0]), d.setAttribute("height", "1em"), d.setAttribute("width", "1em"), d;
      }, s.updateActiveButton = function(t) {
        var d = this.graphInfo._fullLayout, u = t !== void 0 ? t.getAttribute("data-attr") : null;
        this.buttonElements.forEach(function(o) {
          var h = o.getAttribute("data-val") || !0, l = o.getAttribute("data-attr"), i = o.getAttribute("data-toggle") === "true", p = m.select(o);
          if (i)
            l === u && p.classed("active", !p.classed("active"));
          else {
            var c = l === null ? l : k.nestedProperty(d, l).get();
            p.classed("active", c === h);
          }
        });
      }, s.hasButtons = function(t) {
        var d = this.buttons;
        if (!d || t.length !== d.length)
          return !1;
        for (var u = 0; u < t.length; ++u) {
          if (t[u].length !== d[u].length)
            return !1;
          for (var o = 0; o < t[u].length; o++)
            if (t[u][o].name !== d[u][o].name)
              return !1;
        }
        return !0;
      }, s.getLogo = function() {
        var t = this.createGroup(), d = document.createElement("a");
        return d.href = "https://plotly.com/", d.target = "_blank", d.setAttribute("data-title", k._(this.graphInfo, "Produced with Plotly.js") + " (v" + e + ")"), d.className = "modebar-btn plotlyjsicon modebar-btn--logo", d.appendChild(this.createIcon(x.newplotlylogo)), t.appendChild(d), t;
      }, s.removeAllButtons = function() {
        for (; this.element.firstChild; )
          this.element.removeChild(this.element.firstChild);
        this.hasLogo = !1;
      }, s.destroy = function() {
        k.removeElement(this.container.querySelector(".modebar")), k.deleteRelatedStyleRule(this._uid);
      }, Q.exports = function(t, d) {
        var u = t._fullLayout, o = new n({ graphInfo: t, container: u._modebardiv.node(), buttons: d });
        return u._privateplot && m.select(o.element).append("span").classed("badge-private float--left", !0).text("PRIVATE"), o;
      };
    }, { "../../fonts/ploticon": 494, "../../lib": 515, "../../version": 1132, "@plotly/d3": 58, "fast-isnumeric": 190 }], 433: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("../color/attributes"), k = (0, v("../../plot_api/plot_template").templatedArray)("button", { visible: { valType: "boolean", dflt: !0, editType: "plot" }, step: { valType: "enumerated", values: ["month", "year", "day", "hour", "minute", "second", "all"], dflt: "month", editType: "plot" }, stepmode: { valType: "enumerated", values: ["backward", "todate"], dflt: "backward", editType: "plot" }, count: { valType: "number", min: 0, dflt: 1, editType: "plot" }, label: { valType: "string", editType: "plot" }, editType: "plot" });
      Q.exports = { visible: { valType: "boolean", editType: "plot" }, buttons: k, x: { valType: "number", min: -2, max: 3, editType: "plot" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "left", editType: "plot" }, y: { valType: "number", min: -2, max: 3, editType: "plot" }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "bottom", editType: "plot" }, font: m({ editType: "plot" }), bgcolor: { valType: "color", dflt: g.lightLine, editType: "plot" }, activecolor: { valType: "color", editType: "plot" }, bordercolor: { valType: "color", dflt: g.defaultLine, editType: "plot" }, borderwidth: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "plot" };
    }, { "../../plot_api/plot_template": 555, "../../plots/font_attributes": 594, "../color/attributes": 366 }], 434: [function(v, Q, $) {
      Q.exports = { yPad: 0.02, minButtonWidth: 30, rx: 3, ry: 3, lightAmount: 25, darkAmount: 10 };
    }, {}], 435: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../color"), k = v("../../plot_api/plot_template"), x = v("../../plots/array_container_defaults"), e = v("./attributes"), r = v("./constants");
      function n(s, t, d, u) {
        var o = u.calendar;
        function h(i, p) {
          return m.coerce(s, t, e.buttons, i, p);
        }
        if (h("visible")) {
          var l = h("step");
          l !== "all" && (!o || o === "gregorian" || l !== "month" && l !== "year" ? h("stepmode") : t.stepmode = "backward", h("count")), h("label");
        }
      }
      Q.exports = function(s, t, d, u, o) {
        var h = s.rangeselector || {}, l = k.newContainer(t, "rangeselector");
        function i(a, y) {
          return m.coerce(h, l, e, a, y);
        }
        if (i("visible", x(h, l, { name: "buttons", handleItemDefaults: n, calendar: o }).length > 0)) {
          var p = function(a, y, f) {
            for (var _ = f.filter(function(L) {
              return y[L].anchor === a._id;
            }), b = 0, w = 0; w < _.length; w++) {
              var T = y[_[w]].domain;
              T && (b = Math.max(T[1], b));
            }
            return [a.domain[0], b + r.yPad];
          }(t, d, u);
          i("x", p[0]), i("y", p[1]), m.noneOrAll(s, t, ["x", "y"]), i("xanchor"), i("yanchor"), m.coerceFont(i, "font", d.font);
          var c = i("bgcolor");
          i("activecolor", g.contrast(c, r.lightAmount, r.darkAmount)), i("bordercolor"), i("borderwidth");
        }
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../plots/array_container_defaults": 561, "../color": 367, "./attributes": 433, "./constants": 434 }], 436: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../plots/plots"), x = v("../color"), e = v("../drawing"), r = v("../../lib"), n = r.strTranslate, s = v("../../lib/svg_text_utils"), t = v("../../plots/cartesian/axis_ids"), d = v("../../constants/alignment"), u = d.LINE_SPACING, o = d.FROM_TL, h = d.FROM_BR, l = v("./constants"), i = v("./get_update_object");
      function p(y) {
        return y._id;
      }
      function c(y, f, _) {
        var b = r.ensureSingle(y, "rect", "selector-rect", function(w) {
          w.attr("shape-rendering", "crispEdges");
        });
        b.attr({ rx: l.rx, ry: l.ry }), b.call(x.stroke, f.bordercolor).call(x.fill, function(w, T) {
          return T._isActive || T._isHovered ? w.activecolor : w.bgcolor;
        }(f, _)).style("stroke-width", f.borderwidth + "px");
      }
      function a(y, f, _, b) {
        r.ensureSingle(y, "text", "selector-text", function(w) {
          w.attr("text-anchor", "middle");
        }).call(e.font, f.font).text(function(w, T) {
          return w.label ? T ? r.templateString(w.label, T) : w.label : w.step === "all" ? "all" : w.count + w.step.charAt(0);
        }(_, b._fullLayout._meta)).call(function(w) {
          s.convertToTspans(w, b);
        });
      }
      Q.exports = function(y) {
        var f = y._fullLayout._infolayer.selectAll(".rangeselector").data(function(_) {
          for (var b = t.list(_, "x", !0), w = [], T = 0; T < b.length; T++) {
            var L = b[T];
            L.rangeselector && L.rangeselector.visible && w.push(L);
          }
          return w;
        }(y), p);
        f.enter().append("g").classed("rangeselector", !0), f.exit().remove(), f.style({ cursor: "pointer", "pointer-events": "all" }), f.each(function(_) {
          var b = m.select(this), w = _, T = w.rangeselector, L = b.selectAll("g.button").data(r.filterVisible(T.buttons));
          L.enter().append("g").classed("button", !0), L.exit().remove(), L.each(function(A) {
            var I = m.select(this), P = i(w, A);
            A._isActive = function(S, E, R) {
              if (E.step === "all")
                return S.autorange === !0;
              var z = Object.keys(R);
              return S.range[0] === R[z[0]] && S.range[1] === R[z[1]];
            }(w, A, P), I.call(c, T, A), I.call(a, T, A, y), I.on("click", function() {
              y._dragged || g.call("_guiRelayout", y, P);
            }), I.on("mouseover", function() {
              A._isHovered = !0, I.call(c, T, A);
            }), I.on("mouseout", function() {
              A._isHovered = !1, I.call(c, T, A);
            });
          }), function(A, I, P, S, E) {
            var R = 0, z = 0, j = P.borderwidth;
            I.each(function() {
              var re = m.select(this).select(".selector-text"), V = P.font.size * u, B = Math.max(V * s.lineCount(re), 16) + 3;
              z = Math.max(z, B);
            }), I.each(function() {
              var re = m.select(this), V = re.select(".selector-rect"), B = re.select(".selector-text"), U = B.node() && e.bBox(B.node()).width, ee = P.font.size * u, N = s.lineCount(B), K = Math.max(U + 10, l.minButtonWidth);
              re.attr("transform", n(j + R, j)), V.attr({ x: 0, y: 0, width: K, height: z }), s.positionText(B, K / 2, z / 2 - (N - 1) * ee / 2 + 3), R += K + 5;
            });
            var H = A._fullLayout._size, Y = H.l + H.w * P.x, J = H.t + H.h * (1 - P.y), W = "left";
            r.isRightAnchor(P) && (Y -= R, W = "right"), r.isCenterAnchor(P) && (Y -= R / 2, W = "center");
            var Z = "top";
            r.isBottomAnchor(P) && (J -= z, Z = "bottom"), r.isMiddleAnchor(P) && (J -= z / 2, Z = "middle"), R = Math.ceil(R), z = Math.ceil(z), Y = Math.round(Y), J = Math.round(J), k.autoMargin(A, S + "-range-selector", { x: P.x, y: P.y, l: R * o[W], r: R * h[W], b: z * h[Z], t: z * o[Z] }), E.attr("transform", n(Y, J));
          }(y, L, T, w._name, b);
        });
      };
    }, { "../../constants/alignment": 483, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axis_ids": 570, "../../plots/plots": 628, "../../registry": 647, "../color": 367, "../drawing": 389, "./constants": 434, "./get_update_object": 437, "@plotly/d3": 58 }], 437: [function(v, Q, $) {
      var m = v("d3-time"), g = v("../../lib").titleCase;
      Q.exports = function(k, x) {
        var e = k._name, r = {};
        if (x.step === "all")
          r[e + ".autorange"] = !0;
        else {
          var n = function(s, t) {
            var d, u = s.range, o = new Date(s.r2l(u[1])), h = t.step, l = m["utc" + g(h)], i = t.count;
            switch (t.stepmode) {
              case "backward":
                d = s.l2r(+l.offset(o, -i));
                break;
              case "todate":
                var p = l.offset(o, -i);
                d = s.l2r(+l.ceil(p));
            }
            var c = u[1];
            return [d, c];
          }(k, x);
          r[e + ".range[0]"] = n[0], r[e + ".range[1]"] = n[1];
        }
        return r;
      };
    }, { "../../lib": 515, "d3-time": 122 }], 438: [function(v, Q, $) {
      Q.exports = { moduleType: "component", name: "rangeselector", schema: { subplots: { xaxis: { rangeselector: v("./attributes") } } }, layoutAttributes: v("./attributes"), handleDefaults: v("./defaults"), draw: v("./draw") };
    }, { "./attributes": 433, "./defaults": 435, "./draw": 436 }], 439: [function(v, Q, $) {
      var m = v("../color/attributes");
      Q.exports = { bgcolor: { valType: "color", dflt: m.background, editType: "plot" }, bordercolor: { valType: "color", dflt: m.defaultLine, editType: "plot" }, borderwidth: { valType: "integer", dflt: 0, min: 0, editType: "plot" }, autorange: { valType: "boolean", dflt: !0, editType: "calc", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, range: { valType: "info_array", items: [{ valType: "any", editType: "calc", impliedEdits: { "^autorange": !1 } }, { valType: "any", editType: "calc", impliedEdits: { "^autorange": !1 } }], editType: "calc", impliedEdits: { autorange: !1 } }, thickness: { valType: "number", dflt: 0.15, min: 0, max: 1, editType: "plot" }, visible: { valType: "boolean", dflt: !0, editType: "calc" }, editType: "calc" };
    }, { "../color/attributes": 366 }], 440: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axis_ids").list, g = v("../../plots/cartesian/autorange").getAutoRange, k = v("./constants");
      Q.exports = function(x) {
        for (var e = m(x, "x", !0), r = 0; r < e.length; r++) {
          var n = e[r], s = n[k.name];
          s && s.visible && s.autorange && (s._input.autorange = !0, s._input.range = s.range = g(x, n));
        }
      };
    }, { "../../plots/cartesian/autorange": 565, "../../plots/cartesian/axis_ids": 570, "./constants": 441 }], 441: [function(v, Q, $) {
      Q.exports = { name: "rangeslider", containerClassName: "rangeslider-container", bgClassName: "rangeslider-bg", rangePlotClassName: "rangeslider-rangeplot", maskMinClassName: "rangeslider-mask-min", maskMaxClassName: "rangeslider-mask-max", slideBoxClassName: "rangeslider-slidebox", grabberMinClassName: "rangeslider-grabber-min", grabAreaMinClassName: "rangeslider-grabarea-min", handleMinClassName: "rangeslider-handle-min", grabberMaxClassName: "rangeslider-grabber-max", grabAreaMaxClassName: "rangeslider-grabarea-max", handleMaxClassName: "rangeslider-handle-max", maskMinOppAxisClassName: "rangeslider-mask-min-opp-axis", maskMaxOppAxisClassName: "rangeslider-mask-max-opp-axis", maskColor: "rgba(0,0,0,0.4)", maskOppAxisColor: "rgba(0,0,0,0.2)", slideBoxFill: "transparent", slideBoxCursor: "ew-resize", grabAreaFill: "transparent", grabAreaCursor: "col-resize", grabAreaWidth: 10, handleWidth: 4, handleRadius: 1, handleStrokeWidth: 1, extraPad: 15 };
    }, {}], 442: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plot_api/plot_template"), k = v("../../plots/cartesian/axis_ids"), x = v("./attributes"), e = v("./oppaxis_attributes");
      Q.exports = function(r, n, s) {
        var t = r[s], d = n[s];
        if (t.rangeslider || n._requestRangeslider[d._id]) {
          m.isPlainObject(t.rangeslider) || (t.rangeslider = {});
          var u, o, h = t.rangeslider, l = g.newContainer(d, "rangeslider");
          if (b("visible")) {
            b("bgcolor", n.plot_bgcolor), b("bordercolor"), b("borderwidth"), b("thickness"), b("autorange", !d.isValidRange(h.range)), b("range");
            var i = n._subplots;
            if (i)
              for (var p = i.cartesian.filter(function(T) {
                return T.substr(0, T.indexOf("y")) === k.name2id(s);
              }).map(function(T) {
                return T.substr(T.indexOf("y"), T.length);
              }), c = m.simpleMap(p, k.id2name), a = 0; a < c.length; a++) {
                var y = c[a];
                u = h[y] || {}, o = g.newContainer(l, y, "yaxis");
                var f, _ = n[y];
                u.range && _.isValidRange(u.range) && (f = "fixed"), w("rangemode", f) !== "match" && w("range", _.range.slice());
              }
            l._input = h;
          }
        }
        function b(T, L) {
          return m.coerce(h, l, x, T, L);
        }
        function w(T, L) {
          return m.coerce(u, o, e, T, L);
        }
      };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../plots/cartesian/axis_ids": 570, "./attributes": 439, "./oppaxis_attributes": 446 }], 443: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../plots/plots"), x = v("../../lib"), e = x.strTranslate, r = v("../drawing"), n = v("../color"), s = v("../titles"), t = v("../../plots/cartesian"), d = v("../../plots/cartesian/axis_ids"), u = v("../dragelement"), o = v("../../lib/setcursor"), h = v("./constants");
      function l(f, _, b, w) {
        var T = x.ensureSingle(f, "rect", h.bgClassName, function(P) {
          P.attr({ x: 0, y: 0, "shape-rendering": "crispEdges" });
        }), L = w.borderwidth % 2 == 0 ? w.borderwidth : w.borderwidth - 1, A = -w._offsetShift, I = r.crispRound(_, w.borderwidth);
        T.attr({ width: w._width + L, height: w._height + L, transform: e(A, A), "stroke-width": I }).call(n.stroke, w.bordercolor).call(n.fill, w.bgcolor);
      }
      function i(f, _, b, w) {
        var T = _._fullLayout;
        x.ensureSingleById(T._topdefs, "clipPath", w._clipId, function(L) {
          L.append("rect").attr({ x: 0, y: 0 });
        }).select("rect").attr({ width: w._width, height: w._height });
      }
      function p(f, _, b, w) {
        var T, L = _.calcdata, A = f.selectAll("g." + h.rangePlotClassName).data(b._subplotsWith, x.identity);
        A.enter().append("g").attr("class", function(I) {
          return h.rangePlotClassName + " " + I;
        }).call(r.setClipUrl, w._clipId, _), A.order(), A.exit().remove(), A.each(function(I, P) {
          var S = m.select(this), E = P === 0, R = d.getFromId(_, I, "y"), z = R._name, j = w[z], H = { data: [], layout: { xaxis: { type: b.type, domain: [0, 1], range: w.range.slice(), calendar: b.calendar }, width: w._width, height: w._height, margin: { t: 0, b: 0, l: 0, r: 0 } }, _context: _._context };
          b.rangebreaks && (H.layout.xaxis.rangebreaks = b.rangebreaks), H.layout[z] = { type: R.type, domain: [0, 1], range: j.rangemode !== "match" ? j.range.slice() : R.range.slice(), calendar: R.calendar }, R.rangebreaks && (H.layout[z].rangebreaks = R.rangebreaks), k.supplyDefaults(H);
          var Y = H._fullLayout.xaxis, J = H._fullLayout[z];
          Y.clearCalc(), Y.setScale(), J.clearCalc(), J.setScale();
          var W = { id: I, plotgroup: S, xaxis: Y, yaxis: J, isRangePlot: !0 };
          E ? T = W : (W.mainplot = "xy", W.mainplotinfo = T), t.rangePlot(_, W, function(Z, re) {
            for (var V = [], B = 0; B < Z.length; B++) {
              var U = Z[B], ee = U[0].trace;
              ee.xaxis + ee.yaxis === re && V.push(U);
            }
            return V;
          }(L, I));
        });
      }
      function c(f, _, b, w, T) {
        x.ensureSingle(f, "rect", h.maskMinClassName, function(L) {
          L.attr({ x: 0, y: 0, "shape-rendering": "crispEdges" });
        }).attr("height", w._height).call(n.fill, h.maskColor), x.ensureSingle(f, "rect", h.maskMaxClassName, function(L) {
          L.attr({ y: 0, "shape-rendering": "crispEdges" });
        }).attr("height", w._height).call(n.fill, h.maskColor), T.rangemode !== "match" && (x.ensureSingle(f, "rect", h.maskMinOppAxisClassName, function(L) {
          L.attr({ y: 0, "shape-rendering": "crispEdges" });
        }).attr("width", w._width).call(n.fill, h.maskOppAxisColor), x.ensureSingle(f, "rect", h.maskMaxOppAxisClassName, function(L) {
          L.attr({ y: 0, "shape-rendering": "crispEdges" });
        }).attr("width", w._width).style("border-top", h.maskOppBorder).call(n.fill, h.maskOppAxisColor));
      }
      function a(f, _, b, w) {
        _._context.staticPlot || x.ensureSingle(f, "rect", h.slideBoxClassName, function(T) {
          T.attr({ y: 0, cursor: h.slideBoxCursor, "shape-rendering": "crispEdges" });
        }).attr({ height: w._height, fill: h.slideBoxFill });
      }
      function y(f, _, b, w) {
        var T = x.ensureSingle(f, "g", h.grabberMinClassName), L = x.ensureSingle(f, "g", h.grabberMaxClassName), A = { x: 0, width: h.handleWidth, rx: h.handleRadius, fill: n.background, stroke: n.defaultLine, "stroke-width": h.handleStrokeWidth, "shape-rendering": "crispEdges" }, I = { y: Math.round(w._height / 4), height: Math.round(w._height / 2) };
        x.ensureSingle(T, "rect", h.handleMinClassName, function(S) {
          S.attr(A);
        }).attr(I), x.ensureSingle(L, "rect", h.handleMaxClassName, function(S) {
          S.attr(A);
        }).attr(I);
        var P = { width: h.grabAreaWidth, x: 0, y: 0, fill: h.grabAreaFill, cursor: _._context.staticPlot ? void 0 : h.grabAreaCursor };
        x.ensureSingle(T, "rect", h.grabAreaMinClassName, function(S) {
          S.attr(P);
        }).attr("height", w._height), x.ensureSingle(L, "rect", h.grabAreaMaxClassName, function(S) {
          S.attr(P);
        }).attr("height", w._height);
      }
      Q.exports = function(f) {
        for (var _ = f._fullLayout, b = _._rangeSliderData, w = 0; w < b.length; w++) {
          var T = b[w][h.name];
          T._clipId = T._id + "-" + _._uid;
        }
        var L = _._infolayer.selectAll("g." + h.containerClassName).data(b, function(A) {
          return A._name;
        });
        L.exit().each(function(A) {
          var I = A[h.name];
          _._topdefs.select("#" + I._clipId).remove();
        }).remove(), b.length !== 0 && (L.enter().append("g").classed(h.containerClassName, !0).attr("pointer-events", "all"), L.each(function(A) {
          var I = m.select(this), P = A[h.name], S = _[d.id2name(A.anchor)], E = P[d.id2name(A.anchor)];
          if (P.range) {
            var R, z = x.simpleMap(P.range, A.r2l), j = x.simpleMap(A.range, A.r2l);
            R = j[0] < j[1] ? [Math.min(z[0], j[0]), Math.max(z[1], j[1])] : [Math.max(z[0], j[0]), Math.min(z[1], j[1])], P.range = P._input.range = x.simpleMap(R, A.l2r);
          }
          A.cleanRange("rangeslider.range");
          var H = _._size, Y = A.domain;
          P._width = H.w * (Y[1] - Y[0]);
          var J = Math.round(H.l + H.w * Y[0]), W = Math.round(H.t + H.h * (1 - A._counterDomainMin) + (A.side === "bottom" ? A._depth : 0) + P._offsetShift + h.extraPad);
          I.attr("transform", e(J, W)), P._rl = x.simpleMap(P.range, A.r2l);
          var Z = P._rl[0], re = P._rl[1], V = re - Z;
          if (P.p2d = function(le) {
            return le / P._width * V + Z;
          }, P.d2p = function(le) {
            return (le - Z) / V * P._width;
          }, A.rangebreaks) {
            var B = A.locateBreaks(Z, re);
            if (B.length) {
              var U, ee, N = 0;
              for (U = 0; U < B.length; U++)
                N += (ee = B[U]).max - ee.min;
              var K = P._width / (re - Z - N), X = [-K * Z];
              for (U = 0; U < B.length; U++)
                ee = B[U], X.push(X[X.length - 1] - K * (ee.max - ee.min));
              for (P.d2p = function(le) {
                for (var oe = X[0], ve = 0; ve < B.length; ve++) {
                  var ue = B[ve];
                  if (le >= ue.max)
                    oe = X[ve + 1];
                  else if (le < ue.min)
                    break;
                }
                return oe + K * le;
              }, U = 0; U < B.length; U++)
                (ee = B[U]).pmin = P.d2p(ee.min), ee.pmax = P.d2p(ee.max);
              P.p2d = function(le) {
                for (var oe = X[0], ve = 0; ve < B.length; ve++) {
                  var ue = B[ve];
                  if (le >= ue.pmax)
                    oe = X[ve + 1];
                  else if (le < ue.pmin)
                    break;
                }
                return (le - oe) / K;
              };
            }
          }
          if (E.rangemode !== "match") {
            var te = S.r2l(E.range[0]), ie = S.r2l(E.range[1]) - te;
            P.d2pOppAxis = function(le) {
              return (le - te) / ie * P._height;
            };
          }
          I.call(l, f, A, P).call(i, f, A, P).call(p, f, A, P).call(c, f, A, P, E).call(a, f, A, P).call(y, f, A, P), function(le, oe, ve, ue) {
            if (oe._context.staticPlot)
              return;
            var ye = le.select("rect." + h.slideBoxClassName).node(), Ae = le.select("rect." + h.grabAreaMinClassName).node(), pe = le.select("rect." + h.grabAreaMaxClassName).node();
            function ge() {
              var we = m.event, se = we.target, de = we.clientX || we.touches[0].clientX, Te = de - le.node().getBoundingClientRect().left, Ee = ue.d2p(ve._rl[0]), Me = ue.d2p(ve._rl[1]), ze = u.coverSlip();
              function Ie(Ze) {
                var Fe, Pe, De, Ge = +(Ze.clientX || Ze.touches[0].clientX) - de;
                switch (se) {
                  case ye:
                    De = "ew-resize", Fe = Ee + Ge, Pe = Me + Ge;
                    break;
                  case Ae:
                    De = "col-resize", Fe = Ee + Ge, Pe = Me;
                    break;
                  case pe:
                    De = "col-resize", Fe = Ee, Pe = Me + Ge;
                    break;
                  default:
                    De = "ew-resize", Fe = Te, Pe = Te + Ge;
                }
                if (Pe < Fe) {
                  var Qe = Pe;
                  Pe = Fe, Fe = Qe;
                }
                ue._pixelMin = Fe, ue._pixelMax = Pe, o(m.select(ze), De), function(ot, vt, bt, yt) {
                  function tt(Ft) {
                    return bt.l2r(x.constrain(Ft, yt._rl[0], yt._rl[1]));
                  }
                  var Ke = tt(yt.p2d(yt._pixelMin)), mt = tt(yt.p2d(yt._pixelMax));
                  window.requestAnimationFrame(function() {
                    g.call("_guiRelayout", vt, bt._name + ".range", [Ke, mt]);
                  });
                }(0, oe, ve, ue);
              }
              function Oe() {
                ze.removeEventListener("mousemove", Ie), ze.removeEventListener("mouseup", Oe), this.removeEventListener("touchmove", Ie), this.removeEventListener("touchend", Oe), x.removeElement(ze);
              }
              this.addEventListener("touchmove", Ie), this.addEventListener("touchend", Oe), ze.addEventListener("mousemove", Ie), ze.addEventListener("mouseup", Oe);
            }
            le.on("mousedown", ge), le.on("touchstart", ge);
          }(I, f, A, P), function(le, oe, ve, ue, ye, Ae) {
            var pe = h.handleWidth / 2;
            function ge(Oe) {
              return x.constrain(Oe, 0, ue._width);
            }
            function we(Oe) {
              return x.constrain(Oe, 0, ue._height);
            }
            function se(Oe) {
              return x.constrain(Oe, -pe, ue._width + pe);
            }
            var de = ge(ue.d2p(ve._rl[0])), Te = ge(ue.d2p(ve._rl[1]));
            if (le.select("rect." + h.slideBoxClassName).attr("x", de).attr("width", Te - de), le.select("rect." + h.maskMinClassName).attr("width", de), le.select("rect." + h.maskMaxClassName).attr("x", Te).attr("width", ue._width - Te), Ae.rangemode !== "match") {
              var Ee = ue._height - we(ue.d2pOppAxis(ye._rl[1])), Me = ue._height - we(ue.d2pOppAxis(ye._rl[0]));
              le.select("rect." + h.maskMinOppAxisClassName).attr("x", de).attr("height", Ee).attr("width", Te - de), le.select("rect." + h.maskMaxOppAxisClassName).attr("x", de).attr("y", Me).attr("height", ue._height - Me).attr("width", Te - de), le.select("rect." + h.slideBoxClassName).attr("y", Ee).attr("height", Me - Ee);
            }
            var ze = Math.round(se(de - pe)) - 0.5, Ie = Math.round(se(Te - pe)) + 0.5;
            le.select("g." + h.grabberMinClassName).attr("transform", e(ze, 0.5)), le.select("g." + h.grabberMaxClassName).attr("transform", e(Ie, 0.5));
          }(I, 0, A, P, S, E), A.side === "bottom" && s.draw(f, A._id + "title", { propContainer: A, propName: A._name + ".title", placeholder: _._dfltTitle.x, attributes: { x: A._offset + A._length / 2, y: W + P._height + P._offsetShift + 10 + 1.5 * A.title.font.size, "text-anchor": "middle" } });
        }));
      };
    }, { "../../lib": 515, "../../lib/setcursor": 536, "../../plots/cartesian": 578, "../../plots/cartesian/axis_ids": 570, "../../plots/plots": 628, "../../registry": 647, "../color": 367, "../dragelement": 386, "../drawing": 389, "../titles": 476, "./constants": 441, "@plotly/d3": 58 }], 444: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axis_ids"), g = v("../../lib/svg_text_utils"), k = v("./constants"), x = v("../../constants/alignment").LINE_SPACING, e = k.name;
      function r(n) {
        var s = n && n[e];
        return s && s.visible;
      }
      $.isVisible = r, $.makeData = function(n) {
        var s = m.list({ _fullLayout: n }, "x", !0), t = n.margin, d = [];
        if (!n._has("gl2d"))
          for (var u = 0; u < s.length; u++) {
            var o = s[u];
            if (r(o)) {
              d.push(o);
              var h = o[e];
              h._id = e + o._id, h._height = (n.height - t.b - t.t) * h.thickness, h._offsetShift = Math.floor(h.borderwidth / 2);
            }
          }
        n._rangeSliderData = d;
      }, $.autoMarginOpts = function(n, s) {
        var t = n._fullLayout, d = s[e], u = s._id.charAt(0), o = 0, h = 0;
        return s.side === "bottom" && (o = s._depth, s.title.text !== t._dfltTitle[u] && (h = 1.5 * s.title.font.size + 10 + d._offsetShift, h += (s.title.text.match(g.BR_TAG_ALL) || []).length * s.title.font.size * x)), { x: 0, y: s._counterDomainMin, l: 0, r: 0, t: 0, b: d._height + o + Math.max(t.margin.b, h), pad: k.extraPad + 2 * d._offsetShift };
      };
    }, { "../../constants/alignment": 483, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axis_ids": 570, "./constants": 441 }], 445: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("./oppaxis_attributes"), x = v("./helpers");
      Q.exports = { moduleType: "component", name: "rangeslider", schema: { subplots: { xaxis: { rangeslider: m.extendFlat({}, g, { yaxis: k }) } } }, layoutAttributes: v("./attributes"), handleDefaults: v("./defaults"), calcAutorange: v("./calc_autorange"), draw: v("./draw"), isVisible: x.isVisible, makeData: x.makeData, autoMarginOpts: x.autoMarginOpts };
    }, { "../../lib": 515, "./attributes": 439, "./calc_autorange": 440, "./defaults": 442, "./draw": 443, "./helpers": 444, "./oppaxis_attributes": 446 }], 446: [function(v, Q, $) {
      Q.exports = { _isSubplotObj: !0, rangemode: { valType: "enumerated", values: ["auto", "fixed", "match"], dflt: "match", editType: "calc" }, range: { valType: "info_array", items: [{ valType: "any", editType: "plot" }, { valType: "any", editType: "plot" }], editType: "plot" }, editType: "calc" };
    }, {}], 447: [function(v, Q, $) {
      var m = v("../annotations/attributes"), g = v("../../traces/scatter/attributes").line, k = v("../drawing/attributes").dash, x = v("../../lib/extend").extendFlat, e = v("../../plot_api/edit_types").overrideAll, r = v("../../plot_api/plot_template").templatedArray;
      v("../../constants/axis_placeable_objects"), Q.exports = e(r("selection", { type: { valType: "enumerated", values: ["rect", "path"] }, xref: x({}, m.xref, {}), yref: x({}, m.yref, {}), x0: { valType: "any" }, x1: { valType: "any" }, y0: { valType: "any" }, y1: { valType: "any" }, path: { valType: "string", editType: "arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 0.7, editType: "arraydraw" }, line: { color: g.color, width: x({}, g.width, { min: 1, dflt: 1 }), dash: x({}, k, { dflt: "dot" }) } }), "arraydraw", "from-root");
    }, { "../../constants/axis_placeable_objects": 484, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../../traces/scatter/attributes": 936, "../annotations/attributes": 350, "../drawing/attributes": 388 }], 448: [function(v, Q, $) {
      Q.exports = { BENDPX: 1.5, MINSELECT: 12, SELECTDELAY: 100, SELECTID: "-select" };
    }, {}], 449: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../../plots/array_container_defaults"), x = v("./attributes"), e = v("../shapes/helpers");
      function r(n, s, t) {
        function d(I, P) {
          return m.coerce(n, s, x, I, P);
        }
        var u = d("path"), o = d("type", u ? "path" : "rect") !== "path";
        o && delete s.path, d("opacity"), d("line.color"), d("line.width"), d("line.dash");
        for (var h = ["x", "y"], l = 0; l < 2; l++) {
          var i, p, c, a = h[l], y = { _fullLayout: t }, f = g.coerceRef(n, s, y, a);
          if ((i = g.getFromId(y, f))._selectionIndices.push(s._index), c = e.rangeToShapePosition(i), p = e.shapePositionToRange(i), o) {
            var _ = a + "0", b = a + "1", w = n[_], T = n[b];
            n[_] = p(n[_], !0), n[b] = p(n[b], !0), g.coercePosition(s, y, d, f, _), g.coercePosition(s, y, d, f, b);
            var L = s[_], A = s[b];
            L !== void 0 && A !== void 0 && (s[_] = c(L), s[b] = c(A), n[_] = w, n[b] = T);
          }
        }
        o && m.noneOrAll(n, s, ["x0", "x1", "y0", "y1"]);
      }
      Q.exports = function(n, s) {
        k(n, s, { name: "selections", handleItemDefaults: r });
        for (var t = s.selections, d = 0; d < t.length; d++) {
          var u = t[d];
          u && u.path === void 0 && (u.x0 !== void 0 && u.x1 !== void 0 && u.y0 !== void 0 && u.y1 !== void 0 || (s.selections[d] = null));
        }
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/cartesian/axes": 566, "../shapes/helpers": 469, "./attributes": 447 }], 450: [function(v, Q, $) {
      var m = v("../shapes/draw_newshape/helpers").readPaths, g = v("../shapes/display_outlines"), k = v("../shapes/handle_outline").clearOutlineControllers, x = v("../color"), e = v("../drawing"), r = v("../../plot_api/plot_template").arrayEditor, n = v("../shapes/helpers"), s = n.getPathString;
      function t(l) {
        var i = l._fullLayout;
        for (var p in k(l), i._selectionLayer.selectAll("path").remove(), i._plots) {
          var c = i._plots[p].selectionLayer;
          c && c.selectAll("path").remove();
        }
        for (var a = 0; a < i.selections.length; a++)
          u(l, a);
      }
      function d(l) {
        return l._context.editSelection;
      }
      function u(l, i) {
        l._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="' + i + '"]').remove();
        var p = n.makeSelectionsOptionsAndPlotinfo(l, i), c = p.options, a = p.plotinfo;
        c._input && function(y) {
          var f = s(l, c), _ = { "data-index": i, "fill-rule": "evenodd", d: f }, b = c.opacity, w = "rgba(0,0,0,0)", T = c.line.color || x.contrast(l._fullLayout.plot_bgcolor), L = c.line.width, A = c.line.dash;
          L || (L = 5, A = "solid");
          var I = d(l) && l._fullLayout._activeSelectionIndex === i;
          I && (w = l._fullLayout.activeselection.fillcolor, b = l._fullLayout.activeselection.opacity);
          for (var P = [], S = 1; S >= 0; S--) {
            var E = y.append("path").attr(_).style("opacity", S ? 0.1 : b).call(x.stroke, T).call(x.fill, w).call(e.dashLine, S ? "solid" : A, S ? 4 + L : L);
            if (o(E, l, c), I) {
              var R = r(l.layout, "selections", c);
              E.style({ cursor: "move" });
              var z = { element: E.node(), plotinfo: a, gd: l, editHelpers: R, isActiveSelection: !0 }, j = m(f, l);
              g(j, E, z);
            } else
              E.style("pointer-events", S ? "all" : "none");
            P[S] = E;
          }
          var H = P[0];
          P[1].node().addEventListener("click", function() {
            return function(Y, J) {
              if (!!d(Y)) {
                var W = +J.node().getAttribute("data-index");
                if (W >= 0) {
                  if (W === Y._fullLayout._activeSelectionIndex)
                    return void h(Y);
                  Y._fullLayout._activeSelectionIndex = W, Y._fullLayout._deactivateSelection = h, t(Y);
                }
              }
            }(l, H);
          });
        }(l._fullLayout._selectionLayer);
      }
      function o(l, i, p) {
        var c = p.xref + p.yref;
        e.setClipUrl(l, "clip" + i._fullLayout._uid + c, i);
      }
      function h(l) {
        d(l) && l._fullLayout._activeSelectionIndex >= 0 && (k(l), delete l._fullLayout._activeSelectionIndex, t(l));
      }
      Q.exports = { draw: t, drawOne: u, activateLastSelection: function(l) {
        if (!!d(l)) {
          var i = l._fullLayout.selections.length - 1;
          l._fullLayout._activeSelectionIndex = i, l._fullLayout._deactivateSelection = h, t(l);
        }
      } };
    }, { "../../plot_api/plot_template": 555, "../color": 367, "../drawing": 389, "../shapes/display_outlines": 461, "../shapes/draw_newshape/helpers": 466, "../shapes/handle_outline": 468, "../shapes/helpers": 469 }], 451: [function(v, Q, $) {
      var m = v("../../drawing/attributes").dash, g = v("../../../lib/extend").extendFlat;
      Q.exports = { newselection: { mode: { valType: "enumerated", values: ["immediate", "gradual"], dflt: "immediate", editType: "none" }, line: { color: { valType: "color", editType: "none" }, width: { valType: "number", min: 1, dflt: 1, editType: "none" }, dash: g({}, m, { dflt: "dot", editType: "none" }), editType: "none" }, editType: "none" }, activeselection: { fillcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "none" }, opacity: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "none" }, editType: "none" } };
    }, { "../../../lib/extend": 505, "../../drawing/attributes": 388 }], 452: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        k("newselection.mode"), k("newselection.line.width") && (k("newselection.line.color"), k("newselection.line.dash")), k("activeselection.fillcolor"), k("activeselection.opacity");
      };
    }, {}], 453: [function(v, Q, $) {
      var m = v("../../dragelement/helpers").selectMode, g = v("../../shapes/handle_outline").clearOutline, k = v("../../shapes/draw_newshape/helpers"), x = k.readPaths, e = k.writePaths, r = k.fixDatesForPaths;
      Q.exports = function(n, s) {
        if (n.length) {
          var t = n[0][0];
          if (t) {
            var d = t.getAttribute("d"), u = s.gd, o = u._fullLayout.newselection, h = s.plotinfo, l = h.xaxis, i = h.yaxis, p = s.isActiveSelection, c = s.dragmode, a = (u.layout || {}).selections || [];
            if (!m(c) && p !== void 0) {
              var y = u._fullLayout._activeSelectionIndex;
              if (y < a.length)
                switch (u._fullLayout.selections[y].type) {
                  case "rect":
                    c = "select";
                    break;
                  case "path":
                    c = "lasso";
                }
            }
            var f, _ = x(d, u, h, p), b = { xref: l._id, yref: i._id, opacity: o.opacity, line: { color: o.line.color, width: o.line.width, dash: o.line.dash } };
            _.length === 1 && (f = _[0]), f && f.length === 5 && c === "select" ? (b.type = "rect", b.x0 = f[0][1], b.y0 = f[0][2], b.x1 = f[2][1], b.y1 = f[2][2]) : (b.type = "path", l && i && r(_, l, i), b.path = e(_), f = null), g(u);
            for (var w = s.editHelpers, T = (w || {}).modifyItem, L = [], A = 0; A < a.length; A++) {
              var I = u._fullLayout.selections[A];
              if (I) {
                if (L[A] = I._input, p !== void 0 && A === u._fullLayout._activeSelectionIndex) {
                  var P = b;
                  switch (I.type) {
                    case "rect":
                      T("x0", P.x0), T("x1", P.x1), T("y0", P.y0), T("y1", P.y1);
                      break;
                    case "path":
                      T("path", P.path);
                  }
                }
              } else
                L[A] = I;
            }
            return p === void 0 ? (L.push(b), L) : w ? w.getUpdateObj() : {};
          }
        }
      };
    }, { "../../dragelement/helpers": 385, "../../shapes/draw_newshape/helpers": 466, "../../shapes/handle_outline": 468 }], 454: [function(v, Q, $) {
      var m = v("../../lib").strTranslate;
      function g(k, x) {
        switch (k.type) {
          case "log":
            return k.p2d(x);
          case "date":
            return k.p2r(x, 0, k.calendar);
          default:
            return k.p2r(x);
        }
      }
      Q.exports = { p2r: g, r2p: function(k, x) {
        switch (k.type) {
          case "log":
            return k.d2p(x);
          case "date":
            return k.r2p(x, 0, k.calendar);
          default:
            return k.r2p(x);
        }
      }, axValue: function(k) {
        var x = k._id.charAt(0) === "y" ? 1 : 0;
        return function(e) {
          return g(k, e[x]);
        };
      }, getTransform: function(k) {
        return m(k.xaxis._offset, k.yaxis._offset);
      } };
    }, { "../../lib": 515 }], 455: [function(v, Q, $) {
      var m = v("./draw"), g = v("./select");
      Q.exports = { moduleType: "component", name: "selections", layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), supplyDrawNewSelectionDefaults: v("./draw_newselection/defaults"), includeBasePlot: v("../../plots/cartesian/include_components")("selections"), draw: m.draw, drawOne: m.drawOne, reselect: g.reselect, prepSelect: g.prepSelect, clearOutline: g.clearOutline, clearSelectionsCache: g.clearSelectionsCache, selectOnClick: g.selectOnClick };
    }, { "../../plots/cartesian/include_components": 577, "./attributes": 447, "./defaults": 449, "./draw": 450, "./draw_newselection/defaults": 452, "./select": 456 }], 456: [function(v, Q, $) {
      var m = v("polybooljs"), g = v("point-in-polygon/nested"), k = v("../../registry"), x = v("../drawing").dashStyle, e = v("../color"), r = v("../fx"), n = v("../fx/helpers").makeEventData, s = v("../dragelement/helpers"), t = s.freeMode, d = s.rectMode, u = s.drawMode, o = s.openMode, h = s.selectMode, l = v("../shapes/helpers"), i = v("../shapes/constants"), p = v("../shapes/display_outlines"), c = v("../shapes/handle_outline").clearOutline, a = v("../shapes/draw_newshape/helpers"), y = a.handleEllipse, f = a.readPaths, _ = v("../shapes/draw_newshape/newshapes"), b = v("./draw_newselection/newselections"), w = v("./draw").activateLastSelection, T = v("../../lib"), L = T.sorterAsc, A = v("../../lib/polygon"), I = v("../../lib/throttle"), P = v("../../plots/cartesian/axis_ids").getFromId, S = v("../../lib/clear_gl_canvases"), E = v("../../plot_api/subroutines").redrawReglTraces, R = v("./constants"), z = R.MINSELECT, j = A.filter, H = A.tester, Y = v("./helpers"), J = Y.p2r, W = Y.axValue, Z = Y.getTransform;
      function re(Oe) {
        return Oe.subplot !== void 0;
      }
      function V(Oe, Ze, Fe, Pe, De, Ge, Qe) {
        var ot, vt, bt, yt, tt, Ke, mt, Ft, Vt, Xt = Ze._hoverdata, Gt = Ze._fullLayout.clickmode.indexOf("event") > -1, nr = [];
        if (function(be) {
          return be && Array.isArray(be) && be[0].hoverOnBox !== !0;
        }(Xt)) {
          N(Oe, Ze, Ge);
          var It = function(be, Re) {
            var Ue, Xe, qe = be[0], st = -1, it = [];
            for (Xe = 0; Xe < Re.length; Xe++)
              if (Ue = Re[Xe], qe.fullData._expandedIndex === Ue.cd[0].trace._expandedIndex) {
                if (qe.hoverOnBox === !0)
                  break;
                qe.pointNumber !== void 0 ? st = qe.pointNumber : qe.binNumber !== void 0 && (st = qe.binNumber, it = qe.pointNumbers);
                break;
              }
            return { pointNumber: st, pointNumbers: it, searchInfo: Ue };
          }(Xt, ot = te(Ze, Fe, Pe, De));
          if (It.pointNumbers.length > 0 ? function(be, Re) {
            var Ue, Xe, qe, st = [];
            for (qe = 0; qe < be.length; qe++)
              (Ue = be[qe]).cd[0].trace.selectedpoints && Ue.cd[0].trace.selectedpoints.length > 0 && st.push(Ue);
            if (st.length === 1 && st[0] === Re.searchInfo && (Xe = Re.searchInfo.cd[0].trace).selectedpoints.length === Re.pointNumbers.length) {
              for (qe = 0; qe < Re.pointNumbers.length; qe++)
                if (Xe.selectedpoints.indexOf(Re.pointNumbers[qe]) < 0)
                  return !1;
              return !0;
            }
            return !1;
          }(ot, It) : function(be) {
            var Re, Ue, Xe, qe = 0;
            for (Xe = 0; Xe < be.length; Xe++)
              if (Re = be[Xe], (Ue = Re.cd[0].trace).selectedpoints && (Ue.selectedpoints.length > 1 || (qe += Ue.selectedpoints.length) > 1))
                return !1;
            return qe === 1;
          }(ot) && (Ke = le(It))) {
            for (Qe && Qe.remove(), Vt = 0; Vt < ot.length; Vt++)
              (vt = ot[Vt])._module.selectPoints(vt, !1);
            oe(Ze, ot), K(Ge), Gt && Ie(Ze);
          } else {
            for (mt = Oe.shiftKey && (Ke !== void 0 ? Ke : le(It)), bt = function(be, Re, Ue) {
              return { pointNumber: be, searchInfo: Re, subtract: !!Ue };
            }(It.pointNumber, It.searchInfo, mt), yt = ee(Ge.selectionDefs.concat([bt])), Vt = 0; Vt < ot.length; Vt++)
              if (tt = ue(ot[Vt]._module.selectPoints(ot[Vt], yt), ot[Vt]), nr.length)
                for (var Be = 0; Be < tt.length; Be++)
                  nr.push(tt[Be]);
              else
                nr = tt;
            if (oe(Ze, ot, Ft = { points: nr }), bt && Ge && Ge.selectionDefs.push(bt), Qe) {
              var He = Ge.mergedPolygons, he = o(Ge.dragmode);
              p(ye(He, he), Qe, Ge);
            }
            Gt && ze(Ze, Ft);
          }
        }
      }
      function B(Oe) {
        return "pointNumber" in Oe && "searchInfo" in Oe;
      }
      function U(Oe) {
        return { xmin: 0, xmax: 0, ymin: 0, ymax: 0, pts: [], contains: function(Ze, Fe, Pe, De) {
          var Ge = Oe.searchInfo.cd[0].trace._expandedIndex;
          return De.cd[0].trace._expandedIndex === Ge && Pe === Oe.pointNumber;
        }, isRect: !1, degenerate: !1, subtract: !!Oe.subtract };
      }
      function ee(Oe) {
        if (Oe.length) {
          for (var Ze = [], Fe = B(Oe[0]) ? 0 : Oe[0][0][0], Pe = Fe, De = B(Oe[0]) ? 0 : Oe[0][0][1], Ge = De, Qe = 0; Qe < Oe.length; Qe++)
            if (B(Oe[Qe]))
              Ze.push(U(Oe[Qe]));
            else {
              var ot = H(Oe[Qe]);
              ot.subtract = !!Oe[Qe].subtract, Ze.push(ot), Fe = Math.min(Fe, ot.xmin), Pe = Math.max(Pe, ot.xmax), De = Math.min(De, ot.ymin), Ge = Math.max(Ge, ot.ymax);
            }
          return { xmin: Fe, xmax: Pe, ymin: De, ymax: Ge, pts: [], contains: function(vt, bt, yt, tt) {
            for (var Ke = !1, mt = 0; mt < Ze.length; mt++)
              Ze[mt].contains(vt, bt, yt, tt) && (Ke = !Ze[mt].subtract);
            return Ke;
          }, isRect: !1, degenerate: !1 };
        }
      }
      function N(Oe, Ze, Fe) {
        var Pe = Ze._fullLayout, De = Fe.plotinfo, Ge = Fe.dragmode, Qe = Pe._lastSelectedSubplot && Pe._lastSelectedSubplot === De.id, ot = (Oe.shiftKey || Oe.altKey) && !(u(Ge) && o(Ge));
        Qe && ot && De.selection && De.selection.selectionDefs && !Fe.selectionDefs ? (Fe.selectionDefs = De.selection.selectionDefs, Fe.mergedPolygons = De.selection.mergedPolygons) : ot && De.selection || K(Fe), Qe || (c(Ze), Pe._lastSelectedSubplot = De.id);
      }
      function K(Oe, Ze) {
        var Fe = Oe.dragmode, Pe = Oe.plotinfo, De = Oe.gd;
        (function(tt) {
          return tt._fullLayout._activeShapeIndex >= 0;
        })(De) && De._fullLayout._deactivateShape(De), function(tt) {
          return tt._fullLayout._activeSelectionIndex >= 0;
        }(De) && De._fullLayout._deactivateSelection(De);
        var Ge = De._fullLayout._zoomlayer, Qe = u(Fe), ot = h(Fe);
        if (Qe || ot) {
          var vt, bt, yt = Ge.selectAll(".select-outline-" + Pe.id);
          yt && De._fullLayout._outlining && (Qe && (vt = _(yt, Oe)), vt && k.call("_guiRelayout", De, { shapes: vt }), ot && !re(Oe) && (bt = b(yt, Oe)), bt && (De._fullLayout._noEmitSelectedAtStart = !0, k.call("_guiRelayout", De, { selections: bt }).then(function() {
            Ze && w(De);
          })), De._fullLayout._outlining = !1);
        }
        Pe.selection = {}, Pe.selection.selectionDefs = Oe.selectionDefs = [], Pe.selection.mergedPolygons = Oe.mergedPolygons = [];
      }
      function X(Oe) {
        return Oe._id;
      }
      function te(Oe, Ze, Fe, Pe) {
        if (!Oe.calcdata)
          return [];
        var De, Ge, Qe, ot = [], vt = Ze.map(X), bt = Fe.map(X);
        for (Qe = 0; Qe < Oe.calcdata.length; Qe++)
          if ((Ge = (De = Oe.calcdata[Qe])[0].trace).visible === !0 && Ge._module && Ge._module.selectPoints)
            if (!re({ subplot: Pe }) || Ge.subplot !== Pe && Ge.geo !== Pe)
              if (Ge.type === "splom") {
                if (Ge._xaxes[vt[0]] && Ge._yaxes[bt[0]]) {
                  var yt = ie(Ge._module, De, Ze[0], Fe[0]);
                  yt.scene = Oe._fullLayout._splomScenes[Ge.uid], ot.push(yt);
                }
              } else if (Ge.type === "sankey") {
                var tt = ie(Ge._module, De, Ze[0], Fe[0]);
                ot.push(tt);
              } else {
                if (vt.indexOf(Ge.xaxis) === -1 || bt.indexOf(Ge.yaxis) === -1)
                  continue;
                ot.push(ie(Ge._module, De, P(Oe, Ge.xaxis), P(Oe, Ge.yaxis)));
              }
            else
              ot.push(ie(Ge._module, De, Ze[0], Fe[0]));
        return ot;
      }
      function ie(Oe, Ze, Fe, Pe) {
        return { _module: Oe, cd: Ze, xaxis: Fe, yaxis: Pe };
      }
      function le(Oe) {
        var Ze = Oe.searchInfo.cd[0].trace, Fe = Oe.pointNumber, Pe = Oe.pointNumbers, De = Pe.length > 0 ? Pe[0] : Fe;
        return !!Ze.selectedpoints && Ze.selectedpoints.indexOf(De) > -1;
      }
      function oe(Oe, Ze, Fe) {
        var Pe, De;
        for (Pe = 0; Pe < Ze.length; Pe++) {
          var Ge = Ze[Pe].cd[0].trace._fullInput, Qe = Oe._fullLayout._tracePreGUI[Ge.uid] || {};
          Qe.selectedpoints === void 0 && (Qe.selectedpoints = Ge._input.selectedpoints || null);
        }
        if (Fe) {
          var ot = Fe.points || [];
          for (Pe = 0; Pe < Ze.length; Pe++)
            (De = Ze[Pe].cd[0].trace)._input.selectedpoints = De._fullInput.selectedpoints = [], De._fullInput !== De && (De.selectedpoints = []);
          for (var vt = 0; vt < ot.length; vt++) {
            var bt = ot[vt], yt = bt.data, tt = bt.fullData, Ke = bt.pointIndex, mt = bt.pointIndices;
            mt ? ([].push.apply(yt.selectedpoints, mt), De._fullInput !== De && [].push.apply(tt.selectedpoints, mt)) : (yt.selectedpoints.push(Ke), De._fullInput !== De && tt.selectedpoints.push(Ke));
          }
        } else
          for (Pe = 0; Pe < Ze.length; Pe++)
            delete (De = Ze[Pe].cd[0].trace).selectedpoints, delete De._input.selectedpoints, De._fullInput !== De && delete De._fullInput.selectedpoints;
        (function(Ft, Vt) {
          for (var Xt = !1, Gt = 0; Gt < Vt.length; Gt++) {
            var nr = Vt[Gt], It = nr.cd;
            k.traceIs(It[0].trace, "regl") && (Xt = !0);
            var Be = nr._module, He = Be.styleOnSelect || Be.style;
            He && (He(Ft, It, It[0].node3), It[0].nodeRangePlot3 && He(Ft, It, It[0].nodeRangePlot3));
          }
          Xt && (S(Ft), E(Ft));
        })(Oe, Ze);
      }
      function ve(Oe, Ze, Fe) {
        for (var Pe = (Fe ? m.difference : m.union)({ regions: Oe }, { regions: [Ze] }).regions.reverse(), De = 0; De < Pe.length; De++) {
          var Ge = Pe[De];
          Ge.subtract = de(Ge, Pe.slice(0, De));
        }
        return Pe;
      }
      function ue(Oe, Ze) {
        if (Array.isArray(Oe))
          for (var Fe = Ze.cd, Pe = Ze.cd[0].trace, De = 0; De < Oe.length; De++)
            Oe[De] = n(Oe[De], Pe, Fe);
        return Oe;
      }
      function ye(Oe, Ze) {
        for (var Fe = [], Pe = 0; Pe < Oe.length; Pe++) {
          Fe[Pe] = [];
          for (var De = 0; De < Oe[Pe].length; De++) {
            Fe[Pe][De] = [], Fe[Pe][De][0] = De ? "L" : "M";
            for (var Ge = 0; Ge < Oe[Pe][De].length; Ge++)
              Fe[Pe][De].push(Oe[Pe][De][Ge]);
          }
          Ze || Fe[Pe].push(["Z", Fe[Pe][0][1], Fe[Pe][0][2]]);
        }
        return Fe;
      }
      function Ae(Oe, Ze) {
        for (var Fe, Pe, De = [], Ge = [], Qe = 0; Qe < Ze.length; Qe++) {
          var ot = Ze[Qe];
          Pe = ot._module.selectPoints(ot, Oe), Ge.push(Pe), Fe = ue(Pe, ot), De = De.concat(Fe);
        }
        return De;
      }
      function pe(Oe, Ze, Fe, Pe, De) {
        var Ge, Qe, ot, vt = !!Pe;
        De && (Ge = De.plotinfo, Qe = De.xaxes[0]._id, ot = De.yaxes[0]._id);
        var bt = [], yt = [], tt = se(Oe), Ke = Oe._fullLayout;
        if (Ge) {
          var mt = Ke._zoomlayer, Ft = Ke.dragmode, Vt = u(Ft), Xt = h(Ft);
          if (Vt || Xt) {
            var Gt = P(Oe, Qe, "x"), nr = P(Oe, ot, "y");
            if (Gt && nr) {
              var It = mt.selectAll(".select-outline-" + Ge.id);
              if (It && Oe._fullLayout._outlining && It.length) {
                for (var Be = It[0][0].getAttribute("d"), He = f(Be, Oe, Ge), he = [], be = 0; be < He.length; be++) {
                  for (var Re = He[be], Ue = [], Xe = 0; Xe < Re.length; Xe++)
                    Ue.push([Te(Gt, Re[Xe][1]), Te(nr, Re[Xe][2])]);
                  Ue.xref = Qe, Ue.yref = ot, Ue.subtract = de(Ue, he), he.push(Ue);
                }
                tt = tt.concat(he);
              }
            }
          }
        }
        var qe = Qe && ot ? [Qe + ot] : Ke._subplots.cartesian;
        (function(Ir) {
          var Fr = Ir.calcdata;
          if (!!Fr)
            for (var Gr = 0; Gr < Fr.length; Gr++) {
              var un = Fr[Gr][0].trace, $r = Ir._fullLayout._splomScenes;
              if ($r) {
                var Dn = $r[un.uid];
                Dn && (Dn.selectBatch = []);
              }
            }
        })(Oe);
        for (var st = {}, it = 0; it < qe.length; it++) {
          var Tt = qe[it], Pt = Tt.indexOf("y"), rt = Tt.slice(0, Pt), ut = Tt.slice(Pt), Bt = Qe && ot ? Fe : void 0;
          if (Bt = we(tt, rt, ut, Bt)) {
            var wt = Pe;
            if (!vt) {
              var Lt = P(Oe, rt, "x"), Se = P(Oe, ut, "y");
              wt = te(Oe, [Lt], [Se], Tt);
              for (var We = 0; We < wt.length; We++) {
                var nt = wt[We], ft = nt.cd[0], Mt = ft.trace;
                if (nt._module.name === "scattergl" && !ft.t.xpx) {
                  var Nt = Mt.x, Zt = Mt.y, Ut = Mt._length;
                  ft.t.xpx = [], ft.t.ypx = [];
                  for (var fr = 0; fr < Ut; fr++)
                    ft.t.xpx[fr] = Lt.c2p(Nt[fr]), ft.t.ypx[fr] = Se.c2p(Zt[fr]);
                }
                nt._module.name === "splom" && (st[Mt.uid] || (st[Mt.uid] = !0));
              }
            }
            var Tr = Ae(Bt, wt);
            bt = bt.concat(Tr), yt = yt.concat(wt);
          }
        }
        var ur = { points: bt };
        oe(Oe, yt, ur);
        var Kt = Ke.clickmode.indexOf("event") > -1 && Ze;
        if (!Ge && Ze) {
          var $t = se(Oe, !0);
          if ($t.length) {
            var er = $t[0].xref, cr = $t[0].yref;
            if (er && cr) {
              var gr = Ee($t);
              Me([P(Oe, er, "x"), P(Oe, cr, "y")])(ur, gr);
            }
          }
          Oe._fullLayout._noEmitSelectedAtStart ? Oe._fullLayout._noEmitSelectedAtStart = !1 : Kt && ze(Oe, ur), Ke._reselect = !1;
        }
        if (!Ge && Ke._deselect) {
          var Mr = Ke._deselect;
          (function(Ir, Fr, Gr) {
            for (var un = 0; un < Gr.length; un++) {
              var $r = Gr[un];
              if ($r.xaxis && $r.xaxis._id === Ir && $r.yaxis && $r.yaxis._id === Fr)
                return !0;
            }
            return !1;
          })(Qe = Mr.xref, ot = Mr.yref, yt) || ge(Oe, Qe, ot, Pe), Kt && (ur.points.length ? ze(Oe, ur) : Ie(Oe)), Ke._deselect = !1;
        }
        return { eventData: ur, selectionTesters: Fe };
      }
      function ge(Oe, Ze, Fe, Pe) {
        Pe = te(Oe, [P(Oe, Ze, "x")], [P(Oe, Fe, "y")], Ze + Fe);
        for (var De = 0; De < Pe.length; De++) {
          var Ge = Pe[De];
          Ge._module.selectPoints(Ge, !1);
        }
        oe(Oe, Pe);
      }
      function we(Oe, Ze, Fe, Pe) {
        for (var De, Ge = 0; Ge < Oe.length; Ge++) {
          var Qe = Oe[Ge];
          Ze === Qe.xref && Fe === Qe.yref && (De ? Pe = ee(De = ve(De, Qe, !!Qe.subtract)) : (De = [Qe], Pe = H(Qe)));
        }
        return Pe;
      }
      function se(Oe, Ze) {
        for (var Fe = [], Pe = Oe._fullLayout, De = Pe.selections, Ge = De.length, Qe = 0; Qe < Ge; Qe++)
          if (!Ze || Qe === Pe._activeSelectionIndex) {
            var ot = De[Qe];
            if (ot) {
              var vt, bt, yt, tt, Ke, mt = ot.xref, Ft = ot.yref, Vt = P(Oe, mt, "x"), Xt = P(Oe, Ft, "y");
              if (ot.type === "rect") {
                Ke = [];
                var Gt = Te(Vt, ot.x0), nr = Te(Vt, ot.x1), It = Te(Xt, ot.y0), Be = Te(Xt, ot.y1);
                Ke = [[Gt, It], [Gt, Be], [nr, Be], [nr, It]], vt = Math.min(Gt, nr), bt = Math.max(Gt, nr), yt = Math.min(It, Be), tt = Math.max(It, Be), Ke.xmin = vt, Ke.xmax = bt, Ke.ymin = yt, Ke.ymax = tt, Ke.xref = mt, Ke.yref = Ft, Ke.subtract = !1, Ke.isRect = !0, Fe.push(Ke);
              } else if (ot.type === "path")
                for (var He = ot.path.split("Z"), he = [], be = 0; be < He.length; be++) {
                  var Re = He[be];
                  if (Re) {
                    Re += "Z";
                    var Ue = l.extractPathCoords(Re, i.paramIsX, "raw"), Xe = l.extractPathCoords(Re, i.paramIsY, "raw");
                    vt = 1 / 0, bt = -1 / 0, yt = 1 / 0, tt = -1 / 0, Ke = [];
                    for (var qe = 0; qe < Ue.length; qe++) {
                      var st = Te(Vt, Ue[qe]), it = Te(Xt, Xe[qe]);
                      Ke.push([st, it]), vt = Math.min(st, vt), bt = Math.max(st, bt), yt = Math.min(it, yt), tt = Math.max(it, tt);
                    }
                    Ke.xmin = vt, Ke.xmax = bt, Ke.ymin = yt, Ke.ymax = tt, Ke.xref = mt, Ke.yref = Ft, Ke.subtract = de(Ke, he), he.push(Ke), Fe.push(Ke);
                  }
                }
            }
          }
        return Fe;
      }
      function de(Oe, Ze) {
        for (var Fe = !1, Pe = 0; Pe < Ze.length; Pe++)
          for (var De = Ze[Pe], Ge = 0; Ge < Oe.length; Ge++)
            if (g(Oe[Ge], De)) {
              Fe = !Fe;
              break;
            }
        return Fe;
      }
      function Te(Oe, Ze) {
        return Oe.type === "date" && (Ze = Ze.replace("_", " ")), Oe.type === "log" ? Oe.c2p(Ze) : Oe.r2p(Ze, null, Oe.calendar);
      }
      function Ee(Oe) {
        for (var Ze = Oe.length, Fe = [], Pe = 0; Pe < Ze; Pe++) {
          var De = Oe[Pe];
          Fe = (Fe = Fe.concat(De)).concat([De[0]]);
        }
        return function(Ge) {
          return Ge.isRect = Ge.length === 5 && Ge[0][0] === Ge[4][0] && Ge[0][1] === Ge[4][1] && Ge[0][0] === Ge[1][0] && Ge[2][0] === Ge[3][0] && Ge[0][1] === Ge[3][1] && Ge[1][1] === Ge[2][1] || Ge[0][1] === Ge[1][1] && Ge[2][1] === Ge[3][1] && Ge[0][0] === Ge[3][0] && Ge[1][0] === Ge[2][0], Ge.isRect && (Ge.xmin = Math.min(Ge[0][0], Ge[2][0]), Ge.xmax = Math.max(Ge[0][0], Ge[2][0]), Ge.ymin = Math.min(Ge[0][1], Ge[2][1]), Ge.ymax = Math.max(Ge[0][1], Ge[2][1])), Ge;
        }(Fe);
      }
      function Me(Oe) {
        return function(Ze, Fe) {
          for (var Pe, De, Ge = 0; Ge < Oe.length; Ge++) {
            var Qe = Oe[Ge], ot = Qe._id, vt = ot.charAt(0);
            if (Fe.isRect) {
              Pe || (Pe = {});
              var bt = Fe[vt + "min"], yt = Fe[vt + "max"];
              bt !== void 0 && yt !== void 0 && (Pe[ot] = [J(Qe, bt), J(Qe, yt)].sort(L));
            } else
              De || (De = {}), De[ot] = Fe.map(W(Qe));
          }
          Pe && (Ze.range = Pe), De && (Ze.lassoPoints = De);
        };
      }
      function ze(Oe, Ze) {
        Ze && (Ze.selections = (Oe.layout || {}).selections || []), Oe.emit("plotly_selected", Ze);
      }
      function Ie(Oe) {
        Oe.emit("plotly_deselect", null);
      }
      Q.exports = { reselect: pe, prepSelect: function(Oe, Ze, Fe, Pe, De) {
        var Ge = !re(Pe), Qe = t(De), ot = d(De), vt = o(De), bt = u(De), yt = h(De), tt = De === "drawcircle", Ke = De === "drawline" || tt, mt = Pe.gd, Ft = mt._fullLayout, Vt = yt && Ft.newselection.mode === "immediate" && Ge, Xt = Ft._zoomlayer, Gt = Pe.element.getBoundingClientRect(), nr = Pe.plotinfo, It = Z(nr), Be = Ze - Gt.left, He = Fe - Gt.top;
        Ft._calcInverseTransform(mt);
        var he = T.apply3DTransform(Ft._invTransform)(Be, He);
        Be = he[0], He = he[1];
        var be, Re, Ue, Xe, qe, st, it, Tt = Ft._invScaleX, Pt = Ft._invScaleY, rt = Be, ut = He, Bt = "M" + Be + "," + He, wt = Pe.xaxes[0], Lt = Pe.yaxes[0], Se = wt._length, We = Lt._length, nt = Oe.altKey && !(u(De) && vt);
        N(Oe, mt, Pe), Qe && (be = j([[Be, He]], R.BENDPX));
        var ft = Xt.selectAll("path.select-outline-" + nr.id).data([1]), Mt = bt ? Ft.newshape : Ft.newselection, Nt = bt && !vt ? Mt.fillcolor : "rgba(0,0,0,0)", Zt = Mt.line.color || (Ge ? e.contrast(mt._fullLayout.plot_bgcolor) : "#7f7f7f");
        ft.enter().append("path").attr("class", "select-outline select-outline-" + nr.id).style({ opacity: bt ? Mt.opacity / 2 : 1, "stroke-dasharray": x(Mt.line.dash, Mt.line.width), "stroke-width": Mt.line.width + "px", "shape-rendering": "crispEdges" }).call(e.stroke, Zt).call(e.fill, Nt).attr("fill-rule", "evenodd").classed("cursor-move", !!bt).attr("transform", It).attr("d", Bt + "Z");
        var Ut = Xt.append("path").attr("class", "zoombox-corners").style({ fill: e.background, stroke: e.defaultLine, "stroke-width": 1 }).attr("transform", It).attr("d", "M0,0Z"), fr = Ft._uid + R.SELECTID, Tr = [], ur = te(mt, Pe.xaxes, Pe.yaxes, Pe.subplot);
        Vt && !Oe.shiftKey && (Pe._clearSubplotSelections = function() {
          if (Ge) {
            var $t = wt._id, er = Lt._id;
            ge(mt, $t, er, ur);
            for (var cr = (mt.layout || {}).selections || [], gr = [], Mr = !1, Ir = 0; Ir < cr.length; Ir++) {
              var Fr = Ft.selections[Ir];
              Fr.xref !== $t || Fr.yref !== er ? gr.push(cr[Ir]) : Mr = !0;
            }
            Mr && (mt._fullLayout._noEmitSelectedAtStart = !0, k.call("_guiRelayout", mt, { selections: gr }));
          }
        });
        var Kt = function($t) {
          return $t.plotinfo.fillRangeItems || Me($t.xaxes.concat($t.yaxes));
        }(Pe);
        Pe.moveFn = function($t, er) {
          Pe._clearSubplotSelections && (Pe._clearSubplotSelections(), Pe._clearSubplotSelections = void 0), rt = Math.max(0, Math.min(Se, Tt * $t + Be)), ut = Math.max(0, Math.min(We, Pt * er + He));
          var cr = Math.abs(rt - Be), gr = Math.abs(ut - He);
          if (ot) {
            var Mr, Ir, Fr;
            if (yt) {
              var Gr = Ft.selectdirection;
              switch (Mr = Gr === "any" ? gr < Math.min(0.6 * cr, z) ? "h" : cr < Math.min(0.6 * gr, z) ? "v" : "d" : Gr) {
                case "h":
                  Ir = tt ? We / 2 : 0, Fr = We;
                  break;
                case "v":
                  Ir = tt ? Se / 2 : 0, Fr = Se;
              }
            }
            if (bt)
              switch (Ft.newshape.drawdirection) {
                case "vertical":
                  Mr = "h", Ir = tt ? We / 2 : 0, Fr = We;
                  break;
                case "horizontal":
                  Mr = "v", Ir = tt ? Se / 2 : 0, Fr = Se;
                  break;
                case "ortho":
                  cr < gr ? (Mr = "h", Ir = He, Fr = ut) : (Mr = "v", Ir = Be, Fr = rt);
                  break;
                default:
                  Mr = "d";
              }
            Mr === "h" ? ((Xe = Ke ? y(tt, [rt, Ir], [rt, Fr]) : [[Be, Ir], [Be, Fr], [rt, Fr], [rt, Ir]]).xmin = Ke ? rt : Math.min(Be, rt), Xe.xmax = Ke ? rt : Math.max(Be, rt), Xe.ymin = Math.min(Ir, Fr), Xe.ymax = Math.max(Ir, Fr), Ut.attr("d", "M" + Xe.xmin + "," + (He - z) + "h-4v" + 2 * z + "h4ZM" + (Xe.xmax - 1) + "," + (He - z) + "h4v" + 2 * z + "h-4Z")) : Mr === "v" ? ((Xe = Ke ? y(tt, [Ir, ut], [Fr, ut]) : [[Ir, He], [Ir, ut], [Fr, ut], [Fr, He]]).xmin = Math.min(Ir, Fr), Xe.xmax = Math.max(Ir, Fr), Xe.ymin = Ke ? ut : Math.min(He, ut), Xe.ymax = Ke ? ut : Math.max(He, ut), Ut.attr("d", "M" + (Be - z) + "," + Xe.ymin + "v-4h" + 2 * z + "v4ZM" + (Be - z) + "," + (Xe.ymax - 1) + "v4h" + 2 * z + "v-4Z")) : Mr === "d" && ((Xe = Ke ? y(tt, [Be, He], [rt, ut]) : [[Be, He], [Be, ut], [rt, ut], [rt, He]]).xmin = Math.min(Be, rt), Xe.xmax = Math.max(Be, rt), Xe.ymin = Math.min(He, ut), Xe.ymax = Math.max(He, ut), Ut.attr("d", "M0,0Z"));
          } else
            Qe && (be.addPt([rt, ut]), Xe = be.filtered);
          if (Pe.selectionDefs && Pe.selectionDefs.length ? (Ue = ve(Pe.mergedPolygons, Xe, nt), Xe.subtract = nt, Re = ee(Pe.selectionDefs.concat([Xe]))) : (Ue = [Xe], Re = H(Xe)), p(ye(Ue, vt), ft, Pe), yt) {
            var un, $r = pe(mt, !1), Dn = $r.eventData ? $r.eventData.points.slice() : [];
            $r = pe(mt, !1, Re, ur, Pe), Re = $r.selectionTesters, it = $r.eventData, un = be ? be.filtered : Ee(Ue), I.throttle(fr, R.SELECTDELAY, function() {
              for (var rn = (Tr = Ae(Re, ur)).slice(), vn = 0; vn < Dn.length; vn++) {
                for (var xn = Dn[vn], $n = !1, Br = 0; Br < rn.length; Br++)
                  if (rn[Br].curveNumber === xn.curveNumber && rn[Br].pointNumber === xn.pointNumber) {
                    $n = !0;
                    break;
                  }
                $n || rn.push(xn);
              }
              rn.length && (it || (it = {}), it.points = rn), Kt(it, un), function(tn, mn) {
                tn.emit("plotly_selecting", mn);
              }(mt, it);
            });
          }
        }, Pe.clickFn = function($t, er) {
          if (Ut.remove(), mt._fullLayout._activeShapeIndex >= 0)
            mt._fullLayout._deactivateShape(mt);
          else if (!bt) {
            var cr = Ft.clickmode;
            I.done(fr).then(function() {
              if (I.clear(fr), $t === 2) {
                for (ft.remove(), qe = 0; qe < ur.length; qe++)
                  (st = ur[qe])._module.selectPoints(st, !1);
                if (oe(mt, ur), K(Pe), Ie(mt), ur.length) {
                  var gr = ur[0].xaxis, Mr = ur[0].yaxis;
                  if (gr && Mr) {
                    for (var Ir = [], Fr = mt._fullLayout.selections, Gr = 0; Gr < Fr.length; Gr++) {
                      var un = Fr[Gr];
                      un && (un.xref === gr._id && un.yref === Mr._id || Ir.push(un));
                    }
                    Ir.length < Fr.length && (mt._fullLayout._noEmitSelectedAtStart = !0, k.call("_guiRelayout", mt, { selections: Ir }));
                  }
                }
              } else
                cr.indexOf("select") > -1 && V(er, mt, Pe.xaxes, Pe.yaxes, Pe.subplot, Pe, ft), cr === "event" && ze(mt, void 0);
              r.click(mt, er);
            }).catch(T.error);
          }
        }, Pe.doneFn = function() {
          Ut.remove(), I.done(fr).then(function() {
            I.clear(fr), !Vt && Xe && Pe.selectionDefs && (Xe.subtract = nt, Pe.selectionDefs.push(Xe), Pe.mergedPolygons.length = 0, [].push.apply(Pe.mergedPolygons, Ue)), (Vt || bt) && K(Pe, Vt), Pe.doneFnCompleted && Pe.doneFnCompleted(Tr), yt && ze(mt, it);
          }).catch(T.error);
        };
      }, clearOutline: c, clearSelectionsCache: K, selectOnClick: V };
    }, { "../../lib": 515, "../../lib/clear_gl_canvases": 499, "../../lib/polygon": 527, "../../lib/throttle": 542, "../../plot_api/subroutines": 556, "../../plots/cartesian/axis_ids": 570, "../../registry": 647, "../color": 367, "../dragelement/helpers": 385, "../drawing": 389, "../fx": 407, "../fx/helpers": 403, "../shapes/constants": 459, "../shapes/display_outlines": 461, "../shapes/draw_newshape/helpers": 466, "../shapes/draw_newshape/newshapes": 467, "../shapes/handle_outline": 468, "../shapes/helpers": 469, "./constants": 448, "./draw": 450, "./draw_newselection/newselections": 453, "./helpers": 454, "point-in-polygon/nested": 254, polybooljs: 255 }], 457: [function(v, Q, $) {
      var m = v("../annotations/attributes"), g = v("../../traces/scatter/attributes").line, k = v("../drawing/attributes").dash, x = v("../../lib/extend").extendFlat, e = v("../../plot_api/plot_template").templatedArray;
      v("../../constants/axis_placeable_objects"), Q.exports = e("shape", { visible: { valType: "boolean", dflt: !0, editType: "calc+arraydraw" }, type: { valType: "enumerated", values: ["circle", "rect", "path", "line"], editType: "calc+arraydraw" }, layer: { valType: "enumerated", values: ["below", "above"], dflt: "above", editType: "arraydraw" }, xref: x({}, m.xref, {}), xsizemode: { valType: "enumerated", values: ["scaled", "pixel"], dflt: "scaled", editType: "calc+arraydraw" }, xanchor: { valType: "any", editType: "calc+arraydraw" }, x0: { valType: "any", editType: "calc+arraydraw" }, x1: { valType: "any", editType: "calc+arraydraw" }, yref: x({}, m.yref, {}), ysizemode: { valType: "enumerated", values: ["scaled", "pixel"], dflt: "scaled", editType: "calc+arraydraw" }, yanchor: { valType: "any", editType: "calc+arraydraw" }, y0: { valType: "any", editType: "calc+arraydraw" }, y1: { valType: "any", editType: "calc+arraydraw" }, path: { valType: "string", editType: "calc+arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "arraydraw" }, line: { color: x({}, g.color, { editType: "arraydraw" }), width: x({}, g.width, { editType: "calc+arraydraw" }), dash: x({}, k, { editType: "arraydraw" }), editType: "calc+arraydraw" }, fillcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "arraydraw" }, fillrule: { valType: "enumerated", values: ["evenodd", "nonzero"], dflt: "evenodd", editType: "arraydraw" }, editable: { valType: "boolean", dflt: !1, editType: "calc+arraydraw" }, editType: "arraydraw" });
    }, { "../../constants/axis_placeable_objects": 484, "../../lib/extend": 505, "../../plot_api/plot_template": 555, "../../traces/scatter/attributes": 936, "../annotations/attributes": 350, "../drawing/attributes": 388 }], 458: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("./constants"), x = v("./helpers");
      function e(t) {
        return n(t.line.width, t.xsizemode, t.x0, t.x1, t.path, !1);
      }
      function r(t) {
        return n(t.line.width, t.ysizemode, t.y0, t.y1, t.path, !0);
      }
      function n(t, d, u, o, h, l) {
        var i = t / 2, p = l;
        if (d === "pixel") {
          var c = h ? x.extractPathCoords(h, l ? k.paramIsY : k.paramIsX) : [u, o], a = m.aggNums(Math.max, null, c), y = m.aggNums(Math.min, null, c), f = y < 0 ? Math.abs(y) + i : i, _ = a > 0 ? a + i : i;
          return { ppad: i, ppadplus: p ? f : _, ppadminus: p ? _ : f };
        }
        return { ppad: i };
      }
      function s(t, d, u, o, h) {
        var l = t.type === "category" || t.type === "multicategory" ? t.r2c : t.d2c;
        if (d !== void 0)
          return [l(d), l(u)];
        if (o) {
          var i, p, c, a, y = 1 / 0, f = -1 / 0, _ = o.match(k.segmentRE);
          for (t.type === "date" && (l = x.decodeDate(l)), i = 0; i < _.length; i++)
            (p = h[_[i].charAt(0)].drawn) !== void 0 && (!(c = _[i].substr(1).match(k.paramRE)) || c.length < p || ((a = l(c[p])) < y && (y = a), a > f && (f = a)));
          return f >= y ? [y, f] : void 0;
        }
      }
      Q.exports = function(t) {
        var d = t._fullLayout, u = m.filterVisible(d.shapes);
        if (u.length && t._fullData.length)
          for (var o = 0; o < u.length; o++) {
            var h, l, i = u[o];
            i._extremes = {};
            var p = g.getRefType(i.xref), c = g.getRefType(i.yref);
            if (i.xref !== "paper" && p !== "domain") {
              var a = i.xsizemode === "pixel" ? i.xanchor : i.x0, y = i.xsizemode === "pixel" ? i.xanchor : i.x1;
              (l = s(h = g.getFromId(t, i.xref), a, y, i.path, k.paramIsX)) && (i._extremes[h._id] = g.findExtremes(h, l, e(i)));
            }
            if (i.yref !== "paper" && c !== "domain") {
              var f = i.ysizemode === "pixel" ? i.yanchor : i.y0, _ = i.ysizemode === "pixel" ? i.yanchor : i.y1;
              (l = s(h = g.getFromId(t, i.yref), f, _, i.path, k.paramIsY)) && (i._extremes[h._id] = g.findExtremes(h, l, r(i)));
            }
          }
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "./constants": 459, "./helpers": 469 }], 459: [function(v, Q, $) {
      Q.exports = { segmentRE: /[MLHVQCTSZ][^MLHVQCTSZ]*/g, paramRE: /[^\s,]+/g, paramIsX: { M: { 0: !0, drawn: 0 }, L: { 0: !0, drawn: 0 }, H: { 0: !0, drawn: 0 }, V: {}, Q: { 0: !0, 2: !0, drawn: 2 }, C: { 0: !0, 2: !0, 4: !0, drawn: 4 }, T: { 0: !0, drawn: 0 }, S: { 0: !0, 2: !0, drawn: 2 }, Z: {} }, paramIsY: { M: { 1: !0, drawn: 1 }, L: { 1: !0, drawn: 1 }, H: {}, V: { 0: !0, drawn: 0 }, Q: { 1: !0, 3: !0, drawn: 3 }, C: { 1: !0, 3: !0, 5: !0, drawn: 5 }, T: { 1: !0, drawn: 1 }, S: { 1: !0, 3: !0, drawn: 5 }, Z: {} }, numParams: { M: 2, L: 2, H: 1, V: 1, Q: 4, C: 6, T: 2, S: 4, Z: 0 } };
    }, {}], 460: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../../plots/array_container_defaults"), x = v("./attributes"), e = v("./helpers");
      function r(n, s, t) {
        function d(E, R) {
          return m.coerce(n, s, x, E, R);
        }
        if (d("visible")) {
          var u = d("path"), o = d("type", u ? "path" : "rect") !== "path";
          o && delete s.path, d("editable"), d("layer"), d("opacity"), d("fillcolor"), d("fillrule"), d("line.width") && (d("line.color"), d("line.dash"));
          for (var h = d("xsizemode"), l = d("ysizemode"), i = ["x", "y"], p = 0; p < 2; p++) {
            var c, a, y, f = i[p], _ = f + "anchor", b = f === "x" ? h : l, w = { _fullLayout: t }, T = g.coerceRef(n, s, w, f, void 0, "paper");
            if (g.getRefType(T) === "range" ? ((c = g.getFromId(w, T))._shapeIndices.push(s._index), y = e.rangeToShapePosition(c), a = e.shapePositionToRange(c)) : a = y = m.identity, o) {
              var L = f + "0", A = f + "1", I = n[L], P = n[A];
              n[L] = a(n[L], !0), n[A] = a(n[A], !0), b === "pixel" ? (d(L, 0), d(A, 10)) : (g.coercePosition(s, w, d, T, L, 0.25), g.coercePosition(s, w, d, T, A, 0.75)), s[L] = y(s[L]), s[A] = y(s[A]), n[L] = I, n[A] = P;
            }
            if (b === "pixel") {
              var S = n[_];
              n[_] = a(n[_], !0), g.coercePosition(s, w, d, T, _, 0.25), s[_] = y(s[_]), n[_] = S;
            }
          }
          o && m.noneOrAll(n, s, ["x0", "x1", "y0", "y1"]);
        }
      }
      Q.exports = function(n, s) {
        k(n, s, { name: "shapes", handleItemDefaults: r });
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/cartesian/axes": 566, "./attributes": 457, "./helpers": 469 }], 461: [function(v, Q, $) {
      var m = v("../../lib").strTranslate, g = v("../dragelement"), k = v("../dragelement/helpers"), x = k.drawMode, e = k.selectMode, r = v("../../registry"), n = v("../color"), s = v("./draw_newshape/constants"), t = s.i000, d = s.i090, u = s.i180, o = s.i270, h = v("./handle_outline").clearOutlineControllers, l = v("./draw_newshape/helpers"), i = l.pointsOnRectangle, p = l.pointsOnEllipse, c = l.writePaths, a = v("./draw_newshape/newshapes"), y = v("../selections/draw_newselection/newselections");
      function f(_, b) {
        var w, T, L, A = _[b][1], I = _[b][2], P = _.length;
        return T = _[w = (b + 1) % P][1], L = _[w][2], T === A && L === I && (T = _[w = (b + 2) % P][1], L = _[w][2]), [w, T, L];
      }
      Q.exports = function _(b, w, T, L) {
        L || (L = 0);
        var A = T.gd;
        function I() {
          _(b, w, T, L++), p(b[0]) && P({ redrawing: !0 });
        }
        function P(X) {
          var te = {};
          T.isActiveShape !== void 0 && (T.isActiveShape = !1, te = a(w, T)), T.isActiveSelection !== void 0 && (T.isActiveSelection = !1, te = y(w, T), A._fullLayout._reselect = !0), Object.keys(te).length && r.call((X || {}).redrawing ? "relayout" : "_guiRelayout", A, te);
        }
        var S, E, R, z, j, H = A._fullLayout._zoomlayer, Y = T.dragmode, J = x(Y), W = e(Y);
        (J || W) && (A._fullLayout._outlining = !0), h(A), w.attr("d", c(b)), L || !T.isActiveShape && !T.isActiveSelection || (j = function(X, te) {
          for (var ie = 0; ie < te.length; ie++) {
            var le = te[ie];
            X[ie] = [];
            for (var oe = 0; oe < le.length; oe++) {
              X[ie][oe] = [];
              for (var ve = 0; ve < le[oe].length; ve++)
                X[ie][oe][ve] = le[oe][ve];
            }
          }
          return X;
        }([], b), function(X) {
          S = [];
          for (var te = 0; te < b.length; te++) {
            var ie = b[te], le = i(ie), oe = !le && p(ie);
            S[te] = [];
            for (var ve = ie.length, ue = 0; ue < ve; ue++)
              if (ie[ue][0] !== "Z" && (!oe || ue === t || ue === d || ue === u || ue === o)) {
                var ye, Ae = le && T.isActiveSelection;
                Ae && (ye = f(ie, ue));
                var pe = ie[ue][1], ge = ie[ue][2], we = X.append(Ae ? "rect" : "circle").attr("data-i", te).attr("data-j", ue).style({ fill: n.background, stroke: n.defaultLine, "stroke-width": 1, "shape-rendering": "crispEdges" });
                if (Ae) {
                  var se = ye[1] - pe, de = ye[2] - ge, Te = de ? 5 : Math.max(Math.min(25, Math.abs(se) - 5), 5), Ee = se ? 5 : Math.max(Math.min(25, Math.abs(de) - 5), 5);
                  we.classed(de ? "cursor-ew-resize" : "cursor-ns-resize", !0).attr("width", Te).attr("height", Ee).attr("x", pe - Te / 2).attr("y", ge - Ee / 2).attr("transform", m(se / 2, de / 2));
                } else
                  we.classed("cursor-grab", !0).attr("r", 5).attr("cx", pe).attr("cy", ge);
                S[te][ue] = { element: we.node(), gd: A, prepFn: Z, doneFn: V, clickFn: B }, g.init(S[te][ue]);
              }
          }
        }(H.append("g").attr("class", "outline-controllers")), function() {
          E = [], b.length && (E[0] = { element: w[0][0], gd: A, prepFn: ee, doneFn: N, clickFn: K }, g.init(E[0]));
        }());
        function Z(X) {
          R = +X.srcElement.getAttribute("data-i"), z = +X.srcElement.getAttribute("data-j"), S[R][z].moveFn = re;
        }
        function re(X, te) {
          if (b.length) {
            var ie = j[R][z][1], le = j[R][z][2], oe = b[R], ve = oe.length;
            if (i(oe)) {
              var ue = X, ye = te;
              T.isActiveSelection && (f(oe, z)[1] === oe[z][1] ? ye = 0 : ue = 0);
              for (var Ae = 0; Ae < ve; Ae++)
                if (Ae !== z) {
                  var pe = oe[Ae];
                  pe[1] === oe[z][1] && (pe[1] = ie + ue), pe[2] === oe[z][2] && (pe[2] = le + ye);
                }
              if (oe[z][1] = ie + ue, oe[z][2] = le + ye, !i(oe))
                for (var ge = 0; ge < ve; ge++)
                  for (var we = 0; we < oe[ge].length; we++)
                    oe[ge][we] = j[R][ge][we];
            } else
              oe[z][1] = ie + X, oe[z][2] = le + te;
            I();
          }
        }
        function V() {
          P();
        }
        function B(X, te) {
          if (X === 2) {
            R = +te.srcElement.getAttribute("data-i"), z = +te.srcElement.getAttribute("data-j");
            var ie = b[R];
            i(ie) || p(ie) || function() {
              if (b.length && b[R] && b[R].length) {
                for (var le = [], oe = 0; oe < b[R].length; oe++)
                  oe !== z && le.push(b[R][oe]);
                le.length > 1 && (le.length !== 2 || le[1][0] !== "Z") && (z === 0 && (le[0][0] = "M"), b[R] = le, I(), P());
              }
            }();
          }
        }
        function U(X, te) {
          (function(ie, le) {
            if (b.length)
              for (var oe = 0; oe < b.length; oe++)
                for (var ve = 0; ve < b[oe].length; ve++)
                  for (var ue = 0; ue + 2 < b[oe][ve].length; ue += 2)
                    b[oe][ve][ue + 1] = j[oe][ve][ue + 1] + ie, b[oe][ve][ue + 2] = j[oe][ve][ue + 2] + le;
          })(X, te), I();
        }
        function ee(X) {
          (R = +X.srcElement.getAttribute("data-i")) || (R = 0), E[R].moveFn = U;
        }
        function N() {
          P();
        }
        function K(X) {
          X === 2 && function(te) {
            if (!!e(te._fullLayout.dragmode)) {
              h(te);
              var ie = te._fullLayout._activeSelectionIndex, le = (te.layout || {}).selections || [];
              if (ie < le.length) {
                for (var oe = [], ve = 0; ve < le.length; ve++)
                  ve !== ie && oe.push(le[ve]);
                delete te._fullLayout._activeSelectionIndex;
                var ue = te._fullLayout.selections[ie];
                te._fullLayout._deselect = { xref: ue.xref, yref: ue.yref }, r.call("_guiRelayout", te, { selections: oe });
              }
            }
          }(A);
        }
      };
    }, { "../../lib": 515, "../../registry": 647, "../color": 367, "../dragelement": 386, "../dragelement/helpers": 385, "../selections/draw_newselection/newselections": 453, "./draw_newshape/constants": 464, "./draw_newshape/helpers": 466, "./draw_newshape/newshapes": 467, "./handle_outline": 468 }], 462: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../../plots/cartesian/axes"), x = v("./draw_newshape/helpers").readPaths, e = v("./display_outlines"), r = v("./handle_outline").clearOutlineControllers, n = v("../color"), s = v("../drawing"), t = v("../../plot_api/plot_template").arrayEditor, d = v("../dragelement"), u = v("../../lib/setcursor"), o = v("./constants"), h = v("./helpers"), l = h.getPathString;
      function i(b) {
        var w = b._fullLayout;
        for (var T in w._shapeUpperLayer.selectAll("path").remove(), w._shapeLowerLayer.selectAll("path").remove(), w._plots) {
          var L = w._plots[T].shapelayer;
          L && L.selectAll("path").remove();
        }
        for (var A = 0; A < w.shapes.length; A++)
          w.shapes[A].visible && a(b, A);
      }
      function p(b) {
        return !!b._fullLayout._outlining;
      }
      function c(b) {
        return !b._context.edits.shapePosition;
      }
      function a(b, w) {
        b._fullLayout._paperdiv.selectAll('.shapelayer [data-index="' + w + '"]').remove();
        var T = h.makeShapesOptionsAndPlotinfo(b, w), L = T.options, A = T.plotinfo;
        L._input && L.visible !== !1 && (L.layer !== "below" ? I(b._fullLayout._shapeUpperLayer) : L.xref === "paper" || L.yref === "paper" ? I(b._fullLayout._shapeLowerLayer) : A._hadPlotinfo ? I((A.mainplotinfo || A).shapelayer) : I(b._fullLayout._shapeLowerLayer));
        function I(P) {
          var S = l(b, L), E = { "data-index": w, "fill-rule": L.fillrule, d: S }, R = L.opacity, z = L.fillcolor, j = L.line.width ? L.line.color : "rgba(0,0,0,0)", H = L.line.width, Y = L.line.dash;
          H || L.editable !== !0 || (H = 5, Y = "solid");
          var J = S[S.length - 1] !== "Z", W = c(b) && L.editable && b._fullLayout._activeShapeIndex === w;
          W && (z = J ? "rgba(0,0,0,0)" : b._fullLayout.activeshape.fillcolor, R = b._fullLayout.activeshape.opacity);
          var Z, re = P.append("path").attr(E).style("opacity", R).call(n.stroke, j).call(n.fill, z).call(s.dashLine, Y, H);
          if (y(re, b, L), (W || b._context.edits.shapePosition) && (Z = t(b.layout, "shapes", L)), W) {
            re.style({ cursor: "move" });
            var V = { element: re.node(), plotinfo: A, gd: b, editHelpers: Z, isActiveShape: !0 }, B = x(S, b);
            e(B, re, V);
          } else
            b._context.edits.shapePosition ? function(U, ee, N, K, X, te) {
              var ie, le, oe, ve, ue, ye, Ae, pe, ge, we, se, de, Te, Ee, Me, ze, Ie = N.xsizemode === "pixel", Oe = N.ysizemode === "pixel", Ze = N.type === "line", Fe = N.type === "path", Pe = te.modifyItem, De = k.getFromId(U, N.xref), Ge = k.getRefType(N.xref), Qe = k.getFromId(U, N.yref), ot = k.getRefType(N.yref), vt = h.getDataToPixel(U, De, !1, Ge), bt = h.getDataToPixel(U, Qe, !0, ot), yt = h.getPixelToData(U, De, !1, Ge), tt = h.getPixelToData(U, Qe, !0, ot), Ke = Ze ? function() {
                var It = Math.max(N.line.width, 10), Be = X.append("g").attr("data-index", K);
                Be.append("path").attr("d", ee.attr("d")).style({ cursor: "move", "stroke-width": It, "stroke-opacity": "0" });
                var He = { "fill-opacity": "0" }, he = Math.max(It / 2, 10);
                return Be.append("circle").attr({ "data-line-point": "start-point", cx: Ie ? vt(N.xanchor) + N.x0 : vt(N.x0), cy: Oe ? bt(N.yanchor) - N.y0 : bt(N.y0), r: he }).style(He).classed("cursor-grab", !0), Be.append("circle").attr({ "data-line-point": "end-point", cx: Ie ? vt(N.xanchor) + N.x1 : vt(N.x1), cy: Oe ? bt(N.yanchor) - N.y1 : bt(N.y1), r: he }).style(He).classed("cursor-grab", !0), Be;
              }() : ee, mt = { element: Ke.node(), gd: U, prepFn: function(It) {
                p(U) || (Ie && (ue = vt(N.xanchor)), Oe && (ye = bt(N.yanchor)), N.type === "path" ? Me = N.path : (ie = Ie ? N.x0 : vt(N.x0), le = Oe ? N.y0 : bt(N.y0), oe = Ie ? N.x1 : vt(N.x1), ve = Oe ? N.y1 : bt(N.y1)), ie < oe ? (ge = ie, Te = "x0", we = oe, Ee = "x1") : (ge = oe, Te = "x1", we = ie, Ee = "x0"), !Oe && le < ve || Oe && le > ve ? (Ae = le, se = "y0", pe = ve, de = "y1") : (Ae = ve, se = "y1", pe = le, de = "y0"), Ft(It), Gt(X, N), function(Be, He, he) {
                  var be = He.xref, Re = He.yref, Ue = k.getFromId(he, be), Xe = k.getFromId(he, Re), qe = "";
                  be === "paper" || Ue.autorange || (qe += be), Re === "paper" || Xe.autorange || (qe += Re), s.setClipUrl(Be, qe ? "clip" + he._fullLayout._uid + qe : null, he);
                }(ee, N, U), mt.moveFn = ze === "move" ? Vt : Xt, mt.altKey = It.altKey);
              }, doneFn: function() {
                p(U) || (u(ee), nr(X), y(ee, U, N), m.call("_guiRelayout", U, te.getUpdateObj()));
              }, clickFn: function() {
                p(U) || nr(X);
              } };
              function Ft(It) {
                if (p(U))
                  ze = null;
                else if (Ze)
                  ze = It.target.tagName === "path" ? "move" : It.target.attributes["data-line-point"].value === "start-point" ? "resize-over-start-point" : "resize-over-end-point";
                else {
                  var Be = mt.element.getBoundingClientRect(), He = Be.right - Be.left, he = Be.bottom - Be.top, be = It.clientX - Be.left, Re = It.clientY - Be.top, Ue = !Fe && He > 10 && he > 10 && !It.shiftKey ? d.getCursor(be / He, 1 - Re / he) : "move";
                  u(ee, Ue), ze = Ue.split("-")[0];
                }
              }
              function Vt(It, Be) {
                if (N.type === "path") {
                  var He = function(Re) {
                    return Re;
                  }, he = He, be = He;
                  Ie ? Pe("xanchor", N.xanchor = yt(ue + It)) : (he = function(Re) {
                    return yt(vt(Re) + It);
                  }, De && De.type === "date" && (he = h.encodeDate(he))), Oe ? Pe("yanchor", N.yanchor = tt(ye + Be)) : (be = function(Re) {
                    return tt(bt(Re) + Be);
                  }, Qe && Qe.type === "date" && (be = h.encodeDate(be))), Pe("path", N.path = f(Me, he, be));
                } else
                  Ie ? Pe("xanchor", N.xanchor = yt(ue + It)) : (Pe("x0", N.x0 = yt(ie + It)), Pe("x1", N.x1 = yt(oe + It))), Oe ? Pe("yanchor", N.yanchor = tt(ye + Be)) : (Pe("y0", N.y0 = tt(le + Be)), Pe("y1", N.y1 = tt(ve + Be)));
                ee.attr("d", l(U, N)), Gt(X, N);
              }
              function Xt(It, Be) {
                if (Fe) {
                  var He = function(Se) {
                    return Se;
                  }, he = He, be = He;
                  Ie ? Pe("xanchor", N.xanchor = yt(ue + It)) : (he = function(Se) {
                    return yt(vt(Se) + It);
                  }, De && De.type === "date" && (he = h.encodeDate(he))), Oe ? Pe("yanchor", N.yanchor = tt(ye + Be)) : (be = function(Se) {
                    return tt(bt(Se) + Be);
                  }, Qe && Qe.type === "date" && (be = h.encodeDate(be))), Pe("path", N.path = f(Me, he, be));
                } else if (Ze) {
                  if (ze === "resize-over-start-point") {
                    var Re = ie + It, Ue = Oe ? le - Be : le + Be;
                    Pe("x0", N.x0 = Ie ? Re : yt(Re)), Pe("y0", N.y0 = Oe ? Ue : tt(Ue));
                  } else if (ze === "resize-over-end-point") {
                    var Xe = oe + It, qe = Oe ? ve - Be : ve + Be;
                    Pe("x1", N.x1 = Ie ? Xe : yt(Xe)), Pe("y1", N.y1 = Oe ? qe : tt(qe));
                  }
                } else {
                  var st = function(Se) {
                    return ze.indexOf(Se) !== -1;
                  }, it = st("n"), Tt = st("s"), Pt = st("w"), rt = st("e"), ut = it ? Ae + Be : Ae, Bt = Tt ? pe + Be : pe, wt = Pt ? ge + It : ge, Lt = rt ? we + It : we;
                  Oe && (it && (ut = Ae - Be), Tt && (Bt = pe - Be)), (!Oe && Bt - ut > 10 || Oe && ut - Bt > 10) && (Pe(se, N[se] = Oe ? ut : tt(ut)), Pe(de, N[de] = Oe ? Bt : tt(Bt))), Lt - wt > 10 && (Pe(Te, N[Te] = Ie ? wt : yt(wt)), Pe(Ee, N[Ee] = Ie ? Lt : yt(Lt)));
                }
                ee.attr("d", l(U, N)), Gt(X, N);
              }
              function Gt(It, Be) {
                (Ie || Oe) && function() {
                  var He = Be.type !== "path", he = It.selectAll(".visual-cue").data([0]);
                  he.enter().append("path").attr({ fill: "#fff", "fill-rule": "evenodd", stroke: "#000", "stroke-width": 1 }).classed("visual-cue", !0);
                  var be = vt(Ie ? Be.xanchor : g.midRange(He ? [Be.x0, Be.x1] : h.extractPathCoords(Be.path, o.paramIsX))), Re = bt(Oe ? Be.yanchor : g.midRange(He ? [Be.y0, Be.y1] : h.extractPathCoords(Be.path, o.paramIsY)));
                  if (be = h.roundPositionForSharpStrokeRendering(be, 1), Re = h.roundPositionForSharpStrokeRendering(Re, 1), Ie && Oe) {
                    var Ue = "M" + (be - 1 - 1) + "," + (Re - 1 - 1) + "h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";
                    he.attr("d", Ue);
                  } else if (Ie) {
                    var Xe = "M" + (be - 1 - 1) + "," + (Re - 9 - 1) + "v18 h2 v-18 Z";
                    he.attr("d", Xe);
                  } else {
                    var qe = "M" + (be - 9 - 1) + "," + (Re - 1 - 1) + "h18 v2 h-18 Z";
                    he.attr("d", qe);
                  }
                }();
              }
              function nr(It) {
                It.selectAll(".visual-cue").remove();
              }
              d.init(mt), Ke.node().onmousemove = Ft;
            }(b, re, L, w, P, Z) : L.editable === !0 && re.style("pointer-events", J || n.opacity(z) * R <= 0.5 ? "stroke" : "all");
          re.node().addEventListener("click", function() {
            return function(U, ee) {
              if (!!c(U)) {
                var N = +ee.node().getAttribute("data-index");
                if (N >= 0) {
                  if (N === U._fullLayout._activeShapeIndex)
                    return void _(U);
                  U._fullLayout._activeShapeIndex = N, U._fullLayout._deactivateShape = _, i(U);
                }
              }
            }(b, re);
          });
        }
      }
      function y(b, w, T) {
        var L = (T.xref + T.yref).replace(/paper/g, "").replace(/[xyz][1-9]* *domain/g, "");
        s.setClipUrl(b, L ? "clip" + w._fullLayout._uid + L : null, w);
      }
      function f(b, w, T) {
        return b.replace(o.segmentRE, function(L) {
          var A = 0, I = L.charAt(0), P = o.paramIsX[I], S = o.paramIsY[I], E = o.numParams[I];
          return I + L.substr(1).replace(o.paramRE, function(R) {
            return A >= E || (P[A] ? R = w(R) : S[A] && (R = T(R)), A++), R;
          });
        });
      }
      function _(b) {
        c(b) && b._fullLayout._activeShapeIndex >= 0 && (r(b), delete b._fullLayout._activeShapeIndex, i(b));
      }
      Q.exports = { draw: i, drawOne: a, eraseActiveShape: function(b) {
        if (!!c(b)) {
          r(b);
          var w = b._fullLayout._activeShapeIndex, T = (b.layout || {}).shapes || [];
          if (w < T.length) {
            for (var L = [], A = 0; A < T.length; A++)
              A !== w && L.push(T[A]);
            delete b._fullLayout._activeShapeIndex, m.call("_guiRelayout", b, { shapes: L });
          }
        }
      } };
    }, { "../../lib": 515, "../../lib/setcursor": 536, "../../plot_api/plot_template": 555, "../../plots/cartesian/axes": 566, "../../registry": 647, "../color": 367, "../dragelement": 386, "../drawing": 389, "./constants": 459, "./display_outlines": 461, "./draw_newshape/helpers": 466, "./handle_outline": 468, "./helpers": 469 }], 463: [function(v, Q, $) {
      var m = v("../../drawing/attributes").dash, g = v("../../../lib/extend").extendFlat;
      Q.exports = { newshape: { line: { color: { valType: "color", editType: "none" }, width: { valType: "number", min: 0, dflt: 4, editType: "none" }, dash: g({}, m, { dflt: "solid", editType: "none" }), editType: "none" }, fillcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "none" }, fillrule: { valType: "enumerated", values: ["evenodd", "nonzero"], dflt: "evenodd", editType: "none" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "none" }, layer: { valType: "enumerated", values: ["below", "above"], dflt: "above", editType: "none" }, drawdirection: { valType: "enumerated", values: ["ortho", "horizontal", "vertical", "diagonal"], dflt: "diagonal", editType: "none" }, editType: "none" }, activeshape: { fillcolor: { valType: "color", dflt: "rgb(255,0,255)", editType: "none" }, opacity: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "none" }, editType: "none" } };
    }, { "../../../lib/extend": 505, "../../drawing/attributes": 388 }], 464: [function(v, Q, $) {
      Q.exports = { CIRCLE_SIDES: 32, i000: 0, i090: 8, i180: 16, i270: 24, cos45: Math.cos(Math.PI / 4), sin45: Math.sin(Math.PI / 4), SQRT2: Math.sqrt(2) };
    }, {}], 465: [function(v, Q, $) {
      var m = v("../../color");
      Q.exports = function(g, k, x) {
        if (x("newshape.drawdirection"), x("newshape.layer"), x("newshape.fillcolor"), x("newshape.fillrule"), x("newshape.opacity"), x("newshape.line.width")) {
          var e = (g || {}).plot_bgcolor || "#FFF";
          x("newshape.line.color", m.contrast(e)), x("newshape.line.dash");
        }
        x("activeshape.fillcolor"), x("activeshape.opacity");
      };
    }, { "../../color": 367 }], 466: [function(v, Q, $) {
      var m = v("parse-svg-path"), g = v("./constants"), k = g.CIRCLE_SIDES, x = g.SQRT2, e = v("../../selections/helpers"), r = e.p2r, n = e.r2p, s = [0, 3, 4, 5, 6, 1, 2], t = [0, 3, 4, 1, 2];
      function d(o, h) {
        return Math.abs(o - h) <= 1e-6;
      }
      function u(o, h) {
        var l = h[1] - o[1], i = h[2] - o[2];
        return Math.sqrt(l * l + i * i);
      }
      $.writePaths = function(o) {
        var h = o.length;
        if (!h)
          return "M0,0Z";
        for (var l = "", i = 0; i < h; i++)
          for (var p = o[i].length, c = 0; c < p; c++) {
            var a = o[i][c][0];
            if (a === "Z")
              l += "Z";
            else
              for (var y = o[i][c].length, f = 0; f < y; f++) {
                var _ = f;
                a === "Q" || a === "S" ? _ = t[f] : a === "C" && (_ = s[f]), l += o[i][c][_], f > 0 && f < y - 1 && (l += ",");
              }
          }
        return l;
      }, $.readPaths = function(o, h, l, i) {
        var p, c, a, y = m(o), f = [], _ = -1, b = 0, w = 0, T = function() {
          c = b, a = w;
        };
        T();
        for (var L = 0; L < y.length; L++) {
          var A, I, P, S, E = [], R = y[L][0], z = R;
          switch (R) {
            case "M":
              _++, f[_] = [], b = +y[L][1], w = +y[L][2], E.push([z, b, w]), T();
              break;
            case "Q":
            case "S":
              A = +y[L][1], P = +y[L][2], b = +y[L][3], w = +y[L][4], E.push([z, b, w, A, P]);
              break;
            case "C":
              A = +y[L][1], P = +y[L][2], I = +y[L][3], S = +y[L][4], b = +y[L][5], w = +y[L][6], E.push([z, b, w, A, P, I, S]);
              break;
            case "T":
            case "L":
              b = +y[L][1], w = +y[L][2], E.push([z, b, w]);
              break;
            case "H":
              z = "L", b = +y[L][1], E.push([z, b, w]);
              break;
            case "V":
              z = "L", w = +y[L][1], E.push([z, b, w]);
              break;
            case "A":
              z = "L";
              var j = +y[L][1], H = +y[L][2];
              +y[L][4] || (j = -j, H = -H);
              var Y = b - j, J = w;
              for (p = 1; p <= k / 2; p++) {
                var W = 2 * Math.PI * p / k;
                E.push([z, Y + j * Math.cos(W), J + H * Math.sin(W)]);
              }
              break;
            case "Z":
              b === c && w === a || (b = c, w = a, E.push([z, b, w]));
          }
          for (var Z = (l || {}).domain, re = h._fullLayout._size, V = l && l.xsizemode === "pixel", B = l && l.ysizemode === "pixel", U = i === !1, ee = 0; ee < E.length; ee++) {
            for (p = 0; p + 2 < 7; p += 2) {
              var N = E[ee][p + 1], K = E[ee][p + 2];
              N !== void 0 && K !== void 0 && (b = N, w = K, l && (l.xaxis && l.xaxis.p2r ? (U && (N -= l.xaxis._offset), N = V ? n(l.xaxis, l.xanchor) + N : r(l.xaxis, N)) : (U && (N -= re.l), Z ? N = Z.x[0] + N / re.w : N /= re.w), l.yaxis && l.yaxis.p2r ? (U && (K -= l.yaxis._offset), K = B ? n(l.yaxis, l.yanchor) - K : r(l.yaxis, K)) : (U && (K -= re.t), K = Z ? Z.y[1] - K / re.h : 1 - K / re.h)), E[ee][p + 1] = N, E[ee][p + 2] = K);
            }
            f[_].push(E[ee].slice());
          }
        }
        return f;
      }, $.pointsOnRectangle = function(o) {
        if (o.length !== 5)
          return !1;
        for (var h = 1; h < 3; h++)
          if (!d(o[0][h] - o[1][h], o[3][h] - o[2][h]) || !d(o[0][h] - o[3][h], o[1][h] - o[2][h]))
            return !1;
        return !(!d(o[0][1], o[1][1]) && !d(o[0][1], o[3][1])) && !!(u(o[0], o[1]) * u(o[0], o[3]));
      }, $.pointsOnEllipse = function(o) {
        var h = o.length;
        if (h !== k + 1)
          return !1;
        h = k;
        for (var l = 0; l < h; l++) {
          var i = (2 * h - l) % h, p = (h / 2 + i) % h, c = (h / 2 + l) % h;
          if (!d(u(o[l], o[c]), u(o[i], o[p])))
            return !1;
        }
        return !0;
      }, $.handleEllipse = function(o, h, l) {
        if (!o)
          return [h, l];
        var i = $.ellipseOver({ x0: h[0], y0: h[1], x1: l[0], y1: l[1] }), p = (i.x1 + i.x0) / 2, c = (i.y1 + i.y0) / 2, a = (i.x1 - i.x0) / 2, y = (i.y1 - i.y0) / 2;
        a || (a = y /= x), y || (y = a /= x);
        for (var f = [], _ = 0; _ < k; _++) {
          var b = 2 * _ * Math.PI / k;
          f.push([p + a * Math.cos(b), c + y * Math.sin(b)]);
        }
        return f;
      }, $.ellipseOver = function(o) {
        var h = o.x0, l = o.y0, i = o.x1, p = o.y1, c = i - h, a = p - l, y = ((h -= c) + i) / 2, f = ((l -= a) + p) / 2;
        return { x0: y - (c *= x), y0: f - (a *= x), x1: y + c, y1: f + a };
      }, $.fixDatesForPaths = function(o, h, l) {
        var i = h.type === "date", p = l.type === "date";
        if (!i && !p)
          return o;
        for (var c = 0; c < o.length; c++)
          for (var a = 0; a < o[c].length; a++)
            for (var y = 0; y + 2 < o[c][a].length; y += 2)
              i && (o[c][a][y + 1] = o[c][a][y + 1].replace(" ", "_")), p && (o[c][a][y + 2] = o[c][a][y + 2].replace(" ", "_"));
        return o;
      };
    }, { "../../selections/helpers": 454, "./constants": 464, "parse-svg-path": 250 }], 467: [function(v, Q, $) {
      var m = v("../../dragelement/helpers"), g = m.drawMode, k = m.openMode, x = v("./constants"), e = x.i000, r = x.i090, n = x.i180, s = x.i270, t = x.cos45, d = x.sin45, u = v("../../selections/helpers"), o = u.p2r, h = u.r2p, l = v(".././handle_outline").clearOutline, i = v("./helpers"), p = i.readPaths, c = i.writePaths, a = i.ellipseOver, y = i.fixDatesForPaths;
      Q.exports = function(f, _) {
        if (f.length) {
          var b = f[0][0];
          if (b) {
            var w = b.getAttribute("d"), T = _.gd, L = T._fullLayout.newshape, A = _.plotinfo, I = A.xaxis, P = A.yaxis, S = !!A.domain || !A.xaxis, E = !!A.domain || !A.yaxis, R = _.isActiveShape, z = _.dragmode, j = (T.layout || {}).shapes || [];
            if (!g(z) && R !== void 0) {
              var H = T._fullLayout._activeShapeIndex;
              if (H < j.length)
                switch (T._fullLayout.shapes[H].type) {
                  case "rect":
                    z = "drawrect";
                    break;
                  case "circle":
                    z = "drawcircle";
                    break;
                  case "line":
                    z = "drawline";
                    break;
                  case "path":
                    var Y = j[H].path || "";
                    z = Y[Y.length - 1] === "Z" ? "drawclosedpath" : "drawopenpath";
                }
            }
            var J, W = k(z), Z = p(w, T, A, R), re = { editable: !0, xref: S ? "paper" : I._id, yref: E ? "paper" : P._id, layer: L.layer, opacity: L.opacity, line: { color: L.line.color, width: L.line.width, dash: L.line.dash } };
            if (W || (re.fillcolor = L.fillcolor, re.fillrule = L.fillrule), Z.length === 1 && (J = Z[0]), J && J.length === 5 && z === "drawrect")
              re.type = "rect", re.x0 = J[0][1], re.y0 = J[0][2], re.x1 = J[2][1], re.y1 = J[2][2];
            else if (J && z === "drawline")
              re.type = "line", re.x0 = J[0][1], re.y0 = J[0][2], re.x1 = J[1][1], re.y1 = J[1][2];
            else if (J && z === "drawcircle") {
              re.type = "circle";
              var V = J[e][1], B = J[r][1], U = J[n][1], ee = J[s][1], N = J[e][2], K = J[r][2], X = J[n][2], te = J[s][2], ie = A.xaxis && (A.xaxis.type === "date" || A.xaxis.type === "log"), le = A.yaxis && (A.yaxis.type === "date" || A.yaxis.type === "log");
              ie && (V = h(A.xaxis, V), B = h(A.xaxis, B), U = h(A.xaxis, U), ee = h(A.xaxis, ee)), le && (N = h(A.yaxis, N), K = h(A.yaxis, K), X = h(A.yaxis, X), te = h(A.yaxis, te));
              var oe = (B + ee) / 2, ve = (N + X) / 2, ue = a({ x0: oe, y0: ve, x1: oe + (ee - B + U - V) / 2 * t, y1: ve + (te - K + X - N) / 2 * d });
              ie && (ue.x0 = o(A.xaxis, ue.x0), ue.x1 = o(A.xaxis, ue.x1)), le && (ue.y0 = o(A.yaxis, ue.y0), ue.y1 = o(A.yaxis, ue.y1)), re.x0 = ue.x0, re.y0 = ue.y0, re.x1 = ue.x1, re.y1 = ue.y1;
            } else
              re.type = "path", I && P && y(Z, I, P), re.path = c(Z), J = null;
            l(T);
            for (var ye = _.editHelpers, Ae = (ye || {}).modifyItem, pe = [], ge = 0; ge < j.length; ge++) {
              var we = T._fullLayout.shapes[ge];
              if (pe[ge] = we._input, R !== void 0 && ge === T._fullLayout._activeShapeIndex) {
                var se = re;
                switch (we.type) {
                  case "line":
                  case "rect":
                  case "circle":
                    Ae("x0", se.x0), Ae("x1", se.x1), Ae("y0", se.y0), Ae("y1", se.y1);
                    break;
                  case "path":
                    Ae("path", se.path);
                }
              }
            }
            return R === void 0 ? (pe.push(re), pe) : ye ? ye.getUpdateObj() : {};
          }
        }
      };
    }, { "../../dragelement/helpers": 385, "../../selections/helpers": 454, ".././handle_outline": 468, "./constants": 464, "./helpers": 466 }], 468: [function(v, Q, $) {
      Q.exports = { clearOutlineControllers: function(m) {
        var g = m._fullLayout._zoomlayer;
        g && g.selectAll(".outline-controllers").remove();
      }, clearOutline: function(m) {
        var g = m._fullLayout._zoomlayer;
        g && g.selectAll(".select-outline").remove(), m._fullLayout._outlining = !1;
      } };
    }, {}], 469: [function(v, Q, $) {
      var m = v("./constants"), g = v("../../lib"), k = v("../../plots/cartesian/axes");
      $.rangeToShapePosition = function(x) {
        return x.type === "log" ? x.r2d : function(e) {
          return e;
        };
      }, $.shapePositionToRange = function(x) {
        return x.type === "log" ? x.d2r : function(e) {
          return e;
        };
      }, $.decodeDate = function(x) {
        return function(e) {
          return e.replace && (e = e.replace("_", " ")), x(e);
        };
      }, $.encodeDate = function(x) {
        return function(e) {
          return x(e).replace(" ", "_");
        };
      }, $.extractPathCoords = function(x, e, r) {
        var n = [];
        return x.match(m.segmentRE).forEach(function(s) {
          var t = e[s.charAt(0)].drawn;
          if (t !== void 0) {
            var d = s.substr(1).match(m.paramRE);
            if (d && !(d.length < t)) {
              var u = d[t], o = r ? u : g.cleanNumber(u);
              n.push(o);
            }
          }
        }), n;
      }, $.getDataToPixel = function(x, e, r, n) {
        var s, t = x._fullLayout._size;
        if (e)
          if (n === "domain")
            s = function(u) {
              return e._length * (r ? 1 - u : u) + e._offset;
            };
          else {
            var d = $.shapePositionToRange(e);
            s = function(u) {
              return e._offset + e.r2p(d(u, !0));
            }, e.type === "date" && (s = $.decodeDate(s));
          }
        else
          s = r ? function(u) {
            return t.t + t.h * (1 - u);
          } : function(u) {
            return t.l + t.w * u;
          };
        return s;
      }, $.getPixelToData = function(x, e, r, n) {
        var s, t = x._fullLayout._size;
        if (e)
          if (n === "domain")
            s = function(u) {
              var o = (u - e._offset) / e._length;
              return r ? 1 - o : o;
            };
          else {
            var d = $.rangeToShapePosition(e);
            s = function(u) {
              return d(e.p2r(u - e._offset));
            };
          }
        else
          s = r ? function(u) {
            return 1 - (u - t.t) / t.h;
          } : function(u) {
            return (u - t.l) / t.w;
          };
        return s;
      }, $.roundPositionForSharpStrokeRendering = function(x, e) {
        var r = Math.round(e % 2) === 1, n = Math.round(x);
        return r ? n + 0.5 : n;
      }, $.makeShapesOptionsAndPlotinfo = function(x, e) {
        var r = x._fullLayout.shapes[e] || {}, n = x._fullLayout._plots[r.xref + r.yref];
        return n ? n._hadPlotinfo = !0 : (n = {}, r.xref && r.xref !== "paper" && (n.xaxis = x._fullLayout[r.xref + "axis"]), r.yref && r.yref !== "paper" && (n.yaxis = x._fullLayout[r.yref + "axis"])), n.xsizemode = r.xsizemode, n.ysizemode = r.ysizemode, n.xanchor = r.xanchor, n.yanchor = r.yanchor, { options: r, plotinfo: n };
      }, $.makeSelectionsOptionsAndPlotinfo = function(x, e) {
        var r = x._fullLayout.selections[e] || {}, n = x._fullLayout._plots[r.xref + r.yref];
        return n ? n._hadPlotinfo = !0 : (n = {}, r.xref && (n.xaxis = x._fullLayout[r.xref + "axis"]), r.yref && (n.yaxis = x._fullLayout[r.yref + "axis"])), { options: r, plotinfo: n };
      }, $.getPathString = function(x, e) {
        var r, n, s, t, d, u, o, h, l = e.type, i = k.getRefType(e.xref), p = k.getRefType(e.yref), c = k.getFromId(x, e.xref), a = k.getFromId(x, e.yref), y = x._fullLayout._size;
        if (c ? i === "domain" ? n = function(P) {
          return c._offset + c._length * P;
        } : (r = $.shapePositionToRange(c), n = function(P) {
          return c._offset + c.r2p(r(P, !0));
        }) : n = function(P) {
          return y.l + y.w * P;
        }, a ? p === "domain" ? t = function(P) {
          return a._offset + a._length * (1 - P);
        } : (s = $.shapePositionToRange(a), t = function(P) {
          return a._offset + a.r2p(s(P, !0));
        }) : t = function(P) {
          return y.t + y.h * (1 - P);
        }, l === "path")
          return c && c.type === "date" && (n = $.decodeDate(n)), a && a.type === "date" && (t = $.decodeDate(t)), function(P, S, E) {
            var R = P.path, z = P.xsizemode, j = P.ysizemode, H = P.xanchor, Y = P.yanchor;
            return R.replace(m.segmentRE, function(J) {
              var W = 0, Z = J.charAt(0), re = m.paramIsX[Z], V = m.paramIsY[Z], B = m.numParams[Z], U = J.substr(1).replace(m.paramRE, function(ee) {
                return re[W] ? ee = z === "pixel" ? S(H) + Number(ee) : S(ee) : V[W] && (ee = j === "pixel" ? E(Y) - Number(ee) : E(ee)), ++W > B && (ee = "X"), ee;
              });
              return W > B && (U = U.replace(/[\s,]*X.*/, ""), g.log("Ignoring extra params in segment " + J)), Z + U;
            });
          }(e, n, t);
        if (e.xsizemode === "pixel") {
          var f = n(e.xanchor);
          d = f + e.x0, u = f + e.x1;
        } else
          d = n(e.x0), u = n(e.x1);
        if (e.ysizemode === "pixel") {
          var _ = t(e.yanchor);
          o = _ - e.y0, h = _ - e.y1;
        } else
          o = t(e.y0), h = t(e.y1);
        if (l === "line")
          return "M" + d + "," + o + "L" + u + "," + h;
        if (l === "rect")
          return "M" + d + "," + o + "H" + u + "V" + h + "H" + d + "Z";
        var b = (d + u) / 2, w = (o + h) / 2, T = Math.abs(b - d), L = Math.abs(w - o), A = "A" + T + "," + L, I = b + T + "," + w;
        return "M" + I + A + " 0 1,1 " + (b + "," + (w - L)) + A + " 0 0,1 " + I + "Z";
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "./constants": 459 }], 470: [function(v, Q, $) {
      var m = v("./draw");
      Q.exports = { moduleType: "component", name: "shapes", layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), supplyDrawNewShapeDefaults: v("./draw_newshape/defaults"), includeBasePlot: v("../../plots/cartesian/include_components")("shapes"), calcAutorange: v("./calc_autorange"), draw: m.draw, drawOne: m.drawOne };
    }, { "../../plots/cartesian/include_components": 577, "./attributes": 457, "./calc_autorange": 458, "./defaults": 460, "./draw": 462, "./draw_newshape/defaults": 465 }], 471: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("../../plots/pad_attributes"), k = v("../../lib/extend").extendDeepAll, x = v("../../plot_api/edit_types").overrideAll, e = v("../../plots/animation_attributes"), r = v("../../plot_api/plot_template").templatedArray, n = v("./constants"), s = r("step", { visible: { valType: "boolean", dflt: !0 }, method: { valType: "enumerated", values: ["restyle", "relayout", "animate", "update", "skip"], dflt: "restyle" }, args: { valType: "info_array", freeLength: !0, items: [{ valType: "any" }, { valType: "any" }, { valType: "any" }] }, label: { valType: "string" }, value: { valType: "string" }, execute: { valType: "boolean", dflt: !0 } });
      Q.exports = x(r("slider", { visible: { valType: "boolean", dflt: !0 }, active: { valType: "number", min: 0, dflt: 0 }, steps: s, lenmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "fraction" }, len: { valType: "number", min: 0, dflt: 1 }, x: { valType: "number", min: -2, max: 3, dflt: 0 }, pad: k(g({ editType: "arraydraw" }), {}, { t: { dflt: 20 } }), xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "left" }, y: { valType: "number", min: -2, max: 3, dflt: 0 }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "top" }, transition: { duration: { valType: "number", min: 0, dflt: 150 }, easing: { valType: "enumerated", values: e.transition.easing.values, dflt: "cubic-in-out" } }, currentvalue: { visible: { valType: "boolean", dflt: !0 }, xanchor: { valType: "enumerated", values: ["left", "center", "right"], dflt: "left" }, offset: { valType: "number", dflt: 10 }, prefix: { valType: "string" }, suffix: { valType: "string" }, font: m({}) }, font: m({}), activebgcolor: { valType: "color", dflt: n.gripBgActiveColor }, bgcolor: { valType: "color", dflt: n.railBgColor }, bordercolor: { valType: "color", dflt: n.railBorderColor }, borderwidth: { valType: "number", min: 0, dflt: n.railBorderWidth }, ticklen: { valType: "number", min: 0, dflt: n.tickLength }, tickcolor: { valType: "color", dflt: n.tickColor }, tickwidth: { valType: "number", min: 0, dflt: 1 }, minorticklen: { valType: "number", min: 0, dflt: n.minorTickLength } }), "arraydraw", "from-root");
    }, { "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../../plots/animation_attributes": 560, "../../plots/font_attributes": 594, "../../plots/pad_attributes": 627, "./constants": 472 }], 472: [function(v, Q, $) {
      Q.exports = { name: "sliders", containerClassName: "slider-container", groupClassName: "slider-group", inputAreaClass: "slider-input-area", railRectClass: "slider-rail-rect", railTouchRectClass: "slider-rail-touch-rect", gripRectClass: "slider-grip-rect", tickRectClass: "slider-tick-rect", inputProxyClass: "slider-input-proxy", labelsClass: "slider-labels", labelGroupClass: "slider-label-group", labelClass: "slider-label", currentValueClass: "slider-current-value", railHeight: 5, menuIndexAttrName: "slider-active-index", autoMarginIdRoot: "slider-", minWidth: 30, minHeight: 30, textPadX: 40, arrowOffsetX: 4, railRadius: 2, railWidth: 5, railBorder: 4, railBorderWidth: 1, railBorderColor: "#bec8d9", railBgColor: "#f8fafc", railInset: 8, stepInset: 10, gripRadius: 10, gripWidth: 20, gripHeight: 20, gripBorder: 20, gripBorderWidth: 1, gripBorderColor: "#bec8d9", gripBgColor: "#f6f8fa", gripBgActiveColor: "#dbdde0", labelPadding: 8, labelOffset: 0, tickWidth: 1, tickColor: "#333", tickOffset: 25, tickLength: 7, minorTickOffset: 25, minorTickColor: "#333", minorTickLength: 4, currentValuePadding: 8, currentValueInset: 0 };
    }, {}], 473: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/array_container_defaults"), k = v("./attributes"), x = v("./constants").name, e = k.steps;
      function r(s, t, d) {
        function u(p, c) {
          return m.coerce(s, t, k, p, c);
        }
        for (var o = g(s, t, { name: "steps", handleItemDefaults: n }), h = 0, l = 0; l < o.length; l++)
          o[l].visible && h++;
        if (h < 2 ? t.visible = !1 : u("visible")) {
          t._stepCount = h;
          var i = t._visibleSteps = m.filterVisible(o);
          (o[u("active")] || {}).visible || (t.active = i[0]._index), u("x"), u("y"), m.noneOrAll(s, t, ["x", "y"]), u("xanchor"), u("yanchor"), u("len"), u("lenmode"), u("pad.t"), u("pad.r"), u("pad.b"), u("pad.l"), m.coerceFont(u, "font", d.font), u("currentvalue.visible") && (u("currentvalue.xanchor"), u("currentvalue.prefix"), u("currentvalue.suffix"), u("currentvalue.offset"), m.coerceFont(u, "currentvalue.font", t.font)), u("transition.duration"), u("transition.easing"), u("bgcolor"), u("activebgcolor"), u("bordercolor"), u("borderwidth"), u("ticklen"), u("tickwidth"), u("tickcolor"), u("minorticklen");
        }
      }
      function n(s, t) {
        function d(o, h) {
          return m.coerce(s, t, e, o, h);
        }
        if (s.method === "skip" || Array.isArray(s.args) ? d("visible") : t.visible = !1) {
          d("method"), d("args");
          var u = d("label", "step-" + t._index);
          d("value", u), d("execute");
        }
      }
      Q.exports = function(s, t) {
        g(s, t, { name: x, handleItemDefaults: r });
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "./attributes": 471, "./constants": 472 }], 474: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../plots/plots"), k = v("../color"), x = v("../drawing"), e = v("../../lib"), r = e.strTranslate, n = v("../../lib/svg_text_utils"), s = v("../../plot_api/plot_template").arrayEditor, t = v("./constants"), d = v("../../constants/alignment"), u = d.LINE_SPACING, o = d.FROM_TL, h = d.FROM_BR;
      function l(E) {
        return t.autoMarginIdRoot + E._index;
      }
      function i(E) {
        return E._index;
      }
      function p(E, R) {
        var z = x.tester.selectAll("g." + t.labelGroupClass).data(R._visibleSteps);
        z.enter().append("g").classed(t.labelGroupClass, !0);
        var j = 0, H = 0;
        z.each(function(ee) {
          var N = y(m.select(this), { step: ee }, R).node();
          if (N) {
            var K = x.bBox(N);
            H = Math.max(H, K.height), j = Math.max(j, K.width);
          }
        }), z.remove();
        var Y = R._dims = {};
        Y.inputAreaWidth = Math.max(t.railWidth, t.gripHeight);
        var J = E._fullLayout._size;
        Y.lx = J.l + J.w * R.x, Y.ly = J.t + J.h * (1 - R.y), R.lenmode === "fraction" ? Y.outerLength = Math.round(J.w * R.len) : Y.outerLength = R.len, Y.inputAreaStart = 0, Y.inputAreaLength = Math.round(Y.outerLength - R.pad.l - R.pad.r);
        var W = (Y.inputAreaLength - 2 * t.stepInset) / (R._stepCount - 1), Z = j + t.labelPadding;
        if (Y.labelStride = Math.max(1, Math.ceil(Z / W)), Y.labelHeight = H, Y.currentValueMaxWidth = 0, Y.currentValueHeight = 0, Y.currentValueTotalHeight = 0, Y.currentValueMaxLines = 1, R.currentvalue.visible) {
          var re = x.tester.append("g");
          z.each(function(ee) {
            var N = c(re, R, ee.label), K = N.node() && x.bBox(N.node()) || { width: 0, height: 0 }, X = n.lineCount(N);
            Y.currentValueMaxWidth = Math.max(Y.currentValueMaxWidth, Math.ceil(K.width)), Y.currentValueHeight = Math.max(Y.currentValueHeight, Math.ceil(K.height)), Y.currentValueMaxLines = Math.max(Y.currentValueMaxLines, X);
          }), Y.currentValueTotalHeight = Y.currentValueHeight + R.currentvalue.offset, re.remove();
        }
        Y.height = Y.currentValueTotalHeight + t.tickOffset + R.ticklen + t.labelOffset + Y.labelHeight + R.pad.t + R.pad.b;
        var V = "left";
        e.isRightAnchor(R) && (Y.lx -= Y.outerLength, V = "right"), e.isCenterAnchor(R) && (Y.lx -= Y.outerLength / 2, V = "center");
        var B = "top";
        e.isBottomAnchor(R) && (Y.ly -= Y.height, B = "bottom"), e.isMiddleAnchor(R) && (Y.ly -= Y.height / 2, B = "middle"), Y.outerLength = Math.ceil(Y.outerLength), Y.height = Math.ceil(Y.height), Y.lx = Math.round(Y.lx), Y.ly = Math.round(Y.ly);
        var U = { y: R.y, b: Y.height * h[B], t: Y.height * o[B] };
        R.lenmode === "fraction" ? (U.l = 0, U.xl = R.x - R.len * o[V], U.r = 0, U.xr = R.x + R.len * h[V]) : (U.x = R.x, U.l = Y.outerLength * o[V], U.r = Y.outerLength * h[V]), g.autoMargin(E, l(R), U);
      }
      function c(E, R, z) {
        if (R.currentvalue.visible) {
          var j, H, Y = R._dims;
          switch (R.currentvalue.xanchor) {
            case "right":
              j = Y.inputAreaLength - t.currentValueInset - Y.currentValueMaxWidth, H = "left";
              break;
            case "center":
              j = 0.5 * Y.inputAreaLength, H = "middle";
              break;
            default:
              j = t.currentValueInset, H = "left";
          }
          var J = e.ensureSingle(E, "text", t.labelClass, function(U) {
            U.attr({ "text-anchor": H, "data-notex": 1 });
          }), W = R.currentvalue.prefix ? R.currentvalue.prefix : "";
          if (typeof z == "string")
            W += z;
          else {
            var Z = R.steps[R.active].label, re = R._gd._fullLayout._meta;
            re && (Z = e.templateString(Z, re)), W += Z;
          }
          R.currentvalue.suffix && (W += R.currentvalue.suffix), J.call(x.font, R.currentvalue.font).text(W).call(n.convertToTspans, R._gd);
          var V = n.lineCount(J), B = (Y.currentValueMaxLines + 1 - V) * R.currentvalue.font.size * u;
          return n.positionText(J, j, B), J;
        }
      }
      function a(E, R, z) {
        e.ensureSingle(E, "rect", t.gripRectClass, function(j) {
          j.call(w, R, E, z).style("pointer-events", "all");
        }).attr({ width: t.gripWidth, height: t.gripHeight, rx: t.gripRadius, ry: t.gripRadius }).call(k.stroke, z.bordercolor).call(k.fill, z.bgcolor).style("stroke-width", z.borderwidth + "px");
      }
      function y(E, R, z) {
        var j = e.ensureSingle(E, "text", t.labelClass, function(J) {
          J.attr({ "text-anchor": "middle", "data-notex": 1 });
        }), H = R.step.label, Y = z._gd._fullLayout._meta;
        return Y && (H = e.templateString(H, Y)), j.call(x.font, z.font).text(H).call(n.convertToTspans, z._gd), j;
      }
      function f(E, R) {
        var z = e.ensureSingle(E, "g", t.labelsClass), j = R._dims, H = z.selectAll("g." + t.labelGroupClass).data(j.labelSteps);
        H.enter().append("g").classed(t.labelGroupClass, !0), H.exit().remove(), H.each(function(Y) {
          var J = m.select(this);
          J.call(y, Y, R), x.setTranslate(J, A(R, Y.fraction), t.tickOffset + R.ticklen + R.font.size * u + t.labelOffset + j.currentValueTotalHeight);
        });
      }
      function _(E, R, z, j, H) {
        var Y = Math.round(j * (z._stepCount - 1)), J = z._visibleSteps[Y]._index;
        J !== z.active && b(E, R, z, J, !0, H);
      }
      function b(E, R, z, j, H, Y) {
        var J = z.active;
        z.active = j, s(E.layout, t.name, z).applyUpdate("active", j);
        var W = z.steps[z.active];
        R.call(L, z, Y), R.call(c, z), E.emit("plotly_sliderchange", { slider: z, step: z.steps[z.active], interaction: H, previousActive: J }), W && W.method && H && (R._nextMethod ? (R._nextMethod.step = W, R._nextMethod.doCallback = H, R._nextMethod.doTransition = Y) : (R._nextMethod = { step: W, doCallback: H, doTransition: Y }, R._nextMethodRaf = window.requestAnimationFrame(function() {
          var Z = R._nextMethod.step;
          Z.method && (Z.execute && g.executeAPICommand(E, Z.method, Z.args), R._nextMethod = null, R._nextMethodRaf = null);
        })));
      }
      function w(E, R, z) {
        var j = z.node(), H = m.select(R);
        function Y() {
          return z.data()[0];
        }
        function J() {
          var W = Y();
          R.emit("plotly_sliderstart", { slider: W });
          var Z = z.select("." + t.gripRectClass);
          m.event.stopPropagation(), m.event.preventDefault(), Z.call(k.fill, W.activebgcolor);
          var re = I(W, m.mouse(j)[0]);
          function V() {
            var U = Y(), ee = I(U, m.mouse(j)[0]);
            _(R, z, U, ee, !1);
          }
          function B() {
            var U = Y();
            U._dragging = !1, Z.call(k.fill, U.bgcolor), H.on("mouseup", null), H.on("mousemove", null), H.on("touchend", null), H.on("touchmove", null), R.emit("plotly_sliderend", { slider: U, step: U.steps[U.active] });
          }
          _(R, z, W, re, !0), W._dragging = !0, H.on("mousemove", V), H.on("touchmove", V), H.on("mouseup", B), H.on("touchend", B);
        }
        E.on("mousedown", J), E.on("touchstart", J);
      }
      function T(E, R) {
        var z = E.selectAll("rect." + t.tickRectClass).data(R._visibleSteps), j = R._dims;
        z.enter().append("rect").classed(t.tickRectClass, !0), z.exit().remove(), z.attr({ width: R.tickwidth + "px", "shape-rendering": "crispEdges" }), z.each(function(H, Y) {
          var J = Y % j.labelStride == 0, W = m.select(this);
          W.attr({ height: J ? R.ticklen : R.minorticklen }).call(k.fill, R.tickcolor), x.setTranslate(W, A(R, Y / (R._stepCount - 1)) - 0.5 * R.tickwidth, (J ? t.tickOffset : t.minorTickOffset) + j.currentValueTotalHeight);
        });
      }
      function L(E, R, z) {
        for (var j = E.select("rect." + t.gripRectClass), H = 0, Y = 0; Y < R._stepCount; Y++)
          if (R._visibleSteps[Y]._index === R.active) {
            H = Y;
            break;
          }
        var J = A(R, H / (R._stepCount - 1));
        if (!R._invokingCommand) {
          var W = j;
          z && R.transition.duration > 0 && (W = W.transition().duration(R.transition.duration).ease(R.transition.easing)), W.attr("transform", r(J - 0.5 * t.gripWidth, R._dims.currentValueTotalHeight));
        }
      }
      function A(E, R) {
        var z = E._dims;
        return z.inputAreaStart + t.stepInset + (z.inputAreaLength - 2 * t.stepInset) * Math.min(1, Math.max(0, R));
      }
      function I(E, R) {
        var z = E._dims;
        return Math.min(1, Math.max(0, (R - t.stepInset - z.inputAreaStart) / (z.inputAreaLength - 2 * t.stepInset - 2 * z.inputAreaStart)));
      }
      function P(E, R, z) {
        var j = z._dims, H = e.ensureSingle(E, "rect", t.railTouchRectClass, function(Y) {
          Y.call(w, R, E, z).style("pointer-events", "all");
        });
        H.attr({ width: j.inputAreaLength, height: Math.max(j.inputAreaWidth, t.tickOffset + z.ticklen + j.labelHeight) }).call(k.fill, z.bgcolor).attr("opacity", 0), x.setTranslate(H, 0, j.currentValueTotalHeight);
      }
      function S(E, R) {
        var z = R._dims, j = z.inputAreaLength - 2 * t.railInset, H = e.ensureSingle(E, "rect", t.railRectClass);
        H.attr({ width: j, height: t.railWidth, rx: t.railRadius, ry: t.railRadius, "shape-rendering": "crispEdges" }).call(k.stroke, R.bordercolor).call(k.fill, R.bgcolor).style("stroke-width", R.borderwidth + "px"), x.setTranslate(H, t.railInset, 0.5 * (z.inputAreaWidth - t.railWidth) + z.currentValueTotalHeight);
      }
      Q.exports = function(E) {
        var R = E._fullLayout, z = function(Z, re) {
          for (var V = Z[t.name], B = [], U = 0; U < V.length; U++) {
            var ee = V[U];
            ee.visible && (ee._gd = re, B.push(ee));
          }
          return B;
        }(R, E), j = R._infolayer.selectAll("g." + t.containerClassName).data(z.length > 0 ? [0] : []);
        function H(Z) {
          Z._commandObserver && (Z._commandObserver.remove(), delete Z._commandObserver), g.autoMargin(E, l(Z));
        }
        if (j.enter().append("g").classed(t.containerClassName, !0).style("cursor", "ew-resize"), j.exit().each(function() {
          m.select(this).selectAll("g." + t.groupClassName).each(H);
        }).remove(), z.length !== 0) {
          var Y = j.selectAll("g." + t.groupClassName).data(z, i);
          Y.enter().append("g").classed(t.groupClassName, !0), Y.exit().each(H).remove();
          for (var J = 0; J < z.length; J++) {
            var W = z[J];
            p(E, W);
          }
          Y.each(function(Z) {
            var re = m.select(this);
            (function(V) {
              var B = V._dims;
              B.labelSteps = [];
              for (var U = V._stepCount, ee = 0; ee < U; ee += B.labelStride)
                B.labelSteps.push({ fraction: ee / (U - 1), step: V._visibleSteps[ee] });
            })(Z), g.manageCommandObserver(E, Z, Z._visibleSteps, function(V) {
              var B = re.data()[0];
              B.active !== V.index && (B._dragging || b(E, re, B, V.index, !1, !0));
            }), function(V, B, U) {
              (U.steps[U.active] || {}).visible || (U.active = U._visibleSteps[0]._index), B.call(c, U).call(S, U).call(f, U).call(T, U).call(P, V, U).call(a, V, U);
              var ee = U._dims;
              x.setTranslate(B, ee.lx + U.pad.l, ee.ly + U.pad.t), B.call(L, U, !1), B.call(c, U);
            }(E, m.select(this), Z);
          });
        }
      };
    }, { "../../constants/alignment": 483, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plot_api/plot_template": 555, "../../plots/plots": 628, "../color": 367, "../drawing": 389, "./constants": 472, "@plotly/d3": 58 }], 475: [function(v, Q, $) {
      var m = v("./constants");
      Q.exports = { moduleType: "component", name: m.name, layoutAttributes: v("./attributes"), supplyLayoutDefaults: v("./defaults"), draw: v("./draw") };
    }, { "./attributes": 471, "./constants": 472, "./defaults": 473, "./draw": 474 }], 476: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../../plots/plots"), x = v("../../registry"), e = v("../../lib"), r = e.strTranslate, n = v("../drawing"), s = v("../color"), t = v("../../lib/svg_text_utils"), d = v("../../constants/interactions"), u = v("../../constants/alignment").OPPOSITE_SIDE, o = / [XY][0-9]* /;
      Q.exports = { draw: function(h, l, i) {
        var p, c = i.propContainer, a = i.propName, y = i.placeholder, f = i.traceIndex, _ = i.avoid || {}, b = i.attributes, w = i.transform, T = i.containerGroup, L = h._fullLayout, A = 1, I = !1, P = c.title, S = (P && P.text ? P.text : "").trim(), E = P && P.font ? P.font : {}, R = E.family, z = E.size, j = E.color;
        a === "title.text" ? p = "titleText" : a.indexOf("axis") !== -1 ? p = "axisTitleText" : a.indexOf(!0) && (p = "colorbarTitleText");
        var H = h._context.edits[p];
        S === "" ? A = 0 : S.replace(o, " % ") === y.replace(o, " % ") && (A = 0.2, I = !0, H || (S = "")), i._meta ? S = e.templateString(S, i._meta) : L._meta && (S = e.templateString(S, L._meta));
        var Y, J = S || H;
        T || (T = e.ensureSingle(L._infolayer, "g", "g-" + l), Y = L._hColorbarMoveTitle);
        var W = T.selectAll("text").data(J ? [0] : []);
        if (W.enter().append("text"), W.text(S).attr("class", l), W.exit().remove(), !J)
          return T;
        function Z(B) {
          e.syncOrAsync([re, V], B);
        }
        function re(B) {
          var U;
          return !w && Y && (w = {}), w ? (U = "", w.rotate && (U += "rotate(" + [w.rotate, b.x, b.y] + ")"), (w.offset || Y) && (U += r(0, (w.offset || 0) - (Y || 0)))) : U = null, B.attr("transform", U), B.style({ "font-family": R, "font-size": m.round(z, 2) + "px", fill: s.rgb(j), opacity: A * s.opacity(j), "font-weight": k.fontWeight }).attr(b).call(t.convertToTspans, h), k.previousPromises(h);
        }
        function V(B) {
          var U = m.select(B.node().parentNode);
          if (_ && _.selection && _.side && S) {
            U.attr("transform", null);
            var ee = u[_.side], N = _.side === "left" || _.side === "top" ? -1 : 1, K = g(_.pad) ? _.pad : 2, X = n.bBox(U.node()), te = { left: 0, top: 0, right: L.width, bottom: L.height }, ie = _.maxShift || N * (te[_.side] - X[_.side]), le = 0;
            if (ie < 0)
              le = ie;
            else {
              var oe = _.offsetLeft || 0, ve = _.offsetTop || 0;
              X.left -= oe, X.right -= oe, X.top -= ve, X.bottom -= ve, _.selection.each(function() {
                var ye = n.bBox(this);
                e.bBoxIntersect(X, ye, K) && (le = Math.max(le, N * (ye[_.side] - X[ee]) + K));
              }), le = Math.min(ie, le);
            }
            if (le > 0 || ie < 0) {
              var ue = { left: [-le, 0], right: [le, 0], top: [0, -le], bottom: [0, le] }[_.side];
              U.attr("transform", r(ue[0], ue[1]));
            }
          }
        }
        return W.call(Z), H && (S ? W.on(".opacity", null) : (A = 0, I = !0, W.text(y).on("mouseover.opacity", function() {
          m.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity", 1);
        }).on("mouseout.opacity", function() {
          m.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity", 0);
        })), W.call(t.makeEditable, { gd: h }).on("edit", function(B) {
          f !== void 0 ? x.call("_guiRestyle", h, a, B, f) : x.call("_guiRelayout", h, a, B);
        }).on("cancel", function() {
          this.text(this.attr("data-unformatted")).call(Z);
        }).on("input", function(B) {
          this.text(B || " ").call(t.positionText, b.x, b.y);
        })), W.classed("js-placeholder", I), T;
      } };
    }, { "../../constants/alignment": 483, "../../constants/interactions": 490, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/plots": 628, "../../registry": 647, "../color": 367, "../drawing": 389, "@plotly/d3": 58, "fast-isnumeric": 190 }], 477: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("../color/attributes"), k = v("../../lib/extend").extendFlat, x = v("../../plot_api/edit_types").overrideAll, e = v("../../plots/pad_attributes"), r = v("../../plot_api/plot_template").templatedArray, n = r("button", { visible: { valType: "boolean" }, method: { valType: "enumerated", values: ["restyle", "relayout", "animate", "update", "skip"], dflt: "restyle" }, args: { valType: "info_array", freeLength: !0, items: [{ valType: "any" }, { valType: "any" }, { valType: "any" }] }, args2: { valType: "info_array", freeLength: !0, items: [{ valType: "any" }, { valType: "any" }, { valType: "any" }] }, label: { valType: "string", dflt: "" }, execute: { valType: "boolean", dflt: !0 } });
      Q.exports = x(r("updatemenu", { _arrayAttrRegexps: [/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/], visible: { valType: "boolean" }, type: { valType: "enumerated", values: ["dropdown", "buttons"], dflt: "dropdown" }, direction: { valType: "enumerated", values: ["left", "right", "up", "down"], dflt: "down" }, active: { valType: "integer", min: -1, dflt: 0 }, showactive: { valType: "boolean", dflt: !0 }, buttons: n, x: { valType: "number", min: -2, max: 3, dflt: -0.05 }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "right" }, y: { valType: "number", min: -2, max: 3, dflt: 1 }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "top" }, pad: k(e({ editType: "arraydraw" }), {}), font: m({}), bgcolor: { valType: "color" }, bordercolor: { valType: "color", dflt: g.borderLine }, borderwidth: { valType: "number", min: 0, dflt: 1, editType: "arraydraw" } }), "arraydraw", "from-root");
    }, { "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../../plots/font_attributes": 594, "../../plots/pad_attributes": 627, "../color/attributes": 366 }], 478: [function(v, Q, $) {
      Q.exports = { name: "updatemenus", containerClassName: "updatemenu-container", headerGroupClassName: "updatemenu-header-group", headerClassName: "updatemenu-header", headerArrowClassName: "updatemenu-header-arrow", dropdownButtonGroupClassName: "updatemenu-dropdown-button-group", dropdownButtonClassName: "updatemenu-dropdown-button", buttonClassName: "updatemenu-button", itemRectClassName: "updatemenu-item-rect", itemTextClassName: "updatemenu-item-text", menuIndexAttrName: "updatemenu-active-index", autoMarginIdRoot: "updatemenu-", blankHeaderOpts: { label: "  " }, minWidth: 30, minHeight: 30, textPadX: 24, arrowPadX: 16, rx: 2, ry: 2, textOffsetX: 12, textOffsetY: 3, arrowOffsetX: 4, gapButtonHeader: 5, gapButton: 2, activeColor: "#F4FAFF", hoverColor: "#F4FAFF", arrowSymbol: { left: "\u25C4", right: "\u25BA", up: "\u25B2", down: "\u25BC" } };
    }, {}], 479: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/array_container_defaults"), k = v("./attributes"), x = v("./constants").name, e = k.buttons;
      function r(s, t, d) {
        function u(o, h) {
          return m.coerce(s, t, k, o, h);
        }
        u("visible", g(s, t, { name: "buttons", handleItemDefaults: n }).length > 0) && (u("active"), u("direction"), u("type"), u("showactive"), u("x"), u("y"), m.noneOrAll(s, t, ["x", "y"]), u("xanchor"), u("yanchor"), u("pad.t"), u("pad.r"), u("pad.b"), u("pad.l"), m.coerceFont(u, "font", d.font), u("bgcolor", d.paper_bgcolor), u("bordercolor"), u("borderwidth"));
      }
      function n(s, t) {
        function d(u, o) {
          return m.coerce(s, t, e, u, o);
        }
        d("visible", s.method === "skip" || Array.isArray(s.args)) && (d("method"), d("args"), d("args2"), d("label"), d("execute"));
      }
      Q.exports = function(s, t) {
        g(s, t, { name: x, handleItemDefaults: r });
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "./attributes": 477, "./constants": 478 }], 480: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../plots/plots"), k = v("../color"), x = v("../drawing"), e = v("../../lib"), r = v("../../lib/svg_text_utils"), n = v("../../plot_api/plot_template").arrayEditor, s = v("../../constants/alignment").LINE_SPACING, t = v("./constants"), d = v("./scrollbox");
      function u(A) {
        return A._index;
      }
      function o(A, I) {
        return +A.attr(t.menuIndexAttrName) === I._index;
      }
      function h(A, I, P, S, E, R, z, j) {
        I.active = z, n(A.layout, t.name, I).applyUpdate("active", z), I.type === "buttons" ? i(A, S, null, null, I) : I.type === "dropdown" && (E.attr(t.menuIndexAttrName, "-1"), l(A, S, E, R, I), j || i(A, S, E, R, I));
      }
      function l(A, I, P, S, E) {
        var R = e.ensureSingle(I, "g", t.headerClassName, function(W) {
          W.style("pointer-events", "all");
        }), z = E._dims, j = E.active, H = E.buttons[j] || t.blankHeaderOpts, Y = { y: E.pad.t, yPad: 0, x: E.pad.l, xPad: 0, index: 0 }, J = { width: z.headerWidth, height: z.headerHeight };
        R.call(p, E, H, A).call(T, E, Y, J), e.ensureSingle(I, "text", t.headerArrowClassName, function(W) {
          W.attr("text-anchor", "end").call(x.font, E.font).text(t.arrowSymbol[E.direction]);
        }).attr({ x: z.headerWidth - t.arrowOffsetX + E.pad.l, y: z.headerHeight / 2 + t.textOffsetY + E.pad.t }), R.on("click", function() {
          P.call(L, String(o(P, E) ? -1 : E._index)), i(A, I, P, S, E);
        }), R.on("mouseover", function() {
          R.call(f);
        }), R.on("mouseout", function() {
          R.call(_, E);
        }), x.setTranslate(I, z.lx, z.ly);
      }
      function i(A, I, P, S, E) {
        P || (P = I).attr("pointer-events", "all");
        var R = function(U) {
          return +U.attr(t.menuIndexAttrName) == -1;
        }(P) && E.type !== "buttons" ? [] : E.buttons, z = E.type === "dropdown" ? t.dropdownButtonClassName : t.buttonClassName, j = P.selectAll("g." + z).data(e.filterVisible(R)), H = j.enter().append("g").classed(z, !0), Y = j.exit();
        E.type === "dropdown" ? (H.attr("opacity", "0").transition().attr("opacity", "1"), Y.transition().attr("opacity", "0").remove()) : Y.remove();
        var J = 0, W = 0, Z = E._dims, re = ["up", "down"].indexOf(E.direction) !== -1;
        E.type === "dropdown" && (re ? W = Z.headerHeight + t.gapButtonHeader : J = Z.headerWidth + t.gapButtonHeader), E.type === "dropdown" && E.direction === "up" && (W = -t.gapButtonHeader + t.gapButton - Z.openHeight), E.type === "dropdown" && E.direction === "left" && (J = -t.gapButtonHeader + t.gapButton - Z.openWidth);
        var V = { x: Z.lx + J + E.pad.l, y: Z.ly + W + E.pad.t, yPad: t.gapButton, xPad: t.gapButton, index: 0 }, B = { l: V.x + E.borderwidth, t: V.y + E.borderwidth };
        j.each(function(U, ee) {
          var N = m.select(this);
          N.call(p, E, U, A).call(T, E, V), N.on("click", function() {
            m.event.defaultPrevented || (U.execute && (U.args2 && E.active === ee ? (h(A, E, 0, I, P, S, -1), g.executeAPICommand(A, U.method, U.args2)) : (h(A, E, 0, I, P, S, ee), g.executeAPICommand(A, U.method, U.args))), A.emit("plotly_buttonclicked", { menu: E, button: U, active: E.active }));
          }), N.on("mouseover", function() {
            N.call(f);
          }), N.on("mouseout", function() {
            N.call(_, E), j.call(y, E);
          });
        }), j.call(y, E), re ? (B.w = Math.max(Z.openWidth, Z.headerWidth), B.h = V.y - B.t) : (B.w = V.x - B.l, B.h = Math.max(Z.openHeight, Z.headerHeight)), B.direction = E.direction, S && (j.size() ? function(U, ee, N, K, X, te) {
          var ie, le, oe, ve = X.direction, ue = ve === "up" || ve === "down", ye = X._dims, Ae = X.active;
          if (ue)
            for (le = 0, oe = 0; oe < Ae; oe++)
              le += ye.heights[oe] + t.gapButton;
          else
            for (ie = 0, oe = 0; oe < Ae; oe++)
              ie += ye.widths[oe] + t.gapButton;
          K.enable(te, ie, le), K.hbar && K.hbar.attr("opacity", "0").transition().attr("opacity", "1"), K.vbar && K.vbar.attr("opacity", "0").transition().attr("opacity", "1");
        }(0, 0, 0, S, E, B) : function(U) {
          var ee = !!U.hbar, N = !!U.vbar;
          ee && U.hbar.transition().attr("opacity", "0").each("end", function() {
            ee = !1, N || U.disable();
          }), N && U.vbar.transition().attr("opacity", "0").each("end", function() {
            N = !1, ee || U.disable();
          });
        }(S));
      }
      function p(A, I, P, S) {
        A.call(c, I).call(a, I, P, S);
      }
      function c(A, I) {
        e.ensureSingle(A, "rect", t.itemRectClassName, function(P) {
          P.attr({ rx: t.rx, ry: t.ry, "shape-rendering": "crispEdges" });
        }).call(k.stroke, I.bordercolor).call(k.fill, I.bgcolor).style("stroke-width", I.borderwidth + "px");
      }
      function a(A, I, P, S) {
        var E = e.ensureSingle(A, "text", t.itemTextClassName, function(j) {
          j.attr({ "text-anchor": "start", "data-notex": 1 });
        }), R = P.label, z = S._fullLayout._meta;
        z && (R = e.templateString(R, z)), E.call(x.font, I.font).text(R).call(r.convertToTspans, S);
      }
      function y(A, I) {
        var P = I.active;
        A.each(function(S, E) {
          var R = m.select(this);
          E === P && I.showactive && R.select("rect." + t.itemRectClassName).call(k.fill, t.activeColor);
        });
      }
      function f(A) {
        A.select("rect." + t.itemRectClassName).call(k.fill, t.hoverColor);
      }
      function _(A, I) {
        A.select("rect." + t.itemRectClassName).call(k.fill, I.bgcolor);
      }
      function b(A, I) {
        var P = I._dims = { width1: 0, height1: 0, heights: [], widths: [], totalWidth: 0, totalHeight: 0, openWidth: 0, openHeight: 0, lx: 0, ly: 0 }, S = x.tester.selectAll("g." + t.dropdownButtonClassName).data(e.filterVisible(I.buttons));
        S.enter().append("g").classed(t.dropdownButtonClassName, !0);
        var E = ["up", "down"].indexOf(I.direction) !== -1;
        S.each(function(J, W) {
          var Z = m.select(this);
          Z.call(p, I, J, A);
          var re = Z.select("." + t.itemTextClassName), V = re.node() && x.bBox(re.node()).width, B = Math.max(V + t.textPadX, t.minWidth), U = I.font.size * s, ee = r.lineCount(re), N = Math.max(U * ee, t.minHeight) + t.textOffsetY;
          N = Math.ceil(N), B = Math.ceil(B), P.widths[W] = B, P.heights[W] = N, P.height1 = Math.max(P.height1, N), P.width1 = Math.max(P.width1, B), E ? (P.totalWidth = Math.max(P.totalWidth, B), P.openWidth = P.totalWidth, P.totalHeight += N + t.gapButton, P.openHeight += N + t.gapButton) : (P.totalWidth += B + t.gapButton, P.openWidth += B + t.gapButton, P.totalHeight = Math.max(P.totalHeight, N), P.openHeight = P.totalHeight);
        }), E ? P.totalHeight -= t.gapButton : P.totalWidth -= t.gapButton, P.headerWidth = P.width1 + t.arrowPadX, P.headerHeight = P.height1, I.type === "dropdown" && (E ? (P.width1 += t.arrowPadX, P.totalHeight = P.height1) : P.totalWidth = P.width1, P.totalWidth += t.arrowPadX), S.remove();
        var R = P.totalWidth + I.pad.l + I.pad.r, z = P.totalHeight + I.pad.t + I.pad.b, j = A._fullLayout._size;
        P.lx = j.l + j.w * I.x, P.ly = j.t + j.h * (1 - I.y);
        var H = "left";
        e.isRightAnchor(I) && (P.lx -= R, H = "right"), e.isCenterAnchor(I) && (P.lx -= R / 2, H = "center");
        var Y = "top";
        e.isBottomAnchor(I) && (P.ly -= z, Y = "bottom"), e.isMiddleAnchor(I) && (P.ly -= z / 2, Y = "middle"), P.totalWidth = Math.ceil(P.totalWidth), P.totalHeight = Math.ceil(P.totalHeight), P.lx = Math.round(P.lx), P.ly = Math.round(P.ly), g.autoMargin(A, w(I), { x: I.x, y: I.y, l: R * ({ right: 1, center: 0.5 }[H] || 0), r: R * ({ left: 1, center: 0.5 }[H] || 0), b: z * ({ top: 1, middle: 0.5 }[Y] || 0), t: z * ({ bottom: 1, middle: 0.5 }[Y] || 0) });
      }
      function w(A) {
        return t.autoMarginIdRoot + A._index;
      }
      function T(A, I, P, S) {
        S = S || {};
        var E = A.select("." + t.itemRectClassName), R = A.select("." + t.itemTextClassName), z = I.borderwidth, j = P.index, H = I._dims;
        x.setTranslate(A, z + P.x, z + P.y);
        var Y = ["up", "down"].indexOf(I.direction) !== -1, J = S.height || (Y ? H.heights[j] : H.height1);
        E.attr({ x: 0, y: 0, width: S.width || (Y ? H.width1 : H.widths[j]), height: J });
        var W = I.font.size * s, Z = (r.lineCount(R) - 1) * W / 2;
        r.positionText(R, t.textOffsetX, J / 2 - Z + t.textOffsetY), Y ? P.y += H.heights[j] + P.yPad : P.x += H.widths[j] + P.xPad, P.index++;
      }
      function L(A, I) {
        A.attr(t.menuIndexAttrName, I || "-1").selectAll("g." + t.dropdownButtonClassName).remove();
      }
      Q.exports = function(A) {
        var I = A._fullLayout, P = e.filterVisible(I[t.name]);
        function S(W) {
          g.autoMargin(A, w(W));
        }
        var E = I._menulayer.selectAll("g." + t.containerClassName).data(P.length > 0 ? [0] : []);
        if (E.enter().append("g").classed(t.containerClassName, !0).style("cursor", "pointer"), E.exit().each(function() {
          m.select(this).selectAll("g." + t.headerGroupClassName).each(S);
        }).remove(), P.length !== 0) {
          var R = E.selectAll("g." + t.headerGroupClassName).data(P, u);
          R.enter().append("g").classed(t.headerGroupClassName, !0);
          for (var z = e.ensureSingle(E, "g", t.dropdownButtonGroupClassName, function(W) {
            W.style("pointer-events", "all");
          }), j = 0; j < P.length; j++) {
            var H = P[j];
            b(A, H);
          }
          var Y = "updatemenus" + I._uid, J = new d(A, z, Y);
          R.enter().size() && (z.node().parentNode.appendChild(z.node()), z.call(L)), R.exit().each(function(W) {
            z.call(L), S(W);
          }).remove(), R.each(function(W) {
            var Z = m.select(this), re = W.type === "dropdown" ? z : null;
            g.manageCommandObserver(A, W, W.buttons, function(V) {
              h(A, W, W.buttons[V.index], Z, re, J, V.index, !0);
            }), W.type === "dropdown" ? (l(A, Z, z, J, W), o(z, W) && i(A, Z, z, J, W)) : i(A, Z, null, null, W);
          });
        }
      };
    }, { "../../constants/alignment": 483, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plot_api/plot_template": 555, "../../plots/plots": 628, "../color": 367, "../drawing": 389, "./constants": 478, "./scrollbox": 482, "@plotly/d3": 58 }], 481: [function(v, Q, $) {
      arguments[4][475][0].apply($, arguments);
    }, { "./attributes": 477, "./constants": 478, "./defaults": 479, "./draw": 480, dup: 475 }], 482: [function(v, Q, $) {
      Q.exports = e;
      var m = v("@plotly/d3"), g = v("../color"), k = v("../drawing"), x = v("../../lib");
      function e(r, n, s) {
        this.gd = r, this.container = n, this.id = s, this.position = null, this.translateX = null, this.translateY = null, this.hbar = null, this.vbar = null, this.bg = this.container.selectAll("rect.scrollbox-bg").data([0]), this.bg.exit().on(".drag", null).on("wheel", null).remove(), this.bg.enter().append("rect").classed("scrollbox-bg", !0).style("pointer-events", "all").attr({ opacity: 0, x: 0, y: 0, width: 0, height: 0 });
      }
      e.barWidth = 2, e.barLength = 20, e.barRadius = 2, e.barPad = 1, e.barColor = "#808BA4", e.prototype.enable = function(r, n, s) {
        var t = this.gd._fullLayout, d = t.width, u = t.height;
        this.position = r;
        var o, h, l, i, p = this.position.l, c = this.position.w, a = this.position.t, y = this.position.h, f = this.position.direction, _ = f === "down", b = f === "left", w = f === "up", T = c, L = y;
        _ || b || f === "right" || w || (this.position.direction = "down", _ = !0), _ || w ? (h = (o = p) + T, _ ? (l = a, L = (i = Math.min(l + L, u)) - l) : L = (i = a + L) - (l = Math.max(i - L, 0))) : (i = (l = a) + L, b ? T = (h = p + T) - (o = Math.max(h - T, 0)) : (o = p, T = (h = Math.min(o + T, d)) - o)), this._box = { l: o, t: l, w: T, h: L };
        var A = c > T, I = e.barLength + 2 * e.barPad, P = e.barWidth + 2 * e.barPad, S = p, E = a + y;
        E + P > u && (E = u - P);
        var R = this.container.selectAll("rect.scrollbar-horizontal").data(A ? [0] : []);
        R.exit().on(".drag", null).remove(), R.enter().append("rect").classed("scrollbar-horizontal", !0).call(g.fill, e.barColor), A ? (this.hbar = R.attr({ rx: e.barRadius, ry: e.barRadius, x: S, y: E, width: I, height: P }), this._hbarXMin = S + I / 2, this._hbarTranslateMax = T - I) : (delete this.hbar, delete this._hbarXMin, delete this._hbarTranslateMax);
        var z = y > L, j = e.barWidth + 2 * e.barPad, H = e.barLength + 2 * e.barPad, Y = p + c, J = a;
        Y + j > d && (Y = d - j);
        var W = this.container.selectAll("rect.scrollbar-vertical").data(z ? [0] : []);
        W.exit().on(".drag", null).remove(), W.enter().append("rect").classed("scrollbar-vertical", !0).call(g.fill, e.barColor), z ? (this.vbar = W.attr({ rx: e.barRadius, ry: e.barRadius, x: Y, y: J, width: j, height: H }), this._vbarYMin = J + H / 2, this._vbarTranslateMax = L - H) : (delete this.vbar, delete this._vbarYMin, delete this._vbarTranslateMax);
        var Z = this.id, re = o - 0.5, V = z ? h + j + 0.5 : h + 0.5, B = l - 0.5, U = A ? i + P + 0.5 : i + 0.5, ee = t._topdefs.selectAll("#" + Z).data(A || z ? [0] : []);
        if (ee.exit().remove(), ee.enter().append("clipPath").attr("id", Z).append("rect"), A || z ? (this._clipRect = ee.select("rect").attr({ x: Math.floor(re), y: Math.floor(B), width: Math.ceil(V) - Math.floor(re), height: Math.ceil(U) - Math.floor(B) }), this.container.call(k.setClipUrl, Z, this.gd), this.bg.attr({ x: p, y: a, width: c, height: y })) : (this.bg.attr({ width: 0, height: 0 }), this.container.on("wheel", null).on(".drag", null).call(k.setClipUrl, null), delete this._clipRect), A || z) {
          var N = m.behavior.drag().on("dragstart", function() {
            m.event.sourceEvent.preventDefault();
          }).on("drag", this._onBoxDrag.bind(this));
          this.container.on("wheel", null).on("wheel", this._onBoxWheel.bind(this)).on(".drag", null).call(N);
          var K = m.behavior.drag().on("dragstart", function() {
            m.event.sourceEvent.preventDefault(), m.event.sourceEvent.stopPropagation();
          }).on("drag", this._onBarDrag.bind(this));
          A && this.hbar.on(".drag", null).call(K), z && this.vbar.on(".drag", null).call(K);
        }
        this.setTranslate(n, s);
      }, e.prototype.disable = function() {
        (this.hbar || this.vbar) && (this.bg.attr({ width: 0, height: 0 }), this.container.on("wheel", null).on(".drag", null).call(k.setClipUrl, null), delete this._clipRect), this.hbar && (this.hbar.on(".drag", null), this.hbar.remove(), delete this.hbar, delete this._hbarXMin, delete this._hbarTranslateMax), this.vbar && (this.vbar.on(".drag", null), this.vbar.remove(), delete this.vbar, delete this._vbarYMin, delete this._vbarTranslateMax);
      }, e.prototype._onBoxDrag = function() {
        var r = this.translateX, n = this.translateY;
        this.hbar && (r -= m.event.dx), this.vbar && (n -= m.event.dy), this.setTranslate(r, n);
      }, e.prototype._onBoxWheel = function() {
        var r = this.translateX, n = this.translateY;
        this.hbar && (r += m.event.deltaY), this.vbar && (n += m.event.deltaY), this.setTranslate(r, n);
      }, e.prototype._onBarDrag = function() {
        var r = this.translateX, n = this.translateY;
        if (this.hbar) {
          var s = r + this._hbarXMin, t = s + this._hbarTranslateMax;
          r = (x.constrain(m.event.x, s, t) - s) / (t - s) * (this.position.w - this._box.w);
        }
        if (this.vbar) {
          var d = n + this._vbarYMin, u = d + this._vbarTranslateMax;
          n = (x.constrain(m.event.y, d, u) - d) / (u - d) * (this.position.h - this._box.h);
        }
        this.setTranslate(r, n);
      }, e.prototype.setTranslate = function(r, n) {
        var s = this.position.w - this._box.w, t = this.position.h - this._box.h;
        if (r = x.constrain(r || 0, 0, s), n = x.constrain(n || 0, 0, t), this.translateX = r, this.translateY = n, this.container.call(k.setTranslate, this._box.l - this.position.l - r, this._box.t - this.position.t - n), this._clipRect && this._clipRect.attr({ x: Math.floor(this.position.l + r - 0.5), y: Math.floor(this.position.t + n - 0.5) }), this.hbar) {
          var d = r / s;
          this.hbar.call(k.setTranslate, r + d * this._hbarTranslateMax, n);
        }
        if (this.vbar) {
          var u = n / t;
          this.vbar.call(k.setTranslate, r, n + u * this._vbarTranslateMax);
        }
      };
    }, { "../../lib": 515, "../color": 367, "../drawing": 389, "@plotly/d3": 58 }], 483: [function(v, Q, $) {
      Q.exports = { FROM_BL: { left: 0, center: 0.5, right: 1, bottom: 0, middle: 0.5, top: 1 }, FROM_TL: { left: 0, center: 0.5, right: 1, bottom: 1, middle: 0.5, top: 0 }, FROM_BR: { left: 1, center: 0.5, right: 0, bottom: 0, middle: 0.5, top: 1 }, LINE_SPACING: 1.3, CAP_SHIFT: 0.7, MID_SHIFT: 0.35, OPPOSITE_SIDE: { left: "right", right: "left", top: "bottom", bottom: "top" } };
    }, {}], 484: [function(v, Q, $) {
      Q.exports = { axisRefDescription: function(m, g, k) {
        return ["If set to a", m, "axis id (e.g. *" + m + "* or", "*" + m + "2*), the `" + m + "` position refers to a", m, "coordinate. If set to *paper*, the `" + m + "`", "position refers to the distance from the", g, "of the plotting", "area in normalized coordinates where *0* (*1*) corresponds to the", g, "(" + k + "). If set to a", m, "axis ID followed by", "*domain* (separated by a space), the position behaves like for", "*paper*, but refers to the distance in fractions of the domain", "length from the", g, "of the domain of that axis: e.g.,", "*" + m + "2 domain* refers to the domain of the second", m, " axis and a", m, "position of 0.5 refers to the", "point between the", g, "and the", k, "of the domain of the", "second", m, "axis."].join(" ");
      } };
    }, {}], 485: [function(v, Q, $) {
      Q.exports = { INCREASING: { COLOR: "#3D9970", SYMBOL: "\u25B2" }, DECREASING: { COLOR: "#FF4136", SYMBOL: "\u25BC" } };
    }, {}], 486: [function(v, Q, $) {
      Q.exports = { FORMAT_LINK: "https://github.com/d3/d3-format/tree/v1.4.5#d3-format", DATE_FORMAT_LINK: "https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format" };
    }, {}], 487: [function(v, Q, $) {
      Q.exports = { COMPARISON_OPS: ["=", "!=", "<", ">=", ">", "<="], COMPARISON_OPS2: ["=", "<", ">=", ">", "<="], INTERVAL_OPS: ["[]", "()", "[)", "(]", "][", ")(", "](", ")["], SET_OPS: ["{}", "}{"], CONSTRAINT_REDUCTION: { "=": "=", "<": "<", "<=": "<", ">": ">", ">=": ">", "[]": "[]", "()": "[]", "[)": "[]", "(]": "[]", "][": "][", ")(": "][", "](": "][", ")[": "][" } };
    }, {}], 488: [function(v, Q, $) {
      Q.exports = { solid: [[], 0], dot: [[0.5, 1], 200], dash: [[0.5, 1], 50], longdash: [[0.5, 1], 10], dashdot: [[0.5, 0.625, 0.875, 1], 50], longdashdot: [[0.5, 0.7, 0.8, 1], 10] };
    }, {}], 489: [function(v, Q, $) {
      Q.exports = { circle: "\u25CF", "circle-open": "\u25CB", square: "\u25A0", "square-open": "\u25A1", diamond: "\u25C6", "diamond-open": "\u25C7", cross: "+", x: "\u274C" };
    }, {}], 490: [function(v, Q, $) {
      Q.exports = { SHOW_PLACEHOLDER: 100, HIDE_PLACEHOLDER: 1e3, DESELECTDIM: 0.2 };
    }, {}], 491: [function(v, Q, $) {
      Q.exports = { BADNUM: void 0, FP_SAFE: 1e-4 * Number.MAX_VALUE, ONEMAXYEAR: 316224e5, ONEAVGYEAR: 315576e5, ONEMINYEAR: 31536e6, ONEMAXQUARTER: 79488e5, ONEAVGQUARTER: 78894e5, ONEMINQUARTER: 76896e5, ONEMAXMONTH: 26784e5, ONEAVGMONTH: 26298e5, ONEMINMONTH: 24192e5, ONEWEEK: 6048e5, ONEDAY: 864e5, ONEHOUR: 36e5, ONEMIN: 6e4, ONESEC: 1e3, EPOCHJD: 24405875e-1, ALMOST_EQUAL: 0.999999, LOG_CLIP: 10, MINUS_SIGN: "\u2212" };
    }, {}], 492: [function(v, Q, $) {
      $.xmlns = "http://www.w3.org/2000/xmlns/", $.svg = "http://www.w3.org/2000/svg", $.xlink = "http://www.w3.org/1999/xlink", $.svgAttrs = { xmlns: $.svg, "xmlns:xlink": $.xlink };
    }, {}], 493: [function(v, Q, $) {
      $.version = v("./version").version, v("native-promise-only"), v("../build/plotcss");
      for (var m = v("./registry"), g = $.register = m.register, k = v("./plot_api"), x = Object.keys(k), e = 0; e < x.length; e++) {
        var r = x[e];
        r.charAt(0) !== "_" && ($[r] = k[r]), g({ moduleType: "apiMethod", name: r, fn: k[r] });
      }
      g(v("./traces/scatter")), g([v("./components/legend"), v("./components/fx"), v("./components/annotations"), v("./components/annotations3d"), v("./components/selections"), v("./components/shapes"), v("./components/images"), v("./components/updatemenus"), v("./components/sliders"), v("./components/rangeslider"), v("./components/rangeselector"), v("./components/grid"), v("./components/errorbars"), v("./components/colorscale"), v("./components/colorbar"), v("./components/modebar")]), g([v("./locale-en"), v("./locale-en-us")]), window.PlotlyLocales && Array.isArray(window.PlotlyLocales) && (g(window.PlotlyLocales), delete window.PlotlyLocales), $.Icons = v("./fonts/ploticon");
      var n = v("./components/fx"), s = v("./plots/plots");
      $.Plots = { resize: s.resize, graphJson: s.graphJson, sendDataToCloud: s.sendDataToCloud }, $.Fx = { hover: n.hover, unhover: n.unhover, loneHover: n.loneHover, loneUnhover: n.loneUnhover }, $.Snapshot = v("./snapshot"), $.PlotSchema = v("./plot_api/plot_schema");
    }, { "../build/plotcss": 1, "./components/annotations": 358, "./components/annotations3d": 363, "./components/colorbar": 373, "./components/colorscale": 379, "./components/errorbars": 395, "./components/fx": 407, "./components/grid": 411, "./components/images": 416, "./components/legend": 424, "./components/modebar": 430, "./components/rangeselector": 438, "./components/rangeslider": 445, "./components/selections": 455, "./components/shapes": 470, "./components/sliders": 475, "./components/updatemenus": 481, "./fonts/ploticon": 494, "./locale-en": 546, "./locale-en-us": 545, "./plot_api": 550, "./plot_api/plot_schema": 554, "./plots/plots": 628, "./registry": 647, "./snapshot": 652, "./traces/scatter": 948, "./version": 1132, "native-promise-only": 245 }], 494: [function(v, Q, $) {
      Q.exports = { undo: { width: 857.1, height: 1e3, path: "m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z", transform: "matrix(1 0 0 -1 0 850)" }, home: { width: 928.6, height: 1e3, path: "m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z", transform: "matrix(1 0 0 -1 0 850)" }, "camera-retro": { width: 1e3, height: 1e3, path: "m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z", transform: "matrix(1 0 0 -1 0 850)" }, zoombox: { width: 1e3, height: 1e3, path: "m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z", transform: "matrix(1 0 0 -1 0 850)" }, pan: { width: 1e3, height: 1e3, path: "m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z", transform: "matrix(1 0 0 -1 0 850)" }, zoom_plus: { width: 875, height: 1e3, path: "m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z", transform: "matrix(1 0 0 -1 0 850)" }, zoom_minus: { width: 875, height: 1e3, path: "m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z", transform: "matrix(1 0 0 -1 0 850)" }, autoscale: { width: 1e3, height: 1e3, path: "m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z", transform: "matrix(1 0 0 -1 0 850)" }, tooltip_basic: { width: 1500, height: 1e3, path: "m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z", transform: "matrix(1 0 0 -1 0 850)" }, tooltip_compare: { width: 1125, height: 1e3, path: "m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z", transform: "matrix(1 0 0 -1 0 850)" }, plotlylogo: { width: 1542, height: 1e3, path: "m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z", transform: "matrix(1 0 0 -1 0 850)" }, "z-axis": { width: 1e3, height: 1e3, path: "m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z", transform: "matrix(1 0 0 -1 0 850)" }, "3d_rotate": { width: 1e3, height: 1e3, path: "m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z", transform: "matrix(1 0 0 -1 0 850)" }, camera: { width: 1e3, height: 1e3, path: "m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z", transform: "matrix(1 0 0 -1 0 850)" }, movie: { width: 1e3, height: 1e3, path: "m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z", transform: "matrix(1 0 0 -1 0 850)" }, question: { width: 857.1, height: 1e3, path: "m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z", transform: "matrix(1 0 0 -1 0 850)" }, disk: { width: 857.1, height: 1e3, path: "m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z", transform: "matrix(1 0 0 -1 0 850)" }, drawopenpath: { width: 70, height: 70, path: "M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z", transform: "matrix(1 0 0 1 -15 -15)" }, drawclosedpath: { width: 90, height: 90, path: "M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z", transform: "matrix(1 0 0 1 -5 -5)" }, lasso: { width: 1031, height: 1e3, path: "m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z", transform: "matrix(1 0 0 -1 0 850)" }, selectbox: { width: 1e3, height: 1e3, path: "m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z", transform: "matrix(1 0 0 -1 0 850)" }, drawline: { width: 70, height: 70, path: "M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z", transform: "matrix(1 0 0 1 -15 -15)" }, drawrect: { width: 80, height: 80, path: "M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z", transform: "matrix(1 0 0 1 -10 -10)" }, drawcircle: { width: 80, height: 80, path: "M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z", transform: "matrix(1 0 0 1 -10 -10)" }, eraseshape: { width: 80, height: 80, path: "M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z", transform: "matrix(1 0 0 1 -10 -10)" }, spikeline: { width: 1e3, height: 1e3, path: "M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z", transform: "matrix(1.5 0 0 -1.5 0 850)" }, pencil: { width: 1792, height: 1792, path: "M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z", transform: "matrix(1 0 0 1 0 1)" }, newplotlylogo: { name: "newplotlylogo", svg: ["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>", "<defs>", " <style>", "  .cls-0{fill:#000;}", "  .cls-1{fill:#FFF;}", "  .cls-2{fill:#F26;}", "  .cls-3{fill:#D69;}", "  .cls-4{fill:#BAC;}", "  .cls-5{fill:#9EF;}", " </style>", "</defs>", " <title>plotly-logomark</title>", " <g id='symbol'>", "  <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>", "  <circle class='cls-5' cx='102' cy='30' r='6'/>", "  <circle class='cls-4' cx='78' cy='30' r='6'/>", "  <circle class='cls-4' cx='78' cy='54' r='6'/>", "  <circle class='cls-3' cx='54' cy='30' r='6'/>", "  <circle class='cls-2' cx='30' cy='30' r='6'/>", "  <circle class='cls-2' cx='30' cy='54' r='6'/>", "  <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>", "  <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>", "  <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>", "  <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>", " </g>", "</svg>"].join("") } };
    }, {}], 495: [function(v, Q, $) {
      $.isLeftAnchor = function(m) {
        return m.xanchor === "left" || m.xanchor === "auto" && m.x <= 1 / 3;
      }, $.isCenterAnchor = function(m) {
        return m.xanchor === "center" || m.xanchor === "auto" && m.x > 1 / 3 && m.x < 2 / 3;
      }, $.isRightAnchor = function(m) {
        return m.xanchor === "right" || m.xanchor === "auto" && m.x >= 2 / 3;
      }, $.isTopAnchor = function(m) {
        return m.yanchor === "top" || m.yanchor === "auto" && m.y >= 2 / 3;
      }, $.isMiddleAnchor = function(m) {
        return m.yanchor === "middle" || m.yanchor === "auto" && m.y > 1 / 3 && m.y < 2 / 3;
      }, $.isBottomAnchor = function(m) {
        return m.yanchor === "bottom" || m.yanchor === "auto" && m.y <= 1 / 3;
      };
    }, {}], 496: [function(v, Q, $) {
      var m = v("./mod"), g = m.mod, k = m.modHalf, x = Math.PI, e = 2 * x;
      function r(d) {
        return Math.abs(d[1] - d[0]) > e - 1e-14;
      }
      function n(d, u) {
        return k(u - d, e);
      }
      function s(d, u) {
        if (r(u))
          return !0;
        var o, h;
        u[0] < u[1] ? (o = u[0], h = u[1]) : (o = u[1], h = u[0]), (o = g(o, e)) > (h = g(h, e)) && (h += e);
        var l = g(d, e), i = l + e;
        return l >= o && l <= h || i >= o && i <= h;
      }
      function t(d, u, o, h, l, i, p) {
        l = l || 0, i = i || 0;
        var c, a, y, f, _, b = r([o, h]);
        function w(I, P) {
          return [I * Math.cos(P) + l, i - I * Math.sin(P)];
        }
        b ? (c = 0, a = x, y = e) : o < h ? (c = o, y = h) : (c = h, y = o), d < u ? (f = d, _ = u) : (f = u, _ = d);
        var T, L = Math.abs(y - c) <= x ? 0 : 1;
        function A(I, P, S) {
          return "A" + [I, I] + " " + [0, L, S] + " " + w(I, P);
        }
        return b ? T = f === null ? "M" + w(_, c) + A(_, a, 0) + A(_, y, 0) + "Z" : "M" + w(f, c) + A(f, a, 0) + A(f, y, 0) + "ZM" + w(_, c) + A(_, a, 1) + A(_, y, 1) + "Z" : f === null ? (T = "M" + w(_, c) + A(_, y, 0), p && (T += "L0,0Z")) : T = "M" + w(f, c) + "L" + w(_, c) + A(_, y, 0) + "L" + w(f, y) + A(f, c, 1) + "Z", T;
      }
      Q.exports = { deg2rad: function(d) {
        return d / 180 * x;
      }, rad2deg: function(d) {
        return d / x * 180;
      }, angleDelta: n, angleDist: function(d, u) {
        return Math.abs(n(d, u));
      }, isFullCircle: r, isAngleInsideSector: s, isPtInsideSector: function(d, u, o, h) {
        return !!s(u, h) && (o[0] < o[1] ? (l = o[0], i = o[1]) : (l = o[1], i = o[0]), d >= l && d <= i);
        var l, i;
      }, pathArc: function(d, u, o, h, l) {
        return t(null, d, u, o, h, l, 0);
      }, pathSector: function(d, u, o, h, l) {
        return t(null, d, u, o, h, l, 1);
      }, pathAnnulus: function(d, u, o, h, l, i) {
        return t(d, u, o, h, l, i, 1);
      } };
    }, { "./mod": 522 }], 497: [function(v, Q, $) {
      var m = Array.isArray, g = ArrayBuffer, k = DataView;
      function x(n) {
        return g.isView(n) && !(n instanceof k);
      }
      function e(n) {
        return m(n) || x(n);
      }
      function r(n, s, t) {
        if (e(n)) {
          if (e(n[0])) {
            for (var d = t, u = 0; u < n.length; u++)
              d = s(d, n[u].length);
            return d;
          }
          return n.length;
        }
        return 0;
      }
      $.isTypedArray = x, $.isArrayOrTypedArray = e, $.isArray1D = function(n) {
        return !e(n[0]);
      }, $.ensureArray = function(n, s) {
        return m(n) || (n = []), n.length = s, n;
      }, $.concat = function() {
        var n, s, t, d, u, o, h, l, i = [], p = !0, c = 0;
        for (t = 0; t < arguments.length; t++)
          (o = (d = arguments[t]).length) && (s ? i.push(d) : (s = d, u = o), m(d) ? n = !1 : (p = !1, c ? n !== d.constructor && (n = !1) : n = d.constructor), c += o);
        if (!c)
          return [];
        if (!i.length)
          return s;
        if (p)
          return s.concat.apply(s, i);
        if (n) {
          for ((h = new n(c)).set(s), t = 0; t < i.length; t++)
            d = i[t], h.set(d, u), u += d.length;
          return h;
        }
        for (h = new Array(c), l = 0; l < s.length; l++)
          h[l] = s[l];
        for (t = 0; t < i.length; t++) {
          for (d = i[t], l = 0; l < d.length; l++)
            h[u + l] = d[l];
          u += l;
        }
        return h;
      }, $.maxRowLength = function(n) {
        return r(n, Math.max, 0);
      }, $.minRowLength = function(n) {
        return r(n, Math.min, 1 / 0);
      };
    }, {}], 498: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../constants/numerical").BADNUM, k = /^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;
      Q.exports = function(x) {
        return typeof x == "string" && (x = x.replace(k, "")), m(x) ? Number(x) : g;
      };
    }, { "../constants/numerical": 491, "fast-isnumeric": 190 }], 499: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = m._fullLayout;
        g._glcanvas && g._glcanvas.size() && g._glcanvas.each(function(k) {
          k.regl && k.regl.clear({ color: !0, depth: !0 });
        });
      };
    }, {}], 500: [function(v, Q, $) {
      Q.exports = function(m) {
        m._responsiveChartHandler && (window.removeEventListener("resize", m._responsiveChartHandler), delete m._responsiveChartHandler);
      };
    }, {}], 501: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("tinycolor2"), k = v("../plots/attributes"), x = v("../components/colorscale/scales"), e = v("../components/color"), r = v("../constants/interactions").DESELECTDIM, n = v("./nested_property"), s = v("./regex").counter, t = v("./mod").modHalf, d = v("./array").isArrayOrTypedArray;
      function u(o, h) {
        var l = $.valObjectMeta[h.valType];
        if (h.arrayOk && d(o))
          return !0;
        if (l.validateFunction)
          return l.validateFunction(o, h);
        var i = {}, p = i, c = { set: function(a) {
          p = a;
        } };
        return l.coerceFunction(o, c, i, h), p !== i;
      }
      $.valObjectMeta = { data_array: { coerceFunction: function(o, h, l) {
        d(o) ? h.set(o) : l !== void 0 && h.set(l);
      } }, enumerated: { coerceFunction: function(o, h, l, i) {
        i.coerceNumber && (o = +o), i.values.indexOf(o) === -1 ? h.set(l) : h.set(o);
      }, validateFunction: function(o, h) {
        h.coerceNumber && (o = +o);
        for (var l = h.values, i = 0; i < l.length; i++) {
          var p = String(l[i]);
          if (p.charAt(0) === "/" && p.charAt(p.length - 1) === "/") {
            if (new RegExp(p.substr(1, p.length - 2)).test(o))
              return !0;
          } else if (o === l[i])
            return !0;
        }
        return !1;
      } }, boolean: { coerceFunction: function(o, h, l) {
        o === !0 || o === !1 ? h.set(o) : h.set(l);
      } }, number: { coerceFunction: function(o, h, l, i) {
        !m(o) || i.min !== void 0 && o < i.min || i.max !== void 0 && o > i.max ? h.set(l) : h.set(+o);
      } }, integer: { coerceFunction: function(o, h, l, i) {
        o % 1 || !m(o) || i.min !== void 0 && o < i.min || i.max !== void 0 && o > i.max ? h.set(l) : h.set(+o);
      } }, string: { coerceFunction: function(o, h, l, i) {
        if (typeof o != "string") {
          var p = typeof o == "number";
          i.strict !== !0 && p ? h.set(String(o)) : h.set(l);
        } else
          i.noBlank && !o ? h.set(l) : h.set(o);
      } }, color: { coerceFunction: function(o, h, l) {
        g(o).isValid() ? h.set(o) : h.set(l);
      } }, colorlist: { coerceFunction: function(o, h, l) {
        Array.isArray(o) && o.length && o.every(function(i) {
          return g(i).isValid();
        }) ? h.set(o) : h.set(l);
      } }, colorscale: { coerceFunction: function(o, h, l) {
        h.set(x.get(o, l));
      } }, angle: { coerceFunction: function(o, h, l) {
        o === "auto" ? h.set("auto") : m(o) ? h.set(t(+o, 360)) : h.set(l);
      } }, subplotid: { coerceFunction: function(o, h, l, i) {
        var p = i.regex || s(l);
        typeof o == "string" && p.test(o) ? h.set(o) : h.set(l);
      }, validateFunction: function(o, h) {
        var l = h.dflt;
        return o === l || typeof o == "string" && !!s(l).test(o);
      } }, flaglist: { coerceFunction: function(o, h, l, i) {
        if ((i.extras || []).indexOf(o) === -1)
          if (typeof o == "string") {
            for (var p = o.split("+"), c = 0; c < p.length; ) {
              var a = p[c];
              i.flags.indexOf(a) === -1 || p.indexOf(a) < c ? p.splice(c, 1) : c++;
            }
            p.length ? h.set(p.join("+")) : h.set(l);
          } else
            h.set(l);
        else
          h.set(o);
      } }, any: { coerceFunction: function(o, h, l) {
        o === void 0 ? h.set(l) : h.set(o);
      } }, info_array: { coerceFunction: function(o, h, l, i) {
        function p(E, R, z) {
          var j, H = { set: function(Y) {
            j = Y;
          } };
          return z === void 0 && (z = R.dflt), $.valObjectMeta[R.valType].coerceFunction(E, H, z, R), j;
        }
        var c = i.dimensions === 2 || i.dimensions === "1-2" && Array.isArray(o) && Array.isArray(o[0]);
        if (Array.isArray(o)) {
          var a, y, f, _, b, w, T = i.items, L = [], A = Array.isArray(T), I = A && c && Array.isArray(T[0]), P = c && A && !I, S = A && !P ? T.length : o.length;
          if (l = Array.isArray(l) ? l : [], c)
            for (a = 0; a < S; a++)
              for (L[a] = [], f = Array.isArray(o[a]) ? o[a] : [], b = P ? T.length : A ? T[a].length : f.length, y = 0; y < b; y++)
                _ = P ? T[y] : A ? T[a][y] : T, (w = p(f[y], _, (l[a] || [])[y])) !== void 0 && (L[a][y] = w);
          else
            for (a = 0; a < S; a++)
              (w = p(o[a], A ? T[a] : T, l[a])) !== void 0 && (L[a] = w);
          h.set(L);
        } else
          h.set(l);
      }, validateFunction: function(o, h) {
        if (!Array.isArray(o))
          return !1;
        var l = h.items, i = Array.isArray(l), p = h.dimensions === 2;
        if (!h.freeLength && o.length !== l.length)
          return !1;
        for (var c = 0; c < o.length; c++)
          if (p) {
            if (!Array.isArray(o[c]) || !h.freeLength && o[c].length !== l[c].length)
              return !1;
            for (var a = 0; a < o[c].length; a++)
              if (!u(o[c][a], i ? l[c][a] : l))
                return !1;
          } else if (!u(o[c], i ? l[c] : l))
            return !1;
        return !0;
      } } }, $.coerce = function(o, h, l, i, p) {
        var c = n(l, i).get(), a = n(o, i), y = n(h, i), f = a.get(), _ = h._template;
        if (f === void 0 && _ && (f = n(_, i).get(), _ = 0), p === void 0 && (p = c.dflt), c.arrayOk && d(f))
          return y.set(f), f;
        var b = $.valObjectMeta[c.valType].coerceFunction;
        b(f, y, p, c);
        var w = y.get();
        return _ && w === p && !u(f, c) && (b(f = n(_, i).get(), y, p, c), w = y.get()), w;
      }, $.coerce2 = function(o, h, l, i, p) {
        var c = n(o, i), a = $.coerce(o, h, l, i, p), y = c.get();
        return y != null && a;
      }, $.coerceFont = function(o, h, l) {
        var i = {};
        return l = l || {}, i.family = o(h + ".family", l.family), i.size = o(h + ".size", l.size), i.color = o(h + ".color", l.color), i;
      }, $.coercePattern = function(o, h, l, i) {
        if (o(h + ".shape")) {
          o(h + ".solidity"), o(h + ".size");
          var p = o(h + ".fillmode") === "overlay";
          if (!i) {
            var c = o(h + ".bgcolor", p ? l : void 0);
            o(h + ".fgcolor", p ? e.contrast(c) : l);
          }
          o(h + ".fgopacity", p ? 0.5 : 1);
        }
      }, $.coerceHoverinfo = function(o, h, l) {
        var i, p = h._module.attributes, c = p.hoverinfo ? p : k, a = c.hoverinfo;
        if (l._dataLength === 1) {
          var y = a.dflt === "all" ? a.flags.slice() : a.dflt.split("+");
          y.splice(y.indexOf("name"), 1), i = y.join("+");
        }
        return $.coerce(o, h, c, "hoverinfo", i);
      }, $.coerceSelectionMarkerOpacity = function(o, h) {
        if (o.marker) {
          var l, i, p = o.marker.opacity;
          p !== void 0 && (d(p) || o.selected || o.unselected || (l = p, i = r * p), h("selected.marker.opacity", l), h("unselected.marker.opacity", i));
        }
      }, $.validate = u;
    }, { "../components/color": 367, "../components/colorscale/scales": 382, "../constants/interactions": 490, "../plots/attributes": 562, "./array": 497, "./mod": 522, "./nested_property": 523, "./regex": 532, "fast-isnumeric": 190, tinycolor2: 313 }], 502: [function(v, Q, $) {
      var m, g, k = v("d3-time-format").timeFormat, x = v("fast-isnumeric"), e = v("./loggers"), r = v("./mod").mod, n = v("../constants/numerical"), s = n.BADNUM, t = n.ONEDAY, d = n.ONEHOUR, u = n.ONEMIN, o = n.ONESEC, h = n.EPOCHJD, l = v("../registry"), i = v("d3-time-format").utcFormat, p = /^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m, c = /^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m, a = new Date().getFullYear() - 70;
      function y(R) {
        return R && l.componentsRegistry.calendars && typeof R == "string" && R !== "gregorian";
      }
      function f(R, z) {
        return String(R + Math.pow(10, z)).substr(1);
      }
      $.dateTick0 = function(R, z) {
        var j = function(Y, J) {
          return y(Y) ? J ? l.getComponentMethod("calendars", "CANONICAL_SUNDAY")[Y] : l.getComponentMethod("calendars", "CANONICAL_TICK")[Y] : J ? "2000-01-02" : "2000-01-01";
        }(R, !!z);
        if (z < 2)
          return j;
        var H = $.dateTime2ms(j, R);
        return H += t * (z - 1), $.ms2DateTime(H, 0, R);
      }, $.dfltRange = function(R) {
        return y(R) ? l.getComponentMethod("calendars", "DFLTRANGE")[R] : ["2000-01-01", "2001-01-01"];
      }, $.isJSDate = function(R) {
        return typeof R == "object" && R !== null && typeof R.getTime == "function";
      }, $.dateTime2ms = function(R, z) {
        if ($.isJSDate(R)) {
          var j = R.getTimezoneOffset() * u, H = (R.getUTCMinutes() - R.getMinutes()) * u + (R.getUTCSeconds() - R.getSeconds()) * o + (R.getUTCMilliseconds() - R.getMilliseconds());
          if (H) {
            var Y = 3 * u;
            j = j - Y / 2 + r(H - j + Y / 2, Y);
          }
          return (R = Number(R) - j) >= m && R <= g ? R : s;
        }
        if (typeof R != "string" && typeof R != "number")
          return s;
        R = String(R);
        var J = y(z), W = R.charAt(0);
        !J || W !== "G" && W !== "g" || (R = R.substr(1), z = "");
        var Z = J && z.substr(0, 7) === "chinese", re = R.match(Z ? c : p);
        if (!re)
          return s;
        var V = re[1], B = re[3] || "1", U = Number(re[5] || 1), ee = Number(re[7] || 0), N = Number(re[9] || 0), K = Number(re[11] || 0);
        if (J) {
          if (V.length === 2)
            return s;
          var X;
          V = Number(V);
          try {
            var te = l.getComponentMethod("calendars", "getCal")(z);
            if (Z) {
              var ie = B.charAt(B.length - 1) === "i";
              B = parseInt(B, 10), X = te.newDate(V, te.toMonthIndex(V, B, ie), U);
            } else
              X = te.newDate(V, Number(B), U);
          } catch {
            return s;
          }
          return X ? (X.toJD() - h) * t + ee * d + N * u + K * o : s;
        }
        V = V.length === 2 ? (Number(V) + 2e3 - a) % 100 + a : Number(V), B -= 1;
        var le = new Date(Date.UTC(2e3, B, U, ee, N));
        return le.setUTCFullYear(V), le.getUTCMonth() !== B || le.getUTCDate() !== U ? s : le.getTime() + K * o;
      }, m = $.MIN_MS = $.dateTime2ms("-9999"), g = $.MAX_MS = $.dateTime2ms("9999-12-31 23:59:59.9999"), $.isDateTime = function(R, z) {
        return $.dateTime2ms(R, z) !== s;
      };
      var _ = 90 * t, b = 3 * d, w = 5 * u;
      function T(R, z, j, H, Y) {
        if ((z || j || H || Y) && (R += " " + f(z, 2) + ":" + f(j, 2), (H || Y) && (R += ":" + f(H, 2), Y))) {
          for (var J = 4; Y % 10 == 0; )
            J -= 1, Y /= 10;
          R += "." + f(Y, J);
        }
        return R;
      }
      $.ms2DateTime = function(R, z, j) {
        if (typeof R != "number" || !(R >= m && R <= g))
          return s;
        z || (z = 0);
        var H, Y, J, W, Z, re, V = Math.floor(10 * r(R + 0.05, 1)), B = Math.round(R - V / 10);
        if (y(j)) {
          var U = Math.floor(B / t) + h, ee = Math.floor(r(R, t));
          try {
            H = l.getComponentMethod("calendars", "getCal")(j).fromJD(U).formatDate("yyyy-mm-dd");
          } catch {
            H = i("G%Y-%m-%d")(new Date(B));
          }
          if (H.charAt(0) === "-")
            for (; H.length < 11; )
              H = "-0" + H.substr(1);
          else
            for (; H.length < 10; )
              H = "0" + H;
          Y = z < _ ? Math.floor(ee / d) : 0, J = z < _ ? Math.floor(ee % d / u) : 0, W = z < b ? Math.floor(ee % u / o) : 0, Z = z < w ? ee % o * 10 + V : 0;
        } else
          re = new Date(B), H = i("%Y-%m-%d")(re), Y = z < _ ? re.getUTCHours() : 0, J = z < _ ? re.getUTCMinutes() : 0, W = z < b ? re.getUTCSeconds() : 0, Z = z < w ? 10 * re.getUTCMilliseconds() + V : 0;
        return T(H, Y, J, W, Z);
      }, $.ms2DateTimeLocal = function(R) {
        if (!(R >= m + t && R <= g - t))
          return s;
        var z = Math.floor(10 * r(R + 0.05, 1)), j = new Date(Math.round(R - z / 10));
        return T(k("%Y-%m-%d")(j), j.getHours(), j.getMinutes(), j.getSeconds(), 10 * j.getUTCMilliseconds() + z);
      }, $.cleanDate = function(R, z, j) {
        if (R === s)
          return z;
        if ($.isJSDate(R) || typeof R == "number" && isFinite(R)) {
          if (y(j))
            return e.error("JS Dates and milliseconds are incompatible with world calendars", R), z;
          if (!(R = $.ms2DateTimeLocal(+R)) && z !== void 0)
            return z;
        } else if (!$.isDateTime(R, j))
          return e.error("unrecognized date", R), z;
        return R;
      };
      var L = /%\d?f/g, A = /%h/g, I = { 1: "1", 2: "1", 3: "2", 4: "2" };
      function P(R, z, j, H) {
        R = R.replace(L, function(J) {
          var W = Math.min(+J.charAt(1) || 6, 6);
          return (z / 1e3 % 1 + 2).toFixed(W).substr(2).replace(/0+$/, "") || "0";
        });
        var Y = new Date(Math.floor(z + 0.05));
        if (R = R.replace(A, function() {
          return I[j("%q")(Y)];
        }), y(H))
          try {
            R = l.getComponentMethod("calendars", "worldCalFmt")(R, z, H);
          } catch {
            return "Invalid";
          }
        return j(R)(Y);
      }
      var S = [59, 59.9, 59.99, 59.999, 59.9999];
      $.formatDate = function(R, z, j, H, Y, J) {
        if (Y = y(Y) && Y, !z)
          if (j === "y")
            z = J.year;
          else if (j === "m")
            z = J.month;
          else {
            if (j !== "d")
              return function(W, Z) {
                var re = r(W + 0.05, t), V = f(Math.floor(re / d), 2) + ":" + f(r(Math.floor(re / u), 60), 2);
                if (Z !== "M") {
                  x(Z) || (Z = 0);
                  var B = (100 + Math.min(r(W / o, 60), S[Z])).toFixed(Z).substr(1);
                  Z > 0 && (B = B.replace(/0+$/, "").replace(/[\.]$/, "")), V += ":" + B;
                }
                return V;
              }(R, j) + `
` + P(J.dayMonthYear, R, H, Y);
            z = J.dayMonth + `
` + J.year;
          }
        return P(z, R, H, Y);
      };
      var E = 3 * t;
      $.incrementMonth = function(R, z, j) {
        j = y(j) && j;
        var H = r(R, t);
        if (R = Math.round(R - H), j)
          try {
            var Y = Math.round(R / t) + h, J = l.getComponentMethod("calendars", "getCal")(j), W = J.fromJD(Y);
            return z % 12 ? J.add(W, z, "m") : J.add(W, z / 12, "y"), (W.toJD() - h) * t + H;
          } catch {
            e.error("invalid ms " + R + " in calendar " + j);
          }
        var Z = new Date(R + E);
        return Z.setUTCMonth(Z.getUTCMonth() + z) + H - E;
      }, $.findExactDates = function(R, z) {
        for (var j, H, Y = 0, J = 0, W = 0, Z = 0, re = y(z) && l.getComponentMethod("calendars", "getCal")(z), V = 0; V < R.length; V++)
          if (H = R[V], x(H)) {
            if (!(H % t))
              if (re)
                try {
                  (j = re.fromJD(H / t + h)).day() === 1 ? j.month() === 1 ? Y++ : J++ : W++;
                } catch {
                }
              else
                (j = new Date(H)).getUTCDate() === 1 ? j.getUTCMonth() === 0 ? Y++ : J++ : W++;
          } else
            Z++;
        W += J += Y;
        var B = R.length - Z;
        return { exactYears: Y / B, exactMonths: J / B, exactDays: W / B };
      };
    }, { "../constants/numerical": 491, "../registry": 647, "./loggers": 519, "./mod": 522, "d3-time-format": 120, "fast-isnumeric": 190 }], 503: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("./loggers"), k = v("./matrix"), x = v("gl-mat4");
      function e(d) {
        var u = d && d.parentNode;
        u && u.removeChild(d);
      }
      function r(d, u, o) {
        var h = "plotly.js-style-" + d, l = document.getElementById(h);
        l || ((l = document.createElement("style")).setAttribute("id", h), l.appendChild(document.createTextNode("")), document.head.appendChild(l));
        var i = l.sheet;
        i.insertRule ? i.insertRule(u + "{" + o + "}", 0) : i.addRule ? i.addRule(u, o, 0) : g.warn("addStyleRule failed");
      }
      function n(d) {
        var u = window.getComputedStyle(d, null), o = u.getPropertyValue("-webkit-transform") || u.getPropertyValue("-moz-transform") || u.getPropertyValue("-ms-transform") || u.getPropertyValue("-o-transform") || u.getPropertyValue("transform");
        return o === "none" ? null : o.replace("matrix", "").replace("3d", "").slice(1, -1).split(",").map(function(h) {
          return +h;
        });
      }
      function s(d) {
        for (var u = []; t(d); )
          u.push(d), d = d.parentNode;
        return u;
      }
      function t(d) {
        return d && (d instanceof Element || d instanceof HTMLElement);
      }
      Q.exports = { getGraphDiv: function(d) {
        var u;
        if (typeof d == "string") {
          if ((u = document.getElementById(d)) === null)
            throw new Error("No DOM element with id '" + d + "' exists on the page.");
          return u;
        }
        if (d == null)
          throw new Error("DOM element provided is null or undefined");
        return d;
      }, isPlotDiv: function(d) {
        var u = m.select(d);
        return u.node() instanceof HTMLElement && u.size() && u.classed("js-plotly-plot");
      }, removeElement: e, addStyleRule: function(d, u) {
        r("global", d, u);
      }, addRelatedStyleRule: r, deleteRelatedStyleRule: function(d) {
        var u = "plotly.js-style-" + d, o = document.getElementById(u);
        o && e(o);
      }, getFullTransformMatrix: function(d) {
        var u = s(d), o = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
        return u.forEach(function(h) {
          var l = n(h);
          if (l) {
            var i = k.convertCssMatrix(l);
            o = x.multiply(o, o, i);
          }
        }), o;
      }, getElementTransformMatrix: n, getElementAndAncestors: s, equalDomRects: function(d, u) {
        return d && u && d.x === u.x && d.y === u.y && d.top === u.top && d.left === u.left && d.right === u.right && d.bottom === u.bottom;
      } };
    }, { "./loggers": 519, "./matrix": 521, "@plotly/d3": 58, "gl-mat4": 210 }], 504: [function(v, Q, $) {
      var m = v("events").EventEmitter, g = { init: function(k) {
        if (k._ev instanceof m)
          return k;
        var x = new m(), e = new m();
        return k._ev = x, k._internalEv = e, k.on = x.on.bind(x), k.once = x.once.bind(x), k.removeListener = x.removeListener.bind(x), k.removeAllListeners = x.removeAllListeners.bind(x), k._internalOn = e.on.bind(e), k._internalOnce = e.once.bind(e), k._removeInternalListener = e.removeListener.bind(e), k._removeAllInternalListeners = e.removeAllListeners.bind(e), k.emit = function(r, n) {
          typeof jQuery < "u" && jQuery(k).trigger(r, n), x.emit(r, n), e.emit(r, n);
        }, k;
      }, triggerHandler: function(k, x, e) {
        var r, n;
        typeof jQuery < "u" && (r = jQuery(k).triggerHandler(x, e));
        var s = k._ev;
        if (!s)
          return r;
        var t, d = s._events[x];
        if (!d)
          return r;
        function u(o) {
          return o.listener ? (s.removeListener(x, o.listener), o.fired ? void 0 : (o.fired = !0, o.listener.apply(s, [e]))) : o.apply(s, [e]);
        }
        for (d = Array.isArray(d) ? d : [d], t = 0; t < d.length - 1; t++)
          u(d[t]);
        return n = u(d[t]), r !== void 0 ? r : n;
      }, purge: function(k) {
        return delete k._ev, delete k.on, delete k.once, delete k.removeListener, delete k.removeAllListeners, delete k.emit, delete k._ev, delete k._internalEv, delete k._internalOn, delete k._internalOnce, delete k._removeInternalListener, delete k._removeAllInternalListeners, k;
      } };
      Q.exports = g;
    }, { events: 84 }], 505: [function(v, Q, $) {
      var m = v("./is_plain_object.js"), g = Array.isArray;
      function k(x, e, r, n) {
        var s, t, d, u, o, h, l = x[0], i = x.length;
        if (i === 2 && g(l) && g(x[1]) && l.length === 0) {
          if (function(c, a) {
            var y, f;
            for (y = 0; y < c.length; y++) {
              if ((f = c[y]) !== null && typeof f == "object")
                return !1;
              f !== void 0 && (a[y] = f);
            }
            return !0;
          }(x[1], l))
            return l;
          l.splice(0, l.length);
        }
        for (var p = 1; p < i; p++)
          for (t in s = x[p])
            d = l[t], u = s[t], n && g(u) ? l[t] = u : e && u && (m(u) || (o = g(u))) ? (o ? (o = !1, h = d && g(d) ? d : []) : h = d && m(d) ? d : {}, l[t] = k([h, u], e, r, n)) : (u !== void 0 || r) && (l[t] = u);
        return l;
      }
      $.extendFlat = function() {
        return k(arguments, !1, !1, !1);
      }, $.extendDeep = function() {
        return k(arguments, !0, !1, !1);
      }, $.extendDeepAll = function() {
        return k(arguments, !0, !0, !1);
      }, $.extendDeepNoArrays = function() {
        return k(arguments, !0, !1, !0);
      };
    }, { "./is_plain_object.js": 516 }], 506: [function(v, Q, $) {
      Q.exports = function(m) {
        for (var g = {}, k = [], x = 0, e = 0; e < m.length; e++) {
          var r = m[e];
          g[r] !== 1 && (g[r] = 1, k[x++] = r);
        }
        return k;
      };
    }, {}], 507: [function(v, Q, $) {
      function m(k) {
        return k.visible === !0;
      }
      function g(k) {
        var x = k[0].trace;
        return x.visible === !0 && x._length !== 0;
      }
      Q.exports = function(k) {
        for (var x, e = (x = k, Array.isArray(x) && Array.isArray(x[0]) && x[0][0] && x[0][0].trace ? g : m), r = [], n = 0; n < k.length; n++) {
          var s = k[n];
          e(s) && r.push(s);
        }
        return r;
      };
    }, {}], 508: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("country-regex"), k = v("@turf/area"), x = v("@turf/centroid"), e = v("@turf/bbox"), r = v("./identity"), n = v("./loggers"), s = v("./is_plain_object"), t = v("./nested_property"), d = v("./polygon"), u = Object.keys(g), o = { "ISO-3": r, "USA-states": r, "country names": function(l) {
        for (var i = 0; i < u.length; i++) {
          var p = u[i];
          if (new RegExp(g[p]).test(l.trim().toLowerCase()))
            return p;
        }
        return n.log("Unrecognized country name: " + l + "."), !1;
      } };
      function h(l) {
        var i = l.geojson, p = window.PlotlyGeoAssets || {}, c = typeof i == "string" ? p[i] : i;
        return s(c) ? c : (n.error("Oops ... something went wrong when fetching " + i), !1);
      }
      Q.exports = { locationToFeature: function(l, i, p) {
        if (!i || typeof i != "string")
          return !1;
        var c, a, y, f = o[l](i);
        if (f) {
          if (l === "USA-states")
            for (c = [], y = 0; y < p.length; y++)
              (a = p[y]).properties && a.properties.gu && a.properties.gu === "USA" && c.push(a);
          else
            c = p;
          for (y = 0; y < c.length; y++)
            if ((a = c[y]).id === f)
              return a;
          n.log(["Location with id", f, "does not have a matching topojson feature at this resolution."].join(" "));
        }
        return !1;
      }, feature2polygons: function(l) {
        var i, p, c, a, y = l.geometry, f = y.coordinates, _ = l.id, b = [];
        function w(T) {
          for (var L = 0; L < T.length - 1; L++)
            if (T[L][0] > 0 && T[L + 1][0] < 0)
              return L;
          return null;
        }
        switch (i = _ === "RUS" || _ === "FJI" ? function(T) {
          var L;
          if (w(T) === null)
            L = T;
          else
            for (L = new Array(T.length), a = 0; a < T.length; a++)
              L[a] = [T[a][0] < 0 ? T[a][0] + 360 : T[a][0], T[a][1]];
          b.push(d.tester(L));
        } : _ === "ATA" ? function(T) {
          var L = w(T);
          if (L === null)
            return b.push(d.tester(T));
          var A = new Array(T.length + 1), I = 0;
          for (a = 0; a < T.length; a++)
            a > L ? A[I++] = [T[a][0] + 360, T[a][1]] : a === L ? (A[I++] = T[a], A[I++] = [T[a][0], -90]) : A[I++] = T[a];
          var P = d.tester(A);
          P.pts.pop(), b.push(P);
        } : function(T) {
          b.push(d.tester(T));
        }, y.type) {
          case "MultiPolygon":
            for (p = 0; p < f.length; p++)
              for (c = 0; c < f[p].length; c++)
                i(f[p][c]);
            break;
          case "Polygon":
            for (p = 0; p < f.length; p++)
              i(f[p]);
        }
        return b;
      }, getTraceGeojson: h, extractTraceFeature: function(l) {
        var i = l[0].trace, p = h(i);
        if (!p)
          return !1;
        var c, a = {}, y = [];
        for (c = 0; c < i._length; c++) {
          var f = l[c];
          (f.loc || f.loc === 0) && (a[f.loc] = f);
        }
        function _(T) {
          var L = t(T, i.featureidkey || "id").get(), A = a[L];
          if (A) {
            var I = T.geometry;
            if (I.type === "Polygon" || I.type === "MultiPolygon") {
              var P = { type: "Feature", id: L, geometry: I, properties: {} };
              P.properties.ct = function(S) {
                var E, R = S.geometry;
                if (R.type === "MultiPolygon")
                  for (var z = R.coordinates, j = 0, H = 0; H < z.length; H++) {
                    var Y = { type: "Polygon", coordinates: z[H] }, J = k.default(Y);
                    J > j && (j = J, E = Y);
                  }
                else
                  E = R;
                return x.default(E).geometry.coordinates;
              }(P), A.fIn = T, A.fOut = P, y.push(P);
            } else
              n.log(["Location", A.loc, "does not have a valid GeoJSON geometry.", "Traces with locationmode *geojson-id* only support", "*Polygon* and *MultiPolygon* geometries."].join(" "));
          }
          delete a[L];
        }
        switch (p.type) {
          case "FeatureCollection":
            var b = p.features;
            for (c = 0; c < b.length; c++)
              _(b[c]);
            break;
          case "Feature":
            _(p);
            break;
          default:
            return n.warn(["Invalid GeoJSON type", (p.type || "none") + ".", "Traces with locationmode *geojson-id* only support", "*FeatureCollection* and *Feature* types."].join(" ")), !1;
        }
        for (var w in a)
          n.log(["Location *" + w + "*", "does not have a matching feature with id-key", "*" + i.featureidkey + "*."].join(" "));
        return y;
      }, fetchTraceGeoData: function(l) {
        var i = window.PlotlyGeoAssets || {}, p = [];
        function c(_) {
          return new Promise(function(b, w) {
            m.json(_, function(T, L) {
              if (T) {
                delete i[_];
                var A = T.status === 404 ? 'GeoJSON at URL "' + _ + '" does not exist.' : "Unexpected error while fetching from " + _;
                return w(new Error(A));
              }
              return i[_] = L, b(L);
            });
          });
        }
        function a(_) {
          return new Promise(function(b, w) {
            var T = 0, L = setInterval(function() {
              return i[_] && i[_] !== "pending" ? (clearInterval(L), b(i[_])) : T > 100 ? (clearInterval(L), w("Unexpected error while fetching from " + _)) : void T++;
            }, 50);
          });
        }
        for (var y = 0; y < l.length; y++) {
          var f = l[y][0].trace.geojson;
          typeof f == "string" && (i[f] ? i[f] === "pending" && p.push(a(f)) : (i[f] = "pending", p.push(c(f))));
        }
        return p;
      }, computeBbox: function(l) {
        return e.default(l);
      } };
    }, { "./identity": 513, "./is_plain_object": 516, "./loggers": 519, "./nested_property": 523, "./polygon": 527, "@plotly/d3": 58, "@turf/area": 61, "@turf/bbox": 64, "@turf/centroid": 67, "country-regex": 94 }], 509: [function(v, Q, $) {
      var m = v("../constants/numerical").BADNUM;
      $.calcTraceToLineCoords = function(g) {
        for (var k = g[0].trace.connectgaps, x = [], e = [], r = 0; r < g.length; r++) {
          var n = g[r].lonlat;
          n[0] !== m ? e.push(n) : !k && e.length > 0 && (x.push(e), e = []);
        }
        return e.length > 0 && x.push(e), x;
      }, $.makeLine = function(g) {
        return g.length === 1 ? { type: "LineString", coordinates: g[0] } : { type: "MultiLineString", coordinates: g };
      }, $.makePolygon = function(g) {
        if (g.length === 1)
          return { type: "Polygon", coordinates: g };
        for (var k = new Array(g.length), x = 0; x < g.length; x++)
          k[x] = [g[x]];
        return { type: "MultiPolygon", coordinates: k };
      }, $.makeBlank = function() {
        return { type: "Point", coordinates: [] };
      };
    }, { "../constants/numerical": 491 }], 510: [function(v, Q, $) {
      var m, g, k, x = v("./mod").mod;
      function e(n, s, t, d, u, o, h, l) {
        var i = t - n, p = u - n, c = h - u, a = d - s, y = o - s, f = l - o, _ = i * f - c * a;
        if (_ === 0)
          return null;
        var b = (p * f - c * y) / _, w = (p * a - i * y) / _;
        return w < 0 || w > 1 || b < 0 || b > 1 ? null : { x: n + i * b, y: s + a * b };
      }
      function r(n, s, t, d, u) {
        var o = d * n + u * s;
        if (o < 0)
          return d * d + u * u;
        if (o > t) {
          var h = d - n, l = u - s;
          return h * h + l * l;
        }
        var i = d * s - u * n;
        return i * i / t;
      }
      $.segmentsIntersect = e, $.segmentDistance = function(n, s, t, d, u, o, h, l) {
        if (e(n, s, t, d, u, o, h, l))
          return 0;
        var i = t - n, p = d - s, c = h - u, a = l - o, y = i * i + p * p, f = c * c + a * a, _ = Math.min(r(i, p, y, u - n, o - s), r(i, p, y, h - n, l - s), r(c, a, f, n - u, s - o), r(c, a, f, t - u, d - o));
        return Math.sqrt(_);
      }, $.getTextLocation = function(n, s, t, d) {
        if (n === g && d === k || (m = {}, g = n, k = d), m[t])
          return m[t];
        var u = n.getPointAtLength(x(t - d / 2, s)), o = n.getPointAtLength(x(t + d / 2, s)), h = Math.atan((o.y - u.y) / (o.x - u.x)), l = n.getPointAtLength(x(t, s)), i = { x: (4 * l.x + u.x + o.x) / 6, y: (4 * l.y + u.y + o.y) / 6, theta: h };
        return m[t] = i, i;
      }, $.clearLocationCache = function() {
        g = null;
      }, $.getVisibleSegment = function(n, s, t) {
        var d, u, o = s.left, h = s.right, l = s.top, i = s.bottom, p = 0, c = n.getTotalLength(), a = c;
        function y(_) {
          var b = n.getPointAtLength(_);
          _ === 0 ? d = b : _ === c && (u = b);
          var w = b.x < o ? o - b.x : b.x > h ? b.x - h : 0, T = b.y < l ? l - b.y : b.y > i ? b.y - i : 0;
          return Math.sqrt(w * w + T * T);
        }
        for (var f = y(p); f; ) {
          if ((p += f + t) > a)
            return;
          f = y(p);
        }
        for (f = y(a); f; ) {
          if (p > (a -= f + t))
            return;
          f = y(a);
        }
        return { min: p, max: a, len: a - p, total: c, isClosed: p === 0 && a === c && Math.abs(d.x - u.x) < 0.1 && Math.abs(d.y - u.y) < 0.1 };
      }, $.findPointOnPath = function(n, s, t, d) {
        for (var u, o, h, l = (d = d || {}).pathLength || n.getTotalLength(), i = d.tolerance || 1e-3, p = d.iterationLimit || 30, c = n.getPointAtLength(0)[t] > n.getPointAtLength(l)[t] ? -1 : 1, a = 0, y = 0, f = l; a < p; ) {
          if (u = (y + f) / 2, h = (o = n.getPointAtLength(u))[t] - s, Math.abs(h) < i)
            return o;
          c * h > 0 ? f = u : y = u, a++;
        }
        return o;
      };
    }, { "./mod": 522 }], 511: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("tinycolor2"), k = v("color-normalize"), x = v("../components/colorscale"), e = v("../components/color/attributes").defaultLine, r = v("./array").isArrayOrTypedArray, n = k(e);
      function s(u, o) {
        var h = u;
        return h[3] *= o, h;
      }
      function t(u) {
        if (m(u))
          return n;
        var o = k(u);
        return o.length ? o : n;
      }
      function d(u) {
        return m(u) ? u : 1;
      }
      Q.exports = { formatColor: function(u, o, h) {
        var l, i, p, c, a, y = u.color, f = r(y), _ = r(o), b = x.extractOpts(u), w = [];
        if (l = b.colorscale !== void 0 ? x.makeColorScaleFuncFromTrace(u) : t, i = f ? function(L, A) {
          return L[A] === void 0 ? n : k(l(L[A]));
        } : t, p = _ ? function(L, A) {
          return L[A] === void 0 ? 1 : d(L[A]);
        } : d, f || _)
          for (var T = 0; T < h; T++)
            c = i(y, T), a = p(o, T), w[T] = s(c, a);
        else
          w = s(k(y), o);
        return w;
      }, parseColorScale: function(u) {
        var o = x.extractOpts(u), h = o.colorscale;
        return o.reversescale && (h = x.flipScale(o.colorscale)), h.map(function(l) {
          var i = l[0], p = g(l[1]).toRgb();
          return { index: i, rgb: [p.r, p.g, p.b, p.a] };
        });
      } };
    }, { "../components/color/attributes": 366, "../components/colorscale": 379, "./array": 497, "color-normalize": 89, "fast-isnumeric": 190, tinycolor2: 313 }], 512: [function(v, Q, $) {
      var m = v("./identity");
      function g(k) {
        return [k];
      }
      Q.exports = { keyFun: function(k) {
        return k.key;
      }, repeat: g, descend: m, wrap: g, unwrap: function(k) {
        return k[0];
      } };
    }, { "./identity": 513 }], 513: [function(v, Q, $) {
      Q.exports = function(m) {
        return m;
      };
    }, {}], 514: [function(v, Q, $) {
      Q.exports = function(m, g) {
        if (!g)
          return m;
        var k = 1 / Math.abs(g), x = k > 1 ? (k * m + k * g) / k : m + g, e = String(x).length;
        if (e > 16) {
          var r = String(g).length;
          if (e >= String(m).length + r) {
            var n = parseFloat(x).toPrecision(12);
            n.indexOf("e+") === -1 && (x = +n);
          }
        }
        return x;
      };
    }, {}], 515: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-time-format").utcFormat, k = v("d3-format").format, x = v("fast-isnumeric"), e = v("../constants/numerical"), r = e.FP_SAFE, n = -r, s = e.BADNUM, t = Q.exports = {};
      t.adjustFormat = function(V) {
        return !V || /^\d[.]\df/.test(V) || /[.]\d%/.test(V) ? V : V === "0.f" ? "~f" : /^\d%/.test(V) ? "~%" : /^\ds/.test(V) ? "~s" : !/^[~,.0$]/.test(V) && /[&fps]/.test(V) ? "~" + V : V;
      };
      var d = {};
      t.warnBadFormat = function(V) {
        var B = String(V);
        d[B] || (d[B] = 1, t.warn('encountered bad format: "' + B + '"'));
      }, t.noFormat = function(V) {
        return String(V);
      }, t.numberFormat = function(V) {
        var B;
        try {
          B = k(t.adjustFormat(V));
        } catch {
          return t.warnBadFormat(V), t.noFormat;
        }
        return B;
      }, t.nestedProperty = v("./nested_property"), t.keyedContainer = v("./keyed_container"), t.relativeAttr = v("./relative_attr"), t.isPlainObject = v("./is_plain_object"), t.toLogRange = v("./to_log_range"), t.relinkPrivateKeys = v("./relink_private");
      var u = v("./array");
      t.isTypedArray = u.isTypedArray, t.isArrayOrTypedArray = u.isArrayOrTypedArray, t.isArray1D = u.isArray1D, t.ensureArray = u.ensureArray, t.concat = u.concat, t.maxRowLength = u.maxRowLength, t.minRowLength = u.minRowLength;
      var o = v("./mod");
      t.mod = o.mod, t.modHalf = o.modHalf;
      var h = v("./coerce");
      t.valObjectMeta = h.valObjectMeta, t.coerce = h.coerce, t.coerce2 = h.coerce2, t.coerceFont = h.coerceFont, t.coercePattern = h.coercePattern, t.coerceHoverinfo = h.coerceHoverinfo, t.coerceSelectionMarkerOpacity = h.coerceSelectionMarkerOpacity, t.validate = h.validate;
      var l = v("./dates");
      t.dateTime2ms = l.dateTime2ms, t.isDateTime = l.isDateTime, t.ms2DateTime = l.ms2DateTime, t.ms2DateTimeLocal = l.ms2DateTimeLocal, t.cleanDate = l.cleanDate, t.isJSDate = l.isJSDate, t.formatDate = l.formatDate, t.incrementMonth = l.incrementMonth, t.dateTick0 = l.dateTick0, t.dfltRange = l.dfltRange, t.findExactDates = l.findExactDates, t.MIN_MS = l.MIN_MS, t.MAX_MS = l.MAX_MS;
      var i = v("./search");
      t.findBin = i.findBin, t.sorterAsc = i.sorterAsc, t.sorterDes = i.sorterDes, t.distinctVals = i.distinctVals, t.roundUp = i.roundUp, t.sort = i.sort, t.findIndexOfMin = i.findIndexOfMin, t.sortObjectKeys = v("./sort_object_keys");
      var p = v("./stats");
      t.aggNums = p.aggNums, t.len = p.len, t.mean = p.mean, t.median = p.median, t.midRange = p.midRange, t.variance = p.variance, t.stdev = p.stdev, t.interp = p.interp;
      var c = v("./matrix");
      t.init2dArray = c.init2dArray, t.transposeRagged = c.transposeRagged, t.dot = c.dot, t.translationMatrix = c.translationMatrix, t.rotationMatrix = c.rotationMatrix, t.rotationXYMatrix = c.rotationXYMatrix, t.apply3DTransform = c.apply3DTransform, t.apply2DTransform = c.apply2DTransform, t.apply2DTransform2 = c.apply2DTransform2, t.convertCssMatrix = c.convertCssMatrix, t.inverseTransformMatrix = c.inverseTransformMatrix;
      var a = v("./angles");
      t.deg2rad = a.deg2rad, t.rad2deg = a.rad2deg, t.angleDelta = a.angleDelta, t.angleDist = a.angleDist, t.isFullCircle = a.isFullCircle, t.isAngleInsideSector = a.isAngleInsideSector, t.isPtInsideSector = a.isPtInsideSector, t.pathArc = a.pathArc, t.pathSector = a.pathSector, t.pathAnnulus = a.pathAnnulus;
      var y = v("./anchor_utils");
      t.isLeftAnchor = y.isLeftAnchor, t.isCenterAnchor = y.isCenterAnchor, t.isRightAnchor = y.isRightAnchor, t.isTopAnchor = y.isTopAnchor, t.isMiddleAnchor = y.isMiddleAnchor, t.isBottomAnchor = y.isBottomAnchor;
      var f = v("./geometry2d");
      t.segmentsIntersect = f.segmentsIntersect, t.segmentDistance = f.segmentDistance, t.getTextLocation = f.getTextLocation, t.clearLocationCache = f.clearLocationCache, t.getVisibleSegment = f.getVisibleSegment, t.findPointOnPath = f.findPointOnPath;
      var _ = v("./extend");
      t.extendFlat = _.extendFlat, t.extendDeep = _.extendDeep, t.extendDeepAll = _.extendDeepAll, t.extendDeepNoArrays = _.extendDeepNoArrays;
      var b = v("./loggers");
      t.log = b.log, t.warn = b.warn, t.error = b.error;
      var w = v("./regex");
      t.counterRegex = w.counter;
      var T = v("./throttle");
      t.throttle = T.throttle, t.throttleDone = T.done, t.clearThrottle = T.clear;
      var L = v("./dom");
      function A(V) {
        var B = {};
        for (var U in V)
          for (var ee = V[U], N = 0; N < ee.length; N++)
            B[ee[N]] = +U;
        return B;
      }
      t.getGraphDiv = L.getGraphDiv, t.isPlotDiv = L.isPlotDiv, t.removeElement = L.removeElement, t.addStyleRule = L.addStyleRule, t.addRelatedStyleRule = L.addRelatedStyleRule, t.deleteRelatedStyleRule = L.deleteRelatedStyleRule, t.getFullTransformMatrix = L.getFullTransformMatrix, t.getElementTransformMatrix = L.getElementTransformMatrix, t.getElementAndAncestors = L.getElementAndAncestors, t.equalDomRects = L.equalDomRects, t.clearResponsive = v("./clear_responsive"), t.preserveDrawingBuffer = v("./preserve_drawing_buffer"), t.makeTraceGroups = v("./make_trace_groups"), t._ = v("./localize"), t.notifier = v("./notifier"), t.filterUnique = v("./filter_unique"), t.filterVisible = v("./filter_visible"), t.pushUnique = v("./push_unique"), t.increment = v("./increment"), t.cleanNumber = v("./clean_number"), t.ensureNumber = function(V) {
        return x(V) ? (V = Number(V)) > r || V < n ? s : V : s;
      }, t.isIndex = function(V, B) {
        return !(B !== void 0 && V >= B) && x(V) && V >= 0 && V % 1 == 0;
      }, t.noop = v("./noop"), t.identity = v("./identity"), t.repeat = function(V, B) {
        for (var U = new Array(B), ee = 0; ee < B; ee++)
          U[ee] = V;
        return U;
      }, t.swapAttrs = function(V, B, U, ee) {
        U || (U = "x"), ee || (ee = "y");
        for (var N = 0; N < B.length; N++) {
          var K = B[N], X = t.nestedProperty(V, K.replace("?", U)), te = t.nestedProperty(V, K.replace("?", ee)), ie = X.get();
          X.set(te.get()), te.set(ie);
        }
      }, t.raiseToTop = function(V) {
        V.parentNode.appendChild(V);
      }, t.cancelTransition = function(V) {
        return V.transition().duration(0);
      }, t.constrain = function(V, B, U) {
        return B > U ? Math.max(U, Math.min(B, V)) : Math.max(B, Math.min(U, V));
      }, t.bBoxIntersect = function(V, B, U) {
        return U = U || 0, V.left <= B.right + U && B.left <= V.right + U && V.top <= B.bottom + U && B.top <= V.bottom + U;
      }, t.simpleMap = function(V, B, U, ee, N) {
        for (var K = V.length, X = new Array(K), te = 0; te < K; te++)
          X[te] = B(V[te], U, ee, N);
        return X;
      }, t.randstr = function V(B, U, ee, N) {
        if (ee || (ee = 16), U === void 0 && (U = 24), U <= 0)
          return "0";
        var K, X, te = Math.log(Math.pow(2, U)) / Math.log(ee), ie = "";
        for (K = 2; te === 1 / 0; K *= 2)
          te = Math.log(Math.pow(2, U / K)) / Math.log(ee) * K;
        var le = te - Math.floor(te);
        for (K = 0; K < Math.floor(te); K++)
          ie = Math.floor(Math.random() * ee).toString(ee) + ie;
        le && (X = Math.pow(ee, le), ie = Math.floor(Math.random() * X).toString(ee) + ie);
        var oe = parseInt(ie, ee);
        return B && B[ie] || oe !== 1 / 0 && oe >= Math.pow(2, U) ? N > 10 ? (t.warn("randstr failed uniqueness"), ie) : V(B, U, ee, (N || 0) + 1) : ie;
      }, t.OptionControl = function(V, B) {
        V || (V = {}), B || (B = "opt");
        var U = { optionList: [], _newoption: function(ee) {
          ee[B] = V, U[ee.name] = ee, U.optionList.push(ee);
        } };
        return U["_" + B] = V, U;
      }, t.smooth = function(V, B) {
        if ((B = Math.round(B) || 0) < 2)
          return V;
        var U, ee, N, K, X = V.length, te = 2 * X, ie = 2 * B - 1, le = new Array(ie), oe = new Array(X);
        for (U = 0; U < ie; U++)
          le[U] = (1 - Math.cos(Math.PI * (U + 1) / B)) / (2 * B);
        for (U = 0; U < X; U++) {
          for (K = 0, ee = 0; ee < ie; ee++)
            (N = U + ee + 1 - B) < -X ? N -= te * Math.round(N / te) : N >= te && (N -= te * Math.floor(N / te)), N < 0 ? N = -1 - N : N >= X && (N = te - 1 - N), K += V[N] * le[ee];
          oe[U] = K;
        }
        return oe;
      }, t.syncOrAsync = function(V, B, U) {
        var ee;
        function N() {
          return t.syncOrAsync(V, B, U);
        }
        for (; V.length; )
          if ((ee = (0, V.splice(0, 1)[0])(B)) && ee.then)
            return ee.then(N);
        return U && U(B);
      }, t.stripTrailingSlash = function(V) {
        return V.substr(-1) === "/" ? V.substr(0, V.length - 1) : V;
      }, t.noneOrAll = function(V, B, U) {
        if (V) {
          var ee, N = !1, K = !0;
          for (ee = 0; ee < U.length; ee++)
            V[U[ee]] != null ? N = !0 : K = !1;
          if (N && !K)
            for (ee = 0; ee < U.length; ee++)
              V[U[ee]] = B[U[ee]];
        }
      }, t.mergeArray = function(V, B, U, ee) {
        var N = typeof ee == "function";
        if (t.isArrayOrTypedArray(V))
          for (var K = Math.min(V.length, B.length), X = 0; X < K; X++) {
            var te = V[X];
            B[X][U] = N ? ee(te) : te;
          }
      }, t.mergeArrayCastPositive = function(V, B, U) {
        return t.mergeArray(V, B, U, function(ee) {
          var N = +ee;
          return isFinite(N) && N > 0 ? N : 0;
        });
      }, t.fillArray = function(V, B, U, ee) {
        if (ee = ee || t.identity, t.isArrayOrTypedArray(V))
          for (var N = 0; N < B.length; N++)
            B[N][U] = ee(V[N]);
      }, t.castOption = function(V, B, U, ee) {
        ee = ee || t.identity;
        var N = t.nestedProperty(V, U).get();
        return t.isArrayOrTypedArray(N) ? Array.isArray(B) && t.isArrayOrTypedArray(N[B[0]]) ? ee(N[B[0]][B[1]]) : ee(N[B]) : N;
      }, t.extractOption = function(V, B, U, ee) {
        if (U in V)
          return V[U];
        var N = t.nestedProperty(B, ee).get();
        return Array.isArray(N) ? void 0 : N;
      }, t.tagSelected = function(V, B, U) {
        var ee, N, K = B.selectedpoints, X = B._indexToPoints;
        X && (ee = A(X));
        for (var te = 0; te < K.length; te++) {
          var ie = K[te];
          if (t.isIndex(ie) || t.isArrayOrTypedArray(ie) && t.isIndex(ie[0]) && t.isIndex(ie[1])) {
            var le = ee ? ee[ie] : ie, oe = U ? U[le] : le;
            (N = oe) !== void 0 && N < V.length && (V[oe].selected = 1);
          }
        }
      }, t.selIndices2selPoints = function(V) {
        var B = V.selectedpoints, U = V._indexToPoints;
        if (U) {
          for (var ee = A(U), N = [], K = 0; K < B.length; K++) {
            var X = B[K];
            if (t.isIndex(X)) {
              var te = ee[X];
              t.isIndex(te) && N.push(te);
            }
          }
          return N;
        }
        return B;
      }, t.getTargetArray = function(V, B) {
        var U = B.target;
        if (typeof U == "string" && U) {
          var ee = t.nestedProperty(V, U).get();
          return !!Array.isArray(ee) && ee;
        }
        return !!Array.isArray(U) && U;
      }, t.minExtend = function(V, B) {
        var U = {};
        typeof B != "object" && (B = {});
        var ee, N, K, X = Object.keys(V);
        for (ee = 0; ee < X.length; ee++)
          K = V[N = X[ee]], N.charAt(0) !== "_" && typeof K != "function" && (N === "module" ? U[N] = K : Array.isArray(K) ? U[N] = N === "colorscale" ? K.slice() : K.slice(0, 3) : t.isTypedArray(K) ? U[N] = K.subarray(0, 3) : U[N] = K && typeof K == "object" ? t.minExtend(V[N], B[N]) : K);
        for (X = Object.keys(B), ee = 0; ee < X.length; ee++)
          typeof (K = B[N = X[ee]]) == "object" && N in U && typeof U[N] == "object" || (U[N] = K);
        return U;
      }, t.titleCase = function(V) {
        return V.charAt(0).toUpperCase() + V.substr(1);
      }, t.containsAny = function(V, B) {
        for (var U = 0; U < B.length; U++)
          if (V.indexOf(B[U]) !== -1)
            return !0;
        return !1;
      }, t.isIE = function() {
        return window.navigator.msSaveBlob !== void 0;
      };
      var I = /Version\/[\d\.]+.*Safari/;
      t.isSafari = function() {
        return I.test(window.navigator.userAgent);
      };
      var P = /iPad|iPhone|iPod/;
      t.isIOS = function() {
        return P.test(window.navigator.userAgent);
      };
      var S = /Firefox\/(\d+)\.\d+/;
      t.getFirefoxVersion = function() {
        var V = S.exec(window.navigator.userAgent);
        if (V && V.length === 2) {
          var B = parseInt(V[1]);
          if (!isNaN(B))
            return B;
        }
        return null;
      }, t.isD3Selection = function(V) {
        return V instanceof m.selection;
      }, t.ensureSingle = function(V, B, U, ee) {
        var N = V.select(B + (U ? "." + U : ""));
        if (N.size())
          return N;
        var K = V.append(B);
        return U && K.classed(U, !0), ee && K.call(ee), K;
      }, t.ensureSingleById = function(V, B, U, ee) {
        var N = V.select(B + "#" + U);
        if (N.size())
          return N;
        var K = V.append(B).attr("id", U);
        return ee && K.call(ee), K;
      }, t.objectFromPath = function(V, B) {
        for (var U, ee = V.split("."), N = U = {}, K = 0; K < ee.length; K++) {
          var X = ee[K], te = null, ie = ee[K].match(/(.*)\[([0-9]+)\]/);
          ie ? (X = ie[1], te = ie[2], U = U[X] = [], K === ee.length - 1 ? U[te] = B : U[te] = {}, U = U[te]) : (K === ee.length - 1 ? U[X] = B : U[X] = {}, U = U[X]);
        }
        return N;
      };
      var E = /^([^\[\.]+)\.(.+)?/, R = /^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;
      t.expandObjectPaths = function(V) {
        var B, U, ee, N, K, X, te;
        if (typeof V == "object" && !Array.isArray(V))
          for (U in V)
            V.hasOwnProperty(U) && ((B = U.match(E)) ? (N = V[U], ee = B[1], delete V[U], V[ee] = t.extendDeepNoArrays(V[ee] || {}, t.objectFromPath(U, t.expandObjectPaths(N))[ee])) : (B = U.match(R)) ? (N = V[U], ee = B[1], K = parseInt(B[2]), delete V[U], V[ee] = V[ee] || [], B[3] === "." ? (te = B[4], X = V[ee][K] = V[ee][K] || {}, t.extendDeepNoArrays(X, t.objectFromPath(te, t.expandObjectPaths(N)))) : V[ee][K] = t.expandObjectPaths(N)) : V[U] = t.expandObjectPaths(V[U]));
        return V;
      }, t.numSeparate = function(V, B, U) {
        if (U || (U = !1), typeof B != "string" || B.length === 0)
          throw new Error("Separator string required for formatting!");
        typeof V == "number" && (V = String(V));
        var ee = /(\d+)(\d{3})/, N = B.charAt(0), K = B.charAt(1), X = V.split("."), te = X[0], ie = X.length > 1 ? N + X[1] : "";
        if (K && (X.length > 1 || te.length > 4 || U))
          for (; ee.test(te); )
            te = te.replace(ee, "$1" + K + "$2");
        return te + ie;
      }, t.TEMPLATE_STRING_REGEX = /%{([^\s%{}:]*)([:|\|][^}]*)?}/g;
      var z = /^\w*$/;
      t.templateString = function(V, B) {
        var U = {};
        return V.replace(t.TEMPLATE_STRING_REGEX, function(ee, N) {
          var K;
          return z.test(N) ? K = B[N] : (U[N] = U[N] || t.nestedProperty(B, N).get, K = U[N]()), t.isValidTextValue(K) ? K : "";
        });
      };
      var j = { max: 10, count: 0, name: "hovertemplate" };
      t.hovertemplateString = function() {
        return J.apply(j, arguments);
      };
      var H = { max: 10, count: 0, name: "texttemplate" };
      t.texttemplateString = function() {
        return J.apply(H, arguments);
      };
      var Y = /^[:|\|]/;
      function J(V, B, U) {
        var ee = this, N = arguments;
        B || (B = {});
        var K = {};
        return V.replace(t.TEMPLATE_STRING_REGEX, function(X, te, ie) {
          var le, oe, ve, ue = te === "_xother" || te === "_yother", ye = te === "_xother_" || te === "_yother_", Ae = te === "xother_" || te === "yother_", pe = te === "xother" || te === "yother" || ue || Ae || ye, ge = te;
          if ((ue || ye) && (ge = ge.substring(1)), (Ae || ye) && (ge = ge.substring(0, ge.length - 1)), pe) {
            if ((le = B[ge]) === void 0)
              return "";
          } else
            for (ve = 3; ve < N.length; ve++)
              if (oe = N[ve]) {
                if (oe.hasOwnProperty(ge)) {
                  le = oe[ge];
                  break;
                }
                if (z.test(ge) || (le = t.nestedProperty(oe, ge).get(), (le = K[ge] || t.nestedProperty(oe, ge).get()) && (K[ge] = le)), le !== void 0)
                  break;
              }
          if (le === void 0 && ee)
            return ee.count < ee.max && (t.warn("Variable '" + ge + "' in " + ee.name + " could not be found!"), le = X), ee.count === ee.max && t.warn("Too many " + ee.name + " warnings - additional warnings will be suppressed"), ee.count++, X;
          if (ie) {
            var we;
            if (ie[0] === ":" && (le = (we = U ? U.numberFormat : t.numberFormat)(ie.replace(Y, ""))(le)), ie[0] === "|") {
              we = U ? U.timeFormat : g;
              var se = t.dateTime2ms(le);
              le = t.formatDate(se, ie.replace(Y, ""), !1, we);
            }
          } else {
            var de = ge + "Label";
            B.hasOwnProperty(de) && (le = B[de]);
          }
          return pe && (le = "(" + le + ")", (ue || ye) && (le = " " + le), (Ae || ye) && (le += " ")), le;
        });
      }
      t.subplotSort = function(V, B) {
        for (var U = Math.min(V.length, B.length) + 1, ee = 0, N = 0, K = 0; K < U; K++) {
          var X = V.charCodeAt(K) || 0, te = B.charCodeAt(K) || 0, ie = X >= 48 && X <= 57, le = te >= 48 && te <= 57;
          if (ie && (ee = 10 * ee + X - 48), le && (N = 10 * N + te - 48), !ie || !le) {
            if (ee !== N)
              return ee - N;
            if (X !== te)
              return X - te;
          }
        }
        return N - ee;
      };
      var W = 2e9;
      t.seedPseudoRandom = function() {
        W = 2e9;
      }, t.pseudoRandom = function() {
        var V = W;
        return W = (69069 * W + 1) % 4294967296, Math.abs(W - V) < 429496729 ? t.pseudoRandom() : W / 4294967296;
      }, t.fillText = function(V, B, U) {
        var ee = Array.isArray(U) ? function(X) {
          U.push(X);
        } : function(X) {
          U.text = X;
        }, N = t.extractOption(V, B, "htx", "hovertext");
        if (t.isValidTextValue(N))
          return ee(N);
        var K = t.extractOption(V, B, "tx", "text");
        return t.isValidTextValue(K) ? ee(K) : void 0;
      }, t.isValidTextValue = function(V) {
        return V || V === 0;
      }, t.formatPercent = function(V, B) {
        B = B || 0;
        for (var U = (Math.round(100 * V * Math.pow(10, B)) * Math.pow(0.1, B)).toFixed(B) + "%", ee = 0; ee < B; ee++)
          U.indexOf(".") !== -1 && (U = (U = U.replace("0%", "%")).replace(".%", "%"));
        return U;
      }, t.isHidden = function(V) {
        var B = window.getComputedStyle(V).display;
        return !B || B === "none";
      }, t.strTranslate = function(V, B) {
        return V || B ? "translate(" + V + "," + B + ")" : "";
      }, t.strRotate = function(V) {
        return V ? "rotate(" + V + ")" : "";
      }, t.strScale = function(V) {
        return V !== 1 ? "scale(" + V + ")" : "";
      }, t.getTextTransform = function(V) {
        var B = V.noCenter, U = V.textX, ee = V.textY, N = V.targetX, K = V.targetY, X = V.anchorX || 0, te = V.anchorY || 0, ie = V.rotate, le = V.scale;
        return le ? le > 1 && (le = 1) : le = 0, t.strTranslate(N - le * (U + X), K - le * (ee + te)) + t.strScale(le) + (ie ? "rotate(" + ie + (B ? "" : " " + U + " " + ee) + ")" : "");
      }, t.setTransormAndDisplay = function(V, B) {
        V.attr("transform", t.getTextTransform(B)), V.style("display", B.scale ? null : "none");
      }, t.ensureUniformFontSize = function(V, B) {
        var U = t.extendFlat({}, B);
        return U.size = Math.max(B.size, V._fullLayout.uniformtext.minsize || 0), U;
      }, t.join2 = function(V, B, U) {
        var ee = V.length;
        return ee > 1 ? V.slice(0, -1).join(B) + U + V[ee - 1] : V.join(B);
      }, t.bigFont = function(V) {
        return Math.round(1.2 * V);
      };
      var Z = t.getFirefoxVersion(), re = Z !== null && Z < 86;
      t.getPositionFromD3Event = function() {
        return re ? [m.event.layerX, m.event.layerY] : [m.event.offsetX, m.event.offsetY];
      };
    }, { "../constants/numerical": 491, "./anchor_utils": 495, "./angles": 496, "./array": 497, "./clean_number": 498, "./clear_responsive": 500, "./coerce": 501, "./dates": 502, "./dom": 503, "./extend": 505, "./filter_unique": 506, "./filter_visible": 507, "./geometry2d": 510, "./identity": 513, "./increment": 514, "./is_plain_object": 516, "./keyed_container": 517, "./localize": 518, "./loggers": 519, "./make_trace_groups": 520, "./matrix": 521, "./mod": 522, "./nested_property": 523, "./noop": 524, "./notifier": 525, "./preserve_drawing_buffer": 529, "./push_unique": 530, "./regex": 532, "./relative_attr": 533, "./relink_private": 534, "./search": 535, "./sort_object_keys": 538, "./stats": 539, "./throttle": 542, "./to_log_range": 543, "@plotly/d3": 58, "d3-format": 112, "d3-time-format": 120, "fast-isnumeric": 190 }], 516: [function(v, Q, $) {
      Q.exports = function(m) {
        return window && window.process && window.process.versions ? Object.prototype.toString.call(m) === "[object Object]" : Object.prototype.toString.call(m) === "[object Object]" && Object.getPrototypeOf(m).hasOwnProperty("hasOwnProperty");
      };
    }, {}], 517: [function(v, Q, $) {
      var m = v("./nested_property"), g = /^\w*$/;
      Q.exports = function(k, x, e, r) {
        var n, s, t;
        e = e || "name", r = r || "value";
        var d = {};
        x && x.length ? (t = m(k, x), s = t.get()) : s = k, x = x || "";
        var u = {};
        if (s)
          for (n = 0; n < s.length; n++)
            u[s[n][e]] = n;
        var o = g.test(r), h = { set: function(l, i) {
          var p = i === null ? 4 : 0;
          if (!s) {
            if (!t || p === 4)
              return;
            s = [], t.set(s);
          }
          var c = u[l];
          if (c === void 0) {
            if (p === 4)
              return;
            p |= 3, c = s.length, u[l] = c;
          } else
            i !== (o ? s[c][r] : m(s[c], r).get()) && (p |= 2);
          var a = s[c] = s[c] || {};
          return a[e] = l, o ? a[r] = i : m(a, r).set(i), i !== null && (p &= -5), d[c] = d[c] | p, h;
        }, get: function(l) {
          if (s) {
            var i = u[l];
            return i === void 0 ? void 0 : o ? s[i][r] : m(s[i], r).get();
          }
        }, rename: function(l, i) {
          var p = u[l];
          return p === void 0 || (d[p] = 1 | d[p], u[i] = p, delete u[l], s[p][e] = i), h;
        }, remove: function(l) {
          var i = u[l];
          if (i === void 0)
            return h;
          var p = s[i];
          if (Object.keys(p).length > 2)
            return d[i] = 2 | d[i], h.set(l, null);
          if (o) {
            for (n = i; n < s.length; n++)
              d[n] = 3 | d[n];
            for (n = i; n < s.length; n++)
              u[s[n][e]]--;
            s.splice(i, 1), delete u[l];
          } else
            m(p, r).set(null), d[i] = 6 | d[i];
          return h;
        }, constructUpdate: function() {
          for (var l, i, p = {}, c = Object.keys(d), a = 0; a < c.length; a++)
            i = c[a], l = x + "[" + i + "]", s[i] ? (1 & d[i] && (p[l + "." + e] = s[i][e]), 2 & d[i] && (p[l + "." + r] = o ? 4 & d[i] ? null : s[i][r] : 4 & d[i] ? null : m(s[i], r).get())) : p[l] = null;
          return p;
        } };
        return h;
      };
    }, { "./nested_property": 523 }], 518: [function(v, Q, $) {
      var m = v("../registry");
      Q.exports = function(g, k) {
        for (var x = g._context.locale, e = 0; e < 2; e++) {
          for (var r = g._context.locales, n = 0; n < 2; n++) {
            var s = (r[x] || {}).dictionary;
            if (s) {
              var t = s[k];
              if (t)
                return t;
            }
            r = m.localeRegistry;
          }
          var d = x.split("-")[0];
          if (d === x)
            break;
          x = d;
        }
        return k;
      };
    }, { "../registry": 647 }], 519: [function(v, Q, $) {
      var m = v("../plot_api/plot_config").dfltConfig, g = v("./notifier"), k = Q.exports = {};
      k.log = function() {
        var x;
        if (m.logging > 1) {
          var e = ["LOG:"];
          for (x = 0; x < arguments.length; x++)
            e.push(arguments[x]);
          console.trace.apply(console, e);
        }
        if (m.notifyOnLogging > 1) {
          var r = [];
          for (x = 0; x < arguments.length; x++)
            r.push(arguments[x]);
          g(r.join("<br>"), "long");
        }
      }, k.warn = function() {
        var x;
        if (m.logging > 0) {
          var e = ["WARN:"];
          for (x = 0; x < arguments.length; x++)
            e.push(arguments[x]);
          console.trace.apply(console, e);
        }
        if (m.notifyOnLogging > 0) {
          var r = [];
          for (x = 0; x < arguments.length; x++)
            r.push(arguments[x]);
          g(r.join("<br>"), "stick");
        }
      }, k.error = function() {
        var x;
        if (m.logging > 0) {
          var e = ["ERROR:"];
          for (x = 0; x < arguments.length; x++)
            e.push(arguments[x]);
          console.error.apply(console, e);
        }
        if (m.notifyOnLogging > 0) {
          var r = [];
          for (x = 0; x < arguments.length; x++)
            r.push(arguments[x]);
          g(r.join("<br>"), "stick");
        }
      };
    }, { "../plot_api/plot_config": 553, "./notifier": 525 }], 520: [function(v, Q, $) {
      var m = v("@plotly/d3");
      Q.exports = function(g, k, x) {
        var e = g.selectAll("g." + x.replace(/\s/g, ".")).data(k, function(n) {
          return n[0].trace.uid;
        });
        e.exit().remove(), e.enter().append("g").attr("class", x), e.order();
        var r = g.classed("rangeplot") ? "nodeRangePlot3" : "node3";
        return e.each(function(n) {
          n[0][r] = m.select(this);
        }), e;
      };
    }, { "@plotly/d3": 58 }], 521: [function(v, Q, $) {
      var m = v("gl-mat4");
      $.init2dArray = function(g, k) {
        for (var x = new Array(g), e = 0; e < g; e++)
          x[e] = new Array(k);
        return x;
      }, $.transposeRagged = function(g) {
        var k, x, e = 0, r = g.length;
        for (k = 0; k < r; k++)
          e = Math.max(e, g[k].length);
        var n = new Array(e);
        for (k = 0; k < e; k++)
          for (n[k] = new Array(r), x = 0; x < r; x++)
            n[k][x] = g[x][k];
        return n;
      }, $.dot = function(g, k) {
        if (!g.length || !k.length || g.length !== k.length)
          return null;
        var x, e, r = g.length;
        if (g[0].length)
          for (x = new Array(r), e = 0; e < r; e++)
            x[e] = $.dot(g[e], k);
        else if (k[0].length) {
          var n = $.transposeRagged(k);
          for (x = new Array(n.length), e = 0; e < n.length; e++)
            x[e] = $.dot(g, n[e]);
        } else
          for (x = 0, e = 0; e < r; e++)
            x += g[e] * k[e];
        return x;
      }, $.translationMatrix = function(g, k) {
        return [[1, 0, g], [0, 1, k], [0, 0, 1]];
      }, $.rotationMatrix = function(g) {
        var k = g * Math.PI / 180;
        return [[Math.cos(k), -Math.sin(k), 0], [Math.sin(k), Math.cos(k), 0], [0, 0, 1]];
      }, $.rotationXYMatrix = function(g, k, x) {
        return $.dot($.dot($.translationMatrix(k, x), $.rotationMatrix(g)), $.translationMatrix(-k, -x));
      }, $.apply3DTransform = function(g) {
        return function() {
          var k = arguments, x = arguments.length === 1 ? k[0] : [k[0], k[1], k[2] || 0];
          return $.dot(g, [x[0], x[1], x[2], 1]).slice(0, 3);
        };
      }, $.apply2DTransform = function(g) {
        return function() {
          var k = arguments;
          k.length === 3 && (k = k[0]);
          var x = arguments.length === 1 ? k[0] : [k[0], k[1]];
          return $.dot(g, [x[0], x[1], 1]).slice(0, 2);
        };
      }, $.apply2DTransform2 = function(g) {
        var k = $.apply2DTransform(g);
        return function(x) {
          return k(x.slice(0, 2)).concat(k(x.slice(2, 4)));
        };
      }, $.convertCssMatrix = function(g) {
        if (g) {
          var k = g.length;
          if (k === 16)
            return g;
          if (k === 6)
            return [g[0], g[1], 0, 0, g[2], g[3], 0, 0, 0, 0, 1, 0, g[4], g[5], 0, 1];
        }
        return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
      }, $.inverseTransformMatrix = function(g) {
        var k = [];
        return m.invert(k, g), [[k[0], k[1], k[2], k[3]], [k[4], k[5], k[6], k[7]], [k[8], k[9], k[10], k[11]], [k[12], k[13], k[14], k[15]]];
      };
    }, { "gl-mat4": 210 }], 522: [function(v, Q, $) {
      Q.exports = { mod: function(m, g) {
        var k = m % g;
        return k < 0 ? k + g : k;
      }, modHalf: function(m, g) {
        return Math.abs(m) > g / 2 ? m - Math.round(m / g) * g : m;
      } };
    }, {}], 523: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("./array").isArrayOrTypedArray;
      function k(d, u) {
        return function() {
          var o, h, l, i, p, c = d;
          for (i = 0; i < u.length - 1; i++) {
            if ((o = u[i]) === -1) {
              for (h = !0, l = [], p = 0; p < c.length; p++)
                l[p] = k(c[p], u.slice(i + 1))(), l[p] !== l[0] && (h = !1);
              return h ? l[0] : l;
            }
            if (typeof o == "number" && !g(c) || typeof (c = c[o]) != "object" || c === null)
              return;
          }
          if (typeof c == "object" && c !== null && (l = c[u[i]]) !== null)
            return l;
        };
      }
      Q.exports = function(d, u) {
        if (m(u))
          u = String(u);
        else if (typeof u != "string" || u.substr(u.length - 4) === "[-1]")
          throw "bad property string";
        for (var o, h, l, i = 0, p = u.split("."); i < p.length; ) {
          if (o = String(p[i]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)) {
            if (o[1])
              p[i] = o[1];
            else {
              if (i !== 0)
                throw "bad property string";
              p.splice(0, 1);
            }
            for (h = o[2].substr(1, o[2].length - 2).split("]["), l = 0; l < h.length; l++)
              i++, p.splice(i, 0, Number(h[l]));
          }
          i++;
        }
        return typeof d != "object" ? function(c, a, y) {
          return { set: function() {
            throw "bad container";
          }, get: function() {
          }, astr: a, parts: y, obj: c };
        }(d, u, p) : { set: r(d, p, u), get: k(d, p), astr: u, parts: p, obj: d };
      };
      var x = /(^|\.)args\[/;
      function e(d, u) {
        return d === void 0 || d === null && !u.match(x);
      }
      function r(d, u, o) {
        return function(h) {
          var l, i, p = d, c = "", a = e(h, o);
          for (i = 0; i < u.length - 1; i++) {
            if (typeof (l = u[i]) == "number" && !g(p))
              throw "array index but container is not an array";
            if (l === -1) {
              if (a = !s(p, u.slice(i + 1), h, o))
                break;
              return;
            }
            if (!t(p, l, u[i + 1], a))
              break;
            if (typeof (p = p[l]) != "object" || p === null)
              throw "container is not an object";
            c = n(c, l);
          }
          if (a) {
            if (i === u.length - 1 && (delete p[u[i]], Array.isArray(p) && +u[i] == p.length - 1))
              for (; p.length && p[p.length - 1] === void 0; )
                p.pop();
          } else
            p[u[i]] = h;
        };
      }
      function n(d, u) {
        var o = u;
        return m(u) ? o = "[" + u + "]" : d && (o = "." + u), d + o;
      }
      function s(d, u, o, h) {
        var l, i = g(o), p = !0, c = o, a = h.replace("-1", 0), y = !i && e(o, a), f = u[0];
        for (l = 0; l < d.length; l++)
          a = h.replace("-1", l), i && (y = e(c = o[l % o.length], a)), y && (p = !1), t(d, l, f, y) && r(d[l], u, h.replace("-1", l))(c);
        return p;
      }
      function t(d, u, o, h) {
        if (d[u] === void 0) {
          if (h)
            return !1;
          d[u] = typeof o == "number" ? [] : {};
        }
        return !0;
      }
    }, { "./array": 497, "fast-isnumeric": 190 }], 524: [function(v, Q, $) {
      Q.exports = function() {
      };
    }, {}], 525: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = [];
      Q.exports = function(x, e) {
        if (k.indexOf(x) === -1) {
          k.push(x);
          var r = 1e3;
          g(e) ? r = e : e === "long" && (r = 3e3);
          var n = m.select("body").selectAll(".plotly-notifier").data([0]);
          n.enter().append("div").classed("plotly-notifier", !0), n.selectAll(".notifier-note").data(k).enter().append("div").classed("notifier-note", !0).style("opacity", 0).each(function(t) {
            var d = m.select(this);
            d.append("button").classed("notifier-close", !0).html("&times;").on("click", function() {
              d.transition().call(s);
            });
            for (var u = d.append("p"), o = t.split(/<br\s*\/?>/g), h = 0; h < o.length; h++)
              h && u.append("br"), u.append("span").text(o[h]);
            e === "stick" ? d.transition().duration(350).style("opacity", 1) : d.transition().duration(700).style("opacity", 1).transition().delay(r).call(s);
          });
        }
        function s(t) {
          t.duration(700).style("opacity", 0).each("end", function(d) {
            var u = k.indexOf(d);
            u !== -1 && k.splice(u, 1), m.select(this).remove();
          });
        }
      };
    }, { "@plotly/d3": 58, "fast-isnumeric": 190 }], 526: [function(v, Q, $) {
      var m = v("./setcursor"), g = "data-savedcursor";
      Q.exports = function(k, x) {
        var e = k.attr(g);
        if (x) {
          if (!e) {
            for (var r = (k.attr("class") || "").split(" "), n = 0; n < r.length; n++) {
              var s = r[n];
              s.indexOf("cursor-") === 0 && k.attr(g, s.substr(7)).classed(s, !1);
            }
            k.attr(g) || k.attr(g, "!!");
          }
          m(k, x);
        } else
          e && (k.attr(g, null), e === "!!" ? m(k) : m(k, e));
      };
    }, { "./setcursor": 536 }], 527: [function(v, Q, $) {
      var m = v("./matrix").dot, g = v("../constants/numerical").BADNUM, k = Q.exports = {};
      k.tester = function(x) {
        var e, r = x.slice(), n = r[0][0], s = n, t = r[0][1], d = t;
        for (r[r.length - 1][0] === r[0][0] && r[r.length - 1][1] === r[0][1] || r.push(r[0]), e = 1; e < r.length; e++)
          n = Math.min(n, r[e][0]), s = Math.max(s, r[e][0]), t = Math.min(t, r[e][1]), d = Math.max(d, r[e][1]);
        var u, o = !1;
        r.length === 5 && (r[0][0] === r[1][0] ? r[2][0] === r[3][0] && r[0][1] === r[3][1] && r[1][1] === r[2][1] && (o = !0, u = function(i) {
          return i[0] === r[0][0];
        }) : r[0][1] === r[1][1] && r[2][1] === r[3][1] && r[0][0] === r[3][0] && r[1][0] === r[2][0] && (o = !0, u = function(i) {
          return i[1] === r[0][1];
        }));
        var h = !0, l = r[0];
        for (e = 1; e < r.length; e++)
          if (l[0] !== r[e][0] || l[1] !== r[e][1]) {
            h = !1;
            break;
          }
        return { xmin: n, xmax: s, ymin: t, ymax: d, pts: r, contains: o ? function(i, p) {
          var c = i[0], a = i[1];
          return !(c === g || c < n || c > s || a === g || a < t || a > d) && (!p || !u(i));
        } : function(i, p) {
          var c = i[0], a = i[1];
          if (c === g || c < n || c > s || a === g || a < t || a > d)
            return !1;
          var y, f, _, b, w, T = r.length, L = r[0][0], A = r[0][1], I = 0;
          for (y = 1; y < T; y++)
            if (f = L, _ = A, L = r[y][0], A = r[y][1], !(c < (b = Math.min(f, L)) || c > Math.max(f, L) || a > Math.max(_, A)))
              if (a < Math.min(_, A))
                c !== b && I++;
              else {
                if (a === (w = L === f ? a : _ + (c - f) * (A - _) / (L - f)))
                  return y !== 1 || !p;
                a <= w && c !== b && I++;
              }
          return I % 2 == 1;
        }, isRect: o, degenerate: h };
      }, k.isSegmentBent = function(x, e, r, n) {
        var s, t, d, u = x[e], o = [x[r][0] - u[0], x[r][1] - u[1]], h = m(o, o), l = Math.sqrt(h), i = [-o[1] / l, o[0] / l];
        for (s = e + 1; s < r; s++)
          if (t = [x[s][0] - u[0], x[s][1] - u[1]], (d = m(t, o)) < 0 || d > h || Math.abs(m(t, i)) > n)
            return !0;
        return !1;
      }, k.filter = function(x, e) {
        var r = [x[0]], n = 0, s = 0;
        function t(d) {
          x.push(d);
          var u = r.length, o = n;
          r.splice(s + 1);
          for (var h = o + 1; h < x.length; h++)
            (h === x.length - 1 || k.isSegmentBent(x, o, h + 1, e)) && (r.push(x[h]), r.length < u - 2 && (n = h, s = r.length - 1), o = h);
        }
        return x.length > 1 && t(x.pop()), { addPt: t, raw: x, filtered: r };
      };
    }, { "../constants/numerical": 491, "./matrix": 521 }], 528: [function(v, Q, $) {
      (function(m) {
        (function() {
          var g = v("./show_no_webgl_msg"), k = v("regl");
          Q.exports = function(x, e, r) {
            var n = x._fullLayout, s = !0;
            return n._glcanvas.each(function(t) {
              if (t.regl)
                t.regl.preloadCachedCode(r);
              else if (!t.pick || n._has("parcoords")) {
                try {
                  t.regl = k({ canvas: this, attributes: { antialias: !t.pick, preserveDrawingBuffer: !0 }, pixelRatio: x._context.plotGlPixelRatio || m.devicePixelRatio, extensions: e || [], cachedCode: r || {} });
                } catch {
                  s = !1;
                }
                t.regl || (s = !1), s && this.addEventListener("webglcontextlost", function(d) {
                  x && x.emit && x.emit("plotly_webglcontextlost", { event: d, layer: t.key });
                }, !1);
              }
            }), s || g({ container: n._glcontainer.node() }), s;
          };
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, { "./show_no_webgl_msg": 537, regl: 284 }], 529: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("is-mobile");
      Q.exports = function(k) {
        var x;
        if (typeof (x = k && k.hasOwnProperty("userAgent") ? k.userAgent : function() {
          var u;
          return typeof navigator < "u" && (u = navigator.userAgent), u && u.headers && typeof u.headers["user-agent"] == "string" && (u = u.headers["user-agent"]), u;
        }()) != "string")
          return !0;
        var e = g({ ua: { headers: { "user-agent": x } }, tablet: !0, featureDetect: !1 });
        if (!e) {
          for (var r = x.split(" "), n = 1; n < r.length; n++)
            if (r[n].indexOf("Safari") !== -1)
              for (var s = n - 1; s > -1; s--) {
                var t = r[s];
                if (t.substr(0, 8) === "Version/") {
                  var d = t.substr(8).split(".")[0];
                  if (m(d) && (d = +d), d >= 13)
                    return !0;
                }
              }
        }
        return e;
      };
    }, { "fast-isnumeric": 190, "is-mobile": 234 }], 530: [function(v, Q, $) {
      Q.exports = function(m, g) {
        if (g instanceof RegExp) {
          for (var k = g.toString(), x = 0; x < m.length; x++)
            if (m[x] instanceof RegExp && m[x].toString() === k)
              return m;
          m.push(g);
        } else
          !g && g !== 0 || m.indexOf(g) !== -1 || m.push(g);
        return m;
      };
    }, {}], 531: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plot_api/plot_config").dfltConfig, k = { add: function(x, e, r, n, s) {
        var t, d;
        x.undoQueue = x.undoQueue || { index: 0, queue: [], sequence: !1 }, d = x.undoQueue.index, x.autoplay ? x.undoQueue.inSequence || (x.autoplay = !1) : (!x.undoQueue.sequence || x.undoQueue.beginSequence ? (t = { undo: { calls: [], args: [] }, redo: { calls: [], args: [] } }, x.undoQueue.queue.splice(d, x.undoQueue.queue.length - d, t), x.undoQueue.index += 1) : t = x.undoQueue.queue[d - 1], x.undoQueue.beginSequence = !1, t && (t.undo.calls.unshift(e), t.undo.args.unshift(r), t.redo.calls.push(n), t.redo.args.push(s)), x.undoQueue.queue.length > g.queueLength && (x.undoQueue.queue.shift(), x.undoQueue.index--));
      }, startSequence: function(x) {
        x.undoQueue = x.undoQueue || { index: 0, queue: [], sequence: !1 }, x.undoQueue.sequence = !0, x.undoQueue.beginSequence = !0;
      }, stopSequence: function(x) {
        x.undoQueue = x.undoQueue || { index: 0, queue: [], sequence: !1 }, x.undoQueue.sequence = !1, x.undoQueue.beginSequence = !1;
      }, undo: function(x) {
        var e, r;
        if (!(x.undoQueue === void 0 || isNaN(x.undoQueue.index) || x.undoQueue.index <= 0)) {
          for (x.undoQueue.index--, e = x.undoQueue.queue[x.undoQueue.index], x.undoQueue.inSequence = !0, r = 0; r < e.undo.calls.length; r++)
            k.plotDo(x, e.undo.calls[r], e.undo.args[r]);
          x.undoQueue.inSequence = !1, x.autoplay = !1;
        }
      }, redo: function(x) {
        var e, r;
        if (!(x.undoQueue === void 0 || isNaN(x.undoQueue.index) || x.undoQueue.index >= x.undoQueue.queue.length)) {
          for (e = x.undoQueue.queue[x.undoQueue.index], x.undoQueue.inSequence = !0, r = 0; r < e.redo.calls.length; r++)
            k.plotDo(x, e.redo.calls[r], e.redo.args[r]);
          x.undoQueue.inSequence = !1, x.autoplay = !1, x.undoQueue.index++;
        }
      } };
      k.plotDo = function(x, e, r) {
        x.autoplay = !0, r = function(n, s) {
          for (var t, d = [], u = 0; u < s.length; u++)
            t = s[u], d[u] = t === n ? t : typeof t == "object" ? Array.isArray(t) ? m.extendDeep([], t) : m.extendDeepAll({}, t) : t;
          return d;
        }(x, r), e.apply(null, r);
      }, Q.exports = k;
    }, { "../lib": 515, "../plot_api/plot_config": 553 }], 532: [function(v, Q, $) {
      $.counter = function(m, g, k, x) {
        var e = (g || "") + (k ? "" : "$"), r = x === !1 ? "" : "^";
        return m === "xy" ? new RegExp(r + "x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?" + e) : new RegExp(r + m + "([2-9]|[1-9][0-9]+)?" + e);
      };
    }, {}], 533: [function(v, Q, $) {
      var m = /^(.*)(\.[^\.\[\]]+|\[\d\])$/, g = /^[^\.\[\]]+$/;
      Q.exports = function(k, x) {
        for (; x; ) {
          var e = k.match(m);
          if (e)
            k = e[1];
          else {
            if (!k.match(g))
              throw new Error("bad relativeAttr call:" + [k, x]);
            k = "";
          }
          if (x.charAt(0) !== "^")
            break;
          x = x.slice(1);
        }
        return k && x.charAt(0) !== "[" ? k + "." + x : k + x;
      };
    }, {}], 534: [function(v, Q, $) {
      var m = v("./array").isArrayOrTypedArray, g = v("./is_plain_object");
      Q.exports = function k(x, e) {
        for (var r in e) {
          var n = e[r], s = x[r];
          if (s !== n)
            if (r.charAt(0) === "_" || typeof n == "function") {
              if (r in x)
                continue;
              x[r] = n;
            } else if (m(n) && m(s) && g(n[0])) {
              if (r === "customdata" || r === "ids")
                continue;
              for (var t = Math.min(n.length, s.length), d = 0; d < t; d++)
                s[d] !== n[d] && g(n[d]) && g(s[d]) && k(s[d], n[d]);
            } else
              g(n) && g(s) && (k(s, n), Object.keys(s).length || delete x[r]);
        }
      };
    }, { "./array": 497, "./is_plain_object": 516 }], 535: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("./loggers"), k = v("./identity"), x = v("../constants/numerical").BADNUM;
      function e(t, d) {
        return t < d;
      }
      function r(t, d) {
        return t <= d;
      }
      function n(t, d) {
        return t > d;
      }
      function s(t, d) {
        return t >= d;
      }
      $.findBin = function(t, d, u) {
        if (m(d.start))
          return u ? Math.ceil((t - d.start) / d.size - 1e-9) - 1 : Math.floor((t - d.start) / d.size + 1e-9);
        var o, h, l = 0, i = d.length, p = 0, c = i > 1 ? (d[i - 1] - d[0]) / (i - 1) : 1;
        for (h = c >= 0 ? u ? e : r : u ? s : n, t += 1e-9 * c * (u ? -1 : 1) * (c >= 0 ? 1 : -1); l < i && p++ < 100; )
          h(d[o = Math.floor((l + i) / 2)], t) ? l = o + 1 : i = o;
        return p > 90 && g.log("Long binary search..."), l - 1;
      }, $.sorterAsc = function(t, d) {
        return t - d;
      }, $.sorterDes = function(t, d) {
        return d - t;
      }, $.distinctVals = function(t) {
        var d, u = t.slice();
        for (u.sort($.sorterAsc), d = u.length - 1; d > -1 && u[d] === x; d--)
          ;
        for (var o, h = u[d] - u[0] || 1, l = h / (d || 1) / 1e4, i = [], p = 0; p <= d; p++) {
          var c = u[p], a = c - o;
          o === void 0 ? (i.push(c), o = c) : a > l && (h = Math.min(h, a), i.push(c), o = c);
        }
        return { vals: i, minDiff: h };
      }, $.roundUp = function(t, d, u) {
        for (var o, h = 0, l = d.length - 1, i = 0, p = u ? 0 : 1, c = u ? 1 : 0, a = u ? Math.ceil : Math.floor; h < l && i++ < 100; )
          d[o = a((h + l) / 2)] <= t ? h = o + p : l = o - c;
        return d[h];
      }, $.sort = function(t, d) {
        for (var u = 0, o = 0, h = 1; h < t.length; h++) {
          var l = d(t[h], t[h - 1]);
          if (l < 0 ? u = 1 : l > 0 && (o = 1), u && o)
            return t.sort(d);
        }
        return o ? t : t.reverse();
      }, $.findIndexOfMin = function(t, d) {
        d = d || k;
        for (var u, o = 1 / 0, h = 0; h < t.length; h++) {
          var l = d(t[h]);
          l < o && (o = l, u = h);
        }
        return u;
      };
    }, { "../constants/numerical": 491, "./identity": 513, "./loggers": 519, "fast-isnumeric": 190 }], 536: [function(v, Q, $) {
      Q.exports = function(m, g) {
        (m.attr("class") || "").split(" ").forEach(function(k) {
          k.indexOf("cursor-") === 0 && m.classed(k, !1);
        }), g && m.classed("cursor-" + g, !0);
      };
    }, {}], 537: [function(v, Q, $) {
      var m = v("../components/color"), g = function() {
      };
      Q.exports = function(k) {
        for (var x in k)
          typeof k[x] == "function" && (k[x] = g);
        k.destroy = function() {
          k.container.parentNode.removeChild(k.container);
        };
        var e = document.createElement("div");
        e.className = "no-webgl", e.style.cursor = "pointer", e.style.fontSize = "24px", e.style.color = m.defaults[0], e.style.position = "absolute", e.style.left = e.style.top = "0px", e.style.width = e.style.height = "100%", e.style["background-color"] = m.lightLine, e.style["z-index"] = 30;
        var r = document.createElement("p");
        return r.textContent = "WebGL is not supported by your browser - visit https://get.webgl.org for more info", r.style.position = "relative", r.style.top = "50%", r.style.left = "50%", r.style.height = "30%", r.style.width = "50%", r.style.margin = "-15% 0 0 -25%", e.appendChild(r), k.container.appendChild(e), k.container.style.background = "#FFFFFF", k.container.onclick = function() {
          window.open("https://get.webgl.org");
        }, !1;
      };
    }, { "../components/color": 367 }], 538: [function(v, Q, $) {
      Q.exports = function(m) {
        return Object.keys(m).sort();
      };
    }, {}], 539: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("./array").isArrayOrTypedArray;
      $.aggNums = function(k, x, e, r) {
        var n, s;
        if ((!r || r > e.length) && (r = e.length), m(x) || (x = !1), g(e[0])) {
          for (s = new Array(r), n = 0; n < r; n++)
            s[n] = $.aggNums(k, x, e[n]);
          e = s;
        }
        for (n = 0; n < r; n++)
          m(x) ? m(e[n]) && (x = k(+x, +e[n])) : x = e[n];
        return x;
      }, $.len = function(k) {
        return $.aggNums(function(x) {
          return x + 1;
        }, 0, k);
      }, $.mean = function(k, x) {
        return x || (x = $.len(k)), $.aggNums(function(e, r) {
          return e + r;
        }, 0, k) / x;
      }, $.midRange = function(k) {
        if (k !== void 0 && k.length !== 0)
          return ($.aggNums(Math.max, null, k) + $.aggNums(Math.min, null, k)) / 2;
      }, $.variance = function(k, x, e) {
        return x || (x = $.len(k)), m(e) || (e = $.mean(k, x)), $.aggNums(function(r, n) {
          return r + Math.pow(n - e, 2);
        }, 0, k) / x;
      }, $.stdev = function(k, x, e) {
        return Math.sqrt($.variance(k, x, e));
      }, $.median = function(k) {
        var x = k.slice().sort();
        return $.interp(x, 0.5);
      }, $.interp = function(k, x) {
        if (!m(x))
          throw "n should be a finite number";
        if ((x = x * k.length - 0.5) < 0)
          return k[0];
        if (x > k.length - 1)
          return k[k.length - 1];
        var e = x % 1;
        return e * k[Math.ceil(x)] + (1 - e) * k[Math.floor(x)];
      };
    }, { "./array": 497, "fast-isnumeric": 190 }], 540: [function(v, Q, $) {
      var m = v("color-normalize");
      Q.exports = function(g) {
        return g ? m(g) : [0, 0, 0, 1];
      };
    }, { "color-normalize": 89 }], 541: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../lib"), k = g.strTranslate, x = v("../constants/xmlns_namespaces"), e = v("../constants/alignment").LINE_SPACING, r = /([^$]*)([$]+[^$]*[$]+)([^$]*)/;
      $.convertToTspans = function(S, E, R) {
        var z = S.text(), j = !S.attr("data-notex") && E && E._context.typesetMath && typeof MathJax < "u" && z.match(r), H = m.select(S.node().parentNode);
        if (!H.empty()) {
          var Y = S.attr("class") ? S.attr("class").split(" ")[0] : "text";
          return Y += "-math", H.selectAll("svg." + Y).remove(), H.selectAll("g." + Y + "-group").remove(), S.style("display", null).attr({ "data-unformatted": z, "data-math": "N" }), j ? (E && E._promises || []).push(new Promise(function(W) {
            S.style("display", "none");
            var Z = parseInt(S.node().style.fontSize, 10), re = { fontSize: Z };
            (function(V, B, U) {
              var ee, N, K, X, te = parseInt((MathJax.version || "").split(".")[0]);
              if (te !== 2 && te !== 3)
                return void g.warn("No MathJax version:", MathJax.version);
              var ie = function() {
                var oe = "math-output-" + g.randstr({}, 64), ve = (X = m.select("body").append("div").attr({ id: oe }).style({ visibility: "hidden", position: "absolute", "font-size": B.fontSize + "px" }).text(V.replace(n, "\\lt ").replace(s, "\\gt "))).node();
                return te === 2 ? MathJax.Hub.Typeset(ve) : MathJax.typeset([ve]);
              }, le = function() {
                var oe = X.select(te === 2 ? ".MathJax_SVG" : ".MathJax"), ve = !oe.empty() && X.select("svg").node();
                if (ve) {
                  var ue, ye = ve.getBoundingClientRect();
                  ue = te === 2 ? m.select("body").select("#MathJax_SVG_glyphs") : oe.select("defs"), U(oe, ue, ye);
                } else
                  g.log("There was an error in the tex syntax.", V), U();
                X.remove();
              };
              te === 2 ? MathJax.Hub.Queue(function() {
                return N = g.extendDeepAll({}, MathJax.Hub.config), K = MathJax.Hub.processSectionDelay, MathJax.Hub.processSectionDelay !== void 0 && (MathJax.Hub.processSectionDelay = 0), MathJax.Hub.Config({ messageStyle: "none", tex2jax: { inlineMath: t }, displayAlign: "left" });
              }, function() {
                if ((ee = MathJax.Hub.config.menuSettings.renderer) !== "SVG")
                  return MathJax.Hub.setRenderer("SVG");
              }, ie, le, function() {
                if (ee !== "SVG")
                  return MathJax.Hub.setRenderer(ee);
              }, function() {
                return K !== void 0 && (MathJax.Hub.processSectionDelay = K), MathJax.Hub.Config(N);
              }) : te === 3 && (N = g.extendDeepAll({}, MathJax.config), MathJax.config.tex || (MathJax.config.tex = {}), MathJax.config.tex.inlineMath = t, (ee = MathJax.config.startup.output) !== "svg" && (MathJax.config.startup.output = "svg"), MathJax.startup.defaultReady(), MathJax.startup.promise.then(function() {
                ie(), le(), ee !== "svg" && (MathJax.config.startup.output = ee), MathJax.config = N;
              }));
            })(j[2], re, function(V, B, U) {
              H.selectAll("svg." + Y).remove(), H.selectAll("g." + Y + "-group").remove();
              var ee = V && V.select("svg");
              if (!ee || !ee.node())
                return J(), void W();
              var N = H.append("g").classed(Y + "-group", !0).attr({ "pointer-events": "none", "data-unformatted": z, "data-math": "Y" });
              N.node().appendChild(ee.node()), B && B.node() && ee.node().insertBefore(B.node().cloneNode(!0), ee.node().firstChild);
              var K = U.width, X = U.height;
              ee.attr({ class: Y, height: X, preserveAspectRatio: "xMinYMin meet" }).style({ overflow: "visible", "pointer-events": "none" });
              var te = S.node().style.fill || "black", ie = ee.select("g");
              ie.attr({ fill: te, stroke: te });
              var le = ie.node().getBoundingClientRect(), oe = le.width, ve = le.height;
              (oe > K || ve > X) && (ee.style("overflow", "hidden"), oe = (le = ee.node().getBoundingClientRect()).width, ve = le.height);
              var ue = +S.attr("x"), ye = +S.attr("y"), Ae = -(Z || S.node().getBoundingClientRect().height) / 4;
              if (Y[0] === "y")
                N.attr({ transform: "rotate(" + [-90, ue, ye] + ")" + k(-oe / 2, Ae - ve / 2) });
              else if (Y[0] === "l")
                ye = Ae - ve / 2;
              else if (Y[0] === "a" && Y.indexOf("atitle") !== 0)
                ue = 0, ye = Ae;
              else {
                var pe = S.attr("text-anchor");
                ue -= oe * (pe === "middle" ? 0.5 : pe === "end" ? 1 : 0), ye = ye + Ae - ve / 2;
              }
              ee.attr({ x: ue, y: ye }), R && R.call(S, N), W(N);
            });
          })) : J(), S;
        }
        function J() {
          H.empty() || (Y = S.attr("class") + "-math", H.select("svg." + Y).remove()), S.text("").style("white-space", "pre"), function(W, Z) {
            Z = Z.replace(l, " ");
            var re, V = !1, B = [], U = -1;
            function ee() {
              U++;
              var se = document.createElementNS(x.svg, "tspan");
              m.select(se).attr({ class: "line", dy: U * e + "em" }), W.appendChild(se), re = se;
              var de = B;
              if (B = [{ node: se }], de.length > 1)
                for (var Te = 1; Te < de.length; Te++)
                  N(de[Te]);
            }
            function N(se) {
              var de, Te = se.type, Ee = {};
              if (Te === "a") {
                de = "a";
                var Me = se.target, ze = se.href, Ie = se.popup;
                ze && (Ee = { "xlink:xlink:show": Me === "_blank" || Me.charAt(0) !== "_" ? "new" : "replace", target: Me, "xlink:xlink:href": ze }, Ie && (Ee.onclick = 'window.open(this.href.baseVal,this.target.baseVal,"' + Ie + '");return false;'));
              } else
                de = "tspan";
              se.style && (Ee.style = se.style);
              var Oe = document.createElementNS(x.svg, de);
              if (Te === "sup" || Te === "sub") {
                K(re, "\u200B"), re.appendChild(Oe);
                var Ze = document.createElementNS(x.svg, "tspan");
                K(Ze, "\u200B"), m.select(Ze).attr("dy", o[Te]), Ee.dy = u[Te], re.appendChild(Oe), re.appendChild(Ze);
              } else
                re.appendChild(Oe);
              m.select(Oe).attr(Ee), re = se.node = Oe, B.push(se);
            }
            function K(se, de) {
              se.appendChild(document.createTextNode(de));
            }
            function X(se) {
              if (B.length !== 1) {
                var de = B.pop();
                se !== de.type && g.log("Start tag <" + de.type + "> doesnt match end tag <" + se + ">. Pretending it did match.", Z), re = B[B.length - 1].node;
              } else
                g.log("Ignoring unexpected end tag </" + se + ">.", Z);
            }
            c.test(Z) ? ee() : (re = W, B = [{ node: W }]);
            for (var te = Z.split(i), ie = 0; ie < te.length; ie++) {
              var le = te[ie], oe = le.match(p), ve = oe && oe[2].toLowerCase(), ue = d[ve];
              if (ve === "br")
                ee();
              else if (ue === void 0)
                K(re, A(le));
              else if (oe[1])
                X(ve);
              else {
                var ye = oe[4], Ae = { type: ve }, pe = b(ye, a);
                if (pe ? (pe = pe.replace(w, "$1 fill:"), ue && (pe += ";" + ue)) : ue && (pe = ue), pe && (Ae.style = pe), ve === "a") {
                  V = !0;
                  var ge = b(ye, y);
                  if (ge) {
                    var we = I(ge);
                    we && (Ae.href = we, Ae.target = b(ye, f) || "_blank", Ae.popup = b(ye, _));
                  }
                }
                N(Ae);
              }
            }
            return V;
          }(S.node(), z) && S.style("pointer-events", "all"), $.positionText(S), R && R.call(S);
        }
      };
      var n = /(<|&lt;|&#60;)/g, s = /(>|&gt;|&#62;)/g, t = [["$", "$"], ["\\(", "\\)"]], d = { sup: "font-size:70%", sub: "font-size:70%", b: "font-weight:bold", i: "font-style:italic", a: "cursor:pointer", span: "", em: "font-style:italic;font-weight:bold" }, u = { sub: "0.3em", sup: "-0.6em" }, o = { sub: "-0.21em", sup: "0.42em" }, h = ["http:", "https:", "mailto:", "", void 0, ":"], l = $.NEWLINES = /(\r\n?|\n)/g, i = /(<[^<>]*>)/, p = /<(\/?)([^ >]*)(\s+(.*))?>/i, c = /<br(\s+.*)?>/i;
      $.BR_TAG_ALL = /<br(\s+.*)?>/gi;
      var a = /(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i, y = /(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i, f = /(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i, _ = /(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;
      function b(S, E) {
        if (!S)
          return null;
        var R = S.match(E), z = R && (R[3] || R[4]);
        return z && A(z);
      }
      var w = /(^|;)\s*color:/;
      $.plainText = function(S, E) {
        for (var R = (E = E || {}).len !== void 0 && E.len !== -1 ? E.len : 1 / 0, z = E.allowedTags !== void 0 ? E.allowedTags : ["br"], j = 3, H = S.split(i), Y = [], J = "", W = 0, Z = 0; Z < H.length; Z++) {
          var re = H[Z], V = re.match(p), B = V && V[2].toLowerCase();
          if (B)
            z.indexOf(B) !== -1 && (Y.push(re), J = B);
          else {
            var U = re.length;
            if (W + U < R)
              Y.push(re), W += U;
            else if (W < R) {
              var ee = R - W;
              J && (J !== "br" || ee <= j || U <= j) && Y.pop(), R > j ? Y.push(re.substr(0, ee - j) + "...") : Y.push(re.substr(0, ee));
              break;
            }
            J = "";
          }
        }
        return Y.join("");
      };
      var T = { mu: "\u03BC", amp: "&", lt: "<", gt: ">", nbsp: "\xA0", times: "\xD7", plusmn: "\xB1", deg: "\xB0" }, L = /&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;
      function A(S) {
        return S.replace(L, function(E, R) {
          return (R.charAt(0) === "#" ? function(z) {
            if (!(z > 1114111)) {
              var j = String.fromCodePoint;
              if (j)
                return j(z);
              var H = String.fromCharCode;
              return z <= 65535 ? H(z) : H(55232 + (z >> 10), z % 1024 + 56320);
            }
          }(R.charAt(1) === "x" ? parseInt(R.substr(2), 16) : parseInt(R.substr(1), 10)) : T[R]) || E;
        });
      }
      function I(S) {
        var E = encodeURI(decodeURI(S)), R = document.createElement("a"), z = document.createElement("a");
        R.href = S, z.href = E;
        var j = R.protocol, H = z.protocol;
        return h.indexOf(j) !== -1 && h.indexOf(H) !== -1 ? E : "";
      }
      function P(S, E, R) {
        var z, j, H, Y = R.horizontalAlign, J = R.verticalAlign || "top", W = S.node().getBoundingClientRect(), Z = E.node().getBoundingClientRect();
        return j = J === "bottom" ? function() {
          return W.bottom - z.height;
        } : J === "middle" ? function() {
          return W.top + (W.height - z.height) / 2;
        } : function() {
          return W.top;
        }, H = Y === "right" ? function() {
          return W.right - z.width;
        } : Y === "center" ? function() {
          return W.left + (W.width - z.width) / 2;
        } : function() {
          return W.left;
        }, function() {
          z = this.node().getBoundingClientRect();
          var re = H() - Z.left, V = j() - Z.top, B = R.gd || {};
          if (R.gd) {
            B._fullLayout._calcInverseTransform(B);
            var U = g.apply3DTransform(B._fullLayout._invTransform)(re, V);
            re = U[0], V = U[1];
          }
          return this.style({ top: V + "px", left: re + "px", "z-index": 1e3 }), this;
        };
      }
      $.convertEntities = A, $.sanitizeHTML = function(S) {
        S = S.replace(l, " ");
        for (var E = document.createElement("p"), R = E, z = [], j = S.split(i), H = 0; H < j.length; H++) {
          var Y = j[H], J = Y.match(p), W = J && J[2].toLowerCase();
          if (W in d)
            if (J[1])
              z.length && (R = z.pop());
            else {
              var Z = J[4], re = b(Z, a), V = re ? { style: re } : {};
              if (W === "a") {
                var B = b(Z, y);
                if (B) {
                  var U = I(B);
                  if (U) {
                    V.href = U;
                    var ee = b(Z, f);
                    ee && (V.target = ee);
                  }
                }
              }
              var N = document.createElement(W);
              R.appendChild(N), m.select(N).attr(V), R = N, z.push(N);
            }
          else
            R.appendChild(document.createTextNode(A(Y)));
        }
        return E.innerHTML;
      }, $.lineCount = function(S) {
        return S.selectAll("tspan.line").size() || 1;
      }, $.positionText = function(S, E, R) {
        return S.each(function() {
          var z = m.select(this);
          function j(J, W) {
            return W === void 0 ? (W = z.attr(J)) === null && (z.attr(J, 0), W = 0) : z.attr(J, W), W;
          }
          var H = j("x", E), Y = j("y", R);
          this.nodeName === "text" && z.selectAll("tspan.line").attr({ x: H, y: Y });
        });
      }, $.makeTextShadow = function(S) {
        var E = "1px ", R = "1px ", z = "1px ";
        return E + R + z + S + ", -" + E + "-" + R + z + S + ", " + E + "-" + R + z + S + ", -" + E + R + z + S;
      }, $.makeEditable = function(S, E) {
        var R = E.gd, z = E.delegate, j = m.dispatch("edit", "input", "cancel"), H = z || S;
        if (S.style({ "pointer-events": z ? "none" : "all" }), S.size() !== 1)
          throw new Error("boo");
        function Y() {
          (function() {
            var re = m.select(R).select(".svg-container"), V = re.append("div"), B = S.node().style, U = parseFloat(B.fontSize || 12), ee = E.text;
            ee === void 0 && (ee = S.attr("data-unformatted")), V.classed("plugin-editable editable", !0).style({ position: "absolute", "font-family": B.fontFamily || "Arial", "font-size": U, color: E.fill || B.fill || "black", opacity: 1, "background-color": E.background || "transparent", outline: "#ffffff33 1px solid", margin: [-U / 8 + 1, 0, 0, -1].join("px ") + "px", padding: "0", "box-sizing": "border-box" }).attr({ contenteditable: !0 }).text(ee).call(P(S, re, E)).on("blur", function() {
              R._editing = !1, S.text(this.textContent).style({ opacity: 1 });
              var N, K = m.select(this).attr("class");
              (N = K ? "." + K.split(" ")[0] + "-math-group" : "[class*=-math-group]") && m.select(S.node().parentNode).select(N).style({ opacity: 0 });
              var X = this.textContent;
              m.select(this).transition().duration(0).remove(), m.select(document).on("mouseup", null), j.edit.call(S, X);
            }).on("focus", function() {
              var N = this;
              R._editing = !0, m.select(document).on("mouseup", function() {
                if (m.event.target === N)
                  return !1;
                document.activeElement === V.node() && V.node().blur();
              });
            }).on("keyup", function() {
              m.event.which === 27 ? (R._editing = !1, S.style({ opacity: 1 }), m.select(this).style({ opacity: 0 }).on("blur", function() {
                return !1;
              }).transition().remove(), j.cancel.call(S, this.textContent)) : (j.input.call(S, this.textContent), m.select(this).call(P(S, re, E)));
            }).on("keydown", function() {
              m.event.which === 13 && this.blur();
            }).call(J);
          })(), S.style({ opacity: 0 });
          var W, Z = H.attr("class");
          (W = Z ? "." + Z.split(" ")[0] + "-math-group" : "[class*=-math-group]") && m.select(S.node().parentNode).select(W).style({ opacity: 0 });
        }
        function J(W) {
          var Z = W.node(), re = document.createRange();
          re.selectNodeContents(Z);
          var V = window.getSelection();
          V.removeAllRanges(), V.addRange(re), Z.focus();
        }
        return E.immediate ? Y() : H.on("click", Y), m.rebind(S, j, "on");
      };
    }, { "../constants/alignment": 483, "../constants/xmlns_namespaces": 492, "../lib": 515, "@plotly/d3": 58 }], 542: [function(v, Q, $) {
      var m = {};
      function g(k) {
        k && k.timer !== null && (clearTimeout(k.timer), k.timer = null);
      }
      $.throttle = function(k, x, e) {
        var r = m[k], n = Date.now();
        if (!r) {
          for (var s in m)
            m[s].ts < n - 6e4 && delete m[s];
          r = m[k] = { ts: 0, timer: null };
        }
        function t() {
          e(), r.ts = Date.now(), r.onDone && (r.onDone(), r.onDone = null);
        }
        g(r), n > r.ts + x ? t() : r.timer = setTimeout(function() {
          t(), r.timer = null;
        }, x);
      }, $.done = function(k) {
        var x = m[k];
        return x && x.timer ? new Promise(function(e) {
          var r = x.onDone;
          x.onDone = function() {
            r && r(), e(), x.onDone = null;
          };
        }) : Promise.resolve();
      }, $.clear = function(k) {
        if (k)
          g(m[k]), delete m[k];
        else
          for (var x in m)
            $.clear(x);
      };
    }, {}], 543: [function(v, Q, $) {
      var m = v("fast-isnumeric");
      Q.exports = function(g, k) {
        if (g > 0)
          return Math.log(g) / Math.LN10;
        var x = Math.log(Math.min(k[0], k[1])) / Math.LN10;
        return m(x) || (x = Math.log(Math.max(k[0], k[1])) / Math.LN10 - 6), x;
      };
    }, { "fast-isnumeric": 190 }], 544: [function(v, Q, $) {
      var m = Q.exports = {}, g = v("../plots/geo/constants").locationmodeToLayer, k = v("topojson-client").feature;
      m.getTopojsonName = function(x) {
        return [x.scope.replace(/ /g, "-"), "_", x.resolution.toString(), "m"].join("");
      }, m.getTopojsonPath = function(x, e) {
        return x + e + ".json";
      }, m.getTopojsonFeatures = function(x, e) {
        var r = g[x.locationmode], n = e.objects[r];
        return k(e, n).features;
      };
    }, { "../plots/geo/constants": 596, "topojson-client": 316 }], 545: [function(v, Q, $) {
      Q.exports = { moduleType: "locale", name: "en-US", dictionary: { "Click to enter Colorscale title": "Click to enter Colorscale title" }, format: { date: "%m/%d/%Y" } };
    }, {}], 546: [function(v, Q, $) {
      Q.exports = { moduleType: "locale", name: "en", dictionary: { "Click to enter Colorscale title": "Click to enter Colourscale title" }, format: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], periods: ["AM", "PM"], dateTime: "%a %b %e %X %Y", date: "%d/%m/%Y", time: "%H:%M:%S", decimal: ".", thousands: ",", grouping: [3], currency: ["$", ""], year: "%Y", month: "%b %Y", dayMonth: "%b %-d", dayMonthYear: "%b %-d, %Y" } };
    }, {}], 547: [function(v, Q, $) {
      var m = v("../registry");
      Q.exports = function(g) {
        for (var k, x, e = m.layoutArrayContainers, r = m.layoutArrayRegexes, n = g.split("[")[0], s = 0; s < r.length; s++)
          if ((x = g.match(r[s])) && x.index === 0) {
            k = x[0];
            break;
          }
        if (k || (k = e[e.indexOf(n)]), !k)
          return !1;
        var t = g.substr(k.length);
        return t ? !!(x = t.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/)) && { array: k, index: Number(x[1]), property: x[3] || "" } : { array: k, index: "", property: "" };
      };
    }, { "../registry": 647 }], 548: [function(v, Q, $) {
      var m = v("../lib"), g = m.extendFlat, k = m.isPlainObject, x = { valType: "flaglist", extras: ["none"], flags: ["calc", "clearAxisTypes", "plot", "style", "markerSize", "colorbars"] }, e = { valType: "flaglist", extras: ["none"], flags: ["calc", "plot", "legend", "ticks", "axrange", "layoutstyle", "modebar", "camera", "arraydraw", "colorbars"] }, r = x.flags.slice().concat(["fullReplot"]), n = e.flags.slice().concat("layoutReplot");
      function s(u) {
        for (var o = {}, h = 0; h < u.length; h++)
          o[u[h]] = !1;
        return o;
      }
      function t(u, o, h) {
        var l = g({}, u);
        for (var i in l) {
          var p = l[i];
          k(p) && (l[i] = d(p, o, h, i));
        }
        return h === "from-root" && (l.editType = o), l;
      }
      function d(u, o, h, l) {
        if (u.valType) {
          var i = g({}, u);
          if (i.editType = o, Array.isArray(u.items)) {
            i.items = new Array(u.items.length);
            for (var p = 0; p < u.items.length; p++)
              i.items[p] = d(u.items[p], o);
          }
          return i;
        }
        return t(u, o, l.charAt(0) === "_" ? "nested" : "from-root");
      }
      Q.exports = { traces: x, layout: e, traceFlags: function() {
        return s(r);
      }, layoutFlags: function() {
        return s(n);
      }, update: function(u, o) {
        var h = o.editType;
        if (h && h !== "none")
          for (var l = h.split("+"), i = 0; i < l.length; i++)
            u[l[i]] = !0;
      }, overrideAll: t };
    }, { "../lib": 515 }], 549: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("gl-mat4/fromQuat"), k = v("../registry"), x = v("../lib"), e = v("../plots/plots"), r = v("../plots/cartesian/axis_ids"), n = v("../components/color"), s = r.cleanId, t = r.getFromTrace, d = k.traceIs;
      function u(f, _) {
        var b = f[_], w = _.charAt(0);
        b && b !== "paper" && (f[_] = s(b, w, !0));
      }
      function o(f) {
        function _(b, w) {
          var T = f[b], L = f.title && f.title[w];
          T && !L && (f.title || (f.title = {}), f.title[w] = f[b], delete f[b]);
        }
        f && (typeof f.title != "string" && typeof f.title != "number" || (f.title = { text: f.title }), _("titlefont", "font"), _("titleposition", "position"), _("titleside", "side"), _("titleoffset", "offset"));
      }
      function h(f) {
        if (!x.isPlainObject(f))
          return !1;
        var _ = f.name;
        return delete f.name, delete f.showlegend, (typeof _ == "string" || typeof _ == "number") && String(_);
      }
      function l(f, _, b, w) {
        if (b && !w)
          return f;
        if (w && !b || !f.trim())
          return _;
        if (!_.trim())
          return f;
        var T, L = Math.min(f.length, _.length);
        for (T = 0; T < L && f.charAt(T) === _.charAt(T); T++)
          ;
        return f.substr(0, T).trim();
      }
      function i(f) {
        var _ = "middle", b = "center";
        return typeof f == "string" && (f.indexOf("top") !== -1 ? _ = "top" : f.indexOf("bottom") !== -1 && (_ = "bottom"), f.indexOf("left") !== -1 ? b = "left" : f.indexOf("right") !== -1 && (b = "right")), _ + " " + b;
      }
      function p(f, _) {
        return _ in f && typeof f[_] == "object" && Object.keys(f[_]).length === 0;
      }
      $.clearPromiseQueue = function(f) {
        Array.isArray(f._promises) && f._promises.length > 0 && x.log("Clearing previous rejected promises from queue."), f._promises = [];
      }, $.cleanLayout = function(f) {
        var _, b;
        f || (f = {}), f.xaxis1 && (f.xaxis || (f.xaxis = f.xaxis1), delete f.xaxis1), f.yaxis1 && (f.yaxis || (f.yaxis = f.yaxis1), delete f.yaxis1), f.scene1 && (f.scene || (f.scene = f.scene1), delete f.scene1);
        var w = (e.subplotsRegistry.cartesian || {}).attrRegex, T = (e.subplotsRegistry.polar || {}).attrRegex, L = (e.subplotsRegistry.ternary || {}).attrRegex, A = (e.subplotsRegistry.gl3d || {}).attrRegex, I = Object.keys(f);
        for (_ = 0; _ < I.length; _++) {
          var P = I[_];
          if (w && w.test(P)) {
            var S = f[P];
            S.anchor && S.anchor !== "free" && (S.anchor = s(S.anchor)), S.overlaying && (S.overlaying = s(S.overlaying)), S.type || (S.isdate ? S.type = "date" : S.islog ? S.type = "log" : S.isdate === !1 && S.islog === !1 && (S.type = "linear")), S.autorange !== "withzero" && S.autorange !== "tozero" || (S.autorange = !0, S.rangemode = "tozero"), delete S.islog, delete S.isdate, delete S.categories, p(S, "domain") && delete S.domain, S.autotick !== void 0 && (S.tickmode === void 0 && (S.tickmode = S.autotick ? "auto" : "linear"), delete S.autotick), o(S);
          } else if (T && T.test(P))
            o(f[P].radialaxis);
          else if (L && L.test(P)) {
            var E = f[P];
            o(E.aaxis), o(E.baxis), o(E.caxis);
          } else if (A && A.test(P)) {
            var R = f[P], z = R.cameraposition;
            if (Array.isArray(z) && z[0].length === 4) {
              var j = z[0], H = z[1], Y = z[2], J = g([], j), W = [];
              for (b = 0; b < 3; ++b)
                W[b] = H[b] + Y * J[2 + 4 * b];
              R.camera = { eye: { x: W[0], y: W[1], z: W[2] }, center: { x: H[0], y: H[1], z: H[2] }, up: { x: 0, y: 0, z: 1 } }, delete R.cameraposition;
            }
            o(R.xaxis), o(R.yaxis), o(R.zaxis);
          }
        }
        var Z = Array.isArray(f.annotations) ? f.annotations.length : 0;
        for (_ = 0; _ < Z; _++) {
          var re = f.annotations[_];
          x.isPlainObject(re) && (re.ref && (re.ref === "paper" ? (re.xref = "paper", re.yref = "paper") : re.ref === "data" && (re.xref = "x", re.yref = "y"), delete re.ref), u(re, "xref"), u(re, "yref"));
        }
        var V = Array.isArray(f.shapes) ? f.shapes.length : 0;
        for (_ = 0; _ < V; _++) {
          var B = f.shapes[_];
          x.isPlainObject(B) && (u(B, "xref"), u(B, "yref"));
        }
        var U = Array.isArray(f.images) ? f.images.length : 0;
        for (_ = 0; _ < U; _++) {
          var ee = f.images[_];
          x.isPlainObject(ee) && (u(ee, "xref"), u(ee, "yref"));
        }
        var N = f.legend;
        return N && (N.x > 3 ? (N.x = 1.02, N.xanchor = "left") : N.x < -2 && (N.x = -0.02, N.xanchor = "right"), N.y > 3 ? (N.y = 1.02, N.yanchor = "bottom") : N.y < -2 && (N.y = -0.02, N.yanchor = "top")), o(f), f.dragmode === "rotate" && (f.dragmode = "orbit"), n.clean(f), f.template && f.template.layout && $.cleanLayout(f.template.layout), f;
      }, $.cleanData = function(f) {
        for (var _ = 0; _ < f.length; _++) {
          var b, w = f[_];
          if (w.type === "histogramy" && "xbins" in w && !("ybins" in w) && (w.ybins = w.xbins, delete w.xbins), w.error_y && "opacity" in w.error_y) {
            var T = n.defaults, L = w.error_y.color || (d(w, "bar") ? n.defaultLine : T[_ % T.length]);
            w.error_y.color = n.addOpacity(n.rgb(L), n.opacity(L) * w.error_y.opacity), delete w.error_y.opacity;
          }
          if ("bardir" in w && (w.bardir !== "h" || !d(w, "bar") && w.type.substr(0, 9) !== "histogram" || (w.orientation = "h", $.swapXYData(w)), delete w.bardir), w.type === "histogramy" && $.swapXYData(w), w.type !== "histogramx" && w.type !== "histogramy" || (w.type = "histogram"), "scl" in w && !("colorscale" in w) && (w.colorscale = w.scl, delete w.scl), "reversescl" in w && !("reversescale" in w) && (w.reversescale = w.reversescl, delete w.reversescl), w.xaxis && (w.xaxis = s(w.xaxis, "x")), w.yaxis && (w.yaxis = s(w.yaxis, "y")), d(w, "gl3d") && w.scene && (w.scene = e.subplotsRegistry.gl3d.cleanId(w.scene)), !d(w, "pie-like") && !d(w, "bar-like"))
            if (Array.isArray(w.textposition))
              for (b = 0; b < w.textposition.length; b++)
                w.textposition[b] = i(w.textposition[b]);
            else
              w.textposition && (w.textposition = i(w.textposition));
          var A = k.getModule(w);
          if (A && A.colorbar) {
            var I = A.colorbar.container, P = I ? w[I] : w;
            P && P.colorscale && (P.colorscale === "YIGnBu" && (P.colorscale = "YlGnBu"), P.colorscale === "YIOrRd" && (P.colorscale = "YlOrRd"));
          }
          if (w.type === "surface" && x.isPlainObject(w.contours)) {
            var S = ["x", "y", "z"];
            for (b = 0; b < S.length; b++) {
              var E = w.contours[S[b]];
              x.isPlainObject(E) && (E.highlightColor && (E.highlightcolor = E.highlightColor, delete E.highlightColor), E.highlightWidth && (E.highlightwidth = E.highlightWidth, delete E.highlightWidth));
            }
          }
          if (w.type === "candlestick" || w.type === "ohlc") {
            var R = (w.increasing || {}).showlegend !== !1, z = (w.decreasing || {}).showlegend !== !1, j = h(w.increasing), H = h(w.decreasing);
            if (j !== !1 && H !== !1) {
              var Y = l(j, H, R, z);
              Y && (w.name = Y);
            } else
              !j && !H || w.name || (w.name = j || H);
          }
          if (Array.isArray(w.transforms)) {
            var J = w.transforms;
            for (b = 0; b < J.length; b++) {
              var W = J[b];
              if (x.isPlainObject(W))
                switch (W.type) {
                  case "filter":
                    W.filtersrc && (W.target = W.filtersrc, delete W.filtersrc), W.calendar && (W.valuecalendar || (W.valuecalendar = W.calendar), delete W.calendar);
                    break;
                  case "groupby":
                    if (W.styles = W.styles || W.style, W.styles && !Array.isArray(W.styles)) {
                      var Z = W.styles, re = Object.keys(Z);
                      W.styles = [];
                      for (var V = 0; V < re.length; V++)
                        W.styles.push({ target: re[V], value: Z[re[V]] });
                    }
                }
            }
          }
          p(w, "line") && delete w.line, "marker" in w && (p(w.marker, "line") && delete w.marker.line, p(w, "marker") && delete w.marker), n.clean(w), w.autobinx && (delete w.autobinx, delete w.xbins), w.autobiny && (delete w.autobiny, delete w.ybins), o(w), w.colorbar && o(w.colorbar), w.marker && w.marker.colorbar && o(w.marker.colorbar), w.line && w.line.colorbar && o(w.line.colorbar), w.aaxis && o(w.aaxis), w.baxis && o(w.baxis);
        }
      }, $.swapXYData = function(f) {
        var _;
        if (x.swapAttrs(f, ["?", "?0", "d?", "?bins", "nbins?", "autobin?", "?src", "error_?"]), Array.isArray(f.z) && Array.isArray(f.z[0]) && (f.transpose ? delete f.transpose : f.transpose = !0), f.error_x && f.error_y) {
          var b = f.error_y, w = "copy_ystyle" in b ? b.copy_ystyle : !(b.color || b.thickness || b.width);
          x.swapAttrs(f, ["error_?.copy_ystyle"]), w && x.swapAttrs(f, ["error_?.color", "error_?.thickness", "error_?.width"]);
        }
        if (typeof f.hoverinfo == "string") {
          var T = f.hoverinfo.split("+");
          for (_ = 0; _ < T.length; _++)
            T[_] === "x" ? T[_] = "y" : T[_] === "y" && (T[_] = "x");
          f.hoverinfo = T.join("+");
        }
      }, $.coerceTraceIndices = function(f, _) {
        if (m(_))
          return [_];
        if (!Array.isArray(_) || !_.length)
          return f.data.map(function(T, L) {
            return L;
          });
        if (Array.isArray(_)) {
          for (var b = [], w = 0; w < _.length; w++)
            x.isIndex(_[w], f.data.length) ? b.push(_[w]) : x.warn("trace index (", _[w], ") is not a number or is out of bounds");
          return b;
        }
        return _;
      }, $.manageArrayContainers = function(f, _, b) {
        var w = f.obj, T = f.parts, L = T.length, A = T[L - 1], I = m(A);
        if (I && _ === null) {
          var P = T.slice(0, L - 1).join(".");
          x.nestedProperty(w, P).get().splice(A, 1);
        } else
          I && f.get() === void 0 && f.get() === void 0 && (b[f.astr] = null), f.set(_);
      };
      var c = /(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;
      function a(f) {
        var _ = f.search(c);
        if (_ > 0)
          return f.substr(0, _);
      }
      $.hasParent = function(f, _) {
        for (var b = a(_); b; ) {
          if (b in f)
            return !0;
          b = a(b);
        }
        return !1;
      };
      var y = ["x", "y", "z"];
      $.clearAxisTypes = function(f, _, b) {
        for (var w = 0; w < _.length; w++)
          for (var T = f._fullData[w], L = 0; L < 3; L++) {
            var A = t(f, T, y[L]);
            if (A && A.type !== "log") {
              var I = A._name, P = A._id.substr(1);
              if (P.substr(0, 5) === "scene") {
                if (b[P] !== void 0)
                  continue;
                I = P + "." + I;
              }
              var S = I + ".type";
              b[I] === void 0 && b[S] === void 0 && x.nestedProperty(f.layout, S).set(null);
            }
          }
      };
    }, { "../components/color": 367, "../lib": 515, "../plots/cartesian/axis_ids": 570, "../plots/plots": 628, "../registry": 647, "fast-isnumeric": 190, "gl-mat4/fromQuat": 200 }], 550: [function(v, Q, $) {
      var m = v("./plot_api");
      $._doPlot = m._doPlot, $.newPlot = m.newPlot, $.restyle = m.restyle, $.relayout = m.relayout, $.redraw = m.redraw, $.update = m.update, $._guiRestyle = m._guiRestyle, $._guiRelayout = m._guiRelayout, $._guiUpdate = m._guiUpdate, $._storeDirectGUIEdit = m._storeDirectGUIEdit, $.react = m.react, $.extendTraces = m.extendTraces, $.prependTraces = m.prependTraces, $.addTraces = m.addTraces, $.deleteTraces = m.deleteTraces, $.moveTraces = m.moveTraces, $.purge = m.purge, $.addFrames = m.addFrames, $.deleteFrames = m.deleteFrames, $.animate = m.animate, $.setPlotConfig = m.setPlotConfig, $.toImage = v("./to_image"), $.validate = v("./validate"), $.downloadImage = v("../snapshot/download");
      var g = v("./template_api");
      $.makeTemplate = g.makeTemplate, $.validateTemplate = g.validateTemplate;
    }, { "../snapshot/download": 649, "./plot_api": 552, "./template_api": 557, "./to_image": 558, "./validate": 559 }], 551: [function(v, Q, $) {
      var m = v("../lib/is_plain_object"), g = v("../lib/noop"), k = v("../lib/loggers"), x = v("../lib/search").sorterAsc, e = v("../registry");
      $.containerArrayMatch = v("./container_array_match");
      var r = $.isAddVal = function(s) {
        return s === "add" || m(s);
      }, n = $.isRemoveVal = function(s) {
        return s === null || s === "remove";
      };
      $.applyContainerArrayChanges = function(s, t, d, u, o) {
        var h = t.astr, l = e.getComponentMethod(h, "supplyLayoutDefaults"), i = e.getComponentMethod(h, "draw"), p = e.getComponentMethod(h, "drawOne"), c = u.replot || u.recalc || l === g || i === g, a = s.layout, y = s._fullLayout;
        if (d[""]) {
          Object.keys(d).length > 1 && k.warn("Full array edits are incompatible with other edits", h);
          var f = d[""][""];
          if (n(f))
            t.set(null);
          else {
            if (!Array.isArray(f))
              return k.warn("Unrecognized full array edit value", h, f), !0;
            t.set(f);
          }
          return !c && (l(a, y), i(s), !0);
        }
        var _, b, w, T, L, A, I, P, S = Object.keys(d).map(Number).sort(x), E = t.get(), R = E || [], z = o(y, h).get(), j = [], H = -1, Y = R.length;
        for (_ = 0; _ < S.length; _++)
          if (T = d[w = S[_]], L = Object.keys(T), A = T[""], I = r(A), w < 0 || w > R.length - (I ? 0 : 1))
            k.warn("index out of range", h, w);
          else if (A !== void 0)
            L.length > 1 && k.warn("Insertion & removal are incompatible with edits to the same index.", h, w), n(A) ? j.push(w) : I ? (A === "add" && (A = {}), R.splice(w, 0, A), z && z.splice(w, 0, {})) : k.warn("Unrecognized full object edit value", h, w, A), H === -1 && (H = w);
          else
            for (b = 0; b < L.length; b++)
              P = h + "[" + w + "].", o(R[w], L[b], P).set(T[L[b]]);
        for (_ = j.length - 1; _ >= 0; _--)
          R.splice(j[_], 1), z && z.splice(j[_], 1);
        if (R.length ? E || t.set(R) : t.set(null), c)
          return !1;
        if (l(a, y), p !== g) {
          var J;
          if (H === -1)
            J = S;
          else {
            for (Y = Math.max(R.length, Y), J = [], _ = 0; _ < S.length && !((w = S[_]) >= H); _++)
              J.push(w);
            for (_ = H; _ < Y; _++)
              J.push(_);
          }
          for (_ = 0; _ < J.length; _++)
            p(s, J[_]);
        } else
          i(s);
        return !0;
      };
    }, { "../lib/is_plain_object": 516, "../lib/loggers": 519, "../lib/noop": 524, "../lib/search": 535, "../registry": 647, "./container_array_match": 547 }], 552: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("has-hover"), x = v("../lib"), e = x.nestedProperty, r = v("../lib/events"), n = v("../lib/queue"), s = v("../registry"), t = v("./plot_schema"), d = v("../plots/plots"), u = v("../plots/cartesian/axes"), o = v("../components/drawing"), h = v("../components/color"), l = v("../plots/cartesian/graph_interact").initInteractions, i = v("../constants/xmlns_namespaces"), p = v("../components/selections").clearOutline, c = v("./plot_config").dfltConfig, a = v("./manage_arrays"), y = v("./helpers"), f = v("./subroutines"), _ = v("./edit_types"), b = v("../plots/cartesian/constants").AX_NAME_PATTERN, w = 0;
      function T(se) {
        var de = se._fullLayout;
        de._redrawFromAutoMarginCount ? de._redrawFromAutoMarginCount-- : se.emit("plotly_afterplot");
      }
      function L(se, de) {
        try {
          se._fullLayout._paper.style("background", de);
        } catch (Te) {
          x.error(Te);
        }
      }
      function A(se, de) {
        L(se, h.combine(de, "white"));
      }
      function I(se, de) {
        if (!se._context) {
          se._context = x.extendDeep({}, c);
          var Te = m.select("base");
          se._context._baseUrl = Te.size() && Te.attr("href") ? window.location.href.split("#")[0] : "";
        }
        var Ee, Me, ze, Ie = se._context;
        if (de) {
          for (Me = Object.keys(de), Ee = 0; Ee < Me.length; Ee++)
            (ze = Me[Ee]) !== "editable" && ze !== "edits" && ze in Ie && (ze === "setBackground" && de[ze] === "opaque" ? Ie[ze] = A : Ie[ze] = de[ze]);
          de.plot3dPixelRatio && !Ie.plotGlPixelRatio && (Ie.plotGlPixelRatio = Ie.plot3dPixelRatio);
          var Oe = de.editable;
          if (Oe !== void 0)
            for (Ie.editable = Oe, Me = Object.keys(Ie.edits), Ee = 0; Ee < Me.length; Ee++)
              Ie.edits[Me[Ee]] = Oe;
          if (de.edits)
            for (Me = Object.keys(de.edits), Ee = 0; Ee < Me.length; Ee++)
              (ze = Me[Ee]) in Ie.edits && (Ie.edits[ze] = de.edits[ze]);
          Ie._exportedPlot = de._exportedPlot;
        }
        Ie.staticPlot && (Ie.editable = !1, Ie.edits = {}, Ie.autosizable = !1, Ie.scrollZoom = !1, Ie.doubleClick = !1, Ie.showTips = !1, Ie.showLink = !1, Ie.displayModeBar = !1), Ie.displayModeBar !== "hover" || k || (Ie.displayModeBar = !0), Ie.setBackground !== "transparent" && typeof Ie.setBackground == "function" || (Ie.setBackground = L), Ie._hasZeroHeight = Ie._hasZeroHeight || se.clientHeight === 0, Ie._hasZeroWidth = Ie._hasZeroWidth || se.clientWidth === 0;
        var Ze = Ie.scrollZoom, Fe = Ie._scrollZoom = {};
        if (Ze === !0)
          Fe.cartesian = 1, Fe.gl3d = 1, Fe.geo = 1, Fe.mapbox = 1;
        else if (typeof Ze == "string") {
          var Pe = Ze.split("+");
          for (Ee = 0; Ee < Pe.length; Ee++)
            Fe[Pe[Ee]] = 1;
        } else
          Ze !== !1 && (Fe.gl3d = 1, Fe.geo = 1, Fe.mapbox = 1);
      }
      function P(se, de) {
        var Te, Ee, Me = de + 1, ze = [];
        for (Te = 0; Te < se.length; Te++)
          (Ee = se[Te]) < 0 ? ze.push(Me + Ee) : ze.push(Ee);
        return ze;
      }
      function S(se, de, Te) {
        var Ee, Me;
        for (Ee = 0; Ee < de.length; Ee++) {
          if ((Me = de[Ee]) !== parseInt(Me, 10))
            throw new Error("all values in " + Te + " must be integers");
          if (Me >= se.data.length || Me < -se.data.length)
            throw new Error(Te + " must be valid indices for gd.data.");
          if (de.indexOf(Me, Ee + 1) > -1 || Me >= 0 && de.indexOf(-se.data.length + Me) > -1 || Me < 0 && de.indexOf(se.data.length + Me) > -1)
            throw new Error("each index in " + Te + " must be unique.");
        }
      }
      function E(se, de, Te) {
        if (!Array.isArray(se.data))
          throw new Error("gd.data must be an array.");
        if (de === void 0)
          throw new Error("currentIndices is a required argument.");
        if (Array.isArray(de) || (de = [de]), S(se, de, "currentIndices"), Te === void 0 || Array.isArray(Te) || (Te = [Te]), Te !== void 0 && S(se, Te, "newIndices"), Te !== void 0 && de.length !== Te.length)
          throw new Error("current and new indices must be of equal length.");
      }
      function R(se, de, Te, Ee, Me) {
        (function(Ge, Qe, ot, vt) {
          var bt = x.isPlainObject(vt);
          if (!Array.isArray(Ge.data))
            throw new Error("gd.data must be an array");
          if (!x.isPlainObject(Qe))
            throw new Error("update must be a key:value object");
          if (ot === void 0)
            throw new Error("indices must be an integer or array of integers");
          for (var yt in S(Ge, ot, "indices"), Qe) {
            if (!Array.isArray(Qe[yt]) || Qe[yt].length !== ot.length)
              throw new Error("attribute " + yt + " must be an array of length equal to indices array length");
            if (bt && (!(yt in vt) || !Array.isArray(vt[yt]) || vt[yt].length !== Qe[yt].length))
              throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object");
          }
        })(se, de, Te, Ee);
        for (var ze = function(Ge, Qe, ot, vt) {
          var bt, yt, tt, Ke, mt, Ft = x.isPlainObject(vt), Vt = [];
          for (var Xt in Array.isArray(ot) || (ot = [ot]), ot = P(ot, Ge.data.length - 1), Qe)
            for (var Gt = 0; Gt < ot.length; Gt++) {
              if (bt = Ge.data[ot[Gt]], yt = (tt = e(bt, Xt)).get(), Ke = Qe[Xt][Gt], !x.isArrayOrTypedArray(Ke))
                throw new Error("attribute: " + Xt + " index: " + Gt + " must be an array");
              if (!x.isArrayOrTypedArray(yt))
                throw new Error("cannot extend missing or non-array attribute: " + Xt);
              if (yt.constructor !== Ke.constructor)
                throw new Error("cannot extend array with an array of a different type: " + Xt);
              mt = Ft ? vt[Xt][Gt] : vt, g(mt) || (mt = -1), Vt.push({ prop: tt, target: yt, insert: Ke, maxp: Math.floor(mt) });
            }
          return Vt;
        }(se, de, Te, Ee), Ie = {}, Oe = {}, Ze = 0; Ze < ze.length; Ze++) {
          var Fe = ze[Ze].prop, Pe = ze[Ze].maxp, De = Me(ze[Ze].target, ze[Ze].insert, Pe);
          Fe.set(De[0]), Array.isArray(Ie[Fe.astr]) || (Ie[Fe.astr] = []), Ie[Fe.astr].push(De[1]), Array.isArray(Oe[Fe.astr]) || (Oe[Fe.astr] = []), Oe[Fe.astr].push(ze[Ze].target.length);
        }
        return { update: Ie, maxPoints: Oe };
      }
      function z(se, de) {
        var Te = new se.constructor(se.length + de.length);
        return Te.set(se), Te.set(de, se.length), Te;
      }
      function j(se, de, Te, Ee) {
        se = x.getGraphDiv(se), y.clearPromiseQueue(se);
        var Me = {};
        if (typeof de == "string")
          Me[de] = Te;
        else {
          if (!x.isPlainObject(de))
            return x.warn("Restyle fail.", de, Te, Ee), Promise.reject();
          Me = x.extendFlat({}, de), Ee === void 0 && (Ee = Te);
        }
        Object.keys(Me).length && (se.changed = !0);
        var ze = y.coerceTraceIndices(se, Ee), Ie = W(se, Me, ze), Oe = Ie.flags;
        Oe.calc && (se.calcdata = void 0), Oe.clearAxisTypes && y.clearAxisTypes(se, ze, {});
        var Ze = [];
        Oe.fullReplot ? Ze.push($._doPlot) : (Ze.push(d.previousPromises), d.supplyDefaults(se), Oe.markerSize && (d.doCalcdata(se), B(Ze)), Oe.style && Ze.push(f.doTraceStyle), Oe.colorbars && Ze.push(f.doColorBars), Ze.push(T)), Ze.push(d.rehover, d.redrag, d.reselect), n.add(se, j, [se, Ie.undoit, Ie.traces], j, [se, Ie.redoit, Ie.traces]);
        var Fe = x.syncOrAsync(Ze, se);
        return Fe && Fe.then || (Fe = Promise.resolve()), Fe.then(function() {
          return se.emit("plotly_restyle", Ie.eventData), se;
        });
      }
      function H(se) {
        return se === void 0 ? null : se;
      }
      function Y(se, de) {
        return de ? function(Te, Ee, Me) {
          var ze = e(Te, Ee), Ie = ze.set;
          return ze.set = function(Oe) {
            J((Me || "") + Ee, ze.get(), Oe, se), Ie(Oe);
          }, ze;
        } : e;
      }
      function J(se, de, Te, Ee) {
        if (Array.isArray(de) || Array.isArray(Te))
          for (var Me = Array.isArray(de) ? de : [], ze = Array.isArray(Te) ? Te : [], Ie = Math.max(Me.length, ze.length), Oe = 0; Oe < Ie; Oe++)
            J(se + "[" + Oe + "]", Me[Oe], ze[Oe], Ee);
        else if (x.isPlainObject(de) || x.isPlainObject(Te)) {
          var Ze = x.isPlainObject(de) ? de : {}, Fe = x.isPlainObject(Te) ? Te : {}, Pe = x.extendFlat({}, Ze, Fe);
          for (var De in Pe)
            J(se + "." + De, Ze[De], Fe[De], Ee);
        } else
          Ee[se] === void 0 && (Ee[se] = H(de));
      }
      function W(se, de, Te) {
        var Ee, Me = se._fullLayout, ze = se._fullData, Ie = se.data, Oe = Me._guiEditing, Ze = Y(Me._preGUI, Oe), Fe = x.extendDeepAll({}, de);
        Z(de);
        var Pe, De = _.traceFlags(), Ge = {}, Qe = {};
        function ot() {
          return Te.map(function() {
          });
        }
        function vt(nt) {
          var ft = u.id2name(nt);
          Pe.indexOf(ft) === -1 && Pe.push(ft);
        }
        function bt(nt) {
          return "LAYOUT" + nt + ".autorange";
        }
        function yt(nt) {
          return "LAYOUT" + nt + ".range";
        }
        function tt(nt) {
          for (var ft = nt; ft < ze.length; ft++)
            if (ze[ft]._input === Ie[nt])
              return ze[ft];
        }
        function Ke(nt, ft, Mt) {
          if (Array.isArray(nt))
            nt.forEach(function(Ut) {
              Ke(Ut, ft, Mt);
            });
          else if (!(nt in de) && !y.hasParent(de, nt)) {
            var Nt;
            if (nt.substr(0, 6) === "LAYOUT")
              Nt = Ze(se.layout, nt.replace("LAYOUT", ""));
            else {
              var Zt = Te[Mt];
              Nt = Y(Me._tracePreGUI[tt(Zt)._fullInput.uid], Oe)(Ie[Zt], nt);
            }
            nt in Qe || (Qe[nt] = ot()), Qe[nt][Mt] === void 0 && (Qe[nt][Mt] = H(Nt.get())), ft !== void 0 && Nt.set(ft);
          }
        }
        function mt(nt) {
          return function(ft) {
            return ze[ft][nt];
          };
        }
        function Ft(nt) {
          return function(ft, Mt) {
            return ft === !1 ? ze[Te[Mt]][nt] : null;
          };
        }
        for (var Vt in de) {
          if (y.hasParent(de, Vt))
            throw new Error("cannot set " + Vt + " and a parent attribute simultaneously");
          var Xt, Gt, nr, It, Be, He, he = de[Vt];
          if (Vt !== "autobinx" && Vt !== "autobiny" || (Vt = Vt.charAt(Vt.length - 1) + "bins", he = Array.isArray(he) ? he.map(Ft(Vt)) : he === !1 ? Te.map(mt(Vt)) : null), Ge[Vt] = he, Vt.substr(0, 6) !== "LAYOUT") {
            for (Qe[Vt] = ot(), Ee = 0; Ee < Te.length; Ee++)
              if (Xt = Ie[Te[Ee]], Gt = tt(Te[Ee]), It = (nr = Y(Me._tracePreGUI[Gt._fullInput.uid], Oe)(Xt, Vt)).get(), (Be = Array.isArray(he) ? he[Ee % he.length] : he) !== void 0) {
                var be = nr.parts[nr.parts.length - 1], Re = Vt.substr(0, Vt.length - be.length - 1), Ue = Re ? Re + "." : "", Xe = Re ? e(Gt, Re).get() : Gt;
                if ((He = t.getTraceValObject(Gt, nr.parts)) && He.impliedEdits && Be !== null)
                  for (var qe in He.impliedEdits)
                    Ke(x.relativeAttr(Vt, qe), He.impliedEdits[qe], Ee);
                else if (be !== "thicknessmode" && be !== "lenmode" || It === Be || Be !== "fraction" && Be !== "pixels" || !Xe) {
                  if (Vt === "type" && (Be === "pie" != (It === "pie") || Be === "funnelarea" != (It === "funnelarea"))) {
                    var st = "x", it = "y";
                    Be !== "bar" && It !== "bar" || Xt.orientation !== "h" || (st = "y", it = "x"), x.swapAttrs(Xt, ["?", "?src"], "labels", st), x.swapAttrs(Xt, ["d?", "?0"], "label", st), x.swapAttrs(Xt, ["?", "?src"], "values", it), It === "pie" || It === "funnelarea" ? (e(Xt, "marker.color").set(e(Xt, "marker.colors").get()), Me._pielayer.selectAll("g.trace").remove()) : s.traceIs(Xt, "cartesian") && e(Xt, "marker.colors").set(e(Xt, "marker.color").get());
                  }
                } else {
                  var Tt = Me._size, Pt = Xe.orient, rt = Pt === "top" || Pt === "bottom";
                  if (be === "thicknessmode") {
                    var ut = rt ? Tt.h : Tt.w;
                    Ke(Ue + "thickness", Xe.thickness * (Be === "fraction" ? 1 / ut : ut), Ee);
                  } else {
                    var Bt = rt ? Tt.w : Tt.h;
                    Ke(Ue + "len", Xe.len * (Be === "fraction" ? 1 / Bt : Bt), Ee);
                  }
                }
                if (Qe[Vt][Ee] = H(It), ["swapxy", "swapxyaxes", "orientation", "orientationaxes"].indexOf(Vt) !== -1) {
                  if (Vt === "orientation") {
                    nr.set(Be);
                    var wt = Xt.x && !Xt.y ? "h" : "v";
                    if ((nr.get() || wt) === Gt.orientation)
                      continue;
                  } else
                    Vt === "orientationaxes" && (Xt.orientation = { v: "h", h: "v" }[Gt.orientation]);
                  y.swapXYData(Xt), De.calc = De.clearAxisTypes = !0;
                } else
                  d.dataArrayContainers.indexOf(nr.parts[0]) !== -1 ? (y.manageArrayContainers(nr, Be, Qe), De.calc = !0) : (He ? He.arrayOk && !s.traceIs(Gt, "regl") && (x.isArrayOrTypedArray(Be) || x.isArrayOrTypedArray(It)) ? De.calc = !0 : _.update(De, He) : De.calc = !0, nr.set(Be));
              }
            if (["swapxyaxes", "orientationaxes"].indexOf(Vt) !== -1 && u.swap(se, Te), Vt === "orientationaxes") {
              var Lt = e(se.layout, "hovermode"), Se = Lt.get();
              Se === "x" ? Lt.set("y") : Se === "y" ? Lt.set("x") : Se === "x unified" ? Lt.set("y unified") : Se === "y unified" && Lt.set("x unified");
            }
            if (["orientation", "type"].indexOf(Vt) !== -1) {
              for (Pe = [], Ee = 0; Ee < Te.length; Ee++) {
                var We = Ie[Te[Ee]];
                s.traceIs(We, "cartesian") && (vt(We.xaxis || "x"), vt(We.yaxis || "y"));
              }
              Ke(Pe.map(bt), !0, 0), Ke(Pe.map(yt), [0, 1], 0);
            }
          } else
            nr = Ze(se.layout, Vt.replace("LAYOUT", "")), Qe[Vt] = [H(nr.get())], nr.set(Array.isArray(he) ? he[0] : he), De.calc = !0;
        }
        return (De.calc || De.plot) && (De.fullReplot = !0), { flags: De, undoit: Qe, redoit: Ge, traces: Te, eventData: x.extendDeepNoArrays([], [Fe, Te]) };
      }
      function Z(se) {
        var de, Te, Ee, Me = x.counterRegex("axis", ".title", !1, !1), ze = /colorbar\.title$/, Ie = Object.keys(se);
        for (de = 0; de < Ie.length; de++)
          Te = Ie[de], Ee = se[Te], Te !== "title" && !Me.test(Te) && !ze.test(Te) || typeof Ee != "string" && typeof Ee != "number" ? Te.indexOf("titlefont") > -1 && Te.indexOf("grouptitlefont") === -1 ? Oe(Te, Te.replace("titlefont", "title.font")) : Te.indexOf("titleposition") > -1 ? Oe(Te, Te.replace("titleposition", "title.position")) : Te.indexOf("titleside") > -1 ? Oe(Te, Te.replace("titleside", "title.side")) : Te.indexOf("titleoffset") > -1 && Oe(Te, Te.replace("titleoffset", "title.offset")) : Oe(Te, Te.replace("title", "title.text"));
        function Oe(Ze, Fe) {
          se[Fe] = se[Ze], delete se[Ze];
        }
      }
      function re(se, de, Te) {
        se = x.getGraphDiv(se), y.clearPromiseQueue(se);
        var Ee = {};
        if (typeof de == "string")
          Ee[de] = Te;
        else {
          if (!x.isPlainObject(de))
            return x.warn("Relayout fail.", de, Te), Promise.reject();
          Ee = x.extendFlat({}, de);
        }
        Object.keys(Ee).length && (se.changed = !0);
        var Me = K(se, Ee), ze = Me.flags;
        ze.calc && (se.calcdata = void 0);
        var Ie = [d.previousPromises];
        ze.layoutReplot ? Ie.push(f.layoutReplot) : Object.keys(Ee).length && (V(se, ze, Me) || d.supplyDefaults(se), ze.legend && Ie.push(f.doLegend), ze.layoutstyle && Ie.push(f.layoutStyles), ze.axrange && B(Ie, Me.rangesAltered), ze.ticks && Ie.push(f.doTicksRelayout), ze.modebar && Ie.push(f.doModeBar), ze.camera && Ie.push(f.doCamera), ze.colorbars && Ie.push(f.doColorBars), Ie.push(T)), Ie.push(d.rehover, d.redrag, d.reselect), n.add(se, re, [se, Me.undoit], re, [se, Me.redoit]);
        var Oe = x.syncOrAsync(Ie, se);
        return Oe && Oe.then || (Oe = Promise.resolve(se)), Oe.then(function() {
          return se.emit("plotly_relayout", Me.eventData), se;
        });
      }
      function V(se, de, Te) {
        var Ee = se._fullLayout;
        if (!de.axrange)
          return !1;
        for (var Me in de)
          if (Me !== "axrange" && de[Me])
            return !1;
        for (var ze in Te.rangesAltered) {
          var Ie = u.id2name(ze), Oe = se.layout[Ie], Ze = Ee[Ie];
          if (Ze.autorange = Oe.autorange, Oe.range && (Ze.range = Oe.range.slice()), Ze.cleanRange(), Ze._matchGroup) {
            for (var Fe in Ze._matchGroup)
              if (Fe !== ze) {
                var Pe = Ee[u.id2name(Fe)];
                Pe.autorange = Ze.autorange, Pe.range = Ze.range.slice(), Pe._input.range = Ze.range.slice();
              }
          }
        }
        return !0;
      }
      function B(se, de) {
        var Te = de ? function(Ee) {
          var Me = [];
          for (var ze in de) {
            var Ie = u.getFromId(Ee, ze);
            if (Me.push(ze), (Ie.ticklabelposition || "").indexOf("inside") !== -1 && Ie._anchorAxis && Me.push(Ie._anchorAxis._id), Ie._matchGroup)
              for (var Oe in Ie._matchGroup)
                de[Oe] || Me.push(Oe);
          }
          return u.draw(Ee, Me, { skipTitle: !0 });
        } : function(Ee) {
          return u.draw(Ee, "redraw");
        };
        se.push(p, f.doAutoRangeAndConstraints, Te, f.drawData, f.finalDraw);
      }
      var U = /^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/, ee = /^[xyz]axis[0-9]*\.autorange$/, N = /^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;
      function K(se, de) {
        var Te, Ee, Me, ze = se.layout, Ie = se._fullLayout, Oe = Ie._guiEditing, Ze = Y(Ie._preGUI, Oe), Fe = Object.keys(de), Pe = u.list(se), De = x.extendDeepAll({}, de), Ge = {};
        for (Z(de), Fe = Object.keys(de), Ee = 0; Ee < Fe.length; Ee++)
          if (Fe[Ee].indexOf("allaxes") === 0) {
            for (Me = 0; Me < Pe.length; Me++) {
              var Qe = Pe[Me]._id.substr(1), ot = Qe.indexOf("scene") !== -1 ? Qe + "." : "", vt = Fe[Ee].replace("allaxes", ot + Pe[Me]._name);
              de[vt] || (de[vt] = de[Fe[Ee]]);
            }
            delete de[Fe[Ee]];
          }
        var bt = _.layoutFlags(), yt = {}, tt = {};
        function Ke(Zt, Ut) {
          if (Array.isArray(Zt))
            Zt.forEach(function(Tr) {
              Ke(Tr, Ut);
            });
          else if (!(Zt in de) && !y.hasParent(de, Zt)) {
            var fr = Ze(ze, Zt);
            Zt in tt || (tt[Zt] = H(fr.get())), Ut !== void 0 && fr.set(Ut);
          }
        }
        var mt, Ft = {};
        function Vt(Zt) {
          var Ut = u.name2id(Zt.split(".")[0]);
          return Ft[Ut] = 1, Ut;
        }
        for (var Xt in de) {
          if (y.hasParent(de, Xt))
            throw new Error("cannot set " + Xt + " and a parent attribute simultaneously");
          for (var Gt = Ze(ze, Xt), nr = de[Xt], It = Gt.parts.length - 1; It > 0 && typeof Gt.parts[It] != "string"; )
            It--;
          var Be = Gt.parts[It], He = Gt.parts[It - 1] + "." + Be, he = Gt.parts.slice(0, It).join("."), be = e(se.layout, he).get(), Re = e(Ie, he).get(), Ue = Gt.get();
          if (nr !== void 0) {
            yt[Xt] = nr, tt[Xt] = Be === "reverse" ? nr : H(Ue);
            var Xe = t.getLayoutValObject(Ie, Gt.parts);
            if (Xe && Xe.impliedEdits && nr !== null)
              for (var qe in Xe.impliedEdits)
                Ke(x.relativeAttr(Xt, qe), Xe.impliedEdits[qe]);
            if (["width", "height"].indexOf(Xt) !== -1)
              if (nr) {
                Ke("autosize", null);
                var st = Xt === "height" ? "width" : "height";
                Ke(st, Ie[st]);
              } else
                Ie[Xt] = se._initialAutoSize[Xt];
            else if (Xt === "autosize")
              Ke("width", nr ? null : Ie.width), Ke("height", nr ? null : Ie.height);
            else if (He.match(U))
              Vt(He), e(Ie, he + "._inputRange").set(null);
            else if (He.match(ee)) {
              Vt(He), e(Ie, he + "._inputRange").set(null);
              var it = e(Ie, he).get();
              it._inputDomain && (it._input.domain = it._inputDomain.slice());
            } else
              He.match(N) && e(Ie, he + "._inputDomain").set(null);
            if (Be === "type") {
              mt = be;
              var Tt = Re.type === "linear" && nr === "log", Pt = Re.type === "log" && nr === "linear";
              if (Tt || Pt) {
                if (mt && mt.range)
                  if (Re.autorange)
                    Tt && (mt.range = mt.range[1] > mt.range[0] ? [1, 2] : [2, 1]);
                  else {
                    var rt = mt.range[0], ut = mt.range[1];
                    Tt ? (rt <= 0 && ut <= 0 && Ke(he + ".autorange", !0), rt <= 0 ? rt = ut / 1e6 : ut <= 0 && (ut = rt / 1e6), Ke(he + ".range[0]", Math.log(rt) / Math.LN10), Ke(he + ".range[1]", Math.log(ut) / Math.LN10)) : (Ke(he + ".range[0]", Math.pow(10, rt)), Ke(he + ".range[1]", Math.pow(10, ut)));
                  }
                else
                  Ke(he + ".autorange", !0);
                Array.isArray(Ie._subplots.polar) && Ie._subplots.polar.length && Ie[Gt.parts[0]] && Gt.parts[1] === "radialaxis" && delete Ie[Gt.parts[0]]._subplot.viewInitial["radialaxis.range"], s.getComponentMethod("annotations", "convertCoords")(se, Re, nr, Ke), s.getComponentMethod("images", "convertCoords")(se, Re, nr, Ke);
              } else
                Ke(he + ".autorange", !0), Ke(he + ".range", null);
              e(Ie, he + "._inputRange").set(null);
            } else if (Be.match(b)) {
              var Bt = e(Ie, Xt).get(), wt = (nr || {}).type;
              wt && wt !== "-" || (wt = "linear"), s.getComponentMethod("annotations", "convertCoords")(se, Bt, wt, Ke), s.getComponentMethod("images", "convertCoords")(se, Bt, wt, Ke);
            }
            var Lt = a.containerArrayMatch(Xt);
            if (Lt) {
              Te = Lt.array, Ee = Lt.index;
              var Se = Lt.property, We = Xe || { editType: "calc" };
              Ee !== "" && Se === "" && (a.isAddVal(nr) ? tt[Xt] = null : a.isRemoveVal(nr) ? tt[Xt] = (e(ze, Te).get() || [])[Ee] : x.warn("unrecognized full object value", de)), _.update(bt, We), Ge[Te] || (Ge[Te] = {});
              var nt = Ge[Te][Ee];
              nt || (nt = Ge[Te][Ee] = {}), nt[Se] = nr, delete de[Xt];
            } else
              Be === "reverse" ? (be.range ? be.range.reverse() : (Ke(he + ".autorange", !0), be.range = [1, 0]), Re.autorange ? bt.calc = !0 : bt.plot = !0) : (Xt === "dragmode" && (nr === !1 && Ue !== !1 || nr !== !1 && Ue === !1) || Ie._has("scatter-like") && Ie._has("regl") && Xt === "dragmode" && (nr === "lasso" || nr === "select") && Ue !== "lasso" && Ue !== "select" || Ie._has("gl2d") ? bt.plot = !0 : Xe ? _.update(bt, Xe) : bt.calc = !0, Gt.set(nr));
          }
        }
        for (Te in Ge)
          a.applyContainerArrayChanges(se, Ze(ze, Te), Ge[Te], bt, Ze) || (bt.plot = !0);
        for (var ft in Ft) {
          var Mt = (mt = u.getFromId(se, ft)) && mt._constraintGroup;
          if (Mt)
            for (var Nt in bt.calc = !0, Mt)
              Ft[Nt] || (u.getFromId(se, Nt)._constraintShrinkable = !0);
        }
        return (X(se) || de.height || de.width) && (bt.plot = !0), (bt.plot || bt.calc) && (bt.layoutReplot = !0), { flags: bt, rangesAltered: Ft, undoit: tt, redoit: yt, eventData: De };
      }
      function X(se) {
        var de = se._fullLayout, Te = de.width, Ee = de.height;
        return se.layout.autosize && d.plotAutoSize(se, se.layout, de), de.width !== Te || de.height !== Ee;
      }
      function te(se, de, Te, Ee) {
        se = x.getGraphDiv(se), y.clearPromiseQueue(se), x.isPlainObject(de) || (de = {}), x.isPlainObject(Te) || (Te = {}), Object.keys(de).length && (se.changed = !0), Object.keys(Te).length && (se.changed = !0);
        var Me = y.coerceTraceIndices(se, Ee), ze = W(se, x.extendFlat({}, de), Me), Ie = ze.flags, Oe = K(se, x.extendFlat({}, Te)), Ze = Oe.flags;
        (Ie.calc || Ze.calc) && (se.calcdata = void 0), Ie.clearAxisTypes && y.clearAxisTypes(se, Me, Te);
        var Fe = [];
        Ze.layoutReplot ? Fe.push(f.layoutReplot) : Ie.fullReplot ? Fe.push($._doPlot) : (Fe.push(d.previousPromises), V(se, Ze, Oe) || d.supplyDefaults(se), Ie.style && Fe.push(f.doTraceStyle), (Ie.colorbars || Ze.colorbars) && Fe.push(f.doColorBars), Ze.legend && Fe.push(f.doLegend), Ze.layoutstyle && Fe.push(f.layoutStyles), Ze.axrange && B(Fe, Oe.rangesAltered), Ze.ticks && Fe.push(f.doTicksRelayout), Ze.modebar && Fe.push(f.doModeBar), Ze.camera && Fe.push(f.doCamera), Fe.push(T)), Fe.push(d.rehover, d.redrag, d.reselect), n.add(se, te, [se, ze.undoit, Oe.undoit, ze.traces], te, [se, ze.redoit, Oe.redoit, ze.traces]);
        var Pe = x.syncOrAsync(Fe, se);
        return Pe && Pe.then || (Pe = Promise.resolve(se)), Pe.then(function() {
          return se.emit("plotly_update", { data: ze.eventData, layout: Oe.eventData }), se;
        });
      }
      function ie(se) {
        return function(de) {
          de._fullLayout._guiEditing = !0;
          var Te = se.apply(null, arguments);
          return de._fullLayout._guiEditing = !1, Te;
        };
      }
      var le = [{ pattern: /^hiddenlabels/, attr: "legend.uirevision" }, { pattern: /^((x|y)axis\d*)\.((auto)?range|title\.text)/ }, { pattern: /axis\d*\.showspikes$/, attr: "modebar.uirevision" }, { pattern: /(hover|drag)mode$/, attr: "modebar.uirevision" }, { pattern: /^(scene\d*)\.camera/ }, { pattern: /^(geo\d*)\.(projection|center|fitbounds)/ }, { pattern: /^(ternary\d*\.[abc]axis)\.(min|title\.text)$/ }, { pattern: /^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/ }, { pattern: /^(polar\d*\.angularaxis)\.rotation/ }, { pattern: /^(mapbox\d*)\.(center|zoom|bearing|pitch)/ }, { pattern: /^legend\.(x|y)$/, attr: "editrevision" }, { pattern: /^(shapes|annotations)/, attr: "editrevision" }, { pattern: /^title\.text$/, attr: "editrevision" }], oe = [{ pattern: /^selectedpoints$/, attr: "selectionrevision" }, { pattern: /(^|value\.)visible$/, attr: "legend.uirevision" }, { pattern: /^dimensions\[\d+\]\.constraintrange/ }, { pattern: /^node\.(x|y|groups)/ }, { pattern: /^level$/ }, { pattern: /(^|value\.)name$/ }, { pattern: /colorbar\.title\.text$/ }, { pattern: /colorbar\.(x|y)$/, attr: "editrevision" }];
      function ve(se, de) {
        for (var Te = 0; Te < de.length; Te++) {
          var Ee = de[Te], Me = se.match(Ee.pattern);
          if (Me) {
            var ze = Me[1] || "";
            return { head: ze, tail: se.substr(ze.length + 1), attr: Ee.attr };
          }
        }
      }
      function ue(se, de) {
        var Te = e(de, se).get();
        if (Te !== void 0)
          return Te;
        var Ee = se.split(".");
        for (Ee.pop(); Ee.length > 1; )
          if (Ee.pop(), (Te = e(de, Ee.join(".") + ".uirevision").get()) !== void 0)
            return Te;
        return de.uirevision;
      }
      function ye(se, de) {
        for (var Te = 0; Te < de.length; Te++)
          if (de[Te]._fullInput.uid === se)
            return Te;
        return -1;
      }
      function Ae(se, de, Te) {
        for (var Ee = 0; Ee < de.length; Ee++)
          if (de[Ee].uid === se)
            return Ee;
        return !de[Te] || de[Te].uid ? -1 : Te;
      }
      function pe(se, de) {
        var Te = x.isPlainObject(se), Ee = Array.isArray(se);
        return Te || Ee ? (Te && x.isPlainObject(de) || Ee && Array.isArray(de)) && JSON.stringify(se) === JSON.stringify(de) : se === de;
      }
      function ge(se, de, Te, Ee) {
        var Me, ze, Ie, Oe = Ee.getValObject, Ze = Ee.flags, Fe = Ee.immutable, Pe = Ee.inArray, De = Ee.arrayIndex;
        function Ge() {
          var be = Me.editType;
          Pe && be.indexOf("arraydraw") !== -1 ? x.pushUnique(Ze.arrays[Pe], De) : (_.update(Ze, Me), be !== "none" && Ze.nChanges++, Ee.transition && Me.anim && Ze.nChangesAnim++, (U.test(Ie) || ee.test(Ie)) && (Ze.rangesAltered[Te[0]] = 1), N.test(Ie) && e(de, "_inputDomain").set(null), ze === "datarevision" && (Ze.newDataRevision = 1));
        }
        function Qe(be) {
          return be.valType === "data_array" || be.arrayOk;
        }
        for (ze in se) {
          if (Ze.calc && !Ee.transition)
            return;
          var ot = se[ze], vt = de[ze], bt = Te.concat(ze);
          if (Ie = bt.join("."), ze.charAt(0) !== "_" && typeof ot != "function" && ot !== vt) {
            if ((ze === "tick0" || ze === "dtick") && Te[0] !== "geo") {
              var yt = de.tickmode;
              if (yt === "auto" || yt === "array" || !yt)
                continue;
            }
            if ((ze !== "range" || !de.autorange) && (ze !== "zmin" && ze !== "zmax" || de.type !== "contourcarpet") && (Me = Oe(bt)) && (!Me._compareAsJSON || JSON.stringify(ot) !== JSON.stringify(vt))) {
              var tt, Ke = Me.valType, mt = Qe(Me), Ft = Array.isArray(ot), Vt = Array.isArray(vt);
              if (Ft && Vt) {
                var Xt = "_input_" + ze, Gt = se[Xt], nr = de[Xt];
                if (Array.isArray(Gt) && Gt === nr)
                  continue;
              }
              if (vt === void 0)
                mt && Ft ? Ze.calc = !0 : Ge();
              else if (Me._isLinkedToArray) {
                var It = [], Be = !1;
                Pe || (Ze.arrays[ze] = It);
                var He = Math.min(ot.length, vt.length), he = Math.max(ot.length, vt.length);
                if (He !== he) {
                  if (Me.editType !== "arraydraw") {
                    Ge();
                    continue;
                  }
                  Be = !0;
                }
                for (tt = 0; tt < He; tt++)
                  ge(ot[tt], vt[tt], bt.concat(tt), x.extendFlat({ inArray: ze, arrayIndex: tt }, Ee));
                if (Be)
                  for (tt = He; tt < he; tt++)
                    It.push(tt);
              } else
                !Ke && x.isPlainObject(ot) ? ge(ot, vt, bt, Ee) : mt ? Ft && Vt ? (Fe && (Ze.calc = !0), (Fe || Ee.newDataRevision) && Ge()) : Ft !== Vt ? Ze.calc = !0 : Ge() : Ft && Vt && ot.length === vt.length && String(ot) === String(vt) || Ge();
            }
          }
        }
        for (ze in de)
          if (!(ze in se) && ze.charAt(0) !== "_" && typeof de[ze] != "function") {
            if (Qe(Me = Oe(Te.concat(ze))) && Array.isArray(de[ze]))
              return void (Ze.calc = !0);
            Ge();
          }
      }
      function we(se) {
        var de = se._fullLayout, Te = se.getBoundingClientRect();
        if (!x.equalDomRects(Te, de._lastBBox)) {
          var Ee = de._invTransform = x.inverseTransformMatrix(x.getFullTransformMatrix(se));
          de._invScaleX = Math.sqrt(Ee[0][0] * Ee[0][0] + Ee[0][1] * Ee[0][1] + Ee[0][2] * Ee[0][2]), de._invScaleY = Math.sqrt(Ee[1][0] * Ee[1][0] + Ee[1][1] * Ee[1][1] + Ee[1][2] * Ee[1][2]), de._lastBBox = Te;
        }
      }
      $.animate = function(se, de, Te) {
        if (se = x.getGraphDiv(se), !x.isPlotDiv(se))
          throw new Error("This element is not a Plotly plot: " + se + ". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");
        var Ee = se._transitionData;
        Ee._frameQueue || (Ee._frameQueue = []);
        var Me = (Te = d.supplyAnimationDefaults(Te)).transition, ze = Te.frame;
        function Ie(Fe) {
          return Array.isArray(Me) ? Fe >= Me.length ? Me[0] : Me[Fe] : Me;
        }
        function Oe(Fe) {
          return Array.isArray(ze) ? Fe >= ze.length ? ze[0] : ze[Fe] : ze;
        }
        function Ze(Fe, Pe) {
          var De = 0;
          return function() {
            if (Fe && ++De === Pe)
              return Fe();
          };
        }
        return Ee._frameWaitingCnt === void 0 && (Ee._frameWaitingCnt = 0), new Promise(function(Fe, Pe) {
          function De() {
            Ee._currentFrame && Ee._currentFrame.onComplete && Ee._currentFrame.onComplete();
            var Gt = Ee._currentFrame = Ee._frameQueue.shift();
            if (Gt) {
              var nr = Gt.name ? Gt.name.toString() : null;
              se._fullLayout._currentFrame = nr, Ee._lastFrameAt = Date.now(), Ee._timeToNext = Gt.frameOpts.duration, d.transition(se, Gt.frame.data, Gt.frame.layout, y.coerceTraceIndices(se, Gt.frame.traces), Gt.frameOpts, Gt.transitionOpts).then(function() {
                Gt.onComplete && Gt.onComplete();
              }), se.emit("plotly_animatingframe", { name: nr, frame: Gt.frame, animation: { frame: Gt.frameOpts, transition: Gt.transitionOpts } });
            } else
              se.emit("plotly_animated"), window.cancelAnimationFrame(Ee._animationRaf), Ee._animationRaf = null;
          }
          function Ge() {
            se.emit("plotly_animating"), Ee._lastFrameAt = -1 / 0, Ee._timeToNext = 0, Ee._runningTransitions = 0, Ee._currentFrame = null;
            var Gt = function() {
              Ee._animationRaf = window.requestAnimationFrame(Gt), Date.now() - Ee._lastFrameAt > Ee._timeToNext && De();
            };
            Gt();
          }
          var Qe, ot, vt = 0;
          function bt(Gt) {
            return Array.isArray(Me) ? vt >= Me.length ? Gt.transitionOpts = Me[vt] : Gt.transitionOpts = Me[0] : Gt.transitionOpts = Me, vt++, Gt;
          }
          var yt = [], tt = de == null, Ke = Array.isArray(de);
          if (!tt && !Ke && x.isPlainObject(de))
            yt.push({ type: "object", data: bt(x.extendFlat({}, de)) });
          else if (tt || ["string", "number"].indexOf(typeof de) !== -1)
            for (Qe = 0; Qe < Ee._frames.length; Qe++)
              (ot = Ee._frames[Qe]) && (tt || String(ot.group) === String(de)) && yt.push({ type: "byname", name: String(ot.name), data: bt({ name: ot.name }) });
          else if (Ke)
            for (Qe = 0; Qe < de.length; Qe++) {
              var mt = de[Qe];
              ["number", "string"].indexOf(typeof mt) !== -1 ? (mt = String(mt), yt.push({ type: "byname", name: mt, data: bt({ name: mt }) })) : x.isPlainObject(mt) && yt.push({ type: "object", data: bt(x.extendFlat({}, mt)) });
            }
          for (Qe = 0; Qe < yt.length; Qe++)
            if ((ot = yt[Qe]).type === "byname" && !Ee._frameHash[ot.data.name])
              return x.warn('animate failure: frame not found: "' + ot.data.name + '"'), void Pe();
          ["next", "immediate"].indexOf(Te.mode) !== -1 && function() {
            if (Ee._frameQueue.length !== 0) {
              for (; Ee._frameQueue.length; ) {
                var Gt = Ee._frameQueue.pop();
                Gt.onInterrupt && Gt.onInterrupt();
              }
              se.emit("plotly_animationinterrupted", []);
            }
          }(), Te.direction === "reverse" && yt.reverse();
          var Ft = se._fullLayout._currentFrame;
          if (Ft && Te.fromcurrent) {
            var Vt = -1;
            for (Qe = 0; Qe < yt.length; Qe++)
              if ((ot = yt[Qe]).type === "byname" && ot.name === Ft) {
                Vt = Qe;
                break;
              }
            if (Vt > 0 && Vt < yt.length - 1) {
              var Xt = [];
              for (Qe = 0; Qe < yt.length; Qe++)
                ot = yt[Qe], (yt[Qe].type !== "byname" || Qe > Vt) && Xt.push(ot);
              yt = Xt;
            }
          }
          yt.length > 0 ? function(Gt) {
            if (Gt.length !== 0) {
              for (var nr = 0; nr < Gt.length; nr++) {
                var It;
                It = Gt[nr].type === "byname" ? d.computeFrame(se, Gt[nr].name) : Gt[nr].data;
                var Be = Oe(nr), He = Ie(nr);
                He.duration = Math.min(He.duration, Be.duration);
                var he = { frame: It, name: Gt[nr].name, frameOpts: Be, transitionOpts: He };
                nr === Gt.length - 1 && (he.onComplete = Ze(Fe, 2), he.onInterrupt = Pe), Ee._frameQueue.push(he);
              }
              Te.mode === "immediate" && (Ee._lastFrameAt = -1 / 0), Ee._animationRaf || Ge();
            }
          }(yt) : (se.emit("plotly_animated"), Fe());
        });
      }, $.addFrames = function(se, de, Te) {
        if (se = x.getGraphDiv(se), de == null)
          return Promise.resolve();
        if (!x.isPlotDiv(se))
          throw new Error("This element is not a Plotly plot: " + se + ". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");
        var Ee, Me, ze, Ie, Oe = se._transitionData._frames, Ze = se._transitionData._frameHash;
        if (!Array.isArray(de))
          throw new Error("addFrames failure: frameList must be an Array of frame definitions" + de);
        var Fe = Oe.length + 2 * de.length, Pe = [], De = {};
        for (Ee = de.length - 1; Ee >= 0; Ee--)
          if (x.isPlainObject(de[Ee])) {
            var Ge = de[Ee].name, Qe = (Ze[Ge] || De[Ge] || {}).name, ot = de[Ee].name, vt = Ze[Qe] || De[Qe];
            Qe && ot && typeof ot == "number" && vt && w < 5 && (w++, x.warn('addFrames: overwriting frame "' + (Ze[Qe] || De[Qe]).name + '" with a frame whose name of type "number" also equates to "' + Qe + '". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'), w === 5 && x.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")), De[Ge] = { name: Ge }, Pe.push({ frame: d.supplyFrameDefaults(de[Ee]), index: Te && Te[Ee] !== void 0 && Te[Ee] !== null ? Te[Ee] : Fe + Ee });
          }
        Pe.sort(function(Xt, Gt) {
          return Xt.index > Gt.index ? -1 : Xt.index < Gt.index ? 1 : 0;
        });
        var bt = [], yt = [], tt = Oe.length;
        for (Ee = Pe.length - 1; Ee >= 0; Ee--) {
          if (typeof (Me = Pe[Ee].frame).name == "number" && x.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"), !Me.name)
            for (; Ze[Me.name = "frame " + se._transitionData._counter++]; )
              ;
          if (Ze[Me.name]) {
            for (ze = 0; ze < Oe.length && (Oe[ze] || {}).name !== Me.name; ze++)
              ;
            bt.push({ type: "replace", index: ze, value: Me }), yt.unshift({ type: "replace", index: ze, value: Oe[ze] });
          } else
            Ie = Math.max(0, Math.min(Pe[Ee].index, tt)), bt.push({ type: "insert", index: Ie, value: Me }), yt.unshift({ type: "delete", index: Ie }), tt++;
        }
        var Ke = d.modifyFrames, mt = d.modifyFrames, Ft = [se, yt], Vt = [se, bt];
        return n && n.add(se, Ke, Ft, mt, Vt), d.modifyFrames(se, bt);
      }, $.deleteFrames = function(se, de) {
        if (se = x.getGraphDiv(se), !x.isPlotDiv(se))
          throw new Error("This element is not a Plotly plot: " + se);
        var Te, Ee, Me = se._transitionData._frames, ze = [], Ie = [];
        if (!de)
          for (de = [], Te = 0; Te < Me.length; Te++)
            de.push(Te);
        for ((de = de.slice()).sort(), Te = de.length - 1; Te >= 0; Te--)
          Ee = de[Te], ze.push({ type: "delete", index: Ee }), Ie.unshift({ type: "insert", index: Ee, value: Me[Ee] });
        var Oe = d.modifyFrames, Ze = d.modifyFrames, Fe = [se, Ie], Pe = [se, ze];
        return n && n.add(se, Oe, Fe, Ze, Pe), d.modifyFrames(se, ze);
      }, $.addTraces = function se(de, Te, Ee) {
        de = x.getGraphDiv(de);
        var Me, ze, Ie = [], Oe = $.deleteTraces, Ze = se, Fe = [de, Ie], Pe = [de, Te];
        for (function(De, Ge, Qe) {
          var ot, vt;
          if (!Array.isArray(De.data))
            throw new Error("gd.data must be an array.");
          if (Ge === void 0)
            throw new Error("traces must be defined.");
          for (Array.isArray(Ge) || (Ge = [Ge]), ot = 0; ot < Ge.length; ot++)
            if (typeof (vt = Ge[ot]) != "object" || Array.isArray(vt) || vt === null)
              throw new Error("all values in traces array must be non-array objects");
          if (Qe === void 0 || Array.isArray(Qe) || (Qe = [Qe]), Qe !== void 0 && Qe.length !== Ge.length)
            throw new Error("if indices is specified, traces.length must equal indices.length");
        }(de, Te, Ee), Array.isArray(Te) || (Te = [Te]), Te = Te.map(function(De) {
          return x.extendFlat({}, De);
        }), y.cleanData(Te), Me = 0; Me < Te.length; Me++)
          de.data.push(Te[Me]);
        for (Me = 0; Me < Te.length; Me++)
          Ie.push(-Te.length + Me);
        if (Ee === void 0)
          return ze = $.redraw(de), n.add(de, Oe, Fe, Ze, Pe), ze;
        Array.isArray(Ee) || (Ee = [Ee]);
        try {
          E(de, Ie, Ee);
        } catch (De) {
          throw de.data.splice(de.data.length - Te.length, Te.length), De;
        }
        return n.startSequence(de), n.add(de, Oe, Fe, Ze, Pe), ze = $.moveTraces(de, Ie, Ee), n.stopSequence(de), ze;
      }, $.deleteTraces = function se(de, Te) {
        de = x.getGraphDiv(de);
        var Ee, Me, ze = [], Ie = $.addTraces, Oe = se, Ze = [de, ze, Te], Fe = [de, Te];
        if (Te === void 0)
          throw new Error("indices must be an integer or array of integers.");
        for (Array.isArray(Te) || (Te = [Te]), S(de, Te, "indices"), (Te = P(Te, de.data.length - 1)).sort(x.sorterDes), Ee = 0; Ee < Te.length; Ee += 1)
          Me = de.data.splice(Te[Ee], 1)[0], ze.push(Me);
        var Pe = $.redraw(de);
        return n.add(de, Ie, Ze, Oe, Fe), Pe;
      }, $.extendTraces = function se(de, Te, Ee, Me) {
        function ze(Fe, Pe, De) {
          var Ge, Qe;
          if (x.isTypedArray(Fe))
            if (De < 0) {
              var ot = new Fe.constructor(0), vt = z(Fe, Pe);
              De < 0 ? (Ge = vt, Qe = ot) : (Ge = ot, Qe = vt);
            } else if (Ge = new Fe.constructor(De), Qe = new Fe.constructor(Fe.length + Pe.length - De), De === Pe.length)
              Ge.set(Pe), Qe.set(Fe);
            else if (De < Pe.length) {
              var bt = Pe.length - De;
              Ge.set(Pe.subarray(bt)), Qe.set(Fe), Qe.set(Pe.subarray(0, bt), Fe.length);
            } else {
              var yt = De - Pe.length, tt = Fe.length - yt;
              Ge.set(Fe.subarray(tt)), Ge.set(Pe, yt), Qe.set(Fe.subarray(0, tt));
            }
          else
            Ge = Fe.concat(Pe), Qe = De >= 0 && De < Ge.length ? Ge.splice(0, Ge.length - De) : [];
          return [Ge, Qe];
        }
        var Ie = R(de = x.getGraphDiv(de), Te, Ee, Me, ze), Oe = $.redraw(de), Ze = [de, Ie.update, Ee, Ie.maxPoints];
        return n.add(de, $.prependTraces, Ze, se, arguments), Oe;
      }, $.moveTraces = function se(de, Te, Ee) {
        var Me, ze = [], Ie = [], Oe = se, Ze = se, Fe = [de = x.getGraphDiv(de), Ee, Te], Pe = [de, Te, Ee];
        if (E(de, Te, Ee), Te = Array.isArray(Te) ? Te : [Te], Ee === void 0)
          for (Ee = [], Me = 0; Me < Te.length; Me++)
            Ee.push(-Te.length + Me);
        for (Ee = Array.isArray(Ee) ? Ee : [Ee], Te = P(Te, de.data.length - 1), Ee = P(Ee, de.data.length - 1), Me = 0; Me < de.data.length; Me++)
          Te.indexOf(Me) === -1 && ze.push(de.data[Me]);
        for (Me = 0; Me < Te.length; Me++)
          Ie.push({ newIndex: Ee[Me], trace: de.data[Te[Me]] });
        for (Ie.sort(function(Ge, Qe) {
          return Ge.newIndex - Qe.newIndex;
        }), Me = 0; Me < Ie.length; Me += 1)
          ze.splice(Ie[Me].newIndex, 0, Ie[Me].trace);
        de.data = ze;
        var De = $.redraw(de);
        return n.add(de, Oe, Fe, Ze, Pe), De;
      }, $.prependTraces = function se(de, Te, Ee, Me) {
        function ze(Fe, Pe, De) {
          var Ge, Qe;
          if (x.isTypedArray(Fe))
            if (De <= 0) {
              var ot = new Fe.constructor(0), vt = z(Pe, Fe);
              De < 0 ? (Ge = vt, Qe = ot) : (Ge = ot, Qe = vt);
            } else if (Ge = new Fe.constructor(De), Qe = new Fe.constructor(Fe.length + Pe.length - De), De === Pe.length)
              Ge.set(Pe), Qe.set(Fe);
            else if (De < Pe.length) {
              var bt = Pe.length - De;
              Ge.set(Pe.subarray(0, bt)), Qe.set(Pe.subarray(bt)), Qe.set(Fe, bt);
            } else {
              var yt = De - Pe.length;
              Ge.set(Pe), Ge.set(Fe.subarray(0, yt), Pe.length), Qe.set(Fe.subarray(yt));
            }
          else
            Ge = Pe.concat(Fe), Qe = De >= 0 && De < Ge.length ? Ge.splice(De, Ge.length) : [];
          return [Ge, Qe];
        }
        var Ie = R(de = x.getGraphDiv(de), Te, Ee, Me, ze), Oe = $.redraw(de), Ze = [de, Ie.update, Ee, Ie.maxPoints];
        return n.add(de, $.extendTraces, Ze, se, arguments), Oe;
      }, $.newPlot = function(se, de, Te, Ee) {
        return se = x.getGraphDiv(se), d.cleanPlot([], {}, se._fullData || [], se._fullLayout || {}), d.purge(se), $._doPlot(se, de, Te, Ee);
      }, $._doPlot = function(se, de, Te, Ee) {
        var Me;
        if (se = x.getGraphDiv(se), r.init(se), x.isPlainObject(de)) {
          var ze = de;
          de = ze.data, Te = ze.layout, Ee = ze.config, Me = ze.frames;
        }
        if (r.triggerHandler(se, "plotly_beforeplot", [de, Te, Ee]) === !1)
          return Promise.reject();
        de || Te || x.isPlotDiv(se) || x.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.", se), I(se, Ee), Te || (Te = {}), m.select(se).classed("js-plotly-plot", !0), o.makeTester(), Array.isArray(se._promises) || (se._promises = []);
        var Ie = (se.data || []).length === 0 && Array.isArray(de);
        Array.isArray(de) && (y.cleanData(de), Ie ? se.data = de : se.data.push.apply(se.data, de), se.empty = !1), se.layout && !Ie || (se.layout = y.cleanLayout(Te)), d.supplyDefaults(se);
        var Oe = se._fullLayout, Ze = Oe._has("cartesian");
        Oe._replotting = !0, (Ie || Oe._shouldCreateBgLayer) && (function(yt) {
          var tt = m.select(yt), Ke = yt._fullLayout;
          if (Ke._calcInverseTransform = we, Ke._calcInverseTransform(yt), Ke._container = tt.selectAll(".plot-container").data([0]), Ke._container.enter().insert("div", ":first-child").classed("plot-container", !0).classed("plotly", !0), Ke._paperdiv = Ke._container.selectAll(".svg-container").data([0]), Ke._paperdiv.enter().append("div").classed("user-select-none", !0).classed("svg-container", !0).style("position", "relative"), Ke._glcontainer = Ke._paperdiv.selectAll(".gl-container").data([{}]), Ke._glcontainer.enter().append("div").classed("gl-container", !0), Ke._paperdiv.selectAll(".main-svg").remove(), Ke._paperdiv.select(".modebar-container").remove(), Ke._paper = Ke._paperdiv.insert("svg", ":first-child").classed("main-svg", !0), Ke._toppaper = Ke._paperdiv.append("svg").classed("main-svg", !0), Ke._modebardiv = Ke._paperdiv.append("div"), delete Ke._modeBar, Ke._hoverpaper = Ke._paperdiv.append("svg").classed("main-svg", !0), !Ke._uid) {
            var mt = {};
            m.selectAll("defs").each(function() {
              this.id && (mt[this.id.split("-")[1]] = 1);
            }), Ke._uid = x.randstr(mt);
          }
          Ke._paperdiv.selectAll(".main-svg").attr(i.svgAttrs), Ke._defs = Ke._paper.append("defs").attr("id", "defs-" + Ke._uid), Ke._clips = Ke._defs.append("g").classed("clips", !0), Ke._topdefs = Ke._toppaper.append("defs").attr("id", "topdefs-" + Ke._uid), Ke._topclips = Ke._topdefs.append("g").classed("clips", !0), Ke._bgLayer = Ke._paper.append("g").classed("bglayer", !0), Ke._draggers = Ke._paper.append("g").classed("draglayer", !0);
          var Ft = Ke._paper.append("g").classed("layer-below", !0);
          Ke._imageLowerLayer = Ft.append("g").classed("imagelayer", !0), Ke._shapeLowerLayer = Ft.append("g").classed("shapelayer", !0), Ke._cartesianlayer = Ke._paper.append("g").classed("cartesianlayer", !0), Ke._polarlayer = Ke._paper.append("g").classed("polarlayer", !0), Ke._smithlayer = Ke._paper.append("g").classed("smithlayer", !0), Ke._ternarylayer = Ke._paper.append("g").classed("ternarylayer", !0), Ke._geolayer = Ke._paper.append("g").classed("geolayer", !0), Ke._funnelarealayer = Ke._paper.append("g").classed("funnelarealayer", !0), Ke._pielayer = Ke._paper.append("g").classed("pielayer", !0), Ke._iciclelayer = Ke._paper.append("g").classed("iciclelayer", !0), Ke._treemaplayer = Ke._paper.append("g").classed("treemaplayer", !0), Ke._sunburstlayer = Ke._paper.append("g").classed("sunburstlayer", !0), Ke._indicatorlayer = Ke._toppaper.append("g").classed("indicatorlayer", !0), Ke._glimages = Ke._paper.append("g").classed("glimages", !0);
          var Vt = Ke._toppaper.append("g").classed("layer-above", !0);
          Ke._imageUpperLayer = Vt.append("g").classed("imagelayer", !0), Ke._shapeUpperLayer = Vt.append("g").classed("shapelayer", !0), Ke._selectionLayer = Ke._toppaper.append("g").classed("selectionlayer", !0), Ke._infolayer = Ke._toppaper.append("g").classed("infolayer", !0), Ke._menulayer = Ke._toppaper.append("g").classed("menulayer", !0), Ke._zoomlayer = Ke._toppaper.append("g").classed("zoomlayer", !0), Ke._hoverlayer = Ke._hoverpaper.append("g").classed("hoverlayer", !0), Ke._modebardiv.classed("modebar-container", !0).style("position", "absolute").style("top", "0px").style("right", "0px"), yt.emit("plotly_framework");
        }(se), Oe._shouldCreateBgLayer && delete Oe._shouldCreateBgLayer), o.initGradients(se), o.initPatterns(se), Ie && u.saveShowSpikeInitial(se);
        var Fe = !se.calcdata || se.calcdata.length !== (se._fullData || []).length;
        Fe && d.doCalcdata(se);
        for (var Pe = 0; Pe < se.calcdata.length; Pe++)
          se.calcdata[Pe][0].trace = se._fullData[Pe];
        se._context.responsive ? se._responsiveChartHandler || (se._responsiveChartHandler = function() {
          x.isHidden(se) || d.resize(se);
        }, window.addEventListener("resize", se._responsiveChartHandler)) : x.clearResponsive(se);
        var De = x.extendFlat({}, Oe._size), Ge = 0;
        function Qe() {
          if (d.clearAutoMarginIds(se), f.drawMarginPushers(se), u.allowAutoMargin(se), Oe._has("pie"))
            for (var yt = se._fullData, tt = 0; tt < yt.length; tt++) {
              var Ke = yt[tt];
              Ke.type === "pie" && Ke.automargin && d.allowAutoMargin(se, "pie." + Ke.uid + ".automargin");
            }
          return d.doAutoMargin(se), d.previousPromises(se);
        }
        function ot() {
          se._transitioning || (f.doAutoRangeAndConstraints(se), Ie && u.saveRangeInitial(se), s.getComponentMethod("rangeslider", "calcAutorange")(se));
        }
        var vt = [d.previousPromises, function() {
          if (Me)
            return $.addFrames(se, Me);
        }, function yt() {
          for (var tt = Oe._basePlotModules, Ke = 0; Ke < tt.length; Ke++)
            tt[Ke].drawFramework && tt[Ke].drawFramework(se);
          !Oe._glcanvas && Oe._has("gl") && (Oe._glcanvas = Oe._glcontainer.selectAll(".gl-canvas").data([{ key: "contextLayer", context: !0, pick: !1 }, { key: "focusLayer", context: !1, pick: !1 }, { key: "pickLayer", context: !1, pick: !0 }], function(Xt) {
            return Xt.key;
          }), Oe._glcanvas.enter().append("canvas").attr("class", function(Xt) {
            return "gl-canvas gl-canvas-" + Xt.key.replace("Layer", "");
          }).style({ position: "absolute", top: 0, left: 0, overflow: "visible", "pointer-events": "none" }));
          var mt = se._context.plotGlPixelRatio;
          if (Oe._glcanvas) {
            Oe._glcanvas.attr("width", Oe.width * mt).attr("height", Oe.height * mt).style("width", Oe.width + "px").style("height", Oe.height + "px");
            var Ft = Oe._glcanvas.data()[0].regl;
            if (Ft && (Math.floor(Oe.width * mt) !== Ft._gl.drawingBufferWidth || Math.floor(Oe.height * mt) !== Ft._gl.drawingBufferHeight)) {
              var Vt = "WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";
              if (!Ge)
                return x.log(Vt + " Clearing graph and plotting again."), d.cleanPlot([], {}, se._fullData, Oe), d.supplyDefaults(se), Oe = se._fullLayout, d.doCalcdata(se), Ge++, yt();
              x.error(Vt);
            }
          }
          return Oe.modebar.orientation === "h" ? Oe._modebardiv.style("height", null).style("width", "100%") : Oe._modebardiv.style("width", null).style("height", Oe.height + "px"), d.previousPromises(se);
        }, Qe, function() {
          if (d.didMarginChange(De, Oe._size))
            return x.syncOrAsync([Qe, f.layoutStyles], se);
        }];
        Ze && vt.push(function() {
          if (Fe)
            return x.syncOrAsync([s.getComponentMethod("shapes", "calcAutorange"), s.getComponentMethod("annotations", "calcAutorange"), ot], se);
          ot();
        }), vt.push(f.layoutStyles), Ze && vt.push(function() {
          return u.draw(se, Ie ? "" : "redraw");
        }, function(yt) {
          yt._fullLayout._insideTickLabelsAutorange && re(yt, yt._fullLayout._insideTickLabelsAutorange).then(function() {
            yt._fullLayout._insideTickLabelsAutorange = void 0;
          });
        }), vt.push(f.drawData, f.finalDraw, l, d.addLinks, d.rehover, d.redrag, d.reselect, d.doAutoMargin, function(yt) {
          yt._fullLayout._insideTickLabelsAutorange && Ie && u.saveRangeInitial(yt, !0);
        }, d.previousPromises);
        var bt = x.syncOrAsync(vt, se);
        return bt && bt.then || (bt = Promise.resolve()), bt.then(function() {
          return T(se), se;
        });
      }, $.purge = function(se) {
        var de = (se = x.getGraphDiv(se))._fullLayout || {}, Te = se._fullData || [];
        return d.cleanPlot([], {}, Te, de), d.purge(se), r.purge(se), de._container && de._container.remove(), delete se._context, se;
      }, $.react = function(se, de, Te, Ee) {
        var Me, ze;
        se = x.getGraphDiv(se), y.clearPromiseQueue(se);
        var Ie = se._fullData, Oe = se._fullLayout;
        if (x.isPlotDiv(se) && Ie && Oe) {
          if (x.isPlainObject(de)) {
            var Ze = de;
            de = Ze.data, Te = Ze.layout, Ee = Ze.config, Me = Ze.frames;
          }
          var Fe = !1;
          if (Ee) {
            var Pe = x.extendDeep({}, se._context);
            se._context = void 0, I(se, Ee), Fe = function he(be, Re) {
              var Ue;
              for (Ue in be)
                if (Ue.charAt(0) !== "_") {
                  var Xe = be[Ue], qe = Re[Ue];
                  if (Xe !== qe)
                    if (x.isPlainObject(Xe) && x.isPlainObject(qe)) {
                      if (he(Xe, qe))
                        return !0;
                    } else {
                      if (!Array.isArray(Xe) || !Array.isArray(qe) || Xe.length !== qe.length)
                        return !0;
                      for (var st = 0; st < Xe.length; st++)
                        if (Xe[st] !== qe[st] && (!x.isPlainObject(Xe[st]) || !x.isPlainObject(qe[st]) || he(Xe[st], qe[st])))
                          return !0;
                    }
                }
            }(Pe, se._context);
          }
          se.data = de || [], y.cleanData(se.data), se.layout = Te || {}, y.cleanLayout(se.layout), function(he, be, Re, Ue) {
            var Xe, qe, st, it, Tt, Pt, rt, ut, Bt, wt, Lt = Ue._preGUI, Se = [], We = {}, nt = {};
            for (Xe in Lt) {
              if (Tt = ve(Xe, le)) {
                if (Bt = Tt.head, wt = Tt.tail, qe = Tt.attr || Bt + ".uirevision", (it = (st = e(Ue, qe).get()) && ue(qe, be)) && it === st) {
                  if ((Pt = Lt[Xe]) === null && (Pt = void 0), pe(ut = (rt = e(be, Xe)).get(), Pt)) {
                    ut === void 0 && wt === "autorange" && Se.push(Bt), rt.set(H(e(Ue, Xe).get()));
                    continue;
                  }
                  if (wt === "autorange" || wt.substr(0, 6) === "range[") {
                    var ft = Lt[Bt + ".range[0]"], Mt = Lt[Bt + ".range[1]"], Nt = Lt[Bt + ".autorange"];
                    if (Nt || Nt === null && ft === null && Mt === null) {
                      if (!(Bt in We)) {
                        var Zt = e(be, Bt).get();
                        We[Bt] = Zt && (Zt.autorange || Zt.autorange !== !1 && (!Zt.range || Zt.range.length !== 2));
                      }
                      if (We[Bt]) {
                        rt.set(H(e(Ue, Xe).get()));
                        continue;
                      }
                    }
                  }
                }
              } else
                x.warn("unrecognized GUI edit: " + Xe);
              delete Lt[Xe], Tt && Tt.tail.substr(0, 6) === "range[" && (nt[Tt.head] = 1);
            }
            for (var Ut = 0; Ut < Se.length; Ut++) {
              var fr = Se[Ut];
              if (nt[fr]) {
                var Tr = e(be, fr).get();
                Tr && delete Tr.autorange;
              }
            }
            var ur = Ue._tracePreGUI;
            for (var Kt in ur) {
              var $t, er = ur[Kt], cr = null;
              for (Xe in er) {
                if (!cr) {
                  var gr = ye(Kt, Re);
                  if (gr < 0) {
                    delete ur[Kt];
                    break;
                  }
                  var Mr = Ae(Kt, he, ($t = Re[gr]._fullInput).index);
                  if (Mr < 0) {
                    delete ur[Kt];
                    break;
                  }
                  cr = he[Mr];
                }
                if (Tt = ve(Xe, oe)) {
                  if (Tt.attr ? it = (st = e(Ue, Tt.attr).get()) && ue(Tt.attr, be) : (st = $t.uirevision, (it = cr.uirevision) === void 0 && (it = be.uirevision)), it && it === st && ((Pt = er[Xe]) === null && (Pt = void 0), pe(ut = (rt = e(cr, Xe)).get(), Pt))) {
                    rt.set(H(e($t, Xe).get()));
                    continue;
                  }
                } else
                  x.warn("unrecognized GUI edit: " + Xe + " in trace uid " + Kt);
                delete er[Xe];
              }
            }
          }(se.data, se.layout, Ie, Oe), d.supplyDefaults(se, { skipUpdateCalc: !0 });
          var De = se._fullData, Ge = se._fullLayout, Qe = Ge.datarevision === void 0, ot = Ge.transition, vt = function(he, be, Re, Ue, Xe) {
            var qe = _.layoutFlags();
            function st(it) {
              return t.getLayoutValObject(Re, it);
            }
            return qe.arrays = {}, qe.rangesAltered = {}, qe.nChanges = 0, qe.nChangesAnim = 0, ge(be, Re, [], { getValObject: st, flags: qe, immutable: Ue, transition: Xe, gd: he }), (qe.plot || qe.calc) && (qe.layoutReplot = !0), Xe && qe.nChanges && qe.nChangesAnim && (qe.anim = qe.nChanges === qe.nChangesAnim ? "all" : "some"), qe;
          }(se, Oe, Ge, Qe, ot), bt = vt.newDataRevision, yt = function(he, be, Re, Ue, Xe, qe) {
            var st = be.length === Re.length;
            if (!Xe && !st)
              return { fullReplot: !0, calc: !0 };
            var it, Tt, Pt = _.traceFlags();
            Pt.arrays = {}, Pt.nChanges = 0, Pt.nChangesAnim = 0;
            var rt = { getValObject: function(Bt) {
              var wt = t.getTraceValObject(Tt, Bt);
              return !Tt._module.animatable && wt.anim && (wt.anim = !1), wt;
            }, flags: Pt, immutable: Ue, transition: Xe, newDataRevision: qe, gd: he }, ut = {};
            for (it = 0; it < be.length; it++)
              if (Re[it]) {
                if (Tt = Re[it]._fullInput, d.hasMakesDataTransform(Tt) && (Tt = Re[it]), ut[Tt.uid])
                  continue;
                ut[Tt.uid] = 1, ge(be[it]._fullInput, Tt, [], rt);
              }
            return (Pt.calc || Pt.plot) && (Pt.fullReplot = !0), Xe && Pt.nChanges && Pt.nChangesAnim && (Pt.anim = Pt.nChanges === Pt.nChangesAnim && st ? "all" : "some"), Pt;
          }(se, Ie, De, Qe, ot, bt);
          if (X(se) && (vt.layoutReplot = !0), yt.calc || vt.calc) {
            se.calcdata = void 0;
            for (var tt = Object.getOwnPropertyNames(Ge), Ke = 0; Ke < tt.length; Ke++) {
              var mt = tt[Ke], Ft = mt.substring(0, 5);
              if (Ft === "xaxis" || Ft === "yaxis") {
                var Vt = Ge[mt]._emptyCategories;
                Vt && Vt();
              }
            }
          } else
            d.supplyDefaultsUpdateCalc(se.calcdata, De);
          var Xt = [];
          if (Me && (se._transitionData = {}, d.createTransitionData(se), Xt.push(function() {
            return $.addFrames(se, Me);
          })), Ge.transition && !Fe && (yt.anim || vt.anim))
            vt.ticks && Xt.push(f.doTicksRelayout), d.doCalcdata(se), f.doAutoRangeAndConstraints(se), Xt.push(function() {
              return d.transitionFromReact(se, yt, vt, Oe);
            });
          else if (yt.fullReplot || vt.layoutReplot || Fe)
            se._fullLayout._skipDefaults = !0, Xt.push($._doPlot);
          else {
            for (var Gt in vt.arrays) {
              var nr = vt.arrays[Gt];
              if (nr.length) {
                var It = s.getComponentMethod(Gt, "drawOne");
                if (It !== x.noop)
                  for (var Be = 0; Be < nr.length; Be++)
                    It(se, nr[Be]);
                else {
                  var He = s.getComponentMethod(Gt, "draw");
                  if (He === x.noop)
                    throw new Error("cannot draw components: " + Gt);
                  He(se);
                }
              }
            }
            Xt.push(d.previousPromises), yt.style && Xt.push(f.doTraceStyle), (yt.colorbars || vt.colorbars) && Xt.push(f.doColorBars), vt.legend && Xt.push(f.doLegend), vt.layoutstyle && Xt.push(f.layoutStyles), vt.axrange && B(Xt), vt.ticks && Xt.push(f.doTicksRelayout), vt.modebar && Xt.push(f.doModeBar), vt.camera && Xt.push(f.doCamera), Xt.push(T);
          }
          Xt.push(d.rehover, d.redrag, d.reselect), (ze = x.syncOrAsync(Xt, se)) && ze.then || (ze = Promise.resolve(se));
        } else
          ze = $.newPlot(se, de, Te, Ee);
        return ze.then(function() {
          return se.emit("plotly_react", { data: de, layout: Te }), se;
        });
      }, $.redraw = function(se) {
        if (se = x.getGraphDiv(se), !x.isPlotDiv(se))
          throw new Error("This element is not a Plotly plot: " + se);
        return y.cleanData(se.data), y.cleanLayout(se.layout), se.calcdata = void 0, $._doPlot(se).then(function() {
          return se.emit("plotly_redraw"), se;
        });
      }, $.relayout = re, $.restyle = j, $.setPlotConfig = function(se) {
        return x.extendFlat(c, se);
      }, $.update = te, $._guiRelayout = ie(re), $._guiRestyle = ie(j), $._guiUpdate = ie(te), $._storeDirectGUIEdit = function(se, de, Te) {
        for (var Ee in Te)
          J(Ee, e(se, Ee).get(), Te[Ee], de);
      };
    }, { "../components/color": 367, "../components/drawing": 389, "../components/selections": 455, "../constants/xmlns_namespaces": 492, "../lib": 515, "../lib/events": 504, "../lib/queue": 531, "../plots/cartesian/axes": 566, "../plots/cartesian/constants": 573, "../plots/cartesian/graph_interact": 576, "../plots/plots": 628, "../registry": 647, "./edit_types": 548, "./helpers": 549, "./manage_arrays": 551, "./plot_config": 553, "./plot_schema": 554, "./subroutines": 556, "@plotly/d3": 58, "fast-isnumeric": 190, "has-hover": 228 }], 553: [function(v, Q, $) {
      var m = { staticPlot: { valType: "boolean", dflt: !1 }, typesetMath: { valType: "boolean", dflt: !0 }, plotlyServerURL: { valType: "string", dflt: "" }, editable: { valType: "boolean", dflt: !1 }, edits: { annotationPosition: { valType: "boolean", dflt: !1 }, annotationTail: { valType: "boolean", dflt: !1 }, annotationText: { valType: "boolean", dflt: !1 }, axisTitleText: { valType: "boolean", dflt: !1 }, colorbarPosition: { valType: "boolean", dflt: !1 }, colorbarTitleText: { valType: "boolean", dflt: !1 }, legendPosition: { valType: "boolean", dflt: !1 }, legendText: { valType: "boolean", dflt: !1 }, shapePosition: { valType: "boolean", dflt: !1 }, titleText: { valType: "boolean", dflt: !1 } }, editSelection: { valType: "boolean", dflt: !0 }, autosizable: { valType: "boolean", dflt: !1 }, responsive: { valType: "boolean", dflt: !1 }, fillFrame: { valType: "boolean", dflt: !1 }, frameMargins: { valType: "number", dflt: 0, min: 0, max: 0.5 }, scrollZoom: { valType: "flaglist", flags: ["cartesian", "gl3d", "geo", "mapbox"], extras: [!0, !1], dflt: "gl3d+geo+mapbox" }, doubleClick: { valType: "enumerated", values: [!1, "reset", "autosize", "reset+autosize"], dflt: "reset+autosize" }, doubleClickDelay: { valType: "number", dflt: 300, min: 0 }, showAxisDragHandles: { valType: "boolean", dflt: !0 }, showAxisRangeEntryBoxes: { valType: "boolean", dflt: !0 }, showTips: { valType: "boolean", dflt: !0 }, showLink: { valType: "boolean", dflt: !1 }, linkText: { valType: "string", dflt: "Edit chart", noBlank: !0 }, sendData: { valType: "boolean", dflt: !0 }, showSources: { valType: "any", dflt: !1 }, displayModeBar: { valType: "enumerated", values: ["hover", !0, !1], dflt: "hover" }, showSendToCloud: { valType: "boolean", dflt: !1 }, showEditInChartStudio: { valType: "boolean", dflt: !1 }, modeBarButtonsToRemove: { valType: "any", dflt: [] }, modeBarButtonsToAdd: { valType: "any", dflt: [] }, modeBarButtons: { valType: "any", dflt: !1 }, toImageButtonOptions: { valType: "any", dflt: {} }, displaylogo: { valType: "boolean", dflt: !0 }, watermark: { valType: "boolean", dflt: !1 }, plotGlPixelRatio: { valType: "number", dflt: 2, min: 1, max: 4 }, setBackground: { valType: "any", dflt: "transparent" }, topojsonURL: { valType: "string", noBlank: !0, dflt: "https://cdn.plot.ly/" }, mapboxAccessToken: { valType: "string", dflt: null }, logging: { valType: "integer", min: 0, max: 2, dflt: 1 }, notifyOnLogging: { valType: "integer", min: 0, max: 2, dflt: 0 }, queueLength: { valType: "integer", min: 0, dflt: 0 }, globalTransforms: { valType: "any", dflt: [] }, locale: { valType: "string", dflt: "en-US" }, locales: { valType: "any", dflt: {} } }, g = {};
      (function k(x, e) {
        for (var r in x) {
          var n = x[r];
          n.valType ? e[r] = n.dflt : (e[r] || (e[r] = {}), k(n, e[r]));
        }
      })(m, g), Q.exports = { configAttributes: m, dfltConfig: g };
    }, {}], 554: [function(v, Q, $) {
      var m = v("../registry"), g = v("../lib"), k = v("../plots/attributes"), x = v("../plots/layout_attributes"), e = v("../plots/frame_attributes"), r = v("../plots/animation_attributes"), n = v("./plot_config").configAttributes, s = v("./edit_types"), t = g.extendDeepAll, d = g.isPlainObject, u = g.isArrayOrTypedArray, o = g.nestedProperty, h = g.valObjectMeta, l = ["_isSubplotObj", "_isLinkedToArray", "_arrayAttrRegexps", "_deprecated"];
      function i(b, w, T) {
        if (!b)
          return !1;
        if (b._isLinkedToArray) {
          if (p(w[T]))
            T++;
          else if (T < w.length)
            return !1;
        }
        for (; T < w.length; T++) {
          var L = b[w[T]];
          if (!d(L) || (b = L, T === w.length - 1))
            break;
          if (b._isLinkedToArray) {
            if (!p(w[++T]))
              return !1;
          } else if (b.valType === "info_array") {
            var A = w[++T];
            if (!p(A))
              return !1;
            var I = b.items;
            if (Array.isArray(I)) {
              if (A >= I.length)
                return !1;
              if (b.dimensions === 2) {
                if (T++, w.length === T)
                  return b;
                var P = w[T];
                if (!p(P))
                  return !1;
                b = I[A][P];
              } else
                b = I[A];
            } else
              b = I;
          }
        }
        return b;
      }
      function p(b) {
        return b === Math.round(b) && b >= 0;
      }
      function c() {
        var b, w, T = {};
        for (b in t(T, x), m.subplotsRegistry)
          if ((w = m.subplotsRegistry[b]).layoutAttributes)
            if (Array.isArray(w.attr))
              for (var L = 0; L < w.attr.length; L++)
                f(T, w, w.attr[L]);
            else
              f(T, w, w.attr === "subplot" ? w.name : w.attr);
        for (b in m.componentsRegistry) {
          var A = (w = m.componentsRegistry[b]).schema;
          if (A && (A.subplots || A.layout)) {
            var I = A.subplots;
            if (I && I.xaxis && !I.yaxis)
              for (var P in I.xaxis)
                delete T.yaxis[P];
          } else
            w.name === "colorscale" ? t(T, w.layoutAttributes) : w.layoutAttributes && _(T, w.layoutAttributes, w.name);
        }
        return { layoutAttributes: y(T) };
      }
      function a() {
        var b = { frames: t({}, e) };
        return y(b), b.frames;
      }
      function y(b) {
        return function(w) {
          $.crawl(w, function(T, L, A) {
            $.isValObject(T) ? T.arrayOk !== !0 && T.valType !== "data_array" || (A[L + "src"] = { valType: "string", editType: "none" }) : d(T) && (T.role = "object");
          });
        }(b), function(w) {
          $.crawl(w, function(T, L, A) {
            if (T) {
              var I = T._isLinkedToArray;
              I && (delete T._isLinkedToArray, A[L] = { items: {} }, A[L].items[I] = T, A[L].role = "object");
            }
          });
        }(b), function(w) {
          (function T(L) {
            for (var A in L)
              if (d(L[A]))
                T(L[A]);
              else if (Array.isArray(L[A]))
                for (var I = 0; I < L[A].length; I++)
                  T(L[A][I]);
              else
                L[A] instanceof RegExp && (L[A] = L[A].toString());
          })(w);
        }(b), b;
      }
      function f(b, w, T) {
        var L = o(b, T), A = t({}, w.layoutAttributes);
        A._isSubplotObj = !0, L.set(A);
      }
      function _(b, w, T) {
        var L = o(b, T);
        L.set(t(L.get() || {}, w));
      }
      $.IS_SUBPLOT_OBJ = "_isSubplotObj", $.IS_LINKED_TO_ARRAY = "_isLinkedToArray", $.DEPRECATED = "_deprecated", $.UNDERSCORE_ATTRS = l, $.get = function() {
        var b = {};
        m.allTypes.forEach(function(T) {
          b[T] = function(L) {
            var A, I;
            A = m.modules[L]._module, I = A.basePlotModule;
            var P = { type: null }, S = t({}, k), E = t({}, A.attributes);
            $.crawl(E, function(j, H, Y, J, W) {
              o(S, W).set(void 0), j === void 0 && o(E, W).set(void 0);
            }), t(P, S), m.traceIs(L, "noOpacity") && delete P.opacity, m.traceIs(L, "showLegend") || (delete P.showlegend, delete P.legendgroup), m.traceIs(L, "noHover") && (delete P.hoverinfo, delete P.hoverlabel), A.selectPoints || delete P.selectedpoints, t(P, E), I.attributes && t(P, I.attributes), P.type = L;
            var R = { meta: A.meta || {}, categories: A.categories || {}, animatable: Boolean(A.animatable), type: L, attributes: y(P) };
            if (A.layoutAttributes) {
              var z = {};
              t(z, A.layoutAttributes), R.layoutAttributes = y(z);
            }
            return A.animatable || $.crawl(R, function(j) {
              $.isValObject(j) && "anim" in j && delete j.anim;
            }), R;
          }(T);
        });
        var w = {};
        return Object.keys(m.transformsRegistry).forEach(function(T) {
          w[T] = function(L) {
            var A = m.transformsRegistry[L], I = t({}, A.attributes);
            return Object.keys(m.componentsRegistry).forEach(function(P) {
              var S = m.componentsRegistry[P];
              S.schema && S.schema.transforms && S.schema.transforms[L] && Object.keys(S.schema.transforms[L]).forEach(function(E) {
                _(I, S.schema.transforms[L][E], E);
              });
            }), { attributes: y(I) };
          }(T);
        }), { defs: { valObjects: h, metaKeys: l.concat(["description", "role", "editType", "impliedEdits"]), editType: { traces: s.traces, layout: s.layout }, impliedEdits: {} }, traces: b, layout: c(), transforms: w, frames: a(), animation: y(r), config: y(n) };
      }, $.crawl = function(b, w, T, L) {
        var A = T || 0;
        L = L || "", Object.keys(b).forEach(function(I) {
          var P = b[I];
          if (l.indexOf(I) === -1) {
            var S = (L ? L + "." : "") + I;
            w(P, I, b, A, S), $.isValObject(P) || d(P) && I !== "impliedEdits" && $.crawl(P, w, A + 1, S);
          }
        });
      }, $.isValObject = function(b) {
        return b && b.valType !== void 0;
      }, $.findArrayAttributes = function(b) {
        var w, T, L = [], A = [], I = [];
        function P(j, H, Y, J) {
          A = A.slice(0, J).concat([H]), I = I.slice(0, J).concat([j && j._isLinkedToArray]), j && (j.valType === "data_array" || j.arrayOk === !0) && !(A[J - 1] === "colorbar" && (H === "ticktext" || H === "tickvals")) && function W(Z, re, V) {
            var B = Z[A[re]], U = V + A[re];
            if (re === A.length - 1)
              u(B) && L.push(T + U);
            else if (I[re]) {
              if (Array.isArray(B))
                for (var ee = 0; ee < B.length; ee++)
                  d(B[ee]) && W(B[ee], re + 1, U + "[" + ee + "].");
            } else
              d(B) && W(B, re + 1, U + ".");
          }(w, 0, "");
        }
        w = b, T = "", $.crawl(k, P), b._module && b._module.attributes && $.crawl(b._module.attributes, P);
        var S = b.transforms;
        if (S)
          for (var E = 0; E < S.length; E++) {
            var R = S[E], z = R._module;
            z && (T = "transforms[" + E + "].", w = R, $.crawl(z.attributes, P));
          }
        return L;
      }, $.getTraceValObject = function(b, w) {
        var T, L, A = w[0], I = 1;
        if (A === "transforms") {
          if (w.length === 1)
            return k.transforms;
          var P = b.transforms;
          if (!Array.isArray(P) || !P.length)
            return !1;
          var S = w[1];
          if (!p(S) || S >= P.length)
            return !1;
          L = (T = (m.transformsRegistry[P[S].type] || {}).attributes) && T[w[2]], I = 3;
        } else {
          var E = b._module;
          if (E || (E = (m.modules[b.type || k.type.dflt] || {})._module), !E)
            return !1;
          if (!(L = (T = E.attributes) && T[A])) {
            var R = E.basePlotModule;
            R && R.attributes && (L = R.attributes[A]);
          }
          L || (L = k[A]);
        }
        return i(L, w, I);
      }, $.getLayoutValObject = function(b, w) {
        return i(function(T, L) {
          var A, I, P, S, E = T._basePlotModules;
          if (E) {
            var R;
            for (A = 0; A < E.length; A++) {
              if ((P = E[A]).attrRegex && P.attrRegex.test(L)) {
                if (P.layoutAttrOverrides)
                  return P.layoutAttrOverrides;
                !R && P.layoutAttributes && (R = P.layoutAttributes);
              }
              var z = P.baseLayoutAttrOverrides;
              if (z && L in z)
                return z[L];
            }
            if (R)
              return R;
          }
          var j = T._modules;
          if (j) {
            for (A = 0; A < j.length; A++)
              if ((S = j[A].layoutAttributes) && L in S)
                return S[L];
          }
          for (I in m.componentsRegistry) {
            if ((P = m.componentsRegistry[I]).name === "colorscale" && L.indexOf("coloraxis") === 0)
              return P.layoutAttributes[L];
            if (!P.schema && L === P.name)
              return P.layoutAttributes;
          }
          return L in x && x[L];
        }(b, w[0]), w, 1);
      };
    }, { "../lib": 515, "../plots/animation_attributes": 560, "../plots/attributes": 562, "../plots/frame_attributes": 595, "../plots/layout_attributes": 619, "../registry": 647, "./edit_types": 548, "./plot_config": 553 }], 555: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plots/attributes"), k = { name: { valType: "string", editType: "none" } };
      function x(r) {
        return r && typeof r == "string";
      }
      function e(r) {
        var n = r.length - 1;
        return r.charAt(n) !== "s" && m.warn("bad argument to arrayDefaultKey: " + r), r.substr(0, r.length - 1) + "defaults";
      }
      k.templateitemname = { valType: "string", editType: "calc" }, $.templatedArray = function(r, n) {
        return n._isLinkedToArray = r, n.name = k.name, n.templateitemname = k.templateitemname, n;
      }, $.traceTemplater = function(r) {
        var n, s, t = {};
        for (n in r)
          s = r[n], Array.isArray(s) && s.length && (t[n] = 0);
        return { newTrace: function(d) {
          var u = { type: n = m.coerce(d, {}, g, "type"), _template: null };
          if (n in t) {
            s = r[n];
            var o = t[n] % s.length;
            t[n]++, u._template = s[o];
          }
          return u;
        } };
      }, $.newContainer = function(r, n, s) {
        var t = r._template, d = t && (t[n] || s && t[s]);
        return m.isPlainObject(d) || (d = null), r[n] = { _template: d };
      }, $.arrayTemplater = function(r, n, s) {
        var t = r._template, d = t && t[e(n)], u = t && t[n];
        Array.isArray(u) && u.length || (u = []);
        var o = {};
        return { newItem: function(h) {
          var l = { name: h.name, _input: h }, i = l.templateitemname = h.templateitemname;
          if (!x(i))
            return l._template = d, l;
          for (var p = 0; p < u.length; p++) {
            var c = u[p];
            if (c.name === i)
              return o[i] = 1, l._template = c, l;
          }
          return l[s] = h[s] || !1, l._template = !1, l;
        }, defaultItems: function() {
          for (var h = [], l = 0; l < u.length; l++) {
            var i = u[l], p = i.name;
            if (x(p) && !o[p]) {
              var c = { _template: i, name: p, _input: { _templateitemname: p } };
              c.templateitemname = i.templateitemname, h.push(c), o[p] = 1;
            }
          }
          return h;
        } };
      }, $.arrayDefaultKey = e, $.arrayEditor = function(r, n, s) {
        var t = (m.nestedProperty(r, n).get() || []).length, d = s._index, u = d >= t && (s._input || {})._templateitemname;
        u && (d = t);
        var o, h = n + "[" + d + "]";
        function l() {
          o = {}, u && (o[h] = {}, o[h].templateitemname = u);
        }
        function i(c, a) {
          u ? m.nestedProperty(o[h], c).set(a) : o[h + "." + c] = a;
        }
        function p() {
          var c = o;
          return l(), c;
        }
        return l(), { modifyBase: function(c, a) {
          o[c] = a;
        }, modifyItem: i, getUpdateObj: p, applyUpdate: function(c, a) {
          c && i(c, a);
          var y = p();
          for (var f in y)
            m.nestedProperty(r, f).set(y[f]);
        } };
      };
    }, { "../lib": 515, "../plots/attributes": 562 }], 556: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../registry"), k = v("../plots/plots"), x = v("../lib"), e = v("../lib/clear_gl_canvases"), r = v("../components/color"), n = v("../components/drawing"), s = v("../components/titles"), t = v("../components/modebar"), d = v("../plots/cartesian/axes"), u = v("../constants/alignment"), o = v("../plots/cartesian/constraints"), h = o.enforce, l = o.clean, i = v("../plots/cartesian/autorange").doAutoRange;
      function p(w, T, L) {
        for (var A = 0; A < L.length; A++) {
          var I = L[A][0], P = L[A][1];
          if (!(I[0] >= w[1] || I[1] <= w[0]) && P[0] < T[1] && P[1] > T[0])
            return !0;
        }
        return !1;
      }
      function c(w) {
        var T, L, A, I, P, S, E = w._fullLayout, R = E._size, z = R.p, j = d.list(w, "", !0);
        if (E._paperdiv.style({ width: w._context.responsive && E.autosize && !w._context._hasZeroWidth && !w.layout.width ? "100%" : E.width + "px", height: w._context.responsive && E.autosize && !w._context._hasZeroHeight && !w.layout.height ? "100%" : E.height + "px" }).selectAll(".main-svg").call(n.setSize, E.width, E.height), w._context.setBackground(w, E.paper_bgcolor), $.drawMainTitle(w), t.manage(w), !E._has("cartesian"))
          return k.previousPromises(w);
        function H(Ge, Qe, ot) {
          var vt = Ge._lw / 2;
          return Ge._id.charAt(0) === "x" ? Qe ? ot === "top" ? Qe._offset - z - vt : Qe._offset + Qe._length + z + vt : R.t + R.h * (1 - (Ge.position || 0)) + vt % 1 : Qe ? ot === "right" ? Qe._offset + Qe._length + z + vt : Qe._offset - z - vt : R.l + R.w * (Ge.position || 0) + vt % 1;
        }
        for (T = 0; T < j.length; T++) {
          var Y = (I = j[T])._anchorAxis;
          I._linepositions = {}, I._lw = n.crispRound(w, I.linewidth, 1), I._mainLinePosition = H(I, Y, I.side), I._mainMirrorPosition = I.mirror && Y ? H(I, Y, u.OPPOSITE_SIDE[I.side]) : null;
        }
        var J = [], W = [], Z = [], re = r.opacity(E.paper_bgcolor) === 1 && r.opacity(E.plot_bgcolor) === 1 && E.paper_bgcolor === E.plot_bgcolor;
        for (L in E._plots)
          if ((A = E._plots[L]).mainplot)
            A.bg && A.bg.remove(), A.bg = void 0;
          else {
            var V = A.xaxis.domain, B = A.yaxis.domain, U = A.plotgroup;
            if (p(V, B, Z)) {
              var ee = U.node(), N = A.bg = x.ensureSingle(U, "rect", "bg");
              ee.insertBefore(N.node(), ee.childNodes[0]), W.push(L);
            } else
              U.select("rect.bg").remove(), Z.push([V, B]), re || (J.push(L), W.push(L));
          }
        var K, X, te, ie, le, oe, ve, ue, ye, Ae, pe, ge, we, se = E._bgLayer.selectAll(".bg").data(J);
        for (se.enter().append("rect").classed("bg", !0), se.exit().remove(), se.each(function(Ge) {
          E._plots[Ge].bg = m.select(this);
        }), T = 0; T < W.length; T++)
          A = E._plots[W[T]], P = A.xaxis, S = A.yaxis, A.bg && P._offset !== void 0 && S._offset !== void 0 && A.bg.call(n.setRect, P._offset - z, S._offset - z, P._length + 2 * z, S._length + 2 * z).call(r.fill, E.plot_bgcolor).style("stroke-width", 0);
        if (!E._hasOnlyLargeSploms)
          for (L in E._plots) {
            A = E._plots[L], P = A.xaxis, S = A.yaxis;
            var de, Te, Ee = A.clipId = "clip" + E._uid + L + "plot", Me = x.ensureSingleById(E._clips, "clipPath", Ee, function(Ge) {
              Ge.classed("plotclip", !0).append("rect");
            });
            A.clipRect = Me.select("rect").attr({ width: P._length, height: S._length }), n.setTranslate(A.plot, P._offset, S._offset), A._hasClipOnAxisFalse ? (de = null, Te = Ee) : (de = Ee, Te = null), n.setClipUrl(A.plot, de, w), A.layerClipId = Te;
          }
        function ze(Ge) {
          return "M" + K + "," + Ge + "H" + X;
        }
        function Ie(Ge) {
          return "M" + P._offset + "," + Ge + "h" + P._length;
        }
        function Oe(Ge) {
          return "M" + Ge + "," + ue + "V" + ve;
        }
        function Ze(Ge) {
          return "M" + Ge + "," + S._offset + "v" + S._length;
        }
        function Fe(Ge, Qe, ot) {
          if (!Ge.showline || L !== Ge._mainSubplot)
            return "";
          if (!Ge._anchorAxis)
            return ot(Ge._mainLinePosition);
          var vt = Qe(Ge._mainLinePosition);
          return Ge.mirror && (vt += Qe(Ge._mainMirrorPosition)), vt;
        }
        for (L in E._plots) {
          A = E._plots[L], P = A.xaxis, S = A.yaxis;
          var Pe = "M0,0";
          a(P, L) && (le = f(P, "left", S, j), K = P._offset - (le ? z + le : 0), oe = f(P, "right", S, j), X = P._offset + P._length + (oe ? z + oe : 0), te = H(P, S, "bottom"), ie = H(P, S, "top"), !(we = !P._anchorAxis || L !== P._mainSubplot) || P.mirror !== "allticks" && P.mirror !== "all" || (P._linepositions[L] = [te, ie]), Pe = Fe(P, ze, Ie), we && P.showline && (P.mirror === "all" || P.mirror === "allticks") && (Pe += ze(te) + ze(ie)), A.xlines.style("stroke-width", P._lw + "px").call(r.stroke, P.showline ? P.linecolor : "rgba(0,0,0,0)")), A.xlines.attr("d", Pe);
          var De = "M0,0";
          a(S, L) && (pe = f(S, "bottom", P, j), ve = S._offset + S._length + (pe ? z : 0), ge = f(S, "top", P, j), ue = S._offset - (ge ? z : 0), ye = H(S, P, "left"), Ae = H(S, P, "right"), !(we = !S._anchorAxis || L !== S._mainSubplot) || S.mirror !== "allticks" && S.mirror !== "all" || (S._linepositions[L] = [ye, Ae]), De = Fe(S, Oe, Ze), we && S.showline && (S.mirror === "all" || S.mirror === "allticks") && (De += Oe(ye) + Oe(Ae)), A.ylines.style("stroke-width", S._lw + "px").call(r.stroke, S.showline ? S.linecolor : "rgba(0,0,0,0)")), A.ylines.attr("d", De);
        }
        return d.makeClipPaths(w), k.previousPromises(w);
      }
      function a(w, T) {
        return (w.ticks || w.showline) && (T === w._mainSubplot || w.mirror === "all" || w.mirror === "allticks");
      }
      function y(w, T, L) {
        if (!L.showline || !L._lw)
          return !1;
        if (L.mirror === "all" || L.mirror === "allticks")
          return !0;
        var A = L._anchorAxis;
        if (!A)
          return !1;
        var I = u.FROM_BL[T];
        return L.side === T ? A.domain[I] === w.domain[I] : L.mirror && A.domain[1 - I] === w.domain[1 - I];
      }
      function f(w, T, L, A) {
        if (y(w, T, L))
          return L._lw;
        for (var I = 0; I < A.length; I++) {
          var P = A[I];
          if (P._mainAxis === L._mainAxis && y(w, T, P))
            return P._lw;
        }
        return 0;
      }
      function _(w, T) {
        var L = w.title, A = w._size, I = 0;
        switch (T === "start" ? I = L.pad.l : T === "end" && (I = -L.pad.r), L.xref) {
          case "paper":
            return A.l + A.w * L.x + I;
          case "container":
          default:
            return w.width * L.x + I;
        }
      }
      function b(w, T) {
        var L = w.title, A = w._size, I = 0;
        if (T !== "0em" && T ? T === u.CAP_SHIFT + "em" && (I = L.pad.t) : I = -L.pad.b, L.y === "auto")
          return A.t / 2;
        switch (L.yref) {
          case "paper":
            return A.t + A.h - A.h * L.y + I;
          case "container":
          default:
            return w.height - w.height * L.y + I;
        }
      }
      $.layoutStyles = function(w) {
        return x.syncOrAsync([k.doAutoMargin, c], w);
      }, $.drawMainTitle = function(w) {
        var T = w._fullLayout, L = function(I) {
          var P = I.title, S = "middle";
          return x.isRightAnchor(P) ? S = "end" : x.isLeftAnchor(P) && (S = "start"), S;
        }(T), A = function(I) {
          var P = I.title, S = "0em";
          return x.isTopAnchor(P) ? S = u.CAP_SHIFT + "em" : x.isMiddleAnchor(P) && (S = u.MID_SHIFT + "em"), S;
        }(T);
        s.draw(w, "gtitle", { propContainer: T, propName: "title.text", placeholder: T._dfltTitle.plot, attributes: { x: _(T, L), y: b(T, A), "text-anchor": L, dy: A } });
      }, $.doTraceStyle = function(w) {
        var T, L = w.calcdata, A = [];
        for (T = 0; T < L.length; T++) {
          var I = L[T], P = I[0] || {}, S = P.trace || {}, E = S._module || {}, R = E.arraysToCalcdata;
          R && R(I, S);
          var z = E.editStyle;
          z && A.push({ fn: z, cd0: P });
        }
        if (A.length) {
          for (T = 0; T < A.length; T++) {
            var j = A[T];
            j.fn(w, j.cd0);
          }
          e(w), $.redrawReglTraces(w);
        }
        return k.style(w), g.getComponentMethod("legend", "draw")(w), k.previousPromises(w);
      }, $.doColorBars = function(w) {
        return g.getComponentMethod("colorbar", "draw")(w), k.previousPromises(w);
      }, $.layoutReplot = function(w) {
        var T = w.layout;
        return w.layout = void 0, g.call("_doPlot", w, "", T);
      }, $.doLegend = function(w) {
        return g.getComponentMethod("legend", "draw")(w), k.previousPromises(w);
      }, $.doTicksRelayout = function(w) {
        return d.draw(w, "redraw"), w._fullLayout._hasOnlyLargeSploms && (g.subplotsRegistry.splom.updateGrid(w), e(w), $.redrawReglTraces(w)), $.drawMainTitle(w), k.previousPromises(w);
      }, $.doModeBar = function(w) {
        var T = w._fullLayout;
        t.manage(w);
        for (var L = 0; L < T._basePlotModules.length; L++) {
          var A = T._basePlotModules[L].updateFx;
          A && A(w);
        }
        return k.previousPromises(w);
      }, $.doCamera = function(w) {
        for (var T = w._fullLayout, L = T._subplots.gl3d, A = 0; A < L.length; A++) {
          var I = T[L[A]];
          I._scene.setViewport(I);
        }
      }, $.drawData = function(w) {
        var T = w._fullLayout;
        e(w);
        for (var L = T._basePlotModules, A = 0; A < L.length; A++)
          L[A].plot(w);
        return $.redrawReglTraces(w), k.style(w), g.getComponentMethod("selections", "draw")(w), g.getComponentMethod("shapes", "draw")(w), g.getComponentMethod("annotations", "draw")(w), g.getComponentMethod("images", "draw")(w), T._replotting = !1, k.previousPromises(w);
      }, $.redrawReglTraces = function(w) {
        var T = w._fullLayout;
        if (T._has("regl")) {
          var L, A, I = w._fullData, P = [], S = [];
          for (T._hasOnlyLargeSploms && T._splomGrid.draw(), L = 0; L < I.length; L++) {
            var E = I[L];
            E.visible === !0 && E._length !== 0 && (E.type === "splom" ? T._splomScenes[E.uid].draw() : E.type === "scattergl" ? x.pushUnique(P, E.xaxis + E.yaxis) : E.type === "scatterpolargl" && x.pushUnique(S, E.subplot));
          }
          for (L = 0; L < P.length; L++)
            (A = T._plots[P[L]])._scene && A._scene.draw();
          for (L = 0; L < S.length; L++)
            (A = T[S[L]]._subplot)._scene && A._scene.draw();
        }
      }, $.doAutoRangeAndConstraints = function(w) {
        for (var T, L = d.list(w, "", !0), A = {}, I = 0; I < L.length; I++)
          if (!A[(T = L[I])._id]) {
            A[T._id] = 1, l(w, T), i(w, T);
            var P = T._matchGroup;
            if (P)
              for (var S in P) {
                var E = d.getFromId(w, S);
                i(w, E, T.range), A[S] = 1;
              }
          }
        h(w);
      }, $.finalDraw = function(w) {
        g.getComponentMethod("rangeslider", "draw")(w), g.getComponentMethod("rangeselector", "draw")(w);
      }, $.drawMarginPushers = function(w) {
        g.getComponentMethod("legend", "draw")(w), g.getComponentMethod("rangeselector", "draw")(w), g.getComponentMethod("sliders", "draw")(w), g.getComponentMethod("updatemenus", "draw")(w), g.getComponentMethod("colorbar", "draw")(w);
      };
    }, { "../components/color": 367, "../components/drawing": 389, "../components/modebar": 430, "../components/titles": 476, "../constants/alignment": 483, "../lib": 515, "../lib/clear_gl_canvases": 499, "../plots/cartesian/autorange": 565, "../plots/cartesian/axes": 566, "../plots/cartesian/constraints": 574, "../plots/plots": 628, "../registry": 647, "@plotly/d3": 58 }], 557: [function(v, Q, $) {
      var m = v("../lib"), g = m.isPlainObject, k = v("./plot_schema"), x = v("../plots/plots"), e = v("../plots/attributes"), r = v("./plot_template"), n = v("./plot_config").dfltConfig;
      function s(p, c) {
        p = m.extendDeep({}, p);
        var a, y, f = Object.keys(p).sort();
        function _(A, I, P) {
          if (g(I) && g(A))
            s(A, I);
          else if (Array.isArray(I) && Array.isArray(A)) {
            var S = r.arrayTemplater({ _template: p }, P);
            for (y = 0; y < I.length; y++) {
              var E = I[y], R = S.newItem(E)._template;
              R && s(R, E);
            }
            var z = S.defaultItems();
            for (y = 0; y < z.length; y++)
              I.push(z[y]._template);
            for (y = 0; y < I.length; y++)
              delete I[y].templateitemname;
          }
        }
        for (a = 0; a < f.length; a++) {
          var b = f[a], w = p[b];
          if (b in c ? _(w, c[b], b) : c[b] = w, t(b) === b)
            for (var T in c) {
              var L = t(T);
              T === L || L !== b || T in p || _(w, c[T], b);
            }
        }
      }
      function t(p) {
        return p.replace(/[0-9]+$/, "");
      }
      function d(p, c, a, y, f) {
        var _ = f && a(f);
        for (var b in p) {
          var w = p[b], T = h(p, b, y), L = h(p, b, f), A = a(L);
          if (!A) {
            var I = t(b);
            I !== b && (A = a(L = h(p, I, f)));
          }
          if ((!_ || _ !== A) && !(!A || A._noTemplating || A.valType === "data_array" || A.arrayOk && Array.isArray(w)))
            if (!A.valType && g(w))
              d(w, c, a, T, L);
            else if (A._isLinkedToArray && Array.isArray(w))
              for (var P = !1, S = 0, E = {}, R = 0; R < w.length; R++) {
                var z = w[R];
                if (g(z)) {
                  var j = z.name;
                  if (j)
                    E[j] || (d(z, c, a, h(w, S, T), h(w, S, L)), S++, E[j] = 1);
                  else if (!P) {
                    var H = h(p, r.arrayDefaultKey(b), y), Y = h(w, S, T);
                    d(z, c, a, Y, h(w, S, L));
                    var J = m.nestedProperty(c, Y);
                    m.nestedProperty(c, H).set(J.get()), J.set(null), P = !0;
                  }
                }
              }
            else
              m.nestedProperty(c, T).set(w);
        }
      }
      function u(p, c) {
        return k.getLayoutValObject(p, m.nestedProperty({}, c).parts);
      }
      function o(p, c) {
        return k.getTraceValObject(p, m.nestedProperty({}, c).parts);
      }
      function h(p, c, a) {
        return a ? Array.isArray(p) ? a + "[" + c + "]" : a + "." + c : c;
      }
      function l(p) {
        for (var c = 0; c < p.length; c++)
          if (g(p[c]))
            return !0;
      }
      function i(p) {
        var c;
        switch (p.code) {
          case "data":
            c = "The template has no key data.";
            break;
          case "layout":
            c = "The template has no key layout.";
            break;
          case "missing":
            c = p.path ? "There are no templates for item " + p.path + " with name " + p.templateitemname : "There are no templates for trace " + p.index + ", of type " + p.traceType + ".";
            break;
          case "unused":
            c = p.path ? "The template item at " + p.path + " was not used in constructing the plot." : p.dataCount ? "Some of the templates of type " + p.traceType + " were not used. The template has " + p.templateCount + " traces, the data only has " + p.dataCount + " of this type." : "The template has " + p.templateCount + " traces of type " + p.traceType + " but there are none in the data.";
            break;
          case "reused":
            c = "Some of the templates of type " + p.traceType + " were used more than once. The template has " + p.templateCount + " traces, the data has " + p.dataCount + " of this type.";
        }
        return p.msg = c, p;
      }
      $.makeTemplate = function(p) {
        p = m.isPlainObject(p) ? p : m.getGraphDiv(p), p = m.extendDeep({ _context: n }, { data: p.data, layout: p.layout }), x.supplyDefaults(p);
        var c = p.data || [], a = p.layout || {};
        a._basePlotModules = p._fullLayout._basePlotModules, a._modules = p._fullLayout._modules;
        var y = { data: {}, layout: {} };
        c.forEach(function(S) {
          var E = {};
          d(S, E, o.bind(null, S));
          var R = m.coerce(S, {}, e, "type"), z = y.data[R];
          z || (z = y.data[R] = []), z.push(E);
        }), d(a, y.layout, u.bind(null, a)), delete y.layout.template;
        var f = a.template;
        if (g(f)) {
          var _, b, w, T, L, A, I = f.layout;
          g(I) && s(I, y.layout);
          var P = f.data;
          if (g(P)) {
            for (b in y.data)
              if (w = P[b], Array.isArray(w)) {
                for (A = (L = y.data[b]).length, T = w.length, _ = 0; _ < A; _++)
                  s(w[_ % T], L[_]);
                for (_ = A; _ < T; _++)
                  L.push(m.extendDeep({}, w[_]));
              }
            for (b in P)
              b in y.data || (y.data[b] = m.extendDeep([], P[b]));
          }
        }
        return y;
      }, $.validateTemplate = function(p, c) {
        var a = m.extendDeep({}, { _context: n, data: p.data, layout: p.layout }), y = a.layout || {};
        g(c) || (c = y.template || {});
        var f = c.layout, _ = c.data, b = [];
        a.layout = y, a.layout.template = c, x.supplyDefaults(a);
        var w = a._fullLayout, T = a._fullData, L = {};
        if (g(f) ? (function z(j, H) {
          for (var Y in j)
            if (Y.charAt(0) !== "_" && g(j[Y])) {
              var J, W = t(Y), Z = [];
              for (J = 0; J < H.length; J++)
                Z.push(h(j, Y, H[J])), W !== Y && Z.push(h(j, W, H[J]));
              for (J = 0; J < Z.length; J++)
                L[Z[J]] = 1;
              z(j[Y], Z);
            }
        }(w, ["layout"]), function z(j, H) {
          for (var Y in j)
            if (Y.indexOf("defaults") === -1 && g(j[Y])) {
              var J = h(j, Y, H);
              L[J] ? z(j[Y], J) : b.push({ code: "unused", path: J });
            }
        }(f, "layout")) : b.push({ code: "layout" }), g(_)) {
          for (var A, I = {}, P = 0; P < T.length; P++) {
            var S = T[P];
            I[A = S.type] = (I[A] || 0) + 1, S._fullInput._template || b.push({ code: "missing", index: S._fullInput.index, traceType: A });
          }
          for (A in _) {
            var E = _[A].length, R = I[A] || 0;
            E > R ? b.push({ code: "unused", traceType: A, templateCount: E, dataCount: R }) : R > E && b.push({ code: "reused", traceType: A, templateCount: E, dataCount: R });
          }
        } else
          b.push({ code: "data" });
        if (function z(j, H) {
          for (var Y in j)
            if (Y.charAt(0) !== "_") {
              var J = j[Y], W = h(j, Y, H);
              g(J) ? (Array.isArray(j) && J._template === !1 && J.templateitemname && b.push({ code: "missing", path: W, templateitemname: J.templateitemname }), z(J, W)) : Array.isArray(J) && l(J) && z(J, W);
            }
        }({ data: T, layout: w }, ""), b.length)
          return b.map(i);
      };
    }, { "../lib": 515, "../plots/attributes": 562, "../plots/plots": 628, "./plot_config": 553, "./plot_schema": 554, "./plot_template": 555 }], 558: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("./plot_api"), k = v("../plots/plots"), x = v("../lib"), e = v("../snapshot/helpers"), r = v("../snapshot/tosvg"), n = v("../snapshot/svgtoimg"), s = v("../version").version, t = { format: { valType: "enumerated", values: ["png", "jpeg", "webp", "svg", "full-json"], dflt: "png" }, width: { valType: "number", min: 1 }, height: { valType: "number", min: 1 }, scale: { valType: "number", min: 0, dflt: 1 }, setBackground: { valType: "any", dflt: !1 }, imageDataOnly: { valType: "boolean", dflt: !1 } };
      Q.exports = function(d, u) {
        var o, h, l, i;
        function p(R) {
          return !(R in u) || x.validate(u[R], t[R]);
        }
        if (u = u || {}, x.isPlainObject(d) ? (o = d.data || [], h = d.layout || {}, l = d.config || {}, i = {}) : (d = x.getGraphDiv(d), o = x.extendDeep([], d.data), h = x.extendDeep({}, d.layout), l = d._context, i = d._fullLayout || {}), !p("width") && u.width !== null || !p("height") && u.height !== null)
          throw new Error("Height and width should be pixel values.");
        if (!p("format"))
          throw new Error("Export format is not " + x.join2(t.format.values, ", ", " or ") + ".");
        var c = {};
        function a(R, z) {
          return x.coerce(u, c, t, R, z);
        }
        var y = a("format"), f = a("width"), _ = a("height"), b = a("scale"), w = a("setBackground"), T = a("imageDataOnly"), L = document.createElement("div");
        L.style.position = "absolute", L.style.left = "-5000px", document.body.appendChild(L);
        var A = x.extendFlat({}, h);
        f ? A.width = f : u.width === null && m(i.width) && (A.width = i.width), _ ? A.height = _ : u.height === null && m(i.height) && (A.height = i.height);
        var I = x.extendFlat({}, l, { _exportedPlot: !0, staticPlot: !0, setBackground: w }), P = e.getRedrawFunc(L);
        function S() {
          return new Promise(function(R) {
            setTimeout(R, e.getDelay(L._fullLayout));
          });
        }
        function E() {
          return new Promise(function(R, z) {
            var j = r(L, y, b), H = L._fullLayout.width, Y = L._fullLayout.height;
            function J() {
              g.purge(L), document.body.removeChild(L);
            }
            if (y === "full-json") {
              var W = k.graphJson(L, !1, "keepdata", "object", !0, !0);
              return W.version = s, W = JSON.stringify(W), J(), R(T ? W : e.encodeJSON(W));
            }
            if (J(), y === "svg")
              return R(T ? j : e.encodeSVG(j));
            var Z = document.createElement("canvas");
            Z.id = x.randstr(), n({ format: y, width: H, height: Y, scale: b, canvas: Z, svg: j, promise: !0 }).then(R).catch(z);
          });
        }
        return new Promise(function(R, z) {
          g.newPlot(L, o, A, I).then(P).then(S).then(E).then(function(j) {
            R(function(H) {
              return T ? H.replace(e.IMAGE_URL_PREFIX, "") : H;
            }(j));
          }).catch(function(j) {
            z(j);
          });
        });
      };
    }, { "../lib": 515, "../plots/plots": 628, "../snapshot/helpers": 651, "../snapshot/svgtoimg": 653, "../snapshot/tosvg": 655, "../version": 1132, "./plot_api": 552, "fast-isnumeric": 190 }], 559: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plots/plots"), k = v("./plot_schema"), x = v("./plot_config").dfltConfig, e = m.isPlainObject, r = Array.isArray, n = m.isArrayOrTypedArray;
      function s(c, a, y, f, _, b) {
        b = b || [];
        for (var w = Object.keys(c), T = 0; T < w.length; T++) {
          var L = w[T];
          if (L !== "transforms") {
            var A = b.slice();
            A.push(L);
            var I = c[L], P = a[L], S = l(y, L), E = (S || {}).valType, R = E === "info_array", z = E === "colorscale", j = (S || {}).items;
            if (h(y, L))
              if (e(I) && e(P) && E !== "any")
                s(I, P, S, f, _, A);
              else if (R && r(I)) {
                I.length > P.length && f.push(o("unused", _, A.concat(P.length)));
                var H, Y, J, W, Z, re = P.length, V = Array.isArray(j);
                if (V && (re = Math.min(re, j.length)), S.dimensions === 2)
                  for (Y = 0; Y < re; Y++)
                    if (r(I[Y])) {
                      I[Y].length > P[Y].length && f.push(o("unused", _, A.concat(Y, P[Y].length)));
                      var B = P[Y].length;
                      for (H = 0; H < (V ? Math.min(B, j[Y].length) : B); H++)
                        J = V ? j[Y][H] : j, W = I[Y][H], Z = P[Y][H], m.validate(W, J) ? Z !== W && Z !== +W && f.push(o("dynamic", _, A.concat(Y, H), W, Z)) : f.push(o("value", _, A.concat(Y, H), W));
                    } else
                      f.push(o("array", _, A.concat(Y), I[Y]));
                else
                  for (Y = 0; Y < re; Y++)
                    J = V ? j[Y] : j, W = I[Y], Z = P[Y], m.validate(W, J) ? Z !== W && Z !== +W && f.push(o("dynamic", _, A.concat(Y), W, Z)) : f.push(o("value", _, A.concat(Y), W));
              } else if (S.items && !R && r(I)) {
                var U, ee, N = j[Object.keys(j)[0]], K = [];
                for (U = 0; U < P.length; U++) {
                  var X = P[U]._index || U;
                  if ((ee = A.slice()).push(X), e(I[X]) && e(P[U])) {
                    K.push(X);
                    var te = I[X], ie = P[U];
                    e(te) && te.visible !== !1 && ie.visible === !1 ? f.push(o("invisible", _, ee)) : s(te, ie, N, f, _, ee);
                  }
                }
                for (U = 0; U < I.length; U++)
                  (ee = A.slice()).push(U), e(I[U]) ? K.indexOf(U) === -1 && f.push(o("unused", _, ee)) : f.push(o("object", _, ee, I[U]));
              } else
                !e(I) && e(P) ? f.push(o("object", _, A, I)) : n(I) || !n(P) || R || z ? L in a ? m.validate(I, S) ? S.valType === "enumerated" && (S.coerceNumber && I !== +P || I !== P) && f.push(o("dynamic", _, A, I, P)) : f.push(o("value", _, A, I)) : f.push(o("unused", _, A, I)) : f.push(o("array", _, A, I));
            else
              f.push(o("schema", _, A));
          }
        }
        return f;
      }
      function t(c, a) {
        for (var y = c.layout.layoutAttributes, f = 0; f < a.length; f++) {
          var _ = a[f], b = c.traces[_.type], w = b.layoutAttributes;
          w && (_.subplot ? m.extendFlat(y[b.attributes.subplot.dflt], w) : m.extendFlat(y, w));
        }
        return y;
      }
      Q.exports = function(c, a) {
        c === void 0 && (c = []), a === void 0 && (a = {});
        var y, f, _ = k.get(), b = [], w = { _context: m.extendFlat({}, x) };
        r(c) ? (w.data = m.extendDeep([], c), y = c) : (w.data = [], y = [], b.push(o("array", "data"))), e(a) ? (w.layout = m.extendDeep({}, a), f = a) : (w.layout = {}, f = {}, arguments.length > 1 && b.push(o("object", "layout"))), g.supplyDefaults(w);
        for (var T = w._fullData, L = y.length, A = 0; A < L; A++) {
          var I = y[A], P = ["data", A];
          if (e(I)) {
            var S = T[A], E = S.type, R = _.traces[E].attributes;
            R.type = { valType: "enumerated", values: [E] }, S.visible === !1 && I.visible !== !1 && b.push(o("invisible", P)), s(I, S, R, b, P);
            var z = I.transforms, j = S.transforms;
            if (z) {
              r(z) || b.push(o("array", P, ["transforms"])), P.push("transforms");
              for (var H = 0; H < z.length; H++) {
                var Y = ["transforms", H], J = z[H].type;
                if (e(z[H])) {
                  var W = _.transforms[J] ? _.transforms[J].attributes : {};
                  W.type = { valType: "enumerated", values: Object.keys(_.transforms) }, s(z[H], j[H], W, b, P, Y);
                } else
                  b.push(o("object", P, Y));
              }
            }
          } else
            b.push(o("object", P));
        }
        var Z = w._fullLayout, re = t(_, T);
        return s(f, Z, re, b, "layout"), b.length === 0 ? void 0 : b;
      };
      var d = { object: function(c, a) {
        return (c === "layout" && a === "" ? "The layout argument" : c[0] === "data" && a === "" ? "Trace " + c[1] + " in the data argument" : u(c) + "key " + a) + " must be linked to an object container";
      }, array: function(c, a) {
        return (c === "data" ? "The data argument" : u(c) + "key " + a) + " must be linked to an array container";
      }, schema: function(c, a) {
        return u(c) + "key " + a + " is not part of the schema";
      }, unused: function(c, a, y) {
        var f = e(y) ? "container" : "key";
        return u(c) + f + " " + a + " did not get coerced";
      }, dynamic: function(c, a, y, f) {
        return [u(c) + "key", a, "(set to '" + y + "')", "got reset to", "'" + f + "'", "during defaults."].join(" ");
      }, invisible: function(c, a) {
        return (a ? u(c) + "item " + a : "Trace " + c[1]) + " got defaulted to be not visible";
      }, value: function(c, a, y) {
        return [u(c) + "key " + a, "is set to an invalid value (" + y + ")"].join(" ");
      } };
      function u(c) {
        return r(c) ? "In data trace " + c[1] + ", " : "In " + c + ", ";
      }
      function o(c, a, y, f, _) {
        var b, w;
        y = y || "", r(a) ? (b = a[0], w = a[1]) : (b = a, w = null);
        var T = function(A) {
          if (!r(A))
            return String(A);
          for (var I = "", P = 0; P < A.length; P++) {
            var S = A[P];
            typeof S == "number" ? I = I.substr(0, I.length - 1) + "[" + S + "]" : I += S, P < A.length - 1 && (I += ".");
          }
          return I;
        }(y), L = d[c](a, T, f, _);
        return m.log(L), { code: c, container: b, trace: w, path: y, astr: T, msg: L };
      }
      function h(c, a) {
        var y = p(a), f = y.keyMinusId, _ = y.id;
        return !!(f in c && c[f]._isSubplotObj && _) || a in c;
      }
      function l(c, a) {
        return a in c ? c[a] : c[p(a).keyMinusId];
      }
      var i = m.counterRegex("([a-z]+)");
      function p(c) {
        var a = c.match(i);
        return { keyMinusId: a && a[1], id: a && a[2] };
      }
    }, { "../lib": 515, "../plots/plots": 628, "./plot_config": 553, "./plot_schema": 554 }], 560: [function(v, Q, $) {
      Q.exports = { mode: { valType: "enumerated", dflt: "afterall", values: ["immediate", "next", "afterall"] }, direction: { valType: "enumerated", values: ["forward", "reverse"], dflt: "forward" }, fromcurrent: { valType: "boolean", dflt: !1 }, frame: { duration: { valType: "number", min: 0, dflt: 500 }, redraw: { valType: "boolean", dflt: !0 } }, transition: { duration: { valType: "number", min: 0, dflt: 500, editType: "none" }, easing: { valType: "enumerated", dflt: "cubic-in-out", values: ["linear", "quad", "cubic", "sin", "exp", "circle", "elastic", "back", "bounce", "linear-in", "quad-in", "cubic-in", "sin-in", "exp-in", "circle-in", "elastic-in", "back-in", "bounce-in", "linear-out", "quad-out", "cubic-out", "sin-out", "exp-out", "circle-out", "elastic-out", "back-out", "bounce-out", "linear-in-out", "quad-in-out", "cubic-in-out", "sin-in-out", "exp-in-out", "circle-in-out", "elastic-in-out", "back-in-out", "bounce-in-out"], editType: "none" }, ordering: { valType: "enumerated", values: ["layout first", "traces first"], dflt: "layout first", editType: "none" } } };
    }, {}], 561: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plot_api/plot_template");
      Q.exports = function(k, x, e) {
        var r, n, s = e.name, t = e.inclusionAttr || "visible", d = x[s], u = m.isArrayOrTypedArray(k[s]) ? k[s] : [], o = x[s] = [], h = g.arrayTemplater(x, s, t);
        for (r = 0; r < u.length; r++) {
          var l = u[r];
          m.isPlainObject(l) ? n = h.newItem(l) : (n = h.newItem({}))[t] = !1, n._index = r, n[t] !== !1 && e.handleItemDefaults(l, n, x, e), o.push(n);
        }
        var i = h.defaultItems();
        for (r = 0; r < i.length; r++)
          (n = i[r])._index = o.length, e.handleItemDefaults({}, n, x, e, {}), o.push(n);
        if (m.isArrayOrTypedArray(d)) {
          var p = Math.min(d.length, o.length);
          for (r = 0; r < p; r++)
            m.relinkPrivateKeys(o[r], d[r]);
        }
        return o;
      };
    }, { "../lib": 515, "../plot_api/plot_template": 555 }], 562: [function(v, Q, $) {
      var m = v("./font_attributes"), g = v("../components/fx/attributes");
      Q.exports = { type: { valType: "enumerated", values: [], dflt: "scatter", editType: "calc+clearAxisTypes", _noTemplating: !0 }, visible: { valType: "enumerated", values: [!0, !1, "legendonly"], dflt: !0, editType: "calc" }, showlegend: { valType: "boolean", dflt: !0, editType: "style" }, legendgroup: { valType: "string", dflt: "", editType: "style" }, legendgrouptitle: { text: { valType: "string", dflt: "", editType: "style" }, font: m({ editType: "style" }), editType: "style" }, legendrank: { valType: "number", dflt: 1e3, editType: "style" }, legendwidth: { valType: "number", min: 0, editType: "style" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "style" }, name: { valType: "string", editType: "style" }, uid: { valType: "string", editType: "plot", anim: !0 }, ids: { valType: "data_array", editType: "calc", anim: !0 }, customdata: { valType: "data_array", editType: "calc" }, meta: { valType: "any", arrayOk: !0, editType: "plot" }, selectedpoints: { valType: "any", editType: "calc" }, hoverinfo: { valType: "flaglist", flags: ["x", "y", "z", "text", "name"], extras: ["all", "none", "skip"], arrayOk: !0, dflt: "all", editType: "none" }, hoverlabel: g.hoverlabel, stream: { token: { valType: "string", noBlank: !0, strict: !0, editType: "calc" }, maxpoints: { valType: "number", min: 0, max: 1e4, dflt: 500, editType: "calc" }, editType: "calc" }, transforms: { _isLinkedToArray: "transform", editType: "calc" }, uirevision: { valType: "any", editType: "none" } };
    }, { "../components/fx/attributes": 398, "./font_attributes": 594 }], 563: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = g.dateTime2ms, x = g.incrementMonth, e = v("../../constants/numerical").ONEAVGMONTH;
      Q.exports = function(r, n, s, t) {
        if (n.type !== "date")
          return { vals: t };
        var d = r[s + "periodalignment"];
        if (!d)
          return { vals: t };
        var u, o = r[s + "period"];
        if (m(o)) {
          if ((o = +o) <= 0)
            return { vals: t };
        } else if (typeof o == "string" && o.charAt(0) === "M") {
          var h = +o.substring(1);
          if (!(h > 0 && Math.round(h) === h))
            return { vals: t };
          u = h;
        }
        for (var l = n.calendar, i = d === "start", p = d === "end", c = r[s + "period0"], a = k(c, l) || 0, y = [], f = [], _ = [], b = t.length, w = 0; w < b; w++) {
          var T, L, A, I = t[w];
          if (u) {
            for (T = Math.round((I - a) / (u * e)), A = x(a, u * T, l); A > I; )
              A = x(A, -u, l);
            for (; A <= I; )
              A = x(A, u, l);
            L = x(A, -u, l);
          } else {
            for (A = a + (T = Math.round((I - a) / o)) * o; A > I; )
              A -= o;
            for (; A <= I; )
              A += o;
            L = A - o;
          }
          y[w] = i ? L : p ? A : (L + A) / 2, f[w] = L, _[w] = A;
        }
        return { vals: y, starts: f, ends: _ };
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "fast-isnumeric": 190 }], 564: [function(v, Q, $) {
      Q.exports = { xaxis: { valType: "subplotid", dflt: "x", editType: "calc+clearAxisTypes" }, yaxis: { valType: "subplotid", dflt: "y", editType: "calc+clearAxisTypes" } };
    }, {}], 565: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../../lib"), x = v("../../constants/numerical").FP_SAFE, e = v("../../registry"), r = v("../../components/drawing"), n = v("./axis_ids"), s = n.getFromId, t = n.isLinked;
      function d(f, _) {
        var b, w, T = [], L = f._fullLayout, A = o(L, _, 0), I = o(L, _, 1), P = h(f, _), S = P.min, E = P.max;
        if (S.length === 0 || E.length === 0)
          return k.simpleMap(_.range, _.r2l);
        var R = S[0].val, z = E[0].val;
        for (b = 1; b < S.length && R === z; b++)
          R = Math.min(R, S[b].val);
        for (b = 1; b < E.length && R === z; b++)
          z = Math.max(z, E[b].val);
        var j = !1;
        if (_.range) {
          var H = k.simpleMap(_.range, _.r2l);
          j = H[1] < H[0];
        }
        _.autorange === "reversed" && (j = !0, _.autorange = !0);
        var Y, J, W, Z, re, V, B = _.rangemode, U = B === "tozero", ee = B === "nonnegative", N = _._length, K = N / 10, X = 0;
        for (b = 0; b < S.length; b++)
          for (Y = S[b], w = 0; w < E.length; w++)
            (V = (J = E[w]).val - Y.val - u(_, Y.val, J.val)) > 0 && ((re = N - A(Y) - I(J)) > K ? V / re > X && (W = Y, Z = J, X = V / re) : V / N > X && (W = { val: Y.val, nopad: 1 }, Z = { val: J.val, nopad: 1 }, X = V / N));
        if (R === z) {
          var te = R - 1, ie = R + 1;
          if (U)
            if (R === 0)
              T = [0, 1];
            else {
              var le = (R > 0 ? E : S).reduce(function(ve, ue) {
                return Math.max(ve, I(ue));
              }, 0), oe = R / (1 - Math.min(0.5, le / N));
              T = R > 0 ? [0, oe] : [oe, 0];
            }
          else
            T = ee ? [Math.max(0, te), Math.max(1, ie)] : [te, ie];
        } else
          U ? (W.val >= 0 && (W = { val: 0, nopad: 1 }), Z.val <= 0 && (Z = { val: 0, nopad: 1 })) : ee && (W.val - X * A(W) < 0 && (W = { val: 0, nopad: 1 }), Z.val <= 0 && (Z = { val: 1, nopad: 1 })), X = (Z.val - W.val - u(_, Y.val, J.val)) / (N - A(W) - I(Z)), T = [W.val - X * A(W), Z.val + X * I(Z)];
        return j && T.reverse(), k.simpleMap(T, _.l2r || Number);
      }
      function u(f, _, b) {
        var w = 0;
        if (f.rangebreaks)
          for (var T = f.locateBreaks(_, b), L = 0; L < T.length; L++) {
            var A = T[L];
            w += A.max - A.min;
          }
        return w;
      }
      function o(f, _, b) {
        var w = 0.05 * _._length, T = _._anchorAxis || {};
        if ((_.ticklabelposition || "").indexOf("inside") !== -1 || (T.ticklabelposition || "").indexOf("inside") !== -1) {
          var L = _.autorange === "reversed";
          if (!L) {
            var A = k.simpleMap(_.range, _.r2l);
            L = A[1] < A[0];
          }
          L && (b = !b);
        }
        var I = 0;
        return t(f, _._id) || (I = function(P, S, E) {
          var R = 0, z = S._id.charAt(0) === "x";
          for (var j in P._plots) {
            var H = P._plots[j];
            if (S._id === H.xaxis._id || S._id === H.yaxis._id) {
              var Y = (z ? H.yaxis : H.xaxis) || {};
              if ((Y.ticklabelposition || "").indexOf("inside") !== -1 && (!E && (Y.side === "left" || Y.side === "bottom") || E && (Y.side === "top" || Y.side === "right"))) {
                if (Y._vals) {
                  var J = k.deg2rad(Y._tickAngles[Y._id + "tick"] || 0), W = Math.abs(Math.cos(J)), Z = Math.abs(Math.sin(J));
                  if (!Y._vals[0].bb) {
                    var re = Y._id + "tick";
                    Y._selections[re].each(function(N) {
                      var K = m.select(this);
                      K.select(".text-math-group").empty() && (N.bb = r.bBox(K.node()));
                    });
                  }
                  for (var V = 0; V < Y._vals.length; V++) {
                    var B = Y._vals[V].bb;
                    if (B) {
                      var U = 6 + B.width, ee = 6 + B.height;
                      R = Math.max(R, z ? Math.max(U * W, ee * Z) : Math.max(ee * W, U * Z));
                    }
                  }
                }
                Y.ticks === "inside" && Y.ticklabelposition === "inside" && (R += Y.ticklen || 0);
              }
            }
          }
          return R;
        }(f, _, b)), w = Math.max(I, w), _.constrain === "domain" && _._inputDomain && (w *= (_._inputDomain[1] - _._inputDomain[0]) / (_.domain[1] - _.domain[0])), function(P) {
          return P.nopad ? 0 : P.pad + (P.extrapad ? w : I);
        };
      }
      Q.exports = { getAutoRange: d, makePadFn: o, doAutoRange: function(f, _, b) {
        if (_.setScale(), _.autorange) {
          _.range = b ? b.slice() : d(f, _), _._r = _.range.slice(), _._rl = k.simpleMap(_._r, _.r2l);
          var w = _._input, T = {};
          T[_._attr + ".range"] = _.range, T[_._attr + ".autorange"] = _.autorange, e.call("_storeDirectGUIEdit", f.layout, f._fullLayout._preGUI, T), w.range = _.range.slice(), w.autorange = _.autorange;
        }
        var L = _._anchorAxis;
        if (L && L.rangeslider) {
          var A = L.rangeslider[_._name];
          A && A.rangemode === "auto" && (A.range = d(f, _)), L._input.rangeslider[_._name] = k.extendFlat({}, A);
        }
      }, findExtremes: function(f, _, b) {
        b || (b = {}), f._m || f.setScale();
        var w, T, L, A, I, P, S, E, R, z = [], j = [], H = _.length, Y = b.padded || !1, J = b.tozero && (f.type === "linear" || f.type === "-"), W = f.type === "log", Z = !1, re = b.vpadLinearized || !1;
        function V(ie) {
          if (Array.isArray(ie))
            return Z = !0, function(oe) {
              return Math.max(Number(ie[oe] || 0), 0);
            };
          var le = Math.max(Number(ie || 0), 0);
          return function() {
            return le;
          };
        }
        var B = V((f._m > 0 ? b.ppadplus : b.ppadminus) || b.ppad || 0), U = V((f._m > 0 ? b.ppadminus : b.ppadplus) || b.ppad || 0), ee = V(b.vpadplus || b.vpad), N = V(b.vpadminus || b.vpad);
        if (!Z) {
          if (E = 1 / 0, R = -1 / 0, W)
            for (w = 0; w < H; w++)
              (T = _[w]) < E && T > 0 && (E = T), T > R && T < x && (R = T);
          else
            for (w = 0; w < H; w++)
              (T = _[w]) < E && T > -x && (E = T), T > R && T < x && (R = T);
          _ = [E, R], H = 2;
        }
        var K = { tozero: J, extrapad: Y };
        function X(ie) {
          L = _[ie], g(L) && (P = B(ie), S = U(ie), re ? (A = f.c2l(L) - N(ie), I = f.c2l(L) + ee(ie)) : (E = L - N(ie), R = L + ee(ie), W && E < R / 10 && (E = R / 10), A = f.c2l(E), I = f.c2l(R)), J && (A = Math.min(0, A), I = Math.max(0, I)), c(A) && l(z, A, S, K), c(I) && i(j, I, P, K));
        }
        var te = Math.min(6, H);
        for (w = 0; w < te; w++)
          X(w);
        for (w = H - 1; w >= te; w--)
          X(w);
        return { min: z, max: j, opts: b };
      }, concatExtremes: h };
      function h(f, _, b) {
        var w, T, L, A = _._id, I = f._fullData, P = f._fullLayout, S = [], E = [];
        function R(J, W) {
          for (w = 0; w < W.length; w++) {
            var Z = J[W[w]], re = (Z._extremes || {})[A];
            if (Z.visible === !0 && re) {
              for (T = 0; T < re.min.length; T++)
                L = re.min[T], l(S, L.val, L.pad, { extrapad: L.extrapad });
              for (T = 0; T < re.max.length; T++)
                L = re.max[T], i(E, L.val, L.pad, { extrapad: L.extrapad });
            }
          }
        }
        if (R(I, _._traceIndices), R(P.annotations || [], _._annIndices || []), R(P.shapes || [], _._shapeIndices || []), _._matchGroup && !b) {
          for (var z in _._matchGroup)
            if (z !== _._id) {
              var j = s(f, z), H = h(f, j, !0), Y = _._length / j._length;
              for (T = 0; T < H.min.length; T++)
                L = H.min[T], l(S, L.val, L.pad * Y, { extrapad: L.extrapad });
              for (T = 0; T < H.max.length; T++)
                L = H.max[T], i(E, L.val, L.pad * Y, { extrapad: L.extrapad });
            }
        }
        return { min: S, max: E };
      }
      function l(f, _, b, w) {
        p(f, _, b, w, a);
      }
      function i(f, _, b, w) {
        p(f, _, b, w, y);
      }
      function p(f, _, b, w, T) {
        for (var L = w.tozero, A = w.extrapad, I = !0, P = 0; P < f.length && I; P++) {
          var S = f[P];
          if (T(S.val, _) && S.pad >= b && (S.extrapad || !A)) {
            I = !1;
            break;
          }
          T(_, S.val) && S.pad <= b && (A || !S.extrapad) && (f.splice(P, 1), P--);
        }
        if (I) {
          var E = L && _ === 0;
          f.push({ val: _, pad: E ? 0 : b, extrapad: !E && A });
        }
      }
      function c(f) {
        return g(f) && Math.abs(f) < x;
      }
      function a(f, _) {
        return f <= _;
      }
      function y(f, _) {
        return f >= _;
      }
    }, { "../../components/drawing": 389, "../../constants/numerical": 491, "../../lib": 515, "../../registry": 647, "./axis_ids": 570, "@plotly/d3": 58, "fast-isnumeric": 190 }], 566: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../../plots/plots"), x = v("../../registry"), e = v("../../lib"), r = e.strTranslate, n = v("../../lib/svg_text_utils"), s = v("../../components/titles"), t = v("../../components/color"), d = v("../../components/drawing"), u = v("./layout_attributes"), o = v("./clean_ticks"), h = v("../../constants/numerical"), l = h.ONEMAXYEAR, i = h.ONEAVGYEAR, p = h.ONEMINYEAR, c = h.ONEMAXQUARTER, a = h.ONEAVGQUARTER, y = h.ONEMINQUARTER, f = h.ONEMAXMONTH, _ = h.ONEAVGMONTH, b = h.ONEMINMONTH, w = h.ONEWEEK, T = h.ONEDAY, L = T / 2, A = h.ONEHOUR, I = h.ONEMIN, P = h.ONESEC, S = h.MINUS_SIGN, E = h.BADNUM, R = { K: "zeroline" }, z = { K: "gridline", L: "path" }, j = { K: "minor-gridline", L: "path" }, H = { K: "tick", L: "path" }, Y = { K: "tick", L: "text" }, J = { width: ["x", "r", "l", "xl", "xr"], height: ["y", "t", "b", "yt", "yb"], right: ["r", "xr"], left: ["l", "xl"], top: ["t", "yt"], bottom: ["b", "yb"] }, W = v("../../constants/alignment"), Z = W.MID_SHIFT, re = W.CAP_SHIFT, V = W.LINE_SPACING, B = W.OPPOSITE_SIDE, U = Q.exports = {};
      U.setConvert = v("./set_convert");
      var ee = v("./axis_autotype"), N = v("./axis_ids"), K = N.idSort, X = N.isLinked;
      U.id2name = N.id2name, U.name2id = N.name2id, U.cleanId = N.cleanId, U.list = N.list, U.listIds = N.listIds, U.getFromId = N.getFromId, U.getFromTrace = N.getFromTrace;
      var te = v("./autorange");
      U.getAutoRange = te.getAutoRange, U.findExtremes = te.findExtremes;
      function ie(he) {
        var be = 1e-4 * (he[1] - he[0]);
        return [he[0] - be, he[1] + be];
      }
      U.coerceRef = function(he, be, Re, Ue, Xe, qe) {
        var st = Ue.charAt(Ue.length - 1), it = Re._fullLayout._subplots[st + "axis"], Tt = Ue + "ref", Pt = {};
        return Xe || (Xe = it[0] || (typeof qe == "string" ? qe : qe[0])), qe || (qe = Xe), it = it.concat(it.map(function(rt) {
          return rt + " domain";
        })), Pt[Tt] = { valType: "enumerated", values: it.concat(qe ? typeof qe == "string" ? [qe] : qe : []), dflt: Xe }, e.coerce(he, be, Pt, Tt);
      }, U.getRefType = function(he) {
        return he === void 0 ? he : he === "paper" ? "paper" : he === "pixel" ? "pixel" : /( domain)$/.test(he) ? "domain" : "range";
      }, U.coercePosition = function(he, be, Re, Ue, Xe, qe) {
        var st, it;
        if (U.getRefType(Ue) !== "range")
          st = e.ensureNumber, it = Re(Xe, qe);
        else {
          var Tt = U.getFromId(be, Ue);
          it = Re(Xe, qe = Tt.fraction2r(qe)), st = Tt.cleanPos;
        }
        he[Xe] = st(it);
      }, U.cleanPosition = function(he, be, Re) {
        return (Re === "paper" || Re === "pixel" ? e.ensureNumber : U.getFromId(be, Re).cleanPos)(he);
      }, U.redrawComponents = function(he, be) {
        be = be || U.listIds(he);
        var Re = he._fullLayout;
        function Ue(Xe, qe, st, it) {
          for (var Tt = x.getComponentMethod(Xe, qe), Pt = {}, rt = 0; rt < be.length; rt++)
            for (var ut = Re[U.id2name(be[rt])][st], Bt = 0; Bt < ut.length; Bt++) {
              var wt = ut[Bt];
              if (!Pt[wt] && (Tt(he, wt), Pt[wt] = 1, it))
                return;
            }
        }
        Ue("annotations", "drawOne", "_annIndices"), Ue("shapes", "drawOne", "_shapeIndices"), Ue("images", "draw", "_imgIndices", !0), Ue("selections", "drawOne", "_selectionIndices");
      };
      var le = U.getDataConversions = function(he, be, Re, Ue) {
        var Xe, qe = Re === "x" || Re === "y" || Re === "z" ? Re : Ue;
        if (Array.isArray(qe)) {
          if (Xe = { type: ee(Ue, void 0, { autotypenumbers: he._fullLayout.autotypenumbers }), _categories: [] }, U.setConvert(Xe), Xe.type === "category")
            for (var st = 0; st < Ue.length; st++)
              Xe.d2c(Ue[st]);
        } else
          Xe = U.getFromTrace(he, be, qe);
        return Xe ? { d2c: Xe.d2c, c2d: Xe.c2d } : qe === "ids" ? { d2c: ve, c2d: ve } : { d2c: oe, c2d: oe };
      };
      function oe(he) {
        return +he;
      }
      function ve(he) {
        return String(he);
      }
      function ue(he, be) {
        return Math.abs((he / be + 0.5) % 1 - 0.5) < 1e-3;
      }
      function ye(he, be) {
        return Math.abs(he / be - 1) < 1e-3;
      }
      function Ae(he) {
        return +he.substring(1);
      }
      function pe(he) {
        var be = ie(e.simpleMap(he.range, he.r2l)), Re = Math.min(be[0], be[1]), Ue = Math.max(be[0], be[1]), Xe = he.type === "category" ? he.d2l_noadd : he.d2l;
        he.type === "log" && String(he.dtick).charAt(0) !== "L" && (he.dtick = "L" + Math.pow(10, Math.floor(Math.min(he.range[0], he.range[1])) - 1));
        for (var qe = [], st = 0; st <= 1; st++)
          if (!st || he.minor) {
            var it = st ? he.minor.tickvals : he.tickvals, Tt = st ? [] : he.ticktext;
            if (it) {
              Array.isArray(Tt) || (Tt = []);
              for (var Pt = 0; Pt < it.length; Pt++) {
                var rt = Xe(it[Pt]);
                if (rt > Re && rt < Ue) {
                  var ut = Tt[Pt] === void 0 ? U.tickText(he, rt) : Oe(he, rt, String(Tt[Pt]));
                  st && (ut.minor = !0, ut.text = ""), qe.push(ut);
                }
              }
            }
          }
        return he.rangebreaks && (qe = qe.filter(function(Bt) {
          return he.maskBreaks(Bt.x) !== E;
        })), qe;
      }
      U.getDataToCoordFunc = function(he, be, Re, Ue) {
        return le(he, be, Re, Ue).d2c;
      }, U.counterLetter = function(he) {
        var be = he.charAt(0);
        return be === "x" ? "y" : be === "y" ? "x" : void 0;
      }, U.minDtick = function(he, be, Re, Ue) {
        ["log", "category", "multicategory"].indexOf(he.type) === -1 && Ue ? he._minDtick === void 0 ? (he._minDtick = be, he._forceTick0 = Re) : he._minDtick && ((he._minDtick / be + 1e-6) % 1 < 2e-6 && ((Re - he._forceTick0) / be % 1 + 1.000001) % 1 < 2e-6 ? (he._minDtick = be, he._forceTick0 = Re) : ((be / he._minDtick + 1e-6) % 1 > 2e-6 || ((Re - he._forceTick0) / he._minDtick % 1 + 1.000001) % 1 > 2e-6) && (he._minDtick = 0)) : he._minDtick = 0;
      }, U.saveRangeInitial = function(he, be) {
        for (var Re = U.list(he, "", !0), Ue = !1, Xe = 0; Xe < Re.length; Xe++) {
          var qe = Re[Xe], st = qe._rangeInitial === void 0, it = st || !(qe.range[0] === qe._rangeInitial[0] && qe.range[1] === qe._rangeInitial[1]);
          (st && qe.autorange === !1 || be && it) && (qe._rangeInitial = qe.range.slice(), Ue = !0);
        }
        return Ue;
      }, U.saveShowSpikeInitial = function(he, be) {
        for (var Re = U.list(he, "", !0), Ue = !1, Xe = "on", qe = 0; qe < Re.length; qe++) {
          var st = Re[qe], it = st._showSpikeInitial === void 0, Tt = it || st.showspikes !== st._showspikes;
          (it || be && Tt) && (st._showSpikeInitial = st.showspikes, Ue = !0), Xe !== "on" || st.showspikes || (Xe = "off");
        }
        return he._fullLayout._cartesianSpikesEnabled = Xe, Ue;
      }, U.autoBin = function(he, be, Re, Ue, Xe, qe) {
        var st, it = e.aggNums(Math.min, null, he), Tt = e.aggNums(Math.max, null, he);
        if (be.type === "category" || be.type === "multicategory")
          return { start: it - 0.5, end: Tt + 0.5, size: Math.max(1, Math.round(qe) || 1), _dataSpan: Tt - it };
        if (Xe || (Xe = be.calendar), st = be.type === "log" ? { type: "linear", range: [it, Tt] } : { type: be.type, range: e.simpleMap([it, Tt], be.c2r, 0, Xe), calendar: Xe }, U.setConvert(st), qe = qe && o.dtick(qe, st.type))
          st.dtick = qe, st.tick0 = o.tick0(void 0, st.type, Xe);
        else {
          var Pt;
          if (Re)
            Pt = (Tt - it) / Re;
          else {
            var rt = e.distinctVals(he), ut = Math.pow(10, Math.floor(Math.log(rt.minDiff) / Math.LN10)), Bt = ut * e.roundUp(rt.minDiff / ut, [0.9, 1.9, 4.9, 9.9], !0);
            Pt = Math.max(Bt, 2 * e.stdev(he) / Math.pow(he.length, Ue ? 0.25 : 0.4)), g(Pt) || (Pt = 1);
          }
          U.autoTicks(st, Pt);
        }
        var wt, Lt = st.dtick, Se = U.tickIncrement(U.tickFirst(st), Lt, "reverse", Xe);
        if (typeof Lt == "number")
          wt = (Se = function(We, nt, ft, Mt, Nt) {
            var Zt = 0, Ut = 0, fr = 0, Tr = 0;
            function ur(cr) {
              return (1 + 100 * (cr - We) / ft.dtick) % 100 < 2;
            }
            for (var Kt = 0; Kt < nt.length; Kt++)
              nt[Kt] % 1 == 0 ? fr++ : g(nt[Kt]) || Tr++, ur(nt[Kt]) && Zt++, ur(nt[Kt] + ft.dtick / 2) && Ut++;
            var $t = nt.length - Tr;
            if (fr === $t && ft.type !== "date")
              ft.dtick < 1 ? We = Mt - 0.5 * ft.dtick : (We -= 0.5) + ft.dtick < Mt && (We += ft.dtick);
            else if (Ut < 0.1 * $t && (Zt > 0.3 * $t || ur(Mt) || ur(Nt))) {
              var er = ft.dtick / 2;
              We += We + er < Mt ? er : -er;
            }
            return We;
          }(Se, he, st, it, Tt)) + (1 + Math.floor((Tt - Se) / Lt)) * Lt;
        else
          for (st.dtick.charAt(0) === "M" && (Se = function(We, nt, ft, Mt, Nt) {
            var Zt = e.findExactDates(nt, Nt);
            if (Zt.exactDays > 0.8) {
              var Ut = Number(ft.substr(1));
              Zt.exactYears > 0.8 && Ut % 12 == 0 ? We = U.tickIncrement(We, "M6", "reverse") + 1.5 * T : Zt.exactMonths > 0.8 ? We = U.tickIncrement(We, "M1", "reverse") + 15.5 * T : We -= L;
              var fr = U.tickIncrement(We, ft);
              if (fr <= Mt)
                return fr;
            }
            return We;
          }(Se, he, Lt, it, Xe)), wt = Se, 0; wt <= Tt; )
            wt = U.tickIncrement(wt, Lt, !1, Xe);
        return { start: be.c2r(Se, 0, Xe), end: be.c2r(wt, 0, Xe), size: Lt, _dataSpan: Tt - it };
      }, U.prepMinorTicks = function(he, be, Re) {
        if (!be.minor.dtick) {
          delete he.dtick;
          var Ue, Xe = be.dtick && g(be._tmin);
          if (Xe) {
            var qe = U.tickIncrement(be._tmin, be.dtick, !0);
            Ue = [be._tmin, 0.99 * qe + 0.01 * be._tmin];
          } else {
            var st = e.simpleMap(be.range, be.r2l);
            Ue = [st[0], 0.8 * st[0] + 0.2 * st[1]];
          }
          if (he.range = e.simpleMap(Ue, be.l2r), he._isMinor = !0, U.prepTicks(he, Re), Xe) {
            var it = g(be.dtick), Tt = g(he.dtick), Pt = it ? be.dtick : +be.dtick.substring(1), rt = Tt ? he.dtick : +he.dtick.substring(1);
            it && Tt ? ue(Pt, rt) ? Pt === 2 * w && rt === 2 * T && (he.dtick = w) : Pt === 2 * w && rt === 3 * T ? he.dtick = w : Pt !== w || (be._input.minor || {}).nticks ? ye(Pt / rt, 2.5) ? he.dtick = Pt / 2 : he.dtick = Pt : he.dtick = T : String(be.dtick).charAt(0) === "M" ? Tt ? he.dtick = "M1" : ue(Pt, rt) ? Pt >= 12 && rt === 2 && (he.dtick = "M3") : he.dtick = be.dtick : String(he.dtick).charAt(0) === "L" ? String(be.dtick).charAt(0) === "L" ? ue(Pt, rt) || (he.dtick = ye(Pt / rt, 2.5) ? be.dtick / 2 : be.dtick) : he.dtick = "D1" : he.dtick === "D2" && +be.dtick > 1 && (he.dtick = 1);
          }
          he.range = be.range;
        }
        be.minor._tick0Init === void 0 && (he.tick0 = be.tick0);
      }, U.prepTicks = function(he, be) {
        var Re = e.simpleMap(he.range, he.r2l, void 0, void 0, be);
        if (he.tickmode === "auto" || !he.dtick) {
          var Ue, Xe = he.nticks;
          Xe || (he.type === "category" || he.type === "multicategory" ? (Ue = he.tickfont ? e.bigFont(he.tickfont.size || 12) : 15, Xe = he._length / Ue) : (Ue = he._id.charAt(0) === "y" ? 40 : 80, Xe = e.constrain(he._length / Ue, 4, 9) + 1), he._name === "radialaxis" && (Xe *= 2)), he.minor && he.minor.tickmode !== "array" || he.tickmode === "array" && (Xe *= 100), he._roughDTick = Math.abs(Re[1] - Re[0]) / Xe, U.autoTicks(he, he._roughDTick), he._minDtick > 0 && he.dtick < 2 * he._minDtick && (he.dtick = he._minDtick, he.tick0 = he.l2r(he._forceTick0));
        }
        he.ticklabelmode === "period" && function(qe) {
          var st;
          function it() {
            return !(g(qe.dtick) || qe.dtick.charAt(0) !== "M");
          }
          var Tt = it(), Pt = U.getTickFormat(qe);
          if (Pt) {
            var rt = qe._dtickInit !== qe.dtick;
            /%[fLQsSMX]/.test(Pt) || (/%[HI]/.test(Pt) ? (st = A, rt && !Tt && qe.dtick < A && (qe.dtick = A)) : /%p/.test(Pt) ? (st = L, rt && !Tt && qe.dtick < L && (qe.dtick = L)) : /%[Aadejuwx]/.test(Pt) ? (st = T, rt && !Tt && qe.dtick < T && (qe.dtick = T)) : /%[UVW]/.test(Pt) ? (st = w, rt && !Tt && qe.dtick < w && (qe.dtick = w)) : /%[Bbm]/.test(Pt) ? (st = _, rt && (Tt ? Ae(qe.dtick) < 1 : qe.dtick < b) && (qe.dtick = "M1")) : /%[q]/.test(Pt) ? (st = a, rt && (Tt ? Ae(qe.dtick) < 3 : qe.dtick < y) && (qe.dtick = "M3")) : /%[Yy]/.test(Pt) && (st = i, rt && (Tt ? Ae(qe.dtick) < 12 : qe.dtick < p) && (qe.dtick = "M12")));
          }
          (Tt = it()) && qe.tick0 === qe._dowTick0 && (qe.tick0 = qe._rawTick0), qe._definedDelta = st;
        }(he), he.tick0 || (he.tick0 = he.type === "date" ? "2000-01-01" : 0), he.type === "date" && he.dtick < 0.1 && (he.dtick = 0.1), Ie(he);
      }, U.calcTicks = function(he, be) {
        for (var Re, Ue, Xe = he.type, qe = he.calendar, st = he.ticklabelstep, it = he.ticklabelmode === "period", Tt = e.simpleMap(he.range, he.r2l, void 0, void 0, be), Pt = Tt[1] < Tt[0], rt = Math.min(Tt[0], Tt[1]), ut = Math.max(Tt[0], Tt[1]), Bt = Math.max(1e3, he._length || 0), wt = [], Lt = [], Se = [], We = [], nt = he.minor && (he.minor.ticks || he.minor.showgrid), ft = 1; ft >= (nt ? 0 : 1); ft--) {
          var Mt = !ft;
          ft ? (he._dtickInit = he.dtick, he._tick0Init = he.tick0) : (he.minor._dtickInit = he.minor.dtick, he.minor._tick0Init = he.minor.tick0);
          var Nt = ft ? he : e.extendFlat({}, he, he.minor);
          if (Mt ? U.prepMinorTicks(Nt, he, be) : U.prepTicks(Nt, be), Nt.tickmode !== "array") {
            var Zt = ie(Tt), Ut = Zt[0], fr = Zt[1], Tr = g(Nt.dtick), ur = Xe === "log" && !(Tr || Nt.dtick.charAt(0) === "L"), Kt = U.tickFirst(Nt, be);
            if (ft) {
              if (he._tmin = Kt, Kt < Ut !== Pt)
                break;
              Xe !== "category" && Xe !== "multicategory" || (fr = Pt ? Math.max(-0.5, fr) : Math.min(he._categories.length - 0.5, fr));
            }
            var $t, er, cr = null, gr = Kt;
            ft && (Tr ? er = he.dtick : Xe === "date" ? typeof he.dtick == "string" && he.dtick.charAt(0) === "M" && (er = _ * he.dtick.substring(1)) : er = he._roughDTick, $t = Math.round((he.r2l(gr) - he.r2l(he.tick0)) / er) - 1);
            var Mr = Nt.dtick;
            for (Nt.rangebreaks && Nt._tick0Init !== Nt.tick0 && (gr = It(gr, he), Pt || (gr = U.tickIncrement(gr, Mr, !Pt, qe))), ft && it && (gr = U.tickIncrement(gr, Mr, !Pt, qe), $t--); Pt ? gr >= fr : gr <= fr; gr = U.tickIncrement(gr, Mr, Pt, qe)) {
              if (ft && $t++, Nt.rangebreaks && !Pt) {
                if (gr < Ut)
                  continue;
                if (Nt.maskBreaks(gr) === E && It(gr, Nt) >= ut)
                  break;
              }
              if (Se.length > Bt || gr === cr)
                break;
              cr = gr;
              var Ir = { value: gr };
              ft ? (ur && gr !== (0 | gr) && (Ir.simpleLabel = !0), st > 1 && $t % st && (Ir.skipLabel = !0), Se.push(Ir)) : (Ir.minor = !0, We.push(Ir));
            }
          } else
            ft ? (Se = [], wt = pe(he)) : (We = [], Lt = pe(he));
        }
        if (nt && !(he.minor.ticks === "inside" && he.ticks === "outside" || he.minor.ticks === "outside" && he.ticks === "inside")) {
          for (var Fr = Se.map(function(En) {
            return En.value;
          }), Gr = [], un = 0; un < We.length; un++) {
            var $r = We[un], Dn = $r.value;
            if (Fr.indexOf(Dn) === -1) {
              for (var rn = !1, vn = 0; !rn && vn < Se.length; vn++)
                1e7 + Se[vn].value === 1e7 + Dn && (rn = !0);
              rn || Gr.push($r);
            }
          }
          We = Gr;
        }
        if (it && function(En, aa, tr) {
          for (var mr = 0; mr < En.length; mr++) {
            var Ct = En[mr].value, or = mr, hr = mr + 1;
            mr < En.length - 1 ? (or = mr, hr = mr + 1) : mr > 0 ? (or = mr - 1, hr = mr) : (or = mr, hr = mr);
            var Rr, Dr = En[or].value, Or = En[hr].value, Ar = Math.abs(Or - Dr), vr = tr || Ar, xr = 0;
            vr >= p ? xr = Ar >= p && Ar <= l ? Ar : i : tr === a && vr >= y ? xr = Ar >= y && Ar <= c ? Ar : a : vr >= b ? xr = Ar >= b && Ar <= f ? Ar : _ : tr === w && vr >= w ? xr = w : vr >= T ? xr = T : tr === L && vr >= L ? xr = L : tr === A && vr >= A && (xr = A), xr >= Ar && (xr = Ar, Rr = !0);
            var wr = Ct + xr;
            if (aa.rangebreaks && xr > 0) {
              for (var Er = 0, Hr = 0; Hr < 84; Hr++) {
                var Vr = (Hr + 0.5) / 84;
                aa.maskBreaks(Ct * (1 - Vr) + Vr * wr) !== E && Er++;
              }
              (xr *= Er / 84) || (En[mr].drop = !0), Rr && Ar > w && (xr = Ar);
            }
            (xr > 0 || mr === 0) && (En[mr].periodX = Ct + xr / 2);
          }
        }(Se, he, he._definedDelta), he.rangebreaks) {
          var xn = he._id.charAt(0) === "y", $n = 1;
          he.tickmode === "auto" && ($n = he.tickfont ? he.tickfont.size : 12);
          var Br = NaN;
          for (Re = Se.length - 1; Re > -1; Re--)
            if (Se[Re].drop)
              Se.splice(Re, 1);
            else {
              Se[Re].value = It(Se[Re].value, he);
              var tn = he.c2p(Se[Re].value);
              (xn ? Br > tn - $n : Br < tn + $n) ? Se.splice(Pt ? Re + 1 : Re, 1) : Br = tn;
            }
        }
        nr(he) && Math.abs(Tt[1] - Tt[0]) === 360 && Se.pop(), he._tmax = (Se[Se.length - 1] || {}).value, he._prevDateHead = "", he._inCalcTicks = !0;
        var mn, Qr, cn = function(En) {
          En.text = "", he._prevDateHead = Ue;
        };
        for (Se = Se.concat(We), Re = 0; Re < Se.length; Re++) {
          var Hn = Se[Re].minor, _n = Se[Re].value;
          Hn ? Lt.push({ x: _n, minor: !0 }) : (Ue = he._prevDateHead, mn = U.tickText(he, _n, !1, Se[Re].simpleLabel), (Qr = Se[Re].periodX) !== void 0 && (mn.periodX = Qr, (Qr > ut || Qr < rt) && (Qr > ut && (mn.periodX = ut), Qr < rt && (mn.periodX = rt), cn(mn))), Se[Re].skipLabel && cn(mn), wt.push(mn));
        }
        return wt = wt.concat(Lt), he._inCalcTicks = !1, it && wt.length && (wt[0].noTick = !0), wt;
      };
      var ge = [2, 5, 10], we = [1, 2, 3, 6, 12], se = [1, 2, 5, 10, 15, 30], de = [1, 2, 3, 7, 14], Te = [-0.046, 0, 0.301, 0.477, 0.602, 0.699, 0.778, 0.845, 0.903, 0.954, 1], Ee = [-0.301, 0, 0.301, 0.699, 1], Me = [15, 30, 45, 90, 180];
      function ze(he, be, Re) {
        return be * e.roundUp(he / be, Re);
      }
      function Ie(he) {
        var be = he.dtick;
        if (he._tickexponent = 0, g(be) || typeof be == "string" || (be = 1), he.type !== "category" && he.type !== "multicategory" || (he._tickround = null), he.type === "date") {
          var Re = he.r2l(he.tick0), Ue = he.l2r(Re).replace(/(^-|i)/g, ""), Xe = Ue.length;
          if (String(be).charAt(0) === "M")
            Xe > 10 || Ue.substr(5) !== "01-01" ? he._tickround = "d" : he._tickround = +be.substr(1) % 12 == 0 ? "y" : "m";
          else if (be >= T && Xe <= 10 || be >= 15 * T)
            he._tickround = "d";
          else if (be >= I && Xe <= 16 || be >= A)
            he._tickround = "M";
          else if (be >= P && Xe <= 19 || be >= I)
            he._tickround = "S";
          else {
            var qe = he.l2r(Re + be).replace(/^-/, "").length;
            he._tickround = Math.max(Xe, qe) - 20, he._tickround < 0 && (he._tickround = 4);
          }
        } else if (g(be) || be.charAt(0) === "L") {
          var st = he.range.map(he.r2d || Number);
          g(be) || (be = Number(be.substr(1))), he._tickround = 2 - Math.floor(Math.log(be) / Math.LN10 + 0.01);
          var it = Math.max(Math.abs(st[0]), Math.abs(st[1])), Tt = Math.floor(Math.log(it) / Math.LN10 + 0.01), Pt = he.minexponent === void 0 ? 3 : he.minexponent;
          Math.abs(Tt) > Pt && (Fe(he.exponentformat) && !Pe(Tt) ? he._tickexponent = 3 * Math.round((Tt - 1) / 3) : he._tickexponent = Tt);
        } else
          he._tickround = null;
      }
      function Oe(he, be, Re) {
        var Ue = he.tickfont || {};
        return { x: be, dx: 0, dy: 0, text: Re || "", fontSize: Ue.size, font: Ue.family, fontColor: Ue.color };
      }
      U.autoTicks = function(he, be, Re) {
        var Ue;
        function Xe(ut) {
          return Math.pow(ut, Math.floor(Math.log(be) / Math.LN10));
        }
        if (he.type === "date") {
          he.tick0 = e.dateTick0(he.calendar, 0);
          var qe = 2 * be;
          if (qe > i)
            be /= i, Ue = Xe(10), he.dtick = "M" + 12 * ze(be, Ue, ge);
          else if (qe > _)
            be /= _, he.dtick = "M" + ze(be, 1, we);
          else if (qe > T) {
            if (he.dtick = ze(be, T, he._hasDayOfWeekBreaks ? [1, 2, 7, 14] : de), !Re) {
              var st = U.getTickFormat(he), it = he.ticklabelmode === "period";
              it && (he._rawTick0 = he.tick0), /%[uVW]/.test(st) ? he.tick0 = e.dateTick0(he.calendar, 2) : he.tick0 = e.dateTick0(he.calendar, 1), it && (he._dowTick0 = he.tick0);
            }
          } else
            qe > A ? he.dtick = ze(be, A, we) : qe > I ? he.dtick = ze(be, I, se) : qe > P ? he.dtick = ze(be, P, se) : (Ue = Xe(10), he.dtick = ze(be, Ue, ge));
        } else if (he.type === "log") {
          he.tick0 = 0;
          var Tt = e.simpleMap(he.range, he.r2l);
          if (he._isMinor && (be *= 1.5), be > 0.7)
            he.dtick = Math.ceil(be);
          else if (Math.abs(Tt[1] - Tt[0]) < 1) {
            var Pt = 1.5 * Math.abs((Tt[1] - Tt[0]) / be);
            be = Math.abs(Math.pow(10, Tt[1]) - Math.pow(10, Tt[0])) / Pt, Ue = Xe(10), he.dtick = "L" + ze(be, Ue, ge);
          } else
            he.dtick = be > 0.3 ? "D2" : "D1";
        } else
          he.type === "category" || he.type === "multicategory" ? (he.tick0 = 0, he.dtick = Math.ceil(Math.max(be, 1))) : nr(he) ? (he.tick0 = 0, Ue = 1, he.dtick = ze(be, Ue, Me)) : (he.tick0 = 0, Ue = Xe(10), he.dtick = ze(be, Ue, ge));
        if (he.dtick === 0 && (he.dtick = 1), !g(he.dtick) && typeof he.dtick != "string") {
          var rt = he.dtick;
          throw he.dtick = 1, "ax.dtick error: " + String(rt);
        }
      }, U.tickIncrement = function(he, be, Re, Ue) {
        var Xe = Re ? -1 : 1;
        if (g(be))
          return e.increment(he, Xe * be);
        var qe = be.charAt(0), st = Xe * Number(be.substr(1));
        if (qe === "M")
          return e.incrementMonth(he, st, Ue);
        if (qe === "L")
          return Math.log(Math.pow(10, he) + st) / Math.LN10;
        if (qe === "D") {
          var it = be === "D2" ? Ee : Te, Tt = he + 0.01 * Xe, Pt = e.roundUp(e.mod(Tt, 1), it, Re);
          return Math.floor(Tt) + Math.log(m.round(Math.pow(10, Pt), 1)) / Math.LN10;
        }
        throw "unrecognized dtick " + String(be);
      }, U.tickFirst = function(he, be) {
        var Re = he.r2l || Number, Ue = e.simpleMap(he.range, Re, void 0, void 0, be), Xe = Ue[1] < Ue[0], qe = Xe ? Math.floor : Math.ceil, st = ie(Ue)[0], it = he.dtick, Tt = Re(he.tick0);
        if (g(it)) {
          var Pt = qe((st - Tt) / it) * it + Tt;
          return he.type !== "category" && he.type !== "multicategory" || (Pt = e.constrain(Pt, 0, he._categories.length - 1)), Pt;
        }
        var rt = it.charAt(0), ut = Number(it.substr(1));
        if (rt === "M") {
          for (var Bt, wt, Lt, Se = 0, We = Tt; Se < 10; ) {
            if (((Bt = U.tickIncrement(We, it, Xe, he.calendar)) - st) * (We - st) <= 0)
              return Xe ? Math.min(We, Bt) : Math.max(We, Bt);
            wt = (st - (We + Bt) / 2) / (Bt - We), Lt = rt + (Math.abs(Math.round(wt)) || 1) * ut, We = U.tickIncrement(We, Lt, wt < 0 ? !Xe : Xe, he.calendar), Se++;
          }
          return e.error("tickFirst did not converge", he), We;
        }
        if (rt === "L")
          return Math.log(qe((Math.pow(10, st) - Tt) / ut) * ut + Tt) / Math.LN10;
        if (rt === "D") {
          var nt = it === "D2" ? Ee : Te, ft = e.roundUp(e.mod(st, 1), nt, Xe);
          return Math.floor(st) + Math.log(m.round(Math.pow(10, ft), 1)) / Math.LN10;
        }
        throw "unrecognized dtick " + String(it);
      }, U.tickText = function(he, be, Re, Ue) {
        var Xe, qe = Oe(he, be), st = he.tickmode === "array", it = Re || st, Tt = he.type, Pt = Tt === "category" ? he.d2l_noadd : he.d2l;
        if (st && Array.isArray(he.ticktext)) {
          var rt = e.simpleMap(he.range, he.r2l), ut = (Math.abs(rt[1] - rt[0]) - (he._lBreaks || 0)) / 1e4;
          for (Xe = 0; Xe < he.ticktext.length && !(Math.abs(be - Pt(he.tickvals[Xe])) < ut); Xe++)
            ;
          if (Xe < he.ticktext.length)
            return qe.text = String(he.ticktext[Xe]), qe;
        }
        function Bt(Se) {
          if (Se === void 0)
            return !0;
          if (Re)
            return Se === "none";
          var We = { first: he._tmin, last: he._tmax }[Se];
          return Se !== "all" && be !== We;
        }
        var wt = Re ? "never" : he.exponentformat !== "none" && Bt(he.showexponent) ? "hide" : "";
        if (Tt === "date" ? function(Se, We, nt, ft) {
          var Mt = Se._tickround, Nt = nt && Se.hoverformat || U.getTickFormat(Se);
          ft && (Mt = g(Mt) ? 4 : { y: "m", m: "d", d: "M", M: "S", S: 4 }[Mt]);
          var Zt, Ut = e.formatDate(We.x, Nt, Mt, Se._dateFormat, Se.calendar, Se._extraFormat), fr = Ut.indexOf(`
`);
          if (fr !== -1 && (Zt = Ut.substr(fr + 1), Ut = Ut.substr(0, fr)), ft && (Ut === "00:00:00" || Ut === "00:00" ? (Ut = Zt, Zt = "") : Ut.length === 8 && (Ut = Ut.replace(/:00$/, ""))), Zt)
            if (nt)
              Mt === "d" ? Ut += ", " + Zt : Ut = Zt + (Ut ? ", " + Ut : "");
            else if (Se._inCalcTicks && Se._prevDateHead === Zt) {
              var Tr = Be(Se), ur = Se._trueSide || Se.side;
              (!Tr && ur === "top" || Tr && ur === "bottom") && (Ut += "<br> ");
            } else
              Se._prevDateHead = Zt, Ut += "<br>" + Zt;
          We.text = Ut;
        }(he, qe, Re, it) : Tt === "log" ? function(Se, We, nt, ft, Mt) {
          var Nt = Se.dtick, Zt = We.x, Ut = Se.tickformat, fr = typeof Nt == "string" && Nt.charAt(0);
          if (Mt === "never" && (Mt = ""), ft && fr !== "L" && (Nt = "L3", fr = "L"), Ut || fr === "L")
            We.text = De(Math.pow(10, Zt), Se, Mt, ft);
          else if (g(Nt) || fr === "D" && e.mod(Zt + 0.01, 1) < 0.1) {
            var Tr = Math.round(Zt), ur = Math.abs(Tr), Kt = Se.exponentformat;
            Kt === "power" || Fe(Kt) && Pe(Tr) ? (We.text = Tr === 0 ? 1 : Tr === 1 ? "10" : "10<sup>" + (Tr > 1 ? "" : S) + ur + "</sup>", We.fontSize *= 1.25) : (Kt === "e" || Kt === "E") && ur > 2 ? We.text = "1" + Kt + (Tr > 0 ? "+" : S) + ur : (We.text = De(Math.pow(10, Zt), Se, "", "fakehover"), Nt === "D1" && Se._id.charAt(0) === "y" && (We.dy -= We.fontSize / 6));
          } else {
            if (fr !== "D")
              throw "unrecognized dtick " + String(Nt);
            We.text = String(Math.round(Math.pow(10, e.mod(Zt, 1)))), We.fontSize *= 0.75;
          }
          if (Se.dtick === "D1") {
            var $t = String(We.text).charAt(0);
            $t !== "0" && $t !== "1" || (Se._id.charAt(0) === "y" ? We.dx -= We.fontSize / 4 : (We.dy += We.fontSize / 2, We.dx += (Se.range[1] > Se.range[0] ? 1 : -1) * We.fontSize * (Zt < 0 ? 0.5 : 0.25)));
          }
        }(he, qe, 0, it, wt) : Tt === "category" ? function(Se, We) {
          var nt = Se._categories[Math.round(We.x)];
          nt === void 0 && (nt = ""), We.text = String(nt);
        }(he, qe) : Tt === "multicategory" ? function(Se, We, nt) {
          var ft = Math.round(We.x), Mt = Se._categories[ft] || [], Nt = Mt[1] === void 0 ? "" : String(Mt[1]), Zt = Mt[0] === void 0 ? "" : String(Mt[0]);
          nt ? We.text = Zt + " - " + Nt : (We.text = Nt, We.text2 = Zt);
        }(he, qe, Re) : nr(he) ? function(Se, We, nt, ft, Mt) {
          if (Se.thetaunit !== "radians" || nt)
            We.text = De(We.x, Se, Mt, ft);
          else {
            var Nt = We.x / 180;
            if (Nt === 0)
              We.text = "0";
            else {
              var Zt = function(fr) {
                function Tr(er, cr) {
                  return Math.abs(er - cr) <= 1e-6;
                }
                var ur = function(er) {
                  for (var cr = 1; !Tr(Math.round(er * cr) / cr, er); )
                    cr *= 10;
                  return cr;
                }(fr), Kt = fr * ur, $t = Math.abs(function er(cr, gr) {
                  return Tr(gr, 0) ? cr : er(gr, cr % gr);
                }(Kt, ur));
                return [Math.round(Kt / $t), Math.round(ur / $t)];
              }(Nt);
              if (Zt[1] >= 100)
                We.text = De(e.deg2rad(We.x), Se, Mt, ft);
              else {
                var Ut = We.x < 0;
                Zt[1] === 1 ? Zt[0] === 1 ? We.text = "\u03C0" : We.text = Zt[0] + "\u03C0" : We.text = ["<sup>", Zt[0], "</sup>", "\u2044", "<sub>", Zt[1], "</sub>", "\u03C0"].join(""), Ut && (We.text = S + We.text);
              }
            }
          }
        }(he, qe, Re, it, wt) : function(Se, We, nt, ft, Mt) {
          Mt === "never" ? Mt = "" : Se.showexponent === "all" && Math.abs(We.x / Se.dtick) < 1e-6 && (Mt = "hide"), We.text = De(We.x, Se, Mt, ft);
        }(he, qe, 0, it, wt), Ue || (he.tickprefix && !Bt(he.showtickprefix) && (qe.text = he.tickprefix + qe.text), he.ticksuffix && !Bt(he.showticksuffix) && (qe.text += he.ticksuffix)), he.tickson === "boundaries" || he.showdividers) {
          var Lt = function(Se) {
            var We = he.l2p(Se);
            return We >= 0 && We <= he._length ? Se : null;
          };
          qe.xbnd = [Lt(qe.x - 0.5), Lt(qe.x + he.dtick - 0.5)];
        }
        return qe;
      }, U.hoverLabelText = function(he, be, Re) {
        Re && (he = e.extendFlat({}, he, { hoverformat: Re }));
        var Ue = Array.isArray(be) ? be[0] : be, Xe = Array.isArray(be) ? be[1] : void 0;
        if (Xe !== void 0 && Xe !== Ue)
          return U.hoverLabelText(he, Ue, Re) + " - " + U.hoverLabelText(he, Xe, Re);
        var qe = he.type === "log" && Ue <= 0, st = U.tickText(he, he.c2l(qe ? -Ue : Ue), "hover").text;
        return qe ? Ue === 0 ? "0" : S + st : st;
      };
      var Ze = ["f", "p", "n", "\u03BC", "m", "", "k", "M", "G", "T"];
      function Fe(he) {
        return he === "SI" || he === "B";
      }
      function Pe(he) {
        return he > 14 || he < -15;
      }
      function De(he, be, Re, Ue) {
        var Xe = he < 0, qe = be._tickround, st = Re || be.exponentformat || "B", it = be._tickexponent, Tt = U.getTickFormat(be), Pt = be.separatethousands;
        if (Ue) {
          var rt = { exponentformat: st, minexponent: be.minexponent, dtick: be.showexponent === "none" ? be.dtick : g(he) && Math.abs(he) || 1, range: be.showexponent === "none" ? be.range.map(be.r2d) : [0, he || 1] };
          Ie(rt), qe = (Number(rt._tickround) || 0) + 4, it = rt._tickexponent, be.hoverformat && (Tt = be.hoverformat);
        }
        if (Tt)
          return be._numFormat(Tt)(he).replace(/-/g, S);
        var ut, Bt = Math.pow(10, -qe) / 2;
        if (st === "none" && (it = 0), (he = Math.abs(he)) < Bt)
          he = "0", Xe = !1;
        else {
          if (he += Bt, it && (he *= Math.pow(10, -it), qe += it), qe === 0)
            he = String(Math.floor(he));
          else if (qe < 0) {
            he = (he = String(Math.round(he))).substr(0, he.length + qe);
            for (var wt = qe; wt < 0; wt++)
              he += "0";
          } else {
            var Lt = (he = String(he)).indexOf(".") + 1;
            Lt && (he = he.substr(0, Lt + qe).replace(/\.?0+$/, ""));
          }
          he = e.numSeparate(he, be._separators, Pt);
        }
        return it && st !== "hide" && (Fe(st) && Pe(it) && (st = "power"), ut = it < 0 ? S + -it : st !== "power" ? "+" + it : String(it), st === "e" || st === "E" ? he += st + ut : st === "power" ? he += "\xD710<sup>" + ut + "</sup>" : st === "B" && it === 9 ? he += "B" : Fe(st) && (he += Ze[it / 3 + 5])), Xe ? S + he : he;
      }
      function Ge(he, be) {
        if (he) {
          var Re = Object.keys(J).reduce(function(Ue, Xe) {
            return be.indexOf(Xe) !== -1 && J[Xe].forEach(function(qe) {
              Ue[qe] = 1;
            }), Ue;
          }, {});
          Object.keys(he).forEach(function(Ue) {
            Re[Ue] || (Ue.length === 1 ? he[Ue] = 0 : delete he[Ue]);
          });
        }
      }
      function Qe(he, be) {
        for (var Re = [], Ue = {}, Xe = 0; Xe < be.length; Xe++) {
          var qe = be[Xe];
          Ue[qe.text2] ? Ue[qe.text2].push(qe.x) : Ue[qe.text2] = [qe.x];
        }
        for (var st in Ue)
          Re.push(Oe(he, e.interp(Ue[st], 0.5), st));
        return Re;
      }
      function ot(he) {
        return he.periodX !== void 0 ? he.periodX : he.x;
      }
      function vt(he) {
        return [he.text, he.x, he.axInfo, he.font, he.fontSize, he.fontColor].join("_");
      }
      function bt(he) {
        var be = he.title.font.size, Re = (he.title.text.match(n.BR_TAG_ALL) || []).length;
        return he.title.hasOwnProperty("standoff") ? Re ? be * (re + Re * V) : be * re : Re ? be * (Re + 1) * V : be;
      }
      function yt(he, be) {
        var Re = he.l2p(be);
        return Re > 1 && Re < he._length - 1;
      }
      function tt(he) {
        var be = m.select(he), Re = be.select(".text-math-group");
        return Re.empty() ? be.select("text") : Re;
      }
      function Ke(he) {
        return he._id + ".automargin";
      }
      function mt(he) {
        return Ke(he) + ".mirror";
      }
      function Ft(he) {
        return he._id + ".rangeslider";
      }
      function Vt(he, be) {
        for (var Re = 0; Re < be.length; Re++)
          he.indexOf(be[Re]) === -1 && he.push(be[Re]);
      }
      function Xt(he, be, Re) {
        var Ue, Xe, qe = [], st = [], it = he.layout;
        for (Ue = 0; Ue < be.length; Ue++)
          qe.push(U.getFromId(he, be[Ue]));
        for (Ue = 0; Ue < Re.length; Ue++)
          st.push(U.getFromId(he, Re[Ue]));
        var Tt = Object.keys(u), Pt = ["anchor", "domain", "overlaying", "position", "side", "tickangle", "editType"], rt = ["linear", "log"];
        for (Ue = 0; Ue < Tt.length; Ue++) {
          var ut = Tt[Ue], Bt = qe[0][ut], wt = st[0][ut], Lt = !0, Se = !1, We = !1;
          if (ut.charAt(0) !== "_" && typeof Bt != "function" && Pt.indexOf(ut) === -1) {
            for (Xe = 1; Xe < qe.length && Lt; Xe++) {
              var nt = qe[Xe][ut];
              ut === "type" && rt.indexOf(Bt) !== -1 && rt.indexOf(nt) !== -1 && Bt !== nt ? Se = !0 : nt !== Bt && (Lt = !1);
            }
            for (Xe = 1; Xe < st.length && Lt; Xe++) {
              var ft = st[Xe][ut];
              ut === "type" && rt.indexOf(wt) !== -1 && rt.indexOf(ft) !== -1 && wt !== ft ? We = !0 : st[Xe][ut] !== wt && (Lt = !1);
            }
            Lt && (Se && (it[qe[0]._name].type = "linear"), We && (it[st[0]._name].type = "linear"), Gt(it, ut, qe, st, he._fullLayout._dfltTitle));
          }
        }
        for (Ue = 0; Ue < he._fullLayout.annotations.length; Ue++) {
          var Mt = he._fullLayout.annotations[Ue];
          be.indexOf(Mt.xref) !== -1 && Re.indexOf(Mt.yref) !== -1 && e.swapAttrs(it.annotations[Ue], ["?"]);
        }
      }
      function Gt(he, be, Re, Ue, Xe) {
        var qe, st = e.nestedProperty, it = st(he[Re[0]._name], be).get(), Tt = st(he[Ue[0]._name], be).get();
        for (be === "title" && (it && it.text === Xe.x && (it.text = Xe.y), Tt && Tt.text === Xe.y && (Tt.text = Xe.x)), qe = 0; qe < Re.length; qe++)
          st(he, Re[qe]._name + "." + be).set(Tt);
        for (qe = 0; qe < Ue.length; qe++)
          st(he, Ue[qe]._name + "." + be).set(it);
      }
      function nr(he) {
        return he._id === "angularaxis";
      }
      function It(he, be) {
        for (var Re = be._rangebreaks.length, Ue = 0; Ue < Re; Ue++) {
          var Xe = be._rangebreaks[Ue];
          if (he >= Xe.min && he < Xe.max)
            return Xe.max;
        }
        return he;
      }
      function Be(he) {
        return (he.ticklabelposition || "").indexOf("inside") !== -1;
      }
      function He(he, be) {
        Be(he._anchorAxis || {}) && he._hideCounterAxisInsideTickLabels && he._hideCounterAxisInsideTickLabels(be);
      }
      U.getTickFormat = function(he) {
        var be, Re, Ue, Xe, qe, st, it, Tt;
        function Pt(Bt) {
          return typeof Bt != "string" ? Bt : Number(Bt.replace("M", "")) * _;
        }
        function rt(Bt, wt) {
          var Lt = ["L", "D"];
          if (typeof Bt == typeof wt) {
            if (typeof Bt == "number")
              return Bt - wt;
            var Se = Lt.indexOf(Bt.charAt(0)), We = Lt.indexOf(wt.charAt(0));
            return Se === We ? Number(Bt.replace(/(L|D)/g, "")) - Number(wt.replace(/(L|D)/g, "")) : Se - We;
          }
          return typeof Bt == "number" ? 1 : -1;
        }
        function ut(Bt, wt) {
          var Lt = wt[0] === null, Se = wt[1] === null, We = rt(Bt, wt[0]) >= 0, nt = rt(Bt, wt[1]) <= 0;
          return (Lt || We) && (Se || nt);
        }
        if (he.tickformatstops && he.tickformatstops.length > 0)
          switch (he.type) {
            case "date":
            case "linear":
              for (be = 0; be < he.tickformatstops.length; be++)
                if ((Ue = he.tickformatstops[be]).enabled && (Xe = he.dtick, qe = Ue.dtickrange, st = void 0, it = void 0, Tt = void 0, st = Pt || function(Bt) {
                  return Bt;
                }, it = qe[0], Tt = qe[1], (!it && typeof it != "number" || st(it) <= st(Xe)) && (!Tt && typeof Tt != "number" || st(Tt) >= st(Xe)))) {
                  Re = Ue;
                  break;
                }
              break;
            case "log":
              for (be = 0; be < he.tickformatstops.length; be++)
                if ((Ue = he.tickformatstops[be]).enabled && ut(he.dtick, Ue.dtickrange)) {
                  Re = Ue;
                  break;
                }
          }
        return Re ? Re.value : he.tickformat;
      }, U.getSubplots = function(he, be) {
        var Re = he._fullLayout._subplots, Ue = Re.cartesian.concat(Re.gl2d || []), Xe = be ? U.findSubplotsWithAxis(Ue, be) : Ue;
        return Xe.sort(function(qe, st) {
          var it = qe.substr(1).split("y"), Tt = st.substr(1).split("y");
          return it[0] === Tt[0] ? +it[1] - +Tt[1] : +it[0] - +Tt[0];
        }), Xe;
      }, U.findSubplotsWithAxis = function(he, be) {
        for (var Re = new RegExp(be._id.charAt(0) === "x" ? "^" + be._id + "y" : be._id + "$"), Ue = [], Xe = 0; Xe < he.length; Xe++) {
          var qe = he[Xe];
          Re.test(qe) && Ue.push(qe);
        }
        return Ue;
      }, U.makeClipPaths = function(he) {
        var be = he._fullLayout;
        if (!be._hasOnlyLargeSploms) {
          var Re, Ue, Xe = { _offset: 0, _length: be.width, _id: "" }, qe = { _offset: 0, _length: be.height, _id: "" }, st = U.list(he, "x", !0), it = U.list(he, "y", !0), Tt = [];
          for (Re = 0; Re < st.length; Re++)
            for (Tt.push({ x: st[Re], y: qe }), Ue = 0; Ue < it.length; Ue++)
              Re === 0 && Tt.push({ x: Xe, y: it[Ue] }), Tt.push({ x: st[Re], y: it[Ue] });
          var Pt = be._clips.selectAll(".axesclip").data(Tt, function(rt) {
            return rt.x._id + rt.y._id;
          });
          Pt.enter().append("clipPath").classed("axesclip", !0).attr("id", function(rt) {
            return "clip" + be._uid + rt.x._id + rt.y._id;
          }).append("rect"), Pt.exit().remove(), Pt.each(function(rt) {
            m.select(this).select("rect").attr({ x: rt.x._offset || 0, y: rt.y._offset || 0, width: rt.x._length || 1, height: rt.y._length || 1 });
          });
        }
      }, U.draw = function(he, be, Re) {
        var Ue = he._fullLayout;
        be === "redraw" && Ue._paper.selectAll("g.subplot").each(function(qe) {
          var st = qe[0], it = Ue._plots[st];
          if (it) {
            var Tt = it.xaxis, Pt = it.yaxis;
            it.xaxislayer.selectAll("." + Tt._id + "tick").remove(), it.yaxislayer.selectAll("." + Pt._id + "tick").remove(), it.xaxislayer.selectAll("." + Tt._id + "tick2").remove(), it.yaxislayer.selectAll("." + Pt._id + "tick2").remove(), it.xaxislayer.selectAll("." + Tt._id + "divider").remove(), it.yaxislayer.selectAll("." + Pt._id + "divider").remove(), it.minorGridlayer && it.minorGridlayer.selectAll("path").remove(), it.gridlayer && it.gridlayer.selectAll("path").remove(), it.zerolinelayer && it.zerolinelayer.selectAll("path").remove(), Ue._infolayer.select(".g-" + Tt._id + "title").remove(), Ue._infolayer.select(".g-" + Pt._id + "title").remove();
          }
        });
        var Xe = be && be !== "redraw" ? be : U.listIds(he);
        return e.syncOrAsync(Xe.map(function(qe) {
          return function() {
            if (qe) {
              var st = U.getFromId(he, qe), it = U.drawOne(he, st, Re);
              return st._r = st.range.slice(), st._rl = e.simpleMap(st._r, st.r2l), it;
            }
          };
        }));
      }, U.drawOne = function(he, be, Re) {
        var Ue, Xe, qe;
        Re = Re || {}, be.setScale();
        var st = he._fullLayout, it = be._id, Tt = it.charAt(0), Pt = U.counterLetter(it), rt = st._plots[be._mainSubplot];
        if (rt) {
          var ut = rt[Tt + "axislayer"], Bt = be._mainLinePosition, wt = be._mainMirrorPosition, Lt = be._vals = U.calcTicks(be), Se = [be.mirror, Bt, wt].join("_");
          for (Ue = 0; Ue < Lt.length; Ue++)
            Lt[Ue].axInfo = Se;
          be._selections = {}, be._tickAngles && (be._prevTickAngles = be._tickAngles), be._tickAngles = {}, be._depth = null;
          var We = {};
          if (be.visible) {
            var nt, ft, Mt = U.makeTransTickFn(be), Nt = U.makeTransTickLabelFn(be), Zt = be.ticks === "inside", Ut = be.ticks === "outside";
            if (be.tickson === "boundaries") {
              var fr = function(tr, mr) {
                var Ct, or = [], hr = function(Rr, Dr) {
                  var Or = Rr.xbnd[Dr];
                  Or !== null && or.push(e.extendFlat({}, Rr, { x: Or }));
                };
                if (mr.length) {
                  for (Ct = 0; Ct < mr.length; Ct++)
                    hr(mr[Ct], 0);
                  hr(mr[Ct - 1], 1);
                }
                return or;
              }(0, Lt);
              ft = U.clipEnds(be, fr), nt = Zt ? ft : fr;
            } else
              ft = U.clipEnds(be, Lt), nt = Zt && be.ticklabelmode !== "period" ? ft : Lt;
            var Tr, ur = be._gridVals = ft, Kt = function(tr, mr) {
              var Ct, or, hr = [], Rr = mr.length && mr[mr.length - 1].x < mr[0].x, Dr = function(Ar, vr) {
                var xr = Ar.xbnd[vr];
                xr !== null && hr.push(e.extendFlat({}, Ar, { x: xr }));
              };
              if (tr.showdividers && mr.length) {
                for (Ct = 0; Ct < mr.length; Ct++) {
                  var Or = mr[Ct];
                  Or.text2 !== or && Dr(Or, Rr ? 1 : 0), or = Or.text2;
                }
                Dr(mr[Ct - 1], Rr ? 0 : 1);
              }
              return hr;
            }(be, Lt);
            if (!st._hasOnlyLargeSploms) {
              var $t = be._subplotsWith, er = {};
              for (Ue = 0; Ue < $t.length; Ue++) {
                Xe = $t[Ue];
                var cr = (qe = st._plots[Xe])[Pt + "axis"], gr = cr._mainAxis._id;
                if (!er[gr]) {
                  er[gr] = 1;
                  var Mr = Tt === "x" ? "M0," + cr._offset + "v" + cr._length : "M" + cr._offset + ",0h" + cr._length;
                  U.drawGrid(he, be, { vals: ur, counterAxis: cr, layer: qe.gridlayer.select("." + it), minorLayer: qe.minorGridlayer.select("." + it), path: Mr, transFn: Mt }), U.drawZeroLine(he, be, { counterAxis: cr, layer: qe.zerolinelayer, path: Mr, transFn: Mt });
                }
              }
            }
            var Ir = U.getTickSigns(be), Fr = U.getTickSigns(be, "minor");
            if (be.ticks || be.minor && be.minor.ticks) {
              var Gr, un, $r, Dn, rn = U.makeTickPath(be, Bt, Ir[2]), vn = U.makeTickPath(be, Bt, Fr[2], { minor: !0 });
              if (be._anchorAxis && be.mirror && be.mirror !== !0 ? (Gr = U.makeTickPath(be, wt, Ir[3]), un = U.makeTickPath(be, wt, Fr[3], { minor: !0 }), $r = rn + Gr, Dn = vn + un) : (Gr = "", un = "", $r = rn, Dn = vn), be.showdividers && Ut && be.tickson === "boundaries") {
                var xn = {};
                for (Ue = 0; Ue < Kt.length; Ue++)
                  xn[Kt[Ue].x] = 1;
                Tr = function(tr) {
                  return xn[tr.x] ? Gr : $r;
                };
              } else
                Tr = function(tr) {
                  return tr.minor ? Dn : $r;
                };
            }
            if (U.drawTicks(he, be, { vals: nt, layer: ut, path: Tr, transFn: Mt }), be.mirror === "allticks") {
              var $n = Object.keys(be._linepositions || {});
              for (Ue = 0; Ue < $n.length; Ue++) {
                Xe = $n[Ue], qe = st._plots[Xe];
                var Br = be._linepositions[Xe] || [], tn = Br[0], mn = Br[1], Qr = Br[2], cn = U.makeTickPath(be, tn, Qr ? Ir[0] : Fr[0], { minor: Qr }) + U.makeTickPath(be, mn, Qr ? Ir[1] : Fr[1], { minor: Qr });
                U.drawTicks(he, be, { vals: nt, layer: qe[Tt + "axislayer"], path: cn, transFn: Mt });
              }
            }
            var Hn = [];
            if (Hn.push(function() {
              return U.drawLabels(he, be, { vals: Lt, layer: ut, plotinfo: qe, transFn: Nt, labelFns: U.makeLabelFns(be, Bt) });
            }), be.type === "multicategory") {
              var _n = { x: 2, y: 10 }[Tt];
              Hn.push(function() {
                var tr = { x: "height", y: "width" }[Tt], mr = aa()[tr] + _n + (be._tickAngles[it + "tick"] ? be.tickfont.size * V : 0);
                return U.drawLabels(he, be, { vals: Qe(be, Lt), layer: ut, cls: it + "tick2", repositionOnUpdate: !0, secondary: !0, transFn: Mt, labelFns: U.makeLabelFns(be, Bt + mr * Ir[4]) });
              }), Hn.push(function() {
                return be._depth = Ir[4] * (aa("tick2")[be.side] - Bt), function(tr, mr, Ct) {
                  var or = mr._id + "divider", hr = Ct.vals, Rr = Ct.layer.selectAll("path." + or).data(hr, vt);
                  Rr.exit().remove(), Rr.enter().insert("path", ":first-child").classed(or, 1).classed("crisp", 1).call(t.stroke, mr.dividercolor).style("stroke-width", d.crispRound(tr, mr.dividerwidth, 1) + "px"), Rr.attr("transform", Ct.transFn).attr("d", Ct.path);
                }(he, be, { vals: Kt, layer: ut, path: U.makeTickPath(be, Bt, Ir[4], { len: be._depth }), transFn: Mt });
              });
            } else
              be.title.hasOwnProperty("standoff") && Hn.push(function() {
                be._depth = Ir[4] * (aa()[be.side] - Bt);
              });
            var En = x.getComponentMethod("rangeslider", "isVisible")(be);
            return Hn.push(function() {
              var tr, mr, Ct, or, hr = be.side.charAt(0), Rr = B[be.side].charAt(0), Dr = U.getPxPosition(he, be), Or = Ut ? be.ticklen : 0;
              if ((be.automargin || En) && (be.type === "multicategory" ? tr = aa("tick2") : (tr = aa(), Tt === "x" && hr === "b" && (be._depth = Math.max(tr.width > 0 ? tr.bottom - Dr : 0, Or)))), be.automargin) {
                mr = { x: 0, y: 0, r: 0, l: 0, t: 0, b: 0 };
                var Ar = [0, 1];
                if (Tt === "x") {
                  if (hr === "b" ? mr[hr] = be._depth : (mr[hr] = be._depth = Math.max(tr.width > 0 ? Dr - tr.top : 0, Or), Ar.reverse()), tr.width > 0) {
                    var vr = tr.right - (be._offset + be._length);
                    vr > 0 && (mr.xr = 1, mr.r = vr);
                    var xr = be._offset - tr.left;
                    xr > 0 && (mr.xl = 0, mr.l = xr);
                  }
                } else if (hr === "l" ? mr[hr] = be._depth = Math.max(tr.height > 0 ? Dr - tr.left : 0, Or) : (mr[hr] = be._depth = Math.max(tr.height > 0 ? tr.right - Dr : 0, Or), Ar.reverse()), tr.height > 0) {
                  var wr = tr.bottom - (be._offset + be._length);
                  wr > 0 && (mr.yb = 0, mr.b = wr);
                  var Er = be._offset - tr.top;
                  Er > 0 && (mr.yt = 1, mr.t = Er);
                }
                mr[Pt] = be.anchor === "free" ? be.position : be._anchorAxis.domain[Ar[0]], be.title.text !== st._dfltTitle[Tt] && (mr[hr] += bt(be) + (be.title.standoff || 0)), be.mirror && be.anchor !== "free" && ((Ct = { x: 0, y: 0, r: 0, l: 0, t: 0, b: 0 })[Rr] = be.linewidth, be.mirror && be.mirror !== !0 && (Ct[Rr] += Or), be.mirror === !0 || be.mirror === "ticks" ? Ct[Pt] = be._anchorAxis.domain[Ar[1]] : be.mirror !== "all" && be.mirror !== "allticks" || (Ct[Pt] = [be._counterDomainMin, be._counterDomainMax][Ar[1]]));
              }
              En && (or = x.getComponentMethod("rangeslider", "autoMarginOpts")(he, be)), typeof be.automargin == "string" && (Ge(mr, be.automargin), Ge(Ct, be.automargin)), k.autoMargin(he, Ke(be), mr), k.autoMargin(he, mt(be), Ct), k.autoMargin(he, Ft(be), or);
            }), Re.skipTitle || En && be.side === "bottom" || Hn.push(function() {
              return function(tr, mr) {
                var Ct, or = tr._fullLayout, hr = mr._id, Rr = hr.charAt(0), Dr = mr.title.font.size;
                if (mr.title.hasOwnProperty("standoff"))
                  Ct = mr._depth + mr.title.standoff + bt(mr);
                else {
                  var Or = Be(mr);
                  if (mr.type === "multicategory")
                    Ct = mr._depth;
                  else {
                    var Ar = 1.5 * Dr;
                    Or && (Ar = 0.5 * Dr, mr.ticks === "outside" && (Ar += mr.ticklen)), Ct = 10 + Ar + (mr.linewidth ? mr.linewidth - 1 : 0);
                  }
                  Or || (Ct += Rr === "x" ? mr.side === "top" ? Dr * (mr.showticklabels ? 1 : 0) : Dr * (mr.showticklabels ? 1.5 : 0.5) : mr.side === "right" ? Dr * (mr.showticklabels ? 1 : 0.5) : Dr * (mr.showticklabels ? 0.5 : 0));
                }
                var vr, xr, wr, Er, Hr = U.getPxPosition(tr, mr);
                if (Rr === "x" ? (xr = mr._offset + mr._length / 2, wr = mr.side === "top" ? Hr - Ct : Hr + Ct) : (wr = mr._offset + mr._length / 2, xr = mr.side === "right" ? Hr + Ct : Hr - Ct, vr = { rotate: "-90", offset: 0 }), mr.type !== "multicategory") {
                  var Vr = mr._selections[mr._id + "tick"];
                  if (Er = { selection: Vr, side: mr.side }, Vr && Vr.node() && Vr.node().parentNode) {
                    var Kr = d.getTranslate(Vr.node().parentNode);
                    Er.offsetLeft = Kr.x, Er.offsetTop = Kr.y;
                  }
                  mr.title.hasOwnProperty("standoff") && (Er.pad = 0);
                }
                return s.draw(tr, hr + "title", { propContainer: mr, propName: mr._name + ".title.text", placeholder: or._dfltTitle[Rr], avoid: Er, transform: vr, attributes: { x: xr, y: wr, "text-anchor": "middle" } });
              }(he, be);
            }), e.syncOrAsync(Hn);
          }
        }
        function aa(tr) {
          var mr = it + (tr || "tick");
          return We[mr] || (We[mr] = function(Ct, or) {
            var hr, Rr, Dr, Or;
            return Ct._selections[or].size() ? (hr = 1 / 0, Rr = -1 / 0, Dr = 1 / 0, Or = -1 / 0, Ct._selections[or].each(function() {
              var Ar = tt(this), vr = d.bBox(Ar.node().parentNode);
              hr = Math.min(hr, vr.top), Rr = Math.max(Rr, vr.bottom), Dr = Math.min(Dr, vr.left), Or = Math.max(Or, vr.right);
            })) : (hr = 0, Rr = 0, Dr = 0, Or = 0), { top: hr, bottom: Rr, left: Dr, right: Or, height: Rr - hr, width: Or - Dr };
          }(be, mr)), We[mr];
        }
      }, U.getTickSigns = function(he, be) {
        var Re = he._id.charAt(0), Ue = { x: "top", y: "right" }[Re], Xe = he.side === Ue ? 1 : -1, qe = [-1, 1, Xe, -Xe];
        return (be ? (he.minor || {}).ticks : he.ticks) !== "inside" == (Re === "x") && (qe = qe.map(function(st) {
          return -st;
        })), he.side && qe.push({ l: -1, t: -1, r: 1, b: 1 }[he.side.charAt(0)]), qe;
      }, U.makeTransTickFn = function(he) {
        return he._id.charAt(0) === "x" ? function(be) {
          return r(he._offset + he.l2p(be.x), 0);
        } : function(be) {
          return r(0, he._offset + he.l2p(be.x));
        };
      }, U.makeTransTickLabelFn = function(he) {
        var be = function(Xe) {
          var qe = Xe.ticklabelposition || "", st = function(nt) {
            return qe.indexOf(nt) !== -1;
          }, it = st("top"), Tt = st("left"), Pt = st("right"), rt = st("bottom"), ut = st("inside"), Bt = rt || Tt || it || Pt;
          if (!Bt && !ut)
            return [0, 0];
          var wt = Xe.side, Lt = Bt ? (Xe.tickwidth || 0) / 2 : 0, Se = 3, We = Xe.tickfont ? Xe.tickfont.size : 12;
          return (rt || it) && (Lt += We * re, Se += (Xe.linewidth || 0) / 2), (Tt || Pt) && (Lt += (Xe.linewidth || 0) / 2, Se += 3), ut && wt === "top" && (Se -= We * (1 - re)), (Tt || it) && (Lt = -Lt), wt !== "bottom" && wt !== "right" || (Se = -Se), [Bt ? Lt : 0, ut ? Se : 0];
        }(he), Re = be[0], Ue = be[1];
        return he._id.charAt(0) === "x" ? function(Xe) {
          return r(Re + he._offset + he.l2p(ot(Xe)), Ue);
        } : function(Xe) {
          return r(Ue, Re + he._offset + he.l2p(ot(Xe)));
        };
      }, U.makeTickPath = function(he, be, Re, Ue) {
        Ue || (Ue = {});
        var Xe = Ue.minor;
        if (Xe && !he.minor)
          return "";
        var qe = Ue.len !== void 0 ? Ue.len : Xe ? he.minor.ticklen : he.ticklen, st = he._id.charAt(0), it = (he.linewidth || 1) / 2;
        return st === "x" ? "M0," + (be + it * Re) + "v" + qe * Re : "M" + (be + it * Re) + ",0h" + qe * Re;
      }, U.makeLabelFns = function(he, be, Re) {
        var Ue = he.ticklabelposition || "", Xe = function($t) {
          return Ue.indexOf($t) !== -1;
        }, qe = Xe("top"), st = Xe("left"), it = Xe("right"), Tt = Xe("bottom") || st || qe || it, Pt = Xe("inside"), rt = Ue === "inside" && he.ticks === "inside" || !Pt && he.ticks === "outside" && he.tickson !== "boundaries", ut = 0, Bt = 0, wt = rt ? he.ticklen : 0;
        if (Pt ? wt *= -1 : Tt && (wt = 0), rt && (ut += wt, Re)) {
          var Lt = e.deg2rad(Re);
          ut = wt * Math.cos(Lt) + 1, Bt = wt * Math.sin(Lt);
        }
        he.showticklabels && (rt || he.showline) && (ut += 0.2 * he.tickfont.size);
        var Se, We, nt, ft, Mt, Nt = { labelStandoff: ut += (he.linewidth || 1) / 2 * (Pt ? -1 : 1), labelShift: Bt }, Zt = 0, Ut = he.side, fr = he._id.charAt(0), Tr = he.tickangle;
        if (fr === "x")
          ft = (Mt = !Pt && Ut === "bottom" || Pt && Ut === "top") ? 1 : -1, Pt && (ft *= -1), Se = Bt * ft, We = be + ut * ft, nt = Mt ? 1 : -0.2, Math.abs(Tr) === 90 && (Pt ? nt += Z : nt = Tr === -90 && Ut === "bottom" ? re : Tr === 90 && Ut === "top" ? Z : 0.5, Zt = Z / 2 * (Tr / 90)), Nt.xFn = function($t) {
            return $t.dx + Se + Zt * $t.fontSize;
          }, Nt.yFn = function($t) {
            return $t.dy + We + $t.fontSize * nt;
          }, Nt.anchorFn = function($t, er) {
            if (Tt) {
              if (st)
                return "end";
              if (it)
                return "start";
            }
            return g(er) && er !== 0 && er !== 180 ? er * ft < 0 !== Pt ? "end" : "start" : "middle";
          }, Nt.heightFn = function($t, er, cr) {
            return er < -60 || er > 60 ? -0.5 * cr : he.side === "top" !== Pt ? -cr : 0;
          };
        else if (fr === "y") {
          if (ft = (Mt = !Pt && Ut === "left" || Pt && Ut === "right") ? 1 : -1, Pt && (ft *= -1), Se = ut, We = Bt * ft, nt = 0, Pt || Math.abs(Tr) !== 90 || (nt = Tr === -90 && Ut === "left" || Tr === 90 && Ut === "right" ? re : 0.5), Pt) {
            var ur = g(Tr) ? +Tr : 0;
            if (ur !== 0) {
              var Kt = e.deg2rad(ur);
              Zt = Math.abs(Math.sin(Kt)) * re * ft, nt = 0;
            }
          }
          Nt.xFn = function($t) {
            return $t.dx + be - (Se + $t.fontSize * nt) * ft + Zt * $t.fontSize;
          }, Nt.yFn = function($t) {
            return $t.dy + We + $t.fontSize * Z;
          }, Nt.anchorFn = function($t, er) {
            return g(er) && Math.abs(er) === 90 ? "middle" : Mt ? "end" : "start";
          }, Nt.heightFn = function($t, er, cr) {
            return he.side === "right" && (er *= -1), er < -30 ? -cr : er < 30 ? -0.5 * cr : 0;
          };
        }
        return Nt;
      }, U.drawTicks = function(he, be, Re) {
        Re = Re || {};
        var Ue = be._id + "tick", Xe = [].concat(be.minor && be.minor.ticks ? Re.vals.filter(function(st) {
          return st.minor && !st.noTick;
        }) : []).concat(be.ticks ? Re.vals.filter(function(st) {
          return !st.minor && !st.noTick;
        }) : []), qe = Re.layer.selectAll("path." + Ue).data(Xe, vt);
        qe.exit().remove(), qe.enter().append("path").classed(Ue, 1).classed("ticks", 1).classed("crisp", Re.crisp !== !1).each(function(st) {
          return t.stroke(m.select(this), st.minor ? be.minor.tickcolor : be.tickcolor);
        }).style("stroke-width", function(st) {
          return d.crispRound(he, st.minor ? be.minor.tickwidth : be.tickwidth, 1) + "px";
        }).attr("d", Re.path).style("display", null), He(be, [H]), qe.attr("transform", Re.transFn);
      }, U.drawGrid = function(he, be, Re) {
        Re = Re || {};
        var Ue = be._id + "grid", Xe = be.minor && be.minor.showgrid, qe = Xe ? Re.vals.filter(function(nt) {
          return nt.minor;
        }) : [], st = be.showgrid ? Re.vals.filter(function(nt) {
          return !nt.minor;
        }) : [], it = Re.counterAxis;
        if (it && U.shouldShowZeroLine(he, be, it))
          for (var Tt = be.tickmode === "array", Pt = 0; Pt < st.length; Pt++) {
            var rt = st[Pt].x;
            if (Tt ? !rt : Math.abs(rt) < be.dtick / 100) {
              if (st = st.slice(0, Pt).concat(st.slice(Pt + 1)), !Tt)
                break;
              Pt--;
            }
          }
        be._gw = d.crispRound(he, be.gridwidth, 1);
        for (var ut = Xe ? d.crispRound(he, be.minor.gridwidth, 1) : 0, Bt = Re.layer, wt = Re.minorLayer, Lt = 1; Lt >= 0; Lt--) {
          var Se = Lt ? Bt : wt;
          if (Se) {
            var We = Se.selectAll("path." + Ue).data(Lt ? st : qe, vt);
            We.exit().remove(), We.enter().append("path").classed(Ue, 1).classed("crisp", Re.crisp !== !1), We.attr("transform", Re.transFn).attr("d", Re.path).each(function(nt) {
              return t.stroke(m.select(this), nt.minor ? be.minor.gridcolor : be.gridcolor || "#ddd");
            }).style("stroke-dasharray", function(nt) {
              return d.dashStyle(nt.minor ? be.minor.griddash : be.griddash, nt.minor ? be.minor.gridwidth : be.gridwidth);
            }).style("stroke-width", function(nt) {
              return (nt.minor ? ut : be._gw) + "px";
            }).style("display", null), typeof Re.path == "function" && We.attr("d", Re.path);
          }
        }
        He(be, [z, j]);
      }, U.drawZeroLine = function(he, be, Re) {
        Re = Re || Re;
        var Ue = be._id + "zl", Xe = U.shouldShowZeroLine(he, be, Re.counterAxis), qe = Re.layer.selectAll("path." + Ue).data(Xe ? [{ x: 0, id: be._id }] : []);
        qe.exit().remove(), qe.enter().append("path").classed(Ue, 1).classed("zl", 1).classed("crisp", Re.crisp !== !1).each(function() {
          Re.layer.selectAll("path").sort(function(st, it) {
            return K(st.id, it.id);
          });
        }), qe.attr("transform", Re.transFn).attr("d", Re.path).call(t.stroke, be.zerolinecolor || t.defaultLine).style("stroke-width", d.crispRound(he, be.zerolinewidth, be._gw || 1) + "px").style("display", null), He(be, [R]);
      }, U.drawLabels = function(he, be, Re) {
        Re = Re || {};
        var Ue = he._fullLayout, Xe = be._id, qe = Xe.charAt(0), st = Re.cls || Xe + "tick", it = Re.vals.filter(function(ft) {
          return ft.text;
        }), Tt = Re.labelFns, Pt = Re.secondary ? 0 : be.tickangle, rt = (be._prevTickAngles || {})[st], ut = Re.layer.selectAll("g." + st).data(be.showticklabels ? it : [], vt), Bt = [];
        function wt(ft, Mt) {
          ft.each(function(Nt) {
            var Zt = m.select(this), Ut = Zt.select(".text-math-group"), fr = Tt.anchorFn(Nt, Mt), Tr = Re.transFn.call(Zt.node(), Nt) + (g(Mt) && +Mt != 0 ? " rotate(" + Mt + "," + Tt.xFn(Nt) + "," + (Tt.yFn(Nt) - Nt.fontSize / 2) + ")" : ""), ur = n.lineCount(Zt), Kt = V * Nt.fontSize, $t = Tt.heightFn(Nt, g(Mt) ? +Mt : 0, (ur - 1) * Kt);
            if ($t && (Tr += r(0, $t)), Ut.empty()) {
              var er = Zt.select("text");
              er.attr({ transform: Tr, "text-anchor": fr }), er.style("opacity", 1), be._adjustTickLabelsOverflow && be._adjustTickLabelsOverflow();
            } else {
              var cr = d.bBox(Ut.node()).width * { end: -0.5, start: 0.5 }[fr];
              Ut.attr("transform", Tr + r(cr, 0));
            }
          });
        }
        ut.enter().append("g").classed(st, 1).append("text").attr("text-anchor", "middle").each(function(ft) {
          var Mt = m.select(this), Nt = he._promises.length;
          Mt.call(n.positionText, Tt.xFn(ft), Tt.yFn(ft)).call(d.font, ft.font, ft.fontSize, ft.fontColor).text(ft.text).call(n.convertToTspans, he), he._promises[Nt] ? Bt.push(he._promises.pop().then(function() {
            wt(Mt, Pt);
          })) : wt(Mt, Pt);
        }), He(be, [Y]), ut.exit().remove(), Re.repositionOnUpdate && ut.each(function(ft) {
          m.select(this).select("text").call(n.positionText, Tt.xFn(ft), Tt.yFn(ft));
        }), be._adjustTickLabelsOverflow = function() {
          var ft = be.ticklabeloverflow;
          if (ft && ft !== "allow") {
            var Mt = ft.indexOf("hide") !== -1, Nt = be._id.charAt(0) === "x", Zt = 0, Ut = Nt ? he._fullLayout.width : he._fullLayout.height;
            if (ft.indexOf("domain") !== -1) {
              var fr = e.simpleMap(be.range, be.r2l);
              Zt = be.l2p(fr[0]) + be._offset, Ut = be.l2p(fr[1]) + be._offset;
            }
            var Tr = Math.min(Zt, Ut), ur = Math.max(Zt, Ut), Kt = be.side, $t = 1 / 0, er = -1 / 0;
            for (var cr in ut.each(function(Ir) {
              var Fr = m.select(this);
              if (Fr.select(".text-math-group").empty()) {
                var Gr = d.bBox(Fr.node()), un = 0;
                Nt ? (Gr.right > ur || Gr.left < Tr) && (un = 1) : (Gr.bottom > ur || Gr.top + (be.tickangle ? 0 : Ir.fontSize / 4) < Tr) && (un = 1);
                var $r = Fr.select("text");
                un ? Mt && $r.style("opacity", 0) : ($r.style("opacity", 1), $t = Kt === "bottom" || Kt === "right" ? Math.min($t, Nt ? Gr.top : Gr.left) : -1 / 0, er = Kt === "top" || Kt === "left" ? Math.max(er, Nt ? Gr.bottom : Gr.right) : 1 / 0);
              }
            }), Ue._plots) {
              var gr = Ue._plots[cr];
              if (be._id === gr.xaxis._id || be._id === gr.yaxis._id) {
                var Mr = Nt ? gr.yaxis : gr.xaxis;
                Mr && (Mr["_visibleLabelMin_" + be._id] = $t, Mr["_visibleLabelMax_" + be._id] = er);
              }
            }
          }
        }, be._hideCounterAxisInsideTickLabels = function(ft) {
          var Mt = be._id.charAt(0) === "x", Nt = [];
          for (var Zt in Ue._plots) {
            var Ut = Ue._plots[Zt];
            be._id !== Ut.xaxis._id && be._id !== Ut.yaxis._id || Nt.push(Mt ? Ut.yaxis : Ut.xaxis);
          }
          Nt.forEach(function(fr, Tr) {
            fr && Be(fr) && (ft || [R, j, z, H, Y]).forEach(function(ur) {
              var Kt = ur.K === "tick" && ur.L === "text" && be.ticklabelmode === "period", $t = Ue._plots[be._mainSubplot];
              (ur.K === R.K ? $t.zerolinelayer.selectAll("." + be._id + "zl") : ur.K === j.K ? $t.minorGridlayer.selectAll("." + be._id) : ur.K === z.K ? $t.gridlayer.selectAll("." + be._id) : $t[be._id.charAt(0) + "axislayer"]).each(function() {
                var er = m.select(this);
                ur.L && (er = er.selectAll(ur.L)), er.each(function(cr) {
                  var gr = be.l2p(Kt ? ot(cr) : cr.x) + be._offset, Mr = m.select(this);
                  gr < be["_visibleLabelMax_" + fr._id] && gr > be["_visibleLabelMin_" + fr._id] ? Mr.style("display", "none") : ur.K !== "tick" || Tr || Mr.style("display", null);
                });
              });
            });
          });
        }, wt(ut, rt + 1 ? rt : Pt);
        var Lt = null;
        be._selections && (be._selections[st] = ut);
        var Se = [function() {
          return Bt.length && Promise.all(Bt);
        }];
        be.automargin && Ue._redrawFromAutoMarginCount && rt === 90 ? (Lt = 90, Se.push(function() {
          wt(ut, rt);
        })) : Se.push(function() {
          if (wt(ut, Pt), it.length && qe === "x" && !g(Pt) && (be.type !== "log" || String(be.dtick).charAt(0) !== "D")) {
            Lt = 0;
            var ft, Mt = 0, Nt = [];
            if (ut.each(function(Fr) {
              Mt = Math.max(Mt, Fr.fontSize);
              var Gr = be.l2p(Fr.x), un = tt(this), $r = d.bBox(un.node());
              Nt.push({ top: 0, bottom: 10, height: 10, left: Gr - $r.width / 2, right: Gr + $r.width / 2 + 2, width: $r.width + 2 });
            }), be.tickson !== "boundaries" && !be.showdividers || Re.secondary) {
              var Zt = it.length, Ut = Math.abs((it[Zt - 1].x - it[0].x) * be._m) / (Zt - 1), fr = be.ticklabelposition || "", Tr = function(Fr) {
                return fr.indexOf(Fr) !== -1;
              }, ur = Tr("top"), Kt = Tr("left"), $t = Tr("right"), er = Tr("bottom") || Kt || ur || $t ? (be.tickwidth || 0) + 6 : 0, cr = Ut < 2.5 * Mt || be.type === "multicategory" || be._name === "realaxis";
              for (ft = 0; ft < Nt.length - 1; ft++)
                if (e.bBoxIntersect(Nt[ft], Nt[ft + 1], er)) {
                  Lt = cr ? 90 : 30;
                  break;
                }
            } else {
              var gr = 2;
              for (be.ticks && (gr += be.tickwidth / 2), ft = 0; ft < Nt.length; ft++) {
                var Mr = it[ft].xbnd, Ir = Nt[ft];
                if (Mr[0] !== null && Ir.left - be.l2p(Mr[0]) < gr || Mr[1] !== null && be.l2p(Mr[1]) - Ir.right < gr) {
                  Lt = 90;
                  break;
                }
              }
            }
            Lt && wt(ut, Lt);
          }
        }), be._tickAngles && Se.push(function() {
          be._tickAngles[st] = Lt === null ? g(Pt) ? Pt : 0 : Lt;
        });
        var We = be._anchorAxis;
        We && We.autorange && Be(be) && !X(Ue, be._id) && (Ue._insideTickLabelsAutorange || (Ue._insideTickLabelsAutorange = {}), Ue._insideTickLabelsAutorange[We._name + ".autorange"] = We.autorange, Se.push(function() {
          ut.each(function(ft, Mt) {
            var Nt = tt(this);
            Nt.select(".text-math-group").empty() && (be._vals[Mt].bb = d.bBox(Nt.node()));
          });
        }));
        var nt = e.syncOrAsync(Se);
        return nt && nt.then && he._promises.push(nt), nt;
      }, U.getPxPosition = function(he, be) {
        var Re, Ue = he._fullLayout._size, Xe = be._id.charAt(0), qe = be.side;
        return be.anchor !== "free" ? Re = be._anchorAxis : Xe === "x" ? Re = { _offset: Ue.t + (1 - (be.position || 0)) * Ue.h, _length: 0 } : Xe === "y" && (Re = { _offset: Ue.l + (be.position || 0) * Ue.w, _length: 0 }), qe === "top" || qe === "left" ? Re._offset : qe === "bottom" || qe === "right" ? Re._offset + Re._length : void 0;
      }, U.shouldShowZeroLine = function(he, be, Re) {
        var Ue = e.simpleMap(be.range, be.r2l);
        return Ue[0] * Ue[1] <= 0 && be.zeroline && (be.type === "linear" || be.type === "-") && !(be.rangebreaks && be.maskBreaks(0) === E) && (yt(be, 0) || !function(Xe, qe, st, it) {
          var Tt = st._mainAxis;
          if (!Tt)
            return;
          var Pt = Xe._fullLayout, rt = qe._id.charAt(0), ut = U.counterLetter(qe._id), Bt = qe._offset + (Math.abs(it[0]) < Math.abs(it[1]) == (rt === "x") ? 0 : qe._length);
          function wt(ft) {
            if (!ft.showline || !ft.linewidth)
              return !1;
            var Mt = Math.max((ft.linewidth + qe.zerolinewidth) / 2, 1);
            function Nt(fr) {
              return typeof fr == "number" && Math.abs(fr - Bt) < Mt;
            }
            if (Nt(ft._mainLinePosition) || Nt(ft._mainMirrorPosition))
              return !0;
            var Zt = ft._linepositions || {};
            for (var Ut in Zt)
              if (Nt(Zt[Ut][0]) || Nt(Zt[Ut][1]))
                return !0;
          }
          var Lt = Pt._plots[st._mainSubplot];
          if (!(Lt.mainplotinfo || Lt).overlays.length)
            return wt(st);
          for (var Se = U.list(Xe, ut), We = 0; We < Se.length; We++) {
            var nt = Se[We];
            if (nt._mainAxis === Tt && wt(nt))
              return !0;
          }
        }(he, be, Re, Ue) || function(Xe, qe) {
          for (var st = Xe._fullData, it = qe._mainSubplot, Tt = qe._id.charAt(0), Pt = 0; Pt < st.length; Pt++) {
            var rt = st[Pt];
            if (rt.visible === !0 && rt.xaxis + rt.yaxis === it && (x.traceIs(rt, "bar-like") && rt.orientation === { x: "h", y: "v" }[Tt] || rt.fill && rt.fill.charAt(rt.fill.length - 1) === Tt))
              return !0;
          }
          return !1;
        }(he, be));
      }, U.clipEnds = function(he, be) {
        return be.filter(function(Re) {
          return yt(he, Re.x);
        });
      }, U.allowAutoMargin = function(he) {
        for (var be = U.list(he, "", !0), Re = 0; Re < be.length; Re++) {
          var Ue = be[Re];
          Ue.automargin && (k.allowAutoMargin(he, Ke(Ue)), Ue.mirror && k.allowAutoMargin(he, mt(Ue))), x.getComponentMethod("rangeslider", "isVisible")(Ue) && k.allowAutoMargin(he, Ft(Ue));
        }
      }, U.swap = function(he, be) {
        for (var Re = function(Xe, qe) {
          var st, it, Tt = [];
          for (st = 0; st < qe.length; st++) {
            var Pt = [], rt = Xe._fullData[qe[st]].xaxis, ut = Xe._fullData[qe[st]].yaxis;
            if (rt && ut) {
              for (it = 0; it < Tt.length; it++)
                Tt[it].x.indexOf(rt) === -1 && Tt[it].y.indexOf(ut) === -1 || Pt.push(it);
              if (Pt.length) {
                var Bt, wt = Tt[Pt[0]];
                if (Pt.length > 1)
                  for (it = 1; it < Pt.length; it++)
                    Bt = Tt[Pt[it]], Vt(wt.x, Bt.x), Vt(wt.y, Bt.y);
                Vt(wt.x, [rt]), Vt(wt.y, [ut]);
              } else
                Tt.push({ x: [rt], y: [ut] });
            }
          }
          return Tt;
        }(he, be), Ue = 0; Ue < Re.length; Ue++)
          Xt(he, Re[Ue].x, Re[Ue].y);
      };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../components/titles": 476, "../../constants/alignment": 483, "../../constants/numerical": 491, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/plots": 628, "../../registry": 647, "./autorange": 565, "./axis_autotype": 567, "./axis_ids": 570, "./clean_ticks": 572, "./layout_attributes": 579, "./set_convert": 585, "@plotly/d3": 58, "fast-isnumeric": 190 }], 567: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../constants/numerical").BADNUM, x = g.isArrayOrTypedArray, e = g.isDateTime, r = g.cleanNumber, n = Math.round;
      function s(d, u) {
        return u ? m(d) : typeof d == "number";
      }
      function t(d) {
        return Math.max(1, (d - 1) / 1e3);
      }
      Q.exports = function(d, u, o) {
        var h = d, l = o.noMultiCategory;
        if (x(h) && !h.length)
          return "-";
        if (!l && function(y) {
          return x(y[0]) && x(y[1]);
        }(h))
          return "multicategory";
        if (l && Array.isArray(h[0])) {
          for (var i = [], p = 0; p < h.length; p++)
            if (x(h[p]))
              for (var c = 0; c < h[p].length; c++)
                i.push(h[p][c]);
          h = i;
        }
        if (function(y, f) {
          for (var _ = y.length, b = t(_), w = 0, T = 0, L = {}, A = 0; A < _; A += b) {
            var I = n(A), P = y[I], S = String(P);
            L[S] || (L[S] = 1, e(P, f) && w++, m(P) && T++);
          }
          return w > 2 * T;
        }(h, u))
          return "date";
        var a = o.autotypenumbers !== "strict";
        return function(y, f) {
          for (var _ = y.length, b = t(_), w = 0, T = 0, L = {}, A = 0; A < _; A += b) {
            var I = n(A), P = y[I], S = String(P);
            if (!L[S]) {
              L[S] = 1;
              var E = typeof P;
              E === "boolean" ? T++ : (f ? r(P) !== k : E === "number") ? w++ : E === "string" && T++;
            }
          }
          return T > 2 * w;
        }(h, a) ? "category" : function(y, f) {
          for (var _ = y.length, b = 0; b < _; b++)
            if (s(y[b], f))
              return !0;
          return !1;
        }(h, a) ? "linear" : "-";
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "fast-isnumeric": 190 }], 568: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../registry"), k = v("../../lib"), x = v("../../plot_api/plot_template"), e = v("../array_container_defaults"), r = v("./layout_attributes"), n = v("./tick_value_defaults"), s = v("./tick_mark_defaults"), t = v("./tick_label_defaults"), d = v("./prefix_suffix_defaults"), u = v("./category_order_defaults"), o = v("./line_grid_defaults"), h = v("./set_convert"), l = v("./constants").WEEKDAY_PATTERN, i = v("./constants").HOUR_PATTERN;
      function p(y, f, _) {
        function b(E, R) {
          return k.coerce(y, f, r.rangebreaks, E, R);
        }
        if (b("enabled")) {
          var w = b("bounds");
          if (w && w.length >= 2) {
            var T, L, A = "";
            if (w.length === 2) {
              for (T = 0; T < 2; T++)
                if (L = a(w[T])) {
                  A = l;
                  break;
                }
            }
            var I = b("pattern", A);
            if (I === l)
              for (T = 0; T < 2; T++)
                (L = a(w[T])) && (f.bounds[T] = w[T] = L - 1);
            if (I)
              for (T = 0; T < 2; T++)
                switch (L = w[T], I) {
                  case l:
                    if (!m(L) || (L = +L) !== Math.floor(L) || L < 0 || L >= 7)
                      return void (f.enabled = !1);
                    f.bounds[T] = w[T] = L;
                    break;
                  case i:
                    if (!m(L) || (L = +L) < 0 || L > 24)
                      return void (f.enabled = !1);
                    f.bounds[T] = w[T] = L;
                }
            if (_.autorange === !1) {
              var P = _.range;
              if (P[0] < P[1]) {
                if (w[0] < P[0] && w[1] > P[1])
                  return void (f.enabled = !1);
              } else if (w[0] > P[0] && w[1] < P[1])
                return void (f.enabled = !1);
            }
          } else {
            var S = b("values");
            if (!S || !S.length)
              return void (f.enabled = !1);
            b("dvalue");
          }
        }
      }
      Q.exports = function(y, f, _, b, w) {
        var T, L = b.letter, A = b.font || {}, I = b.splomStash || {}, P = _("visible", !b.visibleDflt), S = f._template || {}, E = f.type || S.type || "-";
        E === "date" && (g.getComponentMethod("calendars", "handleDefaults")(y, f, "calendar", b.calendar), b.noTicklabelmode || (T = _("ticklabelmode")));
        var R = "";
        b.noTicklabelposition && E !== "multicategory" || (R = k.coerce(y, f, { ticklabelposition: { valType: "enumerated", dflt: "outside", values: T === "period" ? ["outside", "inside"] : L === "x" ? ["outside", "inside", "outside left", "inside left", "outside right", "inside right"] : ["outside", "inside", "outside top", "inside top", "outside bottom", "inside bottom"] } }, "ticklabelposition")), b.noTicklabeloverflow || _("ticklabeloverflow", R.indexOf("inside") !== -1 ? "hide past domain" : E === "category" || E === "multicategory" ? "allow" : "hide past div"), h(f, w);
        var z = !f.isValidRange(y.range);
        z && b.reverseDflt && (z = "reversed"), !_("autorange", z) || E !== "linear" && E !== "-" || _("rangemode"), _("range"), f.cleanRange(), u(y, f, _, b), E === "category" || b.noHover || _("hoverformat");
        var j = _("color"), H = j !== r.color.dflt ? j : A.color, Y = I.label || w._dfltTitle[L];
        if (d(y, f, _, E, b), !P)
          return f;
        _("title.text", Y), k.coerceFont(_, "title.font", { family: A.family, size: k.bigFont(A.size), color: H }), n(y, f, _, E);
        var J = b.hasMinor;
        if (J && (x.newContainer(f, "minor"), n(y, f, _, E, { isMinor: !0 })), t(y, f, _, E, b), s(y, f, _, b), J) {
          var W = b.isMinor;
          b.isMinor = !0, s(y, f, _, b), b.isMinor = W;
        }
        o(y, f, _, { dfltColor: j, bgColor: b.bgColor, showGrid: b.showGrid, hasMinor: J, attributes: r }), !J || f.minor.ticks || f.minor.showgrid || delete f.minor, (f.showline || f.ticks) && _("mirror"), b.automargin && _("automargin");
        var Z, re = E === "multicategory";
        if (b.noTickson || E !== "category" && !re || !f.ticks && !f.showgrid || (re && (Z = "boundaries"), _("tickson", Z) === "boundaries" && delete f.ticklabelposition), re && _("showdividers") && (_("dividercolor"), _("dividerwidth")), E === "date")
          if (e(y, f, { name: "rangebreaks", inclusionAttr: "enabled", handleItemDefaults: p }), f.rangebreaks.length) {
            for (var V = 0; V < f.rangebreaks.length; V++)
              if (f.rangebreaks[V].pattern === l) {
                f._hasDayOfWeekBreaks = !0;
                break;
              }
            if (h(f, w), w._has("scattergl") || w._has("splom"))
              for (var B = 0; B < b.data.length; B++) {
                var U = b.data[B];
                U.type !== "scattergl" && U.type !== "splom" || (U.visible = !1, k.warn(U.type + " traces do not work on axes with rangebreaks. Setting trace " + U.index + " to `visible: false`."));
              }
          } else
            delete f.rangebreaks;
        return f;
      };
      var c = { sun: 1, mon: 2, tue: 3, wed: 4, thu: 5, fri: 6, sat: 7 };
      function a(y) {
        if (typeof y == "string")
          return c[y.substr(0, 3).toLowerCase()];
      }
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../registry": 647, "../array_container_defaults": 561, "./category_order_defaults": 571, "./constants": 573, "./layout_attributes": 579, "./line_grid_defaults": 581, "./prefix_suffix_defaults": 583, "./set_convert": 585, "./tick_label_defaults": 587, "./tick_mark_defaults": 588, "./tick_value_defaults": 589, "fast-isnumeric": 190 }], 569: [function(v, Q, $) {
      var m = v("../../constants/docs"), g = m.FORMAT_LINK, k = m.DATE_FORMAT_LINK;
      function x(r, n) {
        return ["Sets the " + r + " formatting rule" + (n ? "for `" + n + "` " : ""), "using d3 formatting mini-languages", "which are very similar to those in Python. For numbers, see: " + g + "."].join(" ");
      }
      function e(r, n) {
        return x(r, n) + [" And for dates see: " + k + ".", "We add two items to d3's date formatter:", "*%h* for half of the year as a decimal number as well as", "*%{n}f* for fractional seconds", "with n digits. For example, *2016-10-13 09:15:23.456* with tickformat", "*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ");
      }
      Q.exports = { axisHoverFormat: function(r, n) {
        return { valType: "string", dflt: "", editType: "none", description: (n ? x : e)("hover text", r) + ["By default the values are formatted using " + (n ? "generic number format" : "`" + r + "axis.hoverformat`") + "."].join(" ") };
      }, descriptionOnlyNumbers: x, descriptionWithDates: e };
    }, { "../../constants/docs": 486 }], 570: [function(v, Q, $) {
      var m = v("../../registry"), g = v("./constants");
      function k(x, e) {
        if (e && e.length) {
          for (var r = 0; r < e.length; r++)
            if (e[r][x])
              return !0;
        }
        return !1;
      }
      $.id2name = function(x) {
        if (typeof x == "string" && x.match(g.AX_ID_PATTERN)) {
          var e = x.split(" ")[0].substr(1);
          return e === "1" && (e = ""), x.charAt(0) + "axis" + e;
        }
      }, $.name2id = function(x) {
        if (x.match(g.AX_NAME_PATTERN)) {
          var e = x.substr(5);
          return e === "1" && (e = ""), x.charAt(0) + e;
        }
      }, $.cleanId = function(x, e, r) {
        var n = /( domain)$/.test(x);
        if (typeof x == "string" && x.match(g.AX_ID_PATTERN) && (!e || x.charAt(0) === e) && (!n || r)) {
          var s = x.split(" ")[0].substr(1).replace(/^0+/, "");
          return s === "1" && (s = ""), x.charAt(0) + s + (n && r ? " domain" : "");
        }
      }, $.list = function(x, e, r) {
        var n = x._fullLayout;
        if (!n)
          return [];
        var s, t = $.listIds(x, e), d = new Array(t.length);
        for (s = 0; s < t.length; s++) {
          var u = t[s];
          d[s] = n[u.charAt(0) + "axis" + u.substr(1)];
        }
        if (!r) {
          var o = n._subplots.gl3d || [];
          for (s = 0; s < o.length; s++) {
            var h = n[o[s]];
            e ? d.push(h[e + "axis"]) : d.push(h.xaxis, h.yaxis, h.zaxis);
          }
        }
        return d;
      }, $.listIds = function(x, e) {
        var r = x._fullLayout;
        if (!r)
          return [];
        var n = r._subplots;
        return e ? n[e + "axis"] : n.xaxis.concat(n.yaxis);
      }, $.getFromId = function(x, e, r) {
        var n = x._fullLayout;
        return e = e === void 0 || typeof e != "string" ? e : e.replace(" domain", ""), r === "x" ? e = e.replace(/y[0-9]*/, "") : r === "y" && (e = e.replace(/x[0-9]*/, "")), n[$.id2name(e)];
      }, $.getFromTrace = function(x, e, r) {
        var n = x._fullLayout, s = null;
        if (m.traceIs(e, "gl3d")) {
          var t = e.scene;
          t.substr(0, 5) === "scene" && (s = n[t][r + "axis"]);
        } else
          s = $.getFromId(x, e[r + "axis"] || r);
        return s;
      }, $.idSort = function(x, e) {
        var r = x.charAt(0), n = e.charAt(0);
        return r !== n ? r > n ? 1 : -1 : +(x.substr(1) || 1) - +(e.substr(1) || 1);
      }, $.ref2id = function(x) {
        return !!/^[xyz]/.test(x) && x.split(" ")[0];
      }, $.isLinked = function(x, e) {
        return k(e, x._axisMatchGroups) || k(e, x._axisConstraintGroups);
      };
    }, { "../../registry": 647, "./constants": 573 }], 571: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        if (g.type === "category") {
          var e, r = m.categoryarray, n = Array.isArray(r) && r.length > 0;
          n && (e = "array");
          var s, t = k("categoryorder", e);
          t === "array" && (s = k("categoryarray")), n || t !== "array" || (t = g.categoryorder = "trace"), t === "trace" ? g._initialCategories = [] : t === "array" ? g._initialCategories = s.slice() : (s = function(d, u) {
            var o, h, l, i = u.dataAttr || d._id.charAt(0), p = {};
            if (u.axData)
              o = u.axData;
            else
              for (o = [], h = 0; h < u.data.length; h++) {
                var c = u.data[h];
                c[i + "axis"] === d._id && o.push(c);
              }
            for (h = 0; h < o.length; h++) {
              var a = o[h][i];
              for (l = 0; l < a.length; l++) {
                var y = a[l];
                y != null && (p[y] = 1);
              }
            }
            return Object.keys(p);
          }(g, x).sort(), t === "category ascending" ? g._initialCategories = s : t === "category descending" && (g._initialCategories = s.reverse()));
        }
      };
    }, {}], 572: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../constants/numerical"), x = k.ONEDAY, e = k.ONEWEEK;
      $.dtick = function(r, n) {
        var s = n === "log", t = n === "date", d = n === "category", u = t ? x : 1;
        if (!r)
          return u;
        if (m(r))
          return (r = Number(r)) <= 0 ? u : d ? Math.max(1, Math.round(r)) : t ? Math.max(0.1, r) : r;
        if (typeof r != "string" || !t && !s)
          return u;
        var o = r.charAt(0), h = r.substr(1);
        return (h = m(h) ? Number(h) : 0) <= 0 || !(t && o === "M" && h === Math.round(h) || s && o === "L" || s && o === "D" && (h === 1 || h === 2)) ? u : r;
      }, $.tick0 = function(r, n, s, t) {
        return n === "date" ? g.cleanDate(r, g.dateTick0(s, t % e == 0 ? 1 : 0)) : t !== "D1" && t !== "D2" ? m(r) ? Number(r) : 0 : void 0;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "fast-isnumeric": 190 }], 573: [function(v, Q, $) {
      var m = v("../../lib/regex").counter;
      Q.exports = { idRegex: { x: m("x", "( domain)?"), y: m("y", "( domain)?") }, attrRegex: m("[xy]axis"), xAxisMatch: m("xaxis"), yAxisMatch: m("yaxis"), AX_ID_PATTERN: /^[xyz][0-9]*( domain)?$/, AX_NAME_PATTERN: /^[xyz]axis[0-9]*$/, SUBPLOT_PATTERN: /^x([0-9]*)y([0-9]*)$/, HOUR_PATTERN: "hour", WEEKDAY_PATTERN: "day of week", MINDRAG: 8, MINZOOM: 20, DRAGGERSIZE: 20, REDRAWDELAY: 50, DFLTRANGEX: [-1, 6], DFLTRANGEY: [-1, 4], traceLayerClasses: ["imagelayer", "heatmaplayer", "contourcarpetlayer", "contourlayer", "funnellayer", "waterfalllayer", "barlayer", "carpetlayer", "violinlayer", "boxlayer", "ohlclayer", "scattercarpetlayer", "scatterlayer"], clipOnAxisFalseQuery: [".scatterlayer", ".barlayer", ".funnellayer", ".waterfalllayer"], layerValue2layerClass: { "above traces": "above", "below traces": "below" } };
    }, { "../../lib/regex": 532 }], 574: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./autorange"), k = v("./axis_ids").id2name, x = v("./layout_attributes"), e = v("./scale_zoom"), r = v("./set_convert"), n = v("../../constants/numerical").ALMOST_EQUAL, s = v("../../constants/alignment").FROM_BL;
      function t(p, c, a) {
        var y = a.axIds, f = a.layoutOut, _ = a.hasImage, b = f._axisConstraintGroups, w = f._axisMatchGroups, T = c._id, L = T.charAt(0), A = ((f._splomAxes || {})[L] || {})[T] || {}, I = c._id, P = I.charAt(0) === "x";
        function S(ee, N) {
          return m.coerce(p, c, x, ee, N);
        }
        c._matchGroup = null, c._constraintGroup = null, S("constrain", _ ? "domain" : "range"), m.coerce(p, c, { constraintoward: { valType: "enumerated", values: P ? ["left", "center", "right"] : ["bottom", "middle", "top"], dflt: P ? "center" : "middle" } }, "constraintoward");
        var E, R, z = c.type, j = [];
        for (E = 0; E < y.length; E++)
          (R = y[E]) !== I && f[k(R)].type === z && j.push(R);
        var H = u(b, I);
        if (H) {
          var Y = [];
          for (E = 0; E < j.length; E++)
            H[R = j[E]] || Y.push(R);
          j = Y;
        }
        var J, W, Z = j.length;
        Z && (p.matches || A.matches) && (J = m.coerce(p, c, { matches: { valType: "enumerated", values: j, dflt: j.indexOf(A.matches) !== -1 ? A.matches : void 0 } }, "matches"));
        var re = _ && !P ? c.anchor : void 0;
        if (Z && !J && (p.scaleanchor || re) && (W = m.coerce(p, c, { scaleanchor: { valType: "enumerated", values: j } }, "scaleanchor", re)), J) {
          c._matchGroup = o(w, I, J, 1);
          var V = f[k(J)], B = d(f, c) / d(f, V);
          P !== (J.charAt(0) === "x") && (B = (P ? "x" : "y") + B), o(b, I, J, B);
        } else
          p.matches && y.indexOf(p.matches) !== -1 && m.warn("ignored " + c._name + '.matches: "' + p.matches + '" to avoid an infinite loop');
        if (W) {
          var U = S("scaleratio");
          U || (U = c.scaleratio = 1), o(b, I, W, U);
        } else
          p.scaleanchor && y.indexOf(p.scaleanchor) !== -1 && m.warn("ignored " + c._name + '.scaleanchor: "' + p.scaleanchor + '" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.');
      }
      function d(p, c) {
        var a = c.domain;
        return a || (a = p[k(c.overlaying)].domain), a[1] - a[0];
      }
      function u(p, c) {
        for (var a = 0; a < p.length; a++)
          if (p[a][c])
            return p[a];
        return null;
      }
      function o(p, c, a, y) {
        var f, _, b, w, T, L = u(p, c);
        L === null ? ((L = {})[c] = 1, T = p.length, p.push(L)) : T = p.indexOf(L);
        var A = Object.keys(L);
        for (f = 0; f < p.length; f++)
          if (b = p[f], f !== T && b[a]) {
            var I = b[a];
            for (_ = 0; _ < A.length; _++)
              b[w = A[_]] = h(I, h(y, L[w]));
            return void p.splice(T, 1);
          }
        if (y !== 1)
          for (_ = 0; _ < A.length; _++) {
            var P = A[_];
            L[P] = h(y, L[P]);
          }
        L[a] = 1;
      }
      function h(p, c) {
        var a, y, f = "", _ = "";
        typeof p == "string" && (a = (f = p.match(/^[xy]*/)[0]).length, p = +p.substr(a)), typeof c == "string" && (y = (_ = c.match(/^[xy]*/)[0]).length, c = +c.substr(y));
        var b = p * c;
        return a || y ? a && y && f.charAt(0) !== _.charAt(0) ? a === y ? b : (a > y ? f.substr(y) : _.substr(a)) + b : f + _ + p * c : b;
      }
      function l(p, c) {
        for (var a = c._size, y = a.h / a.w, f = {}, _ = Object.keys(p), b = 0; b < _.length; b++) {
          var w = _[b], T = p[w];
          if (typeof T == "string") {
            var L = T.match(/^[xy]*/)[0], A = L.length;
            T = +T.substr(A);
            for (var I = L.charAt(0) === "y" ? y : 1 / y, P = 0; P < A; P++)
              T *= I;
          }
          f[w] = T;
        }
        return f;
      }
      function i(p, c) {
        var a = p._inputDomain, y = s[p.constraintoward], f = a[0] + (a[1] - a[0]) * y;
        p.domain = p._input.domain = [f + (a[0] - f) / c, f + (a[1] - f) / c], p.setScale();
      }
      $.handleDefaults = function(p, c, a) {
        var y, f, _, b, w, T, L, A, I = a.axIds, P = a.axHasImage, S = c._axisConstraintGroups = [], E = c._axisMatchGroups = [];
        for (y = 0; y < I.length; y++)
          t(w = p[b = k(I[y])], T = c[b], { axIds: I, layoutOut: c, hasImage: P[b] });
        function R(V, B) {
          for (y = 0; y < V.length; y++)
            for (_ in f = V[y])
              c[k(_)][B] = f;
        }
        for (R(E, "_matchGroup"), y = 0; y < S.length; y++)
          for (_ in f = S[y])
            if ((T = c[k(_)]).fixedrange) {
              for (var z in f) {
                var j = k(z);
                (p[j] || {}).fixedrange === !1 && m.warn("fixedrange was specified as false for axis " + j + " but was overridden because another axis in its constraint group has fixedrange true"), c[j].fixedrange = !0;
              }
              break;
            }
        for (y = 0; y < S.length; ) {
          for (_ in f = S[y]) {
            (T = c[k(_)])._matchGroup && Object.keys(T._matchGroup).length === Object.keys(f).length && (S.splice(y, 1), y--);
            break;
          }
          y++;
        }
        R(S, "_constraintGroup");
        var H = ["constrain", "range", "autorange", "rangemode", "rangebreaks", "categoryorder", "categoryarray"], Y = !1, J = !1;
        function W() {
          A = T[L], L === "rangebreaks" && (J = T._hasDayOfWeekBreaks);
        }
        for (y = 0; y < E.length; y++) {
          f = E[y];
          for (var Z = 0; Z < H.length; Z++) {
            var re;
            for (_ in L = H[Z], A = null, f)
              if (w = p[b = k(_)], T = c[b], L in T) {
                if (!T.matches && (re = T, L in w)) {
                  W();
                  break;
                }
                A === null && L in w && W();
              }
            if (L === "range" && A && (Y = !0), L === "autorange" && A === null && Y && (A = !1), A === null && L in re && (A = re[L]), A !== null)
              for (_ in f)
                (T = c[k(_)])[L] = L === "range" ? A.slice() : A, L === "rangebreaks" && (T._hasDayOfWeekBreaks = J, r(T, c));
          }
        }
      }, $.enforce = function(p) {
        var c, a, y, f, _, b, w, T, L = p._fullLayout, A = L._axisConstraintGroups || [];
        for (c = 0; c < A.length; c++) {
          y = l(A[c], L);
          var I = Object.keys(y), P = 1 / 0, S = 0, E = 1 / 0, R = {}, z = {}, j = !1;
          for (a = 0; a < I.length; a++)
            z[f = I[a]] = _ = L[k(f)], _._inputDomain ? _.domain = _._inputDomain.slice() : _._inputDomain = _.domain.slice(), _._inputRange || (_._inputRange = _.range.slice()), _.setScale(), R[f] = b = Math.abs(_._m) / y[f], P = Math.min(P, b), _.constrain !== "domain" && _._constraintShrinkable || (E = Math.min(E, b)), delete _._constraintShrinkable, S = Math.max(S, b), _.constrain === "domain" && (j = !0);
          if (!(P > n * S) || j) {
            for (a = 0; a < I.length; a++)
              if (b = R[f = I[a]], w = (_ = z[f]).constrain, b !== E || w === "domain")
                if (T = b / E, w === "range")
                  e(_, T);
                else {
                  var H = _._inputDomain, Y = (_.domain[1] - _.domain[0]) / (H[1] - H[0]), J = (_.r2l(_.range[1]) - _.r2l(_.range[0])) / (_.r2l(_._inputRange[1]) - _.r2l(_._inputRange[0]));
                  if ((T /= Y) * J < 1) {
                    _.domain = _._input.domain = H.slice(), e(_, T);
                    continue;
                  }
                  if (J < 1 && (_.range = _._input.range = _._inputRange.slice(), T *= J), _.autorange) {
                    var W = _.r2l(_.range[0]), Z = _.r2l(_.range[1]), re = (W + Z) / 2, V = re, B = re, U = Math.abs(Z - re), ee = re - U * T * 1.0001, N = re + U * T * 1.0001, K = g.makePadFn(L, _, 0), X = g.makePadFn(L, _, 1);
                    i(_, T);
                    var te, ie, le = Math.abs(_._m), oe = g.concatExtremes(p, _), ve = oe.min, ue = oe.max;
                    for (ie = 0; ie < ve.length; ie++)
                      (te = ve[ie].val - K(ve[ie]) / le) > ee && te < V && (V = te);
                    for (ie = 0; ie < ue.length; ie++)
                      (te = ue[ie].val + X(ue[ie]) / le) < N && te > B && (B = te);
                    T /= (B - V) / (2 * U), V = _.l2r(V), B = _.l2r(B), _.range = _._input.range = W < Z ? [V, B] : [B, V];
                  }
                  i(_, T);
                }
          }
        }
      }, $.getAxisGroup = function(p, c) {
        for (var a = p._axisMatchGroups, y = 0; y < a.length; y++)
          if (a[y][c])
            return "g" + y;
        return c;
      }, $.clean = function(p, c) {
        if (c._inputDomain) {
          for (var a = !1, y = c._id, f = p._fullLayout._axisConstraintGroups, _ = 0; _ < f.length; _++)
            if (f[_][y]) {
              a = !0;
              break;
            }
          a && c.constrain === "domain" || (c._input.domain = c.domain = c._inputDomain, delete c._inputDomain);
        }
      };
    }, { "../../constants/alignment": 483, "../../constants/numerical": 491, "../../lib": 515, "./autorange": 565, "./axis_ids": 570, "./layout_attributes": 579, "./scale_zoom": 584, "./set_convert": 585 }], 575: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = g.numberFormat, x = v("tinycolor2"), e = v("has-passive-events"), r = v("../../registry"), n = g.strTranslate, s = v("../../lib/svg_text_utils"), t = v("../../components/color"), d = v("../../components/drawing"), u = v("../../components/fx"), o = v("./axes"), h = v("../../lib/setcursor"), l = v("../../components/dragelement"), i = v("../../components/dragelement/helpers"), p = i.selectingOrDrawing, c = i.freeMode, a = v("../../constants/alignment").FROM_TL, y = v("../../lib/clear_gl_canvases"), f = v("../../plot_api/subroutines").redrawReglTraces, _ = v("../plots"), b = v("./axis_ids").getFromId, w = v("../../components/selections").prepSelect, T = v("../../components/selections").clearOutline, L = v("../../components/selections").selectOnClick, A = v("./scale_zoom"), I = v("./constants"), P = I.MINDRAG, S = I.MINZOOM, E = !0;
      function R(te, ie, le, oe) {
        var ve = g.ensureSingle(te.draglayer, ie, le, function(ue) {
          ue.classed("drag", !0).style({ fill: "transparent", "stroke-width": 0 }).attr("data-subplot", te.id);
        });
        return ve.call(h, oe), ve.node();
      }
      function z(te, ie, le, oe, ve, ue, ye) {
        var Ae = R(te, "rect", ie, le);
        return m.select(Ae).call(d.setRect, oe, ve, ue, ye), Ae;
      }
      function j(te, ie) {
        for (var le = 0; le < te.length; le++)
          if (!te[le].fixedrange)
            return ie;
        return "";
      }
      function H(te, ie, le, oe, ve) {
        for (var ue = 0; ue < te.length; ue++) {
          var ye = te[ue];
          if (!ye.fixedrange)
            if (ye.rangebreaks) {
              var Ae = ye._id.charAt(0) === "y", pe = Ae ? 1 - ie : ie, ge = Ae ? 1 - le : le;
              oe[ye._name + ".range[0]"] = ye.l2r(ye.p2l(pe * ye._length)), oe[ye._name + ".range[1]"] = ye.l2r(ye.p2l(ge * ye._length));
            } else {
              var we = ye._rl[0], se = ye._rl[1] - we;
              oe[ye._name + ".range[0]"] = ye.l2r(we + se * ie), oe[ye._name + ".range[1]"] = ye.l2r(we + se * le);
            }
        }
        if (ve && ve.length) {
          var de = (ie + (1 - le)) / 2;
          H(ve, de, 1 - de, oe, []);
        }
      }
      function Y(te, ie) {
        for (var le = 0; le < te.length; le++) {
          var oe = te[le];
          if (!oe.fixedrange)
            if (oe.rangebreaks) {
              var ve = oe._length, ue = (oe.p2l(0 + ie) - oe.p2l(0) + (oe.p2l(ve + ie) - oe.p2l(ve))) / 2;
              oe.range = [oe.l2r(oe._rl[0] - ue), oe.l2r(oe._rl[1] - ue)];
            } else
              oe.range = [oe.l2r(oe._rl[0] - ie / oe._m), oe.l2r(oe._rl[1] - ie / oe._m)];
        }
      }
      function J(te) {
        return 1 - (te >= 0 ? Math.min(te, 0.9) : 1 / (1 / Math.max(te, -0.3) + 3.222));
      }
      function W(te, ie, le, oe, ve) {
        return te.append("path").attr("class", "zoombox").style({ fill: ie > 0.2 ? "rgba(0,0,0,0)" : "rgba(255,255,255,0)", "stroke-width": 0 }).attr("transform", n(le, oe)).attr("d", ve + "Z");
      }
      function Z(te, ie, le) {
        return te.append("path").attr("class", "zoombox-corners").style({ fill: t.background, stroke: t.defaultLine, "stroke-width": 1, opacity: 0 }).attr("transform", n(ie, le)).attr("d", "M0,0Z");
      }
      function re(te, ie, le, oe, ve, ue) {
        te.attr("d", oe + "M" + le.l + "," + le.t + "v" + le.h + "h" + le.w + "v-" + le.h + "h-" + le.w + "Z"), V(te, ie, ve, ue);
      }
      function V(te, ie, le, oe) {
        le || (te.transition().style("fill", oe > 0.2 ? "rgba(0,0,0,0.4)" : "rgba(255,255,255,0.3)").duration(200), ie.transition().style("opacity", 1).duration(200));
      }
      function B(te) {
        m.select(te).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove();
      }
      function U(te) {
        E && te.data && te._context.showTips && (g.notifier(g._(te, "Double-click to zoom back out"), "long"), E = !1);
      }
      function ee(te) {
        var ie = Math.floor(Math.min(te.b - te.t, te.r - te.l, S) / 2);
        return "M" + (te.l - 3.5) + "," + (te.t - 0.5 + ie) + "h3v" + -ie + "h" + ie + "v-3h-" + (ie + 3) + "ZM" + (te.r + 3.5) + "," + (te.t - 0.5 + ie) + "h-3v" + -ie + "h" + -ie + "v-3h" + (ie + 3) + "ZM" + (te.r + 3.5) + "," + (te.b + 0.5 - ie) + "h-3v" + ie + "h" + -ie + "v3h" + (ie + 3) + "ZM" + (te.l - 3.5) + "," + (te.b + 0.5 - ie) + "h3v" + ie + "h" + ie + "v3h-" + (ie + 3) + "Z";
      }
      function N(te, ie, le, oe, ve) {
        for (var ue, ye, Ae, pe, ge = !1, we = {}, se = {}, de = (ve || {}).xaHash, Te = (ve || {}).yaHash, Ee = 0; Ee < ie.length; Ee++) {
          var Me = ie[Ee];
          for (ue in le)
            if (Me[ue]) {
              for (Ae in Me)
                ve && (de[Ae] || Te[Ae]) || (Ae.charAt(0) === "x" ? le : oe)[Ae] || (we[Ae] = ue);
              for (ye in oe)
                ve && (de[ye] || Te[ye]) || !Me[ye] || (ge = !0);
            }
          for (ye in oe)
            if (Me[ye])
              for (pe in Me)
                ve && (de[pe] || Te[pe]) || (pe.charAt(0) === "x" ? le : oe)[pe] || (se[pe] = ye);
        }
        ge && (g.extendFlat(we, se), se = {});
        var ze = {}, Ie = [];
        for (Ae in we) {
          var Oe = b(te, Ae);
          Ie.push(Oe), ze[Oe._id] = Oe;
        }
        var Ze = {}, Fe = [];
        for (pe in se) {
          var Pe = b(te, pe);
          Fe.push(Pe), Ze[Pe._id] = Pe;
        }
        return { xaHash: ze, yaHash: Ze, xaxes: Ie, yaxes: Fe, xLinks: we, yLinks: se, isSubplotConstrained: ge };
      }
      function K(te, ie) {
        if (e) {
          var le = te.onwheel !== void 0 ? "wheel" : "mousewheel";
          te._onwheel && te.removeEventListener(le, te._onwheel), te._onwheel = ie, te.addEventListener(le, ie, { passive: !1 });
        } else
          te.onwheel !== void 0 ? te.onwheel = ie : te.onmousewheel !== void 0 ? te.onmousewheel = ie : te.isAddedWheelEvent || (te.isAddedWheelEvent = !0, te.addEventListener("wheel", ie, { passive: !1 }));
      }
      function X(te) {
        var ie = [];
        for (var le in te)
          ie.push(te[le]);
        return ie;
      }
      Q.exports = { makeDragBox: function(te, ie, le, oe, ve, ue, ye, Ae) {
        var pe, ge, we, se, de, Te, Ee, Me, ze, Ie, Oe, Ze, Fe, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke, mt = te._fullLayout._zoomlayer, Ft = ye + Ae === "nsew", Vt = (ye + Ae).length === 1;
        function Xt() {
          if (pe = ie.xaxis, ge = ie.yaxis, ze = pe._length, Ie = ge._length, Ee = pe._offset, Me = ge._offset, (we = {})[pe._id] = pe, (se = {})[ge._id] = ge, ye && Ae)
            for (var Kt = ie.overlays, $t = 0; $t < Kt.length; $t++) {
              var er = Kt[$t].xaxis;
              we[er._id] = er;
              var cr = Kt[$t].yaxis;
              se[cr._id] = cr;
            }
          de = X(we), Te = X(se), Fe = j(de, Ae), Pe = j(Te, ye), De = !Pe && !Fe, Ze = N(te, te._fullLayout._axisMatchGroups, we, se);
          var gr = (Oe = N(te, te._fullLayout._axisConstraintGroups, we, se, Ze)).isSubplotConstrained || Ze.isSubplotConstrained;
          Ge = Ae || gr, Qe = ye || gr;
          var Mr = te._fullLayout;
          ot = Mr._has("scattergl"), vt = Mr._has("splom"), bt = Mr._has("svg");
        }
        Xt();
        var Gt = function(Kt, $t, er) {
          return Kt ? Kt === "nsew" ? er ? "" : $t === "pan" ? "move" : "crosshair" : Kt.toLowerCase() + "-resize" : "pointer";
        }(Pe + Fe, te._fullLayout.dragmode, Ft), nr = z(ie, ye + Ae + "drag", Gt, le, oe, ve, ue);
        if (De && !Ft)
          return nr.onmousedown = null, nr.style.pointerEvents = "none", nr;
        var It, Be, He, he, be, Re, Ue, Xe, qe, st, it = { element: nr, gd: te, plotinfo: ie };
        function Tt() {
          it.plotinfo.selection = !1, T(te);
        }
        function Pt(Kt, $t) {
          var er = it.gd;
          if (er._fullLayout._activeShapeIndex >= 0)
            er._fullLayout._deactivateShape(er);
          else {
            var cr = er._fullLayout.clickmode;
            if (B(er), Kt !== 2 || Vt || Nt(), Ft)
              cr.indexOf("select") > -1 && L($t, er, de, Te, ie.id, it), cr.indexOf("event") > -1 && u.click(er, $t, ie.id);
            else if (Kt === 1 && Vt) {
              var gr = ye ? ge : pe, Mr = ye === "s" || Ae === "w" ? 0 : 1, Ir = gr._name + ".range[" + Mr + "]", Fr = function($r, Dn) {
                var rn, vn = $r.range[Dn], xn = Math.abs(vn - $r.range[1 - Dn]);
                return $r.type === "date" ? vn : $r.type === "log" ? (rn = Math.ceil(Math.max(0, -Math.log(xn) / Math.LN10)) + 3, k("." + rn + "g")(Math.pow(10, vn))) : (rn = Math.floor(Math.log(Math.abs(vn)) / Math.LN10) - Math.floor(Math.log(xn) / Math.LN10) + 4, k("." + String(rn) + "g")(vn));
              }(gr, Mr), Gr = "left", un = "middle";
              if (gr.fixedrange)
                return;
              ye ? (un = ye === "n" ? "top" : "bottom", gr.side === "right" && (Gr = "right")) : Ae === "e" && (Gr = "right"), er._context.showAxisRangeEntryBoxes && m.select(nr).call(s.makeEditable, { gd: er, immediate: !0, background: er._fullLayout.paper_bgcolor, text: String(Fr), fill: gr.tickfont ? gr.tickfont.color : "#444", horizontalAlign: Gr, verticalAlign: un }).on("edit", function($r) {
                var Dn = gr.d2r($r);
                Dn !== void 0 && r.call("_guiRelayout", er, Ir, Dn);
              });
            }
          }
        }
        function rt(Kt, $t) {
          if (te._transitioningWithDuration)
            return !1;
          var er = Math.max(0, Math.min(ze, tt * Kt + It)), cr = Math.max(0, Math.min(Ie, Ke * $t + Be)), gr = Math.abs(er - It), Mr = Math.abs(cr - Be);
          function Ir() {
            Ue = "", He.r = He.l, He.t = He.b, qe.attr("d", "M0,0Z");
          }
          if (He.l = Math.min(It, er), He.r = Math.max(It, er), He.t = Math.min(Be, cr), He.b = Math.max(Be, cr), Oe.isSubplotConstrained)
            gr > S || Mr > S ? (Ue = "xy", gr / ze > Mr / Ie ? (Mr = gr * Ie / ze, Be > cr ? He.t = Be - Mr : He.b = Be + Mr) : (gr = Mr * ze / Ie, It > er ? He.l = It - gr : He.r = It + gr), qe.attr("d", ee(He))) : Ir();
          else if (Ze.isSubplotConstrained)
            if (gr > S || Mr > S) {
              Ue = "xy";
              var Fr = Math.min(He.l / ze, (Ie - He.b) / Ie), Gr = Math.max(He.r / ze, (Ie - He.t) / Ie);
              He.l = Fr * ze, He.r = Gr * ze, He.b = (1 - Fr) * Ie, He.t = (1 - Gr) * Ie, qe.attr("d", ee(He));
            } else
              Ir();
          else
            !Pe || Mr < Math.min(Math.max(0.6 * gr, P), S) ? gr < P || !Fe ? Ir() : (He.t = 0, He.b = Ie, Ue = "x", qe.attr("d", function(un, $r) {
              return "M" + (un.l - 0.5) + "," + ($r - S - 0.5) + "h-3v" + (2 * S + 1) + "h3ZM" + (un.r + 0.5) + "," + ($r - S - 0.5) + "h3v" + (2 * S + 1) + "h-3Z";
            }(He, Be))) : !Fe || gr < Math.min(0.6 * Mr, S) ? (He.l = 0, He.r = ze, Ue = "y", qe.attr("d", function(un, $r) {
              return "M" + ($r - S - 0.5) + "," + (un.t - 0.5) + "v-3h" + (2 * S + 1) + "v3ZM" + ($r - S - 0.5) + "," + (un.b + 0.5) + "v3h" + (2 * S + 1) + "v-3Z";
            }(He, It))) : (Ue = "xy", qe.attr("d", ee(He)));
          He.w = He.r - He.l, He.h = He.b - He.t, Ue && (st = !0), te._dragged = st, re(Xe, qe, He, be, Re, he), ut(), te.emit("plotly_relayouting", yt), Re = !0;
        }
        function ut() {
          yt = {}, Ue !== "xy" && Ue !== "x" || (H(de, He.l / ze, He.r / ze, yt, Oe.xaxes), ft("x", yt)), Ue !== "xy" && Ue !== "y" || (H(Te, (Ie - He.b) / Ie, (Ie - He.t) / Ie, yt, Oe.yaxes), ft("y", yt));
        }
        function Bt() {
          ut(), B(te), Zt(), U(te);
        }
        it.prepFn = function(Kt, $t, er) {
          var cr = it.dragmode, gr = te._fullLayout.dragmode;
          gr !== cr && (it.dragmode = gr), Xt(), tt = te._fullLayout._invScaleX, Ke = te._fullLayout._invScaleY, De || (Ft ? Kt.shiftKey ? gr === "pan" ? gr = "zoom" : p(gr) || (gr = "pan") : Kt.ctrlKey && (gr = "pan") : gr = "pan"), c(gr) ? it.minDrag = 1 : it.minDrag = void 0, p(gr) ? (it.xaxes = de, it.yaxes = Te, w(Kt, $t, er, it, gr)) : (it.clickFn = Pt, p(cr) && Tt(), De || (gr === "zoom" ? (it.moveFn = rt, it.doneFn = Bt, it.minDrag = 1, function(Mr, Ir, Fr) {
            var Gr = nr.getBoundingClientRect();
            It = Ir - Gr.left, Be = Fr - Gr.top, te._fullLayout._calcInverseTransform(te);
            var un = g.apply3DTransform(te._fullLayout._invTransform)(It, Be);
            It = un[0], Be = un[1], He = { l: It, r: It, w: 0, t: Be, b: Be, h: 0 }, he = te._hmpixcount ? te._hmlumcount / te._hmpixcount : x(te._fullLayout.plot_bgcolor).getLuminance(), Re = !1, Ue = "xy", st = !1, Xe = W(mt, he, Ee, Me, be = "M0,0H" + ze + "V" + Ie + "H0V0"), qe = Z(mt, Ee, Me);
          }(0, $t, er)) : gr === "pan" && (it.moveFn = nt, it.doneFn = Zt))), te._fullLayout._redrag = function() {
            var Mr = te._dragdata;
            if (Mr && Mr.element === nr) {
              var Ir = te._fullLayout.dragmode;
              p(Ir) || (Xt(), Ut([0, 0, ze, Ie]), it.moveFn(Mr.dx, Mr.dy));
            }
          };
        }, l.init(it);
        var wt = [0, 0, ze, Ie], Lt = null, Se = I.REDRAWDELAY, We = ie.mainplot ? te._fullLayout._plots[ie.mainplot] : ie;
        function nt(Kt, $t) {
          if (Kt *= tt, $t *= Ke, !te._transitioningWithDuration) {
            if (te._fullLayout._replotting = !0, Fe === "ew" || Pe === "ns") {
              var er = Fe ? -Kt : 0, cr = Pe ? -$t : 0;
              if (Ze.isSubplotConstrained) {
                if (Fe && Pe) {
                  var gr = (Kt / ze - $t / Ie) / 2;
                  er = -(Kt = gr * ze), cr = -($t = -gr * Ie);
                }
                Pe ? er = -cr * ze / Ie : cr = -er * Ie / ze;
              }
              return Fe && (Y(de, Kt), ft("x")), Pe && (Y(Te, $t), ft("y")), Ut([er, cr, ze, Ie]), Mt(), void te.emit("plotly_relayouting", yt);
            }
            var Mr, Ir, Fr = Fe === "w" == (Pe === "n") ? 1 : -1;
            if (Fe && Pe && (Oe.isSubplotConstrained || Ze.isSubplotConstrained)) {
              var Gr = (Kt / ze + Fr * $t / Ie) / 2;
              Kt = Gr * ze, $t = Fr * Gr * Ie;
            }
            if (Fe === "w" ? Kt = rn(de, 0, Kt) : Fe === "e" ? Kt = rn(de, 1, -Kt) : Fe || (Kt = 0), Pe === "n" ? $t = rn(Te, 1, $t) : Pe === "s" ? $t = rn(Te, 0, -$t) : Pe || ($t = 0), Mr = Fe === "w" ? Kt : 0, Ir = Pe === "n" ? $t : 0, Oe.isSubplotConstrained && !Ze.isSubplotConstrained || Ze.isSubplotConstrained && Fe && Pe && Fr > 0) {
              var un;
              if (Ze.isSubplotConstrained || !Fe && Pe.length === 1) {
                for (un = 0; un < de.length; un++)
                  de[un].range = de[un]._r.slice(), A(de[un], 1 - $t / Ie);
                Mr = (Kt = $t * ze / Ie) / 2;
              }
              if (Ze.isSubplotConstrained || !Pe && Fe.length === 1) {
                for (un = 0; un < Te.length; un++)
                  Te[un].range = Te[un]._r.slice(), A(Te[un], 1 - Kt / ze);
                Ir = ($t = Kt * Ie / ze) / 2;
              }
            }
            Ze.isSubplotConstrained && Pe || ft("x"), Ze.isSubplotConstrained && Fe || ft("y");
            var $r = ze - Kt, Dn = Ie - $t;
            !Ze.isSubplotConstrained || Fe && Pe || (Fe ? (Ir = Mr ? 0 : Kt * Ie / ze, Dn = $r * Ie / ze) : (Mr = Ir ? 0 : $t * ze / Ie, $r = Dn * ze / Ie)), Ut([Mr, Ir, $r, Dn]), Mt(), te.emit("plotly_relayouting", yt);
          }
          function rn(vn, xn, $n) {
            for (var Br, tn, mn = 1 - xn, Qr = 0; Qr < vn.length; Qr++) {
              var cn = vn[Qr];
              if (!cn.fixedrange) {
                Br = cn, tn = cn._rl[mn] + (cn._rl[xn] - cn._rl[mn]) / J($n / cn._length);
                var Hn = cn.l2r(tn);
                Hn !== !1 && Hn !== void 0 && (cn.range[xn] = Hn);
              }
            }
            return Br._length * (Br._rl[xn] - tn) / (Br._rl[xn] - Br._rl[mn]);
          }
        }
        function ft(Kt, $t) {
          for (var er = Ze.isSubplotConstrained ? { x: Te, y: de }[Kt] : Ze[Kt + "axes"], cr = Ze.isSubplotConstrained ? { x: de, y: Te }[Kt] : [], gr = 0; gr < er.length; gr++) {
            var Mr = er[gr], Ir = Mr._id, Fr = Ze.xLinks[Ir] || Ze.yLinks[Ir], Gr = cr[0] || we[Fr] || se[Fr];
            Gr && ($t ? ($t[Mr._name + ".range[0]"] = $t[Gr._name + ".range[0]"], $t[Mr._name + ".range[1]"] = $t[Gr._name + ".range[1]"]) : Mr.range = Gr.range.slice());
          }
        }
        function Mt() {
          var Kt, $t = [];
          function er(Mr) {
            for (Kt = 0; Kt < Mr.length; Kt++)
              Mr[Kt].fixedrange || $t.push(Mr[Kt]._id);
          }
          for (Ge && (er(de), er(Oe.xaxes), er(Ze.xaxes)), Qe && (er(Te), er(Oe.yaxes), er(Ze.yaxes)), yt = {}, Kt = 0; Kt < $t.length; Kt++) {
            var cr = $t[Kt], gr = b(te, cr);
            o.drawOne(te, gr, { skipTitle: !0 }), yt[gr._name + ".range[0]"] = gr.range[0], yt[gr._name + ".range[1]"] = gr.range[1];
          }
          o.redrawComponents(te, $t);
        }
        function Nt() {
          if (!te._transitioningWithDuration) {
            var Kt = te._context.doubleClick, $t = [];
            Fe && ($t = $t.concat(de)), Pe && ($t = $t.concat(Te)), Ze.xaxes && ($t = $t.concat(Ze.xaxes)), Ze.yaxes && ($t = $t.concat(Ze.yaxes));
            var er, cr, gr, Mr = {};
            if (Kt === "reset+autosize") {
              for (Kt = "autosize", cr = 0; cr < $t.length; cr++)
                if ((er = $t[cr])._rangeInitial && (er.range[0] !== er._rangeInitial[0] || er.range[1] !== er._rangeInitial[1]) || !er._rangeInitial && !er.autorange) {
                  Kt = "reset";
                  break;
                }
            }
            if (Kt === "autosize")
              for (cr = 0; cr < $t.length; cr++)
                (er = $t[cr]).fixedrange || (Mr[er._name + ".autorange"] = !0);
            else if (Kt === "reset")
              for ((Fe || Oe.isSubplotConstrained) && ($t = $t.concat(Oe.xaxes)), Pe && !Oe.isSubplotConstrained && ($t = $t.concat(Oe.yaxes)), Oe.isSubplotConstrained && (Fe ? Pe || ($t = $t.concat(Te)) : $t = $t.concat(de)), cr = 0; cr < $t.length; cr++)
                (er = $t[cr]).fixedrange || (er._rangeInitial ? (gr = er._rangeInitial, Mr[er._name + ".range[0]"] = gr[0], Mr[er._name + ".range[1]"] = gr[1]) : Mr[er._name + ".autorange"] = !0);
            te.emit("plotly_doubleclick", null), r.call("_guiRelayout", te, Mr);
          }
        }
        function Zt() {
          Ut([0, 0, ze, Ie]), g.syncOrAsync([_.previousPromises, function() {
            te._fullLayout._replotting = !1, r.call("_guiRelayout", te, yt);
          }], te);
        }
        function Ut(Kt) {
          var $t, er, cr, gr, Mr = te._fullLayout, Ir = Mr._plots, Fr = Mr._subplots.cartesian;
          if (vt && r.subplotsRegistry.splom.drag(te), ot) {
            for ($t = 0; $t < Fr.length; $t++)
              if (cr = (er = Ir[Fr[$t]]).xaxis, gr = er.yaxis, er._scene) {
                var Gr = g.simpleMap(cr.range, cr.r2l), un = g.simpleMap(gr.range, gr.r2l);
                er._scene.update({ range: [Gr[0], un[0], Gr[1], un[1]] });
              }
          }
          if ((vt || ot) && (y(te), f(te)), bt) {
            var $r = Kt[2] / pe._length, Dn = Kt[3] / ge._length;
            for ($t = 0; $t < Fr.length; $t++) {
              cr = (er = Ir[Fr[$t]]).xaxis, gr = er.yaxis;
              var rn, vn, xn, $n, Br = (Ge || Ze.isSubplotConstrained) && !cr.fixedrange && we[cr._id], tn = (Qe || Ze.isSubplotConstrained) && !gr.fixedrange && se[gr._id];
              if (Br ? (rn = $r, xn = Ae || Ze.isSubplotConstrained ? Kt[0] : ur(cr, rn)) : Ze.xaHash[cr._id] ? (rn = $r, xn = Kt[0] * cr._length / pe._length) : Ze.yaHash[cr._id] ? (rn = Dn, xn = Pe === "ns" ? -Kt[1] * cr._length / ge._length : ur(cr, rn, { n: "top", s: "bottom" }[Pe])) : xn = Tr(cr, rn = fr(cr, $r, Dn)), tn ? (vn = Dn, $n = ye || Ze.isSubplotConstrained ? Kt[1] : ur(gr, vn)) : Ze.yaHash[gr._id] ? (vn = Dn, $n = Kt[1] * gr._length / ge._length) : Ze.xaHash[gr._id] ? (vn = $r, $n = Fe === "ew" ? -Kt[0] * gr._length / pe._length : ur(gr, vn, { e: "right", w: "left" }[Fe])) : $n = Tr(gr, vn = fr(gr, $r, Dn)), rn || vn) {
                rn || (rn = 1), vn || (vn = 1);
                var mn = cr._offset - xn / rn, Qr = gr._offset - $n / vn;
                er.clipRect.call(d.setTranslate, xn, $n).call(d.setScale, rn, vn), er.plot.call(d.setTranslate, mn, Qr).call(d.setScale, 1 / rn, 1 / vn), rn === er.xScaleFactor && vn === er.yScaleFactor || (d.setPointGroupScale(er.zoomScalePts, rn, vn), d.setTextPointsScale(er.zoomScaleTxt, rn, vn)), d.hideOutsideRangePoints(er.clipOnAxisFalseTraces, er), er.xScaleFactor = rn, er.yScaleFactor = vn;
              }
            }
          }
        }
        function fr(Kt, $t, er) {
          return Kt.fixedrange ? 0 : Ge && Oe.xaHash[Kt._id] ? $t : Qe && (Oe.isSubplotConstrained ? Oe.xaHash : Oe.yaHash)[Kt._id] ? er : 0;
        }
        function Tr(Kt, $t) {
          return $t ? (Kt.range = Kt._r.slice(), A(Kt, $t), ur(Kt, $t)) : 0;
        }
        function ur(Kt, $t, er) {
          return Kt._length * (1 - $t) * a[er || Kt.constraintoward || "middle"];
        }
        return ye.length * Ae.length != 1 && K(nr, function(Kt) {
          if (te._context._scrollZoom.cartesian || te._fullLayout._enablescrollzoom) {
            if (Tt(), te._transitioningWithDuration)
              return Kt.preventDefault(), void Kt.stopPropagation();
            Xt(), clearTimeout(Lt);
            var $t = -Kt.deltaY;
            if (isFinite($t) || ($t = Kt.wheelDelta / 10), isFinite($t)) {
              var er, cr = Math.exp(-Math.min(Math.max($t, -20), 20) / 200), gr = We.draglayer.select(".nsewdrag").node().getBoundingClientRect(), Mr = (Kt.clientX - gr.left) / gr.width, Ir = (gr.bottom - Kt.clientY) / gr.height;
              if (Ge) {
                for (Ae || (Mr = 0.5), er = 0; er < de.length; er++)
                  Fr(de[er], Mr, cr);
                ft("x"), wt[2] *= cr, wt[0] += wt[2] * Mr * (1 / cr - 1);
              }
              if (Qe) {
                for (ye || (Ir = 0.5), er = 0; er < Te.length; er++)
                  Fr(Te[er], Ir, cr);
                ft("y"), wt[3] *= cr, wt[1] += wt[3] * (1 - Ir) * (1 / cr - 1);
              }
              Ut(wt), Mt(), te.emit("plotly_relayouting", yt), Lt = setTimeout(function() {
                te._fullLayout && (wt = [0, 0, ze, Ie], Zt());
              }, Se), Kt.preventDefault();
            } else
              g.log("Did not find wheel motion attributes: ", Kt);
          }
          function Fr(Gr, un, $r) {
            if (!Gr.fixedrange) {
              var Dn = g.simpleMap(Gr.range, Gr.r2l), rn = Dn[0] + (Dn[1] - Dn[0]) * un;
              Gr.range = Dn.map(function(vn) {
                return Gr.l2r(rn + (vn - rn) * $r);
              });
            }
          }
        }), nr;
      }, makeDragger: R, makeRectDragger: z, makeZoombox: W, makeCorners: Z, updateZoombox: re, xyCorners: ee, transitionZoombox: V, removeZoombox: B, showDoubleClickNotifier: U, attachWheelEventHandler: K };
    }, { "../../components/color": 367, "../../components/dragelement": 386, "../../components/dragelement/helpers": 385, "../../components/drawing": 389, "../../components/fx": 407, "../../components/selections": 455, "../../constants/alignment": 483, "../../lib": 515, "../../lib/clear_gl_canvases": 499, "../../lib/setcursor": 536, "../../lib/svg_text_utils": 541, "../../plot_api/subroutines": 556, "../../registry": 647, "../plots": 628, "./axes": 566, "./axis_ids": 570, "./constants": 573, "./scale_zoom": 584, "@plotly/d3": 58, "has-passive-events": 229, tinycolor2: 313 }], 576: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/fx"), k = v("../../components/dragelement"), x = v("../../lib/setcursor"), e = v("./dragbox").makeDragBox, r = v("./constants").DRAGGERSIZE;
      $.initInteractions = function(n) {
        var s = n._fullLayout;
        if (n._context.staticPlot)
          m.select(n).selectAll(".drag").remove();
        else if (s._has("cartesian") || s._has("splom")) {
          Object.keys(s._plots || {}).sort(function(d, u) {
            if ((s._plots[d].mainplot && !0) === (s._plots[u].mainplot && !0)) {
              var o = d.split("y"), h = u.split("y");
              return o[0] === h[0] ? Number(o[1] || 1) - Number(h[1] || 1) : Number(o[0] || 1) - Number(h[0] || 1);
            }
            return s._plots[d].mainplot ? 1 : -1;
          }).forEach(function(d) {
            var u = s._plots[d], o = u.xaxis, h = u.yaxis;
            if (!u.mainplot) {
              var l = e(n, u, o._offset, h._offset, o._length, h._length, "ns", "ew");
              l.onmousemove = function(c) {
                n._fullLayout._rehover = function() {
                  n._fullLayout._hoversubplot === d && n._fullLayout._plots[d] && g.hover(n, c, d);
                }, g.hover(n, c, d), n._fullLayout._lasthover = l, n._fullLayout._hoversubplot = d;
              }, l.onmouseout = function(c) {
                n._dragging || (n._fullLayout._hoversubplot = null, k.unhover(n, c));
              }, n._context.showAxisDragHandles && (e(n, u, o._offset - r, h._offset - r, r, r, "n", "w"), e(n, u, o._offset + o._length, h._offset - r, r, r, "n", "e"), e(n, u, o._offset - r, h._offset + h._length, r, r, "s", "w"), e(n, u, o._offset + o._length, h._offset + h._length, r, r, "s", "e"));
            }
            if (n._context.showAxisDragHandles) {
              if (d === o._mainSubplot) {
                var i = o._mainLinePosition;
                o.side === "top" && (i -= r), e(n, u, o._offset + 0.1 * o._length, i, 0.8 * o._length, r, "", "ew"), e(n, u, o._offset, i, 0.1 * o._length, r, "", "w"), e(n, u, o._offset + 0.9 * o._length, i, 0.1 * o._length, r, "", "e");
              }
              if (d === h._mainSubplot) {
                var p = h._mainLinePosition;
                h.side !== "right" && (p -= r), e(n, u, p, h._offset + 0.1 * h._length, r, 0.8 * h._length, "ns", ""), e(n, u, p, h._offset + 0.9 * h._length, r, 0.1 * h._length, "s", ""), e(n, u, p, h._offset, r, 0.1 * h._length, "n", "");
              }
            }
          });
          var t = s._hoverlayer.node();
          t.onmousemove = function(d) {
            d.target = n._fullLayout._lasthover, g.hover(n, d, s._hoversubplot);
          }, t.onclick = function(d) {
            d.target = n._fullLayout._lasthover, g.click(n, d);
          }, t.onmousedown = function(d) {
            n._fullLayout._lasthover.onmousedown(d);
          }, $.updateFx(n);
        }
      }, $.updateFx = function(n) {
        var s = n._fullLayout, t = s.dragmode === "pan" ? "move" : "crosshair";
        x(s._draggers, t);
      };
    }, { "../../components/dragelement": 386, "../../components/fx": 407, "../../lib/setcursor": 536, "./constants": 573, "./dragbox": 575, "@plotly/d3": 58 }], 577: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("./axis_ids");
      Q.exports = function(x) {
        return function(e, r) {
          var n = e[x];
          if (Array.isArray(n))
            for (var s = m.subplotsRegistry.cartesian, t = s.idRegex, d = r._subplots, u = d.xaxis, o = d.yaxis, h = d.cartesian, l = r._has("cartesian") || r._has("gl2d"), i = 0; i < n.length; i++) {
              var p = n[i];
              if (g.isPlainObject(p)) {
                var c = k.cleanId(p.xref, "x", !1), a = k.cleanId(p.yref, "y", !1), y = t.x.test(c), f = t.y.test(a);
                if (y || f) {
                  l || g.pushUnique(r._basePlotModules, s);
                  var _ = !1;
                  y && u.indexOf(c) === -1 && (u.push(c), _ = !0), f && o.indexOf(a) === -1 && (o.push(a), _ = !0), _ && y && f && h.push(c + a);
                }
              }
            }
        };
      };
    }, { "../../lib": 515, "../../registry": 647, "./axis_ids": 570 }], 578: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../lib"), x = v("../plots"), e = v("../../components/drawing"), r = v("../get_data").getModuleCalcData, n = v("./axis_ids"), s = v("./constants"), t = v("../../constants/xmlns_namespaces"), d = k.ensureSingle;
      function u(p, c, a) {
        return k.ensureSingle(p, c, a, function(y) {
          y.datum(a);
        });
      }
      function o(p, c, a, y, f) {
        for (var _, b, w, T = s.traceLayerClasses, L = p._fullLayout, A = L._modules, I = [], P = [], S = 0; S < A.length; S++) {
          var E = (_ = A[S]).name, R = g.modules[E].categories;
          if (R.svg) {
            var z = _.layerName || E + "layer", j = _.plot;
            w = (b = r(a, j))[0], a = b[1], w.length && I.push({ i: T.indexOf(z), className: z, plotMethod: j, cdModule: w }), R.zoomScale && P.push("." + z);
          }
        }
        I.sort(function(J, W) {
          return J.i - W.i;
        });
        var H = c.plot.selectAll("g.mlayer").data(I, function(J) {
          return J.className;
        });
        if (H.enter().append("g").attr("class", function(J) {
          return J.className;
        }).classed("mlayer", !0).classed("rangeplot", c.isRangePlot), H.exit().remove(), H.order(), H.each(function(J) {
          var W = m.select(this), Z = J.className;
          J.plotMethod(p, c, J.cdModule, W, y, f), s.clipOnAxisFalseQuery.indexOf("." + Z) === -1 && e.setClipUrl(W, c.layerClipId, p);
        }), L._has("scattergl") && (_ = g.getModule("scattergl"), w = r(a, _)[0], _.plot(p, c, w)), !p._context.staticPlot && (c._hasClipOnAxisFalse && (c.clipOnAxisFalseTraces = c.plot.selectAll(s.clipOnAxisFalseQuery.join(",")).selectAll(".trace")), P.length)) {
          var Y = c.plot.selectAll(P.join(",")).selectAll(".trace");
          c.zoomScalePts = Y.selectAll("path.point"), c.zoomScaleTxt = Y.selectAll(".textpoint");
        }
      }
      function h(p, c) {
        var a = c.plotgroup, y = c.id, f = s.layerValue2layerClass[c.xaxis.layer], _ = s.layerValue2layerClass[c.yaxis.layer], b = p._fullLayout._hasOnlyLargeSploms;
        if (c.mainplot) {
          var w = c.mainplotinfo, T = w.plotgroup, L = y + "-x", A = y + "-y";
          c.minorGridlayer = w.minorGridlayer, c.gridlayer = w.gridlayer, c.zerolinelayer = w.zerolinelayer, d(w.overlinesBelow, "path", L), d(w.overlinesBelow, "path", A), d(w.overaxesBelow, "g", L), d(w.overaxesBelow, "g", A), c.plot = d(w.overplot, "g", y), d(w.overlinesAbove, "path", L), d(w.overlinesAbove, "path", A), d(w.overaxesAbove, "g", L), d(w.overaxesAbove, "g", A), c.xlines = T.select(".overlines-" + f).select("." + L), c.ylines = T.select(".overlines-" + _).select("." + A), c.xaxislayer = T.select(".overaxes-" + f).select("." + L), c.yaxislayer = T.select(".overaxes-" + _).select("." + A);
        } else if (b)
          c.xlines = d(a, "path", "xlines-above"), c.ylines = d(a, "path", "ylines-above"), c.xaxislayer = d(a, "g", "xaxislayer-above"), c.yaxislayer = d(a, "g", "yaxislayer-above");
        else {
          var I = d(a, "g", "layer-subplot");
          c.shapelayer = d(I, "g", "shapelayer"), c.imagelayer = d(I, "g", "imagelayer"), c.minorGridlayer = d(a, "g", "minor-gridlayer"), c.gridlayer = d(a, "g", "gridlayer"), c.zerolinelayer = d(a, "g", "zerolinelayer"), d(a, "path", "xlines-below"), d(a, "path", "ylines-below"), c.overlinesBelow = d(a, "g", "overlines-below"), d(a, "g", "xaxislayer-below"), d(a, "g", "yaxislayer-below"), c.overaxesBelow = d(a, "g", "overaxes-below"), c.plot = d(a, "g", "plot"), c.overplot = d(a, "g", "overplot"), c.xlines = d(a, "path", "xlines-above"), c.ylines = d(a, "path", "ylines-above"), c.overlinesAbove = d(a, "g", "overlines-above"), d(a, "g", "xaxislayer-above"), d(a, "g", "yaxislayer-above"), c.overaxesAbove = d(a, "g", "overaxes-above"), c.xlines = a.select(".xlines-" + f), c.ylines = a.select(".ylines-" + _), c.xaxislayer = a.select(".xaxislayer-" + f), c.yaxislayer = a.select(".yaxislayer-" + _);
        }
        b || (u(c.minorGridlayer, "g", c.xaxis._id), u(c.minorGridlayer, "g", c.yaxis._id), c.minorGridlayer.selectAll("g").map(function(P) {
          return P[0];
        }).sort(n.idSort), u(c.gridlayer, "g", c.xaxis._id), u(c.gridlayer, "g", c.yaxis._id), c.gridlayer.selectAll("g").map(function(P) {
          return P[0];
        }).sort(n.idSort)), c.xlines.style("fill", "none").classed("crisp", !0), c.ylines.style("fill", "none").classed("crisp", !0);
      }
      function l(p, c) {
        if (p) {
          var a = {};
          for (var y in p.each(function(w) {
            var T = w[0];
            m.select(this).remove(), i(T, c), a[T] = !0;
          }), c._plots)
            for (var f = c._plots[y].overlays || [], _ = 0; _ < f.length; _++) {
              var b = f[_];
              a[b.id] && b.plot.selectAll(".trace").remove();
            }
        }
      }
      function i(p, c) {
        c._draggers.selectAll("g." + p).remove(), c._defs.select("#clip" + c._uid + p + "plot").remove();
      }
      $.name = "cartesian", $.attr = ["xaxis", "yaxis"], $.idRoot = ["x", "y"], $.idRegex = s.idRegex, $.attrRegex = s.attrRegex, $.attributes = v("./attributes"), $.layoutAttributes = v("./layout_attributes"), $.supplyLayoutDefaults = v("./layout_defaults"), $.transitionAxes = v("./transition_axes"), $.finalizeSubplots = function(p, c) {
        var a, y, f, _ = c._subplots, b = _.xaxis, w = _.yaxis, T = _.cartesian, L = T.concat(_.gl2d || []), A = {}, I = {};
        for (a = 0; a < L.length; a++) {
          var P = L[a].split("y");
          A[P[0]] = 1, I["y" + P[1]] = 1;
        }
        for (a = 0; a < b.length; a++)
          A[y = b[a]] || (f = (p[n.id2name(y)] || {}).anchor, s.idRegex.y.test(f) || (f = "y"), T.push(y + f), L.push(y + f), I[f] || (I[f] = 1, k.pushUnique(w, f)));
        for (a = 0; a < w.length; a++)
          I[f = w[a]] || (y = (p[n.id2name(f)] || {}).anchor, s.idRegex.x.test(y) || (y = "x"), T.push(y + f), L.push(y + f), A[y] || (A[y] = 1, k.pushUnique(b, y)));
        if (!L.length) {
          for (var S in y = "", f = "", p)
            s.attrRegex.test(S) && (S.charAt(0) === "x" ? (!y || +S.substr(5) < +y.substr(5)) && (y = S) : (!f || +S.substr(5) < +f.substr(5)) && (f = S));
          y = y ? n.name2id(y) : "x", f = f ? n.name2id(f) : "y", b.push(y), w.push(f), T.push(y + f);
        }
      }, $.plot = function(p, c, a, y) {
        var f, _ = p._fullLayout, b = _._subplots.cartesian, w = p.calcdata;
        if (!Array.isArray(c))
          for (c = [], f = 0; f < w.length; f++)
            c.push(f);
        for (f = 0; f < b.length; f++) {
          for (var T, L = b[f], A = _._plots[L], I = [], P = 0; P < w.length; P++) {
            var S = w[P], E = S[0].trace;
            E.xaxis + E.yaxis === L && ((c.indexOf(E.index) !== -1 || E.carpet) && (T && T[0].trace.xaxis + T[0].trace.yaxis === L && ["tonextx", "tonexty", "tonext"].indexOf(E.fill) !== -1 && I.indexOf(T) === -1 && I.push(T), I.push(S)), T = S);
          }
          o(p, A, I, a, y);
        }
      }, $.clean = function(p, c, a, y) {
        var f, _, b, w = y._plots || {}, T = c._plots || {}, L = y._subplots || {};
        if (y._hasOnlyLargeSploms && !c._hasOnlyLargeSploms)
          for (b in w)
            (f = w[b]).plotgroup && f.plotgroup.remove();
        var A = y._has && y._has("gl"), I = c._has && c._has("gl");
        if (A && !I)
          for (b in w)
            (f = w[b])._scene && f._scene.destroy();
        if (L.xaxis && L.yaxis) {
          var P = n.listIds({ _fullLayout: y });
          for (_ = 0; _ < P.length; _++) {
            var S = P[_];
            c[n.id2name(S)] || y._infolayer.selectAll(".g-" + S + "title").remove();
          }
        }
        var E = y._has && y._has("cartesian"), R = c._has && c._has("cartesian");
        if (E && !R)
          l(y._cartesianlayer.selectAll(".subplot"), y), y._defs.selectAll(".axesclip").remove(), delete y._axisConstraintGroups, delete y._axisMatchGroups;
        else if (L.cartesian)
          for (_ = 0; _ < L.cartesian.length; _++) {
            var z = L.cartesian[_];
            if (!T[z]) {
              var j = "." + z + ",." + z + "-x,." + z + "-y";
              y._cartesianlayer.selectAll(j).remove(), i(z, y);
            }
          }
      }, $.drawFramework = function(p) {
        var c = p._fullLayout, a = function(f) {
          var _, b, w, T, L, A, I = f._fullLayout, P = I._subplots.cartesian, S = P.length, E = [], R = [];
          for (_ = 0; _ < S; _++) {
            w = P[_], T = I._plots[w], L = T.xaxis, A = T.yaxis;
            var z = L._mainAxis, j = A._mainAxis, H = z._id + j._id, Y = I._plots[H];
            T.overlays = [], H !== w && Y ? (T.mainplot = H, T.mainplotinfo = Y, R.push(w)) : (T.mainplot = void 0, T.mainplotinfo = void 0, E.push(w));
          }
          for (_ = 0; _ < R.length; _++)
            w = R[_], (T = I._plots[w]).mainplotinfo.overlays.push(T);
          var J = E.concat(R), W = new Array(S);
          for (_ = 0; _ < S; _++) {
            w = J[_], T = I._plots[w], L = T.xaxis, A = T.yaxis;
            var Z = [w, L.layer, A.layer, L.overlaying || "", A.overlaying || ""];
            for (b = 0; b < T.overlays.length; b++)
              Z.push(T.overlays[b].id);
            W[_] = Z;
          }
          return W;
        }(p), y = c._cartesianlayer.selectAll(".subplot").data(a, String);
        y.enter().append("g").attr("class", function(f) {
          return "subplot " + f[0];
        }), y.order(), y.exit().call(l, c), y.each(function(f) {
          var _ = f[0], b = c._plots[_];
          b.plotgroup = m.select(this), h(p, b), b.draglayer = d(c._draggers, "g", _);
        });
      }, $.rangePlot = function(p, c, a) {
        h(p, c), o(p, c, a), x.style(p);
      }, $.toSVG = function(p) {
        var c = p._fullLayout._glimages, a = m.select(p).selectAll(".svg-container");
        a.filter(function(y, f) {
          return f === a.size() - 1;
        }).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function() {
          var y = this.toDataURL("image/png");
          c.append("svg:image").attr({ xmlns: t.svg, "xlink:href": y, preserveAspectRatio: "none", x: 0, y: 0, width: this.style.width, height: this.style.height });
        });
      }, $.updateFx = v("./graph_interact").updateFx;
    }, { "../../components/drawing": 389, "../../constants/xmlns_namespaces": 492, "../../lib": 515, "../../registry": 647, "../get_data": 602, "../plots": 628, "./attributes": 564, "./axis_ids": 570, "./constants": 573, "./graph_interact": 576, "./layout_attributes": 579, "./layout_defaults": 580, "./transition_axes": 590, "@plotly/d3": 58 }], 579: [function(v, Q, $) {
      var m = v("../font_attributes"), g = v("../../components/color/attributes"), k = v("../../components/drawing/attributes").dash, x = v("../../lib/extend").extendFlat, e = v("../../plot_api/plot_template").templatedArray, r = v("../../plots/cartesian/axis_format_attributes").descriptionWithDates, n = v("../../constants/numerical").ONEDAY, s = v("./constants"), t = s.HOUR_PATTERN, d = s.WEEKDAY_PATTERN, u = { valType: "enumerated", values: ["auto", "linear", "array"], editType: "ticks", impliedEdits: { tick0: void 0, dtick: void 0 } };
      function o(T) {
        return { valType: "integer", min: 0, dflt: T ? 5 : 0, editType: "ticks" };
      }
      var h = { valType: "any", editType: "ticks", impliedEdits: { tickmode: "linear" } }, l = { valType: "any", editType: "ticks", impliedEdits: { tickmode: "linear" } }, i = { valType: "data_array", editType: "ticks" }, p = { valType: "enumerated", values: ["outside", "inside", ""], editType: "ticks" };
      function c(T) {
        var L = { valType: "number", min: 0, editType: "ticks" };
        return T || (L.dflt = 5), L;
      }
      function a(T) {
        var L = { valType: "number", min: 0, editType: "ticks" };
        return T || (L.dflt = 1), L;
      }
      var y = { valType: "color", dflt: g.defaultLine, editType: "ticks" }, f = { valType: "color", dflt: g.lightLine, editType: "ticks" };
      function _(T) {
        var L = { valType: "number", min: 0, editType: "ticks" };
        return T || (L.dflt = 1), L;
      }
      var b = x({}, k, { editType: "ticks" }), w = { valType: "boolean", editType: "ticks" };
      Q.exports = { visible: { valType: "boolean", editType: "plot" }, color: { valType: "color", dflt: g.defaultLine, editType: "ticks" }, title: { text: { valType: "string", editType: "ticks" }, font: m({ editType: "ticks" }), standoff: { valType: "number", min: 0, editType: "ticks" }, editType: "ticks" }, type: { valType: "enumerated", values: ["-", "linear", "log", "date", "category", "multicategory"], dflt: "-", editType: "calc", _noTemplating: !0 }, autotypenumbers: { valType: "enumerated", values: ["convert types", "strict"], dflt: "convert types", editType: "calc" }, autorange: { valType: "enumerated", values: [!0, !1, "reversed"], dflt: !0, editType: "axrange", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, rangemode: { valType: "enumerated", values: ["normal", "tozero", "nonnegative"], dflt: "normal", editType: "plot" }, range: { valType: "info_array", items: [{ valType: "any", editType: "axrange", impliedEdits: { "^autorange": !1 }, anim: !0 }, { valType: "any", editType: "axrange", impliedEdits: { "^autorange": !1 }, anim: !0 }], editType: "axrange", impliedEdits: { autorange: !1 }, anim: !0 }, fixedrange: { valType: "boolean", dflt: !1, editType: "calc" }, scaleanchor: { valType: "enumerated", values: [s.idRegex.x.toString(), s.idRegex.y.toString()], editType: "plot" }, scaleratio: { valType: "number", min: 0, dflt: 1, editType: "plot" }, constrain: { valType: "enumerated", values: ["range", "domain"], editType: "plot" }, constraintoward: { valType: "enumerated", values: ["left", "center", "right", "top", "middle", "bottom"], editType: "plot" }, matches: { valType: "enumerated", values: [s.idRegex.x.toString(), s.idRegex.y.toString()], editType: "calc" }, rangebreaks: e("rangebreak", { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, bounds: { valType: "info_array", items: [{ valType: "any", editType: "calc" }, { valType: "any", editType: "calc" }], editType: "calc" }, pattern: { valType: "enumerated", values: [d, t, ""], editType: "calc" }, values: { valType: "info_array", freeLength: !0, editType: "calc", items: { valType: "any", editType: "calc" } }, dvalue: { valType: "number", editType: "calc", min: 0, dflt: n }, editType: "calc" }), tickmode: u, nticks: o(), tick0: h, dtick: l, ticklabelstep: { valType: "integer", min: 1, dflt: 1, editType: "ticks" }, tickvals: i, ticktext: { valType: "data_array", editType: "ticks" }, ticks: p, tickson: { valType: "enumerated", values: ["labels", "boundaries"], dflt: "labels", editType: "ticks" }, ticklabelmode: { valType: "enumerated", values: ["instant", "period"], dflt: "instant", editType: "ticks" }, ticklabelposition: { valType: "enumerated", values: ["outside", "inside", "outside top", "inside top", "outside left", "inside left", "outside right", "inside right", "outside bottom", "inside bottom"], dflt: "outside", editType: "calc" }, ticklabeloverflow: { valType: "enumerated", values: ["allow", "hide past div", "hide past domain"], editType: "calc" }, mirror: { valType: "enumerated", values: [!0, "ticks", !1, "all", "allticks"], dflt: !1, editType: "ticks+layoutstyle" }, ticklen: c(), tickwidth: a(), tickcolor: y, showticklabels: { valType: "boolean", dflt: !0, editType: "ticks" }, automargin: { valType: "flaglist", flags: ["height", "width", "left", "right", "top", "bottom"], extras: [!0, !1], dflt: !1, editType: "ticks" }, showspikes: { valType: "boolean", dflt: !1, editType: "modebar" }, spikecolor: { valType: "color", dflt: null, editType: "none" }, spikethickness: { valType: "number", dflt: 3, editType: "none" }, spikedash: x({}, k, { dflt: "dash", editType: "none" }), spikemode: { valType: "flaglist", flags: ["toaxis", "across", "marker"], dflt: "toaxis", editType: "none" }, spikesnap: { valType: "enumerated", values: ["data", "cursor", "hovered data"], dflt: "hovered data", editType: "none" }, tickfont: m({ editType: "ticks" }), tickangle: { valType: "angle", dflt: "auto", editType: "ticks" }, tickprefix: { valType: "string", dflt: "", editType: "ticks" }, showtickprefix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "ticks" }, ticksuffix: { valType: "string", dflt: "", editType: "ticks" }, showticksuffix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "ticks" }, showexponent: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "ticks" }, exponentformat: { valType: "enumerated", values: ["none", "e", "E", "power", "SI", "B"], dflt: "B", editType: "ticks" }, minexponent: { valType: "number", dflt: 3, min: 0, editType: "ticks" }, separatethousands: { valType: "boolean", dflt: !1, editType: "ticks" }, tickformat: { valType: "string", dflt: "", editType: "ticks", description: r("tick label") }, tickformatstops: e("tickformatstop", { enabled: { valType: "boolean", dflt: !0, editType: "ticks" }, dtickrange: { valType: "info_array", items: [{ valType: "any", editType: "ticks" }, { valType: "any", editType: "ticks" }], editType: "ticks" }, value: { valType: "string", dflt: "", editType: "ticks" }, editType: "ticks" }), hoverformat: { valType: "string", dflt: "", editType: "none", description: r("hover text") }, showline: { valType: "boolean", dflt: !1, editType: "ticks+layoutstyle" }, linecolor: { valType: "color", dflt: g.defaultLine, editType: "layoutstyle" }, linewidth: { valType: "number", min: 0, dflt: 1, editType: "ticks+layoutstyle" }, showgrid: w, gridcolor: f, gridwidth: _(), griddash: b, zeroline: { valType: "boolean", editType: "ticks" }, zerolinecolor: { valType: "color", dflt: g.defaultLine, editType: "ticks" }, zerolinewidth: { valType: "number", dflt: 1, editType: "ticks" }, showdividers: { valType: "boolean", dflt: !0, editType: "ticks" }, dividercolor: { valType: "color", dflt: g.defaultLine, editType: "ticks" }, dividerwidth: { valType: "number", dflt: 1, editType: "ticks" }, anchor: { valType: "enumerated", values: ["free", s.idRegex.x.toString(), s.idRegex.y.toString()], editType: "plot" }, side: { valType: "enumerated", values: ["top", "bottom", "left", "right"], editType: "plot" }, overlaying: { valType: "enumerated", values: ["free", s.idRegex.x.toString(), s.idRegex.y.toString()], editType: "plot" }, minor: { tickmode: u, nticks: o("minor"), tick0: h, dtick: l, tickvals: i, ticks: p, ticklen: c("minor"), tickwidth: a("minor"), tickcolor: y, gridcolor: f, gridwidth: _("minor"), griddash: b, showgrid: w, editType: "ticks" }, layer: { valType: "enumerated", values: ["above traces", "below traces"], dflt: "above traces", editType: "plot" }, domain: { valType: "info_array", items: [{ valType: "number", min: 0, max: 1, editType: "plot" }, { valType: "number", min: 0, max: 1, editType: "plot" }], dflt: [0, 1], editType: "plot" }, position: { valType: "number", min: 0, max: 1, dflt: 0, editType: "plot" }, categoryorder: { valType: "enumerated", values: ["trace", "category ascending", "category descending", "array", "total ascending", "total descending", "min ascending", "min descending", "max ascending", "max descending", "sum ascending", "sum descending", "mean ascending", "mean descending", "median ascending", "median descending"], dflt: "trace", editType: "calc" }, categoryarray: { valType: "data_array", editType: "calc" }, uirevision: { valType: "any", editType: "none" }, editType: "calc", _deprecated: { autotick: { valType: "boolean", editType: "ticks" }, title: { valType: "string", editType: "ticks" }, titlefont: m({ editType: "ticks" }) } };
    }, { "../../components/color/attributes": 366, "../../components/drawing/attributes": 388, "../../constants/numerical": 491, "../../lib/extend": 505, "../../plot_api/plot_template": 555, "../../plots/cartesian/axis_format_attributes": 569, "../font_attributes": 594, "./constants": 573 }], 580: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../../components/fx/helpers").isUnifiedHover, x = v("../../components/fx/hovermode_defaults"), e = v("../../plot_api/plot_template"), r = v("../layout_attributes"), n = v("./layout_attributes"), s = v("./type_defaults"), t = v("./axis_defaults"), d = v("./constraints"), u = v("./position_defaults"), o = v("./axis_ids"), h = o.id2name, l = o.name2id, i = v("./constants").AX_ID_PATTERN, p = v("../../registry"), c = p.traceIs, a = p.getComponentMethod;
      function y(f, _, b) {
        Array.isArray(f[_]) ? f[_].push(b) : f[_] = [b];
      }
      Q.exports = function(f, _, b) {
        var w, T, L = _.autotypenumbers, A = {}, I = {}, P = {}, S = {}, E = {}, R = {}, z = {}, j = {}, H = {}, Y = {};
        for (w = 0; w < b.length; w++) {
          var J = b[w];
          if (c(J, "cartesian") || c(J, "gl2d")) {
            var W, Z;
            if (J.xaxis)
              W = h(J.xaxis), y(A, W, J);
            else if (J.xaxes)
              for (T = 0; T < J.xaxes.length; T++)
                y(A, h(J.xaxes[T]), J);
            if (J.yaxis)
              Z = h(J.yaxis), y(A, Z, J);
            else if (J.yaxes)
              for (T = 0; T < J.yaxes.length; T++)
                y(A, h(J.yaxes[T]), J);
            J.type === "funnel" ? J.orientation === "h" ? (W && (I[W] = !0), Z && (z[Z] = !0)) : Z && (P[Z] = !0) : J.type === "image" ? (Z && (j[Z] = !0), W && (j[W] = !0)) : (Z && (E[Z] = !0, R[Z] = !0), c(J, "carpet") && (J.type !== "carpet" || J._cheater) || W && (S[W] = !0)), J.type === "carpet" && J._cheater && W && (I[W] = !0), c(J, "2dMap") && (H[W] = !0, H[Z] = !0), c(J, "oriented") && (Y[J.orientation === "h" ? Z : W] = !0);
          }
        }
        var re = _._subplots, V = re.xaxis, B = re.yaxis, U = m.simpleMap(V, h), ee = m.simpleMap(B, h), N = U.concat(ee), K = g.background;
        V.length && B.length && (K = m.coerce(f, _, r, "plot_bgcolor"));
        var X, te, ie, le, oe, ve = g.combine(K, _.paper_bgcolor);
        function ue() {
          var Ke = A[X] || [];
          oe._traceIndices = Ke.map(function(mt) {
            return mt._expandedIndex;
          }), oe._annIndices = [], oe._shapeIndices = [], oe._selectionIndices = [], oe._imgIndices = [], oe._subplotsWith = [], oe._counterAxes = [], oe._name = oe._attr = X, oe._id = te;
        }
        function ye(Ke, mt) {
          return m.coerce(le, oe, n, Ke, mt);
        }
        function Ae(Ke, mt) {
          return m.coerce2(le, oe, n, Ke, mt);
        }
        function pe(Ke) {
          return Ke === "x" ? B : V;
        }
        function ge(Ke, mt) {
          for (var Ft = Ke === "x" ? U : ee, Vt = [], Xt = 0; Xt < Ft.length; Xt++) {
            var Gt = Ft[Xt];
            Gt === mt || (f[Gt] || {}).overlaying || Vt.push(l(Gt));
          }
          return Vt;
        }
        var we = { x: pe("x"), y: pe("y") }, se = we.x.concat(we.y), de = {}, Te = [];
        function Ee() {
          var Ke = le.matches;
          i.test(Ke) && se.indexOf(Ke) === -1 && (de[Ke] = le.type, Te = Object.keys(de));
        }
        var Me = x(f, _), ze = k(Me);
        for (w = 0; w < N.length; w++) {
          X = N[w], te = l(X), ie = X.charAt(0), m.isPlainObject(f[X]) || (f[X] = {}), le = f[X], oe = e.newContainer(_, X, ie + "axis"), ue();
          var Ie = ie === "x" && !S[X] && I[X] || ie === "y" && !E[X] && P[X], Oe = ie === "y" && (!R[X] && z[X] || j[X]), Ze = { hasMinor: !0, letter: ie, font: _.font, outerTicks: H[X], showGrid: !Y[X], data: A[X] || [], bgColor: ve, calendar: _.calendar, automargin: !0, visibleDflt: Ie, reverseDflt: Oe, autotypenumbersDflt: L, splomStash: ((_._splomAxes || {})[ie] || {})[te] };
          ye("uirevision", _.uirevision), s(le, oe, ye, Ze), t(le, oe, ye, Ze, _);
          var Fe = ze && ie === Me.charAt(0), Pe = Ae("spikecolor", ze ? oe.color : void 0), De = Ae("spikethickness", ze ? 1.5 : void 0), Ge = Ae("spikedash", ze ? "dot" : void 0), Qe = Ae("spikemode", ze ? "across" : void 0), ot = Ae("spikesnap");
          ye("showspikes", !!(Fe || Pe || De || Ge || Qe || ot)) || (delete oe.spikecolor, delete oe.spikethickness, delete oe.spikedash, delete oe.spikemode, delete oe.spikesnap), u(le, oe, ye, { letter: ie, counterAxes: we[ie], overlayableAxes: ge(ie, X), grid: _.grid }), ye("title.standoff"), Ee(), oe._input = le;
        }
        for (w = 0; w < Te.length; ) {
          te = Te[w++], ie = (X = h(te)).charAt(0), m.isPlainObject(f[X]) || (f[X] = {}), le = f[X], oe = e.newContainer(_, X, ie + "axis"), ue();
          var vt = { letter: ie, font: _.font, outerTicks: H[X], showGrid: !Y[X], data: [], bgColor: ve, calendar: _.calendar, automargin: !0, visibleDflt: !1, reverseDflt: !1, autotypenumbersDflt: L, splomStash: ((_._splomAxes || {})[ie] || {})[te] };
          ye("uirevision", _.uirevision), oe.type = de[te] || "linear", t(le, oe, ye, vt, _), u(le, oe, ye, { letter: ie, counterAxes: we[ie], overlayableAxes: ge(ie, X), grid: _.grid }), ye("fixedrange"), Ee(), oe._input = le;
        }
        var bt = a("rangeslider", "handleDefaults"), yt = a("rangeselector", "handleDefaults");
        for (w = 0; w < U.length; w++)
          X = U[w], le = f[X], oe = _[X], bt(f, _, X), oe.type === "date" && yt(le, oe, _, ee, oe.calendar), ye("fixedrange");
        for (w = 0; w < ee.length; w++) {
          X = ee[w], le = f[X], oe = _[X];
          var tt = _[h(oe.anchor)];
          ye("fixedrange", a("rangeslider", "isVisible")(tt));
        }
        d.handleDefaults(f, _, { axIds: se.concat(Te).sort(o.idSort), axHasImage: j });
      };
    }, { "../../components/color": 367, "../../components/fx/helpers": 403, "../../components/fx/hovermode_defaults": 406, "../../lib": 515, "../../plot_api/plot_template": 555, "../../registry": 647, "../layout_attributes": 619, "./axis_defaults": 568, "./axis_ids": 570, "./constants": 573, "./constraints": 574, "./layout_attributes": 579, "./position_defaults": 582, "./type_defaults": 591 }], 581: [function(v, Q, $) {
      var m = v("tinycolor2").mix, g = v("../../components/color/attributes"), k = v("../../lib");
      Q.exports = function(x, e, r, n) {
        var s = (n = n || {}).dfltColor;
        function t(f, _) {
          return k.coerce2(x, e, n.attributes, f, _);
        }
        var d = t("linecolor", s), u = t("linewidth");
        r("showline", n.showLine || !!d || !!u) || (delete e.linecolor, delete e.linewidth);
        var o = t("gridcolor", m(s, n.bgColor, n.blend || g.lightFraction).toRgbString()), h = t("gridwidth"), l = t("griddash");
        if (r("showgrid", n.showGrid || !!o || !!h || !!l) || (delete e.gridcolor, delete e.gridwidth, delete e.griddash), n.hasMinor) {
          var i = t("minor.gridcolor", m(e.gridcolor, n.bgColor, 67).toRgbString()), p = t("minor.gridwidth", e.gridwidth || 1), c = t("minor.griddash", e.griddash || "solid");
          r("minor.showgrid", !!i || !!p || !!c) || (delete e.minor.gridcolor, delete e.minor.gridwidth, delete e.minor.griddash);
        }
        if (!n.noZeroLine) {
          var a = t("zerolinecolor", s), y = t("zerolinewidth");
          r("zeroline", n.showGrid || !!a || !!y) || (delete e.zerolinecolor, delete e.zerolinewidth);
        }
      };
    }, { "../../components/color/attributes": 366, "../../lib": 515, tinycolor2: 313 }], 582: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib");
      Q.exports = function(k, x, e, r) {
        var n, s, t, d, u = r.counterAxes || [], o = r.overlayableAxes || [], h = r.letter, l = r.grid;
        l && (s = l._domains[h][l._axisMap[x._id]], n = l._anchors[x._id], s && (t = l[h + "side"].split(" ")[0], d = l.domain[h][t === "right" || t === "top" ? 1 : 0])), s = s || [0, 1], n = n || (m(k.position) ? "free" : u[0] || "free"), t = t || (h === "x" ? "bottom" : "left"), d = d || 0, g.coerce(k, x, { anchor: { valType: "enumerated", values: ["free"].concat(u), dflt: n } }, "anchor") === "free" && e("position", d), g.coerce(k, x, { side: { valType: "enumerated", values: h === "x" ? ["bottom", "top"] : ["left", "right"], dflt: t } }, "side");
        var i = !1;
        if (o.length && (i = g.coerce(k, x, { overlaying: { valType: "enumerated", values: [!1].concat(o), dflt: !1 } }, "overlaying")), !i) {
          var p = e("domain", s);
          p[0] > p[1] - 1 / 4096 && (x.domain = s), g.noneOrAll(k.domain, x.domain, s);
        }
        return e("layer"), x;
      };
    }, { "../../lib": 515, "fast-isnumeric": 190 }], 583: [function(v, Q, $) {
      var m = v("./show_dflt");
      Q.exports = function(g, k, x, e, r) {
        r || (r = {});
        var n = r.tickSuffixDflt, s = m(g);
        x("tickprefix") && x("showtickprefix", s), x("ticksuffix", n) && x("showticksuffix", s);
      };
    }, { "./show_dflt": 586 }], 584: [function(v, Q, $) {
      var m = v("../../constants/alignment").FROM_BL;
      Q.exports = function(g, k, x) {
        x === void 0 && (x = m[g.constraintoward || "center"]);
        var e = [g.r2l(g.range[0]), g.r2l(g.range[1])], r = e[0] + (e[1] - e[0]) * x;
        g.range = g._input.range = [g.l2r(r + (e[0] - r) * k), g.l2r(r + (e[1] - r) * k)], g.setScale();
      };
    }, { "../../constants/alignment": 483 }], 585: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-time-format").utcFormat, k = v("../../lib"), x = k.numberFormat, e = v("fast-isnumeric"), r = k.cleanNumber, n = k.ms2DateTime, s = k.dateTime2ms, t = k.ensureNumber, d = k.isArrayOrTypedArray, u = v("../../constants/numerical"), o = u.FP_SAFE, h = u.BADNUM, l = u.LOG_CLIP, i = u.ONEWEEK, p = u.ONEDAY, c = u.ONEHOUR, a = u.ONEMIN, y = u.ONESEC, f = v("./axis_ids"), _ = v("./constants"), b = _.HOUR_PATTERN, w = _.WEEKDAY_PATTERN;
      function T(A) {
        return Math.pow(10, A);
      }
      function L(A) {
        return A != null;
      }
      Q.exports = function(A, I) {
        I = I || {};
        var P = A._id || "x", S = P.charAt(0);
        function E(N, K) {
          if (N > 0)
            return Math.log(N) / Math.LN10;
          if (N <= 0 && K && A.range && A.range.length === 2) {
            var X = A.range[0], te = A.range[1];
            return 0.5 * (X + te - 2 * l * Math.abs(X - te));
          }
          return h;
        }
        function R(N, K, X, te) {
          if ((te || {}).msUTC && e(N))
            return +N;
          var ie = s(N, X || A.calendar);
          if (ie === h) {
            if (!e(N))
              return h;
            N = +N;
            var le = Math.floor(10 * k.mod(N + 0.05, 1)), oe = Math.round(N - le / 10);
            ie = s(new Date(oe)) + le / 10;
          }
          return ie;
        }
        function z(N, K, X) {
          return n(N, K, X || A.calendar);
        }
        function j(N) {
          return A._categories[Math.round(N)];
        }
        function H(N) {
          if (L(N)) {
            if (A._categoriesMap === void 0 && (A._categoriesMap = {}), A._categoriesMap[N] !== void 0)
              return A._categoriesMap[N];
            A._categories.push(typeof N == "number" ? String(N) : N);
            var K = A._categories.length - 1;
            return A._categoriesMap[N] = K, K;
          }
          return h;
        }
        function Y(N) {
          if (A._categoriesMap)
            return A._categoriesMap[N];
        }
        function J(N) {
          var K = Y(N);
          return K !== void 0 ? K : e(N) ? +N : void 0;
        }
        function W(N) {
          return e(N) ? +N : Y(N);
        }
        function Z(N, K, X) {
          return m.round(X + K * N, 2);
        }
        function re(N, K, X) {
          return (N - X) / K;
        }
        var V = function(N) {
          return e(N) ? Z(N, A._m, A._b) : h;
        }, B = function(N) {
          return re(N, A._m, A._b);
        };
        if (A.rangebreaks) {
          var U = S === "y";
          V = function(N) {
            if (!e(N))
              return h;
            var K = A._rangebreaks.length;
            if (!K)
              return Z(N, A._m, A._b);
            var X = U;
            A.range[0] > A.range[1] && (X = !X);
            for (var te = X ? -1 : 1, ie = te * N, le = 0, oe = 0; oe < K; oe++) {
              var ve = te * A._rangebreaks[oe].min, ue = te * A._rangebreaks[oe].max;
              if (ie < ve)
                break;
              if (!(ie > ue)) {
                le = ie < (ve + ue) / 2 ? oe : oe + 1;
                break;
              }
              le = oe + 1;
            }
            var ye = A._B[le] || 0;
            return isFinite(ye) ? Z(N, A._m2, ye) : 0;
          }, B = function(N) {
            var K = A._rangebreaks.length;
            if (!K)
              return re(N, A._m, A._b);
            for (var X = 0, te = 0; te < K && !(N < A._rangebreaks[te].pmin); te++)
              N > A._rangebreaks[te].pmax && (X = te + 1);
            return re(N, A._m2, A._B[X]);
          };
        }
        A.c2l = A.type === "log" ? E : t, A.l2c = A.type === "log" ? T : t, A.l2p = V, A.p2l = B, A.c2p = A.type === "log" ? function(N, K) {
          return V(E(N, K));
        } : V, A.p2c = A.type === "log" ? function(N) {
          return T(B(N));
        } : B, ["linear", "-"].indexOf(A.type) !== -1 ? (A.d2r = A.r2d = A.d2c = A.r2c = A.d2l = A.r2l = r, A.c2d = A.c2r = A.l2d = A.l2r = t, A.d2p = A.r2p = function(N) {
          return A.l2p(r(N));
        }, A.p2d = A.p2r = B, A.cleanPos = t) : A.type === "log" ? (A.d2r = A.d2l = function(N, K) {
          return E(r(N), K);
        }, A.r2d = A.r2c = function(N) {
          return T(r(N));
        }, A.d2c = A.r2l = r, A.c2d = A.l2r = t, A.c2r = E, A.l2d = T, A.d2p = function(N, K) {
          return A.l2p(A.d2r(N, K));
        }, A.p2d = function(N) {
          return T(B(N));
        }, A.r2p = function(N) {
          return A.l2p(r(N));
        }, A.p2r = B, A.cleanPos = t) : A.type === "date" ? (A.d2r = A.r2d = k.identity, A.d2c = A.r2c = A.d2l = A.r2l = R, A.c2d = A.c2r = A.l2d = A.l2r = z, A.d2p = A.r2p = function(N, K, X) {
          return A.l2p(R(N, 0, X));
        }, A.p2d = A.p2r = function(N, K, X) {
          return z(B(N), K, X);
        }, A.cleanPos = function(N) {
          return k.cleanDate(N, h, A.calendar);
        }) : A.type === "category" ? (A.d2c = A.d2l = H, A.r2d = A.c2d = A.l2d = j, A.d2r = A.d2l_noadd = J, A.r2c = function(N) {
          var K = W(N);
          return K !== void 0 ? K : A.fraction2r(0.5);
        }, A.l2r = A.c2r = t, A.r2l = W, A.d2p = function(N) {
          return A.l2p(A.r2c(N));
        }, A.p2d = function(N) {
          return j(B(N));
        }, A.r2p = A.d2p, A.p2r = B, A.cleanPos = function(N) {
          return typeof N == "string" && N !== "" ? N : t(N);
        }) : A.type === "multicategory" && (A.r2d = A.c2d = A.l2d = j, A.d2r = A.d2l_noadd = J, A.r2c = function(N) {
          var K = J(N);
          return K !== void 0 ? K : A.fraction2r(0.5);
        }, A.r2c_just_indices = Y, A.l2r = A.c2r = t, A.r2l = J, A.d2p = function(N) {
          return A.l2p(A.r2c(N));
        }, A.p2d = function(N) {
          return j(B(N));
        }, A.r2p = A.d2p, A.p2r = B, A.cleanPos = function(N) {
          return Array.isArray(N) || typeof N == "string" && N !== "" ? N : t(N);
        }, A.setupMultiCategory = function(N) {
          var K, X, te = A._traceIndices, ie = A._matchGroup;
          if (ie && A._categories.length === 0) {
            for (var le in ie)
              if (le !== P) {
                var oe = I[f.id2name(le)];
                te = te.concat(oe._traceIndices);
              }
          }
          var ve = [[0, {}], [0, {}]], ue = [];
          for (K = 0; K < te.length; K++) {
            var ye = N[te[K]];
            if (S in ye) {
              var Ae = ye[S], pe = ye._length || k.minRowLength(Ae);
              if (d(Ae[0]) && d(Ae[1]))
                for (X = 0; X < pe; X++) {
                  var ge = Ae[0][X], we = Ae[1][X];
                  L(ge) && L(we) && (ue.push([ge, we]), ge in ve[0][1] || (ve[0][1][ge] = ve[0][0]++), we in ve[1][1] || (ve[1][1][we] = ve[1][0]++));
                }
            }
          }
          for (ue.sort(function(se, de) {
            var Te = ve[0][1], Ee = Te[se[0]] - Te[de[0]];
            if (Ee)
              return Ee;
            var Me = ve[1][1];
            return Me[se[1]] - Me[de[1]];
          }), K = 0; K < ue.length; K++)
            H(ue[K]);
        }), A.fraction2r = function(N) {
          var K = A.r2l(A.range[0]), X = A.r2l(A.range[1]);
          return A.l2r(K + N * (X - K));
        }, A.r2fraction = function(N) {
          var K = A.r2l(A.range[0]), X = A.r2l(A.range[1]);
          return (A.r2l(N) - K) / (X - K);
        }, A.cleanRange = function(N, K) {
          K || (K = {}), N || (N = "range");
          var X, te, ie = k.nestedProperty(A, N).get();
          if (te = (te = A.type === "date" ? k.dfltRange(A.calendar) : S === "y" ? _.DFLTRANGEY : A._name === "realaxis" ? [0, 1] : K.dfltRange || _.DFLTRANGEX).slice(), A.rangemode !== "tozero" && A.rangemode !== "nonnegative" || (te[0] = 0), ie && ie.length === 2)
            for (A.type !== "date" || A.autorange || (ie[0] = k.cleanDate(ie[0], h, A.calendar), ie[1] = k.cleanDate(ie[1], h, A.calendar)), X = 0; X < 2; X++)
              if (A.type === "date") {
                if (!k.isDateTime(ie[X], A.calendar)) {
                  A[N] = te;
                  break;
                }
                if (A.r2l(ie[0]) === A.r2l(ie[1])) {
                  var le = k.constrain(A.r2l(ie[0]), k.MIN_MS + 1e3, k.MAX_MS - 1e3);
                  ie[0] = A.l2r(le - 1e3), ie[1] = A.l2r(le + 1e3);
                  break;
                }
              } else {
                if (!e(ie[X])) {
                  if (!e(ie[1 - X])) {
                    A[N] = te;
                    break;
                  }
                  ie[X] = ie[1 - X] * (X ? 10 : 0.1);
                }
                if (ie[X] < -o ? ie[X] = -o : ie[X] > o && (ie[X] = o), ie[0] === ie[1]) {
                  var oe = Math.max(1, Math.abs(1e-6 * ie[0]));
                  ie[0] -= oe, ie[1] += oe;
                }
              }
          else
            k.nestedProperty(A, N).set(te);
        }, A.setScale = function(N) {
          var K = I._size;
          if (A.overlaying) {
            var X = f.getFromId({ _fullLayout: I }, A.overlaying);
            A.domain = X.domain;
          }
          var te = N && A._r ? "_r" : "range", ie = A.calendar;
          A.cleanRange(te);
          var le, oe, ve = A.r2l(A[te][0], ie), ue = A.r2l(A[te][1], ie), ye = S === "y";
          if (ye ? (A._offset = K.t + (1 - A.domain[1]) * K.h, A._length = K.h * (A.domain[1] - A.domain[0]), A._m = A._length / (ve - ue), A._b = -A._m * ue) : (A._offset = K.l + A.domain[0] * K.w, A._length = K.w * (A.domain[1] - A.domain[0]), A._m = A._length / (ue - ve), A._b = -A._m * ve), A._rangebreaks = [], A._lBreaks = 0, A._m2 = 0, A._B = [], A.rangebreaks && (A._rangebreaks = A.locateBreaks(Math.min(ve, ue), Math.max(ve, ue)), A._rangebreaks.length)) {
            for (le = 0; le < A._rangebreaks.length; le++)
              oe = A._rangebreaks[le], A._lBreaks += Math.abs(oe.max - oe.min);
            var Ae = ye;
            ve > ue && (Ae = !Ae), Ae && A._rangebreaks.reverse();
            var pe = Ae ? -1 : 1;
            for (A._m2 = pe * A._length / (Math.abs(ue - ve) - A._lBreaks), A._B.push(-A._m2 * (ye ? ue : ve)), le = 0; le < A._rangebreaks.length; le++)
              oe = A._rangebreaks[le], A._B.push(A._B[A._B.length - 1] - pe * A._m2 * (oe.max - oe.min));
            for (le = 0; le < A._rangebreaks.length; le++)
              (oe = A._rangebreaks[le]).pmin = V(oe.min), oe.pmax = V(oe.max);
          }
          if (!isFinite(A._m) || !isFinite(A._b) || A._length < 0)
            throw I._replotting = !1, new Error("Something went wrong with axis scaling");
        }, A.maskBreaks = function(N) {
          var K, X, te, ie, le, oe = A.rangebreaks || [];
          oe._cachedPatterns || (oe._cachedPatterns = oe.map(function(ge) {
            return ge.enabled && ge.bounds ? k.simpleMap(ge.bounds, ge.pattern ? r : A.d2c) : null;
          })), oe._cachedValues || (oe._cachedValues = oe.map(function(ge) {
            return ge.enabled && ge.values ? k.simpleMap(ge.values, A.d2c).sort(k.sorterAsc) : null;
          }));
          for (var ve = 0; ve < oe.length; ve++) {
            var ue = oe[ve];
            if (ue.enabled) {
              if (ue.bounds) {
                var ye = ue.pattern;
                switch (X = (K = oe._cachedPatterns[ve])[0], te = K[1], ye) {
                  case w:
                    ie = (le = new Date(N)).getUTCDay(), X > te && (te += 7, ie < X && (ie += 7));
                    break;
                  case b:
                    ie = (le = new Date(N)).getUTCHours() + (le.getUTCMinutes() / 60 + le.getUTCSeconds() / 3600 + le.getUTCMilliseconds() / 36e5), X > te && (te += 24, ie < X && (ie += 24));
                    break;
                  case "":
                    ie = N;
                }
                if (ie >= X && ie < te)
                  return h;
              } else
                for (var Ae = oe._cachedValues[ve], pe = 0; pe < Ae.length; pe++)
                  if (te = (X = Ae[pe]) + ue.dvalue, N >= X && N < te)
                    return h;
            }
          }
          return N;
        }, A.locateBreaks = function(N, K) {
          var X, te, ie, le, oe = [];
          if (!A.rangebreaks)
            return oe;
          var ve = A.rangebreaks.slice().sort(function(Me, ze) {
            return Me.pattern === w && ze.pattern === b ? -1 : ze.pattern === w && Me.pattern === b ? 1 : 0;
          }), ue = function(Me, ze) {
            if ((Me = k.constrain(Me, N, K)) !== (ze = k.constrain(ze, N, K))) {
              for (var Ie = !0, Oe = 0; Oe < oe.length; Oe++) {
                var Ze = oe[Oe];
                Me < Ze.max && ze >= Ze.min && (Me < Ze.min && (Ze.min = Me), ze > Ze.max && (Ze.max = ze), Ie = !1);
              }
              Ie && oe.push({ min: Me, max: ze });
            }
          };
          for (X = 0; X < ve.length; X++) {
            var ye = ve[X];
            if (ye.enabled)
              if (ye.bounds) {
                var Ae = N, pe = K;
                ye.pattern && (Ae = Math.floor(Ae)), ie = (te = k.simpleMap(ye.bounds, ye.pattern ? r : A.r2l))[0], le = te[1];
                var ge, we, se = new Date(Ae);
                switch (ye.pattern) {
                  case w:
                    we = i, ge = (le - ie + (le < ie ? 7 : 0)) * p, Ae += ie * p - (se.getUTCDay() * p + se.getUTCHours() * c + se.getUTCMinutes() * a + se.getUTCSeconds() * y + se.getUTCMilliseconds());
                    break;
                  case b:
                    we = p, ge = (le - ie + (le < ie ? 24 : 0)) * c, Ae += ie * c - (se.getUTCHours() * c + se.getUTCMinutes() * a + se.getUTCSeconds() * y + se.getUTCMilliseconds());
                    break;
                  default:
                    Ae = Math.min(te[0], te[1]), ge = we = (pe = Math.max(te[0], te[1])) - Ae;
                }
                for (var de = Ae; de < pe; de += we)
                  ue(de, de + ge);
              } else
                for (var Te = k.simpleMap(ye.values, A.d2c), Ee = 0; Ee < Te.length; Ee++)
                  ue(ie = Te[Ee], le = ie + ye.dvalue);
          }
          return oe.sort(function(Me, ze) {
            return Me.min - ze.min;
          }), oe;
        }, A.makeCalcdata = function(N, K, X) {
          var te, ie, le, oe, ve = A.type, ue = ve === "date" && N[K + "calendar"];
          if (K in N) {
            if (te = N[K], oe = N._length || k.minRowLength(te), k.isTypedArray(te) && (ve === "linear" || ve === "log")) {
              if (oe === te.length)
                return te;
              if (te.subarray)
                return te.subarray(0, oe);
            }
            if (ve === "multicategory")
              return function(pe, ge) {
                for (var we = new Array(ge), se = 0; se < ge; se++) {
                  var de = (pe[0] || [])[se], Te = (pe[1] || [])[se];
                  we[se] = Y([de, Te]);
                }
                return we;
              }(te, oe);
            for (ie = new Array(oe), le = 0; le < oe; le++)
              ie[le] = A.d2c(te[le], 0, ue, X);
          } else {
            var ye = K + "0" in N ? A.d2c(N[K + "0"], 0, ue) : 0, Ae = N["d" + K] ? Number(N["d" + K]) : 1;
            for (te = N[{ x: "y", y: "x" }[K]], oe = N._length || te.length, ie = new Array(oe), le = 0; le < oe; le++)
              ie[le] = ye + le * Ae;
          }
          if (A.rangebreaks)
            for (le = 0; le < oe; le++)
              ie[le] = A.maskBreaks(ie[le]);
          return ie;
        }, A.isValidRange = function(N) {
          return Array.isArray(N) && N.length === 2 && e(A.r2l(N[0])) && e(A.r2l(N[1]));
        }, A.isPtWithinRange = function(N, K) {
          var X = A.c2l(N[S], null, K), te = A.r2l(A.range[0]), ie = A.r2l(A.range[1]);
          return te < ie ? te <= X && X <= ie : ie <= X && X <= te;
        }, A._emptyCategories = function() {
          A._categories = [], A._categoriesMap = {};
        }, A.clearCalc = function() {
          var N = A._matchGroup;
          if (N) {
            var K = null, X = null;
            for (var te in N) {
              var ie = I[f.id2name(te)];
              if (ie._categories) {
                K = ie._categories, X = ie._categoriesMap;
                break;
              }
            }
            K && X ? (A._categories = K, A._categoriesMap = X) : A._emptyCategories();
          } else
            A._emptyCategories();
          if (A._initialCategories)
            for (var le = 0; le < A._initialCategories.length; le++)
              H(A._initialCategories[le]);
        }, A.sortByInitialCategories = function() {
          var N = [];
          if (A._emptyCategories(), A._initialCategories)
            for (var K = 0; K < A._initialCategories.length; K++)
              H(A._initialCategories[K]);
          N = N.concat(A._traceIndices);
          var X = A._matchGroup;
          for (var te in X)
            if (P !== te) {
              var ie = I[f.id2name(te)];
              ie._categories = A._categories, ie._categoriesMap = A._categoriesMap, N = N.concat(ie._traceIndices);
            }
          return N;
        };
        var ee = I._d3locale;
        A.type === "date" && (A._dateFormat = ee ? ee.timeFormat : g, A._extraFormat = I._extraFormat), A._separators = I.separators, A._numFormat = ee ? ee.numberFormat : x, delete A._minDtick, delete A._forceTick0;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "./axis_ids": 570, "./constants": 573, "@plotly/d3": 58, "d3-time-format": 120, "fast-isnumeric": 190 }], 586: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = ["showexponent", "showtickprefix", "showticksuffix"].filter(function(k) {
          return m[k] !== void 0;
        });
        if (g.every(function(k) {
          return m[k] === m[g[0]];
        }) || g.length === 1)
          return m[g[0]];
      };
    }, {}], 587: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color").contrast, k = v("./layout_attributes"), x = v("./show_dflt"), e = v("../array_container_defaults");
      function r(n, s) {
        function t(d, u) {
          return m.coerce(n, s, k.tickformatstops, d, u);
        }
        t("enabled") && (t("dtickrange"), t("value"));
      }
      Q.exports = function(n, s, t, d, u) {
        u || (u = {});
        var o = x(n);
        if (t("showticklabels")) {
          var h = u.font || {}, l = s.color, i = (s.ticklabelposition || "").indexOf("inside") !== -1 ? g(u.bgColor) : l && l !== k.color.dflt ? l : h.color;
          if (m.coerceFont(t, "tickfont", { family: h.family, size: h.size, color: i }), u.noTicklabelstep || d === "multicategory" || d === "log" || t("ticklabelstep"), u.noAng || t("tickangle"), d !== "category") {
            var p = t("tickformat");
            e(n, s, { name: "tickformatstops", inclusionAttr: "enabled", handleItemDefaults: r }), s.tickformatstops.length || delete s.tickformatstops, u.noExp || p || d === "date" || (t("showexponent", o), t("exponentformat"), t("minexponent"), t("separatethousands"));
          }
        }
      };
    }, { "../../components/color": 367, "../../lib": 515, "../array_container_defaults": 561, "./layout_attributes": 579, "./show_dflt": 586 }], 588: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x, e, r) {
        var n = r.isMinor, s = n ? k.minor || {} : k, t = n ? x.minor : x, d = n ? g.minor : g, u = n ? "minor." : "", o = m.coerce2(s, t, d, "ticklen", n ? 0.6 * (x.ticklen || 5) : void 0), h = m.coerce2(s, t, d, "tickwidth", n ? x.tickwidth || 1 : void 0), l = m.coerce2(s, t, d, "tickcolor", (n ? x.tickcolor : void 0) || t.color);
        e(u + "ticks", !n && r.outerTicks || o || h || l ? "outside" : "") || (delete t.ticklen, delete t.tickwidth, delete t.tickcolor);
      };
    }, { "../../lib": 515, "./layout_attributes": 579 }], 589: [function(v, Q, $) {
      var m = v("./clean_ticks"), g = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(k, x, e, r, n) {
        n || (n = {});
        var s = n.isMinor, t = s ? k.minor || {} : k, d = s ? x.minor : x, u = s ? "minor." : "";
        function o(a) {
          var y = t[a];
          return y !== void 0 ? y : (d._template || {})[a];
        }
        var h = o("tick0"), l = o("dtick"), i = o("tickvals"), p = e(u + "tickmode", g(i) ? "array" : l ? "linear" : "auto");
        if (p === "auto")
          e(u + "nticks");
        else if (p === "linear") {
          var c = d.dtick = m.dtick(l, r);
          d.tick0 = m.tick0(h, r, x.calendar, c);
        } else
          r !== "multicategory" && (e(u + "tickvals") === void 0 ? d.tickmode = "auto" : s || e("ticktext"));
      };
    }, { "../../lib": 515, "./clean_ticks": 572 }], 590: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../lib"), x = v("../../components/drawing"), e = v("./axes");
      Q.exports = function(r, n, s, t) {
        var d = r._fullLayout;
        if (n.length !== 0) {
          var u, o, h, l;
          t && (u = t());
          var i = m.ease(s.easing);
          return r._transitionData._interruptCallbacks.push(function() {
            return window.cancelAnimationFrame(l), l = null, function() {
              for (var a = {}, y = 0; y < n.length; y++) {
                var f = n[y], _ = f.plotinfo.xaxis, b = f.plotinfo.yaxis;
                f.xr0 && (a[_._name + ".range"] = f.xr0.slice()), f.yr0 && (a[b._name + ".range"] = f.yr0.slice());
              }
              return g.call("relayout", r, a).then(function() {
                for (var w = 0; w < n.length; w++)
                  p(n[w].plotinfo);
              });
            }();
          }), o = Date.now(), l = window.requestAnimationFrame(function a() {
            h = Date.now();
            for (var y = Math.min(1, (h - o) / s.duration), f = i(y), _ = 0; _ < n.length; _++)
              c(n[_], f);
            h - o > s.duration ? (function() {
              for (var b = {}, w = 0; w < n.length; w++) {
                var T = n[w], L = T.plotinfo.xaxis, A = T.plotinfo.yaxis;
                T.xr1 && (b[L._name + ".range"] = T.xr1.slice()), T.yr1 && (b[A._name + ".range"] = T.yr1.slice());
              }
              u && u(), g.call("relayout", r, b).then(function() {
                for (var I = 0; I < n.length; I++)
                  p(n[I].plotinfo);
              });
            }(), l = window.cancelAnimationFrame(a)) : l = window.requestAnimationFrame(a);
          }), Promise.resolve();
        }
        function p(a) {
          var y = a.xaxis, f = a.yaxis;
          d._defs.select("#" + a.clipId + "> rect").call(x.setTranslate, 0, 0).call(x.setScale, 1, 1), a.plot.call(x.setTranslate, y._offset, f._offset).call(x.setScale, 1, 1);
          var _ = a.plot.selectAll(".scatterlayer .trace");
          _.selectAll(".point").call(x.setPointGroupScale, 1, 1), _.selectAll(".textpoint").call(x.setTextPointsScale, 1, 1), _.call(x.hideOutsideRangePoints, a);
        }
        function c(a, y) {
          var f = a.plotinfo, _ = f.xaxis, b = f.yaxis, w = _._length, T = b._length, L = !!a.xr1, A = !!a.yr1, I = [];
          if (L) {
            var P = k.simpleMap(a.xr0, _.r2l), S = k.simpleMap(a.xr1, _.r2l), E = P[1] - P[0], R = S[1] - S[0];
            I[0] = (P[0] * (1 - y) + y * S[0] - P[0]) / (P[1] - P[0]) * w, I[2] = w * (1 - y + y * R / E), _.range[0] = _.l2r(P[0] * (1 - y) + y * S[0]), _.range[1] = _.l2r(P[1] * (1 - y) + y * S[1]);
          } else
            I[0] = 0, I[2] = w;
          if (A) {
            var z = k.simpleMap(a.yr0, b.r2l), j = k.simpleMap(a.yr1, b.r2l), H = z[1] - z[0], Y = j[1] - j[0];
            I[1] = (z[1] * (1 - y) + y * j[1] - z[1]) / (z[0] - z[1]) * T, I[3] = T * (1 - y + y * Y / H), b.range[0] = _.l2r(z[0] * (1 - y) + y * j[0]), b.range[1] = b.l2r(z[1] * (1 - y) + y * j[1]);
          } else
            I[1] = 0, I[3] = T;
          e.drawOne(r, _, { skipTitle: !0 }), e.drawOne(r, b, { skipTitle: !0 }), e.redrawComponents(r, [_._id, b._id]);
          var J = L ? w / I[2] : 1, W = A ? T / I[3] : 1, Z = L ? I[0] : 0, re = A ? I[1] : 0, V = L ? I[0] / I[2] * w : 0, B = A ? I[1] / I[3] * T : 0, U = _._offset - V, ee = b._offset - B;
          f.clipRect.call(x.setTranslate, Z, re).call(x.setScale, 1 / J, 1 / W), f.plot.call(x.setTranslate, U, ee).call(x.setScale, J, W), x.setPointGroupScale(f.zoomScalePts, 1 / J, 1 / W), x.setTextPointsScale(f.zoomScaleTxt, 1 / J, 1 / W);
        }
        e.redrawComponents(r);
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../registry": 647, "./axes": 566, "@plotly/d3": 58 }], 591: [function(v, Q, $) {
      var m = v("../../registry").traceIs, g = v("./axis_autotype");
      function k(e) {
        return { v: "x", h: "y" }[e.orientation || "v"];
      }
      function x(e, r) {
        var n = k(e), s = m(e, "box-violin"), t = m(e._fullInput || {}, "candlestick");
        return s && !t && r === n && e[n] === void 0 && e[n + "0"] === void 0;
      }
      Q.exports = function(e, r, n, s) {
        n("autotypenumbers", s.autotypenumbersDflt), n("type", (s.splomStash || {}).type) === "-" && (function(t, d) {
          if (t.type === "-") {
            var u, o = t._id, h = o.charAt(0);
            o.indexOf("scene") !== -1 && (o = h);
            var l = function(b, w, T) {
              for (var L = 0; L < b.length; L++) {
                var A = b[L];
                if (A.type === "splom" && A._length > 0 && (A["_" + T + "axes"] || {})[w] || (A[T + "axis"] || T) === w && (x(A, T) || (A[T] || []).length || A[T + "0"]))
                  return A;
              }
            }(d, o, h);
            if (!!l) {
              if (l.type === "histogram" && h === { v: "y", h: "x" }[l.orientation || "v"])
                return void (t.type = "linear");
              var i = h + "calendar", p = l[i], c = { noMultiCategory: !m(l, "cartesian") || m(l, "noMultiCategory") };
              if (l.type === "box" && l._hasPreCompStats && h === { h: "x", v: "y" }[l.orientation || "v"] && (c.noMultiCategory = !0), c.autotypenumbers = t.autotypenumbers, x(l, h)) {
                var a = k(l), y = [];
                for (u = 0; u < d.length; u++) {
                  var f = d[u];
                  m(f, "box-violin") && (f[h + "axis"] || h) === o && (f[a] !== void 0 ? y.push(f[a][0]) : f.name !== void 0 ? y.push(f.name) : y.push("text"), f[i] !== p && (p = void 0));
                }
                t.type = g(y, p, c);
              } else if (l.type === "splom") {
                var _ = l.dimensions[l._axesDim[o]];
                _.visible && (t.type = g(_.values, p, c));
              } else
                t.type = g(l[h] || [l[h + "0"]], p, c);
            }
          }
        }(r, s.data), r.type === "-" ? r.type = "linear" : e.type = r.type);
      };
    }, { "../../registry": 647, "./axis_autotype": 567 }], 592: [function(v, Q, $) {
      var m = v("../registry"), g = v("../lib");
      function k(n, s, t) {
        var d, u, o, h = !1;
        if (s.type === "data")
          d = n._fullData[s.traces !== null ? s.traces[0] : 0];
        else {
          if (s.type !== "layout")
            return !1;
          d = n._fullLayout;
        }
        return u = g.nestedProperty(d, s.prop).get(), (o = t[s.type] = t[s.type] || {}).hasOwnProperty(s.prop) && o[s.prop] !== u && (h = !0), o[s.prop] = u, { changed: h, value: u };
      }
      function x(n, s) {
        var t = [], d = s[0], u = {};
        if (typeof d == "string")
          u[d] = s[1];
        else {
          if (!g.isPlainObject(d))
            return t;
          u = d;
        }
        return r(u, function(o, h, l) {
          t.push({ type: "layout", prop: o, value: l });
        }, "", 0), t;
      }
      function e(n, s) {
        var t, d, u, o, h = [];
        if (d = s[0], u = s[1], t = s[2], o = {}, typeof d == "string")
          o[d] = u;
        else {
          if (!g.isPlainObject(d))
            return h;
          o = d, t === void 0 && (t = u);
        }
        return t === void 0 && (t = null), r(o, function(l, i, p) {
          var c, a;
          if (Array.isArray(p)) {
            a = p.slice();
            var y = Math.min(a.length, n.data.length);
            t && (y = Math.min(y, t.length)), c = [];
            for (var f = 0; f < y; f++)
              c[f] = t ? t[f] : f;
          } else
            a = p, c = t ? t.slice() : null;
          if (c === null)
            Array.isArray(a) && (a = a[0]);
          else if (Array.isArray(c)) {
            if (!Array.isArray(a)) {
              var _ = a;
              a = [];
              for (var b = 0; b < c.length; b++)
                a[b] = _;
            }
            a.length = Math.min(c.length, a.length);
          }
          h.push({ type: "data", prop: l, traces: c, value: a });
        }, "", 0), h;
      }
      function r(n, s, t, d) {
        Object.keys(n).forEach(function(u) {
          var o = n[u];
          if (u[0] !== "_") {
            var h = t + (d > 0 ? "." : "") + u;
            g.isPlainObject(o) ? r(o, s, h, d + 1) : s(h, u, o);
          }
        });
      }
      $.manageCommandObserver = function(n, s, t, d) {
        var u = {}, o = !0;
        s && s._commandObserver && (u = s._commandObserver), u.cache || (u.cache = {}), u.lookupTable = {};
        var h = $.hasSimpleAPICommandBindings(n, t, u.lookupTable);
        if (s && s._commandObserver) {
          if (h)
            return u;
          if (s._commandObserver.remove)
            return s._commandObserver.remove(), s._commandObserver = null, u;
        }
        if (h) {
          k(n, h, u.cache), u.check = function() {
            if (o) {
              var p = k(n, h, u.cache);
              return p.changed && d && u.lookupTable[p.value] !== void 0 && (u.disable(), Promise.resolve(d({ value: p.value, type: h.type, prop: h.prop, traces: h.traces, index: u.lookupTable[p.value] })).then(u.enable, u.enable)), p.changed;
            }
          };
          for (var l = ["plotly_relayout", "plotly_redraw", "plotly_restyle", "plotly_update", "plotly_animatingframe", "plotly_afterplot"], i = 0; i < l.length; i++)
            n._internalOn(l[i], u.check);
          u.remove = function() {
            for (var p = 0; p < l.length; p++)
              n._removeInternalListener(l[p], u.check);
          };
        } else
          g.log("Unable to automatically bind plot updates to API command"), u.lookupTable = {}, u.remove = function() {
          };
        return u.disable = function() {
          o = !1;
        }, u.enable = function() {
          o = !0;
        }, s && (s._commandObserver = u), u;
      }, $.hasSimpleAPICommandBindings = function(n, s, t) {
        var d, u, o = s.length;
        for (d = 0; d < o; d++) {
          var h, l = s[d], i = l.method, p = l.args;
          if (Array.isArray(p) || (p = []), !i)
            return !1;
          var c = $.computeAPICommandBindings(n, i, p);
          if (c.length !== 1)
            return !1;
          if (u) {
            if ((h = c[0]).type !== u.type || h.prop !== u.prop)
              return !1;
            if (Array.isArray(u.traces)) {
              if (!Array.isArray(h.traces))
                return !1;
              h.traces.sort();
              for (var a = 0; a < u.traces.length; a++)
                if (u.traces[a] !== h.traces[a])
                  return !1;
            } else if (h.prop !== u.prop)
              return !1;
          } else
            u = c[0], Array.isArray(u.traces) && u.traces.sort();
          var y = (h = c[0]).value;
          if (Array.isArray(y)) {
            if (y.length !== 1)
              return !1;
            y = y[0];
          }
          t && (t[y] = d);
        }
        return u;
      }, $.executeAPICommand = function(n, s, t) {
        if (s === "skip")
          return Promise.resolve();
        var d = m.apiMethodRegistry[s], u = [n];
        Array.isArray(t) || (t = []);
        for (var o = 0; o < t.length; o++)
          u.push(t[o]);
        return d.apply(null, u).catch(function(h) {
          return g.warn("API call to Plotly." + s + " rejected.", h), Promise.reject(h);
        });
      }, $.computeAPICommandBindings = function(n, s, t) {
        var d;
        switch (Array.isArray(t) || (t = []), s) {
          case "restyle":
            d = e(n, t);
            break;
          case "relayout":
            d = x(n, t);
            break;
          case "update":
            d = e(n, [t[0], t[2]]).concat(x(n, [t[1]]));
            break;
          case "animate":
            d = function(u, o) {
              return Array.isArray(o[0]) && o[0].length === 1 && ["string", "number"].indexOf(typeof o[0][0]) !== -1 ? [{ type: "layout", prop: "_currentFrame", value: o[0][0].toString() }] : [];
            }(0, t);
            break;
          default:
            d = [];
        }
        return d;
      };
    }, { "../lib": 515, "../registry": 647 }], 593: [function(v, Q, $) {
      var m = v("../lib/extend").extendFlat;
      $.attributes = function(g, k) {
        k = k || {};
        var x = { valType: "info_array", editType: (g = g || {}).editType, items: [{ valType: "number", min: 0, max: 1, editType: g.editType }, { valType: "number", min: 0, max: 1, editType: g.editType }], dflt: [0, 1] }, e = (g.name && g.name, g.trace, k.description && k.description, { x: m({}, x, {}), y: m({}, x, {}), editType: g.editType });
        return g.noGridCell || (e.row = { valType: "integer", min: 0, dflt: 0, editType: g.editType }, e.column = { valType: "integer", min: 0, dflt: 0, editType: g.editType }), e;
      }, $.defaults = function(g, k, x, e) {
        var r = e && e.x || [0, 1], n = e && e.y || [0, 1], s = k.grid;
        if (s) {
          var t = x("domain.column");
          t !== void 0 && (t < s.columns ? r = s._domains.x[t] : delete g.domain.column);
          var d = x("domain.row");
          d !== void 0 && (d < s.rows ? n = s._domains.y[d] : delete g.domain.row);
        }
        var u = x("domain.x", r), o = x("domain.y", n);
        u[0] < u[1] || (g.domain.x = r.slice()), o[0] < o[1] || (g.domain.y = n.slice());
      };
    }, { "../lib/extend": 505 }], 594: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = m.editType, k = m.colorEditType;
        k === void 0 && (k = g);
        var x = { family: { valType: "string", noBlank: !0, strict: !0, editType: g }, size: { valType: "number", min: 1, editType: g }, color: { valType: "color", editType: k }, editType: g };
        return m.autoSize && (x.size.dflt = "auto"), m.autoColor && (x.color.dflt = "auto"), m.arrayOk && (x.family.arrayOk = !0, x.size.arrayOk = !0, x.color.arrayOk = !0), x;
      };
    }, {}], 595: [function(v, Q, $) {
      Q.exports = { _isLinkedToArray: "frames_entry", group: { valType: "string" }, name: { valType: "string" }, traces: { valType: "any" }, baseframe: { valType: "string" }, data: { valType: "any" }, layout: { valType: "any" } };
    }, {}], 596: [function(v, Q, $) {
      $.projNames = { airy: "airy", aitoff: "aitoff", "albers usa": "albersUsa", albers: "albers", august: "august", "azimuthal equal area": "azimuthalEqualArea", "azimuthal equidistant": "azimuthalEquidistant", baker: "baker", bertin1953: "bertin1953", boggs: "boggs", bonne: "bonne", bottomley: "bottomley", bromley: "bromley", collignon: "collignon", "conic conformal": "conicConformal", "conic equal area": "conicEqualArea", "conic equidistant": "conicEquidistant", craig: "craig", craster: "craster", "cylindrical equal area": "cylindricalEqualArea", "cylindrical stereographic": "cylindricalStereographic", eckert1: "eckert1", eckert2: "eckert2", eckert3: "eckert3", eckert4: "eckert4", eckert5: "eckert5", eckert6: "eckert6", eisenlohr: "eisenlohr", equirectangular: "equirectangular", fahey: "fahey", "foucaut sinusoidal": "foucautSinusoidal", foucaut: "foucaut", ginzburg4: "ginzburg4", ginzburg5: "ginzburg5", ginzburg6: "ginzburg6", ginzburg8: "ginzburg8", ginzburg9: "ginzburg9", gnomonic: "gnomonic", "gringorten quincuncial": "gringortenQuincuncial", gringorten: "gringorten", guyou: "guyou", hammer: "hammer", hill: "hill", homolosine: "homolosine", hufnagel: "hufnagel", hyperelliptical: "hyperelliptical", kavrayskiy7: "kavrayskiy7", lagrange: "lagrange", larrivee: "larrivee", laskowski: "laskowski", loximuthal: "loximuthal", mercator: "mercator", miller: "miller", mollweide: "mollweide", "mt flat polar parabolic": "mtFlatPolarParabolic", "mt flat polar quartic": "mtFlatPolarQuartic", "mt flat polar sinusoidal": "mtFlatPolarSinusoidal", "natural earth": "naturalEarth", "natural earth1": "naturalEarth1", "natural earth2": "naturalEarth2", "nell hammer": "nellHammer", nicolosi: "nicolosi", orthographic: "orthographic", patterson: "patterson", "peirce quincuncial": "peirceQuincuncial", polyconic: "polyconic", "rectangular polyconic": "rectangularPolyconic", robinson: "robinson", satellite: "satellite", "sinu mollweide": "sinuMollweide", sinusoidal: "sinusoidal", stereographic: "stereographic", times: "times", "transverse mercator": "transverseMercator", "van der grinten": "vanDerGrinten", "van der grinten2": "vanDerGrinten2", "van der grinten3": "vanDerGrinten3", "van der grinten4": "vanDerGrinten4", wagner4: "wagner4", wagner6: "wagner6", wiechel: "wiechel", "winkel tripel": "winkel3", winkel3: "winkel3" }, $.axesNames = ["lonaxis", "lataxis"], $.lonaxisSpan = { orthographic: 180, "azimuthal equal area": 360, "azimuthal equidistant": 360, "conic conformal": 180, gnomonic: 160, stereographic: 180, "transverse mercator": 180, "*": 360 }, $.lataxisSpan = { "conic conformal": 150, stereographic: 179.5, "*": 180 }, $.scopeDefaults = { world: { lonaxisRange: [-180, 180], lataxisRange: [-90, 90], projType: "equirectangular", projRotate: [0, 0, 0] }, usa: { lonaxisRange: [-180, -50], lataxisRange: [15, 80], projType: "albers usa" }, europe: { lonaxisRange: [-30, 60], lataxisRange: [30, 85], projType: "conic conformal", projRotate: [15, 0, 0], projParallels: [0, 60] }, asia: { lonaxisRange: [22, 160], lataxisRange: [-15, 55], projType: "mercator", projRotate: [0, 0, 0] }, africa: { lonaxisRange: [-30, 60], lataxisRange: [-40, 40], projType: "mercator", projRotate: [0, 0, 0] }, "north america": { lonaxisRange: [-180, -45], lataxisRange: [5, 85], projType: "conic conformal", projRotate: [-100, 0, 0], projParallels: [29.5, 45.5] }, "south america": { lonaxisRange: [-100, -30], lataxisRange: [-60, 15], projType: "mercator", projRotate: [0, 0, 0] } }, $.clipPad = 1e-3, $.precision = 0.1, $.landColor = "#F0DC82", $.waterColor = "#3399FF", $.locationmodeToLayer = { "ISO-3": "countries", "USA-states": "subunits", "country names": "countries" }, $.sphereSVG = { type: "Sphere" }, $.fillLayers = { ocean: 1, land: 1, lakes: 1 }, $.lineLayers = { subunits: 1, countries: 1, coastlines: 1, rivers: 1, frame: 1 }, $.layers = ["bg", "ocean", "land", "lakes", "subunits", "countries", "coastlines", "rivers", "lataxis", "lonaxis", "frame", "backplot", "frontplot"], $.layersForChoropleth = ["bg", "ocean", "land", "subunits", "countries", "coastlines", "lataxis", "lonaxis", "frame", "backplot", "rivers", "lakes", "frontplot"], $.layerNameToAdjective = { ocean: "ocean", land: "land", lakes: "lake", subunits: "subunit", countries: "country", coastlines: "coastline", rivers: "river", frame: "frame" };
    }, {}], 597: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-geo"), k = g.geoPath, x = g.geoDistance, e = v("d3-geo-projection"), r = v("../../registry"), n = v("../../lib"), s = n.strTranslate, t = v("../../components/color"), d = v("../../components/drawing"), u = v("../../components/fx"), o = v("../plots"), h = v("../cartesian/axes"), l = v("../cartesian/autorange").getAutoRange, i = v("../../components/dragelement"), p = v("../../components/selections").prepSelect, c = v("../../components/selections").clearOutline, a = v("../../components/selections").selectOnClick, y = v("./zoom"), f = v("./constants"), _ = v("../../lib/geo_location_utils"), b = v("../../lib/topojson_utils"), w = v("topojson-client").feature;
      function T(I) {
        this.id = I.id, this.graphDiv = I.graphDiv, this.container = I.container, this.topojsonURL = I.topojsonURL, this.isStatic = I.staticPlot, this.topojsonName = null, this.topojson = null, this.projection = null, this.scope = null, this.viewInitial = null, this.fitScale = null, this.bounds = null, this.midPt = null, this.hasChoropleth = !1, this.traceHash = {}, this.layers = {}, this.basePaths = {}, this.dataPaths = {}, this.dataPoints = {}, this.clipDef = null, this.clipRect = null, this.bgRect = null, this.makeFramework();
      }
      var L = T.prototype;
      function A(I, P) {
        var S = f.clipPad, E = I[0] + S, R = I[1] - S, z = P[0] + S, j = P[1] - S;
        E > 0 && R < 0 && (R += 360);
        var H = (R - E) / 4;
        return { type: "Polygon", coordinates: [[[E, z], [E, j], [E + H, j], [E + 2 * H, j], [E + 3 * H, j], [R, j], [R, z], [R - H, z], [R - 2 * H, z], [R - 3 * H, z], [E, z]]] };
      }
      Q.exports = function(I) {
        return new T(I);
      }, L.plot = function(I, P, S, E) {
        var R = this;
        if (E)
          return R.update(I, P, !0);
        R._geoCalcData = I, R._fullLayout = P;
        var z = P[this.id], j = [], H = !1;
        for (var Y in f.layerNameToAdjective)
          if (Y !== "frame" && z["show" + Y]) {
            H = !0;
            break;
          }
        for (var J = !1, W = 0; W < I.length; W++) {
          var Z = I[0][0].trace;
          Z._geo = R, Z.locationmode && (H = !0);
          var re = Z.marker;
          if (re) {
            var V = re.angle, B = re.angleref;
            (V || B === "north" || B === "previous") && (J = !0);
          }
        }
        if (this._hasMarkerAngles = J, H) {
          var U = b.getTopojsonName(z);
          R.topojson !== null && U === R.topojsonName || (R.topojsonName = U, PlotlyGeoAssets.topojson[R.topojsonName] === void 0 && j.push(R.fetchTopojson()));
        }
        j = j.concat(_.fetchTraceGeoData(I)), S.push(new Promise(function(ee, N) {
          Promise.all(j).then(function() {
            R.topojson = PlotlyGeoAssets.topojson[R.topojsonName], R.update(I, P), ee();
          }).catch(N);
        }));
      }, L.fetchTopojson = function() {
        var I = this, P = b.getTopojsonPath(I.topojsonURL, I.topojsonName);
        return new Promise(function(S, E) {
          m.json(P, function(R, z) {
            if (R)
              return R.status === 404 ? E(new Error(["plotly.js could not find topojson file at", P + ".", "Make sure the *topojsonURL* plot config option", "is set properly."].join(" "))) : E(new Error(["unexpected error while fetching topojson file at", P].join(" ")));
            PlotlyGeoAssets.topojson[I.topojsonName] = z, S();
          });
        });
      }, L.update = function(I, P, S) {
        var E = P[this.id];
        this.hasChoropleth = !1;
        for (var R = 0; R < I.length; R++) {
          var z = I[R], j = z[0].trace;
          j.type === "choropleth" && (this.hasChoropleth = !0), j.visible === !0 && j._length > 0 && j._module.calcGeoJSON(z, P);
        }
        if (!S) {
          if (this.updateProjection(I, P))
            return;
          this.viewInitial && this.scope === E.scope || this.saveViewInitial(E);
        }
        this.scope = E.scope, this.updateBaseLayers(P, E), this.updateDims(P, E), this.updateFx(P, E), o.generalUpdatePerTraceModule(this.graphDiv, this, I, E);
        var H = this.layers.frontplot.select(".scatterlayer");
        this.dataPoints.point = H.selectAll(".point"), this.dataPoints.text = H.selectAll("text"), this.dataPaths.line = H.selectAll(".js-line");
        var Y = this.layers.backplot.select(".choroplethlayer");
        this.dataPaths.choropleth = Y.selectAll("path"), this._render();
      }, L.updateProjection = function(I, P) {
        var S = this.graphDiv, E = P[this.id], R = P._size, z = E.domain, j = E.projection, H = E.lonaxis, Y = E.lataxis, J = H._ax, W = Y._ax, Z = this.projection = function(se) {
          var de = se.projection, Te = de.type, Ee = f.projNames[Te];
          Ee = "geo" + n.titleCase(Ee);
          for (var Me = (g[Ee] || e[Ee])(), ze = se._isSatellite ? 180 * Math.acos(1 / de.distance) / Math.PI : se._isClipped ? f.lonaxisSpan[Te] / 2 : null, Ie = ["center", "rotate", "parallels", "clipExtent"], Oe = function(Pe) {
            return Pe ? Me : [];
          }, Ze = 0; Ze < Ie.length; Ze++) {
            var Fe = Ie[Ze];
            typeof Me[Fe] != "function" && (Me[Fe] = Oe);
          }
          return Me.isLonLatOverEdges = function(Pe) {
            if (Me(Pe) === null)
              return !0;
            if (ze) {
              var De = Me.rotate();
              return x(Pe, [-De[0], -De[1]]) > ze * Math.PI / 180;
            }
            return !1;
          }, Me.getPath = function() {
            return k().projection(Me);
          }, Me.getBounds = function(Pe) {
            return Me.getPath().bounds(Pe);
          }, Me.precision(f.precision), se._isSatellite && Me.tilt(de.tilt).distance(de.distance), ze && Me.clipAngle(ze - f.clipPad), Me;
        }(E), re = [[R.l + R.w * z.x[0], R.t + R.h * (1 - z.y[1])], [R.l + R.w * z.x[1], R.t + R.h * (1 - z.y[0])]], V = E.center || {}, B = j.rotation || {}, U = H.range || [], ee = Y.range || [];
        if (E.fitbounds) {
          J._length = re[1][0] - re[0][0], W._length = re[1][1] - re[0][1], J.range = l(S, J), W.range = l(S, W);
          var N = (J.range[0] + J.range[1]) / 2, K = (W.range[0] + W.range[1]) / 2;
          if (E._isScoped)
            V = { lon: N, lat: K };
          else if (E._isClipped) {
            V = { lon: N, lat: K }, B = { lon: N, lat: K, roll: B.roll };
            var X = j.type, te = f.lonaxisSpan[X] / 2 || 180, ie = f.lataxisSpan[X] / 2 || 90;
            U = [N - te, N + te], ee = [K - ie, K + ie];
          } else
            V = { lon: N, lat: K }, B = { lon: N, lat: B.lat, roll: B.roll };
        }
        Z.center([V.lon - B.lon, V.lat - B.lat]).rotate([-B.lon, -B.lat, B.roll]).parallels(j.parallels);
        var le = A(U, ee);
        Z.fitExtent(re, le);
        var oe = this.bounds = Z.getBounds(le), ve = this.fitScale = Z.scale(), ue = Z.translate();
        if (E.fitbounds) {
          var ye = Z.getBounds(A(J.range, W.range)), Ae = Math.min((oe[1][0] - oe[0][0]) / (ye[1][0] - ye[0][0]), (oe[1][1] - oe[0][1]) / (ye[1][1] - ye[0][1]));
          isFinite(Ae) ? Z.scale(Ae * ve) : n.warn("Something went wrong during" + this.id + "fitbounds computations.");
        } else
          Z.scale(j.scale * ve);
        var pe = this.midPt = [(oe[0][0] + oe[1][0]) / 2, (oe[0][1] + oe[1][1]) / 2];
        if (Z.translate([ue[0] + (pe[0] - ue[0]), ue[1] + (pe[1] - ue[1])]).clipExtent(oe), E._isAlbersUsa) {
          var ge = Z([V.lon, V.lat]), we = Z.translate();
          Z.translate([we[0] - (ge[0] - we[0]), we[1] - (ge[1] - we[1])]);
        }
      }, L.updateBaseLayers = function(I, P) {
        var S = this, E = S.topojson, R = S.layers, z = S.basePaths;
        function j(Z) {
          return Z === "lonaxis" || Z === "lataxis";
        }
        function H(Z) {
          return Boolean(f.lineLayers[Z]);
        }
        function Y(Z) {
          return Boolean(f.fillLayers[Z]);
        }
        var J = (this.hasChoropleth ? f.layersForChoropleth : f.layers).filter(function(Z) {
          return H(Z) || Y(Z) ? P["show" + Z] : !j(Z) || P[Z].showgrid;
        }), W = S.framework.selectAll(".layer").data(J, String);
        W.exit().each(function(Z) {
          delete R[Z], delete z[Z], m.select(this).remove();
        }), W.enter().append("g").attr("class", function(Z) {
          return "layer " + Z;
        }).each(function(Z) {
          var re = R[Z] = m.select(this);
          Z === "bg" ? S.bgRect = re.append("rect").style("pointer-events", "all") : j(Z) ? z[Z] = re.append("path").style("fill", "none") : Z === "backplot" ? re.append("g").classed("choroplethlayer", !0) : Z === "frontplot" ? re.append("g").classed("scatterlayer", !0) : H(Z) ? z[Z] = re.append("path").style("fill", "none").style("stroke-miterlimit", 2) : Y(Z) && (z[Z] = re.append("path").style("stroke", "none"));
        }), W.order(), W.each(function(Z) {
          var re = z[Z], V = f.layerNameToAdjective[Z];
          Z === "frame" ? re.datum(f.sphereSVG) : H(Z) || Y(Z) ? re.datum(w(E, E.objects[Z])) : j(Z) && re.datum(function(B, U, ee) {
            var N, K, X, te = U[B], ie = f.scopeDefaults[U.scope];
            B === "lonaxis" ? (N = ie.lonaxisRange, K = ie.lataxisRange, X = function(we, se) {
              return [we, se];
            }) : B === "lataxis" && (N = ie.lataxisRange, K = ie.lonaxisRange, X = function(we, se) {
              return [se, we];
            });
            var le = { type: "linear", range: [N[0], N[1] - 1e-6], tick0: te.tick0, dtick: te.dtick };
            h.setConvert(le, ee);
            var oe = h.calcTicks(le);
            U.isScoped || B !== "lonaxis" || oe.pop();
            for (var ve = oe.length, ue = new Array(ve), ye = 0; ye < ve; ye++)
              for (var Ae = oe[ye].x, pe = ue[ye] = [], ge = K[0]; ge < K[1] + 2.5; ge += 2.5)
                pe.push(X(Ae, ge));
            return { type: "MultiLineString", coordinates: ue };
          }(Z, P, I)).call(t.stroke, P[Z].gridcolor).call(d.dashLine, P[Z].griddash, P[Z].gridwidth), H(Z) ? re.call(t.stroke, P[V + "color"]).call(d.dashLine, "", P[V + "width"]) : Y(Z) && re.call(t.fill, P[V + "color"]);
        });
      }, L.updateDims = function(I, P) {
        var S = this.bounds, E = (P.framewidth || 0) / 2, R = S[0][0] - E, z = S[0][1] - E, j = S[1][0] - R + E, H = S[1][1] - z + E;
        d.setRect(this.clipRect, R, z, j, H), this.bgRect.call(d.setRect, R, z, j, H).call(t.fill, P.bgcolor), this.xaxis._offset = R, this.xaxis._length = j, this.yaxis._offset = z, this.yaxis._length = H;
      }, L.updateFx = function(I, P) {
        var S = this, E = S.graphDiv, R = S.bgRect, z = I.dragmode, j = I.clickmode;
        if (!S.isStatic) {
          var H = { element: S.bgRect.node(), gd: E, plotinfo: { id: S.id, xaxis: S.xaxis, yaxis: S.yaxis, fillRangeItems: function(J, W) {
            W.isRect ? (J.range = {})[S.id] = [Y([W.xmin, W.ymin]), Y([W.xmax, W.ymax])] : (J.lassoPoints = {})[S.id] = W.map(Y);
          } }, xaxes: [S.xaxis], yaxes: [S.yaxis], subplot: S.id, clickFn: function(J) {
            J === 2 && c(E);
          } };
          z === "pan" ? (R.node().onmousedown = null, R.call(y(S, P)), R.on("dblclick.zoom", function() {
            var J = S.viewInitial, W = {};
            for (var Z in J)
              W[S.id + "." + Z] = J[Z];
            r.call("_guiRelayout", E, W), E.emit("plotly_doubleclick", null);
          }), E._context._scrollZoom.geo || R.on("wheel.zoom", null)) : z !== "select" && z !== "lasso" || (R.on(".zoom", null), H.prepFn = function(J, W, Z) {
            p(J, W, Z, H, z);
          }, i.init(H)), R.on("mousemove", function() {
            var J = S.projection.invert(n.getPositionFromD3Event());
            if (!J)
              return i.unhover(E, m.event);
            S.xaxis.p2c = function() {
              return J[0];
            }, S.yaxis.p2c = function() {
              return J[1];
            }, u.hover(E, m.event, S.id);
          }), R.on("mouseout", function() {
            E._dragging || i.unhover(E, m.event);
          }), R.on("click", function() {
            z !== "select" && z !== "lasso" && (j.indexOf("select") > -1 && a(m.event, E, [S.xaxis], [S.yaxis], S.id, H), j.indexOf("event") > -1 && u.click(E, m.event));
          });
        }
        function Y(J) {
          return S.projection.invert([J[0] + S.xaxis._offset, J[1] + S.yaxis._offset]);
        }
      }, L.makeFramework = function() {
        var I = this, P = I.graphDiv, S = P._fullLayout, E = "clip" + S._uid + I.id;
        I.clipDef = S._clips.append("clipPath").attr("id", E), I.clipRect = I.clipDef.append("rect"), I.framework = m.select(I.container).append("g").attr("class", "geo " + I.id).call(d.setClipUrl, E, P), I.project = function(R) {
          var z = I.projection(R);
          return z ? [z[0] - I.xaxis._offset, z[1] - I.yaxis._offset] : [null, null];
        }, I.xaxis = { _id: "x", c2p: function(R) {
          return I.project(R)[0];
        } }, I.yaxis = { _id: "y", c2p: function(R) {
          return I.project(R)[1];
        } }, I.mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, h.setConvert(I.mockAxis, S);
      }, L.saveViewInitial = function(I) {
        var P, S = I.center || {}, E = I.projection, R = E.rotation || {};
        this.viewInitial = { fitbounds: I.fitbounds, "projection.scale": E.scale }, P = I._isScoped ? { "center.lon": S.lon, "center.lat": S.lat } : I._isClipped ? { "projection.rotation.lon": R.lon, "projection.rotation.lat": R.lat } : { "center.lon": S.lon, "center.lat": S.lat, "projection.rotation.lon": R.lon }, n.extendFlat(this.viewInitial, P);
      }, L.render = function(I) {
        this._hasMarkerAngles && I ? this.plot(this._geoCalcData, this._fullLayout, [], !0) : this._render();
      }, L._render = function() {
        var I, P = this.projection, S = P.getPath();
        function E(z) {
          var j = P(z.lonlat);
          return j ? s(j[0], j[1]) : null;
        }
        function R(z) {
          return P.isLonLatOverEdges(z.lonlat) ? "none" : null;
        }
        for (I in this.basePaths)
          this.basePaths[I].attr("d", S);
        for (I in this.dataPaths)
          this.dataPaths[I].attr("d", function(z) {
            return S(z.geojson);
          });
        for (I in this.dataPoints)
          this.dataPoints[I].attr("display", R).attr("transform", E);
      };
    }, { "../../components/color": 367, "../../components/dragelement": 386, "../../components/drawing": 389, "../../components/fx": 407, "../../components/selections": 455, "../../lib": 515, "../../lib/geo_location_utils": 508, "../../lib/topojson_utils": 544, "../../registry": 647, "../cartesian/autorange": 565, "../cartesian/axes": 566, "../plots": 628, "./constants": 596, "./zoom": 601, "@plotly/d3": 58, "d3-geo": 114, "d3-geo-projection": 113, "topojson-client": 316 }], 598: [function(v, Q, $) {
      var m = v("../../plots/get_data").getSubplotCalcData, g = v("../../lib").counterRegex, k = v("./geo"), x = "geo", e = g(x), r = {};
      r.geo = { valType: "subplotid", dflt: x, editType: "calc" }, Q.exports = { attr: x, name: x, idRoot: x, idRegex: e, attrRegex: e, attributes: r, layoutAttributes: v("./layout_attributes"), supplyLayoutDefaults: v("./layout_defaults"), plot: function(n) {
        for (var s = n._fullLayout, t = n.calcdata, d = s._subplots.geo, u = 0; u < d.length; u++) {
          var o = d[u], h = m(t, x, o), l = s[o]._subplot;
          l || (l = k({ id: o, graphDiv: n, container: s._geolayer.node(), topojsonURL: n._context.topojsonURL, staticPlot: n._context.staticPlot }), s[o]._subplot = l), l.plot(h, s, n._promises);
        }
      }, updateFx: function(n) {
        for (var s = n._fullLayout, t = s._subplots.geo, d = 0; d < t.length; d++) {
          var u = s[t[d]];
          u._subplot.updateFx(s, u);
        }
      }, clean: function(n, s, t, d) {
        for (var u = d._subplots.geo || [], o = 0; o < u.length; o++) {
          var h = u[o], l = d[h]._subplot;
          !s[h] && l && (l.framework.remove(), l.clipDef.remove());
        }
      } };
    }, { "../../lib": 515, "../../plots/get_data": 602, "./geo": 597, "./layout_attributes": 599, "./layout_defaults": 600 }], 599: [function(v, Q, $) {
      var m = v("../../components/color/attributes"), g = v("../domain").attributes, k = v("../../components/drawing/attributes").dash, x = v("./constants"), e = v("../../plot_api/edit_types").overrideAll, r = v("../../lib/sort_object_keys"), n = { range: { valType: "info_array", items: [{ valType: "number" }, { valType: "number" }] }, showgrid: { valType: "boolean", dflt: !1 }, tick0: { valType: "number", dflt: 0 }, dtick: { valType: "number" }, gridcolor: { valType: "color", dflt: m.lightLine }, gridwidth: { valType: "number", min: 0, dflt: 1 }, griddash: k };
      (Q.exports = e({ domain: g({ name: "geo" }, {}), fitbounds: { valType: "enumerated", values: [!1, "locations", "geojson"], dflt: !1, editType: "plot" }, resolution: { valType: "enumerated", values: [110, 50], dflt: 110, coerceNumber: !0 }, scope: { valType: "enumerated", values: r(x.scopeDefaults), dflt: "world" }, projection: { type: { valType: "enumerated", values: r(x.projNames) }, rotation: { lon: { valType: "number" }, lat: { valType: "number" }, roll: { valType: "number" } }, tilt: { valType: "number", dflt: 0 }, distance: { valType: "number", min: 1.001, dflt: 2 }, parallels: { valType: "info_array", items: [{ valType: "number" }, { valType: "number" }] }, scale: { valType: "number", min: 0, dflt: 1 } }, center: { lon: { valType: "number" }, lat: { valType: "number" } }, visible: { valType: "boolean", dflt: !0 }, showcoastlines: { valType: "boolean" }, coastlinecolor: { valType: "color", dflt: m.defaultLine }, coastlinewidth: { valType: "number", min: 0, dflt: 1 }, showland: { valType: "boolean", dflt: !1 }, landcolor: { valType: "color", dflt: x.landColor }, showocean: { valType: "boolean", dflt: !1 }, oceancolor: { valType: "color", dflt: x.waterColor }, showlakes: { valType: "boolean", dflt: !1 }, lakecolor: { valType: "color", dflt: x.waterColor }, showrivers: { valType: "boolean", dflt: !1 }, rivercolor: { valType: "color", dflt: x.waterColor }, riverwidth: { valType: "number", min: 0, dflt: 1 }, showcountries: { valType: "boolean" }, countrycolor: { valType: "color", dflt: m.defaultLine }, countrywidth: { valType: "number", min: 0, dflt: 1 }, showsubunits: { valType: "boolean" }, subunitcolor: { valType: "color", dflt: m.defaultLine }, subunitwidth: { valType: "number", min: 0, dflt: 1 }, showframe: { valType: "boolean" }, framecolor: { valType: "color", dflt: m.defaultLine }, framewidth: { valType: "number", min: 0, dflt: 1 }, bgcolor: { valType: "color", dflt: m.background }, lonaxis: n, lataxis: n }, "plot", "from-root")).uirevision = { valType: "any", editType: "none" };
    }, { "../../components/color/attributes": 366, "../../components/drawing/attributes": 388, "../../lib/sort_object_keys": 538, "../../plot_api/edit_types": 548, "../domain": 593, "./constants": 596 }], 600: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../subplot_defaults"), k = v("../get_data").getSubplotData, x = v("./constants"), e = v("./layout_attributes"), r = x.axesNames;
      function n(s, t, d, u) {
        var o = k(u.fullData, "geo", u.id).map(function(B) {
          return B._expandedIndex;
        }), h = d("resolution"), l = d("scope"), i = x.scopeDefaults[l], p = d("projection.type", i.projType), c = t._isAlbersUsa = p === "albers usa";
        c && (l = t.scope = "usa");
        var a = t._isScoped = l !== "world", y = t._isSatellite = p === "satellite", f = t._isConic = p.indexOf("conic") !== -1 || p === "albers", _ = t._isClipped = !!x.lonaxisSpan[p];
        if (s.visible === !1) {
          var b = m.extendDeep({}, t._template);
          b.showcoastlines = !1, b.showcountries = !1, b.showframe = !1, b.showlakes = !1, b.showland = !1, b.showocean = !1, b.showrivers = !1, b.showsubunits = !1, b.lonaxis && (b.lonaxis.showgrid = !1), b.lataxis && (b.lataxis.showgrid = !1), t._template = b;
        }
        for (var w = d("visible"), T = 0; T < r.length; T++) {
          var L, A = r[T], I = [30, 10][T];
          if (a)
            L = i[A + "Range"];
          else {
            var P = x[A + "Span"], S = (P[p] || P["*"]) / 2, E = d("projection.rotation." + A.substr(0, 3), i.projRotate[T]);
            L = [E - S, E + S];
          }
          var R = d(A + ".range", L);
          d(A + ".tick0"), d(A + ".dtick", I), d(A + ".showgrid", !!w && void 0) && (d(A + ".gridcolor"), d(A + ".gridwidth"), d(A + ".griddash")), t[A]._ax = { type: "linear", _id: A.slice(0, 3), _traceIndices: o, setScale: m.identity, c2l: m.identity, r2l: m.identity, autorange: !0, range: R.slice(), _m: 1, _input: {} };
        }
        var z = t.lonaxis.range, j = t.lataxis.range, H = z[0], Y = z[1];
        H > 0 && Y < 0 && (Y += 360);
        var J, W, Z, re = (H + Y) / 2;
        if (!c) {
          var V = a ? i.projRotate : [re, 0, 0];
          J = d("projection.rotation.lon", V[0]), d("projection.rotation.lat", V[1]), d("projection.rotation.roll", V[2]), d("showcoastlines", !a && w) && (d("coastlinecolor"), d("coastlinewidth")), d("showocean", !!w && void 0) && d("oceancolor");
        }
        c ? (W = -96.6, Z = 38.7) : (W = a ? re : J, Z = (j[0] + j[1]) / 2), d("center.lon", W), d("center.lat", Z), y && (d("projection.tilt"), d("projection.distance")), f && d("projection.parallels", i.projParallels || [0, 60]), d("projection.scale"), d("showland", !!w && void 0) && d("landcolor"), d("showlakes", !!w && void 0) && d("lakecolor"), d("showrivers", !!w && void 0) && (d("rivercolor"), d("riverwidth")), d("showcountries", a && l !== "usa" && w) && (d("countrycolor"), d("countrywidth")), (l === "usa" || l === "north america" && h === 50) && (d("showsubunits", w), d("subunitcolor"), d("subunitwidth")), a || d("showframe", w) && (d("framecolor"), d("framewidth")), d("bgcolor"), d("fitbounds") && (delete t.projection.scale, a ? (delete t.center.lon, delete t.center.lat) : _ ? (delete t.center.lon, delete t.center.lat, delete t.projection.rotation.lon, delete t.projection.rotation.lat, delete t.lonaxis.range, delete t.lataxis.range) : (delete t.center.lon, delete t.center.lat, delete t.projection.rotation.lon));
      }
      Q.exports = function(s, t, d) {
        g(s, t, d, { type: "geo", attributes: e, handleDefaults: n, fullData: d, partition: "y" });
      };
    }, { "../../lib": 515, "../get_data": 602, "../subplot_defaults": 641, "./constants": 596, "./layout_attributes": 599 }], 601: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../registry"), x = Math.PI / 180, e = 180 / Math.PI, r = { cursor: "pointer" }, n = { cursor: "auto" };
      function s(w, T) {
        return m.behavior.zoom().translate(T.translate()).scale(T.scale());
      }
      function t(w, T, L) {
        var A = w.id, I = w.graphDiv, P = I.layout, S = P[A], E = I._fullLayout, R = E[A], z = {}, j = {};
        function H(Y, J) {
          z[A + "." + Y] = g.nestedProperty(S, Y).get(), k.call("_storeDirectGUIEdit", P, E._preGUI, z);
          var W = g.nestedProperty(R, Y);
          W.get() !== J && (W.set(J), g.nestedProperty(S, Y).set(J), j[A + "." + Y] = J);
        }
        L(H), H("projection.scale", T.scale() / w.fitScale), H("fitbounds", !1), I.emit("plotly_relayout", j);
      }
      function d(w, T) {
        var L = s(0, T);
        function A(I) {
          var P = T.invert(w.midPt);
          I("center.lon", P[0]), I("center.lat", P[1]);
        }
        return L.on("zoomstart", function() {
          m.select(this).style(r);
        }).on("zoom", function() {
          T.scale(m.event.scale).translate(m.event.translate), w.render(!0);
          var I = T.invert(w.midPt);
          w.graphDiv.emit("plotly_relayouting", { "geo.projection.scale": T.scale() / w.fitScale, "geo.center.lon": I[0], "geo.center.lat": I[1] });
        }).on("zoomend", function() {
          m.select(this).style(n), t(w, T, A);
        }), L;
      }
      function u(w, T) {
        var L, A, I, P, S, E, R, z, j, H = s(0, T);
        function Y(W) {
          return T.invert(W);
        }
        function J(W) {
          var Z = T.rotate(), re = T.invert(w.midPt);
          W("projection.rotation.lon", -Z[0]), W("center.lon", re[0]), W("center.lat", re[1]);
        }
        return H.on("zoomstart", function() {
          m.select(this).style(r), L = m.mouse(this), A = T.rotate(), I = T.translate(), P = A, S = Y(L);
        }).on("zoom", function() {
          if (E = m.mouse(this), function(re) {
            var V = Y(re);
            if (!V)
              return !0;
            var B = T(V);
            return Math.abs(B[0] - re[0]) > 2 || Math.abs(B[1] - re[1]) > 2;
          }(L))
            return H.scale(T.scale()), void H.translate(T.translate());
          T.scale(m.event.scale), T.translate([I[0], m.event.translate[1]]), S ? Y(E) && (z = Y(E), R = [P[0] + (z[0] - S[0]), A[1], A[2]], T.rotate(R), P = R) : S = Y(L = E), j = !0, w.render(!0);
          var W = T.rotate(), Z = T.invert(w.midPt);
          w.graphDiv.emit("plotly_relayouting", { "geo.projection.scale": T.scale() / w.fitScale, "geo.center.lon": Z[0], "geo.center.lat": Z[1], "geo.projection.rotation.lon": -W[0] });
        }).on("zoomend", function() {
          m.select(this).style(n), j && t(w, T, J);
        }), H;
      }
      function o(w, T) {
        var L;
        T.rotate(), T.scale();
        var A = s(0, T), I = function(H) {
          for (var Y = 0, J = arguments.length, W = []; ++Y < J; )
            W.push(arguments[Y]);
          var Z = m.dispatch.apply(null, W);
          return Z.of = function(re, V) {
            return function(B) {
              var U;
              try {
                U = B.sourceEvent = m.event, B.target = H, m.event = B, Z[B.type].apply(re, V);
              } finally {
                m.event = U;
              }
            };
          }, Z;
        }(A, "zoomstart", "zoom", "zoomend"), P = 0, S = A.on;
        function E(H) {
          P++ || H({ type: "zoomstart" });
        }
        function R(H) {
          H({ type: "zoom" });
        }
        function z(H) {
          --P || H({ type: "zoomend" });
        }
        function j(H) {
          var Y = T.rotate();
          H("projection.rotation.lon", -Y[0]), H("projection.rotation.lat", -Y[1]);
        }
        return A.on("zoomstart", function() {
          m.select(this).style(r);
          var H = m.mouse(this), Y = T.rotate(), J = Y, W = T.translate(), Z = l(Y);
          L = h(T, H), S.call(A, "zoom", function() {
            var re = m.mouse(this);
            if (T.scale(m.event.scale), L) {
              if (h(T, re)) {
                T.rotate(Y).translate(W);
                var V = h(T, re), B = p(L, V), U = _(i(Z, B)), ee = c(U, L, J);
                isFinite(ee[0]) && isFinite(ee[1]) && isFinite(ee[2]) || (ee = J), T.rotate(ee), J = ee;
              }
            } else
              L = h(T, H = re);
            R(I.of(this, arguments));
          }), E(I.of(this, arguments));
        }).on("zoomend", function() {
          m.select(this).style(n), S.call(A, "zoom", null), z(I.of(this, arguments)), t(w, T, j);
        }).on("zoom.redraw", function() {
          w.render(!0);
          var H = T.rotate();
          w.graphDiv.emit("plotly_relayouting", { "geo.projection.scale": T.scale() / w.fitScale, "geo.projection.rotation.lon": -H[0], "geo.projection.rotation.lat": -H[1] });
        }), m.rebind(A, I, "on");
      }
      function h(w, T) {
        var L = w.invert(T);
        return L && isFinite(L[0]) && isFinite(L[1]) && function(A) {
          var I = A[0] * x, P = A[1] * x, S = Math.cos(P);
          return [S * Math.cos(I), S * Math.sin(I), Math.sin(P)];
        }(L);
      }
      function l(w) {
        var T = 0.5 * w[0] * x, L = 0.5 * w[1] * x, A = 0.5 * w[2] * x, I = Math.sin(T), P = Math.cos(T), S = Math.sin(L), E = Math.cos(L), R = Math.sin(A), z = Math.cos(A);
        return [P * E * z + I * S * R, I * E * z - P * S * R, P * S * z + I * E * R, P * E * R - I * S * z];
      }
      function i(w, T) {
        var L = w[0], A = w[1], I = w[2], P = w[3], S = T[0], E = T[1], R = T[2], z = T[3];
        return [L * S - A * E - I * R - P * z, L * E + A * S + I * z - P * R, L * R - A * z + I * S + P * E, L * z + A * R - I * E + P * S];
      }
      function p(w, T) {
        if (w && T) {
          var L = function(S, E) {
            return [S[1] * E[2] - S[2] * E[1], S[2] * E[0] - S[0] * E[2], S[0] * E[1] - S[1] * E[0]];
          }(w, T), A = Math.sqrt(b(L, L)), I = 0.5 * Math.acos(Math.max(-1, Math.min(1, b(w, T)))), P = Math.sin(I) / A;
          return A && [Math.cos(I), L[2] * P, -L[1] * P, L[0] * P];
        }
      }
      function c(w, T, L) {
        var A = f(T, 2, w[0]);
        A = f(A, 1, w[1]), A = f(A, 0, w[2] - L[2]);
        var I, P, S = T[0], E = T[1], R = T[2], z = A[0], j = A[1], H = A[2], Y = Math.atan2(E, S) * e, J = Math.sqrt(S * S + E * E);
        Math.abs(j) > J ? (P = (j > 0 ? 90 : -90) - Y, I = 0) : (P = Math.asin(j / J) * e - Y, I = Math.sqrt(J * J - j * j));
        var W = 180 - P - 2 * Y, Z = (Math.atan2(H, z) - Math.atan2(R, I)) * e, re = (Math.atan2(H, z) - Math.atan2(R, -I)) * e;
        return a(L[0], L[1], P, Z) <= a(L[0], L[1], W, re) ? [P, Z, L[2]] : [W, re, L[2]];
      }
      function a(w, T, L, A) {
        var I = y(L - w), P = y(A - T);
        return Math.sqrt(I * I + P * P);
      }
      function y(w) {
        return (w % 360 + 540) % 360 - 180;
      }
      function f(w, T, L) {
        var A = L * x, I = w.slice(), P = T === 0 ? 1 : 0, S = T === 2 ? 1 : 2, E = Math.cos(A), R = Math.sin(A);
        return I[P] = w[P] * E - w[S] * R, I[S] = w[S] * E + w[P] * R, I;
      }
      function _(w) {
        return [Math.atan2(2 * (w[0] * w[1] + w[2] * w[3]), 1 - 2 * (w[1] * w[1] + w[2] * w[2])) * e, Math.asin(Math.max(-1, Math.min(1, 2 * (w[0] * w[2] - w[3] * w[1])))) * e, Math.atan2(2 * (w[0] * w[3] + w[1] * w[2]), 1 - 2 * (w[2] * w[2] + w[3] * w[3])) * e];
      }
      function b(w, T) {
        for (var L = 0, A = 0, I = w.length; A < I; ++A)
          L += w[A] * T[A];
        return L;
      }
      Q.exports = function(w, T) {
        var L = w.projection;
        return (T._isScoped ? d : T._isClipped ? o : u)(w, L);
      };
    }, { "../../lib": 515, "../../registry": 647, "@plotly/d3": 58 }], 602: [function(v, Q, $) {
      var m = v("../registry"), g = v("./cartesian/constants").SUBPLOT_PATTERN;
      $.getSubplotCalcData = function(k, x, e) {
        var r = m.subplotsRegistry[x];
        if (!r)
          return [];
        for (var n = r.attr, s = [], t = 0; t < k.length; t++) {
          var d = k[t];
          d[0].trace[n] === e && s.push(d);
        }
        return s;
      }, $.getModuleCalcData = function(k, x) {
        var e, r = [], n = [];
        if (!(e = typeof x == "string" ? m.getModule(x).plot : typeof x == "function" ? x : x.plot))
          return [r, k];
        for (var s = 0; s < k.length; s++) {
          var t = k[s], d = t[0].trace;
          d.visible === !0 && d._length !== 0 && (d._module.plot === e ? r.push(t) : n.push(t));
        }
        return [r, n];
      }, $.getSubplotData = function(k, x, e) {
        if (!m.subplotsRegistry[x])
          return [];
        var r, n, s, t = m.subplotsRegistry[x].attr, d = [];
        if (x === "gl2d") {
          var u = e.match(g);
          n = "x" + u[1], s = "y" + u[2];
        }
        for (var o = 0; o < k.length; o++)
          r = k[o], x === "gl2d" && m.traceIs(r, "gl2d") ? r[t[0]] === n && r[t[1]] === s && d.push(r) : r[t] === e && d.push(r);
        return d;
      };
    }, { "../registry": 647, "./cartesian/constants": 573 }], 603: [function(v, Q, $) {
      var m = v("mouse-change"), g = v("mouse-wheel"), k = v("mouse-event-offset"), x = v("../cartesian/constants"), e = v("has-passive-events");
      function r(n, s) {
        this.element = n, this.plot = s, this.mouseListener = null, this.wheelListener = null, this.lastInputTime = Date.now(), this.lastPos = [0, 0], this.boxEnabled = !1, this.boxInited = !1, this.boxStart = [0, 0], this.boxEnd = [0, 0], this.dragStart = [0, 0];
      }
      Q.exports = function(n) {
        var s = n.mouseContainer, t = n.glplot, d = new r(s, t);
        function u() {
          n.xaxis.autorange = !1, n.yaxis.autorange = !1;
        }
        function o(h, l, i) {
          var p, c, a = n.calcDataBox(), y = t.viewBox, f = d.lastPos[0], _ = d.lastPos[1], b = x.MINDRAG * t.pixelRatio, w = x.MINZOOM * t.pixelRatio;
          function T(E, R, z) {
            var j = Math.min(R, z), H = Math.max(R, z);
            j !== H ? (a[E] = j, a[E + 2] = H, d.dataBox = a, n.setRanges(a)) : (n.selectBox.selectBox = [0, 0, 1, 1], n.glplot.setDirty());
          }
          switch (l *= t.pixelRatio, i *= t.pixelRatio, i = y[3] - y[1] - i, n.fullLayout.dragmode) {
            case "zoom":
              if (h) {
                var L = l / (y[2] - y[0]) * (a[2] - a[0]) + a[0], A = i / (y[3] - y[1]) * (a[3] - a[1]) + a[1];
                d.boxInited || (d.boxStart[0] = L, d.boxStart[1] = A, d.dragStart[0] = l, d.dragStart[1] = i), d.boxEnd[0] = L, d.boxEnd[1] = A, d.boxInited = !0, d.boxEnabled || d.boxStart[0] === d.boxEnd[0] && d.boxStart[1] === d.boxEnd[1] || (d.boxEnabled = !0);
                var I = Math.abs(d.dragStart[0] - l) < w, P = Math.abs(d.dragStart[1] - i) < w;
                if (!function() {
                  for (var E = n.graphDiv._fullLayout._axisConstraintGroups, R = n.xaxis._id, z = n.yaxis._id, j = 0; j < E.length; j++)
                    if (E[j][R] !== -1) {
                      if (E[j][z] !== -1)
                        return !0;
                      break;
                    }
                  return !1;
                }() || I && P)
                  I && (d.boxEnd[0] = d.boxStart[0]), P && (d.boxEnd[1] = d.boxStart[1]);
                else {
                  p = d.boxEnd[0] - d.boxStart[0], c = d.boxEnd[1] - d.boxStart[1];
                  var S = (a[3] - a[1]) / (a[2] - a[0]);
                  Math.abs(p * S) > Math.abs(c) ? (d.boxEnd[1] = d.boxStart[1] + Math.abs(p) * S * (c >= 0 ? 1 : -1), d.boxEnd[1] < a[1] ? (d.boxEnd[1] = a[1], d.boxEnd[0] = d.boxStart[0] + (a[1] - d.boxStart[1]) / Math.abs(S)) : d.boxEnd[1] > a[3] && (d.boxEnd[1] = a[3], d.boxEnd[0] = d.boxStart[0] + (a[3] - d.boxStart[1]) / Math.abs(S))) : (d.boxEnd[0] = d.boxStart[0] + Math.abs(c) / S * (p >= 0 ? 1 : -1), d.boxEnd[0] < a[0] ? (d.boxEnd[0] = a[0], d.boxEnd[1] = d.boxStart[1] + (a[0] - d.boxStart[0]) * Math.abs(S)) : d.boxEnd[0] > a[2] && (d.boxEnd[0] = a[2], d.boxEnd[1] = d.boxStart[1] + (a[2] - d.boxStart[0]) * Math.abs(S)));
                }
              } else
                d.boxEnabled ? (p = d.boxStart[0] !== d.boxEnd[0], c = d.boxStart[1] !== d.boxEnd[1], p || c ? (p && (T(0, d.boxStart[0], d.boxEnd[0]), n.xaxis.autorange = !1), c && (T(1, d.boxStart[1], d.boxEnd[1]), n.yaxis.autorange = !1), n.relayoutCallback()) : n.glplot.setDirty(), d.boxEnabled = !1, d.boxInited = !1) : d.boxInited && (d.boxInited = !1);
              break;
            case "pan":
              d.boxEnabled = !1, d.boxInited = !1, h ? (d.panning || (d.dragStart[0] = l, d.dragStart[1] = i), Math.abs(d.dragStart[0] - l) < b && (l = d.dragStart[0]), Math.abs(d.dragStart[1] - i) < b && (i = d.dragStart[1]), p = (f - l) * (a[2] - a[0]) / (t.viewBox[2] - t.viewBox[0]), c = (_ - i) * (a[3] - a[1]) / (t.viewBox[3] - t.viewBox[1]), a[0] += p, a[2] += p, a[1] += c, a[3] += c, n.setRanges(a), d.panning = !0, d.lastInputTime = Date.now(), u(), n.cameraChanged(), n.handleAnnotations()) : d.panning && (d.panning = !1, n.relayoutCallback());
          }
          d.lastPos[0] = l, d.lastPos[1] = i;
        }
        return d.mouseListener = m(s, o), s.addEventListener("touchstart", function(h) {
          var l = k(h.changedTouches[0], s);
          o(0, l[0], l[1]), o(1, l[0], l[1]), h.preventDefault();
        }, !!e && { passive: !1 }), s.addEventListener("touchmove", function(h) {
          h.preventDefault();
          var l = k(h.changedTouches[0], s);
          o(1, l[0], l[1]), h.preventDefault();
        }, !!e && { passive: !1 }), s.addEventListener("touchend", function(h) {
          o(0, d.lastPos[0], d.lastPos[1]), h.preventDefault();
        }, !!e && { passive: !1 }), d.wheelListener = g(s, function(h, l) {
          if (!n.scrollZoom)
            return !1;
          var i = n.calcDataBox(), p = t.viewBox, c = d.lastPos[0], a = d.lastPos[1], y = Math.exp(5 * l / (p[3] - p[1])), f = c / (p[2] - p[0]) * (i[2] - i[0]) + i[0], _ = a / (p[3] - p[1]) * (i[3] - i[1]) + i[1];
          return i[0] = (i[0] - f) * y + f, i[2] = (i[2] - f) * y + f, i[1] = (i[1] - _) * y + _, i[3] = (i[3] - _) * y + _, n.setRanges(i), d.lastInputTime = Date.now(), u(), n.cameraChanged(), n.handleAnnotations(), n.relayoutCallback(), !0;
        }, !0), d;
      };
    }, { "../cartesian/constants": 573, "has-passive-events": 229, "mouse-change": 241, "mouse-event-offset": 242, "mouse-wheel": 244 }], 604: [function(v, Q, $) {
      var m = v("../cartesian/axes"), g = v("../../lib/str2rgbarray");
      function k(r) {
        this.scene = r, this.gl = r.gl, this.pixelRatio = r.pixelRatio, this.screenBox = [0, 0, 1, 1], this.viewBox = [0, 0, 1, 1], this.dataBox = [-1, -1, 1, 1], this.borderLineEnable = [!1, !1, !1, !1], this.borderLineWidth = [1, 1, 1, 1], this.borderLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.ticks = [[], []], this.tickEnable = [!0, !0, !1, !1], this.tickPad = [15, 15, 15, 15], this.tickAngle = [0, 0, 0, 0], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickMarkLength = [0, 0, 0, 0], this.tickMarkWidth = [0, 0, 0, 0], this.tickMarkColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labels = ["x", "y"], this.labelEnable = [!0, !0, !1, !1], this.labelAngle = [0, Math.PI / 2, 0, 3 * Math.PI / 2], this.labelPad = [15, 15, 15, 15], this.labelSize = [12, 12], this.labelFont = ["sans-serif", "sans-serif"], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.title = "", this.titleEnable = !0, this.titleCenter = [0, 0, 0, 0], this.titleAngle = 0, this.titleColor = [0, 0, 0, 1], this.titleFont = "sans-serif", this.titleSize = 18, this.gridLineEnable = [!0, !0], this.gridLineColor = [[0, 0, 0, 0.5], [0, 0, 0, 0.5]], this.gridLineWidth = [1, 1], this.zeroLineEnable = [!0, !0], this.zeroLineWidth = [1, 1], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1]], this.borderColor = [0, 0, 0, 0], this.backgroundColor = [0, 0, 0, 0], this.static = this.scene.staticPlot;
      }
      var x = k.prototype, e = ["xaxis", "yaxis"];
      x.merge = function(r) {
        var n, s, t, d, u, o, h, l, i, p, c;
        for (this.titleEnable = !1, this.backgroundColor = g(r.plot_bgcolor), p = 0; p < 2; ++p) {
          var a = (n = e[p]).charAt(0);
          for (t = (s = r[this.scene[n]._name]).title.text === this.scene.fullLayout._dfltTitle[a] ? "" : s.title.text, c = 0; c <= 2; c += 2)
            this.labelEnable[p + c] = !1, this.labels[p + c] = t, this.labelColor[p + c] = g(s.title.font.color), this.labelFont[p + c] = s.title.font.family, this.labelSize[p + c] = s.title.font.size, this.labelPad[p + c] = this.getLabelPad(n, s), this.tickEnable[p + c] = !1, this.tickColor[p + c] = g((s.tickfont || {}).color), this.tickAngle[p + c] = s.tickangle === "auto" ? 0 : Math.PI * -s.tickangle / 180, this.tickPad[p + c] = this.getTickPad(s), this.tickMarkLength[p + c] = 0, this.tickMarkWidth[p + c] = s.tickwidth || 0, this.tickMarkColor[p + c] = g(s.tickcolor), this.borderLineEnable[p + c] = !1, this.borderLineColor[p + c] = g(s.linecolor), this.borderLineWidth[p + c] = s.linewidth || 0;
          h = this.hasSharedAxis(s), u = this.hasAxisInDfltPos(n, s) && !h, o = this.hasAxisInAltrPos(n, s) && !h, d = s.mirror || !1, l = h ? String(d).indexOf("all") !== -1 : !!d, i = h ? d === "allticks" : String(d).indexOf("ticks") !== -1, u ? this.labelEnable[p] = !0 : o && (this.labelEnable[p + 2] = !0), u ? this.tickEnable[p] = s.showticklabels : o && (this.tickEnable[p + 2] = s.showticklabels), (u || l) && (this.borderLineEnable[p] = s.showline), (o || l) && (this.borderLineEnable[p + 2] = s.showline), (u || i) && (this.tickMarkLength[p] = this.getTickMarkLength(s)), (o || i) && (this.tickMarkLength[p + 2] = this.getTickMarkLength(s)), this.gridLineEnable[p] = s.showgrid, this.gridLineColor[p] = g(s.gridcolor), this.gridLineWidth[p] = s.gridwidth, this.zeroLineEnable[p] = s.zeroline, this.zeroLineColor[p] = g(s.zerolinecolor), this.zeroLineWidth[p] = s.zerolinewidth;
        }
      }, x.hasSharedAxis = function(r) {
        var n = this.scene, s = n.fullLayout._subplots.gl2d;
        return m.findSubplotsWithAxis(s, r).indexOf(n.id) !== 0;
      }, x.hasAxisInDfltPos = function(r, n) {
        var s = n.side;
        return r === "xaxis" ? s === "bottom" : r === "yaxis" ? s === "left" : void 0;
      }, x.hasAxisInAltrPos = function(r, n) {
        var s = n.side;
        return r === "xaxis" ? s === "top" : r === "yaxis" ? s === "right" : void 0;
      }, x.getLabelPad = function(r, n) {
        var s = n.title.font.size, t = n.showticklabels;
        return r === "xaxis" ? n.side === "top" ? s * (1.5 + (t ? 1 : 0)) - 10 : s * (1.5 + (t ? 0.5 : 0)) - 10 : r === "yaxis" ? n.side === "right" ? 10 + s * (1.5 + (t ? 1 : 0.5)) : 10 + s * (1.5 + (t ? 0.5 : 0)) : void 0;
      }, x.getTickPad = function(r) {
        return r.ticks === "outside" ? 10 + r.ticklen : 15;
      }, x.getTickMarkLength = function(r) {
        if (!r.ticks)
          return 0;
        var n = r.ticklen;
        return r.ticks === "inside" ? -n : n;
      }, Q.exports = function(r) {
        return new k(r);
      };
    }, { "../../lib/str2rgbarray": 540, "../cartesian/axes": 566 }], 605: [function(v, Q, $) {
      var m = v("../../plot_api/edit_types").overrideAll, g = v("./scene2d"), k = v("../layout_attributes"), x = v("../../constants/xmlns_namespaces"), e = v("../cartesian/constants"), r = v("../cartesian"), n = v("../../components/fx/layout_attributes"), s = v("../get_data").getSubplotData;
      $.name = "gl2d", $.attr = ["xaxis", "yaxis"], $.idRoot = ["x", "y"], $.idRegex = e.idRegex, $.attrRegex = e.attrRegex, $.attributes = v("../cartesian/attributes"), $.supplyLayoutDefaults = function(t, d, u) {
        d._has("cartesian") || r.supplyLayoutDefaults(t, d, u);
      }, $.layoutAttrOverrides = m(r.layoutAttributes, "plot", "from-root"), $.baseLayoutAttrOverrides = m({ plot_bgcolor: k.plot_bgcolor, hoverlabel: n.hoverlabel }, "plot", "nested"), $.plot = function(t) {
        for (var d = t._fullLayout, u = t._fullData, o = d._subplots.gl2d, h = 0; h < o.length; h++) {
          var l = o[h], i = d._plots[l], p = s(u, "gl2d", l), c = i._scene2d;
          c === void 0 && (c = new g({ id: l, graphDiv: t, container: t.querySelector(".gl-container"), staticPlot: t._context.staticPlot, plotGlPixelRatio: t._context.plotGlPixelRatio }, d), i._scene2d = c), c.plot(p, t.calcdata, d, t.layout);
        }
      }, $.clean = function(t, d, u, o) {
        for (var h = o._subplots.gl2d || [], l = 0; l < h.length; l++) {
          var i = h[l], p = o._plots[i];
          if (p._scene2d) {
            var c = s(t, "gl2d", i);
            c.length === 0 && (p._scene2d.destroy(), delete o._plots[i]);
          }
        }
        r.clean.apply(this, arguments);
      }, $.drawFramework = function(t) {
        t._context.staticPlot || r.drawFramework(t);
      }, $.toSVG = function(t) {
        for (var d = t._fullLayout, u = d._subplots.gl2d, o = 0; o < u.length; o++) {
          var h = d._plots[u[o]]._scene2d, l = h.toImage("png");
          d._glimages.append("svg:image").attr({ xmlns: x.svg, "xlink:href": l, x: 0, y: 0, width: "100%", height: "100%", preserveAspectRatio: "none" }), h.destroy();
        }
      }, $.updateFx = function(t) {
        for (var d = t._fullLayout, u = d._subplots.gl2d, o = 0; o < u.length; o++)
          d._plots[u[o]]._scene2d.updateFx(d.dragmode);
      };
    }, { "../../components/fx/layout_attributes": 408, "../../constants/xmlns_namespaces": 492, "../../plot_api/edit_types": 548, "../cartesian": 578, "../cartesian/attributes": 564, "../cartesian/constants": 573, "../get_data": 602, "../layout_attributes": 619, "./scene2d": 606 }], 606: [function(v, Q, $) {
      var m, g, k = v("../../registry"), x = v("../../plots/cartesian/axes"), e = v("../../components/fx"), r = v("../../../stackgl_modules").gl_plot2d, n = v("../../../stackgl_modules").gl_spikes2d, s = v("../../../stackgl_modules").gl_select_box, t = v("webgl-context"), d = v("./convert"), u = v("./camera"), o = v("../../lib/show_no_webgl_msg"), h = v("../cartesian/constraints"), l = h.enforce, i = h.clean, p = v("../cartesian/autorange").doAutoRange, c = v("../../components/dragelement/helpers"), a = c.drawMode, y = c.selectMode, f = ["xaxis", "yaxis"], _ = v("../cartesian/constants").SUBPLOT_PATTERN;
      function b(T, L) {
        this.container = T.container, this.graphDiv = T.graphDiv, this.pixelRatio = T.plotGlPixelRatio || window.devicePixelRatio, this.id = T.id, this.staticPlot = !!T.staticPlot, this.scrollZoom = this.graphDiv._context._scrollZoom.cartesian, this.fullData = null, this.updateRefs(L), this.makeFramework(), this.stopped || (this.glplotOptions = d(this), this.glplotOptions.merge(L), this.glplot = r(this.glplotOptions), this.camera = u(this), this.traces = {}, this.spikes = n(this.glplot), this.selectBox = s(this.glplot, { innerFill: !1, outerFill: !0 }), this.lastButtonState = 0, this.pickResult = null, this.isMouseOver = !0, this.stopped = !1, this.redraw = this.draw.bind(this), this.redraw());
      }
      Q.exports = b;
      var w = b.prototype;
      w.makeFramework = function() {
        if (this.staticPlot) {
          if (!(g || (m = document.createElement("canvas"), g = t({ canvas: m, preserveDrawingBuffer: !1, premultipliedAlpha: !0, antialias: !0 }))))
            throw new Error("Error creating static canvas/context for image server");
          this.canvas = m, this.gl = g;
        } else {
          var T = this.container.querySelector(".gl-canvas-focus"), L = t({ canvas: T, preserveDrawingBuffer: !0, premultipliedAlpha: !0 });
          if (!L)
            return o(this), void (this.stopped = !0);
          this.canvas = T, this.gl = L;
        }
        var A = this.canvas;
        A.style.width = "100%", A.style.height = "100%", A.style.position = "absolute", A.style.top = "0px", A.style.left = "0px", A.style["pointer-events"] = "none", this.updateSize(A);
        var I = this.svgContainer = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        I.style.position = "absolute", I.style.top = I.style.left = "0px", I.style.width = I.style.height = "100%", I.style["z-index"] = 20, I.style["pointer-events"] = "none";
        var P = this.mouseContainer = document.createElement("div");
        P.style.position = "absolute", P.style["pointer-events"] = "auto", this.pickCanvas = this.container.querySelector(".gl-canvas-pick");
        var S = this.container;
        S.appendChild(I), S.appendChild(P);
        var E = this;
        P.addEventListener("mouseout", function() {
          E.isMouseOver = !1, E.unhover();
        }), P.addEventListener("mouseover", function() {
          E.isMouseOver = !0;
        });
      }, w.toImage = function(T) {
        T || (T = "png"), this.stopped = !0, this.staticPlot && this.container.appendChild(m), this.updateSize(this.canvas);
        var L = this.glplot.gl, A = L.drawingBufferWidth, I = L.drawingBufferHeight;
        L.clearColor(1, 1, 1, 0), L.clear(L.COLOR_BUFFER_BIT | L.DEPTH_BUFFER_BIT), this.glplot.setDirty(), this.glplot.draw(), L.bindFramebuffer(L.FRAMEBUFFER, null);
        var P = new Uint8Array(A * I * 4);
        L.readPixels(0, 0, A, I, L.RGBA, L.UNSIGNED_BYTE, P);
        for (var S = 0, E = I - 1; S < E; ++S, --E)
          for (var R = 0; R < A; ++R)
            for (var z = 0; z < 4; ++z) {
              var j = P[4 * (A * S + R) + z];
              P[4 * (A * S + R) + z] = P[4 * (A * E + R) + z], P[4 * (A * E + R) + z] = j;
            }
        var H = document.createElement("canvas");
        H.width = A, H.height = I;
        var Y, J = H.getContext("2d", { willReadFrequently: !0 }), W = J.createImageData(A, I);
        switch (W.data.set(P), J.putImageData(W, 0, 0), T) {
          case "jpeg":
            Y = H.toDataURL("image/jpeg");
            break;
          case "webp":
            Y = H.toDataURL("image/webp");
            break;
          default:
            Y = H.toDataURL("image/png");
        }
        return this.staticPlot && this.container.removeChild(m), Y;
      }, w.updateSize = function(T) {
        T || (T = this.canvas);
        var L = this.pixelRatio, A = this.fullLayout, I = A.width, P = A.height, S = 0 | Math.ceil(L * I), E = 0 | Math.ceil(L * P);
        return T.width === S && T.height === E || (T.width = S, T.height = E), T;
      }, w.computeTickMarks = function() {
        this.xaxis.setScale(), this.yaxis.setScale();
        for (var T = [x.calcTicks(this.xaxis), x.calcTicks(this.yaxis)], L = 0; L < 2; ++L)
          for (var A = 0; A < T[L].length; ++A)
            T[L][A].text = T[L][A].text + "";
        return T;
      }, w.updateRefs = function(T) {
        this.fullLayout = T;
        var L = this.id.match(_), A = "xaxis" + L[1], I = "yaxis" + L[2];
        this.xaxis = this.fullLayout[A], this.yaxis = this.fullLayout[I];
      }, w.relayoutCallback = function() {
        var T = this.graphDiv, L = this.xaxis, A = this.yaxis, I = T.layout, P = {}, S = P[L._name + ".range"] = L.range.slice(), E = P[A._name + ".range"] = A.range.slice();
        P[L._name + ".autorange"] = L.autorange, P[A._name + ".autorange"] = A.autorange, k.call("_storeDirectGUIEdit", T.layout, T._fullLayout._preGUI, P);
        var R = I[L._name];
        R.range = S, R.autorange = L.autorange;
        var z = I[A._name];
        z.range = E, z.autorange = A.autorange, P.lastInputTime = this.camera.lastInputTime, T.emit("plotly_relayout", P);
      }, w.cameraChanged = function() {
        var T = this.camera;
        this.glplot.setDataBox(this.calcDataBox());
        var L = this.computeTickMarks();
        (function(A, I) {
          for (var P = 0; P < 2; ++P) {
            var S = A[P], E = I[P];
            if (S.length !== E.length)
              return !0;
            for (var R = 0; R < S.length; ++R)
              if (S[R].x !== E[R].x)
                return !0;
          }
          return !1;
        })(L, this.glplotOptions.ticks) && (this.glplotOptions.ticks = L, this.glplotOptions.dataBox = T.dataBox, this.glplot.update(this.glplotOptions), this.handleAnnotations());
      }, w.handleAnnotations = function() {
        for (var T = this.graphDiv, L = this.fullLayout.annotations, A = 0; A < L.length; A++) {
          var I = L[A];
          I.xref === this.xaxis._id && I.yref === this.yaxis._id && k.getComponentMethod("annotations", "drawOne")(T, A);
        }
      }, w.destroy = function() {
        if (this.glplot) {
          var T = this.traces;
          T && Object.keys(T).map(function(L) {
            T[L].dispose(), delete T[L];
          }), this.glplot.dispose(), this.container.removeChild(this.svgContainer), this.container.removeChild(this.mouseContainer), this.fullData = null, this.glplot = null, this.stopped = !0, this.camera.mouseListener.enabled = !1, this.mouseContainer.removeEventListener("wheel", this.camera.wheelListener), this.camera = null;
        }
      }, w.plot = function(T, L, A) {
        var I = this.glplot;
        this.updateRefs(A), this.xaxis.clearCalc(), this.yaxis.clearCalc(), this.updateTraces(T, L), this.updateFx(A.dragmode);
        var P = A.width, S = A.height;
        this.updateSize(this.canvas);
        var E = this.glplotOptions;
        E.merge(A), E.screenBox = [0, 0, P, S];
        var R = { _fullLayout: { _axisConstraintGroups: A._axisConstraintGroups, xaxis: this.xaxis, yaxis: this.yaxis, _size: A._size } };
        i(R, this.xaxis), i(R, this.yaxis);
        var z, j, H = A._size, Y = this.xaxis.domain, J = this.yaxis.domain;
        for (E.viewBox = [H.l + Y[0] * H.w, H.b + J[0] * H.h, P - H.r - (1 - Y[1]) * H.w, S - H.t - (1 - J[1]) * H.h], this.mouseContainer.style.width = H.w * (Y[1] - Y[0]) + "px", this.mouseContainer.style.height = H.h * (J[1] - J[0]) + "px", this.mouseContainer.height = H.h * (J[1] - J[0]), this.mouseContainer.style.left = H.l + Y[0] * H.w + "px", this.mouseContainer.style.top = H.t + (1 - J[1]) * H.h + "px", j = 0; j < 2; ++j)
          (z = this[f[j]])._length = E.viewBox[j + 2] - E.viewBox[j], p(this.graphDiv, z), z.setScale();
        l(R), E.ticks = this.computeTickMarks(), E.dataBox = this.calcDataBox(), E.merge(A), I.update(E), this.glplot.draw();
      }, w.calcDataBox = function() {
        var T = this.xaxis, L = this.yaxis, A = T.range, I = L.range, P = T.r2l, S = L.r2l;
        return [P(A[0]), S(I[0]), P(A[1]), S(I[1])];
      }, w.setRanges = function(T) {
        var L = this.xaxis, A = this.yaxis, I = L.l2r, P = A.l2r;
        L.range = [I(T[0]), I(T[2])], A.range = [P(T[1]), P(T[3])];
      }, w.updateTraces = function(T, L) {
        var A, I, P, S = Object.keys(this.traces);
        this.fullData = T;
        e:
          for (A = 0; A < S.length; A++) {
            var E = S[A], R = this.traces[E];
            for (I = 0; I < T.length; I++)
              if ((P = T[I]).uid === E && P.type === R.type)
                continue e;
            R.dispose(), delete this.traces[E];
          }
        for (A = 0; A < T.length; A++) {
          P = T[A];
          var z = L[A], j = this.traces[P.uid];
          j ? j.update(P, z) : (j = P._module.plot(this, P, z), this.traces[P.uid] = j);
        }
        this.glplot.objects.sort(function(H, Y) {
          return H._trace.index - Y._trace.index;
        });
      }, w.updateFx = function(T) {
        y(T) || a(T) ? (this.pickCanvas.style["pointer-events"] = "none", this.mouseContainer.style["pointer-events"] = "none") : (this.pickCanvas.style["pointer-events"] = "auto", this.mouseContainer.style["pointer-events"] = "auto"), this.mouseContainer.style.cursor = T === "pan" ? "move" : T === "zoom" ? "crosshair" : null;
      }, w.emitPointAction = function(T, L) {
        for (var A, I = T.trace.uid, P = T.pointIndex, S = 0; S < this.fullData.length; S++)
          this.fullData[S].uid === I && (A = this.fullData[S]);
        var E = { x: T.traceCoord[0], y: T.traceCoord[1], curveNumber: A.index, pointNumber: P, data: A._input, fullData: this.fullData, xaxis: this.xaxis, yaxis: this.yaxis };
        e.appendArrayPointValue(E, A, P), this.graphDiv.emit(L, { points: [E] });
      }, w.draw = function() {
        if (!this.stopped) {
          requestAnimationFrame(this.redraw);
          var T = this.glplot, L = this.camera, A = L.mouseListener, I = this.lastButtonState === 1 && A.buttons === 0, P = this.fullLayout;
          this.lastButtonState = A.buttons, this.cameraChanged();
          var S, E = A.x * T.pixelRatio, R = this.canvas.height - T.pixelRatio * A.y;
          if (L.boxEnabled && P.dragmode === "zoom") {
            this.selectBox.enabled = !0;
            for (var z = this.selectBox.selectBox = [Math.min(L.boxStart[0], L.boxEnd[0]), Math.min(L.boxStart[1], L.boxEnd[1]), Math.max(L.boxStart[0], L.boxEnd[0]), Math.max(L.boxStart[1], L.boxEnd[1])], j = 0; j < 2; j++)
              L.boxStart[j] === L.boxEnd[j] && (z[j] = T.dataBox[j], z[j + 2] = T.dataBox[j + 2]);
            T.setDirty();
          } else if (!L.panning && this.isMouseOver) {
            this.selectBox.enabled = !1;
            var H = P._size, Y = this.xaxis.domain, J = this.yaxis.domain, W = (S = T.pick(E / T.pixelRatio + H.l + Y[0] * H.w, R / T.pixelRatio - (H.t + (1 - J[1]) * H.h))) && S.object._trace.handlePick(S);
            if (W && I && this.emitPointAction(W, "plotly_click"), S && S.object._trace.hoverinfo !== "skip" && P.hovermode && W && (!this.lastPickResult || this.lastPickResult.traceUid !== W.trace.uid || this.lastPickResult.dataCoord[0] !== W.dataCoord[0] || this.lastPickResult.dataCoord[1] !== W.dataCoord[1])) {
              var Z = W;
              this.lastPickResult = { traceUid: W.trace ? W.trace.uid : null, dataCoord: W.dataCoord.slice() }, this.spikes.update({ center: S.dataCoord }), Z.screenCoord = [((T.viewBox[2] - T.viewBox[0]) * (S.dataCoord[0] - T.dataBox[0]) / (T.dataBox[2] - T.dataBox[0]) + T.viewBox[0]) / T.pixelRatio, (this.canvas.height - (T.viewBox[3] - T.viewBox[1]) * (S.dataCoord[1] - T.dataBox[1]) / (T.dataBox[3] - T.dataBox[1]) - T.viewBox[1]) / T.pixelRatio], this.emitPointAction(W, "plotly_hover");
              var re = this.fullData[Z.trace.index] || {}, V = Z.pointIndex, B = e.castHoverinfo(re, P, V);
              if (B && B !== "all") {
                var U = B.split("+");
                U.indexOf("x") === -1 && (Z.traceCoord[0] = void 0), U.indexOf("y") === -1 && (Z.traceCoord[1] = void 0), U.indexOf("z") === -1 && (Z.traceCoord[2] = void 0), U.indexOf("text") === -1 && (Z.textLabel = void 0), U.indexOf("name") === -1 && (Z.name = void 0);
              }
              e.loneHover({ x: Z.screenCoord[0], y: Z.screenCoord[1], xLabel: this.hoverFormatter("xaxis", Z.traceCoord[0]), yLabel: this.hoverFormatter("yaxis", Z.traceCoord[1]), zLabel: Z.traceCoord[2], text: Z.textLabel, name: Z.name, color: e.castHoverOption(re, V, "bgcolor") || Z.color, borderColor: e.castHoverOption(re, V, "bordercolor"), fontFamily: e.castHoverOption(re, V, "font.family"), fontSize: e.castHoverOption(re, V, "font.size"), fontColor: e.castHoverOption(re, V, "font.color"), nameLength: e.castHoverOption(re, V, "namelength"), textAlign: e.castHoverOption(re, V, "align") }, { container: this.svgContainer, gd: this.graphDiv });
            }
          }
          S || this.unhover(), T.draw();
        }
      }, w.unhover = function() {
        this.lastPickResult && (this.spikes.update({}), this.lastPickResult = null, this.graphDiv.emit("plotly_unhover"), e.loneUnhover(this.svgContainer));
      }, w.hoverFormatter = function(T, L) {
        if (L !== void 0) {
          var A = this[T];
          return x.tickText(A, A.c2l(L), "hover").text;
        }
      };
    }, { "../../../stackgl_modules": 1133, "../../components/dragelement/helpers": 385, "../../components/fx": 407, "../../lib/show_no_webgl_msg": 537, "../../plots/cartesian/axes": 566, "../../registry": 647, "../cartesian/autorange": 565, "../cartesian/constants": 573, "../cartesian/constraints": 574, "./camera": 603, "./convert": 604, "webgl-context": 332 }], 607: [function(v, Q, $) {
      var m = v("../../plot_api/edit_types").overrideAll, g = v("../../components/fx/layout_attributes"), k = v("./scene"), x = v("../get_data").getSubplotData, e = v("../../lib"), r = v("../../constants/xmlns_namespaces");
      $.name = "gl3d", $.attr = "scene", $.idRoot = "scene", $.idRegex = $.attrRegex = e.counterRegex("scene"), $.attributes = v("./layout/attributes"), $.layoutAttributes = v("./layout/layout_attributes"), $.baseLayoutAttrOverrides = m({ hoverlabel: g.hoverlabel }, "plot", "nested"), $.supplyLayoutDefaults = v("./layout/defaults"), $.plot = function(n) {
        for (var s = n._fullLayout, t = n._fullData, d = s._subplots.gl3d, u = 0; u < d.length; u++) {
          var o = d[u], h = x(t, "gl3d", o), l = s[o], i = l.camera, p = l._scene;
          p || (p = new k({ id: o, graphDiv: n, container: n.querySelector(".gl-container"), staticPlot: n._context.staticPlot, plotGlPixelRatio: n._context.plotGlPixelRatio, camera: i }, s), l._scene = p), p.viewInitial || (p.viewInitial = { up: { x: i.up.x, y: i.up.y, z: i.up.z }, eye: { x: i.eye.x, y: i.eye.y, z: i.eye.z }, center: { x: i.center.x, y: i.center.y, z: i.center.z } }), p.plot(h, s, n.layout);
        }
      }, $.clean = function(n, s, t, d) {
        for (var u = d._subplots.gl3d || [], o = 0; o < u.length; o++) {
          var h = u[o];
          !s[h] && d[h]._scene && (d[h]._scene.destroy(), d._infolayer && d._infolayer.selectAll(".annotation-" + h).remove());
        }
      }, $.toSVG = function(n) {
        for (var s = n._fullLayout, t = s._subplots.gl3d, d = s._size, u = 0; u < t.length; u++) {
          var o = s[t[u]], h = o.domain, l = o._scene, i = l.toImage("png");
          s._glimages.append("svg:image").attr({ xmlns: r.svg, "xlink:href": i, x: d.l + d.w * h.x[0], y: d.t + d.h * (1 - h.y[1]), width: d.w * (h.x[1] - h.x[0]), height: d.h * (h.y[1] - h.y[0]), preserveAspectRatio: "none" }), l.destroy();
        }
      }, $.cleanId = function(n) {
        if (n.match(/^scene[0-9]*$/)) {
          var s = n.substr(5);
          return s === "1" && (s = ""), "scene" + s;
        }
      }, $.updateFx = function(n) {
        for (var s = n._fullLayout, t = s._subplots.gl3d, d = 0; d < t.length; d++)
          s[t[d]]._scene.updateFx(s.dragmode, s.hovermode);
      };
    }, { "../../components/fx/layout_attributes": 408, "../../constants/xmlns_namespaces": 492, "../../lib": 515, "../../plot_api/edit_types": 548, "../get_data": 602, "./layout/attributes": 608, "./layout/defaults": 612, "./layout/layout_attributes": 613, "./scene": 617 }], 608: [function(v, Q, $) {
      Q.exports = { scene: { valType: "subplotid", dflt: "scene", editType: "calc+clearAxisTypes" } };
    }, {}], 609: [function(v, Q, $) {
      var m = v("../../../components/color"), g = v("../../cartesian/layout_attributes"), k = v("../../../lib/extend").extendFlat, x = v("../../../plot_api/edit_types").overrideAll;
      Q.exports = x({ visible: g.visible, showspikes: { valType: "boolean", dflt: !0 }, spikesides: { valType: "boolean", dflt: !0 }, spikethickness: { valType: "number", min: 0, dflt: 2 }, spikecolor: { valType: "color", dflt: m.defaultLine }, showbackground: { valType: "boolean", dflt: !1 }, backgroundcolor: { valType: "color", dflt: "rgba(204, 204, 204, 0.5)" }, showaxeslabels: { valType: "boolean", dflt: !0 }, color: g.color, categoryorder: g.categoryorder, categoryarray: g.categoryarray, title: { text: g.title.text, font: g.title.font }, type: k({}, g.type, { values: ["-", "linear", "log", "date", "category"] }), autotypenumbers: g.autotypenumbers, autorange: g.autorange, rangemode: g.rangemode, range: k({}, g.range, { items: [{ valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }, { valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }], anim: !1 }), tickmode: g.tickmode, nticks: g.nticks, tick0: g.tick0, dtick: g.dtick, tickvals: g.tickvals, ticktext: g.ticktext, ticks: g.ticks, mirror: g.mirror, ticklen: g.ticklen, tickwidth: g.tickwidth, tickcolor: g.tickcolor, showticklabels: g.showticklabels, tickfont: g.tickfont, tickangle: g.tickangle, tickprefix: g.tickprefix, showtickprefix: g.showtickprefix, ticksuffix: g.ticksuffix, showticksuffix: g.showticksuffix, showexponent: g.showexponent, exponentformat: g.exponentformat, minexponent: g.minexponent, separatethousands: g.separatethousands, tickformat: g.tickformat, tickformatstops: g.tickformatstops, hoverformat: g.hoverformat, showline: g.showline, linecolor: g.linecolor, linewidth: g.linewidth, showgrid: g.showgrid, gridcolor: k({}, g.gridcolor, { dflt: "rgb(204, 204, 204)" }), gridwidth: g.gridwidth, zeroline: g.zeroline, zerolinecolor: g.zerolinecolor, zerolinewidth: g.zerolinewidth, _deprecated: { title: g._deprecated.title, titlefont: g._deprecated.titlefont } }, "plot", "from-root");
    }, { "../../../components/color": 367, "../../../lib/extend": 505, "../../../plot_api/edit_types": 548, "../../cartesian/layout_attributes": 579 }], 610: [function(v, Q, $) {
      var m = v("tinycolor2").mix, g = v("../../../lib"), k = v("../../../plot_api/plot_template"), x = v("./axis_attributes"), e = v("../../cartesian/type_defaults"), r = v("../../cartesian/axis_defaults"), n = ["xaxis", "yaxis", "zaxis"];
      Q.exports = function(s, t, d) {
        var u, o;
        function h(p, c) {
          return g.coerce(u, o, x, p, c);
        }
        for (var l = 0; l < n.length; l++) {
          var i = n[l];
          u = s[i] || {}, (o = k.newContainer(t, i))._id = i[0] + d.scene, o._name = i, e(u, o, h, d), r(u, o, h, { font: d.font, letter: i[0], data: d.data, showGrid: !0, noTickson: !0, noTicklabelmode: !0, noTicklabelstep: !0, noTicklabelposition: !0, noTicklabeloverflow: !0, bgColor: d.bgColor, calendar: d.calendar }, d.fullLayout), h("gridcolor", m(o.color, d.bgColor, 13600 / 187).toRgbString()), h("title.text", i[0]), o.setScale = g.noop, h("showspikes") && (h("spikesides"), h("spikethickness"), h("spikecolor", o.color)), h("showaxeslabels"), h("showbackground") && h("backgroundcolor");
        }
      };
    }, { "../../../lib": 515, "../../../plot_api/plot_template": 555, "../../cartesian/axis_defaults": 568, "../../cartesian/type_defaults": 591, "./axis_attributes": 609, tinycolor2: 313 }], 611: [function(v, Q, $) {
      var m = v("../../../lib/str2rgbarray"), g = v("../../../lib"), k = ["xaxis", "yaxis", "zaxis"];
      function x() {
        this.bounds = [[-10, -10, -10], [10, 10, 10]], this.ticks = [[], [], []], this.tickEnable = [!0, !0, !0], this.tickFont = ["sans-serif", "sans-serif", "sans-serif"], this.tickSize = [12, 12, 12], this.tickAngle = [0, 0, 0], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickPad = [18, 18, 18], this.labels = ["x", "y", "z"], this.labelEnable = [!0, !0, !0], this.labelFont = ["Open Sans", "Open Sans", "Open Sans"], this.labelSize = [20, 20, 20], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labelPad = [30, 30, 30], this.lineEnable = [!0, !0, !0], this.lineMirror = [!1, !1, !1], this.lineWidth = [1, 1, 1], this.lineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.lineTickEnable = [!0, !0, !0], this.lineTickMirror = [!1, !1, !1], this.lineTickLength = [10, 10, 10], this.lineTickWidth = [1, 1, 1], this.lineTickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.gridEnable = [!0, !0, !0], this.gridWidth = [1, 1, 1], this.gridColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroEnable = [!0, !0, !0], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroLineWidth = [2, 2, 2], this.backgroundEnable = [!0, !0, !0], this.backgroundColor = [[0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5]], this._defaultTickPad = this.tickPad.slice(), this._defaultLabelPad = this.labelPad.slice(), this._defaultLineTickLength = this.lineTickLength.slice();
      }
      x.prototype.merge = function(e, r) {
        for (var n = 0; n < 3; ++n) {
          var s = r[k[n]];
          s.visible ? (this.labels[n] = e._meta ? g.templateString(s.title.text, e._meta) : s.title.text, "font" in s.title && (s.title.font.color && (this.labelColor[n] = m(s.title.font.color)), s.title.font.family && (this.labelFont[n] = s.title.font.family), s.title.font.size && (this.labelSize[n] = s.title.font.size)), "showline" in s && (this.lineEnable[n] = s.showline), "linecolor" in s && (this.lineColor[n] = m(s.linecolor)), "linewidth" in s && (this.lineWidth[n] = s.linewidth), "showgrid" in s && (this.gridEnable[n] = s.showgrid), "gridcolor" in s && (this.gridColor[n] = m(s.gridcolor)), "gridwidth" in s && (this.gridWidth[n] = s.gridwidth), s.type === "log" ? this.zeroEnable[n] = !1 : "zeroline" in s && (this.zeroEnable[n] = s.zeroline), "zerolinecolor" in s && (this.zeroLineColor[n] = m(s.zerolinecolor)), "zerolinewidth" in s && (this.zeroLineWidth[n] = s.zerolinewidth), "ticks" in s && s.ticks ? this.lineTickEnable[n] = !0 : this.lineTickEnable[n] = !1, "ticklen" in s && (this.lineTickLength[n] = this._defaultLineTickLength[n] = s.ticklen), "tickcolor" in s && (this.lineTickColor[n] = m(s.tickcolor)), "tickwidth" in s && (this.lineTickWidth[n] = s.tickwidth), "tickangle" in s && (this.tickAngle[n] = s.tickangle === "auto" ? -3600 : Math.PI * -s.tickangle / 180), "showticklabels" in s && (this.tickEnable[n] = s.showticklabels), "tickfont" in s && (s.tickfont.color && (this.tickColor[n] = m(s.tickfont.color)), s.tickfont.family && (this.tickFont[n] = s.tickfont.family), s.tickfont.size && (this.tickSize[n] = s.tickfont.size)), "mirror" in s ? ["ticks", "all", "allticks"].indexOf(s.mirror) !== -1 ? (this.lineTickMirror[n] = !0, this.lineMirror[n] = !0) : s.mirror === !0 ? (this.lineTickMirror[n] = !1, this.lineMirror[n] = !0) : (this.lineTickMirror[n] = !1, this.lineMirror[n] = !1) : this.lineMirror[n] = !1, "showbackground" in s && s.showbackground !== !1 ? (this.backgroundEnable[n] = !0, this.backgroundColor[n] = m(s.backgroundcolor)) : this.backgroundEnable[n] = !1) : (this.tickEnable[n] = !1, this.labelEnable[n] = !1, this.lineEnable[n] = !1, this.lineTickEnable[n] = !1, this.gridEnable[n] = !1, this.zeroEnable[n] = !1, this.backgroundEnable[n] = !1);
        }
      }, Q.exports = function(e, r) {
        var n = new x();
        return n.merge(e, r), n;
      };
    }, { "../../../lib": 515, "../../../lib/str2rgbarray": 540 }], 612: [function(v, Q, $) {
      var m = v("../../../lib"), g = v("../../../components/color"), k = v("../../../registry"), x = v("../../subplot_defaults"), e = v("./axis_defaults"), r = v("./layout_attributes"), n = v("../../get_data").getSubplotData;
      function s(t, d, u, o) {
        for (var h = u("bgcolor"), l = g.combine(h, o.paper_bgcolor), i = ["up", "center", "eye"], p = 0; p < i.length; p++)
          u("camera." + i[p] + ".x"), u("camera." + i[p] + ".y"), u("camera." + i[p] + ".z");
        u("camera.projection.type");
        var c = !!u("aspectratio.x") && !!u("aspectratio.y") && !!u("aspectratio.z"), a = u("aspectmode", c ? "manual" : "auto");
        c || (t.aspectratio = d.aspectratio = { x: 1, y: 1, z: 1 }, a === "manual" && (d.aspectmode = "auto"), t.aspectmode = d.aspectmode);
        var y = n(o.fullData, "gl3d", o.id);
        e(t, d, { font: o.font, scene: o.id, data: y, bgColor: l, calendar: o.calendar, autotypenumbersDflt: o.autotypenumbersDflt, fullLayout: o.fullLayout }), k.getComponentMethod("annotations3d", "handleDefaults")(t, d, o);
        var f = o.getDfltFromLayout("dragmode");
        if (f !== !1 && !f)
          if (f = "orbit", t.camera && t.camera.up) {
            var _ = t.camera.up.x, b = t.camera.up.y, w = t.camera.up.z;
            w !== 0 && (_ && b && w ? w / Math.sqrt(_ * _ + b * b + w * w) > 0.999 && (f = "turntable") : f = "turntable");
          } else
            f = "turntable";
        u("dragmode", f), u("hovermode", o.getDfltFromLayout("hovermode"));
      }
      Q.exports = function(t, d, u) {
        var o = d._basePlotModules.length > 1;
        x(t, d, u, { type: "gl3d", attributes: r, handleDefaults: s, fullLayout: d, font: d.font, fullData: u, getDfltFromLayout: function(h) {
          if (!o)
            return m.validate(t[h], r[h]) ? t[h] : void 0;
        }, autotypenumbersDflt: d.autotypenumbers, paper_bgcolor: d.paper_bgcolor, calendar: d.calendar });
      };
    }, { "../../../components/color": 367, "../../../lib": 515, "../../../registry": 647, "../../get_data": 602, "../../subplot_defaults": 641, "./axis_defaults": 610, "./layout_attributes": 613 }], 613: [function(v, Q, $) {
      var m = v("./axis_attributes"), g = v("../../domain").attributes, k = v("../../../lib/extend").extendFlat, x = v("../../../lib").counterRegex;
      function e(r, n, s) {
        return { x: { valType: "number", dflt: r, editType: "camera" }, y: { valType: "number", dflt: n, editType: "camera" }, z: { valType: "number", dflt: s, editType: "camera" }, editType: "camera" };
      }
      Q.exports = { _arrayAttrRegexps: [x("scene", ".annotations", !0)], bgcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "plot" }, camera: { up: k(e(0, 0, 1), {}), center: k(e(0, 0, 0), {}), eye: k(e(1.25, 1.25, 1.25), {}), projection: { type: { valType: "enumerated", values: ["perspective", "orthographic"], dflt: "perspective", editType: "calc" }, editType: "calc" }, editType: "camera" }, domain: g({ name: "scene", editType: "plot" }), aspectmode: { valType: "enumerated", values: ["auto", "cube", "data", "manual"], dflt: "auto", editType: "plot", impliedEdits: { "aspectratio.x": void 0, "aspectratio.y": void 0, "aspectratio.z": void 0 } }, aspectratio: { x: { valType: "number", min: 0, editType: "plot", impliedEdits: { "^aspectmode": "manual" } }, y: { valType: "number", min: 0, editType: "plot", impliedEdits: { "^aspectmode": "manual" } }, z: { valType: "number", min: 0, editType: "plot", impliedEdits: { "^aspectmode": "manual" } }, editType: "plot", impliedEdits: { aspectmode: "manual" } }, xaxis: m, yaxis: m, zaxis: m, dragmode: { valType: "enumerated", values: ["orbit", "turntable", "zoom", "pan", !1], editType: "plot" }, hovermode: { valType: "enumerated", values: ["closest", !1], dflt: "closest", editType: "modebar" }, uirevision: { valType: "any", editType: "none" }, editType: "plot", _deprecated: { cameraposition: { valType: "info_array", editType: "camera" } } };
    }, { "../../../lib": 515, "../../../lib/extend": 505, "../../domain": 593, "./axis_attributes": 609 }], 614: [function(v, Q, $) {
      var m = v("../../../lib/str2rgbarray"), g = ["xaxis", "yaxis", "zaxis"];
      function k() {
        this.enabled = [!0, !0, !0], this.colors = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.drawSides = [!0, !0, !0], this.lineWidth = [1, 1, 1];
      }
      k.prototype.merge = function(x) {
        for (var e = 0; e < 3; ++e) {
          var r = x[g[e]];
          r.visible ? (this.enabled[e] = r.showspikes, this.colors[e] = m(r.spikecolor), this.drawSides[e] = r.spikesides, this.lineWidth[e] = r.spikethickness) : (this.enabled[e] = !1, this.drawSides[e] = !1);
        }
      }, Q.exports = function(x) {
        var e = new k();
        return e.merge(x), e;
      };
    }, { "../../../lib/str2rgbarray": 540 }], 615: [function(v, Q, $) {
      Q.exports = function(e) {
        for (var r = e.axesOptions, n = e.glplot.axesPixels, s = e.fullSceneLayout, t = [[], [], []], d = 0; d < 3; ++d) {
          var u = s[k[d]];
          if (u._length = (n[d].hi - n[d].lo) * n[d].pixelsPerDataUnit / e.dataScale[d], Math.abs(u._length) === 1 / 0 || isNaN(u._length))
            t[d] = [];
          else {
            u._input_range = u.range.slice(), u.range[0] = n[d].lo / e.dataScale[d], u.range[1] = n[d].hi / e.dataScale[d], u._m = 1 / (e.dataScale[d] * n[d].pixelsPerDataUnit), u.range[0] === u.range[1] && (u.range[0] -= 1, u.range[1] += 1);
            var o = u.tickmode;
            if (u.tickmode === "auto") {
              u.tickmode = "linear";
              var h = u.nticks || g.constrain(u._length / 40, 4, 9);
              m.autoTicks(u, Math.abs(u.range[1] - u.range[0]) / h);
            }
            for (var l = m.calcTicks(u, { msUTC: !0 }), i = 0; i < l.length; ++i)
              l[i].x = l[i].x * e.dataScale[d], u.type === "date" && (l[i].text = l[i].text.replace(/\<br\>/g, " "));
            t[d] = l, u.tickmode = o;
          }
        }
        for (r.ticks = t, d = 0; d < 3; ++d)
          for (x[d] = 0.5 * (e.glplot.bounds[0][d] + e.glplot.bounds[1][d]), i = 0; i < 2; ++i)
            r.bounds[i][d] = e.glplot.bounds[i][d];
        e.contourLevels = function(p) {
          for (var c = new Array(3), a = 0; a < 3; ++a) {
            for (var y = p[a], f = new Array(y.length), _ = 0; _ < y.length; ++_)
              f[_] = y[_].x;
            c[a] = f;
          }
          return c;
        }(t);
      };
      var m = v("../../cartesian/axes"), g = v("../../../lib"), k = ["xaxis", "yaxis", "zaxis"], x = [0, 0, 0];
    }, { "../../../lib": 515, "../../cartesian/axes": 566 }], 616: [function(v, Q, $) {
      function m(g, k) {
        var x, e, r = [0, 0, 0, 0];
        for (x = 0; x < 4; ++x)
          for (e = 0; e < 4; ++e)
            r[e] += g[4 * x + e] * k[x];
        return r;
      }
      Q.exports = function(g, k) {
        return m(g.projection, m(g.view, m(g.model, [k[0], k[1], k[2], 1])));
      };
    }, {}], 617: [function(v, Q, $) {
      var m, g, k = v("../../../stackgl_modules").gl_plot3d, x = k.createCamera, e = k.createScene, r = v("webgl-context"), n = v("has-passive-events"), s = v("../../registry"), t = v("../../lib"), d = t.preserveDrawingBuffer(), u = v("../../plots/cartesian/axes"), o = v("../../components/fx"), h = v("../../lib/str2rgbarray"), l = v("../../lib/show_no_webgl_msg"), i = v("./project"), p = v("./layout/convert"), c = v("./layout/spikes"), a = v("./layout/tick_marks");
      function y(T, L) {
        var A = document.createElement("div"), I = T.container;
        this.graphDiv = T.graphDiv;
        var P = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        P.style.position = "absolute", P.style.top = P.style.left = "0px", P.style.width = P.style.height = "100%", P.style["z-index"] = 20, P.style["pointer-events"] = "none", A.appendChild(P), this.svgContainer = P, A.id = T.id, A.style.position = "absolute", A.style.top = A.style.left = "0px", A.style.width = A.style.height = "100%", I.appendChild(A), this.fullLayout = L, this.id = T.id || "scene", this.fullSceneLayout = L[this.id], this.plotArgs = [[], {}, {}], this.axesOptions = p(L, L[this.id]), this.spikeOptions = c(L[this.id]), this.container = A, this.staticMode = !!T.staticPlot, this.pixelRatio = this.pixelRatio || T.plotGlPixelRatio || 2, this.dataScale = [1, 1, 1], this.contourLevels = [[], [], []], this.convertAnnotations = s.getComponentMethod("annotations3d", "convert"), this.drawAnnotations = s.getComponentMethod("annotations3d", "draw"), this.initializeGLPlot();
      }
      var f = y.prototype;
      f.prepareOptions = function() {
        var T = { canvas: this.canvas, gl: this.gl, glOptions: { preserveDrawingBuffer: d, premultipliedAlpha: !0, antialias: !0 }, container: this.container, axes: this.axesOptions, spikes: this.spikeOptions, pickRadius: 10, snapToData: !0, autoScale: !0, autoBounds: !1, cameraObject: this.camera, pixelRatio: this.pixelRatio };
        if (this.staticMode) {
          if (!(g || (m = document.createElement("canvas"), g = r({ canvas: m, preserveDrawingBuffer: !0, premultipliedAlpha: !0, antialias: !0 }))))
            throw new Error("error creating static canvas/context for image server");
          T.gl = g, T.canvas = m;
        }
        return T;
      };
      var _ = !0;
      f.tryCreatePlot = function() {
        var T = this.prepareOptions(), L = !0;
        try {
          this.glplot = e(T);
        } catch {
          if (this.staticMode || !_ || d)
            L = !1;
          else {
            t.warn(["webgl setup failed possibly due to", "false preserveDrawingBuffer config.", "The mobile/tablet device may not be detected by is-mobile module.", "Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));
            try {
              d = T.glOptions.preserveDrawingBuffer = !0, this.glplot = e(T);
            } catch {
              d = T.glOptions.preserveDrawingBuffer = !1, L = !1;
            }
          }
        }
        return _ = !1, L;
      }, f.initializeGLCamera = function() {
        var T = this.fullSceneLayout.camera, L = T.projection.type === "orthographic";
        this.camera = x(this.container, { center: [T.center.x, T.center.y, T.center.z], eye: [T.eye.x, T.eye.y, T.eye.z], up: [T.up.x, T.up.y, T.up.z], _ortho: L, zoomMin: 0.01, zoomMax: 100, mode: "orbit" });
      }, f.initializeGLPlot = function() {
        var T = this;
        if (T.initializeGLCamera(), !T.tryCreatePlot())
          return l(T);
        T.traces = {}, T.make4thDimension();
        var L = T.graphDiv, A = L.layout, I = function() {
          var S = {};
          return T.isCameraChanged(A) && (S[T.id + ".camera"] = T.getCamera()), T.isAspectChanged(A) && (S[T.id + ".aspectratio"] = T.glplot.getAspectratio(), A[T.id].aspectmode !== "manual" && (T.fullSceneLayout.aspectmode = A[T.id].aspectmode = S[T.id + ".aspectmode"] = "manual")), S;
        }, P = function(S) {
          if (S.fullSceneLayout.dragmode !== !1) {
            var E = I();
            S.saveLayout(A), S.graphDiv.emit("plotly_relayout", E);
          }
        };
        return T.glplot.canvas && (T.glplot.canvas.addEventListener("mouseup", function() {
          P(T);
        }), T.glplot.canvas.addEventListener("wheel", function(S) {
          if (L._context._scrollZoom.gl3d) {
            if (T.camera._ortho) {
              var E = S.deltaX > S.deltaY ? 1.1 : 0.9090909090909091, R = T.glplot.getAspectratio();
              T.glplot.setAspectratio({ x: E * R.x, y: E * R.y, z: E * R.z });
            }
            P(T);
          }
        }, !!n && { passive: !1 }), T.glplot.canvas.addEventListener("mousemove", function() {
          if (T.fullSceneLayout.dragmode !== !1 && T.camera.mouseListener.buttons !== 0) {
            var S = I();
            T.graphDiv.emit("plotly_relayouting", S);
          }
        }), T.staticMode || T.glplot.canvas.addEventListener("webglcontextlost", function(S) {
          L && L.emit && L.emit("plotly_webglcontextlost", { event: S, layer: T.id });
        }, !1)), T.glplot.oncontextloss = function() {
          T.recoverContext();
        }, T.glplot.onrender = function() {
          T.render();
        }, !0;
      }, f.render = function() {
        var T, L = this, A = L.graphDiv, I = L.svgContainer, P = L.container.getBoundingClientRect();
        A._fullLayout._calcInverseTransform(A);
        var S = A._fullLayout._invScaleX, E = A._fullLayout._invScaleY, R = P.width * S, z = P.height * E;
        I.setAttributeNS(null, "viewBox", "0 0 " + R + " " + z), I.setAttributeNS(null, "width", R), I.setAttributeNS(null, "height", z), a(L), L.glplot.axes.update(L.axesOptions);
        for (var j = Object.keys(L.traces), H = null, Y = L.glplot.selection, J = 0; J < j.length; ++J)
          (T = L.traces[j[J]]).data.hoverinfo !== "skip" && T.handlePick(Y) && (H = T), T.setContourLevels && T.setContourLevels();
        function W(oe, ve, ue) {
          var ye = L.fullSceneLayout[oe + "axis"];
          return ye.type !== "log" && (ve = ye.d2l(ve)), u.hoverLabelText(ye, ve, ue);
        }
        if (H !== null) {
          var Z = i(L.glplot.cameraParams, Y.dataCoordinate);
          T = H.data;
          var re, V = A._fullData[T.index], B = Y.index, U = { xLabel: W("x", Y.traceCoordinate[0], T.xhoverformat), yLabel: W("y", Y.traceCoordinate[1], T.yhoverformat), zLabel: W("z", Y.traceCoordinate[2], T.zhoverformat) }, ee = o.castHoverinfo(V, L.fullLayout, B), N = (ee || "").split("+"), K = ee && ee === "all";
          V.hovertemplate || K || (N.indexOf("x") === -1 && (U.xLabel = void 0), N.indexOf("y") === -1 && (U.yLabel = void 0), N.indexOf("z") === -1 && (U.zLabel = void 0), N.indexOf("text") === -1 && (Y.textLabel = void 0), N.indexOf("name") === -1 && (H.name = void 0));
          var X = [];
          T.type === "cone" || T.type === "streamtube" ? (U.uLabel = W("x", Y.traceCoordinate[3], T.uhoverformat), (K || N.indexOf("u") !== -1) && X.push("u: " + U.uLabel), U.vLabel = W("y", Y.traceCoordinate[4], T.vhoverformat), (K || N.indexOf("v") !== -1) && X.push("v: " + U.vLabel), U.wLabel = W("z", Y.traceCoordinate[5], T.whoverformat), (K || N.indexOf("w") !== -1) && X.push("w: " + U.wLabel), U.normLabel = Y.traceCoordinate[6].toPrecision(3), (K || N.indexOf("norm") !== -1) && X.push("norm: " + U.normLabel), T.type === "streamtube" && (U.divergenceLabel = Y.traceCoordinate[7].toPrecision(3), (K || N.indexOf("divergence") !== -1) && X.push("divergence: " + U.divergenceLabel)), Y.textLabel && X.push(Y.textLabel), re = X.join("<br>")) : T.type === "isosurface" || T.type === "volume" ? (U.valueLabel = u.hoverLabelText(L._mockAxis, L._mockAxis.d2l(Y.traceCoordinate[3]), T.valuehoverformat), X.push("value: " + U.valueLabel), Y.textLabel && X.push(Y.textLabel), re = X.join("<br>")) : re = Y.textLabel;
          var te = { x: Y.traceCoordinate[0], y: Y.traceCoordinate[1], z: Y.traceCoordinate[2], data: V._input, fullData: V, curveNumber: V.index, pointNumber: B };
          o.appendArrayPointValue(te, V, B), T._module.eventData && (te = V._module.eventData(te, Y, V, {}, B));
          var ie = { points: [te] };
          if (L.fullSceneLayout.hovermode) {
            var le = [];
            o.loneHover({ trace: V, x: (0.5 + 0.5 * Z[0] / Z[3]) * R, y: (0.5 - 0.5 * Z[1] / Z[3]) * z, xLabel: U.xLabel, yLabel: U.yLabel, zLabel: U.zLabel, text: re, name: H.name, color: o.castHoverOption(V, B, "bgcolor") || H.color, borderColor: o.castHoverOption(V, B, "bordercolor"), fontFamily: o.castHoverOption(V, B, "font.family"), fontSize: o.castHoverOption(V, B, "font.size"), fontColor: o.castHoverOption(V, B, "font.color"), nameLength: o.castHoverOption(V, B, "namelength"), textAlign: o.castHoverOption(V, B, "align"), hovertemplate: t.castOption(V, B, "hovertemplate"), hovertemplateLabels: t.extendFlat({}, te, U), eventData: [te] }, { container: I, gd: A, inOut_bbox: le }), te.bbox = le[0];
          }
          Y.buttons && Y.distance < 5 ? A.emit("plotly_click", ie) : A.emit("plotly_hover", ie), this.oldEventData = ie;
        } else
          o.loneUnhover(I), this.oldEventData && A.emit("plotly_unhover", this.oldEventData), this.oldEventData = void 0;
        L.drawAnnotations(L);
      }, f.recoverContext = function() {
        var T = this;
        T.glplot.dispose();
        var L = function() {
          T.glplot.gl.isContextLost() ? requestAnimationFrame(L) : T.initializeGLPlot() ? T.plot.apply(T, T.plotArgs) : t.error("Catastrophic and unrecoverable WebGL error. Context lost.");
        };
        requestAnimationFrame(L);
      };
      var b = ["xaxis", "yaxis", "zaxis"];
      function w(T, L, A) {
        for (var I = T.fullSceneLayout, P = 0; P < 3; P++) {
          var S = b[P], E = S.charAt(0), R = I[S], z = L[E], j = L[E + "calendar"], H = L["_" + E + "length"];
          if (t.isArrayOrTypedArray(z))
            for (var Y, J = 0; J < (H || z.length); J++)
              if (t.isArrayOrTypedArray(z[J]))
                for (var W = 0; W < z[J].length; ++W)
                  Y = R.d2l(z[J][W], 0, j), !isNaN(Y) && isFinite(Y) && (A[0][P] = Math.min(A[0][P], Y), A[1][P] = Math.max(A[1][P], Y));
              else
                Y = R.d2l(z[J], 0, j), !isNaN(Y) && isFinite(Y) && (A[0][P] = Math.min(A[0][P], Y), A[1][P] = Math.max(A[1][P], Y));
          else
            A[0][P] = Math.min(A[0][P], 0), A[1][P] = Math.max(A[1][P], H - 1);
        }
      }
      f.plot = function(T, L, A) {
        if (this.plotArgs = [T, L, A], !this.glplot.contextLost) {
          var I, P, S, E, R, z, j = L[this.id], H = A[this.id];
          this.fullLayout = L, this.fullSceneLayout = j, this.axesOptions.merge(L, j), this.spikeOptions.merge(j), this.setViewport(j), this.updateFx(j.dragmode, j.hovermode), this.camera.enableWheel = this.graphDiv._context._scrollZoom.gl3d, this.glplot.setClearColor(h(j.bgcolor)), this.setConvert(R), T ? Array.isArray(T) || (T = [T]) : T = [];
          var Y = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]];
          for (S = 0; S < T.length; ++S)
            (I = T[S]).visible === !0 && I._length !== 0 && w(this, I, Y);
          (function(Te, Ee) {
            for (var Me = Te.fullSceneLayout, ze = Me.annotations || [], Ie = 0; Ie < 3; Ie++)
              for (var Oe = b[Ie], Ze = Oe.charAt(0), Fe = Me[Oe], Pe = 0; Pe < ze.length; Pe++) {
                var De = ze[Pe];
                if (De.visible) {
                  var Ge = Fe.r2l(De[Ze]);
                  !isNaN(Ge) && isFinite(Ge) && (Ee[0][Ie] = Math.min(Ee[0][Ie], Ge), Ee[1][Ie] = Math.max(Ee[1][Ie], Ge));
                }
              }
          })(this, Y);
          var J = [1, 1, 1];
          for (E = 0; E < 3; ++E)
            Y[1][E] === Y[0][E] ? J[E] = 1 : J[E] = 1 / (Y[1][E] - Y[0][E]);
          for (this.dataScale = J, this.convertAnnotations(this), S = 0; S < T.length; ++S)
            (I = T[S]).visible === !0 && I._length !== 0 && ((P = this.traces[I.uid]) ? P.data.type === I.type ? P.update(I) : (P.dispose(), P = I._module.plot(this, I), this.traces[I.uid] = P) : (P = I._module.plot(this, I), this.traces[I.uid] = P), P.name = I.name);
          var W = Object.keys(this.traces);
          e:
            for (S = 0; S < W.length; ++S) {
              for (E = 0; E < T.length; ++E)
                if (T[E].uid === W[S] && T[E].visible === !0 && T[E]._length !== 0)
                  continue e;
              (P = this.traces[W[S]]).dispose(), delete this.traces[W[S]];
            }
          this.glplot.objects.sort(function(Te, Ee) {
            return Te._trace.data.index - Ee._trace.data.index;
          });
          var Z, re = [[0, 0, 0], [0, 0, 0]], V = [], B = {};
          for (S = 0; S < 3; ++S) {
            if ((z = (R = j[b[S]]).type) in B ? (B[z].acc *= J[S], B[z].count += 1) : B[z] = { acc: J[S], count: 1 }, R.autorange) {
              re[0][S] = 1 / 0, re[1][S] = -1 / 0;
              var U = this.glplot.objects, ee = this.fullSceneLayout.annotations || [], N = R._name.charAt(0);
              for (E = 0; E < U.length; E++) {
                var K = U[E], X = K.bounds, te = K._trace.data._pad || 0;
                K.constructor.name === "ErrorBars" && R._lowerLogErrorBound ? re[0][S] = Math.min(re[0][S], R._lowerLogErrorBound) : re[0][S] = Math.min(re[0][S], X[0][S] / J[S] - te), re[1][S] = Math.max(re[1][S], X[1][S] / J[S] + te);
              }
              for (E = 0; E < ee.length; E++) {
                var ie = ee[E];
                if (ie.visible) {
                  var le = R.r2l(ie[N]);
                  re[0][S] = Math.min(re[0][S], le), re[1][S] = Math.max(re[1][S], le);
                }
              }
              if ("rangemode" in R && R.rangemode === "tozero" && (re[0][S] = Math.min(re[0][S], 0), re[1][S] = Math.max(re[1][S], 0)), re[0][S] > re[1][S])
                re[0][S] = -1, re[1][S] = 1;
              else {
                var oe = re[1][S] - re[0][S];
                re[0][S] -= oe / 32, re[1][S] += oe / 32;
              }
              if (R.autorange === "reversed") {
                var ve = re[0][S];
                re[0][S] = re[1][S], re[1][S] = ve;
              }
            } else {
              var ue = R.range;
              re[0][S] = R.r2l(ue[0]), re[1][S] = R.r2l(ue[1]);
            }
            re[0][S] === re[1][S] && (re[0][S] -= 1, re[1][S] += 1), V[S] = re[1][S] - re[0][S], this.glplot.setBounds(S, { min: re[0][S] * J[S], max: re[1][S] * J[S] });
          }
          var ye = j.aspectmode;
          if (ye === "cube")
            Z = [1, 1, 1];
          else if (ye === "manual") {
            var Ae = j.aspectratio;
            Z = [Ae.x, Ae.y, Ae.z];
          } else {
            if (ye !== "auto" && ye !== "data")
              throw new Error("scene.js aspectRatio was not one of the enumerated types");
            var pe = [1, 1, 1];
            for (S = 0; S < 3; ++S) {
              var ge = B[z = (R = j[b[S]]).type];
              pe[S] = Math.pow(ge.acc, 1 / ge.count) / J[S];
            }
            Z = ye === "data" || Math.max.apply(null, pe) / Math.min.apply(null, pe) <= 4 ? pe : [1, 1, 1];
          }
          j.aspectratio.x = H.aspectratio.x = Z[0], j.aspectratio.y = H.aspectratio.y = Z[1], j.aspectratio.z = H.aspectratio.z = Z[2], this.glplot.setAspectratio(j.aspectratio), this.viewInitial.aspectratio || (this.viewInitial.aspectratio = { x: j.aspectratio.x, y: j.aspectratio.y, z: j.aspectratio.z }), this.viewInitial.aspectmode || (this.viewInitial.aspectmode = j.aspectmode);
          var we = j.domain || null, se = L._size || null;
          if (we && se) {
            var de = this.container.style;
            de.position = "absolute", de.left = se.l + we.x[0] * se.w + "px", de.top = se.t + (1 - we.y[1]) * se.h + "px", de.width = se.w * (we.x[1] - we.x[0]) + "px", de.height = se.h * (we.y[1] - we.y[0]) + "px";
          }
          this.glplot.redraw();
        }
      }, f.destroy = function() {
        this.glplot && (this.camera.mouseListener.enabled = !1, this.container.removeEventListener("wheel", this.camera.wheelListener), this.camera = null, this.glplot.dispose(), this.container.parentNode.removeChild(this.container), this.glplot = null);
      }, f.getCamera = function() {
        var T;
        return this.camera.view.recalcMatrix(this.camera.view.lastT()), { up: { x: (T = this.camera).up[0], y: T.up[1], z: T.up[2] }, center: { x: T.center[0], y: T.center[1], z: T.center[2] }, eye: { x: T.eye[0], y: T.eye[1], z: T.eye[2] }, projection: { type: T._ortho === !0 ? "orthographic" : "perspective" } };
      }, f.setViewport = function(T) {
        var L, A = T.camera;
        this.camera.lookAt.apply(this, [[(L = A).eye.x, L.eye.y, L.eye.z], [L.center.x, L.center.y, L.center.z], [L.up.x, L.up.y, L.up.z]]), this.glplot.setAspectratio(T.aspectratio), A.projection.type === "orthographic" !== this.camera._ortho && (this.glplot.redraw(), this.glplot.clearRGBA(), this.glplot.dispose(), this.initializeGLPlot());
      }, f.isCameraChanged = function(T) {
        var L = this.getCamera(), A = t.nestedProperty(T, this.id + ".camera").get();
        function I(R, z, j, H) {
          var Y = ["up", "center", "eye"], J = ["x", "y", "z"];
          return z[Y[j]] && R[Y[j]][J[H]] === z[Y[j]][J[H]];
        }
        var P = !1;
        if (A === void 0)
          P = !0;
        else {
          for (var S = 0; S < 3; S++)
            for (var E = 0; E < 3; E++)
              if (!I(L, A, S, E)) {
                P = !0;
                break;
              }
          (!A.projection || L.projection && L.projection.type !== A.projection.type) && (P = !0);
        }
        return P;
      }, f.isAspectChanged = function(T) {
        var L = this.glplot.getAspectratio(), A = t.nestedProperty(T, this.id + ".aspectratio").get();
        return A === void 0 || A.x !== L.x || A.y !== L.y || A.z !== L.z;
      }, f.saveLayout = function(T) {
        var L, A, I, P, S, E, R = this.fullLayout, z = this.isCameraChanged(T), j = this.isAspectChanged(T), H = z || j;
        if (H) {
          var Y = {};
          z && (L = this.getCamera(), I = (A = t.nestedProperty(T, this.id + ".camera")).get(), Y[this.id + ".camera"] = I), j && (P = this.glplot.getAspectratio(), E = (S = t.nestedProperty(T, this.id + ".aspectratio")).get(), Y[this.id + ".aspectratio"] = E), s.call("_storeDirectGUIEdit", T, R._preGUI, Y), z && (A.set(L), t.nestedProperty(R, this.id + ".camera").set(L)), j && (S.set(P), t.nestedProperty(R, this.id + ".aspectratio").set(P), this.glplot.redraw());
        }
        return H;
      }, f.updateFx = function(T, L) {
        var A = this.camera;
        if (A)
          if (T === "orbit")
            A.mode = "orbit", A.keyBindingMode = "rotate";
          else if (T === "turntable") {
            A.up = [0, 0, 1], A.mode = "turntable", A.keyBindingMode = "rotate";
            var I = this.graphDiv, P = I._fullLayout, S = this.fullSceneLayout.camera, E = S.up.x, R = S.up.y, z = S.up.z;
            if (z / Math.sqrt(E * E + R * R + z * z) < 0.999) {
              var j = this.id + ".camera.up", H = { x: 0, y: 0, z: 1 }, Y = {};
              Y[j] = H;
              var J = I.layout;
              s.call("_storeDirectGUIEdit", J, P._preGUI, Y), S.up = H, t.nestedProperty(J, j).set(H);
            }
          } else
            A.keyBindingMode = T;
        this.fullSceneLayout.hovermode = L;
      }, f.toImage = function(T) {
        T || (T = "png"), this.staticMode && this.container.appendChild(m), this.glplot.redraw();
        var L = this.glplot.gl, A = L.drawingBufferWidth, I = L.drawingBufferHeight;
        L.bindFramebuffer(L.FRAMEBUFFER, null);
        var P = new Uint8Array(A * I * 4);
        L.readPixels(0, 0, A, I, L.RGBA, L.UNSIGNED_BYTE, P), function(j, H, Y) {
          for (var J = 0, W = Y - 1; J < W; ++J, --W)
            for (var Z = 0; Z < H; ++Z)
              for (var re = 0; re < 4; ++re) {
                var V = 4 * (H * J + Z) + re, B = 4 * (H * W + Z) + re, U = j[V];
                j[V] = j[B], j[B] = U;
              }
        }(P, A, I), function(j, H, Y) {
          for (var J = 0; J < Y; ++J)
            for (var W = 0; W < H; ++W) {
              var Z = 4 * (H * J + W), re = j[Z + 3];
              if (re > 0)
                for (var V = 255 / re, B = 0; B < 3; ++B)
                  j[Z + B] = Math.min(V * j[Z + B], 255);
            }
        }(P, A, I);
        var S = document.createElement("canvas");
        S.width = A, S.height = I;
        var E, R = S.getContext("2d", { willReadFrequently: !0 }), z = R.createImageData(A, I);
        switch (z.data.set(P), R.putImageData(z, 0, 0), T) {
          case "jpeg":
            E = S.toDataURL("image/jpeg");
            break;
          case "webp":
            E = S.toDataURL("image/webp");
            break;
          default:
            E = S.toDataURL("image/png");
        }
        return this.staticMode && this.container.removeChild(m), E;
      }, f.setConvert = function() {
        for (var T = 0; T < 3; T++) {
          var L = this.fullSceneLayout[b[T]];
          u.setConvert(L, this.fullLayout), L.setScale = t.noop;
        }
      }, f.make4thDimension = function() {
        var T = this.graphDiv._fullLayout;
        this._mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, u.setConvert(this._mockAxis, T);
      }, Q.exports = y;
    }, { "../../../stackgl_modules": 1133, "../../components/fx": 407, "../../lib": 515, "../../lib/show_no_webgl_msg": 537, "../../lib/str2rgbarray": 540, "../../plots/cartesian/axes": 566, "../../registry": 647, "./layout/convert": 611, "./layout/spikes": 614, "./layout/tick_marks": 615, "./project": 616, "has-passive-events": 229, "webgl-context": 332 }], 618: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        x = x || m.length;
        for (var e = new Array(x), r = 0; r < x; r++)
          e[r] = [m[r], g[r], k[r]];
        return e;
      };
    }, {}], 619: [function(v, Q, $) {
      var m = v("./font_attributes"), g = v("./animation_attributes"), k = v("../components/color/attributes"), x = v("../components/shapes/draw_newshape/attributes"), e = v("../components/selections/draw_newselection/attributes"), r = v("./pad_attributes"), n = v("../lib/extend").extendFlat, s = m({ editType: "calc" });
      s.family.dflt = '"Open Sans", verdana, arial, sans-serif', s.size.dflt = 12, s.color.dflt = k.defaultLine, Q.exports = { font: s, title: { text: { valType: "string", editType: "layoutstyle" }, font: m({ editType: "layoutstyle" }), xref: { valType: "enumerated", dflt: "container", values: ["container", "paper"], editType: "layoutstyle" }, yref: { valType: "enumerated", dflt: "container", values: ["container", "paper"], editType: "layoutstyle" }, x: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "layoutstyle" }, y: { valType: "number", min: 0, max: 1, dflt: "auto", editType: "layoutstyle" }, xanchor: { valType: "enumerated", dflt: "auto", values: ["auto", "left", "center", "right"], editType: "layoutstyle" }, yanchor: { valType: "enumerated", dflt: "auto", values: ["auto", "top", "middle", "bottom"], editType: "layoutstyle" }, pad: n(r({ editType: "layoutstyle" }), {}), editType: "layoutstyle" }, uniformtext: { mode: { valType: "enumerated", values: [!1, "hide", "show"], dflt: !1, editType: "plot" }, minsize: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "plot" }, autosize: { valType: "boolean", dflt: !1, editType: "none" }, width: { valType: "number", min: 10, dflt: 700, editType: "plot" }, height: { valType: "number", min: 10, dflt: 450, editType: "plot" }, minreducedwidth: { valType: "number", min: 2, dflt: 64, editType: "plot" }, minreducedheight: { valType: "number", min: 2, dflt: 64, editType: "plot" }, margin: { l: { valType: "number", min: 0, dflt: 80, editType: "plot" }, r: { valType: "number", min: 0, dflt: 80, editType: "plot" }, t: { valType: "number", min: 0, dflt: 100, editType: "plot" }, b: { valType: "number", min: 0, dflt: 80, editType: "plot" }, pad: { valType: "number", min: 0, dflt: 0, editType: "plot" }, autoexpand: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, computed: { valType: "any", editType: "none" }, paper_bgcolor: { valType: "color", dflt: k.background, editType: "plot" }, plot_bgcolor: { valType: "color", dflt: k.background, editType: "layoutstyle" }, autotypenumbers: { valType: "enumerated", values: ["convert types", "strict"], dflt: "convert types", editType: "calc" }, separators: { valType: "string", editType: "plot" }, hidesources: { valType: "boolean", dflt: !1, editType: "plot" }, showlegend: { valType: "boolean", editType: "legend" }, colorway: { valType: "colorlist", dflt: k.defaults, editType: "calc" }, datarevision: { valType: "any", editType: "calc" }, uirevision: { valType: "any", editType: "none" }, editrevision: { valType: "any", editType: "none" }, selectionrevision: { valType: "any", editType: "none" }, template: { valType: "any", editType: "calc" }, newshape: x.newshape, activeshape: x.activeshape, newselection: e.newselection, activeselection: e.activeselection, meta: { valType: "any", arrayOk: !0, editType: "plot" }, transition: n({}, g.transition, { editType: "none" }), _deprecated: { title: { valType: "string", editType: "layoutstyle" }, titlefont: m({ editType: "layoutstyle" }) } };
    }, { "../components/color/attributes": 366, "../components/selections/draw_newselection/attributes": 451, "../components/shapes/draw_newshape/attributes": 463, "../lib/extend": 505, "./animation_attributes": 560, "./font_attributes": 594, "./pad_attributes": 627 }], 620: [function(v, Q, $) {
      var m = v("../../lib/sort_object_keys"), g = '\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', k = ['\xA9 <a target="_blank" href="https://carto.com/">Carto</a>', g].join(" "), x = ['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>', 'under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>', "|", 'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors', 'under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "), e = { "open-street-map": { id: "osm", version: 8, sources: { "plotly-osm-tiles": { type: "raster", attribution: g, tiles: ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-osm-tiles", type: "raster", source: "plotly-osm-tiles", minzoom: 0, maxzoom: 22 }] }, "white-bg": { id: "white-bg", version: 8, sources: {}, layers: [{ id: "white-bg", type: "background", paint: { "background-color": "#FFFFFF" }, minzoom: 0, maxzoom: 22 }] }, "carto-positron": { id: "carto-positron", version: 8, sources: { "plotly-carto-positron": { type: "raster", attribution: k, tiles: ["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-carto-positron", type: "raster", source: "plotly-carto-positron", minzoom: 0, maxzoom: 22 }] }, "carto-darkmatter": { id: "carto-darkmatter", version: 8, sources: { "plotly-carto-darkmatter": { type: "raster", attribution: k, tiles: ["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-carto-darkmatter", type: "raster", source: "plotly-carto-darkmatter", minzoom: 0, maxzoom: 22 }] }, "stamen-terrain": { id: "stamen-terrain", version: 8, sources: { "plotly-stamen-terrain": { type: "raster", attribution: x, tiles: ["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-stamen-terrain", type: "raster", source: "plotly-stamen-terrain", minzoom: 0, maxzoom: 22 }] }, "stamen-toner": { id: "stamen-toner", version: 8, sources: { "plotly-stamen-toner": { type: "raster", attribution: x, tiles: ["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-stamen-toner", type: "raster", source: "plotly-stamen-toner", minzoom: 0, maxzoom: 22 }] }, "stamen-watercolor": { id: "stamen-watercolor", version: 8, sources: { "plotly-stamen-watercolor": { type: "raster", attribution: ['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>', 'under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>', "|", 'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors', 'under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "), tiles: ["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-stamen-watercolor", type: "raster", source: "plotly-stamen-watercolor", minzoom: 0, maxzoom: 22 }] } }, r = m(e);
      Q.exports = { requiredVersion: "1.10.1", styleUrlPrefix: "mapbox://styles/mapbox/", styleUrlSuffix: "v9", styleValuesMapbox: ["basic", "streets", "outdoors", "light", "dark", "satellite", "satellite-streets"], styleValueDflt: "basic", stylesNonMapbox: e, styleValuesNonMapbox: r, traceLayerPrefix: "plotly-trace-layer-", layoutLayerPrefix: "plotly-layout-layer-", wrongVersionErrorMsg: ["Your custom plotly.js bundle is not using the correct mapbox-gl version", "Please install mapbox-gl@1.10.1."].join(`
`), noAccessTokenErrorMsg: ["Missing Mapbox access token.", "Mapbox trace type require a Mapbox access token to be registered.", "For example:", "  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });", "More info here: https://www.mapbox.com/help/define-access-token/"].join(`
`), missingStyleErrorMsg: ["No valid mapbox style found, please set `mapbox.style` to one of:", r.join(", "), "or register a Mapbox access token to use a Mapbox-served style."].join(`
`), multipleTokensErrorMsg: ["Set multiple mapbox access token across different mapbox subplot,", "using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(`
`), mapOnErrorMsg: "Mapbox error.", mapboxLogo: { path0: "m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z", path1: "M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z", path2: "M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z", polygon: "11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34" }, styleRules: { map: "overflow:hidden;position:relative;", "missing-css": "display:none;", canary: "background-color:salmon;", "ctrl-bottom-left": "position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;", "ctrl-bottom-right": "position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;", ctrl: "clear: both; pointer-events: auto; transform: translate(0, 0);", "ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner": "display: none;", "ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner": "display: block; margin-top:2px", "ctrl-attrib.mapboxgl-compact:hover": "padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;", "ctrl-attrib.mapboxgl-compact::after": `content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`, "ctrl-attrib.mapboxgl-compact": "min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;", "ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after": "bottom: 0; right: 0", "ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after": "bottom: 0; left: 0", "ctrl-bottom-left .mapboxgl-ctrl": "margin: 0 0 10px 10px; float: left;", "ctrl-bottom-right .mapboxgl-ctrl": "margin: 0 10px 10px 0; float: right;", "ctrl-attrib": "color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px", "ctrl-attrib a": "color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px", "ctrl-attrib a:hover": "color: inherit; text-decoration: underline;", "ctrl-attrib .mapbox-improve-map": "font-weight: bold; margin-left: 2px;", "attrib-empty": "display: none;", "ctrl-logo": `display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')` } };
    }, { "../../lib/sort_object_keys": 538 }], 621: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        var x = g.split(" "), e = x[0], r = x[1], n = m.isArrayOrTypedArray(k) ? m.mean(k) : k, s = 0.5 + n / 100, t = 1.5 + n / 100, d = ["", ""], u = [0, 0];
        switch (e) {
          case "top":
            d[0] = "top", u[1] = -t;
            break;
          case "bottom":
            d[0] = "bottom", u[1] = t;
        }
        switch (r) {
          case "left":
            d[1] = "right", u[0] = -s;
            break;
          case "right":
            d[1] = "left", u[0] = s;
        }
        return { anchor: d[0] && d[1] ? d.join("-") : d[0] ? d[0] : d[1] ? d[1] : "center", offset: u };
      };
    }, { "../../lib": 515 }], 622: [function(v, Q, $) {
      var m = v("mapbox-gl/dist/mapbox-gl-unminified"), g = v("../../lib"), k = g.strTranslate, x = g.strScale, e = v("../../plots/get_data").getSubplotCalcData, r = v("../../constants/xmlns_namespaces"), n = v("@plotly/d3"), s = v("../../components/drawing"), t = v("../../lib/svg_text_utils"), d = v("./mapbox"), u = $.constants = v("./constants");
      function o(h) {
        return typeof h == "string" && (u.styleValuesMapbox.indexOf(h) !== -1 || h.indexOf("mapbox://") === 0);
      }
      $.name = "mapbox", $.attr = "subplot", $.idRoot = "mapbox", $.idRegex = $.attrRegex = g.counterRegex("mapbox"), $.attributes = { subplot: { valType: "subplotid", dflt: "mapbox", editType: "calc" } }, $.layoutAttributes = v("./layout_attributes"), $.supplyLayoutDefaults = v("./layout_defaults"), $.plot = function(h) {
        var l = h._fullLayout, i = h.calcdata, p = l._subplots.mapbox;
        if (m.version !== u.requiredVersion)
          throw new Error(u.wrongVersionErrorMsg);
        var c = function(w, T) {
          var L = w._fullLayout;
          if (w._context.mapboxAccessToken === "")
            return "";
          for (var A = [], I = [], P = !1, S = !1, E = 0; E < T.length; E++) {
            var R = L[T[E]], z = R.accesstoken;
            o(R.style) && (z ? g.pushUnique(A, z) : (o(R._input.style) && (g.error("Uses Mapbox map style, but did not set an access token."), P = !0), S = !0)), z && g.pushUnique(I, z);
          }
          if (S) {
            var j = P ? u.noAccessTokenErrorMsg : u.missingStyleErrorMsg;
            throw g.error(j), new Error(j);
          }
          return A.length ? (A.length > 1 && g.warn(u.multipleTokensErrorMsg), A[0]) : (I.length && g.log(["Listed mapbox access token(s)", I.join(","), "but did not use a Mapbox map style, ignoring token(s)."].join(" ")), "");
        }(h, p);
        m.accessToken = c;
        for (var a = 0; a < p.length; a++) {
          var y = p[a], f = e(i, "mapbox", y), _ = l[y], b = _._subplot;
          b || (b = new d(h, y), l[y]._subplot = b), b.viewInitial || (b.viewInitial = { center: g.extendFlat({}, _.center), zoom: _.zoom, bearing: _.bearing, pitch: _.pitch }), b.plot(f, l, h._promises);
        }
      }, $.clean = function(h, l, i, p) {
        for (var c = p._subplots.mapbox || [], a = 0; a < c.length; a++) {
          var y = c[a];
          !l[y] && p[y]._subplot && p[y]._subplot.destroy();
        }
      }, $.toSVG = function(h) {
        for (var l = h._fullLayout, i = l._subplots.mapbox, p = l._size, c = 0; c < i.length; c++) {
          var a = l[i[c]], y = a.domain, f = a._subplot.toImage("png");
          l._glimages.append("svg:image").attr({ xmlns: r.svg, "xlink:href": f, x: p.l + p.w * y.x[0], y: p.t + p.h * (1 - y.y[1]), width: p.w * (y.x[1] - y.x[0]), height: p.h * (y.y[1] - y.y[0]), preserveAspectRatio: "none" });
          var _ = n.select(a._subplot.div);
          if (_.select(".mapboxgl-ctrl-logo").node().offsetParent !== null) {
            var b = l._glimages.append("g");
            b.attr("transform", k(p.l + p.w * y.x[0] + 10, p.t + p.h * (1 - y.y[0]) - 31)), b.append("path").attr("d", u.mapboxLogo.path0).style({ opacity: 0.9, fill: "#ffffff", "enable-background": "new" }), b.append("path").attr("d", u.mapboxLogo.path1).style("opacity", 0.35).style("enable-background", "new"), b.append("path").attr("d", u.mapboxLogo.path2).style("opacity", 0.35).style("enable-background", "new"), b.append("polygon").attr("points", u.mapboxLogo.polygon).style({ opacity: 0.9, fill: "#ffffff", "enable-background": "new" });
          }
          var w = _.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map", ""), T = l._glimages.append("g"), L = T.append("text");
          L.text(w).classed("static-attribution", !0).attr({ "font-size": 12, "font-family": "Arial", color: "rgba(0, 0, 0, 0.75)", "text-anchor": "end", "data-unformatted": w });
          var A = s.bBox(L.node()), I = p.w * (y.x[1] - y.x[0]);
          if (A.width > I / 2) {
            var P = w.split("|").join("<br>");
            L.text(P).attr("data-unformatted", P).call(t.convertToTspans, h), A = s.bBox(L.node());
          }
          L.attr("transform", k(-3, 8 - A.height)), T.insert("rect", ".static-attribution").attr({ x: -A.width - 6, y: -A.height - 3, width: A.width + 6, height: A.height + 3, fill: "rgba(255, 255, 255, 0.75)" });
          var S = 1;
          A.width + 6 > I && (S = I / (A.width + 6));
          var E = [p.l + p.w * y.x[1], p.t + p.h * (1 - y.y[0])];
          T.attr("transform", k(E[0], E[1]) + x(S));
        }
      }, $.updateFx = function(h) {
        for (var l = h._fullLayout, i = l._subplots.mapbox, p = 0; p < i.length; p++)
          l[i[p]]._subplot.updateFx(l);
      };
    }, { "../../components/drawing": 389, "../../constants/xmlns_namespaces": 492, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/get_data": 602, "./constants": 620, "./layout_attributes": 624, "./layout_defaults": 625, "./mapbox": 626, "@plotly/d3": 58, "mapbox-gl/dist/mapbox-gl-unminified": 239 }], 623: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../lib/svg_text_utils").sanitizeHTML, k = v("./convert_text_opts"), x = v("./constants");
      function e(t, d) {
        this.subplot = t, this.uid = t.uid + "-" + d, this.index = d, this.idSource = "source-" + this.uid, this.idLayer = x.layoutLayerPrefix + this.uid, this.sourceType = null, this.source = null, this.layerType = null, this.below = null, this.visible = !1;
      }
      var r = e.prototype;
      function n(t) {
        if (!t.visible)
          return !1;
        var d = t.source;
        if (Array.isArray(d) && d.length > 0) {
          for (var u = 0; u < d.length; u++)
            if (typeof d[u] != "string" || d[u].length === 0)
              return !1;
          return !0;
        }
        return m.isPlainObject(d) || typeof d == "string" && d.length > 0;
      }
      function s(t) {
        var d = {}, u = {};
        switch (t.type) {
          case "circle":
            m.extendFlat(u, { "circle-radius": t.circle.radius, "circle-color": t.color, "circle-opacity": t.opacity });
            break;
          case "line":
            m.extendFlat(u, { "line-width": t.line.width, "line-color": t.color, "line-opacity": t.opacity, "line-dasharray": t.line.dash });
            break;
          case "fill":
            m.extendFlat(u, { "fill-color": t.color, "fill-outline-color": t.fill.outlinecolor, "fill-opacity": t.opacity });
            break;
          case "symbol":
            var o = t.symbol, h = k(o.textposition, o.iconsize);
            m.extendFlat(d, { "icon-image": o.icon + "-15", "icon-size": o.iconsize / 10, "text-field": o.text, "text-size": o.textfont.size, "text-anchor": h.anchor, "text-offset": h.offset, "symbol-placement": o.placement }), m.extendFlat(u, { "icon-color": t.color, "text-color": o.textfont.color, "text-opacity": t.opacity });
            break;
          case "raster":
            m.extendFlat(u, { "raster-fade-duration": 0, "raster-opacity": t.opacity });
        }
        return { layout: d, paint: u };
      }
      r.update = function(t) {
        this.visible ? this.needsNewImage(t) ? this.updateImage(t) : this.needsNewSource(t) ? (this.removeLayer(), this.updateSource(t), this.updateLayer(t)) : this.needsNewLayer(t) ? this.updateLayer(t) : this.updateStyle(t) : (this.updateSource(t), this.updateLayer(t)), this.visible = n(t);
      }, r.needsNewImage = function(t) {
        return this.subplot.map.getSource(this.idSource) && this.sourceType === "image" && t.sourcetype === "image" && (this.source !== t.source || JSON.stringify(this.coordinates) !== JSON.stringify(t.coordinates));
      }, r.needsNewSource = function(t) {
        return this.sourceType !== t.sourcetype || JSON.stringify(this.source) !== JSON.stringify(t.source) || this.layerType !== t.type;
      }, r.needsNewLayer = function(t) {
        return this.layerType !== t.type || this.below !== this.subplot.belowLookup["layout-" + this.index];
      }, r.lookupBelow = function() {
        return this.subplot.belowLookup["layout-" + this.index];
      }, r.updateImage = function(t) {
        this.subplot.map.getSource(this.idSource).updateImage({ url: t.source, coordinates: t.coordinates });
        var d = this.findFollowingMapboxLayerId(this.lookupBelow());
        d !== null && this.subplot.map.moveLayer(this.idLayer, d);
      }, r.updateSource = function(t) {
        var d = this.subplot.map;
        if (d.getSource(this.idSource) && d.removeSource(this.idSource), this.sourceType = t.sourcetype, this.source = t.source, n(t)) {
          var u = function(o) {
            var h, l = o.sourcetype, i = o.source, p = { type: l };
            return l === "geojson" ? h = "data" : l === "vector" ? h = typeof i == "string" ? "url" : "tiles" : l === "raster" ? (h = "tiles", p.tileSize = 256) : l === "image" && (h = "url", p.coordinates = o.coordinates), p[h] = i, o.sourceattribution && (p.attribution = g(o.sourceattribution)), p;
          }(t);
          d.addSource(this.idSource, u);
        }
      }, r.findFollowingMapboxLayerId = function(t) {
        if (t === "traces")
          for (var d = this.subplot.getMapLayers(), u = 0; u < d.length; u++) {
            var o = d[u].id;
            if (typeof o == "string" && o.indexOf(x.traceLayerPrefix) === 0) {
              t = o;
              break;
            }
          }
        return t;
      }, r.updateLayer = function(t) {
        var d = this.subplot, u = s(t), o = this.lookupBelow(), h = this.findFollowingMapboxLayerId(o);
        this.removeLayer(), n(t) && d.addLayer({ id: this.idLayer, source: this.idSource, "source-layer": t.sourcelayer || "", type: t.type, minzoom: t.minzoom, maxzoom: t.maxzoom, layout: u.layout, paint: u.paint }, h), this.layerType = t.type, this.below = o;
      }, r.updateStyle = function(t) {
        if (n(t)) {
          var d = s(t);
          this.subplot.setOptions(this.idLayer, "setLayoutProperty", d.layout), this.subplot.setOptions(this.idLayer, "setPaintProperty", d.paint);
        }
      }, r.removeLayer = function() {
        var t = this.subplot.map;
        t.getLayer(this.idLayer) && t.removeLayer(this.idLayer);
      }, r.dispose = function() {
        var t = this.subplot.map;
        t.getLayer(this.idLayer) && t.removeLayer(this.idLayer), t.getSource(this.idSource) && t.removeSource(this.idSource);
      }, Q.exports = function(t, d, u) {
        var o = new e(t, d);
        return o.update(u), o;
      };
    }, { "../../lib": 515, "../../lib/svg_text_utils": 541, "./constants": 620, "./convert_text_opts": 621 }], 624: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color").defaultLine, k = v("../domain").attributes, x = v("../font_attributes"), e = v("../../traces/scatter/attributes").textposition, r = v("../../plot_api/edit_types").overrideAll, n = v("../../plot_api/plot_template").templatedArray, s = v("./constants"), t = x({});
      t.family.dflt = "Open Sans Regular, Arial Unicode MS Regular", (Q.exports = r({ _arrayAttrRegexps: [m.counterRegex("mapbox", ".layers", !0)], domain: k({ name: "mapbox" }), accesstoken: { valType: "string", noBlank: !0, strict: !0 }, style: { valType: "any", values: s.styleValuesMapbox.concat(s.styleValuesNonMapbox), dflt: s.styleValueDflt }, center: { lon: { valType: "number", dflt: 0 }, lat: { valType: "number", dflt: 0 } }, zoom: { valType: "number", dflt: 1 }, bearing: { valType: "number", dflt: 0 }, pitch: { valType: "number", dflt: 0 }, bounds: { west: { valType: "number" }, east: { valType: "number" }, south: { valType: "number" }, north: { valType: "number" } }, layers: n("layer", { visible: { valType: "boolean", dflt: !0 }, sourcetype: { valType: "enumerated", values: ["geojson", "vector", "raster", "image"], dflt: "geojson" }, source: { valType: "any" }, sourcelayer: { valType: "string", dflt: "" }, sourceattribution: { valType: "string" }, type: { valType: "enumerated", values: ["circle", "line", "fill", "symbol", "raster"], dflt: "circle" }, coordinates: { valType: "any" }, below: { valType: "string" }, color: { valType: "color", dflt: g }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, minzoom: { valType: "number", min: 0, max: 24, dflt: 0 }, maxzoom: { valType: "number", min: 0, max: 24, dflt: 24 }, circle: { radius: { valType: "number", dflt: 15 } }, line: { width: { valType: "number", dflt: 2 }, dash: { valType: "data_array" } }, fill: { outlinecolor: { valType: "color", dflt: g } }, symbol: { icon: { valType: "string", dflt: "marker" }, iconsize: { valType: "number", dflt: 10 }, text: { valType: "string", dflt: "" }, placement: { valType: "enumerated", values: ["point", "line", "line-center"], dflt: "point" }, textfont: t, textposition: m.extendFlat({}, e, { arrayOk: !1 }) } }) }, "plot", "from-root")).uirevision = { valType: "any", editType: "none" };
    }, { "../../components/color": 367, "../../lib": 515, "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../../traces/scatter/attributes": 936, "../domain": 593, "../font_attributes": 594, "./constants": 620 }], 625: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../subplot_defaults"), k = v("../array_container_defaults"), x = v("./layout_attributes");
      function e(n, s, t, d) {
        t("accesstoken", d.accessToken), t("style"), t("center.lon"), t("center.lat"), t("zoom"), t("bearing"), t("pitch");
        var u = t("bounds.west"), o = t("bounds.east"), h = t("bounds.south"), l = t("bounds.north");
        u !== void 0 && o !== void 0 && h !== void 0 && l !== void 0 || delete s.bounds, k(n, s, { name: "layers", handleItemDefaults: r }), s._input = n;
      }
      function r(n, s) {
        function t(l, i) {
          return m.coerce(n, s, x.layers, l, i);
        }
        if (t("visible")) {
          var d, u = t("sourcetype"), o = u === "raster" || u === "image";
          t("source"), t("sourceattribution"), u === "vector" && t("sourcelayer"), u === "image" && t("coordinates"), o && (d = "raster");
          var h = t("type", d);
          o && h !== "raster" && (h = s.type = "raster", m.log("Source types *raster* and *image* must drawn *raster* layer type.")), t("below"), t("color"), t("opacity"), t("minzoom"), t("maxzoom"), h === "circle" && t("circle.radius"), h === "line" && (t("line.width"), t("line.dash")), h === "fill" && t("fill.outlinecolor"), h === "symbol" && (t("symbol.icon"), t("symbol.iconsize"), t("symbol.text"), m.coerceFont(t, "symbol.textfont"), t("symbol.textposition"), t("symbol.placement"));
        }
      }
      Q.exports = function(n, s, t) {
        g(n, s, t, { type: "mapbox", attributes: x, handleDefaults: e, partition: "y", accessToken: s._mapboxAccessToken });
      };
    }, { "../../lib": 515, "../array_container_defaults": 561, "../subplot_defaults": 641, "./layout_attributes": 624 }], 626: [function(v, Q, $) {
      var m = v("mapbox-gl/dist/mapbox-gl-unminified"), g = v("../../lib"), k = v("../../lib/geo_location_utils"), x = v("../../registry"), e = v("../cartesian/axes"), r = v("../../components/dragelement"), n = v("../../components/fx"), s = v("../../components/dragelement/helpers"), t = s.drawMode, d = s.selectMode, u = v("../../components/selections").prepSelect, o = v("../../components/selections").clearOutline, h = v("../../components/selections").clearSelectionsCache, l = v("../../components/selections").selectOnClick, i = v("./constants"), p = v("./layers");
      function c(w, T) {
        this.id = T, this.gd = w;
        var L = w._fullLayout, A = w._context;
        this.container = L._glcontainer.node(), this.isStatic = A.staticPlot, this.uid = L._uid + "-" + this.id, this.div = null, this.xaxis = null, this.yaxis = null, this.createFramework(L), this.map = null, this.accessToken = null, this.styleObj = null, this.traceHash = {}, this.layerList = [], this.belowLookup = {}, this.dragging = !1, this.wheeling = !1;
      }
      var a = c.prototype;
      a.plot = function(w, T, L) {
        var A, I = this, P = T[I.id];
        I.map && P.accesstoken !== I.accessToken && (I.map.remove(), I.map = null, I.styleObj = null, I.traceHash = {}, I.layerList = []), A = I.map ? new Promise(function(S, E) {
          I.updateMap(w, T, S, E);
        }) : new Promise(function(S, E) {
          I.createMap(w, T, S, E);
        }), L.push(A);
      }, a.createMap = function(w, T, L, A) {
        var I = this, P = T[I.id], S = I.styleObj = f(P.style);
        I.accessToken = P.accesstoken;
        var E = P.bounds, R = E ? [[E.west, E.south], [E.east, E.north]] : null, z = I.map = new m.Map({ container: I.div, style: S.style, center: b(P.center), zoom: P.zoom, bearing: P.bearing, pitch: P.pitch, maxBounds: R, interactive: !I.isStatic, preserveDrawingBuffer: I.isStatic, doubleClickZoom: !1, boxZoom: !1, attributionControl: !1 }).addControl(new m.AttributionControl({ compact: !0 }));
        z._canvas.style.left = "0px", z._canvas.style.top = "0px", I.rejectOnError(A), I.isStatic || I.initFx(w, T);
        var j = [];
        j.push(new Promise(function(H) {
          z.once("load", H);
        })), j = j.concat(k.fetchTraceGeoData(w)), Promise.all(j).then(function() {
          I.fillBelowLookup(w, T), I.updateData(w), I.updateLayout(T), I.resolveOnRender(L);
        }).catch(A);
      }, a.updateMap = function(w, T, L, A) {
        var I = this, P = I.map, S = T[this.id];
        I.rejectOnError(A);
        var E = [], R = f(S.style);
        JSON.stringify(I.styleObj) !== JSON.stringify(R) && (I.styleObj = R, P.setStyle(R.style), I.traceHash = {}, E.push(new Promise(function(z) {
          P.once("styledata", z);
        }))), E = E.concat(k.fetchTraceGeoData(w)), Promise.all(E).then(function() {
          I.fillBelowLookup(w, T), I.updateData(w), I.updateLayout(T), I.resolveOnRender(L);
        }).catch(A);
      }, a.fillBelowLookup = function(w, T) {
        var L, A, I = T[this.id].layers, P = this.belowLookup = {}, S = !1;
        for (L = 0; L < w.length; L++) {
          var E = w[L][0].trace, R = E._module;
          typeof E.below == "string" ? A = E.below : R.getBelow && (A = R.getBelow(E, this)), A === "" && (S = !0), P["trace-" + E.uid] = A || "";
        }
        for (L = 0; L < I.length; L++) {
          var z = I[L];
          A = typeof z.below == "string" ? z.below : S ? "traces" : "", P["layout-" + L] = A;
        }
        var j, H, Y = {};
        for (j in P)
          Y[A = P[j]] ? Y[A].push(j) : Y[A] = [j];
        for (A in Y) {
          var J = Y[A];
          if (J.length > 1)
            for (L = 0; L < J.length; L++)
              (j = J[L]).indexOf("trace-") === 0 ? (H = j.split("trace-")[1], this.traceHash[H] && (this.traceHash[H].below = null)) : j.indexOf("layout-") === 0 && (H = j.split("layout-")[1], this.layerList[H] && (this.layerList[H].below = null));
        }
      };
      var y = { choroplethmapbox: 0, densitymapbox: 1, scattermapbox: 2 };
      function f(w) {
        var T = {};
        return g.isPlainObject(w) ? (T.id = w.id, T.style = w) : typeof w == "string" ? (T.id = w, i.styleValuesMapbox.indexOf(w) !== -1 ? T.style = _(w) : i.stylesNonMapbox[w] ? T.style = i.stylesNonMapbox[w] : T.style = w) : (T.id = i.styleValueDflt, T.style = _(i.styleValueDflt)), T.transition = { duration: 0, delay: 0 }, T;
      }
      function _(w) {
        return i.styleUrlPrefix + w + "-" + i.styleUrlSuffix;
      }
      function b(w) {
        return [w.lon, w.lat];
      }
      a.updateData = function(w) {
        var T, L, A, I, P = this.traceHash, S = w.slice().sort(function(H, Y) {
          return y[H[0].trace.type] - y[Y[0].trace.type];
        });
        for (A = 0; A < S.length; A++) {
          var E = S[A], R = !1;
          (T = P[(L = E[0].trace).uid]) && (T.type === L.type ? (T.update(E), R = !0) : T.dispose()), !R && L._module && (P[L.uid] = L._module.plot(this, E));
        }
        var z = Object.keys(P);
        e:
          for (A = 0; A < z.length; A++) {
            var j = z[A];
            for (I = 0; I < w.length; I++)
              if (j === (L = w[I][0].trace).uid)
                continue e;
            (T = P[j]).dispose(), delete P[j];
          }
      }, a.updateLayout = function(w) {
        var T = this.map, L = w[this.id];
        this.dragging || this.wheeling || (T.setCenter(b(L.center)), T.setZoom(L.zoom), T.setBearing(L.bearing), T.setPitch(L.pitch)), this.updateLayers(w), this.updateFramework(w), this.updateFx(w), this.map.resize(), this.gd._context._scrollZoom.mapbox ? T.scrollZoom.enable() : T.scrollZoom.disable();
      }, a.resolveOnRender = function(w) {
        var T = this.map;
        T.on("render", function L() {
          T.loaded() && (T.off("render", L), setTimeout(w, 10));
        });
      }, a.rejectOnError = function(w) {
        var T = this.map;
        function L() {
          w(new Error(i.mapOnErrorMsg));
        }
        T.once("error", L), T.once("style.error", L), T.once("source.error", L), T.once("tile.error", L), T.once("layer.error", L);
      }, a.createFramework = function(w) {
        var T = this, L = T.div = document.createElement("div");
        L.id = T.uid, L.style.position = "absolute", T.container.appendChild(L), T.xaxis = { _id: "x", c2p: function(A) {
          return T.project(A).x;
        } }, T.yaxis = { _id: "y", c2p: function(A) {
          return T.project(A).y;
        } }, T.updateFramework(w), T.mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, e.setConvert(T.mockAxis, w);
      }, a.initFx = function(w, T) {
        var L = this, A = L.gd, I = L.map;
        function P() {
          n.loneUnhover(T._hoverlayer);
        }
        function S() {
          var E = L.getView();
          A.emit("plotly_relayouting", L.getViewEditsWithDerived(E));
        }
        I.on("moveend", function(E) {
          if (L.map) {
            var R = A._fullLayout;
            if (E.originalEvent || L.wheeling) {
              var z = R[L.id];
              x.call("_storeDirectGUIEdit", A.layout, R._preGUI, L.getViewEdits(z));
              var j = L.getView();
              z._input.center = z.center = j.center, z._input.zoom = z.zoom = j.zoom, z._input.bearing = z.bearing = j.bearing, z._input.pitch = z.pitch = j.pitch, A.emit("plotly_relayout", L.getViewEditsWithDerived(j));
            }
            E.originalEvent && E.originalEvent.type === "mouseup" ? L.dragging = !1 : L.wheeling && (L.wheeling = !1), R._rehover && R._rehover();
          }
        }), I.on("wheel", function() {
          L.wheeling = !0;
        }), I.on("mousemove", function(E) {
          var R = L.div.getBoundingClientRect(), z = [E.originalEvent.offsetX, E.originalEvent.offsetY];
          E.target.getBoundingClientRect = function() {
            return R;
          }, L.xaxis.p2c = function() {
            return I.unproject(z).lng;
          }, L.yaxis.p2c = function() {
            return I.unproject(z).lat;
          }, A._fullLayout._rehover = function() {
            A._fullLayout._hoversubplot === L.id && A._fullLayout[L.id] && n.hover(A, E, L.id);
          }, n.hover(A, E, L.id), A._fullLayout._hoversubplot = L.id;
        }), I.on("dragstart", function() {
          L.dragging = !0, P();
        }), I.on("zoomstart", P), I.on("mouseout", function() {
          A._fullLayout._hoversubplot = null;
        }), I.on("drag", S), I.on("zoom", S), I.on("dblclick", function() {
          var E = A._fullLayout[L.id];
          x.call("_storeDirectGUIEdit", A.layout, A._fullLayout._preGUI, L.getViewEdits(E));
          var R = L.viewInitial;
          I.setCenter(b(R.center)), I.setZoom(R.zoom), I.setBearing(R.bearing), I.setPitch(R.pitch);
          var z = L.getView();
          E._input.center = E.center = z.center, E._input.zoom = E.zoom = z.zoom, E._input.bearing = E.bearing = z.bearing, E._input.pitch = E.pitch = z.pitch, A.emit("plotly_doubleclick", null), A.emit("plotly_relayout", L.getViewEditsWithDerived(z));
        }), L.clearOutline = function() {
          h(L.dragOptions), o(L.dragOptions.gd);
        }, L.onClickInPanFn = function(E) {
          return function(R) {
            var z = A._fullLayout.clickmode;
            z.indexOf("select") > -1 && l(R.originalEvent, A, [L.xaxis], [L.yaxis], L.id, E), z.indexOf("event") > -1 && n.click(A, R.originalEvent);
          };
        };
      }, a.updateFx = function(w) {
        var T = this, L = T.map, A = T.gd;
        if (!T.isStatic) {
          var I, P = w.dragmode;
          I = function(R, z) {
            z.isRect ? (R.range = {})[T.id] = [E([z.xmin, z.ymin]), E([z.xmax, z.ymax])] : (R.lassoPoints = {})[T.id] = z.map(E);
          };
          var S = T.dragOptions;
          T.dragOptions = g.extendDeep(S || {}, { dragmode: w.dragmode, element: T.div, gd: A, plotinfo: { id: T.id, domain: w[T.id].domain, xaxis: T.xaxis, yaxis: T.yaxis, fillRangeItems: I }, xaxes: [T.xaxis], yaxes: [T.yaxis], subplot: T.id }), L.off("click", T.onClickInPanHandler), d(P) || t(P) ? (L.dragPan.disable(), L.on("zoomstart", T.clearOutline), T.dragOptions.prepFn = function(R, z, j) {
            u(R, z, j, T.dragOptions, P);
          }, r.init(T.dragOptions)) : (L.dragPan.enable(), L.off("zoomstart", T.clearOutline), T.div.onmousedown = null, T.div.ontouchstart = null, T.div.removeEventListener("touchstart", T.div._ontouchstart), T.onClickInPanHandler = T.onClickInPanFn(T.dragOptions), L.on("click", T.onClickInPanHandler));
        }
        function E(R) {
          var z = T.map.unproject(R);
          return [z.lng, z.lat];
        }
      }, a.updateFramework = function(w) {
        var T = w[this.id].domain, L = w._size, A = this.div.style;
        A.width = L.w * (T.x[1] - T.x[0]) + "px", A.height = L.h * (T.y[1] - T.y[0]) + "px", A.left = L.l + T.x[0] * L.w + "px", A.top = L.t + (1 - T.y[1]) * L.h + "px", this.xaxis._offset = L.l + T.x[0] * L.w, this.xaxis._length = L.w * (T.x[1] - T.x[0]), this.yaxis._offset = L.t + (1 - T.y[1]) * L.h, this.yaxis._length = L.h * (T.y[1] - T.y[0]);
      }, a.updateLayers = function(w) {
        var T, L = w[this.id].layers, A = this.layerList;
        if (L.length !== A.length) {
          for (T = 0; T < A.length; T++)
            A[T].dispose();
          for (A = this.layerList = [], T = 0; T < L.length; T++)
            A.push(p(this, T, L[T]));
        } else
          for (T = 0; T < L.length; T++)
            A[T].update(L[T]);
      }, a.destroy = function() {
        this.map && (this.map.remove(), this.map = null, this.container.removeChild(this.div));
      }, a.toImage = function() {
        return this.map.stop(), this.map.getCanvas().toDataURL();
      }, a.setOptions = function(w, T, L) {
        for (var A in L)
          this.map[T](w, A, L[A]);
      }, a.getMapLayers = function() {
        return this.map.getStyle().layers;
      }, a.addLayer = function(w, T) {
        var L = this.map;
        if (typeof T == "string") {
          if (T === "")
            return void L.addLayer(w, T);
          for (var A = this.getMapLayers(), I = 0; I < A.length; I++)
            if (T === A[I].id)
              return void L.addLayer(w, T);
          g.warn(["Trying to add layer with *below* value", T, "referencing a layer that does not exist", "or that does not yet exist."].join(" "));
        }
        L.addLayer(w);
      }, a.project = function(w) {
        return this.map.project(new m.LngLat(w[0], w[1]));
      }, a.getView = function() {
        var w = this.map, T = w.getCenter(), L = { lon: T.lng, lat: T.lat }, A = w.getCanvas(), I = parseInt(A.style.width), P = parseInt(A.style.height);
        return { center: L, zoom: w.getZoom(), bearing: w.getBearing(), pitch: w.getPitch(), _derived: { coordinates: [w.unproject([0, 0]).toArray(), w.unproject([I, 0]).toArray(), w.unproject([I, P]).toArray(), w.unproject([0, P]).toArray()] } };
      }, a.getViewEdits = function(w) {
        for (var T = this.id, L = ["center", "zoom", "bearing", "pitch"], A = {}, I = 0; I < L.length; I++) {
          var P = L[I];
          A[T + "." + P] = w[P];
        }
        return A;
      }, a.getViewEditsWithDerived = function(w) {
        var T = this.id, L = this.getViewEdits(w);
        return L[T + "._derived"] = w._derived, L;
      }, Q.exports = c;
    }, { "../../components/dragelement": 386, "../../components/dragelement/helpers": 385, "../../components/fx": 407, "../../components/selections": 455, "../../lib": 515, "../../lib/geo_location_utils": 508, "../../registry": 647, "../cartesian/axes": 566, "./constants": 620, "./layers": 623, "mapbox-gl/dist/mapbox-gl-unminified": 239 }], 627: [function(v, Q, $) {
      Q.exports = function(m) {
        var g = m.editType;
        return { t: { valType: "number", dflt: 0, editType: g }, r: { valType: "number", dflt: 0, editType: g }, b: { valType: "number", dflt: 0, editType: g }, l: { valType: "number", dflt: 0, editType: g }, editType: g };
      };
    }, {}], 628: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-time-format").timeFormatLocale, k = v("d3-format").formatLocale, x = v("fast-isnumeric"), e = v("../registry"), r = v("../plot_api/plot_schema"), n = v("../plot_api/plot_template"), s = v("../lib"), t = v("../components/color"), d = v("../constants/numerical").BADNUM, u = v("./cartesian/axis_ids"), o = v("../components/shapes/handle_outline").clearOutline, h = v("./animation_attributes"), l = v("./frame_attributes"), i = v("../plots/get_data").getModuleCalcData, p = s.relinkPrivateKeys, c = s._, a = Q.exports = {};
      s.extendFlat(a, e), a.attributes = v("./attributes"), a.attributes.type.values = a.allTypes, a.fontAttrs = v("./font_attributes"), a.layoutAttributes = v("./layout_attributes"), a.fontWeight = "normal";
      var y = a.transformsRegistry, f = v("./command");
      a.executeAPICommand = f.executeAPICommand, a.computeAPICommandBindings = f.computeAPICommandBindings, a.manageCommandObserver = f.manageCommandObserver, a.hasSimpleAPICommandBindings = f.hasSimpleAPICommandBindings, a.redrawText = function(H) {
        return H = s.getGraphDiv(H), new Promise(function(Y) {
          setTimeout(function() {
            H._fullLayout && (e.getComponentMethod("annotations", "draw")(H), e.getComponentMethod("legend", "draw")(H), e.getComponentMethod("colorbar", "draw")(H), Y(a.previousPromises(H)));
          }, 300);
        });
      }, a.resize = function(H) {
        var Y;
        H = s.getGraphDiv(H);
        var J = new Promise(function(W, Z) {
          H && !s.isHidden(H) || Z(new Error("Resize must be passed a displayed plot div element.")), H._redrawTimer && clearTimeout(H._redrawTimer), H._resolveResize && (Y = H._resolveResize), H._resolveResize = W, H._redrawTimer = setTimeout(function() {
            if (!H.layout || H.layout.width && H.layout.height || s.isHidden(H))
              W(H);
            else {
              delete H.layout.width, delete H.layout.height;
              var re = H.changed;
              H.autoplay = !0, e.call("relayout", H, { autosize: !0 }).then(function() {
                H.changed = re, H._resolveResize === W && (delete H._resolveResize, W(H));
              });
            }
          }, 100);
        });
        return Y && Y(J), J;
      }, a.previousPromises = function(H) {
        if ((H._promises || []).length)
          return Promise.all(H._promises).then(function() {
            H._promises = [];
          });
      }, a.addLinks = function(H) {
        if (H._context.showLink || H._context.showSources) {
          var Y = H._fullLayout, J = s.ensureSingle(Y._paper, "text", "js-plot-link-container", function(U) {
            U.style({ "font-family": '"Open Sans", Arial, sans-serif', "font-size": "12px", fill: t.defaultLine, "pointer-events": "all" }).each(function() {
              var ee = m.select(this);
              ee.append("tspan").classed("js-link-to-tool", !0), ee.append("tspan").classed("js-link-spacer", !0), ee.append("tspan").classed("js-sourcelinks", !0);
            });
          }), W = J.node(), Z = { y: Y._paper.attr("height") - 9 };
          document.body.contains(W) && W.getComputedTextLength() >= Y.width - 20 ? (Z["text-anchor"] = "start", Z.x = 5) : (Z["text-anchor"] = "end", Z.x = Y._paper.attr("width") - 7), J.attr(Z);
          var re = J.select(".js-link-to-tool"), V = J.select(".js-link-spacer"), B = J.select(".js-sourcelinks");
          H._context.showSources && H._context.showSources(H), H._context.showLink && function(U, ee) {
            ee.text("");
            var N = ee.append("a").attr({ "xlink:xlink:href": "#", class: "link--impt link--embedview", "font-weight": "bold" }).text(U._context.linkText + " " + String.fromCharCode(187));
            if (U._context.sendData)
              N.on("click", function() {
                a.sendDataToCloud(U);
              });
            else {
              var K = window.location.pathname.split("/"), X = window.location.search;
              N.attr({ "xlink:xlink:show": "new", "xlink:xlink:href": "/" + K[2].split(".")[0] + "/" + K[1] + X });
            }
          }(H, re), V.text(re.text() && B.text() ? " - " : "");
        }
      }, a.sendDataToCloud = function(H) {
        var Y = (window.PLOTLYENV || {}).BASE_URL || H._context.plotlyServerURL;
        if (Y) {
          H.emit("plotly_beforeexport");
          var J = m.select(H).append("div").attr("id", "hiddenform").style("display", "none"), W = J.append("form").attr({ action: Y + "/external", method: "post", target: "_blank" });
          return W.append("input").attr({ type: "text", name: "data" }).node().value = a.graphJson(H, !1, "keepdata"), W.node().submit(), J.remove(), H.emit("plotly_afterexport"), !1;
        }
      };
      var _ = ["days", "shortDays", "months", "shortMonths", "periods", "dateTime", "date", "time", "decimal", "thousands", "grouping", "currency"], b = ["year", "month", "dayMonth", "dayMonthYear"];
      function w(H, Y) {
        var J = H._context.locale;
        J || (J = "en-US");
        var W = !1, Z = {};
        function re(K) {
          for (var X = !0, te = 0; te < Y.length; te++) {
            var ie = Y[te];
            Z[ie] || (K[ie] ? Z[ie] = K[ie] : X = !1);
          }
          X && (W = !0);
        }
        for (var V = 0; V < 2; V++) {
          for (var B = H._context.locales, U = 0; U < 2; U++) {
            var ee = (B[J] || {}).format;
            if (ee && (re(ee), W))
              break;
            B = e.localeRegistry;
          }
          var N = J.split("-")[0];
          if (W || N === J)
            break;
          J = N;
        }
        return W || re(e.localeRegistry.en.format), Z;
      }
      function T(H, Y) {
        var J = { _fullLayout: Y }, W = H._id.charAt(0) === "x", Z = H._mainAxis._anchorAxis, re = "", V = "", B = "";
        if (Z && (B = Z._mainAxis._id, re = W ? H._id + B : B + H._id), !re || !Y._plots[re]) {
          re = "";
          for (var U = H._counterAxes, ee = 0; ee < U.length; ee++) {
            var N = U[ee], K = W ? H._id + N : N + H._id;
            V || (V = K);
            var X = u.getFromId(J, N);
            if (B && X.overlaying === B) {
              re = K;
              break;
            }
          }
        }
        return re || V;
      }
      function L(H) {
        var Y = H.transforms;
        if (Array.isArray(Y) && Y.length)
          for (var J = 0; J < Y.length; J++) {
            var W = Y[J], Z = W._module || y[W.type];
            if (Z && Z.makesData)
              return !0;
          }
        return !1;
      }
      function A(H, Y, J, W) {
        for (var Z = H.transforms, re = [H], V = 0; V < Z.length; V++) {
          var B = Z[V], U = y[B.type];
          U && U.transform && (re = U.transform(re, { transform: B, fullTrace: H, fullData: Y, layout: J, fullLayout: W, transformIndex: V }));
        }
        return re;
      }
      function I(H) {
        return typeof H == "string" && H.substr(H.length - 2) === "px" && parseFloat(H);
      }
      function P(H) {
        var Y = H.margin;
        if (!H._size) {
          var J = H._size = { l: Math.round(Y.l), r: Math.round(Y.r), t: Math.round(Y.t), b: Math.round(Y.b), p: Math.round(Y.pad) };
          J.w = Math.round(H.width) - J.l - J.r, J.h = Math.round(H.height) - J.t - J.b;
        }
        H._pushmargin || (H._pushmargin = {}), H._pushmarginIds || (H._pushmarginIds = {});
      }
      a.supplyDefaults = function(H, Y) {
        var J = Y && Y.skipUpdateCalc, W = H._fullLayout || {};
        if (W._skipDefaults)
          delete W._skipDefaults;
        else {
          var Z, re = H._fullLayout = {}, V = H.layout || {}, B = H._fullData || [], U = H._fullData = [], ee = H.data || [], N = H.calcdata || [], K = H._context || {};
          H._transitionData || a.createTransitionData(H), re._dfltTitle = { plot: c(H, "Click to enter Plot title"), x: c(H, "Click to enter X axis title"), y: c(H, "Click to enter Y axis title"), colorbar: c(H, "Click to enter Colorscale title"), annotation: c(H, "new text") }, re._traceWord = c(H, "trace");
          var X = w(H, _);
          if (re._mapboxAccessToken = K.mapboxAccessToken, W._initialAutoSizeIsDone) {
            var te = W.width, ie = W.height;
            a.supplyLayoutGlobalDefaults(V, re, X), V.width || (re.width = te), V.height || (re.height = ie), a.sanitizeMargins(re);
          } else {
            a.supplyLayoutGlobalDefaults(V, re, X);
            var le = !V.width || !V.height, oe = re.autosize, ve = K.autosizable;
            le && (oe || ve) ? a.plotAutoSize(H, V, re) : le && a.sanitizeMargins(re), !oe && le && (V.width = re.width, V.height = re.height);
          }
          re._d3locale = function(Pe, De) {
            return Pe.decimal = De.charAt(0), Pe.thousands = De.charAt(1), { numberFormat: function(Ge) {
              try {
                Ge = k(Pe).format(s.adjustFormat(Ge));
              } catch {
                return s.warnBadFormat(Ge), s.noFormat;
              }
              return Ge;
            }, timeFormat: g(Pe).utcFormat };
          }(X, re.separators), re._extraFormat = w(H, b), re._initialAutoSizeIsDone = !0, re._dataLength = ee.length, re._modules = [], re._visibleModules = [], re._basePlotModules = [];
          var ue = re._subplots = function() {
            var Pe, De, Ge = e.collectableSubplotTypes, Qe = {};
            if (!Ge) {
              Ge = [];
              var ot = e.subplotsRegistry;
              for (var vt in ot) {
                var bt = ot[vt].attr;
                if (bt && (Ge.push(vt), Array.isArray(bt)))
                  for (De = 0; De < bt.length; De++)
                    s.pushUnique(Ge, bt[De]);
              }
            }
            for (Pe = 0; Pe < Ge.length; Pe++)
              Qe[Ge[Pe]] = [];
            return Qe;
          }(), ye = re._splomAxes = { x: {}, y: {} }, Ae = re._splomSubplots = {};
          re._splomGridDflt = {}, re._scatterStackOpts = {}, re._firstScatter = {}, re._alignmentOpts = {}, re._colorAxes = {}, re._requestRangeslider = {}, re._traceUids = function(Pe, De) {
            var Ge, Qe, ot = De.length, vt = [];
            for (Ge = 0; Ge < Pe.length; Ge++) {
              var bt = Pe[Ge]._fullInput;
              bt !== Qe && vt.push(bt), Qe = bt;
            }
            var yt = vt.length, tt = new Array(ot), Ke = {};
            function mt(Xt, Gt) {
              tt[Gt] = Xt, Ke[Xt] = 1;
            }
            function Ft(Xt, Gt) {
              if (Xt && typeof Xt == "string" && !Ke[Xt])
                return mt(Xt, Gt), !0;
            }
            for (Ge = 0; Ge < ot; Ge++) {
              var Vt = De[Ge].uid;
              typeof Vt == "number" && (Vt = String(Vt)), Ft(Vt, Ge) || Ge < yt && Ft(vt[Ge].uid, Ge) || mt(s.randstr(Ke), Ge);
            }
            return tt;
          }(B, ee), re._globalTransforms = (H._context || {}).globalTransforms, a.supplyDataDefaults(ee, U, V, re);
          var pe = Object.keys(ye.x), ge = Object.keys(ye.y);
          if (pe.length > 1 && ge.length > 1) {
            for (e.getComponentMethod("grid", "sizeDefaults")(V, re), Z = 0; Z < pe.length; Z++)
              s.pushUnique(ue.xaxis, pe[Z]);
            for (Z = 0; Z < ge.length; Z++)
              s.pushUnique(ue.yaxis, ge[Z]);
            for (var we in Ae)
              s.pushUnique(ue.cartesian, we);
          }
          if (re._has = a._hasPlotType.bind(re), B.length === U.length)
            for (Z = 0; Z < U.length; Z++)
              p(U[Z], B[Z]);
          a.supplyLayoutModuleDefaults(V, re, U, H._transitionData);
          var se = re._visibleModules, de = [];
          for (Z = 0; Z < se.length; Z++) {
            var Te = se[Z].crossTraceDefaults;
            Te && s.pushUnique(de, Te);
          }
          for (Z = 0; Z < de.length; Z++)
            de[Z](U, re);
          re._hasOnlyLargeSploms = re._basePlotModules.length === 1 && re._basePlotModules[0].name === "splom" && pe.length > 15 && ge.length > 15 && re.shapes.length === 0 && re.images.length === 0, a.linkSubplots(U, re, B, W), a.cleanPlot(U, re, B, W);
          var Ee = !(!W._has || !W._has("gl2d")), Me = !(!re._has || !re._has("gl2d")), ze = !(!W._has || !W._has("cartesian")) || Ee, Ie = !(!re._has || !re._has("cartesian")) || Me;
          ze && !Ie ? W._bgLayer.remove() : Ie && !ze && (re._shouldCreateBgLayer = !0), W._zoomlayer && !H._dragging && o({ _fullLayout: W }), function(Pe, De) {
            var Ge, Qe = [];
            De.meta && (Ge = De._meta = { meta: De.meta, layout: { meta: De.meta } });
            for (var ot = 0; ot < Pe.length; ot++) {
              var vt = Pe[ot];
              vt.meta ? Qe[vt.index] = vt._meta = { meta: vt.meta } : De.meta && (vt._meta = { meta: De.meta }), De.meta && (vt._meta.layout = { meta: De.meta });
            }
            Qe.length && (Ge || (Ge = De._meta = {}), Ge.data = Qe);
          }(U, re), p(re, W), e.getComponentMethod("colorscale", "crossTraceDefaults")(U, re), re._preGUI || (re._preGUI = {}), re._tracePreGUI || (re._tracePreGUI = {});
          var Oe, Ze = re._tracePreGUI, Fe = {};
          for (Oe in Ze)
            Fe[Oe] = "old";
          for (Z = 0; Z < U.length; Z++)
            Fe[Oe = U[Z]._fullInput.uid] || (Ze[Oe] = {}), Fe[Oe] = "new";
          for (Oe in Fe)
            Fe[Oe] === "old" && delete Ze[Oe];
          P(re), e.getComponentMethod("rangeslider", "makeData")(re), J || N.length !== U.length || a.supplyDefaultsUpdateCalc(N, U);
        }
      }, a.supplyDefaultsUpdateCalc = function(H, Y) {
        for (var J = 0; J < Y.length; J++) {
          var W = Y[J], Z = (H[J] || [])[0];
          if (Z && Z.trace) {
            var re = Z.trace;
            if (re._hasCalcTransform) {
              var V, B, U, ee = re._arrayAttrs;
              for (V = 0; V < ee.length; V++)
                B = ee[V], U = s.nestedProperty(re, B).get().slice(), s.nestedProperty(W, B).set(U);
            }
            Z.trace = W;
          }
        }
      }, a.createTransitionData = function(H) {
        H._transitionData || (H._transitionData = {}), H._transitionData._frames || (H._transitionData._frames = []), H._transitionData._frameHash || (H._transitionData._frameHash = {}), H._transitionData._counter || (H._transitionData._counter = 0), H._transitionData._interruptCallbacks || (H._transitionData._interruptCallbacks = []);
      }, a._hasPlotType = function(H) {
        var Y, J = this._basePlotModules || [];
        for (Y = 0; Y < J.length; Y++)
          if (J[Y].name === H)
            return !0;
        var W = this._modules || [];
        for (Y = 0; Y < W.length; Y++) {
          var Z = W[Y].name;
          if (Z === H)
            return !0;
          var re = e.modules[Z];
          if (re && re.categories[H])
            return !0;
        }
        return !1;
      }, a.cleanPlot = function(H, Y, J, W) {
        var Z, re, V = W._basePlotModules || [];
        for (Z = 0; Z < V.length; Z++) {
          var B = V[Z];
          B.clean && B.clean(H, Y, J, W);
        }
        var U = W._has && W._has("gl"), ee = Y._has && Y._has("gl");
        U && !ee && W._glcontainer !== void 0 && (W._glcontainer.selectAll(".gl-canvas").remove(), W._glcontainer.selectAll(".no-webgl").remove(), W._glcanvas = null);
        var N = !!W._infolayer;
        e:
          for (Z = 0; Z < J.length; Z++) {
            var K = J[Z].uid;
            for (re = 0; re < H.length; re++)
              if (K === H[re].uid)
                continue e;
            N && W._infolayer.select(".cb" + K).remove();
          }
      }, a.linkSubplots = function(H, Y, J, W) {
        var Z, re, V = W._plots || {}, B = Y._plots = {}, U = Y._subplots, ee = { _fullData: H, _fullLayout: Y }, N = U.cartesian.concat(U.gl2d || []);
        for (Z = 0; Z < N.length; Z++) {
          var K, X = N[Z], te = V[X], ie = u.getFromId(ee, X, "x"), le = u.getFromId(ee, X, "y");
          for (te ? K = B[X] = te : (K = B[X] = {}).id = X, ie._counterAxes.push(le._id), le._counterAxes.push(ie._id), ie._subplotsWith.push(X), le._subplotsWith.push(X), K.xaxis = ie, K.yaxis = le, K._hasClipOnAxisFalse = !1, re = 0; re < H.length; re++) {
            var oe = H[re];
            if (oe.xaxis === K.xaxis._id && oe.yaxis === K.yaxis._id && oe.cliponaxis === !1) {
              K._hasClipOnAxisFalse = !0;
              break;
            }
          }
        }
        var ve, ue = u.list(ee, null, !0);
        for (Z = 0; Z < ue.length; Z++) {
          var ye = null;
          (ve = ue[Z]).overlaying && (ye = u.getFromId(ee, ve.overlaying)) && ye.overlaying && (ve.overlaying = !1, ye = null), ve._mainAxis = ye || ve, ye && (ve.domain = ye.domain.slice()), ve._anchorAxis = ve.anchor === "free" ? null : u.getFromId(ee, ve.anchor);
        }
        for (Z = 0; Z < ue.length; Z++)
          if ((ve = ue[Z])._counterAxes.sort(u.idSort), ve._subplotsWith.sort(s.subplotSort), ve._mainSubplot = T(ve, Y), ve._counterAxes.length && (ve.spikemode && ve.spikemode.indexOf("across") !== -1 || ve.automargin && ve.mirror && ve.anchor !== "free" || e.getComponentMethod("rangeslider", "isVisible")(ve))) {
            var Ae = 1, pe = 0;
            for (re = 0; re < ve._counterAxes.length; re++) {
              var ge = u.getFromId(ee, ve._counterAxes[re]);
              Ae = Math.min(Ae, ge.domain[0]), pe = Math.max(pe, ge.domain[1]);
            }
            Ae < pe && (ve._counterDomainMin = Ae, ve._counterDomainMax = pe);
          }
      }, a.clearExpandedTraceDefaultColors = function(H) {
        var Y, J, W;
        for (J = [], (Y = H._module._colorAttrs) || (H._module._colorAttrs = Y = [], r.crawl(H._module.attributes, function(Z, re, V, B) {
          J[B] = re, J.length = B + 1, Z.valType === "color" && Z.dflt === void 0 && Y.push(J.join("."));
        })), W = 0; W < Y.length; W++)
          s.nestedProperty(H, "_input." + Y[W]).get() || s.nestedProperty(H, Y[W]).set(null);
      }, a.supplyDataDefaults = function(H, Y, J, W) {
        var Z, re, V, B = W._modules, U = W._visibleModules, ee = W._basePlotModules, N = 0, K = 0;
        function X(we) {
          Y.push(we);
          var se = we._module;
          se && (s.pushUnique(B, se), we.visible === !0 && s.pushUnique(U, se), s.pushUnique(ee, we._module.basePlotModule), N++, we._input.visible !== !1 && K++);
        }
        W._transformModules = [];
        var te = {}, ie = [], le = (J.template || {}).data || {}, oe = n.traceTemplater(le);
        for (Z = 0; Z < H.length; Z++) {
          if (V = H[Z], (re = oe.newTrace(V)).uid = W._traceUids[Z], a.supplyTraceDefaults(V, re, K, W, Z), re.index = Z, re._input = V, re._expandedIndex = N, re.transforms && re.transforms.length)
            for (var ve = V.visible !== !1 && re.visible === !1, ue = A(re, Y, J, W), ye = 0; ye < ue.length; ye++) {
              var Ae = ue[ye], pe = { _template: re._template, type: re.type, uid: re.uid + ye };
              ve && Ae.visible === !1 && delete Ae.visible, a.supplyTraceDefaults(Ae, pe, N, W, Z), p(pe, Ae), pe.index = Z, pe._input = V, pe._fullInput = re, pe._expandedIndex = N, pe._expandedInput = Ae, X(pe);
            }
          else
            re._fullInput = re, re._expandedInput = re, X(re);
          e.traceIs(re, "carpetAxis") && (te[re.carpet] = re), e.traceIs(re, "carpetDependent") && ie.push(Z);
        }
        for (Z = 0; Z < ie.length; Z++)
          if ((re = Y[ie[Z]]).visible) {
            var ge = te[re.carpet];
            re._carpet = ge, ge && ge.visible ? (re.xaxis = ge.xaxis, re.yaxis = ge.yaxis) : re.visible = !1;
          }
      }, a.supplyAnimationDefaults = function(H) {
        var Y;
        H = H || {};
        var J = {};
        function W(Z, re) {
          return s.coerce(H || {}, J, h, Z, re);
        }
        if (W("mode"), W("direction"), W("fromcurrent"), Array.isArray(H.frame))
          for (J.frame = [], Y = 0; Y < H.frame.length; Y++)
            J.frame[Y] = a.supplyAnimationFrameDefaults(H.frame[Y] || {});
        else
          J.frame = a.supplyAnimationFrameDefaults(H.frame || {});
        if (Array.isArray(H.transition))
          for (J.transition = [], Y = 0; Y < H.transition.length; Y++)
            J.transition[Y] = a.supplyAnimationTransitionDefaults(H.transition[Y] || {});
        else
          J.transition = a.supplyAnimationTransitionDefaults(H.transition || {});
        return J;
      }, a.supplyAnimationFrameDefaults = function(H) {
        var Y = {};
        function J(W, Z) {
          return s.coerce(H || {}, Y, h.frame, W, Z);
        }
        return J("duration"), J("redraw"), Y;
      }, a.supplyAnimationTransitionDefaults = function(H) {
        var Y = {};
        function J(W, Z) {
          return s.coerce(H || {}, Y, h.transition, W, Z);
        }
        return J("duration"), J("easing"), Y;
      }, a.supplyFrameDefaults = function(H) {
        var Y = {};
        function J(W, Z) {
          return s.coerce(H, Y, l, W, Z);
        }
        return J("group"), J("name"), J("traces"), J("baseframe"), J("data"), J("layout"), Y;
      }, a.supplyTraceDefaults = function(H, Y, J, W, Z) {
        var re, V = W.colorway || t.defaults, B = V[J % V.length];
        function U(ue, ye) {
          return s.coerce(H, Y, a.attributes, ue, ye);
        }
        var ee = U("visible");
        U("type"), U("name", W._traceWord + " " + Z), U("uirevision", W.uirevision);
        var N = a.getModule(Y);
        if (Y._module = N, N) {
          var K = N.basePlotModule, X = K.attr, te = K.attributes;
          if (X && te) {
            var ie = W._subplots, le = "";
            if (ee || K.name !== "gl2d") {
              if (Array.isArray(X))
                for (re = 0; re < X.length; re++) {
                  var oe = X[re], ve = s.coerce(H, Y, te, oe);
                  ie[oe] && s.pushUnique(ie[oe], ve), le += ve;
                }
              else
                le = s.coerce(H, Y, te, X);
              ie[K.name] && s.pushUnique(ie[K.name], le);
            }
          }
        }
        return ee && (U("customdata"), U("ids"), U("meta"), e.traceIs(Y, "showLegend") ? (s.coerce(H, Y, N.attributes.showlegend ? N.attributes : a.attributes, "showlegend"), U("legendwidth"), U("legendgroup"), U("legendgrouptitle.text"), U("legendrank"), Y._dfltShowLegend = !0) : Y._dfltShowLegend = !1, N && N.supplyDefaults(H, Y, B, W), e.traceIs(Y, "noOpacity") || U("opacity"), e.traceIs(Y, "notLegendIsolatable") && (Y.visible = !!Y.visible), e.traceIs(Y, "noHover") || (Y.hovertemplate || s.coerceHoverinfo(H, Y, W), Y.type !== "parcats" && e.getComponentMethod("fx", "supplyDefaults")(H, Y, B, W)), N && N.selectPoints && U("selectedpoints"), a.supplyTransformDefaults(H, Y, W)), Y;
      }, a.hasMakesDataTransform = L, a.supplyTransformDefaults = function(H, Y, J) {
        if (Y._length || L(H)) {
          var W = J._globalTransforms || [], Z = J._transformModules || [];
          if (Array.isArray(H.transforms) || W.length !== 0)
            for (var re = H.transforms || [], V = W.concat(re), B = Y.transforms = [], U = 0; U < V.length; U++) {
              var ee, N = V[U], K = N.type, X = y[K], te = !(N._module && N._module === X), ie = X && typeof X.transform == "function";
              X || s.warn("Unrecognized transform type " + K + "."), X && X.supplyDefaults && (te || ie) ? ((ee = X.supplyDefaults(N, Y, J, H)).type = K, ee._module = X, s.pushUnique(Z, X)) : ee = s.extendFlat({}, N), B.push(ee);
            }
        }
      }, a.supplyLayoutGlobalDefaults = function(H, Y, J) {
        function W(U, ee) {
          return s.coerce(H, Y, a.layoutAttributes, U, ee);
        }
        var Z = H.template;
        s.isPlainObject(Z) && (Y.template = Z, Y._template = Z.layout, Y._dataTemplate = Z.data), W("autotypenumbers");
        var re = s.coerceFont(W, "font"), V = re.size;
        s.coerceFont(W, "title.font", s.extendFlat({}, re, { size: Math.round(1.4 * V) })), W("title.text", Y._dfltTitle.plot), W("title.xref"), W("title.yref"), W("title.x"), W("title.y"), W("title.xanchor"), W("title.yanchor"), W("title.pad.t"), W("title.pad.r"), W("title.pad.b"), W("title.pad.l"), W("uniformtext.mode") && W("uniformtext.minsize"), W("autosize", !(H.width && H.height)), W("width"), W("height"), W("minreducedwidth"), W("minreducedheight"), W("margin.l"), W("margin.r"), W("margin.t"), W("margin.b"), W("margin.pad"), W("margin.autoexpand"), H.width && H.height && a.sanitizeMargins(Y), e.getComponentMethod("grid", "sizeDefaults")(H, Y), W("paper_bgcolor"), W("separators", J.decimal + J.thousands), W("hidesources"), W("colorway"), W("datarevision");
        var B = W("uirevision");
        W("editrevision", B), W("selectionrevision", B), e.getComponentMethod("modebar", "supplyLayoutDefaults")(H, Y), e.getComponentMethod("shapes", "supplyDrawNewShapeDefaults")(H, Y, W), e.getComponentMethod("selections", "supplyDrawNewSelectionDefaults")(H, Y, W), W("meta"), s.isPlainObject(H.transition) && (W("transition.duration"), W("transition.easing"), W("transition.ordering")), e.getComponentMethod("calendars", "handleDefaults")(H, Y, "calendar"), e.getComponentMethod("fx", "supplyLayoutGlobalDefaults")(H, Y, W);
      }, a.plotAutoSize = function(H, Y, J) {
        var W, Z, re = H._context || {}, V = re.frameMargins, B = s.isPlotDiv(H);
        if (B && H.emit("plotly_autosize"), re.fillFrame)
          W = window.innerWidth, Z = window.innerHeight, document.body.style.overflow = "hidden";
        else {
          var U = B ? window.getComputedStyle(H) : {};
          if (W = I(U.width) || I(U.maxWidth) || J.width, Z = I(U.height) || I(U.maxHeight) || J.height, x(V) && V > 0) {
            var ee = 1 - 2 * V;
            W = Math.round(ee * W), Z = Math.round(ee * Z);
          }
        }
        var N = a.layoutAttributes.width.min, K = a.layoutAttributes.height.min;
        W < N && (W = N), Z < K && (Z = K);
        var X = !Y.width && Math.abs(J.width - W) > 1, te = !Y.height && Math.abs(J.height - Z) > 1;
        (te || X) && (X && (J.width = W), te && (J.height = Z)), H._initialAutoSize || (H._initialAutoSize = { width: W, height: Z }), a.sanitizeMargins(J);
      }, a.supplyLayoutModuleDefaults = function(H, Y, J, W) {
        var Z, re, V, B = e.componentsRegistry, U = Y._basePlotModules, ee = e.subplotsRegistry.cartesian;
        for (Z in B)
          (V = B[Z]).includeBasePlot && V.includeBasePlot(H, Y);
        for (var N in U.length || U.push(ee), Y._has("cartesian") && (e.getComponentMethod("grid", "contentDefaults")(H, Y), ee.finalizeSubplots(H, Y)), Y._subplots)
          Y._subplots[N].sort(s.subplotSort);
        for (re = 0; re < U.length; re++)
          (V = U[re]).supplyLayoutDefaults && V.supplyLayoutDefaults(H, Y, J);
        var K = Y._modules;
        for (re = 0; re < K.length; re++)
          (V = K[re]).supplyLayoutDefaults && V.supplyLayoutDefaults(H, Y, J);
        var X = Y._transformModules;
        for (re = 0; re < X.length; re++)
          (V = X[re]).supplyLayoutDefaults && V.supplyLayoutDefaults(H, Y, J, W);
        for (Z in B)
          (V = B[Z]).supplyLayoutDefaults && V.supplyLayoutDefaults(H, Y, J);
      }, a.purge = function(H) {
        var Y = H._fullLayout || {};
        Y._glcontainer !== void 0 && (Y._glcontainer.selectAll(".gl-canvas").remove(), Y._glcontainer.remove(), Y._glcanvas = null), Y._modeBar && Y._modeBar.destroy(), H._transitionData && (H._transitionData._interruptCallbacks && (H._transitionData._interruptCallbacks.length = 0), H._transitionData._animationRaf && window.cancelAnimationFrame(H._transitionData._animationRaf)), s.clearThrottle(), s.clearResponsive(H), delete H.data, delete H.layout, delete H._fullData, delete H._fullLayout, delete H.calcdata, delete H.empty, delete H.fid, delete H.undoqueue, delete H.undonum, delete H.autoplay, delete H.changed, delete H._promises, delete H._redrawTimer, delete H._hmlumcount, delete H._hmpixcount, delete H._transitionData, delete H._transitioning, delete H._initialAutoSize, delete H._transitioningWithDuration, delete H._dragging, delete H._dragged, delete H._dragdata, delete H._hoverdata, delete H._snapshotInProgress, delete H._editing, delete H._mouseDownTime, delete H._legendMouseDownTime, H.removeAllListeners && H.removeAllListeners();
      }, a.style = function(H) {
        var Y, J = H._fullLayout._visibleModules, W = [];
        for (Y = 0; Y < J.length; Y++) {
          var Z = J[Y];
          Z.style && s.pushUnique(W, Z.style);
        }
        for (Y = 0; Y < W.length; Y++)
          W[Y](H);
      }, a.sanitizeMargins = function(H) {
        if (H && H.margin) {
          var Y, J = H.width, W = H.height, Z = H.margin, re = J - (Z.l + Z.r), V = W - (Z.t + Z.b);
          re < 0 && (Y = (J - 1) / (Z.l + Z.r), Z.l = Math.floor(Y * Z.l), Z.r = Math.floor(Y * Z.r)), V < 0 && (Y = (W - 1) / (Z.t + Z.b), Z.t = Math.floor(Y * Z.t), Z.b = Math.floor(Y * Z.b));
        }
      }, a.clearAutoMarginIds = function(H) {
        H._fullLayout._pushmarginIds = {};
      }, a.allowAutoMargin = function(H, Y) {
        H._fullLayout._pushmarginIds[Y] = 1;
      }, a.autoMargin = function(H, Y, J) {
        var W = H._fullLayout, Z = W.width, re = W.height, V = W.margin, B = W.minreducedwidth, U = W.minreducedheight, ee = s.constrain(Z - V.l - V.r, 2, B), N = s.constrain(re - V.t - V.b, 2, U), K = Math.max(0, Z - ee), X = Math.max(0, re - N), te = W._pushmargin, ie = W._pushmarginIds;
        if (V.autoexpand !== !1) {
          if (J) {
            var le = J.pad;
            if (le === void 0 && (le = Math.min(12, V.l, V.r, V.t, V.b)), K) {
              var oe = (J.l + J.r) / K;
              oe > 1 && (J.l /= oe, J.r /= oe);
            }
            if (X) {
              var ve = (J.t + J.b) / X;
              ve > 1 && (J.t /= ve, J.b /= ve);
            }
            var ue = J.xl !== void 0 ? J.xl : J.x, ye = J.xr !== void 0 ? J.xr : J.x, Ae = J.yt !== void 0 ? J.yt : J.y, pe = J.yb !== void 0 ? J.yb : J.y;
            te[Y] = { l: { val: ue, size: J.l + le }, r: { val: ye, size: J.r + le }, b: { val: pe, size: J.b + le }, t: { val: Ae, size: J.t + le } }, ie[Y] = 1;
          } else
            delete te[Y], delete ie[Y];
          if (!W._replotting)
            return a.doAutoMargin(H);
        }
      }, a.doAutoMargin = function(H) {
        var Y = H._fullLayout, J = Y.width, W = Y.height;
        Y._size || (Y._size = {}), P(Y);
        var Z = Y._size, re = Y.margin, V = s.extendFlat({}, Z), B = re.l, U = re.r, ee = re.t, N = re.b, K = Y._pushmargin, X = Y._pushmarginIds, te = Y.minreducedwidth, ie = Y.minreducedheight;
        if (Y.margin.autoexpand !== !1) {
          for (var le in K)
            X[le] || delete K[le];
          for (var oe in K.base = { l: { val: 0, size: B }, r: { val: 1, size: U }, t: { val: 1, size: ee }, b: { val: 0, size: N } }, K) {
            var ve = K[oe].l || {}, ue = K[oe].b || {}, ye = ve.val, Ae = ve.size, pe = ue.val, ge = ue.size;
            for (var we in K) {
              if (x(Ae) && K[we].r) {
                var se = K[we].r.val, de = K[we].r.size;
                if (se > ye) {
                  var Te = (Ae * se + (de - J) * ye) / (se - ye), Ee = (de * (1 - ye) + (Ae - J) * (1 - se)) / (se - ye);
                  Te + Ee > B + U && (B = Te, U = Ee);
                }
              }
              if (x(ge) && K[we].t) {
                var Me = K[we].t.val, ze = K[we].t.size;
                if (Me > pe) {
                  var Ie = (ge * Me + (ze - W) * pe) / (Me - pe), Oe = (ze * (1 - pe) + (ge - W) * (1 - Me)) / (Me - pe);
                  Ie + Oe > N + ee && (N = Ie, ee = Oe);
                }
              }
            }
          }
        }
        var Ze = s.constrain(J - re.l - re.r, 2, te), Fe = s.constrain(W - re.t - re.b, 2, ie), Pe = Math.max(0, J - Ze), De = Math.max(0, W - Fe);
        if (Pe) {
          var Ge = (B + U) / Pe;
          Ge > 1 && (B /= Ge, U /= Ge);
        }
        if (De) {
          var Qe = (N + ee) / De;
          Qe > 1 && (N /= Qe, ee /= Qe);
        }
        if (Z.l = Math.round(B), Z.r = Math.round(U), Z.t = Math.round(ee), Z.b = Math.round(N), Z.p = Math.round(re.pad), Z.w = Math.round(J) - Z.l - Z.r, Z.h = Math.round(W) - Z.t - Z.b, !Y._replotting && a.didMarginChange(V, Z)) {
          "_redrawFromAutoMarginCount" in Y ? Y._redrawFromAutoMarginCount++ : Y._redrawFromAutoMarginCount = 1;
          var ot = 3 * (1 + Object.keys(X).length);
          if (Y._redrawFromAutoMarginCount < ot)
            return e.call("_doPlot", H);
          Y._size = V, s.warn("Too many auto-margin redraws.");
        }
        (function(vt) {
          var bt = u.list(vt, "", !0);
          ["_adjustTickLabelsOverflow", "_hideCounterAxisInsideTickLabels"].forEach(function(yt) {
            for (var tt = 0; tt < bt.length; tt++) {
              var Ke = bt[tt][yt];
              Ke && Ke();
            }
          });
        })(H);
      };
      var S = ["l", "r", "t", "b", "p", "w", "h"];
      function E(H, Y, J) {
        var W = !1, Z = [a.previousPromises, function() {
          if (H._transitionData)
            return H._transitioning = !1, function(V) {
              var B = Promise.resolve();
              if (!V)
                return B;
              for (; V.length; )
                B = B.then(V.shift());
              return B;
            }(H._transitionData._interruptCallbacks);
        }, J.prepareFn, a.rehover, a.reselect, function() {
          return H.emit("plotly_transitioning", []), new Promise(function(V) {
            H._transitioning = !0, Y.duration > 0 && (H._transitioningWithDuration = !0), H._transitionData._interruptCallbacks.push(function() {
              W = !0;
            }), J.redraw && H._transitionData._interruptCallbacks.push(function() {
              return e.call("redraw", H);
            }), H._transitionData._interruptCallbacks.push(function() {
              H.emit("plotly_transitioninterrupted", []);
            });
            var B = 0, U = 0;
            function ee() {
              return B++, function() {
                U++, W || U !== B || function(N) {
                  !H._transitionData || (function(K) {
                    if (K)
                      for (; K.length; )
                        K.shift();
                  }(H._transitionData._interruptCallbacks), Promise.resolve().then(function() {
                    if (J.redraw)
                      return e.call("redraw", H);
                  }).then(function() {
                    H._transitioning = !1, H._transitioningWithDuration = !1, H.emit("plotly_transitioned", []);
                  }).then(N));
                }(V);
              };
            }
            J.runFn(ee), setTimeout(ee());
          });
        }], re = s.syncOrAsync(Z, H);
        return re && re.then || (re = Promise.resolve()), re.then(function() {
          return H;
        });
      }
      a.didMarginChange = function(H, Y) {
        for (var J = 0; J < S.length; J++) {
          var W = S[J], Z = H[W], re = Y[W];
          if (!x(Z) || Math.abs(re - Z) > 1)
            return !0;
        }
        return !1;
      }, a.graphJson = function(H, Y, J, W, Z, re) {
        (Z && Y && !H._fullData || Z && !Y && !H._fullLayout) && a.supplyDefaults(H);
        var V = Z ? H._fullData : H.data, B = Z ? H._fullLayout : H.layout, U = (H._transitionData || {})._frames;
        function ee(X, te) {
          if (typeof X == "function")
            return te ? "_function_" : null;
          if (s.isPlainObject(X)) {
            var ie, le = {};
            return Object.keys(X).sort().forEach(function(oe) {
              if (["_", "["].indexOf(oe.charAt(0)) === -1)
                if (typeof X[oe] != "function") {
                  if (J === "keepdata") {
                    if (oe.substr(oe.length - 3) === "src")
                      return;
                  } else if (J === "keepstream") {
                    if (typeof (ie = X[oe + "src"]) == "string" && ie.indexOf(":") > 0 && !s.isPlainObject(X.stream))
                      return;
                  } else if (J !== "keepall" && typeof (ie = X[oe + "src"]) == "string" && ie.indexOf(":") > 0)
                    return;
                  le[oe] = ee(X[oe], te);
                } else
                  te && (le[oe] = "_function");
            }), le;
          }
          return Array.isArray(X) ? X.map(function(oe) {
            return ee(oe, te);
          }) : s.isTypedArray(X) ? s.simpleMap(X, s.identity) : s.isJSDate(X) ? s.ms2DateTimeLocal(+X) : X;
        }
        var N = { data: (V || []).map(function(X) {
          var te = ee(X);
          return Y && delete te.fit, te;
        }) };
        if (!Y && (N.layout = ee(B), Z)) {
          var K = B._size;
          N.layout.computed = { margin: { b: K.b, l: K.l, r: K.r, t: K.t } };
        }
        return U && (N.frames = ee(U)), re && (N.config = ee(H._context, !0)), W === "object" ? N : JSON.stringify(N);
      }, a.modifyFrames = function(H, Y) {
        var J, W, Z, re = H._transitionData._frames, V = H._transitionData._frameHash;
        for (J = 0; J < Y.length; J++)
          switch ((W = Y[J]).type) {
            case "replace":
              Z = W.value;
              var B = (re[W.index] || {}).name, U = Z.name;
              re[W.index] = V[U] = Z, U !== B && (delete V[B], V[U] = Z);
              break;
            case "insert":
              V[(Z = W.value).name] = Z, re.splice(W.index, 0, Z);
              break;
            case "delete":
              delete V[(Z = re[W.index]).name], re.splice(W.index, 1);
          }
        return Promise.resolve();
      }, a.computeFrame = function(H, Y) {
        var J, W, Z, re, V = H._transitionData._frameHash;
        if (!Y)
          throw new Error("computeFrame must be given a string frame name");
        var B = V[Y.toString()];
        if (!B)
          return !1;
        for (var U = [B], ee = [B.name]; B.baseframe && (B = V[B.baseframe.toString()]) && ee.indexOf(B.name) === -1; )
          U.push(B), ee.push(B.name);
        for (var N = {}; B = U.pop(); )
          if (B.layout && (N.layout = a.extendLayout(N.layout, B.layout)), B.data) {
            if (N.data || (N.data = []), !(W = B.traces))
              for (W = [], J = 0; J < B.data.length; J++)
                W[J] = J;
            for (N.traces || (N.traces = []), J = 0; J < B.data.length; J++)
              (Z = W[J]) != null && ((re = N.traces.indexOf(Z)) === -1 && (re = N.data.length, N.traces[re] = Z), N.data[re] = a.extendTrace(N.data[re], B.data[J]));
          }
        return N;
      }, a.recomputeFrameHash = function(H) {
        for (var Y = H._transitionData._frameHash = {}, J = H._transitionData._frames, W = 0; W < J.length; W++) {
          var Z = J[W];
          Z && Z.name && (Y[Z.name] = Z);
        }
      }, a.extendObjectWithContainers = function(H, Y, J) {
        var W, Z, re, V, B, U, ee, N = s.extendDeepNoArrays({}, Y || {}), K = s.expandObjectPaths(N), X = {};
        if (J && J.length)
          for (re = 0; re < J.length; re++)
            (Z = (W = s.nestedProperty(K, J[re])).get()) === void 0 ? s.nestedProperty(X, J[re]).set(null) : (W.set(null), s.nestedProperty(X, J[re]).set(Z));
        if (H = s.extendDeepNoArrays(H || {}, K), J && J.length) {
          for (re = 0; re < J.length; re++)
            if (U = s.nestedProperty(X, J[re]).get()) {
              for (ee = (B = s.nestedProperty(H, J[re])).get(), Array.isArray(ee) || (ee = [], B.set(ee)), V = 0; V < U.length; V++) {
                var te = U[V];
                ee[V] = te === null ? null : a.extendObjectWithContainers(ee[V], te);
              }
              B.set(ee);
            }
        }
        return H;
      }, a.dataArrayContainers = ["transforms", "dimensions"], a.layoutArrayContainers = e.layoutArrayContainers, a.extendTrace = function(H, Y) {
        return a.extendObjectWithContainers(H, Y, a.dataArrayContainers);
      }, a.extendLayout = function(H, Y) {
        return a.extendObjectWithContainers(H, Y, a.layoutArrayContainers);
      }, a.transition = function(H, Y, J, W, Z, re) {
        var V = { redraw: Z.redraw }, B = {}, U = [];
        return V.prepareFn = function() {
          for (var ee = Array.isArray(Y) ? Y.length : 0, N = W.slice(0, ee), K = 0; K < N.length; K++) {
            var X = N[K], te = H._fullData[X]._module;
            if (te) {
              if (te.animatable) {
                var ie = te.basePlotModule.name;
                B[ie] || (B[ie] = []), B[ie].push(X);
              }
              H.data[N[K]] = a.extendTrace(H.data[N[K]], Y[K]);
            }
          }
          var le = s.expandObjectPaths(s.extendDeepNoArrays({}, J)), oe = /^[xy]axis[0-9]*$/;
          for (var ve in le)
            oe.test(ve) && delete le[ve].range;
          a.extendLayout(H.layout, le), delete H.calcdata, a.supplyDefaults(H), a.doCalcdata(H);
          var ue = s.expandObjectPaths(J);
          if (ue) {
            var ye = H._fullLayout._plots;
            for (var Ae in ye) {
              var pe = ye[Ae], ge = pe.xaxis, we = pe.yaxis, se = ge.range.slice(), de = we.range.slice(), Te = null, Ee = null, Me = null, ze = null;
              Array.isArray(ue[ge._name + ".range"]) ? Te = ue[ge._name + ".range"].slice() : Array.isArray((ue[ge._name] || {}).range) && (Te = ue[ge._name].range.slice()), Array.isArray(ue[we._name + ".range"]) ? Ee = ue[we._name + ".range"].slice() : Array.isArray((ue[we._name] || {}).range) && (Ee = ue[we._name].range.slice()), se && Te && (ge.r2l(se[0]) !== ge.r2l(Te[0]) || ge.r2l(se[1]) !== ge.r2l(Te[1])) && (Me = { xr0: se, xr1: Te }), de && Ee && (we.r2l(de[0]) !== we.r2l(Ee[0]) || we.r2l(de[1]) !== we.r2l(Ee[1])) && (ze = { yr0: de, yr1: Ee }), (Me || ze) && U.push(s.extendFlat({ plotinfo: pe }, Me, ze));
            }
          }
          return Promise.resolve();
        }, V.runFn = function(ee) {
          var N, K, X = H._fullLayout._basePlotModules, te = U.length;
          if (J)
            for (K = 0; K < X.length; K++)
              X[K].transitionAxes && X[K].transitionAxes(H, U, re, ee);
          for (var ie in te ? ((N = s.extendFlat({}, re)).duration = 0, delete B.cartesian) : N = re, B) {
            var le = B[ie];
            H._fullData[le[0]]._module.basePlotModule.plot(H, le, N, ee);
          }
        }, E(H, re, V);
      }, a.transitionFromReact = function(H, Y, J, W) {
        var Z = H._fullLayout, re = Z.transition, V = {}, B = [];
        return V.prepareFn = function() {
          var U = Z._plots;
          for (var ee in V.redraw = !1, Y.anim === "some" && (V.redraw = !0), J.anim === "some" && (V.redraw = !0), U) {
            var N = U[ee], K = N.xaxis, X = N.yaxis, te = W[K._name].range.slice(), ie = W[X._name].range.slice(), le = K.range.slice(), oe = X.range.slice();
            K.setScale(), X.setScale();
            var ve = null, ue = null;
            K.r2l(te[0]) === K.r2l(le[0]) && K.r2l(te[1]) === K.r2l(le[1]) || (ve = { xr0: te, xr1: le }), X.r2l(ie[0]) === X.r2l(oe[0]) && X.r2l(ie[1]) === X.r2l(oe[1]) || (ue = { yr0: ie, yr1: oe }), (ve || ue) && B.push(s.extendFlat({ plotinfo: N }, ve, ue));
          }
          return Promise.resolve();
        }, V.runFn = function(U) {
          for (var ee, N, K, X = H._fullData, te = H._fullLayout._basePlotModules, ie = [], le = 0; le < X.length; le++)
            ie.push(le);
          function oe() {
            if (H._fullLayout)
              for (var ue = 0; ue < te.length; ue++)
                te[ue].transitionAxes && te[ue].transitionAxes(H, B, ee, U);
          }
          function ve() {
            if (H._fullLayout)
              for (var ue = 0; ue < te.length; ue++)
                te[ue].plot(H, K, N, U);
          }
          B.length && Y.anim ? re.ordering === "traces first" ? (ee = s.extendFlat({}, re, { duration: 0 }), K = ie, N = re, setTimeout(oe, re.duration), ve()) : (ee = re, K = null, N = s.extendFlat({}, re, { duration: 0 }), setTimeout(ve, ee.duration), oe()) : B.length ? (ee = re, oe()) : Y.anim && (K = ie, N = re, ve());
        }, E(H, re, V);
      }, a.doCalcdata = function(H, Y) {
        var J, W, Z, re, V = u.list(H), B = H._fullData, U = H._fullLayout, ee = new Array(B.length), N = (H.calcdata || []).slice();
        for (H.calcdata = ee, U._numBoxes = 0, U._numViolins = 0, U._violinScaleGroupStats = {}, H._hmpixcount = 0, H._hmlumcount = 0, U._piecolormap = {}, U._sunburstcolormap = {}, U._treemapcolormap = {}, U._iciclecolormap = {}, U._funnelareacolormap = {}, Z = 0; Z < B.length; Z++)
          Array.isArray(Y) && Y.indexOf(Z) === -1 && (ee[Z] = N[Z]);
        for (Z = 0; Z < B.length; Z++)
          (J = B[Z])._arrayAttrs = r.findArrayAttributes(J), J._extremes = {};
        var K = U._subplots.polar || [];
        for (Z = 0; Z < K.length; Z++)
          V.push(U[K[Z]].radialaxis, U[K[Z]].angularaxis);
        for (var X in U._colorAxes) {
          var te = U[X];
          te.cauto !== !1 && (delete te.cmin, delete te.cmax);
        }
        var ie = !1;
        function le(ue) {
          if (J = B[ue], W = J._module, J.visible === !0 && J.transforms) {
            if (W && W.calc) {
              var ye = W.calc(H, J);
              ye[0] && ye[0].t && ye[0].t._scene && delete ye[0].t._scene.dirty;
            }
            for (re = 0; re < J.transforms.length; re++) {
              var Ae = J.transforms[re];
              (W = y[Ae.type]) && W.calcTransform && (J._hasCalcTransform = !0, ie = !0, W.calcTransform(H, J, Ae));
            }
          }
        }
        function oe(ue, ye) {
          if (J = B[ue], !!(W = J._module).isContainer === ye) {
            var Ae = [];
            if (J.visible === !0 && J._length !== 0) {
              delete J._indexToPoints;
              var pe = J.transforms || [];
              for (re = pe.length - 1; re >= 0; re--)
                if (pe[re].enabled) {
                  J._indexToPoints = pe[re]._indexToPoints;
                  break;
                }
              W && W.calc && (Ae = W.calc(H, J));
            }
            Array.isArray(Ae) && Ae[0] || (Ae = [{ x: d, y: d }]), Ae[0].t || (Ae[0].t = {}), Ae[0].trace = J, ee[ue] = Ae;
          }
        }
        for (z(V, B, U), Z = 0; Z < B.length; Z++)
          oe(Z, !0);
        for (Z = 0; Z < B.length; Z++)
          le(Z);
        for (ie && z(V, B, U), Z = 0; Z < B.length; Z++)
          oe(Z, !0);
        for (Z = 0; Z < B.length; Z++)
          oe(Z, !1);
        j(H);
        var ve = function(ue, ye) {
          var Ae, pe, ge, we, se, de = [];
          function Te(It, Be, He) {
            var he = Be._id.charAt(0);
            if (It === "histogram2dcontour") {
              var be = Be._counterAxes[0], Re = u.getFromId(ye, be), Ue = he === "x" || be === "x" && Re.type === "category", Xe = he === "y" || be === "y" && Re.type === "category";
              return function(qe, st) {
                return qe === 0 || st === 0 || Ue && qe === He[st].length - 1 || Xe && st === He.length - 1 ? -1 : (he === "y" ? st : qe) - 1;
              };
            }
            return function(qe, st) {
              return he === "y" ? st : qe;
            };
          }
          var Ee = { min: function(It) {
            return s.aggNums(Math.min, null, It);
          }, max: function(It) {
            return s.aggNums(Math.max, null, It);
          }, sum: function(It) {
            return s.aggNums(function(Be, He) {
              return Be + He;
            }, null, It);
          }, total: function(It) {
            return s.aggNums(function(Be, He) {
              return Be + He;
            }, null, It);
          }, mean: function(It) {
            return s.mean(It);
          }, median: function(It) {
            return s.median(It);
          } };
          for (Ae = 0; Ae < ue.length; Ae++) {
            var Me = ue[Ae];
            if (Me.type === "category") {
              var ze = Me.categoryorder.match(R);
              if (ze) {
                var Ie = ze[1], Oe = ze[2], Ze = Me._id.charAt(0), Fe = Ze === "x", Pe = [];
                for (pe = 0; pe < Me._categories.length; pe++)
                  Pe.push([Me._categories[pe], []]);
                for (pe = 0; pe < Me._traceIndices.length; pe++) {
                  var De = Me._traceIndices[pe], Ge = ye._fullData[De];
                  if (Ge.visible === !0) {
                    var Qe = Ge.type;
                    e.traceIs(Ge, "histogram") && (delete Ge._xautoBinFinished, delete Ge._yautoBinFinished);
                    var ot = Qe === "splom", vt = Qe === "scattergl", bt = ye.calcdata[De];
                    for (ge = 0; ge < bt.length; ge++) {
                      var yt, tt, Ke = bt[ge];
                      if (ot) {
                        var mt = Ge._axesDim[Me._id];
                        if (!Fe) {
                          var Ft = Ge._diag[mt][0];
                          Ft && (Me = ye._fullLayout[u.id2name(Ft)]);
                        }
                        var Vt = Ke.trace.dimensions[mt].values;
                        for (we = 0; we < Vt.length; we++)
                          for (yt = Me._categoriesMap[Vt[we]], se = 0; se < Ke.trace.dimensions.length; se++)
                            if (se !== mt) {
                              var Xt = Ke.trace.dimensions[se];
                              Pe[yt][1].push(Xt.values[we]);
                            }
                      } else if (vt) {
                        for (we = 0; we < Ke.t.x.length; we++)
                          Fe ? (yt = Ke.t.x[we], tt = Ke.t.y[we]) : (yt = Ke.t.y[we], tt = Ke.t.x[we]), Pe[yt][1].push(tt);
                        Ke.t && Ke.t._scene && delete Ke.t._scene.dirty;
                      } else if (Ke.hasOwnProperty("z")) {
                        tt = Ke.z;
                        var Gt = Te(Ge.type, Me, tt);
                        for (we = 0; we < tt.length; we++)
                          for (se = 0; se < tt[we].length; se++)
                            (yt = Gt(se, we)) + 1 && Pe[yt][1].push(tt[we][se]);
                      } else
                        for ((yt = Ke.p) === void 0 && (yt = Ke[Ze]), (tt = Ke.s) === void 0 && (tt = Ke.v), tt === void 0 && (tt = Fe ? Ke.y : Ke.x), Array.isArray(tt) || (tt = tt === void 0 ? [] : [tt]), we = 0; we < tt.length; we++)
                          Pe[yt][1].push(tt[we]);
                    }
                  }
                }
                Me._categoriesValue = Pe;
                var nr = [];
                for (pe = 0; pe < Pe.length; pe++)
                  nr.push([Pe[pe][0], Ee[Ie](Pe[pe][1])]);
                nr.sort(function(It, Be) {
                  return It[1] - Be[1];
                }), Me._categoriesAggregatedValue = nr, Me._initialCategories = nr.map(function(It) {
                  return It[0];
                }), Oe === "descending" && Me._initialCategories.reverse(), de = de.concat(Me.sortByInitialCategories());
              }
            }
          }
          return de;
        }(V, H);
        if (ve.length) {
          for (U._numBoxes = 0, U._numViolins = 0, Z = 0; Z < ve.length; Z++)
            oe(ve[Z], !0);
          for (Z = 0; Z < ve.length; Z++)
            oe(ve[Z], !1);
          j(H);
        }
        e.getComponentMethod("fx", "calc")(H), e.getComponentMethod("errorbars", "calc")(H);
      };
      var R = /(total|sum|min|max|mean|median) (ascending|descending)/;
      function z(H, Y, J) {
        var W = {};
        function Z(U) {
          U.clearCalc(), U.type === "multicategory" && U.setupMultiCategory(Y), W[U._id] = 1;
        }
        s.simpleMap(H, Z);
        for (var re = J._axisMatchGroups || [], V = 0; V < re.length; V++)
          for (var B in re[V])
            W[B] || Z(J[u.id2name(B)]);
      }
      function j(H) {
        var Y, J, W, Z = H._fullLayout, re = Z._visibleModules, V = {};
        for (J = 0; J < re.length; J++) {
          var B = re[J], U = B.crossTraceCalc;
          if (U) {
            var ee = B.basePlotModule.name;
            V[ee] ? s.pushUnique(V[ee], U) : V[ee] = [U];
          }
        }
        for (W in V) {
          var N = V[W], K = Z._subplots[W];
          if (Array.isArray(K))
            for (Y = 0; Y < K.length; Y++) {
              var X = K[Y], te = W === "cartesian" ? Z._plots[X] : Z[X];
              for (J = 0; J < N.length; J++)
                N[J](H, te, X);
            }
          else
            for (J = 0; J < N.length; J++)
              N[J](H);
        }
      }
      a.rehover = function(H) {
        H._fullLayout._rehover && H._fullLayout._rehover();
      }, a.redrag = function(H) {
        H._fullLayout._redrag && H._fullLayout._redrag();
      }, a.reselect = function(H) {
        var Y = H._fullLayout, J = (H.layout || {}).selections, W = Y._previousSelections;
        Y._previousSelections = J;
        var Z = Y._reselect || JSON.stringify(J) !== JSON.stringify(W);
        e.getComponentMethod("selections", "reselect")(H, Z);
      }, a.generalUpdatePerTraceModule = function(H, Y, J, W) {
        var Z, re = Y.traceHash, V = {};
        for (Z = 0; Z < J.length; Z++) {
          var B = J[Z], U = B[0].trace;
          U.visible && (V[U.type] = V[U.type] || [], V[U.type].push(B));
        }
        for (var ee in re)
          if (!V[ee]) {
            var N = re[ee][0];
            N[0].trace.visible = !1, V[ee] = [N];
          }
        for (var K in V) {
          var X = V[K];
          X[0][0].trace._module.plot(H, Y, s.filterVisible(X), W);
        }
        Y.traceHash = V;
      }, a.plotBasePlot = function(H, Y, J, W, Z) {
        var re = e.getModule(H), V = i(Y.calcdata, re)[0];
        re.plot(Y, V, W, Z);
      }, a.cleanBasePlot = function(H, Y, J, W, Z) {
        var re = Z._has && Z._has(H), V = J._has && J._has(H);
        re && !V && Z["_" + H + "layer"].selectAll("g.trace").remove();
      };
    }, { "../components/color": 367, "../components/shapes/handle_outline": 468, "../constants/numerical": 491, "../lib": 515, "../plot_api/plot_schema": 554, "../plot_api/plot_template": 555, "../plots/get_data": 602, "../registry": 647, "./animation_attributes": 560, "./attributes": 562, "./cartesian/axis_ids": 570, "./command": 592, "./font_attributes": 594, "./frame_attributes": 595, "./layout_attributes": 619, "@plotly/d3": 58, "d3-format": 112, "d3-time-format": 120, "fast-isnumeric": 190 }], 629: [function(v, Q, $) {
      Q.exports = { attr: "subplot", name: "polar", axisNames: ["angularaxis", "radialaxis"], axisName2dataArray: { angularaxis: "theta", radialaxis: "r" }, layerNames: ["draglayer", "plotbg", "backplot", "angular-grid", "radial-grid", "frontplot", "angular-line", "radial-line", "angular-axis", "radial-axis"], radialDragBoxSize: 50, angularDragBoxSize: 30, cornerLen: 25, cornerHalfWidth: 2, MINDRAG: 8, MINZOOM: 20, OFFEDGE: 20 };
    }, {}], 630: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../lib/polygon").tester, k = m.findIndexOfMin, x = m.isAngleInsideSector, e = m.angleDelta, r = m.angleDist;
      function n(u, o, h, l) {
        var i, p, c = l[0], a = l[1], y = t(Math.sin(o) - Math.sin(u)), f = t(Math.cos(o) - Math.cos(u)), _ = Math.tan(h), b = t(1 / _), w = y / f, T = a - w * c;
        return b ? y && f ? p = _ * (i = T / (_ - w)) : f ? (i = a * b, p = a) : (i = c, p = c * _) : y && f ? (i = 0, p = T) : f ? (i = 0, p = a) : i = p = NaN, [i, p];
      }
      function s(u, o, h, l) {
        return m.isFullCircle([o, h]) ? function(i, p) {
          var c, a = p.length, y = new Array(a + 1);
          for (c = 0; c < a; c++) {
            var f = p[c];
            y[c] = [i * Math.cos(f), i * Math.sin(f)];
          }
          return y[c] = y[0].slice(), y;
        }(u, l) : function(i, p, c, a) {
          var y, f, _ = a.length, b = [];
          function w(z) {
            return [i * Math.cos(z), i * Math.sin(z)];
          }
          function T(z, j, H) {
            return n(z, j, H, w(z));
          }
          function L(z) {
            return m.mod(z, _);
          }
          function A(z) {
            return x(z, [p, c]);
          }
          var I = k(a, function(z) {
            return A(z) ? r(z, p) : 1 / 0;
          }), P = T(a[I], a[L(I - 1)], p);
          for (b.push(P), y = I, f = 0; f < _; y++, f++) {
            var S = a[L(y)];
            if (!A(S))
              break;
            b.push(w(S));
          }
          var E = k(a, function(z) {
            return A(z) ? r(z, c) : 1 / 0;
          }), R = T(a[E], a[L(E + 1)], c);
          return b.push(R), b.push([0, 0]), b.push(b[0].slice()), b;
        }(u, o, h, l);
      }
      function t(u) {
        return Math.abs(u) > 1e-10 ? u : 0;
      }
      function d(u, o, h) {
        o = o || 0, h = h || 0;
        for (var l = u.length, i = new Array(l), p = 0; p < l; p++) {
          var c = u[p];
          i[p] = [o + c[0], h - c[1]];
        }
        return i;
      }
      Q.exports = { isPtInsidePolygon: function(u, o, h, l, i) {
        if (!x(o, l))
          return !1;
        var p, c;
        h[0] < h[1] ? (p = h[0], c = h[1]) : (p = h[1], c = h[0]);
        var a = g(s(p, l[0], l[1], i)), y = g(s(c, l[0], l[1], i)), f = [u * Math.cos(o), u * Math.sin(o)];
        return y.contains(f) && !a.contains(f);
      }, findPolygonOffset: function(u, o, h, l) {
        for (var i = 1 / 0, p = 1 / 0, c = s(u, o, h, l), a = 0; a < c.length; a++) {
          var y = c[a];
          i = Math.min(i, y[0]), p = Math.min(p, -y[1]);
        }
        return [i, p];
      }, findEnclosingVertexAngles: function(u, o) {
        var h = k(o, function(i) {
          var p = e(i, u);
          return p > 0 ? p : 1 / 0;
        }), l = m.mod(h + 1, o.length);
        return [o[h], o[l]];
      }, findIntersectionXY: n, findXYatLength: function(u, o, h, l) {
        var i = -o * h, p = o * o + 1, c = 2 * (o * i - h), a = i * i + h * h - u * u, y = Math.sqrt(c * c - 4 * p * a), f = (-c + y) / (2 * p), _ = (-c - y) / (2 * p);
        return [[f, o * f + i + l], [_, o * _ + i + l]];
      }, clampTiny: t, pathPolygon: function(u, o, h, l, i, p) {
        return "M" + d(s(u, o, h, l), i, p).join("L");
      }, pathPolygonAnnulus: function(u, o, h, l, i, p, c) {
        var a, y;
        u < o ? (a = u, y = o) : (a = o, y = u);
        var f = d(s(a, h, l, i), p, c);
        return "M" + d(s(y, h, l, i), p, c).reverse().join("L") + "M" + f.join("L");
      } };
    }, { "../../lib": 515, "../../lib/polygon": 527 }], 631: [function(v, Q, $) {
      var m = v("../get_data").getSubplotCalcData, g = v("../../lib").counterRegex, k = v("./polar"), x = v("./constants"), e = x.attr, r = x.name, n = g(r), s = {};
      s[e] = { valType: "subplotid", dflt: r, editType: "calc" }, Q.exports = { attr: e, name: r, idRoot: r, idRegex: n, attrRegex: n, attributes: s, layoutAttributes: v("./layout_attributes"), supplyLayoutDefaults: v("./layout_defaults"), plot: function(t) {
        for (var d = t._fullLayout, u = t.calcdata, o = d._subplots[r], h = 0; h < o.length; h++) {
          var l = o[h], i = m(u, r, l), p = d[l]._subplot;
          p || (p = k(t, l), d[l]._subplot = p), p.plot(i, d, t._promises);
        }
      }, clean: function(t, d, u, o) {
        for (var h = o._subplots[r] || [], l = o._has && o._has("gl"), i = d._has && d._has("gl"), p = l && !i, c = 0; c < h.length; c++) {
          var a = h[c], y = o[a]._subplot;
          if (!d[a] && y)
            for (var f in y.framework.remove(), y.layers["radial-axis-title"].remove(), y.clipPaths)
              y.clipPaths[f].remove();
          p && y._scene && (y._scene.destroy(), y._scene = null);
        }
      }, toSVG: v("../cartesian").toSVG };
    }, { "../../lib": 515, "../cartesian": 578, "../get_data": 602, "./constants": 629, "./layout_attributes": 632, "./layout_defaults": 633, "./polar": 634 }], 632: [function(v, Q, $) {
      var m = v("../../components/color/attributes"), g = v("../cartesian/layout_attributes"), k = v("../domain").attributes, x = v("../../lib").extendFlat, e = v("../../plot_api/edit_types").overrideAll, r = e({ color: g.color, showline: x({}, g.showline, { dflt: !0 }), linecolor: g.linecolor, linewidth: g.linewidth, showgrid: x({}, g.showgrid, { dflt: !0 }), gridcolor: g.gridcolor, gridwidth: g.gridwidth, griddash: g.griddash }, "plot", "from-root"), n = e({ tickmode: g.tickmode, nticks: g.nticks, tick0: g.tick0, dtick: g.dtick, tickvals: g.tickvals, ticktext: g.ticktext, ticks: g.ticks, ticklen: g.ticklen, tickwidth: g.tickwidth, tickcolor: g.tickcolor, ticklabelstep: g.ticklabelstep, showticklabels: g.showticklabels, showtickprefix: g.showtickprefix, tickprefix: g.tickprefix, showticksuffix: g.showticksuffix, ticksuffix: g.ticksuffix, showexponent: g.showexponent, exponentformat: g.exponentformat, minexponent: g.minexponent, separatethousands: g.separatethousands, tickfont: g.tickfont, tickangle: g.tickangle, tickformat: g.tickformat, tickformatstops: g.tickformatstops, layer: g.layer }, "plot", "from-root"), s = { visible: x({}, g.visible, { dflt: !0 }), type: x({}, g.type, { values: ["-", "linear", "log", "date", "category"] }), autotypenumbers: g.autotypenumbers, autorange: x({}, g.autorange, { editType: "plot" }), rangemode: { valType: "enumerated", values: ["tozero", "nonnegative", "normal"], dflt: "tozero", editType: "calc" }, range: x({}, g.range, { items: [{ valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }, { valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }], editType: "plot" }), categoryorder: g.categoryorder, categoryarray: g.categoryarray, angle: { valType: "angle", editType: "plot" }, side: { valType: "enumerated", values: ["clockwise", "counterclockwise"], dflt: "clockwise", editType: "plot" }, title: { text: x({}, g.title.text, { editType: "plot", dflt: "" }), font: x({}, g.title.font, { editType: "plot" }), editType: "plot" }, hoverformat: g.hoverformat, uirevision: { valType: "any", editType: "none" }, editType: "calc", _deprecated: { title: g._deprecated.title, titlefont: g._deprecated.titlefont } };
      x(s, r, n);
      var t = { visible: x({}, g.visible, { dflt: !0 }), type: { valType: "enumerated", values: ["-", "linear", "category"], dflt: "-", editType: "calc", _noTemplating: !0 }, autotypenumbers: g.autotypenumbers, categoryorder: g.categoryorder, categoryarray: g.categoryarray, thetaunit: { valType: "enumerated", values: ["radians", "degrees"], dflt: "degrees", editType: "calc" }, period: { valType: "number", editType: "calc", min: 0 }, direction: { valType: "enumerated", values: ["counterclockwise", "clockwise"], dflt: "counterclockwise", editType: "calc" }, rotation: { valType: "angle", editType: "calc" }, hoverformat: g.hoverformat, uirevision: { valType: "any", editType: "none" }, editType: "calc" };
      x(t, r, n), Q.exports = { domain: k({ name: "polar", editType: "plot" }), sector: { valType: "info_array", items: [{ valType: "number", editType: "plot" }, { valType: "number", editType: "plot" }], dflt: [0, 360], editType: "plot" }, hole: { valType: "number", min: 0, max: 1, dflt: 0, editType: "plot" }, bgcolor: { valType: "color", editType: "plot", dflt: m.background }, radialaxis: s, angularaxis: t, gridshape: { valType: "enumerated", values: ["circular", "linear"], dflt: "circular", editType: "plot" }, uirevision: { valType: "any", editType: "none" }, editType: "calc" };
    }, { "../../components/color/attributes": 366, "../../lib": 515, "../../plot_api/edit_types": 548, "../cartesian/layout_attributes": 579, "../domain": 593 }], 633: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../../plot_api/plot_template"), x = v("../subplot_defaults"), e = v("../get_data").getSubplotData, r = v("../cartesian/tick_value_defaults"), n = v("../cartesian/tick_mark_defaults"), s = v("../cartesian/tick_label_defaults"), t = v("../cartesian/prefix_suffix_defaults"), d = v("../cartesian/category_order_defaults"), u = v("../cartesian/line_grid_defaults"), o = v("../cartesian/axis_autotype"), h = v("./layout_attributes"), l = v("./set_convert"), i = v("./constants"), p = i.axisNames;
      function c(y, f, _, b) {
        var w = _("bgcolor");
        b.bgColor = g.combine(w, b.paper_bgcolor);
        var T = _("sector");
        _("hole");
        var L, A = e(b.fullData, i.name, b.id), I = b.layoutOut;
        function P(ee, N) {
          return _(L + "." + ee, N);
        }
        for (var S = 0; S < p.length; S++) {
          L = p[S], m.isPlainObject(y[L]) || (y[L] = {});
          var E = y[L], R = k.newContainer(f, L);
          R._id = R._name = L, R._attr = b.id + "." + L, R._traceIndices = A.map(function(ee) {
            return ee._expandedIndex;
          });
          var z = i.axisName2dataArray[L], j = a(E, R, P, A, z, b);
          d(E, R, P, { axData: A, dataAttr: z });
          var H = P("visible");
          switch (l(R, f, I), P("uirevision", f.uirevision), R._m = 1, L) {
            case "radialaxis":
              var Y = P("autorange", !R.isValidRange(E.range));
              E.autorange = Y, !Y || j !== "linear" && j !== "-" || P("rangemode"), Y === "reversed" && (R._m = -1), P("range"), R.cleanRange("range", { dfltRange: [0, 1] });
              break;
            case "angularaxis":
              if (j === "date") {
                m.log("Polar plots do not support date angular axes yet.");
                for (var J = 0; J < A.length; J++)
                  A[J].visible = !1;
                j = E.type = R.type = "linear";
              }
              P(j === "linear" ? "thetaunit" : "period");
              var W = P("direction");
              P("rotation", { counterclockwise: 0, clockwise: 90 }[W]);
          }
          if (t(E, R, P, R.type, { tickSuffixDflt: R.thetaunit === "degrees" ? "\xB0" : void 0 }), H) {
            var Z, re, V, B, U = b.font || {};
            re = (Z = P("color")) === E.color ? Z : U.color, V = U.size, B = U.family, r(E, R, P, R.type), s(E, R, P, R.type, { font: { color: re, size: V, family: B } }), n(E, R, P, { outerTicks: !0 }), u(E, R, P, { dfltColor: Z, bgColor: b.bgColor, blend: 60, showLine: !0, showGrid: !0, noZeroLine: !0, attributes: h[L] }), P("layer"), L === "radialaxis" && (P("side"), P("angle", T[0]), P("title.text"), m.coerceFont(P, "title.font", { color: re, size: m.bigFont(V), family: B }));
          }
          j !== "category" && P("hoverformat"), R._input = E;
        }
        f.angularaxis.type === "category" && _("gridshape");
      }
      function a(y, f, _, b, w, T) {
        var L = _("autotypenumbers", T.autotypenumbersDflt);
        if (_("type") === "-") {
          for (var A, I = 0; I < b.length; I++)
            if (b[I].visible) {
              A = b[I];
              break;
            }
          A && A[w] && (f.type = o(A[w], "gregorian", { noMultiCategory: !0, autotypenumbers: L })), f.type === "-" ? f.type = "linear" : y.type = f.type;
        }
        return f.type;
      }
      Q.exports = function(y, f, _) {
        x(y, f, _, { type: i.name, attributes: h, handleDefaults: c, font: f.font, autotypenumbersDflt: f.autotypenumbers, paper_bgcolor: f.paper_bgcolor, fullData: _, layoutOut: f });
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../plot_api/plot_template": 555, "../cartesian/axis_autotype": 567, "../cartesian/category_order_defaults": 571, "../cartesian/line_grid_defaults": 581, "../cartesian/prefix_suffix_defaults": 583, "../cartesian/tick_label_defaults": 587, "../cartesian/tick_mark_defaults": 588, "../cartesian/tick_value_defaults": 589, "../get_data": 602, "../subplot_defaults": 641, "./constants": 629, "./layout_attributes": 632, "./set_convert": 635 }], 634: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("tinycolor2"), k = v("../../registry"), x = v("../../lib"), e = x.strRotate, r = x.strTranslate, n = v("../../components/color"), s = v("../../components/drawing"), t = v("../plots"), d = v("../../plots/cartesian/axes"), u = v("../cartesian/set_convert"), o = v("./set_convert"), h = v("../cartesian/autorange").doAutoRange, l = v("../cartesian/dragbox"), i = v("../../components/dragelement"), p = v("../../components/fx"), c = v("../../components/titles"), a = v("../../components/selections").prepSelect, y = v("../../components/selections").selectOnClick, f = v("../../components/selections").clearOutline, _ = v("../../lib/setcursor"), b = v("../../lib/clear_gl_canvases"), w = v("../../plot_api/subroutines").redrawReglTraces, T = v("../../constants/alignment").MID_SHIFT, L = v("./constants"), A = v("./helpers"), I = v("../smith/helpers"), P = I.smith, S = I.reactanceArc, E = I.resistanceArc, R = I.smithTransform, z = x._, j = x.mod, H = x.deg2rad, Y = x.rad2deg;
      function J(B, U, ee) {
        this.isSmith = ee || !1, this.id = U, this.gd = B, this._hasClipOnAxisFalse = null, this.vangles = null, this.radialAxisAngle = null, this.traceHash = {}, this.layers = {}, this.clipPaths = {}, this.clipIds = {}, this.viewInitial = {};
        var N = B._fullLayout, K = "clip" + N._uid + U;
        this.clipIds.forTraces = K + "-for-traces", this.clipPaths.forTraces = N._clips.append("clipPath").attr("id", this.clipIds.forTraces), this.clipPaths.forTraces.append("path"), this.framework = N["_" + (ee ? "smith" : "polar") + "layer"].append("g").attr("class", U), this.getHole = function(X) {
          return this.isSmith ? 0 : X.hole;
        }, this.getSector = function(X) {
          return this.isSmith ? [0, 360] : X.sector;
        }, this.getRadial = function(X) {
          return this.isSmith ? X.realaxis : X.radialaxis;
        }, this.getAngular = function(X) {
          return this.isSmith ? X.imaginaryaxis : X.angularaxis;
        }, ee || (this.radialTickLayout = null, this.angularTickLayout = null);
      }
      var W = J.prototype;
      function Z(B) {
        var U = B.ticks + String(B.ticklen) + String(B.showticklabels);
        return "side" in B && (U += B.side), U;
      }
      function re(B, U) {
        return U[x.findIndexOfMin(U, function(ee) {
          return x.angleDist(B, ee);
        })];
      }
      function V(B, U, ee) {
        return U ? (B.attr("display", null), B.attr(ee)) : B && B.attr("display", "none"), B;
      }
      Q.exports = function(B, U, ee) {
        return new J(B, U, ee);
      }, W.plot = function(B, U) {
        for (var ee = U[this.id], N = !1, K = 0; K < B.length; K++)
          if (B[K][0].trace.cliponaxis === !1) {
            N = !0;
            break;
          }
        this._hasClipOnAxisFalse = N, this.updateLayers(U, ee), this.updateLayout(U, ee), t.generalUpdatePerTraceModule(this.gd, this, B, ee), this.updateFx(U, ee), this.isSmith && (delete ee.realaxis.range, delete ee.imaginaryaxis.range);
      }, W.updateLayers = function(B, U) {
        var ee = this.isSmith, N = this.layers, K = this.getRadial(U), X = this.getAngular(U), te = L.layerNames, ie = te.indexOf("frontplot"), le = te.slice(0, ie), oe = X.layer === "below traces", ve = K.layer === "below traces";
        oe && le.push("angular-line"), ve && le.push("radial-line"), oe && le.push("angular-axis"), ve && le.push("radial-axis"), le.push("frontplot"), oe || le.push("angular-line"), ve || le.push("radial-line"), oe || le.push("angular-axis"), ve || le.push("radial-axis");
        var ue = (ee ? "smith" : "polar") + "sublayer", ye = this.framework.selectAll("." + ue).data(le, String);
        ye.enter().append("g").attr("class", function(Ae) {
          return ue + " " + Ae;
        }).each(function(Ae) {
          var pe = N[Ae] = m.select(this);
          switch (Ae) {
            case "frontplot":
              ee || pe.append("g").classed("barlayer", !0), pe.append("g").classed("scatterlayer", !0);
              break;
            case "backplot":
              pe.append("g").classed("maplayer", !0);
              break;
            case "plotbg":
              N.bg = pe.append("path");
              break;
            case "radial-grid":
            case "angular-grid":
              pe.style("fill", "none");
              break;
            case "radial-line":
              pe.append("line").style("fill", "none");
              break;
            case "angular-line":
              pe.append("path").style("fill", "none");
          }
        }), ye.order();
      }, W.updateLayout = function(B, U) {
        var ee = this.layers, N = B._size, K = this.getRadial(U), X = this.getAngular(U), te = U.domain.x, ie = U.domain.y;
        this.xOffset = N.l + N.w * te[0], this.yOffset = N.t + N.h * (1 - ie[1]);
        var le = this.xLength = N.w * (te[1] - te[0]), oe = this.yLength = N.h * (ie[1] - ie[0]), ve = this.getSector(U);
        this.sectorInRad = ve.map(H);
        var ue, ye, Ae, pe, ge, we = this.sectorBBox = function(vt) {
          var bt, yt, tt, Ke, mt = vt[0], Ft = vt[1] - mt, Vt = j(mt, 360), Xt = Vt + Ft, Gt = Math.cos(H(Vt)), nr = Math.sin(H(Vt)), It = Math.cos(H(Xt)), Be = Math.sin(H(Xt));
          return Ke = Vt <= 90 && Xt >= 90 || Vt > 90 && Xt >= 450 ? 1 : nr <= 0 && Be <= 0 ? 0 : Math.max(nr, Be), bt = Vt <= 180 && Xt >= 180 || Vt > 180 && Xt >= 540 ? -1 : Gt >= 0 && It >= 0 ? 0 : Math.min(Gt, It), yt = Vt <= 270 && Xt >= 270 || Vt > 270 && Xt >= 630 ? -1 : nr >= 0 && Be >= 0 ? 0 : Math.min(nr, Be), tt = Xt >= 360 ? 1 : Gt <= 0 && It <= 0 ? 0 : Math.max(Gt, It), [bt, yt, tt, Ke];
        }(ve), se = we[2] - we[0], de = we[3] - we[1], Te = oe / le, Ee = Math.abs(de / se);
        Te > Ee ? (ue = le, ge = (oe - (ye = le * Ee)) / N.h / 2, Ae = [te[0], te[1]], pe = [ie[0] + ge, ie[1] - ge]) : (ye = oe, ge = (le - (ue = oe / Ee)) / N.w / 2, Ae = [te[0] + ge, te[1] - ge], pe = [ie[0], ie[1]]), this.xLength2 = ue, this.yLength2 = ye, this.xDomain2 = Ae, this.yDomain2 = pe;
        var Me, ze = this.xOffset2 = N.l + N.w * Ae[0], Ie = this.yOffset2 = N.t + N.h * (1 - pe[1]), Oe = this.radius = ue / se, Ze = this.innerRadius = this.getHole(U) * Oe, Fe = this.cx = ze - Oe * we[0], Pe = this.cy = Ie + Oe * we[3], De = this.cxx = Fe - ze, Ge = this.cyy = Pe - Ie, Qe = K.side;
        Qe === "counterclockwise" ? (Me = Qe, Qe = "top") : Qe === "clockwise" && (Me = Qe, Qe = "bottom"), this.radialAxis = this.mockAxis(B, U, K, { _id: "x", side: Qe, _trueSide: Me, domain: [Ze / N.w, Oe / N.w] }), this.angularAxis = this.mockAxis(B, U, X, { side: "right", domain: [0, Math.PI], autorange: !1 }), this.doAutoRange(B, U), this.updateAngularAxis(B, U), this.updateRadialAxis(B, U), this.updateRadialAxisTitle(B, U), this.xaxis = this.mockCartesianAxis(B, U, { _id: "x", domain: Ae }), this.yaxis = this.mockCartesianAxis(B, U, { _id: "y", domain: pe });
        var ot = this.pathSubplot();
        this.clipPaths.forTraces.select("path").attr("d", ot).attr("transform", r(De, Ge)), ee.frontplot.attr("transform", r(ze, Ie)).call(s.setClipUrl, this._hasClipOnAxisFalse ? null : this.clipIds.forTraces, this.gd), ee.bg.attr("d", ot).attr("transform", r(Fe, Pe)).call(n.fill, U.bgcolor);
      }, W.mockAxis = function(B, U, ee, N) {
        var K = x.extendFlat({}, ee, N);
        return o(K, U, B), K;
      }, W.mockCartesianAxis = function(B, U, ee) {
        var N = this, K = N.isSmith, X = ee._id, te = x.extendFlat({ type: "linear" }, ee);
        u(te, B);
        var ie = { x: [0, 2], y: [1, 3] };
        return te.setRange = function() {
          var le = N.sectorBBox, oe = ie[X], ve = N.radialAxis._rl, ue = (ve[1] - ve[0]) / (1 - N.getHole(U));
          te.range = [le[oe[0]] * ue, le[oe[1]] * ue];
        }, te.isPtWithinRange = X !== "x" || K ? function() {
          return !0;
        } : function(le) {
          return N.isPtInside(le);
        }, te.setRange(), te.setScale(), te;
      }, W.doAutoRange = function(B, U) {
        var ee = this.gd, N = this.radialAxis, K = this.getRadial(U);
        h(ee, N);
        var X = N.range;
        K.range = X.slice(), K._input.range = X.slice(), N._rl = [N.r2l(X[0], null, "gregorian"), N.r2l(X[1], null, "gregorian")];
      }, W.updateRadialAxis = function(B, U) {
        var ee = this, N = ee.gd, K = ee.layers, X = ee.radius, te = ee.innerRadius, ie = ee.cx, le = ee.cy, oe = ee.getRadial(U), ve = j(ee.getSector(U)[0], 360), ue = ee.radialAxis, ye = te < X, Ae = ee.isSmith;
        Ae || (ee.fillViewInitialKey("radialaxis.angle", oe.angle), ee.fillViewInitialKey("radialaxis.range", ue.range.slice()), ue.setGeometry()), ue.tickangle === "auto" && ve > 90 && ve <= 270 && (ue.tickangle = 180);
        var pe = Ae ? function(Oe) {
          var Ze = R(ee, P([Oe.x, 0]));
          return r(Ze[0] - ie, Ze[1] - le);
        } : function(Oe) {
          return r(ue.l2p(Oe.x) + te, 0);
        }, ge = Ae ? function(Oe) {
          return E(ee, Oe.x, -1 / 0, 1 / 0);
        } : function(Oe) {
          return ee.pathArc(ue.r2p(Oe.x) + te);
        }, we = Z(oe);
        if (ee.radialTickLayout !== we && (K["radial-axis"].selectAll(".xtick").remove(), ee.radialTickLayout = we), ye) {
          ue.setScale();
          var se = 0, de = Ae ? (ue.tickvals || []).filter(function(Oe) {
            return Oe >= 0;
          }).map(function(Oe) {
            return d.tickText(ue, Oe, !0, !1);
          }) : d.calcTicks(ue), Te = Ae ? de : d.clipEnds(ue, de), Ee = d.getTickSigns(ue)[2];
          Ae && ((ue.ticks === "top" && ue.side === "bottom" || ue.ticks === "bottom" && ue.side === "top") && (Ee = -Ee), ue.ticks === "top" && ue.side === "top" && (se = -ue.ticklen), ue.ticks === "bottom" && ue.side === "bottom" && (se = ue.ticklen)), d.drawTicks(N, ue, { vals: de, layer: K["radial-axis"], path: d.makeTickPath(ue, 0, Ee), transFn: pe, crisp: !1 }), d.drawGrid(N, ue, { vals: Te, layer: K["radial-grid"], path: ge, transFn: x.noop, crisp: !1 }), d.drawLabels(N, ue, { vals: de, layer: K["radial-axis"], transFn: pe, labelFns: d.makeLabelFns(ue, se) });
        }
        var Me = ee.radialAxisAngle = ee.vangles ? Y(re(H(oe.angle), ee.vangles)) : oe.angle, ze = r(ie, le), Ie = ze + e(-Me);
        V(K["radial-axis"], ye && (oe.showticklabels || oe.ticks), { transform: Ie }), V(K["radial-grid"], ye && oe.showgrid, { transform: Ae ? "" : ze }), V(K["radial-line"].select("line"), ye && oe.showline, { x1: Ae ? -X : te, y1: 0, x2: X, y2: 0, transform: Ie }).attr("stroke-width", oe.linewidth).call(n.stroke, oe.linecolor);
      }, W.updateRadialAxisTitle = function(B, U, ee) {
        if (!this.isSmith) {
          var N = this.gd, K = this.radius, X = this.cx, te = this.cy, ie = this.getRadial(U), le = this.id + "title", oe = 0;
          if (ie.title) {
            var ve = s.bBox(this.layers["radial-axis"].node()).height, ue = ie.title.font.size, ye = ie.side;
            oe = ye === "top" ? ue : ye === "counterclockwise" ? -(ve + 0.4 * ue) : ve + 0.8 * ue;
          }
          var Ae = ee !== void 0 ? ee : this.radialAxisAngle, pe = H(Ae), ge = Math.cos(pe), we = Math.sin(pe), se = X + K / 2 * ge + oe * we, de = te - K / 2 * we + oe * ge;
          this.layers["radial-axis-title"] = c.draw(N, le, { propContainer: ie, propName: this.id + ".radialaxis.title", placeholder: z(N, "Click to enter radial axis title"), attributes: { x: se, y: de, "text-anchor": "middle" }, transform: { rotate: -Ae } });
        }
      }, W.updateAngularAxis = function(B, U) {
        var ee = this, N = ee.gd, K = ee.layers, X = ee.radius, te = ee.innerRadius, ie = ee.cx, le = ee.cy, oe = ee.getAngular(U), ve = ee.angularAxis, ue = ee.isSmith;
        ue || (ee.fillViewInitialKey("angularaxis.rotation", oe.rotation), ve.setGeometry(), ve.setScale());
        var ye = ue ? function(Oe) {
          var Ze = R(ee, P([0, Oe.x]));
          return Math.atan2(Ze[0] - ie, Ze[1] - le) - Math.PI / 2;
        } : function(Oe) {
          return ve.t2g(Oe.x);
        };
        ve.type === "linear" && ve.thetaunit === "radians" && (ve.tick0 = Y(ve.tick0), ve.dtick = Y(ve.dtick));
        var Ae = function(Oe) {
          return r(ie + X * Math.cos(Oe), le - X * Math.sin(Oe));
        }, pe = ue ? function(Oe) {
          var Ze = R(ee, P([0, Oe.x]));
          return r(Ze[0], Ze[1]);
        } : function(Oe) {
          return Ae(ye(Oe));
        }, ge = ue ? function(Oe) {
          var Ze = R(ee, P([0, Oe.x])), Fe = Math.atan2(Ze[0] - ie, Ze[1] - le) - Math.PI / 2;
          return r(Ze[0], Ze[1]) + e(-Y(Fe));
        } : function(Oe) {
          var Ze = ye(Oe);
          return Ae(Ze) + e(-Y(Ze));
        }, we = ue ? function(Oe) {
          return S(ee, Oe.x, 0, 1 / 0);
        } : function(Oe) {
          var Ze = ye(Oe), Fe = Math.cos(Ze), Pe = Math.sin(Ze);
          return "M" + [ie + te * Fe, le - te * Pe] + "L" + [ie + X * Fe, le - X * Pe];
        }, se = d.makeLabelFns(ve, 0).labelStandoff, de = { xFn: function(Oe) {
          var Ze = ye(Oe);
          return Math.cos(Ze) * se;
        }, yFn: function(Oe) {
          var Ze = ye(Oe), Fe = Math.sin(Ze) > 0 ? 0.2 : 1;
          return -Math.sin(Ze) * (se + Oe.fontSize * Fe) + Math.abs(Math.cos(Ze)) * (Oe.fontSize * T);
        }, anchorFn: function(Oe) {
          var Ze = ye(Oe), Fe = Math.cos(Ze);
          return Math.abs(Fe) < 0.1 ? "middle" : Fe > 0 ? "start" : "end";
        }, heightFn: function(Oe, Ze, Fe) {
          var Pe = ye(Oe);
          return -0.5 * (1 + Math.sin(Pe)) * Fe;
        } }, Te = Z(oe);
        ee.angularTickLayout !== Te && (K["angular-axis"].selectAll("." + ve._id + "tick").remove(), ee.angularTickLayout = Te);
        var Ee, Me = ue ? [1 / 0].concat(ve.tickvals || []).map(function(Oe) {
          return d.tickText(ve, Oe, !0, !1);
        }) : d.calcTicks(ve);
        if (ue && (Me[0].text = "\u221E", Me[0].fontSize *= 1.75), U.gridshape === "linear" ? (Ee = Me.map(ye), x.angleDelta(Ee[0], Ee[1]) < 0 && (Ee = Ee.slice().reverse())) : Ee = null, ee.vangles = Ee, ve.type === "category" && (Me = Me.filter(function(Oe) {
          return x.isAngleInsideSector(ye(Oe), ee.sectorInRad);
        })), ve.visible) {
          var ze = ve.ticks === "inside" ? -1 : 1, Ie = (ve.linewidth || 1) / 2;
          d.drawTicks(N, ve, { vals: Me, layer: K["angular-axis"], path: "M" + ze * Ie + ",0h" + ze * ve.ticklen, transFn: ge, crisp: !1 }), d.drawGrid(N, ve, { vals: Me, layer: K["angular-grid"], path: we, transFn: x.noop, crisp: !1 }), d.drawLabels(N, ve, { vals: Me, layer: K["angular-axis"], repositionOnUpdate: !0, transFn: pe, labelFns: de });
        }
        V(K["angular-line"].select("path"), oe.showline, { d: ee.pathSubplot(), transform: r(ie, le) }).attr("stroke-width", oe.linewidth).call(n.stroke, oe.linecolor);
      }, W.updateFx = function(B, U) {
        this.gd._context.staticPlot || (!this.isSmith && (this.updateAngularDrag(B), this.updateRadialDrag(B, U, 0), this.updateRadialDrag(B, U, 1)), this.updateHoverAndMainDrag(B));
      }, W.updateHoverAndMainDrag = function(B) {
        var U, ee, N = this, K = N.isSmith, X = N.gd, te = N.layers, ie = B._zoomlayer, le = L.MINZOOM, oe = L.OFFEDGE, ve = N.radius, ue = N.innerRadius, ye = N.cx, Ae = N.cy, pe = N.cxx, ge = N.cyy, we = N.sectorInRad, se = N.vangles, de = N.radialAxis, Te = A.clampTiny, Ee = A.findXYatLength, Me = A.findEnclosingVertexAngles, ze = L.cornerHalfWidth, Ie = L.cornerLen / 2, Oe = l.makeDragger(te, "path", "maindrag", B.dragmode === !1 ? "none" : "crosshair");
        m.select(Oe).attr("d", N.pathSubplot()).attr("transform", r(ye, Ae)), Oe.onmousemove = function(Ue) {
          p.hover(X, Ue, N.id), X._fullLayout._lasthover = Oe, X._fullLayout._hoversubplot = N.id;
        }, Oe.onmouseout = function(Ue) {
          X._dragging || i.unhover(X, Ue);
        };
        var Ze, Fe, Pe, De, Ge, Qe, ot, vt, bt, yt = { element: Oe, gd: X, subplot: N.id, plotinfo: { id: N.id, xaxis: N.xaxis, yaxis: N.yaxis }, xaxes: [N.xaxis], yaxes: [N.yaxis] };
        function tt(Ue, Xe) {
          return Math.sqrt(Ue * Ue + Xe * Xe);
        }
        function Ke(Ue, Xe) {
          return tt(Ue - pe, Xe - ge);
        }
        function mt(Ue, Xe) {
          return Math.atan2(ge - Xe, Ue - pe);
        }
        function Ft(Ue, Xe) {
          return [Ue * Math.cos(Xe), Ue * Math.sin(-Xe)];
        }
        function Vt(Ue, Xe) {
          if (Ue === 0)
            return N.pathSector(2 * ze);
          var qe = Ie / Ue, st = Xe - qe, it = Xe + qe, Tt = Math.max(0, Math.min(Ue, ve)), Pt = Tt - ze, rt = Tt + ze;
          return "M" + Ft(Pt, st) + "A" + [Pt, Pt] + " 0,0,0 " + Ft(Pt, it) + "L" + Ft(rt, it) + "A" + [rt, rt] + " 0,0,1 " + Ft(rt, st) + "Z";
        }
        function Xt(Ue, Xe, qe) {
          if (Ue === 0)
            return N.pathSector(2 * ze);
          var st, it, Tt = Ft(Ue, Xe), Pt = Ft(Ue, qe), rt = Te((Tt[0] + Pt[0]) / 2), ut = Te((Tt[1] + Pt[1]) / 2);
          if (rt && ut) {
            var Bt = ut / rt, wt = -1 / Bt, Lt = Ee(ze, Bt, rt, ut);
            st = Ee(Ie, wt, Lt[0][0], Lt[0][1]), it = Ee(Ie, wt, Lt[1][0], Lt[1][1]);
          } else {
            var Se, We;
            ut ? (Se = Ie, We = ze) : (Se = ze, We = Ie), st = [[rt - Se, ut - We], [rt + Se, ut - We]], it = [[rt - Se, ut + We], [rt + Se, ut + We]];
          }
          return "M" + st.join("L") + "L" + it.reverse().join("L") + "Z";
        }
        function Gt(Ue, Xe) {
          return Xe = Math.max(Math.min(Xe, ve), ue), Ue < oe ? Ue = 0 : ve - Ue < oe ? Ue = ve : Xe < oe ? Xe = 0 : ve - Xe < oe && (Xe = ve), Math.abs(Xe - Ue) > le ? (Ue < Xe ? (Pe = Ue, De = Xe) : (Pe = Xe, De = Ue), !0) : (Pe = null, De = null, !1);
        }
        function nr(Ue, Xe) {
          Ue = Ue || Ge, Xe = Xe || "M0,0Z", vt.attr("d", Ue), bt.attr("d", Xe), l.transitionZoombox(vt, bt, Qe, ot), Qe = !0;
          var qe = {};
          be(qe), X.emit("plotly_relayouting", qe);
        }
        function It(Ue, Xe) {
          var qe, st, it = Ze + (Ue *= U), Tt = Fe + (Xe *= ee), Pt = Ke(Ze, Fe), rt = Math.min(Ke(it, Tt), ve), ut = mt(Ze, Fe);
          Gt(Pt, rt) && (qe = Ge + N.pathSector(De), Pe && (qe += N.pathSector(Pe)), st = Vt(Pe, ut) + Vt(De, ut)), nr(qe, st);
        }
        function Be(Ue, Xe, qe, st) {
          var it = A.findIntersectionXY(qe, st, qe, [Ue - pe, ge - Xe]);
          return tt(it[0], it[1]);
        }
        function He(Ue, Xe) {
          var qe, st, it = Ze + Ue, Tt = Fe + Xe, Pt = mt(Ze, Fe), rt = mt(it, Tt), ut = Me(Pt, se), Bt = Me(rt, se);
          Gt(Be(Ze, Fe, ut[0], ut[1]), Math.min(Be(it, Tt, Bt[0], Bt[1]), ve)) && (qe = Ge + N.pathSector(De), Pe && (qe += N.pathSector(Pe)), st = [Xt(Pe, ut[0], ut[1]), Xt(De, ut[0], ut[1])].join(" ")), nr(qe, st);
        }
        function he() {
          if (l.removeZoombox(X), Pe !== null && De !== null) {
            var Ue = {};
            be(Ue), l.showDoubleClickNotifier(X), k.call("_guiRelayout", X, Ue);
          }
        }
        function be(Ue) {
          var Xe = de._rl, qe = (Xe[1] - Xe[0]) / (1 - ue / ve) / ve, st = [Xe[0] + (Pe - ue) * qe, Xe[0] + (De - ue) * qe];
          Ue[N.id + ".radialaxis.range"] = st;
        }
        function Re(Ue, Xe) {
          var qe = X._fullLayout.clickmode;
          if (l.removeZoombox(X), Ue === 2) {
            var st = {};
            for (var it in N.viewInitial)
              st[N.id + "." + it] = N.viewInitial[it];
            X.emit("plotly_doubleclick", null), k.call("_guiRelayout", X, st);
          }
          qe.indexOf("select") > -1 && Ue === 1 && y(Xe, X, [N.xaxis], [N.yaxis], N.id, yt), qe.indexOf("event") > -1 && p.click(X, Xe, N.id);
        }
        yt.prepFn = function(Ue, Xe, qe) {
          var st = X._fullLayout.dragmode, it = Oe.getBoundingClientRect();
          X._fullLayout._calcInverseTransform(X);
          var Tt = X._fullLayout._invTransform;
          U = X._fullLayout._invScaleX, ee = X._fullLayout._invScaleY;
          var Pt = x.apply3DTransform(Tt)(Xe - it.left, qe - it.top);
          if (Ze = Pt[0], Fe = Pt[1], se) {
            var rt = A.findPolygonOffset(ve, we[0], we[1], se);
            Ze += pe + rt[0], Fe += ge + rt[1];
          }
          switch (st) {
            case "zoom":
              yt.clickFn = Re, K || (yt.moveFn = se ? He : It, yt.doneFn = he, function() {
                Pe = null, De = null, Ge = N.pathSubplot(), Qe = !1;
                var ut = X._fullLayout[N.id];
                ot = g(ut.bgcolor).getLuminance(), (vt = l.makeZoombox(ie, ot, ye, Ae, Ge)).attr("fill-rule", "evenodd"), bt = l.makeCorners(ie, ye, Ae), f(X);
              }());
              break;
            case "select":
            case "lasso":
              a(Ue, Xe, qe, yt, st);
          }
        }, i.init(yt);
      }, W.updateRadialDrag = function(B, U, ee) {
        var N = this, K = N.gd, X = N.layers, te = N.radius, ie = N.innerRadius, le = N.cx, oe = N.cy, ve = N.radialAxis, ue = L.radialDragBoxSize, ye = ue / 2;
        if (ve.visible) {
          var Ae, pe, ge, we = H(N.radialAxisAngle), se = ve._rl, de = se[0], Te = se[1], Ee = se[ee], Me = 0.75 * (se[1] - se[0]) / (1 - N.getHole(U)) / te;
          ee ? (Ae = le + (te + ye) * Math.cos(we), pe = oe - (te + ye) * Math.sin(we), ge = "radialdrag") : (Ae = le + (ie - ye) * Math.cos(we), pe = oe - (ie - ye) * Math.sin(we), ge = "radialdrag-inner");
          var ze, Ie, Oe, Ze = l.makeRectDragger(X, ge, "crosshair", -ye, -ye, ue, ue), Fe = { element: Ze, gd: K };
          B.dragmode === !1 && (Fe.dragmode = !1), V(m.select(Ze), ve.visible && ie < te, { transform: r(Ae, pe) }), Fe.prepFn = function() {
            ze = null, Ie = null, Oe = null, Fe.moveFn = Pe, Fe.doneFn = De, f(K);
          }, Fe.clampFn = function(ot, vt) {
            return Math.sqrt(ot * ot + vt * vt) < L.MINDRAG && (ot = 0, vt = 0), [ot, vt];
          }, i.init(Fe);
        }
        function Pe(ot, vt) {
          if (ze)
            ze(ot, vt);
          else {
            var bt = [ot, -vt], yt = [Math.cos(we), Math.sin(we)], tt = Math.abs(x.dot(bt, yt) / Math.sqrt(x.dot(bt, bt)));
            isNaN(tt) || (ze = tt < 0.5 ? Ge : Qe);
          }
          var Ke = {};
          (function(mt) {
            Ie !== null ? mt[N.id + ".radialaxis.angle"] = Ie : Oe !== null && (mt[N.id + ".radialaxis.range[" + ee + "]"] = Oe);
          })(Ke), K.emit("plotly_relayouting", Ke);
        }
        function De() {
          Ie !== null ? k.call("_guiRelayout", K, N.id + ".radialaxis.angle", Ie) : Oe !== null && k.call("_guiRelayout", K, N.id + ".radialaxis.range[" + ee + "]", Oe);
        }
        function Ge(ot, vt) {
          if (ee !== 0) {
            var bt = Ae + ot, yt = pe + vt;
            Ie = Math.atan2(oe - yt, bt - le), N.vangles && (Ie = re(Ie, N.vangles)), Ie = Y(Ie);
            var tt = r(le, oe) + e(-Ie);
            X["radial-axis"].attr("transform", tt), X["radial-line"].select("line").attr("transform", tt);
            var Ke = N.gd._fullLayout, mt = Ke[N.id];
            N.updateRadialAxisTitle(Ke, mt, Ie);
          }
        }
        function Qe(ot, vt) {
          var bt = x.dot([ot, -vt], [Math.cos(we), Math.sin(we)]);
          if (Oe = Ee - Me * bt, Me > 0 == (ee ? Oe > de : Oe < Te)) {
            var yt = K._fullLayout, tt = yt[N.id];
            ve.range[ee] = Oe, ve._rl[ee] = Oe, N.updateRadialAxis(yt, tt), N.xaxis.setRange(), N.xaxis.setScale(), N.yaxis.setRange(), N.yaxis.setScale();
            var Ke = !1;
            for (var mt in N.traceHash) {
              var Ft = N.traceHash[mt], Vt = x.filterVisible(Ft);
              Ft[0][0].trace._module.plot(K, N, Vt, tt), k.traceIs(mt, "gl") && Vt.length && (Ke = !0);
            }
            Ke && (b(K), w(K));
          } else
            Oe = null;
        }
      }, W.updateAngularDrag = function(B) {
        var U = this, ee = U.gd, N = U.layers, K = U.radius, X = U.angularAxis, te = U.cx, ie = U.cy, le = U.cxx, oe = U.cyy, ve = L.angularDragBoxSize, ue = l.makeDragger(N, "path", "angulardrag", B.dragmode === !1 ? "none" : "move"), ye = { element: ue, gd: ee };
        function Ae(Fe, Pe) {
          return Math.atan2(oe + ve - Pe, Fe - le - ve);
        }
        B.dragmode === !1 ? ye.dragmode = !1 : m.select(ue).attr("d", U.pathAnnulus(K, K + ve)).attr("transform", r(te, ie)).call(_, "move");
        var pe, ge, we, se, de, Te, Ee = N.frontplot.select(".scatterlayer").selectAll(".trace"), Me = Ee.selectAll(".point"), ze = Ee.selectAll(".textpoint");
        function Ie(Fe, Pe) {
          var De = U.gd._fullLayout, Ge = De[U.id], Qe = Ae(pe + Fe * B._invScaleX, ge + Pe * B._invScaleY), ot = Y(Qe - Te);
          if (se = we + ot, N.frontplot.attr("transform", r(U.xOffset2, U.yOffset2) + e([-ot, le, oe])), U.vangles) {
            de = U.radialAxisAngle + ot;
            var vt = r(te, ie) + e(-ot), bt = r(te, ie) + e(-de);
            N.bg.attr("transform", vt), N["radial-grid"].attr("transform", vt), N["radial-axis"].attr("transform", bt), N["radial-line"].select("line").attr("transform", bt), U.updateRadialAxisTitle(De, Ge, de);
          } else
            U.clipPaths.forTraces.select("path").attr("transform", r(le, oe) + e(ot));
          Me.each(function() {
            var Vt = m.select(this), Xt = s.getTranslate(Vt);
            Vt.attr("transform", r(Xt.x, Xt.y) + e([ot]));
          }), ze.each(function() {
            var Vt = m.select(this), Xt = Vt.select("text"), Gt = s.getTranslate(Vt);
            Vt.attr("transform", e([ot, Xt.attr("x"), Xt.attr("y")]) + r(Gt.x, Gt.y));
          }), X.rotation = x.modHalf(se, 360), U.updateAngularAxis(De, Ge), U._hasClipOnAxisFalse && !x.isFullCircle(U.sectorInRad) && Ee.call(s.hideOutsideRangePoints, U);
          var yt = !1;
          for (var tt in U.traceHash)
            if (k.traceIs(tt, "gl")) {
              var Ke = U.traceHash[tt], mt = x.filterVisible(Ke);
              Ke[0][0].trace._module.plot(ee, U, mt, Ge), mt.length && (yt = !0);
            }
          yt && (b(ee), w(ee));
          var Ft = {};
          Oe(Ft), ee.emit("plotly_relayouting", Ft);
        }
        function Oe(Fe) {
          Fe[U.id + ".angularaxis.rotation"] = se, U.vangles && (Fe[U.id + ".radialaxis.angle"] = de);
        }
        function Ze() {
          ze.select("text").attr("transform", null);
          var Fe = {};
          Oe(Fe), k.call("_guiRelayout", ee, Fe);
        }
        ye.prepFn = function(Fe, Pe, De) {
          var Ge = B[U.id];
          we = Ge.angularaxis.rotation;
          var Qe = ue.getBoundingClientRect();
          pe = Pe - Qe.left, ge = De - Qe.top, ee._fullLayout._calcInverseTransform(ee);
          var ot = x.apply3DTransform(B._invTransform)(pe, ge);
          pe = ot[0], ge = ot[1], Te = Ae(pe, ge), ye.moveFn = Ie, ye.doneFn = Ze, f(ee);
        }, U.vangles && !x.isFullCircle(U.sectorInRad) && (ye.prepFn = x.noop, _(m.select(ue), null)), i.init(ye);
      }, W.isPtInside = function(B) {
        if (this.isSmith)
          return !0;
        var U = this.sectorInRad, ee = this.vangles, N = this.angularAxis.c2g(B.theta), K = this.radialAxis, X = K.c2l(B.r), te = K._rl;
        return (ee ? A.isPtInsidePolygon : x.isPtInsideSector)(X, N, te, U, ee);
      }, W.pathArc = function(B) {
        var U = this.sectorInRad, ee = this.vangles;
        return (ee ? A.pathPolygon : x.pathArc)(B, U[0], U[1], ee);
      }, W.pathSector = function(B) {
        var U = this.sectorInRad, ee = this.vangles;
        return (ee ? A.pathPolygon : x.pathSector)(B, U[0], U[1], ee);
      }, W.pathAnnulus = function(B, U) {
        var ee = this.sectorInRad, N = this.vangles;
        return (N ? A.pathPolygonAnnulus : x.pathAnnulus)(B, U, ee[0], ee[1], N);
      }, W.pathSubplot = function() {
        var B = this.innerRadius, U = this.radius;
        return B ? this.pathAnnulus(B, U) : this.pathSector(U);
      }, W.fillViewInitialKey = function(B, U) {
        B in this.viewInitial || (this.viewInitial[B] = U);
      };
    }, { "../../components/color": 367, "../../components/dragelement": 386, "../../components/drawing": 389, "../../components/fx": 407, "../../components/selections": 455, "../../components/titles": 476, "../../constants/alignment": 483, "../../lib": 515, "../../lib/clear_gl_canvases": 499, "../../lib/setcursor": 536, "../../plot_api/subroutines": 556, "../../plots/cartesian/axes": 566, "../../registry": 647, "../cartesian/autorange": 565, "../cartesian/dragbox": 575, "../cartesian/set_convert": 585, "../plots": 628, "../smith/helpers": 637, "./constants": 629, "./helpers": 630, "./set_convert": 635, "@plotly/d3": 58, tinycolor2: 313 }], 635: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../cartesian/set_convert"), k = m.deg2rad, x = m.rad2deg;
      Q.exports = function(e, r, n) {
        switch (g(e, n), e._id) {
          case "x":
          case "radialaxis":
            (function(s, t) {
              var d = t._subplot;
              s.setGeometry = function() {
                var u = s._rl[0], o = s._rl[1], h = d.innerRadius, l = (d.radius - h) / (o - u), i = h / l, p = u > o ? function(c) {
                  return c <= 0;
                } : function(c) {
                  return c >= 0;
                };
                s.c2g = function(c) {
                  var a = s.c2l(c) - u;
                  return (p(a) ? a : 0) + i;
                }, s.g2c = function(c) {
                  return s.l2c(c + u - i);
                }, s.g2p = function(c) {
                  return c * l;
                }, s.c2p = function(c) {
                  return s.g2p(s.c2g(c));
                };
              };
            })(e, r);
            break;
          case "angularaxis":
            (function(s, t) {
              var d = s.type;
              if (d === "linear") {
                var u = s.d2c, o = s.c2d;
                s.d2c = function(h, l) {
                  return function(i, p) {
                    return p === "degrees" ? k(i) : i;
                  }(u(h), l);
                }, s.c2d = function(h, l) {
                  return o(function(i, p) {
                    return p === "degrees" ? x(i) : i;
                  }(h, l));
                };
              }
              s.makeCalcdata = function(h, l) {
                var i, p, c = h[l], a = h._length, y = function(T) {
                  return s.d2c(T, h.thetaunit);
                };
                if (c) {
                  if (m.isTypedArray(c) && d === "linear") {
                    if (a === c.length)
                      return c;
                    if (c.subarray)
                      return c.subarray(0, a);
                  }
                  for (i = new Array(a), p = 0; p < a; p++)
                    i[p] = y(c[p]);
                } else {
                  var f = l + "0", _ = "d" + l, b = f in h ? y(h[f]) : 0, w = h[_] ? y(h[_]) : (s.period || 2 * Math.PI) / a;
                  for (i = new Array(a), p = 0; p < a; p++)
                    i[p] = b + p * w;
                }
                return i;
              }, s.setGeometry = function() {
                var h, l, i, p, c = t.sector, a = c.map(k), y = { clockwise: -1, counterclockwise: 1 }[s.direction], f = k(s.rotation), _ = function(L) {
                  return y * L + f;
                }, b = function(L) {
                  return (L - f) / y;
                };
                switch (d) {
                  case "linear":
                    l = h = m.identity, p = k, i = x, s.range = m.isFullCircle(a) ? [c[0], c[0] + 360] : a.map(b).map(x);
                    break;
                  case "category":
                    var w = s._categories.length, T = s.period ? Math.max(s.period, w) : w;
                    T === 0 && (T = 1), l = p = function(L) {
                      return 2 * L * Math.PI / T;
                    }, h = i = function(L) {
                      return L * T / Math.PI / 2;
                    }, s.range = [0, T];
                }
                s.c2g = function(L) {
                  return _(l(L));
                }, s.g2c = function(L) {
                  return h(b(L));
                }, s.t2g = function(L) {
                  return _(p(L));
                }, s.g2t = function(L) {
                  return i(b(L));
                };
              };
            })(e, r);
        }
      };
    }, { "../../lib": 515, "../cartesian/set_convert": 585 }], 636: [function(v, Q, $) {
      Q.exports = { attr: "subplot", name: "smith", axisNames: ["realaxis", "imaginaryaxis"], axisName2dataArray: { imaginaryaxis: "imag", realaxis: "real" } };
    }, {}], 637: [function(v, Q, $) {
      function m(e) {
        return e < 0 ? -1 : e > 0 ? 1 : 0;
      }
      function g(e) {
        var r = e[0], n = e[1];
        if (!isFinite(r) || !isFinite(n))
          return [1, 0];
        var s = (r + 1) * (r + 1) + n * n;
        return [(r * r + n * n - 1) / s, 2 * n / s];
      }
      function k(e, r) {
        var n = r[0], s = r[1];
        return [n * e.radius + e.cx, -s * e.radius + e.cy];
      }
      function x(e, r) {
        return r * e.radius;
      }
      Q.exports = { smith: g, reactanceArc: function(e, r, n, s) {
        var t = k(e, g([n, r])), d = t[0], u = t[1], o = k(e, g([s, r])), h = o[0], l = o[1];
        if (r === 0)
          return ["M" + d + "," + u, "L" + h + "," + l].join(" ");
        var i = x(e, 1 / Math.abs(r));
        return ["M" + d + "," + u, "A" + i + "," + i + " 0 0," + (r < 0 ? 1 : 0) + " " + h + "," + l].join(" ");
      }, resistanceArc: function(e, r, n, s) {
        var t = x(e, 1 / (r + 1)), d = k(e, g([r, n])), u = d[0], o = d[1], h = k(e, g([r, s])), l = h[0], i = h[1];
        if (m(n) !== m(s)) {
          var p = k(e, g([r, 0]));
          return ["M" + u + "," + o, "A" + t + "," + t + " 0 0," + (0 < n ? 0 : 1) + " " + p[0] + "," + p[1], "A" + t + "," + t + " 0 0," + (s < 0 ? 0 : 1) + l + "," + i].join(" ");
        }
        return ["M" + u + "," + o, "A" + t + "," + t + " 0 0," + (s < n ? 0 : 1) + " " + l + "," + i].join(" ");
      }, smithTransform: k };
    }, {}], 638: [function(v, Q, $) {
      var m = v("../get_data").getSubplotCalcData, g = v("../../lib").counterRegex, k = v("../polar/polar"), x = v("./constants"), e = x.attr, r = x.name, n = g(r), s = {};
      s[e] = { valType: "subplotid", dflt: r, editType: "calc" }, Q.exports = { attr: e, name: r, idRoot: r, idRegex: n, attrRegex: n, attributes: s, layoutAttributes: v("./layout_attributes"), supplyLayoutDefaults: v("./layout_defaults"), plot: function(t) {
        for (var d = t._fullLayout, u = t.calcdata, o = d._subplots[r], h = 0; h < o.length; h++) {
          var l = o[h], i = m(u, r, l), p = d[l]._subplot;
          p || (p = k(t, l, !0), d[l]._subplot = p), p.plot(i, d, t._promises);
        }
      }, clean: function(t, d, u, o) {
        for (var h = o._subplots[r] || [], l = 0; l < h.length; l++) {
          var i = h[l], p = o[i]._subplot;
          if (!d[i] && p)
            for (var c in p.framework.remove(), p.clipPaths)
              p.clipPaths[c].remove();
        }
      }, toSVG: v("../cartesian").toSVG };
    }, { "../../lib": 515, "../cartesian": 578, "../get_data": 602, "../polar/polar": 634, "./constants": 636, "./layout_attributes": 639, "./layout_defaults": 640 }], 639: [function(v, Q, $) {
      var m = v("../../components/color/attributes"), g = v("../cartesian/layout_attributes"), k = v("../domain").attributes, x = v("../../lib").extendFlat, e = v("../../plot_api/edit_types").overrideAll, r = e({ color: g.color, showline: x({}, g.showline, { dflt: !0 }), linecolor: g.linecolor, linewidth: g.linewidth, showgrid: x({}, g.showgrid, { dflt: !0 }), gridcolor: g.gridcolor, gridwidth: g.gridwidth, griddash: g.griddash }, "plot", "from-root"), n = e({ ticklen: g.ticklen, tickwidth: x({}, g.tickwidth, { dflt: 2 }), tickcolor: g.tickcolor, showticklabels: g.showticklabels, showtickprefix: g.showtickprefix, tickprefix: g.tickprefix, showticksuffix: g.showticksuffix, ticksuffix: g.ticksuffix, tickfont: g.tickfont, tickformat: g.tickformat, hoverformat: g.hoverformat, layer: g.layer }, "plot", "from-root"), s = x({ visible: x({}, g.visible, { dflt: !0 }), tickvals: { dflt: [0.2, 0.5, 1, 2, 5], valType: "data_array", editType: "plot" }, tickangle: x({}, g.tickangle, { dflt: 90 }), ticks: { valType: "enumerated", values: ["top", "bottom", ""], editType: "ticks" }, side: { valType: "enumerated", values: ["top", "bottom"], dflt: "top", editType: "plot" }, editType: "calc" }, r, n), t = x({ visible: x({}, g.visible, { dflt: !0 }), tickvals: { valType: "data_array", editType: "plot" }, ticks: g.ticks, editType: "calc" }, r, n);
      Q.exports = { domain: k({ name: "smith", editType: "plot" }), bgcolor: { valType: "color", editType: "plot", dflt: m.background }, realaxis: s, imaginaryaxis: t, editType: "calc" };
    }, { "../../components/color/attributes": 366, "../../lib": 515, "../../plot_api/edit_types": 548, "../cartesian/layout_attributes": 579, "../domain": 593 }], 640: [function(v, Q, $) {
      var m, g, k, x = v("../../lib"), e = v("../../components/color"), r = v("../../plot_api/plot_template"), n = v("../subplot_defaults"), s = v("../get_data").getSubplotData, t = v("../cartesian/prefix_suffix_defaults"), d = v("../cartesian/tick_label_defaults"), u = v("../cartesian/line_grid_defaults"), o = v("../cartesian/set_convert"), h = v("./layout_attributes"), l = v("./constants"), i = l.axisNames, p = (m = function(a) {
        return a.slice().reverse().map(function(y) {
          return -y;
        }).concat([0]).concat(a);
      }, g = String, k = {}, function(a) {
        var y = g ? g(a) : a;
        if (y in k)
          return k[y];
        var f = m(a);
        return k[y] = f, f;
      });
      function c(a, y, f, _) {
        var b = f("bgcolor");
        _.bgColor = e.combine(b, _.paper_bgcolor);
        var w, T = s(_.fullData, l.name, _.id), L = _.layoutOut;
        function A(W, Z) {
          return f(w + "." + W, Z);
        }
        for (var I = 0; I < i.length; I++) {
          w = i[I], x.isPlainObject(a[w]) || (a[w] = {});
          var P = a[w], S = r.newContainer(y, w);
          S._id = S._name = w, S._attr = _.id + "." + w, S._traceIndices = T.map(function(W) {
            return W._expandedIndex;
          });
          var E = A("visible");
          if (S.type = "linear", o(S, L), t(P, S, A, S.type), E) {
            var R, z, j, H, Y = w === "realaxis";
            Y && A("side"), Y ? A("tickvals") : A("tickvals", p(y.realaxis.tickvals || h.realaxis.tickvals.dflt));
            var J = _.font || {};
            E && (z = (R = A("color")) === P.color ? R : J.color, j = J.size, H = J.family), d(P, S, A, S.type, { noTicklabelstep: !0, noAng: !Y, noExp: !0, font: { color: z, size: j, family: H } }), x.coerce2(a, y, h, w + ".ticklen"), x.coerce2(a, y, h, w + ".tickwidth"), x.coerce2(a, y, h, w + ".tickcolor", y.color), A("ticks") || (delete y[w].ticklen, delete y[w].tickwidth, delete y[w].tickcolor), u(P, S, A, { dfltColor: R, bgColor: _.bgColor, blend: 60, showLine: !0, showGrid: !0, noZeroLine: !0, attributes: h[w] }), A("layer");
          }
          A("hoverformat"), delete S.type, S._input = P;
        }
      }
      Q.exports = function(a, y, f) {
        n(a, y, f, { noUirevision: !0, type: l.name, attributes: h, handleDefaults: c, font: y.font, paper_bgcolor: y.paper_bgcolor, fullData: f, layoutOut: y });
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../plot_api/plot_template": 555, "../cartesian/line_grid_defaults": 581, "../cartesian/prefix_suffix_defaults": 583, "../cartesian/set_convert": 585, "../cartesian/tick_label_defaults": 587, "../get_data": 602, "../subplot_defaults": 641, "./constants": 636, "./layout_attributes": 639 }], 641: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plot_api/plot_template"), k = v("./domain").defaults;
      Q.exports = function(x, e, r, n) {
        var s, t, d = n.type, u = n.attributes, o = n.handleDefaults, h = n.partition || "x", l = e._subplots[d], i = l.length, p = i && l[0].replace(/\d+$/, "");
        function c(_, b) {
          return m.coerce(s, t, u, _, b);
        }
        for (var a = 0; a < i; a++) {
          var y = l[a];
          s = x[y] ? x[y] : x[y] = {}, t = g.newContainer(e, y, p), n.noUirevision || c("uirevision", e.uirevision);
          var f = {};
          f[h] = [a / i, (a + 1) / i], k(t, e, c, f), n.id = y, o(s, t, c, n);
        }
      };
    }, { "../lib": 515, "../plot_api/plot_template": 555, "./domain": 593 }], 642: [function(v, Q, $) {
      var m = v("../constants/docs");
      m.FORMAT_LINK, m.DATE_FORMAT_LINK;
      function g(k) {
        var x = k.description ? " " + k.description : "", e = k.keys || [];
        if (e.length > 0) {
          for (var r = [], n = 0; n < e.length; n++)
            r[n] = "`" + e[n] + "`";
          x += "Finally, the template string has access to ", x = e.length === 1 ? "variable " + r[0] : "variables " + r.slice(0, -1).join(", ") + " and " + r.slice(-1) + ".";
        }
        return x;
      }
      $.hovertemplateAttrs = function(k, x) {
        k = k || {}, g(x = x || {});
        var e = { valType: "string", dflt: "", editType: k.editType || "none" };
        return k.arrayOk !== !1 && (e.arrayOk = !0), e;
      }, $.texttemplateAttrs = function(k, x) {
        k = k || {}, g(x = x || {});
        var e = { valType: "string", dflt: "", editType: k.editType || "calc" };
        return k.arrayOk !== !1 && (e.arrayOk = !0), e;
      };
    }, { "../constants/docs": 486 }], 643: [function(v, Q, $) {
      var m = v("./ternary"), g = v("../../plots/get_data").getSubplotCalcData, k = v("../../lib").counterRegex;
      $.name = "ternary";
      var x = $.attr = "subplot";
      $.idRoot = "ternary", $.idRegex = $.attrRegex = k("ternary"), ($.attributes = {})[x] = { valType: "subplotid", dflt: "ternary", editType: "calc" }, $.layoutAttributes = v("./layout_attributes"), $.supplyLayoutDefaults = v("./layout_defaults"), $.plot = function(e) {
        for (var r = e._fullLayout, n = e.calcdata, s = r._subplots.ternary, t = 0; t < s.length; t++) {
          var d = s[t], u = g(n, "ternary", d), o = r[d]._subplot;
          o || (o = new m({ id: d, graphDiv: e, container: r._ternarylayer.node() }, r), r[d]._subplot = o), o.plot(u, r, e._promises);
        }
      }, $.clean = function(e, r, n, s) {
        for (var t = s._subplots.ternary || [], d = 0; d < t.length; d++) {
          var u = t[d], o = s[u]._subplot;
          !r[u] && o && (o.plotContainer.remove(), o.clipDef.remove(), o.clipDefRelative.remove(), o.layers["a-title"].remove(), o.layers["b-title"].remove(), o.layers["c-title"].remove());
        }
      };
    }, { "../../lib": 515, "../../plots/get_data": 602, "./layout_attributes": 644, "./layout_defaults": 645, "./ternary": 646 }], 644: [function(v, Q, $) {
      var m = v("../../components/color/attributes"), g = v("../domain").attributes, k = v("../cartesian/layout_attributes"), x = v("../../plot_api/edit_types").overrideAll, e = v("../../lib/extend").extendFlat, r = { title: { text: k.title.text, font: k.title.font }, color: k.color, tickmode: k.tickmode, nticks: e({}, k.nticks, { dflt: 6, min: 1 }), tick0: k.tick0, dtick: k.dtick, tickvals: k.tickvals, ticktext: k.ticktext, ticks: k.ticks, ticklen: k.ticklen, tickwidth: k.tickwidth, tickcolor: k.tickcolor, ticklabelstep: k.ticklabelstep, showticklabels: k.showticklabels, showtickprefix: k.showtickprefix, tickprefix: k.tickprefix, showticksuffix: k.showticksuffix, ticksuffix: k.ticksuffix, showexponent: k.showexponent, exponentformat: k.exponentformat, minexponent: k.minexponent, separatethousands: k.separatethousands, tickfont: k.tickfont, tickangle: k.tickangle, tickformat: k.tickformat, tickformatstops: k.tickformatstops, hoverformat: k.hoverformat, showline: e({}, k.showline, { dflt: !0 }), linecolor: k.linecolor, linewidth: k.linewidth, showgrid: e({}, k.showgrid, { dflt: !0 }), gridcolor: k.gridcolor, gridwidth: k.gridwidth, griddash: k.griddash, layer: k.layer, min: { valType: "number", dflt: 0, min: 0 }, _deprecated: { title: k._deprecated.title, titlefont: k._deprecated.titlefont } }, n = Q.exports = x({ domain: g({ name: "ternary" }), bgcolor: { valType: "color", dflt: m.background }, sum: { valType: "number", dflt: 1, min: 0 }, aaxis: r, baxis: r, caxis: r }, "plot", "from-root");
      n.uirevision = { valType: "any", editType: "none" }, n.aaxis.uirevision = n.baxis.uirevision = n.caxis.uirevision = { valType: "any", editType: "none" };
    }, { "../../components/color/attributes": 366, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../cartesian/layout_attributes": 579, "../domain": 593 }], 645: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../../plot_api/plot_template"), k = v("../../lib"), x = v("../subplot_defaults"), e = v("../cartesian/tick_label_defaults"), r = v("../cartesian/prefix_suffix_defaults"), n = v("../cartesian/tick_mark_defaults"), s = v("../cartesian/tick_value_defaults"), t = v("../cartesian/line_grid_defaults"), d = v("./layout_attributes"), u = ["aaxis", "baxis", "caxis"];
      function o(l, i, p, c) {
        var a, y, f, _ = p("bgcolor"), b = p("sum");
        c.bgColor = m.combine(_, c.paper_bgcolor);
        for (var w = 0; w < u.length; w++)
          y = l[a = u[w]] || {}, (f = g.newContainer(i, a))._name = a, h(y, f, c, i);
        var T = i.aaxis, L = i.baxis, A = i.caxis;
        T.min + L.min + A.min >= b && (T.min = 0, L.min = 0, A.min = 0, l.aaxis && delete l.aaxis.min, l.baxis && delete l.baxis.min, l.caxis && delete l.caxis.min);
      }
      function h(l, i, p, c) {
        var a = d[i._name];
        function y(L, A) {
          return k.coerce(l, i, a, L, A);
        }
        y("uirevision", c.uirevision), i.type = "linear";
        var f = y("color"), _ = f !== a.color.dflt ? f : p.font.color, b = i._name.charAt(0).toUpperCase(), w = "Component " + b, T = y("title.text", w);
        i._hovertitle = T === w ? T : b, k.coerceFont(y, "title.font", { family: p.font.family, size: k.bigFont(p.font.size), color: _ }), y("min"), s(l, i, y, "linear"), r(l, i, y, "linear"), e(l, i, y, "linear"), n(l, i, y, { outerTicks: !0 }), y("showticklabels") && (k.coerceFont(y, "tickfont", { family: p.font.family, size: p.font.size, color: _ }), y("tickangle"), y("tickformat")), t(l, i, y, { dfltColor: f, bgColor: p.bgColor, blend: 60, showLine: !0, showGrid: !0, noZeroLine: !0, attributes: a }), y("hoverformat"), y("layer");
      }
      Q.exports = function(l, i, p) {
        x(l, i, p, { type: "ternary", attributes: d, handleDefaults: o, font: i.font, paper_bgcolor: i.paper_bgcolor });
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../plot_api/plot_template": 555, "../cartesian/line_grid_defaults": 581, "../cartesian/prefix_suffix_defaults": 583, "../cartesian/tick_label_defaults": 587, "../cartesian/tick_mark_defaults": 588, "../cartesian/tick_value_defaults": 589, "../subplot_defaults": 641, "./layout_attributes": 644 }], 646: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("tinycolor2"), k = v("../../registry"), x = v("../../lib"), e = x.strTranslate, r = x._, n = v("../../components/color"), s = v("../../components/drawing"), t = v("../cartesian/set_convert"), d = v("../../lib/extend").extendFlat, u = v("../plots"), o = v("../cartesian/axes"), h = v("../../components/dragelement"), l = v("../../components/fx"), i = v("../../components/dragelement/helpers"), p = i.freeMode, c = i.rectMode, a = v("../../components/titles"), y = v("../../components/selections").prepSelect, f = v("../../components/selections").selectOnClick, _ = v("../../components/selections").clearOutline, b = v("../../components/selections").clearSelectionsCache, w = v("../cartesian/constants");
      function T(j, H) {
        this.id = j.id, this.graphDiv = j.graphDiv, this.init(H), this.makeFramework(H), this.aTickLayout = null, this.bTickLayout = null, this.cTickLayout = null;
      }
      Q.exports = T;
      var L = T.prototype;
      L.init = function(j) {
        this.container = j._ternarylayer, this.defs = j._defs, this.layoutId = j._uid, this.traceHash = {}, this.layers = {};
      }, L.plot = function(j, H) {
        var Y = H[this.id], J = H._size;
        this._hasClipOnAxisFalse = !1;
        for (var W = 0; W < j.length; W++)
          if (j[W][0].trace.cliponaxis === !1) {
            this._hasClipOnAxisFalse = !0;
            break;
          }
        this.updateLayers(Y), this.adjustLayout(Y, J), u.generalUpdatePerTraceModule(this.graphDiv, this, j, Y), this.layers.plotbg.select("path").call(n.fill, Y.bgcolor);
      }, L.makeFramework = function(j) {
        var H = this.graphDiv, Y = j[this.id], J = this.clipId = "clip" + this.layoutId + this.id, W = this.clipIdRelative = "clip-relative" + this.layoutId + this.id;
        this.clipDef = x.ensureSingleById(j._clips, "clipPath", J, function(Z) {
          Z.append("path").attr("d", "M0,0Z");
        }), this.clipDefRelative = x.ensureSingleById(j._clips, "clipPath", W, function(Z) {
          Z.append("path").attr("d", "M0,0Z");
        }), this.plotContainer = x.ensureSingle(this.container, "g", this.id), this.updateLayers(Y), s.setClipUrl(this.layers.backplot, J, H), s.setClipUrl(this.layers.grids, J, H);
      }, L.updateLayers = function(j) {
        var H = this.layers, Y = ["draglayer", "plotbg", "backplot", "grids"];
        j.aaxis.layer === "below traces" && Y.push("aaxis", "aline"), j.baxis.layer === "below traces" && Y.push("baxis", "bline"), j.caxis.layer === "below traces" && Y.push("caxis", "cline"), Y.push("frontplot"), j.aaxis.layer === "above traces" && Y.push("aaxis", "aline"), j.baxis.layer === "above traces" && Y.push("baxis", "bline"), j.caxis.layer === "above traces" && Y.push("caxis", "cline");
        var J = this.plotContainer.selectAll("g.toplevel").data(Y, String), W = ["agrid", "bgrid", "cgrid"];
        J.enter().append("g").attr("class", function(Z) {
          return "toplevel " + Z;
        }).each(function(Z) {
          var re = m.select(this);
          H[Z] = re, Z === "frontplot" ? re.append("g").classed("scatterlayer", !0) : Z === "backplot" ? re.append("g").classed("maplayer", !0) : Z === "plotbg" ? re.append("path").attr("d", "M0,0Z") : Z === "aline" || Z === "bline" || Z === "cline" ? re.append("path") : Z === "grids" && W.forEach(function(V) {
            H[V] = re.append("g").classed("grid " + V, !0);
          });
        }), J.order();
      };
      var A = Math.sqrt(4 / 3);
      L.adjustLayout = function(j, H) {
        var Y, J, W, Z, re, V, B = this, U = j.domain, ee = (U.x[0] + U.x[1]) / 2, N = (U.y[0] + U.y[1]) / 2, K = U.x[1] - U.x[0], X = U.y[1] - U.y[0], te = K * H.w, ie = X * H.h, le = j.sum, oe = j.aaxis.min, ve = j.baxis.min, ue = j.caxis.min;
        te > A * ie ? W = (Z = ie) * A : Z = (W = te) / A, re = K * W / te, V = X * Z / ie, Y = H.l + H.w * ee - W / 2, J = H.t + H.h * (1 - N) - Z / 2, B.x0 = Y, B.y0 = J, B.w = W, B.h = Z, B.sum = le, B.xaxis = { type: "linear", range: [oe + 2 * ue - le, le - oe - 2 * ve], domain: [ee - re / 2, ee + re / 2], _id: "x" }, t(B.xaxis, B.graphDiv._fullLayout), B.xaxis.setScale(), B.xaxis.isPtWithinRange = function(ze) {
          return ze.a >= B.aaxis.range[0] && ze.a <= B.aaxis.range[1] && ze.b >= B.baxis.range[1] && ze.b <= B.baxis.range[0] && ze.c >= B.caxis.range[1] && ze.c <= B.caxis.range[0];
        }, B.yaxis = { type: "linear", range: [oe, le - ve - ue], domain: [N - V / 2, N + V / 2], _id: "y" }, t(B.yaxis, B.graphDiv._fullLayout), B.yaxis.setScale(), B.yaxis.isPtWithinRange = function() {
          return !0;
        };
        var ye = B.yaxis.domain[0], Ae = B.aaxis = d({}, j.aaxis, { range: [oe, le - ve - ue], side: "left", tickangle: (+j.aaxis.tickangle || 0) - 30, domain: [ye, ye + V * A], anchor: "free", position: 0, _id: "y", _length: W });
        t(Ae, B.graphDiv._fullLayout), Ae.setScale();
        var pe = B.baxis = d({}, j.baxis, { range: [le - oe - ue, ve], side: "bottom", domain: B.xaxis.domain, anchor: "free", position: 0, _id: "x", _length: W });
        t(pe, B.graphDiv._fullLayout), pe.setScale();
        var ge = B.caxis = d({}, j.caxis, { range: [le - oe - ve, ue], side: "right", tickangle: (+j.caxis.tickangle || 0) + 30, domain: [ye, ye + V * A], anchor: "free", position: 0, _id: "y", _length: W });
        t(ge, B.graphDiv._fullLayout), ge.setScale();
        var we = "M" + Y + "," + (J + Z) + "h" + W + "l-" + W / 2 + ",-" + Z + "Z";
        B.clipDef.select("path").attr("d", we), B.layers.plotbg.select("path").attr("d", we);
        var se = "M0," + Z + "h" + W + "l-" + W / 2 + ",-" + Z + "Z";
        B.clipDefRelative.select("path").attr("d", se);
        var de = e(Y, J);
        B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform", de), B.clipDefRelative.select("path").attr("transform", null);
        var Te = e(Y - pe._offset, J + Z);
        B.layers.baxis.attr("transform", Te), B.layers.bgrid.attr("transform", Te);
        var Ee = e(Y + W / 2, J) + "rotate(30)" + e(0, -Ae._offset);
        B.layers.aaxis.attr("transform", Ee), B.layers.agrid.attr("transform", Ee);
        var Me = e(Y + W / 2, J) + "rotate(-30)" + e(0, -ge._offset);
        B.layers.caxis.attr("transform", Me), B.layers.cgrid.attr("transform", Me), B.drawAxes(!0), B.layers.aline.select("path").attr("d", Ae.showline ? "M" + Y + "," + (J + Z) + "l" + W / 2 + ",-" + Z : "M0,0").call(n.stroke, Ae.linecolor || "#000").style("stroke-width", (Ae.linewidth || 0) + "px"), B.layers.bline.select("path").attr("d", pe.showline ? "M" + Y + "," + (J + Z) + "h" + W : "M0,0").call(n.stroke, pe.linecolor || "#000").style("stroke-width", (pe.linewidth || 0) + "px"), B.layers.cline.select("path").attr("d", ge.showline ? "M" + (Y + W / 2) + "," + J + "l" + W / 2 + "," + Z : "M0,0").call(n.stroke, ge.linecolor || "#000").style("stroke-width", (ge.linewidth || 0) + "px"), B.graphDiv._context.staticPlot || B.initInteractions(), s.setClipUrl(B.layers.frontplot, B._hasClipOnAxisFalse ? null : B.clipId, B.graphDiv);
      }, L.drawAxes = function(j) {
        var H = this.graphDiv, Y = this.id.substr(7) + "title", J = this.layers, W = this.aaxis, Z = this.baxis, re = this.caxis;
        if (this.drawAx(W), this.drawAx(Z), this.drawAx(re), j) {
          var V = Math.max(W.showticklabels ? W.tickfont.size / 2 : 0, (re.showticklabels ? 0.75 * re.tickfont.size : 0) + (re.ticks === "outside" ? 0.87 * re.ticklen : 0)), B = (Z.showticklabels ? Z.tickfont.size : 0) + (Z.ticks === "outside" ? Z.ticklen : 0) + 3;
          J["a-title"] = a.draw(H, "a" + Y, { propContainer: W, propName: this.id + ".aaxis.title", placeholder: r(H, "Click to enter Component A title"), attributes: { x: this.x0 + this.w / 2, y: this.y0 - W.title.font.size / 3 - V, "text-anchor": "middle" } }), J["b-title"] = a.draw(H, "b" + Y, { propContainer: Z, propName: this.id + ".baxis.title", placeholder: r(H, "Click to enter Component B title"), attributes: { x: this.x0 - B, y: this.y0 + this.h + 0.83 * Z.title.font.size + B, "text-anchor": "middle" } }), J["c-title"] = a.draw(H, "c" + Y, { propContainer: re, propName: this.id + ".caxis.title", placeholder: r(H, "Click to enter Component C title"), attributes: { x: this.x0 + this.w + B, y: this.y0 + this.h + 0.83 * re.title.font.size + B, "text-anchor": "middle" } });
        }
      }, L.drawAx = function(j) {
        var H, Y = this.graphDiv, J = j._name, W = J.charAt(0), Z = j._id, re = this.layers[J], V = W + "tickLayout", B = (H = j).ticks + String(H.ticklen) + String(H.showticklabels);
        this[V] !== B && (re.selectAll("." + Z + "tick").remove(), this[V] = B), j.setScale();
        var U = o.calcTicks(j), ee = o.clipEnds(j, U), N = o.makeTransTickFn(j), K = o.getTickSigns(j)[2], X = x.deg2rad(30), te = K * (j.linewidth || 1) / 2, ie = K * j.ticklen, le = this.w, oe = this.h, ve = W === "b" ? "M0," + te + "l" + Math.sin(X) * ie + "," + Math.cos(X) * ie : "M" + te + ",0l" + Math.cos(X) * ie + "," + -Math.sin(X) * ie, ue = { a: "M0,0l" + oe + ",-" + le / 2, b: "M0,0l-" + le / 2 + ",-" + oe, c: "M0,0l-" + oe + "," + le / 2 }[W];
        o.drawTicks(Y, j, { vals: j.ticks === "inside" ? ee : U, layer: re, path: ve, transFn: N, crisp: !1 }), o.drawGrid(Y, j, { vals: ee, layer: this.layers[W + "grid"], path: ue, transFn: N, crisp: !1 }), o.drawLabels(Y, j, { vals: U, layer: re, transFn: N, labelFns: o.makeLabelFns(j, 0, 30) });
      };
      var I = w.MINZOOM / 2 + 0.87, P = "m-0.87,.5h" + I + "v3h-" + (I + 5.2) + "l" + (I / 2 + 2.6) + ",-" + (0.87 * I + 4.5) + "l2.6,1.5l-" + I / 2 + "," + 0.87 * I + "Z", S = "m0.87,.5h-" + I + "v3h" + (I + 5.2) + "l-" + (I / 2 + 2.6) + ",-" + (0.87 * I + 4.5) + "l-2.6,1.5l" + I / 2 + "," + 0.87 * I + "Z", E = "m0,1l" + I / 2 + "," + 0.87 * I + "l2.6,-1.5l-" + (I / 2 + 2.6) + ",-" + (0.87 * I + 4.5) + "l-" + (I / 2 + 2.6) + "," + (0.87 * I + 4.5) + "l2.6,1.5l" + I / 2 + ",-" + 0.87 * I + "Z", R = !0;
      function z(j) {
        m.select(j).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove();
      }
      L.clearOutline = function() {
        b(this.dragOptions), _(this.dragOptions.gd);
      }, L.initInteractions = function() {
        var j, H, Y, J, W, Z, re, V, B, U, ee, N, K = this, X = K.layers.plotbg.select("path").node(), te = K.graphDiv, ie = te._fullLayout._zoomlayer;
        function le(se) {
          var de = {};
          return de[K.id + ".aaxis.min"] = se.a, de[K.id + ".baxis.min"] = se.b, de[K.id + ".caxis.min"] = se.c, de;
        }
        function oe(se, de) {
          var Te = te._fullLayout.clickmode;
          z(te), se === 2 && (te.emit("plotly_doubleclick", null), k.call("_guiRelayout", te, le({ a: 0, b: 0, c: 0 }))), Te.indexOf("select") > -1 && se === 1 && f(de, te, [K.xaxis], [K.yaxis], K.id, K.dragOptions), Te.indexOf("event") > -1 && l.click(te, de, K.id);
        }
        function ve(se, de) {
          return 1 - de / K.h;
        }
        function ue(se, de) {
          return 1 - (se + (K.h - de) / Math.sqrt(3)) / K.w;
        }
        function ye(se, de) {
          return (se - (K.h - de) / Math.sqrt(3)) / K.w;
        }
        function Ae(se, de) {
          var Te = Y + se * j, Ee = J + de * H, Me = Math.max(0, Math.min(1, ve(0, J), ve(0, Ee))), ze = Math.max(0, Math.min(1, ue(Y, J), ue(Te, Ee))), Ie = Math.max(0, Math.min(1, ye(Y, J), ye(Te, Ee))), Oe = (Me / 2 + Ie) * K.w, Ze = (1 - Me / 2 - ze) * K.w, Fe = (Oe + Ze) / 2, Pe = Ze - Oe, De = (1 - Me) * K.h, Ge = De - Pe / A;
          Pe < w.MINZOOM ? (re = W, ee.attr("d", B), N.attr("d", "M0,0Z")) : (re = { a: W.a + Me * Z, b: W.b + ze * Z, c: W.c + Ie * Z }, ee.attr("d", B + "M" + Oe + "," + De + "H" + Ze + "L" + Fe + "," + Ge + "L" + Oe + "," + De + "Z"), N.attr("d", "M" + Y + "," + J + "m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM" + Oe + "," + De + P + "M" + Ze + "," + De + S + "M" + Fe + "," + Ge + E)), U || (ee.transition().style("fill", V > 0.2 ? "rgba(0,0,0,0.4)" : "rgba(255,255,255,0.3)").duration(200), N.transition().style("opacity", 1).duration(200), U = !0), te.emit("plotly_relayouting", le(re));
        }
        function pe() {
          z(te), re !== W && (k.call("_guiRelayout", te, le(re)), R && te.data && te._context.showTips && (x.notifier(r(te, "Double-click to zoom back out"), "long"), R = !1));
        }
        function ge(se, de) {
          var Te = se / K.xaxis._m, Ee = de / K.yaxis._m, Me = [(re = { a: W.a - Ee, b: W.b + (Te + Ee) / 2, c: W.c - (Te - Ee) / 2 }).a, re.b, re.c].sort(x.sorterAsc), ze = Me.indexOf(re.a), Ie = Me.indexOf(re.b), Oe = Me.indexOf(re.c);
          Me[0] < 0 && (Me[1] + Me[0] / 2 < 0 ? (Me[2] += Me[0] + Me[1], Me[0] = Me[1] = 0) : (Me[2] += Me[0] / 2, Me[1] += Me[0] / 2, Me[0] = 0), re = { a: Me[ze], b: Me[Ie], c: Me[Oe] }, de = (W.a - re.a) * K.yaxis._m, se = (W.c - re.c - W.b + re.b) * K.xaxis._m);
          var Ze = e(K.x0 + se, K.y0 + de);
          K.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform", Ze);
          var Fe = e(-se, -de);
          K.clipDefRelative.select("path").attr("transform", Fe), K.aaxis.range = [re.a, K.sum - re.b - re.c], K.baxis.range = [K.sum - re.a - re.c, re.b], K.caxis.range = [K.sum - re.a - re.b, re.c], K.drawAxes(!1), K._hasClipOnAxisFalse && K.plotContainer.select(".scatterlayer").selectAll(".trace").call(s.hideOutsideRangePoints, K), te.emit("plotly_relayouting", le(re));
        }
        function we() {
          k.call("_guiRelayout", te, le(re));
        }
        this.dragOptions = { element: X, gd: te, plotinfo: { id: K.id, domain: te._fullLayout[K.id].domain, xaxis: K.xaxis, yaxis: K.yaxis }, subplot: K.id, prepFn: function(se, de, Te) {
          K.dragOptions.xaxes = [K.xaxis], K.dragOptions.yaxes = [K.yaxis], j = te._fullLayout._invScaleX, H = te._fullLayout._invScaleY;
          var Ee = K.dragOptions.dragmode = te._fullLayout.dragmode;
          p(Ee) ? K.dragOptions.minDrag = 1 : K.dragOptions.minDrag = void 0, Ee === "zoom" ? (K.dragOptions.moveFn = Ae, K.dragOptions.clickFn = oe, K.dragOptions.doneFn = pe, function(Me, ze, Ie) {
            var Oe = X.getBoundingClientRect();
            Y = ze - Oe.left, J = Ie - Oe.top, te._fullLayout._calcInverseTransform(te);
            var Ze = te._fullLayout._invTransform, Fe = x.apply3DTransform(Ze)(Y, J);
            Y = Fe[0], J = Fe[1], W = { a: K.aaxis.range[0], b: K.baxis.range[1], c: K.caxis.range[1] }, re = W, Z = K.aaxis.range[1] - W.a, V = g(K.graphDiv._fullLayout[K.id].bgcolor).getLuminance(), B = "M0," + K.h + "L" + K.w / 2 + ", 0L" + K.w + "," + K.h + "Z", U = !1, ee = ie.append("path").attr("class", "zoombox").attr("transform", e(K.x0, K.y0)).style({ fill: V > 0.2 ? "rgba(0,0,0,0)" : "rgba(255,255,255,0)", "stroke-width": 0 }).attr("d", B), N = ie.append("path").attr("class", "zoombox-corners").attr("transform", e(K.x0, K.y0)).style({ fill: n.background, stroke: n.defaultLine, "stroke-width": 1, opacity: 0 }).attr("d", "M0,0Z"), K.clearOutline(te);
          }(0, de, Te)) : Ee === "pan" ? (K.dragOptions.moveFn = ge, K.dragOptions.clickFn = oe, K.dragOptions.doneFn = we, W = { a: K.aaxis.range[0], b: K.baxis.range[1], c: K.caxis.range[1] }, re = W, K.clearOutline(te)) : (c(Ee) || p(Ee)) && y(se, de, Te, K.dragOptions, Ee);
        } }, X.onmousemove = function(se) {
          l.hover(te, se, K.id), te._fullLayout._lasthover = X, te._fullLayout._hoversubplot = K.id;
        }, X.onmouseout = function(se) {
          te._dragging || h.unhover(te, se);
        }, h.init(this.dragOptions);
      };
    }, { "../../components/color": 367, "../../components/dragelement": 386, "../../components/dragelement/helpers": 385, "../../components/drawing": 389, "../../components/fx": 407, "../../components/selections": 455, "../../components/titles": 476, "../../lib": 515, "../../lib/extend": 505, "../../registry": 647, "../cartesian/axes": 566, "../cartesian/constants": 573, "../cartesian/set_convert": 585, "../plots": 628, "@plotly/d3": 58, tinycolor2: 313 }], 647: [function(v, Q, $) {
      var m = v("./lib/loggers"), g = v("./lib/noop"), k = v("./lib/push_unique"), x = v("./lib/is_plain_object"), e = v("./lib/dom").addStyleRule, r = v("./lib/extend"), n = v("./plots/attributes"), s = v("./plots/layout_attributes"), t = r.extendFlat, d = r.extendDeepAll;
      function u(f) {
        var _ = f.name, b = f.categories, w = f.meta;
        if ($.modules[_])
          m.log("Type " + _ + " already registered");
        else {
          $.subplotsRegistry[f.basePlotModule.name] || function(R) {
            var z = R.name;
            if ($.subplotsRegistry[z])
              return void m.log("Plot type " + z + " already registered.");
            for (var j in i(R), $.subplotsRegistry[z] = R, $.componentsRegistry)
              a(j, R.name);
          }(f.basePlotModule);
          for (var T = {}, L = 0; L < b.length; L++)
            T[b[L]] = !0, $.allCategories[b[L]] = !0;
          for (var A in $.modules[_] = { _module: f, categories: T }, w && Object.keys(w).length && ($.modules[_].meta = w), $.allTypes.push(_), $.componentsRegistry)
            p(A, _);
          f.layoutAttributes && t($.traceLayoutAttributes, f.layoutAttributes);
          var I = f.basePlotModule, P = I.name;
          if (P === "mapbox") {
            var S = I.constants.styleRules;
            for (var E in S)
              e(".js-plotly-plot .plotly .mapboxgl-" + E, S[E]);
          }
          P !== "geo" && P !== "mapbox" || window.PlotlyGeoAssets !== void 0 || (window.PlotlyGeoAssets = { topojson: {} });
        }
      }
      function o(f) {
        if (typeof f.name != "string")
          throw new Error("Component module *name* must be a string.");
        var _ = f.name;
        for (var b in $.componentsRegistry[_] = f, f.layoutAttributes && (f.layoutAttributes._isLinkedToArray && k($.layoutArrayContainers, _), i(f)), $.modules)
          p(_, b);
        for (var w in $.subplotsRegistry)
          a(_, w);
        for (var T in $.transformsRegistry)
          c(_, T);
        f.schema && f.schema.layout && d(s, f.schema.layout);
      }
      function h(f) {
        if (typeof f.name != "string")
          throw new Error("Transform module *name* must be a string.");
        var _ = "Transform module " + f.name, b = typeof f.transform == "function", w = typeof f.calcTransform == "function";
        if (!b && !w)
          throw new Error(_ + " is missing a *transform* or *calcTransform* method.");
        for (var T in b && w && m.log([_ + " has both a *transform* and *calcTransform* methods.", "Please note that all *transform* methods are executed", "before all *calcTransform* methods."].join(" ")), x(f.attributes) || m.log(_ + " registered without an *attributes* object."), typeof f.supplyDefaults != "function" && m.log(_ + " registered without a *supplyDefaults* method."), $.transformsRegistry[f.name] = f, $.componentsRegistry)
          c(T, f.name);
      }
      function l(f) {
        var _ = f.name, b = _.split("-")[0], w = f.dictionary, T = f.format, L = w && Object.keys(w).length, A = T && Object.keys(T).length, I = $.localeRegistry, P = I[_];
        if (P || (I[_] = P = {}), b !== _) {
          var S = I[b];
          S || (I[b] = S = {}), L && S.dictionary === P.dictionary && (S.dictionary = w), A && S.format === P.format && (S.format = T);
        }
        L && (P.dictionary = w), A && (P.format = T);
      }
      function i(f) {
        if (f.layoutAttributes) {
          var _ = f.layoutAttributes._arrayAttrRegexps;
          if (_)
            for (var b = 0; b < _.length; b++)
              k($.layoutArrayRegexes, _[b]);
        }
      }
      function p(f, _) {
        var b = $.componentsRegistry[f].schema;
        if (b && b.traces) {
          var w = b.traces[_];
          w && d($.modules[_]._module.attributes, w);
        }
      }
      function c(f, _) {
        var b = $.componentsRegistry[f].schema;
        if (b && b.transforms) {
          var w = b.transforms[_];
          w && d($.transformsRegistry[_].attributes, w);
        }
      }
      function a(f, _) {
        var b = $.componentsRegistry[f].schema;
        if (b && b.subplots) {
          var w = $.subplotsRegistry[_], T = w.layoutAttributes, L = w.attr === "subplot" ? w.name : w.attr;
          Array.isArray(L) && (L = L[0]);
          var A = b.subplots[L];
          T && A && d(T, A);
        }
      }
      function y(f) {
        return typeof f == "object" && (f = f.type), f;
      }
      $.modules = {}, $.allCategories = {}, $.allTypes = [], $.subplotsRegistry = {}, $.transformsRegistry = {}, $.componentsRegistry = {}, $.layoutArrayContainers = [], $.layoutArrayRegexes = [], $.traceLayoutAttributes = {}, $.localeRegistry = {}, $.apiMethodRegistry = {}, $.collectableSubplotTypes = null, $.register = function(f) {
        if ($.collectableSubplotTypes = null, !f)
          throw new Error("No argument passed to Plotly.register.");
        f && !Array.isArray(f) && (f = [f]);
        for (var _ = 0; _ < f.length; _++) {
          var b = f[_];
          if (!b)
            throw new Error("Invalid module was attempted to be registered!");
          switch (b.moduleType) {
            case "trace":
              u(b);
              break;
            case "transform":
              h(b);
              break;
            case "component":
              o(b);
              break;
            case "locale":
              l(b);
              break;
            case "apiMethod":
              var w = b.name;
              $.apiMethodRegistry[w] = b.fn;
              break;
            default:
              throw new Error("Invalid module was attempted to be registered!");
          }
        }
      }, $.getModule = function(f) {
        var _ = $.modules[y(f)];
        return !!_ && _._module;
      }, $.traceIs = function(f, _) {
        if ((f = y(f)) === "various")
          return !1;
        var b = $.modules[f];
        return b || (f && m.log("Unrecognized trace type " + f + "."), b = $.modules[n.type.dflt]), !!b.categories[_];
      }, $.getTransformIndices = function(f, _) {
        for (var b = [], w = f.transforms || [], T = 0; T < w.length; T++)
          w[T].type === _ && b.push(T);
        return b;
      }, $.hasTransform = function(f, _) {
        for (var b = f.transforms || [], w = 0; w < b.length; w++)
          if (b[w].type === _)
            return !0;
        return !1;
      }, $.getComponentMethod = function(f, _) {
        var b = $.componentsRegistry[f];
        return b && b[_] || g;
      }, $.call = function() {
        var f = arguments[0], _ = [].slice.call(arguments, 1);
        return $.apiMethodRegistry[f].apply(null, _);
      };
    }, { "./lib/dom": 503, "./lib/extend": 505, "./lib/is_plain_object": 516, "./lib/loggers": 519, "./lib/noop": 524, "./lib/push_unique": 530, "./plots/attributes": 562, "./plots/layout_attributes": 619 }], 648: [function(v, Q, $) {
      var m = v("../registry"), g = v("../lib"), k = g.extendFlat, x = g.extendDeep;
      function e(r) {
        var n;
        switch (r) {
          case "themes__thumb":
            n = { autosize: !0, width: 150, height: 150, title: { text: "" }, showlegend: !1, margin: { l: 5, r: 5, t: 5, b: 5, pad: 0 }, annotations: [] };
            break;
          case "thumbnail":
            n = { title: { text: "" }, hidesources: !0, showlegend: !1, borderwidth: 0, bordercolor: "", margin: { l: 1, r: 1, t: 1, b: 1, pad: 0 }, annotations: [] };
            break;
          default:
            n = {};
        }
        return n;
      }
      Q.exports = function(r, n) {
        var s, t, d = r.data, u = r.layout, o = x([], d), h = x({}, u, e(n.tileClass)), l = r._context || {};
        if (n.width && (h.width = n.width), n.height && (h.height = n.height), n.tileClass === "thumbnail" || n.tileClass === "themes__thumb") {
          h.annotations = [];
          var i = Object.keys(h);
          for (s = 0; s < i.length; s++)
            t = i[s], ["xaxis", "yaxis", "zaxis"].indexOf(t.slice(0, 5)) > -1 && (h[i[s]].title = { text: "" });
          for (s = 0; s < o.length; s++) {
            var p = o[s];
            p.showscale = !1, p.marker && (p.marker.showscale = !1), m.traceIs(p, "pie-like") && (p.textposition = "none");
          }
        }
        if (Array.isArray(n.annotations))
          for (s = 0; s < n.annotations.length; s++)
            h.annotations.push(n.annotations[s]);
        var c = Object.keys(h).filter(function(b) {
          return b.match(/^scene\d*$/);
        });
        if (c.length) {
          var a = {};
          for (n.tileClass === "thumbnail" && (a = { title: { text: "" }, showaxeslabels: !1, showticklabels: !1, linetickenable: !1 }), s = 0; s < c.length; s++) {
            var y = h[c[s]];
            y.xaxis || (y.xaxis = {}), y.yaxis || (y.yaxis = {}), y.zaxis || (y.zaxis = {}), k(y.xaxis, a), k(y.yaxis, a), k(y.zaxis, a), y._scene = null;
          }
        }
        var f = document.createElement("div");
        n.tileClass && (f.className = n.tileClass);
        var _ = { gd: f, td: f, layout: h, data: o, config: { staticPlot: n.staticPlot === void 0 || n.staticPlot, plotGlPixelRatio: n.plotGlPixelRatio === void 0 ? 2 : n.plotGlPixelRatio, displaylogo: n.displaylogo || !1, showLink: n.showLink || !1, showTips: n.showTips || !1, mapboxAccessToken: l.mapboxAccessToken } };
        return n.setBackground !== "transparent" && (_.config.setBackground = n.setBackground || "opaque"), _.gd.defaultLayout = e(n.tileClass), _;
      };
    }, { "../lib": 515, "../registry": 647 }], 649: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plot_api/to_image"), k = v("./filesaver"), x = v("./helpers");
      Q.exports = function(e, r) {
        var n;
        return m.isPlainObject(e) || (n = m.getGraphDiv(e)), (r = r || {}).format = r.format || "png", r.width = r.width || null, r.height = r.height || null, r.imageDataOnly = !0, new Promise(function(s, t) {
          n && n._snapshotInProgress && t(new Error("Snapshotting already in progress.")), m.isIE() && r.format !== "svg" && t(new Error(x.MSG_IE_BAD_FORMAT)), n && (n._snapshotInProgress = !0);
          var d = g(e, r), u = r.filename || e.fn || "newplot";
          u += "." + r.format.replace("-", "."), d.then(function(o) {
            return n && (n._snapshotInProgress = !1), k(o, u, r.format);
          }).then(function(o) {
            s(o);
          }).catch(function(o) {
            n && (n._snapshotInProgress = !1), t(o);
          });
        });
      };
    }, { "../lib": 515, "../plot_api/to_image": 558, "./filesaver": 650, "./helpers": 651 }], 650: [function(v, Q, $) {
      var m = v("../lib"), g = v("./helpers");
      Q.exports = function(k, x, e) {
        var r = document.createElement("a"), n = "download" in r;
        return new Promise(function(s, t) {
          var d, u;
          if (m.isIE())
            return d = g.createBlob(k, "svg"), window.navigator.msSaveBlob(d, x), d = null, s(x);
          if (n)
            return d = g.createBlob(k, e), u = g.createObjectURL(d), r.href = u, r.download = x, document.body.appendChild(r), r.click(), document.body.removeChild(r), g.revokeObjectURL(u), d = null, s(x);
          if (m.isSafari()) {
            var o = e === "svg" ? "," : ";base64,";
            return g.octetStream(o + encodeURIComponent(k)), s(x);
          }
          t(new Error("download error"));
        });
      };
    }, { "../lib": 515, "./helpers": 651 }], 651: [function(v, Q, $) {
      var m = v("../registry");
      $.getDelay = function(k) {
        return k._has && (k._has("gl3d") || k._has("gl2d") || k._has("mapbox")) ? 500 : 0;
      }, $.getRedrawFunc = function(k) {
        return function() {
          m.getComponentMethod("colorbar", "draw")(k);
        };
      }, $.encodeSVG = function(k) {
        return "data:image/svg+xml," + encodeURIComponent(k);
      }, $.encodeJSON = function(k) {
        return "data:application/json," + encodeURIComponent(k);
      };
      var g = window.URL || window.webkitURL;
      $.createObjectURL = function(k) {
        return g.createObjectURL(k);
      }, $.revokeObjectURL = function(k) {
        return g.revokeObjectURL(k);
      }, $.createBlob = function(k, x) {
        if (x === "svg")
          return new window.Blob([k], { type: "image/svg+xml;charset=utf-8" });
        if (x === "full-json")
          return new window.Blob([k], { type: "application/json;charset=utf-8" });
        var e = function(r) {
          for (var n = r.length, s = new ArrayBuffer(n), t = new Uint8Array(s), d = 0; d < n; d++)
            t[d] = r.charCodeAt(d);
          return s;
        }(window.atob(k));
        return new window.Blob([e], { type: "image/" + x });
      }, $.octetStream = function(k) {
        document.location.href = "data:application/octet-stream" + k;
      }, $.IMAGE_URL_PREFIX = /^data:image\/\w+;base64,/, $.MSG_IE_BAD_FORMAT = "Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";
    }, { "../registry": 647 }], 652: [function(v, Q, $) {
      var m = v("./helpers"), g = { getDelay: m.getDelay, getRedrawFunc: m.getRedrawFunc, clone: v("./cloneplot"), toSVG: v("./tosvg"), svgToImg: v("./svgtoimg"), toImage: v("./toimage"), downloadImage: v("./download") };
      Q.exports = g;
    }, { "./cloneplot": 648, "./download": 649, "./helpers": 651, "./svgtoimg": 653, "./toimage": 654, "./tosvg": 655 }], 653: [function(v, Q, $) {
      var m = v("../lib"), g = v("events").EventEmitter, k = v("./helpers");
      Q.exports = function(x) {
        var e = x.emitter || new g(), r = new Promise(function(n, s) {
          var t = window.Image, d = x.svg, u = x.format || "png";
          if (m.isIE() && u !== "svg") {
            var o = new Error(k.MSG_IE_BAD_FORMAT);
            return s(o), x.promise ? r : e.emit("error", o);
          }
          var h, l, i = x.canvas, p = x.scale || 1, c = x.width || 300, a = x.height || 150, y = p * c, f = p * a, _ = i.getContext("2d", { willReadFrequently: !0 }), b = new t();
          u === "svg" || m.isSafari() ? l = k.encodeSVG(d) : (h = k.createBlob(d, "svg"), l = k.createObjectURL(h)), i.width = y, i.height = f, b.onload = function() {
            var w;
            switch (h = null, k.revokeObjectURL(l), u !== "svg" && _.drawImage(b, 0, 0, y, f), u) {
              case "jpeg":
                w = i.toDataURL("image/jpeg");
                break;
              case "png":
                w = i.toDataURL("image/png");
                break;
              case "webp":
                w = i.toDataURL("image/webp");
                break;
              case "svg":
                w = l;
                break;
              default:
                var T = "Image format is not jpeg, png, svg or webp.";
                if (s(new Error(T)), !x.promise)
                  return e.emit("error", T);
            }
            n(w), x.promise || e.emit("success", w);
          }, b.onerror = function(w) {
            if (h = null, k.revokeObjectURL(l), s(w), !x.promise)
              return e.emit("error", w);
          }, b.src = l;
        });
        return x.promise ? r : e;
      };
    }, { "../lib": 515, "./helpers": 651, events: 84 }], 654: [function(v, Q, $) {
      var m = v("events").EventEmitter, g = v("../registry"), k = v("../lib"), x = v("./helpers"), e = v("./cloneplot"), r = v("./tosvg"), n = v("./svgtoimg");
      Q.exports = function(s, t) {
        var d = new m(), u = e(s, { format: "png" }), o = u.gd;
        o.style.position = "absolute", o.style.left = "-5000px", document.body.appendChild(o);
        var h = x.getRedrawFunc(o);
        return g.call("_doPlot", o, u.data, u.layout, u.config).then(h).then(function() {
          var l = x.getDelay(o._fullLayout);
          setTimeout(function() {
            var i = r(o), p = document.createElement("canvas");
            p.id = k.randstr(), (d = n({ format: t.format, width: o._fullLayout.width, height: o._fullLayout.height, canvas: p, emitter: d, svg: i })).clean = function() {
              o && document.body.removeChild(o);
            };
          }, l);
        }).catch(function(l) {
          d.emit("error", l);
        }), d;
      };
    }, { "../lib": 515, "../registry": 647, "./cloneplot": 648, "./helpers": 651, "./svgtoimg": 653, "./tosvg": 655, events: 84 }], 655: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../lib"), k = v("../components/drawing"), x = v("../components/color"), e = v("../constants/xmlns_namespaces"), r = /"/g, n = new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")', "g");
      Q.exports = function(s, t, d) {
        var u, o = s._fullLayout, h = o._paper, l = o._toppaper, i = o.width, p = o.height;
        h.insert("rect", ":first-child").call(k.setRect, 0, 0, i, p).call(x.fill, o.paper_bgcolor);
        var c = o._basePlotModules || [];
        for (u = 0; u < c.length; u++) {
          var a = c[u];
          a.toSVG && a.toSVG(s);
        }
        if (l) {
          var y = l.node().childNodes, f = Array.prototype.slice.call(y);
          for (u = 0; u < f.length; u++) {
            var _ = f[u];
            _.childNodes.length && h.node().appendChild(_);
          }
        }
        o._draggers && o._draggers.remove(), h.node().style.background = "", h.selectAll("text").attr({ "data-unformatted": null, "data-math": null }).each(function() {
          var w = m.select(this);
          if (this.style.visibility !== "hidden" && this.style.display !== "none") {
            w.style({ visibility: null, display: null });
            var T = this.style.fontFamily;
            T && T.indexOf('"') !== -1 && w.style("font-family", T.replace(r, "TOBESTRIPPED"));
          } else
            w.remove();
        }), h.selectAll(".gradient_filled,.pattern_filled").each(function() {
          var w = m.select(this), T = this.style.fill;
          T && T.indexOf("url(") !== -1 && w.style("fill", T.replace(r, "TOBESTRIPPED"));
          var L = this.style.stroke;
          L && L.indexOf("url(") !== -1 && w.style("stroke", L.replace(r, "TOBESTRIPPED"));
        }), t !== "pdf" && t !== "eps" || h.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width", 0), h.node().setAttributeNS(e.xmlns, "xmlns", e.svg), h.node().setAttributeNS(e.xmlns, "xmlns:xlink", e.xlink), t === "svg" && d && (h.attr("width", d * i), h.attr("height", d * p), h.attr("viewBox", "0 0 " + i + " " + p));
        var b = new window.XMLSerializer().serializeToString(h.node());
        return b = function(w) {
          var T = m.select("body").append("div").style({ display: "none" }).html(""), L = w.replace(/(&[^;]*;)/gi, function(A) {
            return A === "&lt;" ? "&#60;" : A === "&rt;" ? "&#62;" : A.indexOf("<") !== -1 || A.indexOf(">") !== -1 ? "" : T.html(A).text();
          });
          return T.remove(), L;
        }(b), b = (b = b.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g, "&amp;")).replace(n, "'"), g.isIE() && (b = (b = (b = b.replace(/"/gi, "'")).replace(/(\('#)([^']*)('\))/gi, '("#$2")')).replace(/(\\')/gi, '"')), b;
      };
    }, { "../components/color": 367, "../components/drawing": 389, "../constants/xmlns_namespaces": 492, "../lib": 515, "@plotly/d3": 58 }], 656: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        for (var x = 0; x < g.length; x++)
          g[x].i = x;
        m.mergeArray(k.text, g, "tx"), m.mergeArray(k.hovertext, g, "htx");
        var e = k.marker;
        if (e) {
          m.mergeArray(e.opacity, g, "mo", !0), m.mergeArray(e.color, g, "mc");
          var r = e.line;
          r && (m.mergeArray(r.color, g, "mlc"), m.mergeArrayCastPositive(r.width, g, "mlw"));
        }
      };
    }, { "../../lib": 515 }], 657: [function(v, Q, $) {
      var m = v("../scatter/attributes"), g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../../plots/template_attributes").texttemplateAttrs, e = v("../../components/colorscale/attributes"), r = v("../../plots/font_attributes"), n = v("./constants"), s = v("../../components/drawing/attributes").pattern, t = v("../../lib/extend").extendFlat, d = r({ editType: "calc", arrayOk: !0, colorEditType: "style" }), u = t({}, m.marker.line.width, { dflt: 0 }), o = t({ width: u, editType: "calc" }, e("marker.line")), h = t({ line: o, editType: "calc" }, e("marker"), { opacity: { valType: "number", arrayOk: !0, dflt: 1, min: 0, max: 1, editType: "style" }, pattern: s });
      Q.exports = { x: m.x, x0: m.x0, dx: m.dx, y: m.y, y0: m.y0, dy: m.dy, xperiod: m.xperiod, yperiod: m.yperiod, xperiod0: m.xperiod0, yperiod0: m.yperiod0, xperiodalignment: m.xperiodalignment, yperiodalignment: m.yperiodalignment, xhoverformat: g("x"), yhoverformat: g("y"), text: m.text, texttemplate: x({ editType: "plot" }, { keys: n.eventDataKeys }), hovertext: m.hovertext, hovertemplate: k({}, { keys: n.eventDataKeys }), textposition: { valType: "enumerated", values: ["inside", "outside", "auto", "none"], dflt: "auto", arrayOk: !0, editType: "calc" }, insidetextanchor: { valType: "enumerated", values: ["end", "middle", "start"], dflt: "end", editType: "plot" }, textangle: { valType: "angle", dflt: "auto", editType: "plot" }, textfont: t({}, d, {}), insidetextfont: t({}, d, {}), outsidetextfont: t({}, d, {}), constraintext: { valType: "enumerated", values: ["inside", "outside", "both", "none"], dflt: "both", editType: "calc" }, cliponaxis: t({}, m.cliponaxis, {}), orientation: { valType: "enumerated", values: ["v", "h"], editType: "calc+clearAxisTypes" }, base: { valType: "any", dflt: null, arrayOk: !0, editType: "calc" }, offset: { valType: "number", dflt: null, arrayOk: !0, editType: "calc" }, width: { valType: "number", dflt: null, min: 0, arrayOk: !0, editType: "calc" }, marker: h, offsetgroup: { valType: "string", dflt: "", editType: "calc" }, alignmentgroup: { valType: "string", dflt: "", editType: "calc" }, selected: { marker: { opacity: m.selected.marker.opacity, color: m.selected.marker.color, editType: "style" }, textfont: m.selected.textfont, editType: "style" }, unselected: { marker: { opacity: m.unselected.marker.opacity, color: m.unselected.marker.color, editType: "style" }, textfont: m.unselected.textfont, editType: "style" }, _deprecated: { bardir: { valType: "enumerated", editType: "calc", values: ["v", "h"] } } };
    }, { "../../components/colorscale/attributes": 374, "../../components/drawing/attributes": 388, "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642, "../scatter/attributes": 936, "./constants": 659 }], 658: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../plots/cartesian/align_period"), k = v("../../components/colorscale/helpers").hasColorscale, x = v("../../components/colorscale/calc"), e = v("./arrays_to_calcdata"), r = v("../scatter/calc_selection");
      Q.exports = function(n, s) {
        var t, d, u, o, h, l, i = m.getFromId(n, s.xaxis || "x"), p = m.getFromId(n, s.yaxis || "y"), c = { msUTC: !(!s.base && s.base !== 0) };
        s.orientation === "h" ? (t = i.makeCalcdata(s, "x", c), u = p.makeCalcdata(s, "y"), o = g(s, p, "y", u), h = !!s.yperiodalignment, l = "y") : (t = p.makeCalcdata(s, "y", c), u = i.makeCalcdata(s, "x"), o = g(s, i, "x", u), h = !!s.xperiodalignment, l = "x"), d = o.vals;
        for (var a = Math.min(d.length, t.length), y = new Array(a), f = 0; f < a; f++)
          y[f] = { p: d[f], s: t[f] }, h && (y[f].orig_p = u[f], y[f][l + "End"] = o.ends[f], y[f][l + "Start"] = o.starts[f]), s.ids && (y[f].id = String(s.ids[f]));
        return k(s, "marker") && x(n, s, { vals: s.marker.color, containerStr: "marker", cLetter: "c" }), k(s, "marker.line") && x(n, s, { vals: s.marker.line.color, containerStr: "marker.line", cLetter: "c" }), e(y, s), r(y, s), y;
      };
    }, { "../../components/colorscale/calc": 375, "../../components/colorscale/helpers": 378, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "../scatter/calc_selection": 938, "./arrays_to_calcdata": 656 }], 659: [function(v, Q, $) {
      Q.exports = { TEXTPAD: 3, eventDataKeys: ["value", "label"] };
    }, {}], 660: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib").isArrayOrTypedArray, k = v("../../constants/numerical").BADNUM, x = v("../../registry"), e = v("../../plots/cartesian/axes"), r = v("../../plots/cartesian/constraints").getAxisGroup, n = v("./sieve.js");
      function s(a, y, f, _, b) {
        if (_.length) {
          var w, T, L, A;
          switch (function(I, P) {
            var S, E;
            for (S = 0; S < P.length; S++) {
              var R, z = P[S], j = z[0].trace, H = j.type === "funnel" ? j._base : j.base, Y = j.orientation === "h" ? j.xcalendar : j.ycalendar, J = I.type === "category" || I.type === "multicategory" ? function() {
                return null;
              } : I.d2c;
              if (g(H)) {
                for (E = 0; E < Math.min(H.length, z.length); E++)
                  R = J(H[E], 0, Y), m(R) ? (z[E].b = +R, z[E].hasB = 1) : z[E].b = 0;
                for (; E < z.length; E++)
                  z[E].b = 0;
              } else {
                R = J(H, 0, Y);
                var W = m(R);
                for (R = W ? R : 0, E = 0; E < z.length; E++)
                  z[E].b = R, W && (z[E].hasB = 1);
              }
            }
          }(f, _), b.mode) {
            case "overlay":
              t(y, f, _, b);
              break;
            case "group":
              for (w = [], T = [], L = 0; L < _.length; L++)
                (A = _[L])[0].trace.offset === void 0 ? T.push(A) : w.push(A);
              T.length && function(I, P, S, E, R) {
                var z = new n(E, { posAxis: P, sepNegVal: !1, overlapNoMerge: !R.norm });
                (function(j, H, Y, J) {
                  for (var W = j._fullLayout, Z = Y.positions, re = Y.distinctPositions, V = Y.minDiff, B = Y.traces, U = B.length, ee = Z.length !== re.length, N = V * (1 - J.gap), K = r(W, H._id) + B[0][0].trace.orientation, X = W._alignmentOpts[K] || {}, te = 0; te < U; te++) {
                    var ie, le, oe = B[te], ve = oe[0].trace, ue = X[ve.alignmentgroup] || {}, ye = Object.keys(ue.offsetGroups || {}).length, Ae = (ie = ye ? N / ye : ee ? N / U : N) * (1 - (J.groupgap || 0));
                    le = ye ? ((2 * ve._offsetIndex + 1 - ye) * ie - Ae) / 2 : ee ? ((2 * te + 1 - U) * ie - Ae) / 2 : -Ae / 2;
                    var pe = oe[0].t;
                    pe.barwidth = Ae, pe.poffset = le, pe.bargroupwidth = N, pe.bardelta = V;
                  }
                  Y.binWidth = B[0][0].t.barwidth / 100, u(Y), o(H, Y), h(H, Y, ee);
                })(I, P, z, R), function(j, H) {
                  for (var Y = j.traces, J = 0; J < Y.length; J++) {
                    var W = Y[J];
                    if (W[0].trace.base === void 0)
                      for (var Z = new n([W], { posAxis: H, sepNegVal: !0, overlapNoMerge: !0 }), re = 0; re < W.length; re++) {
                        var V = W[re];
                        if (V.p !== k) {
                          var B = Z.put(V.p, V.b + V.s);
                          B && (V.b = B);
                        }
                      }
                  }
                }(z, P), R.norm ? (i(z), p(S, z, R)) : l(S, z);
              }(a, y, f, T, b), w.length && t(y, f, w, b);
              break;
            case "stack":
            case "relative":
              for (w = [], T = [], L = 0; L < _.length; L++)
                (A = _[L])[0].trace.base === void 0 ? T.push(A) : w.push(A);
              T.length && function(I, P, S, E, R) {
                var z = new n(E, { posAxis: P, sepNegVal: R.mode === "relative", overlapNoMerge: !(R.norm || R.mode === "stack" || R.mode === "relative") });
                d(P, z, R), function(W, Z, re) {
                  var V, B, U, ee, N, K, X = c(W), te = Z.traces;
                  for (ee = 0; ee < te.length; ee++)
                    if (V = te[ee], (B = V[0].trace).type === "funnel")
                      for (N = 0; N < V.length; N++)
                        (K = V[N]).s !== k && Z.put(K.p, -0.5 * K.s);
                  for (ee = 0; ee < te.length; ee++) {
                    V = te[ee], B = V[0].trace, U = B.type === "funnel";
                    var ie = [];
                    for (N = 0; N < V.length; N++)
                      if ((K = V[N]).s !== k) {
                        var le;
                        le = U ? K.s : K.s + K.b;
                        var oe = Z.put(K.p, le), ve = oe + le;
                        K.b = oe, K[X] = ve, re.norm || (ie.push(ve), K.hasB && ie.push(oe));
                      }
                    re.norm || (B._extremes[W._id] = e.findExtremes(W, ie, { tozero: !0, padded: !0 }));
                  }
                }(S, z, R);
                for (var j = 0; j < E.length; j++)
                  for (var H = E[j], Y = 0; Y < H.length; Y++) {
                    var J = H[Y];
                    J.s !== k && J.b + J.s === z.get(J.p, J.s) && (J._outmost = !0);
                  }
                R.norm && p(S, z, R);
              }(0, y, f, T, b), w.length && t(y, f, w, b);
          }
          (function(I, P) {
            var S, E, R, z = c(P), j = {}, H = 1 / 0, Y = -1 / 0;
            for (S = 0; S < I.length; S++)
              for (R = I[S], E = 0; E < R.length; E++) {
                var J = R[E].p;
                m(J) && (H = Math.min(H, J), Y = Math.max(Y, J));
              }
            var W = 1e4 / (Y - H), Z = j.round = function(K) {
              return String(Math.round(W * (K - H)));
            };
            for (S = 0; S < I.length; S++) {
              (R = I[S])[0].t.extents = j;
              var re = R[0].t.poffset, V = Array.isArray(re);
              for (E = 0; E < R.length; E++) {
                var B = R[E], U = B[z] - B.w / 2;
                if (m(U)) {
                  var ee = B[z] + B.w / 2, N = Z(B.p);
                  j[N] ? j[N] = [Math.min(U, j[N][0]), Math.max(ee, j[N][1])] : j[N] = [U, ee];
                }
                B.p0 = B.p + (V ? re[E] : re), B.p1 = B.p0 + B.w, B.s0 = B.b, B.s1 = B.s0 + B.s;
              }
            }
          })(_, y);
        }
      }
      function t(a, y, f, _) {
        for (var b = 0; b < f.length; b++) {
          var w = f[b], T = new n([w], { posAxis: a, sepNegVal: !1, overlapNoMerge: !_.norm });
          d(a, T, _), _.norm ? (i(T), p(y, T, _)) : l(y, T);
        }
      }
      function d(a, y, f) {
        for (var _ = y.minDiff, b = y.traces, w = _ * (1 - f.gap), T = w * (1 - (f.groupgap || 0)), L = -T / 2, A = 0; A < b.length; A++) {
          var I = b[A][0].t;
          I.barwidth = T, I.poffset = L, I.bargroupwidth = w, I.bardelta = _;
        }
        y.binWidth = b[0][0].t.barwidth / 100, u(y), o(a, y), h(a, y);
      }
      function u(a) {
        var y, f, _ = a.traces;
        for (y = 0; y < _.length; y++) {
          var b, w = _[y], T = w[0], L = T.trace, A = T.t, I = L._offset || L.offset, P = A.poffset;
          if (g(I)) {
            for (b = Array.prototype.slice.call(I, 0, w.length), f = 0; f < b.length; f++)
              m(b[f]) || (b[f] = P);
            for (f = b.length; f < w.length; f++)
              b.push(P);
            A.poffset = b;
          } else
            I !== void 0 && (A.poffset = I);
          var S = L._width || L.width, E = A.barwidth;
          if (g(S)) {
            var R = Array.prototype.slice.call(S, 0, w.length);
            for (f = 0; f < R.length; f++)
              m(R[f]) || (R[f] = E);
            for (f = R.length; f < w.length; f++)
              R.push(E);
            if (A.barwidth = R, I === void 0) {
              for (b = [], f = 0; f < w.length; f++)
                b.push(P + (E - R[f]) / 2);
              A.poffset = b;
            }
          } else
            S !== void 0 && (A.barwidth = S, I === void 0 && (A.poffset = P + (E - S) / 2));
        }
      }
      function o(a, y) {
        for (var f = y.traces, _ = c(a), b = 0; b < f.length; b++)
          for (var w = f[b], T = w[0].t, L = T.poffset, A = Array.isArray(L), I = T.barwidth, P = Array.isArray(I), S = 0; S < w.length; S++) {
            var E = w[S], R = E.w = P ? I[S] : I;
            E[_] = E.p + (A ? L[S] : L) + R / 2;
          }
      }
      function h(a, y, f) {
        var _ = y.traces, b = y.minDiff / 2;
        e.minDtick(a, y.minDiff, y.distinctPositions[0], f);
        for (var w = 0; w < _.length; w++) {
          var T, L, A, I, P = _[w], S = P[0], E = S.trace, R = [];
          for (I = 0; I < P.length; I++)
            L = (T = P[I]).p - b, A = T.p + b, R.push(L, A);
          if (E.width || E.offset) {
            var z = S.t, j = z.poffset, H = z.barwidth, Y = Array.isArray(j), J = Array.isArray(H);
            for (I = 0; I < P.length; I++) {
              T = P[I];
              var W = Y ? j[I] : j, Z = J ? H[I] : H;
              A = (L = T.p + W) + Z, R.push(L, A);
            }
          }
          E._extremes[a._id] = e.findExtremes(a, R, { padded: !1 });
        }
      }
      function l(a, y) {
        for (var f = y.traces, _ = c(a), b = 0; b < f.length; b++) {
          for (var w = f[b], T = w[0].trace, L = [], A = !1, I = 0; I < w.length; I++) {
            var P = w[I], S = P.b, E = S + P.s;
            P[_] = E, L.push(E), P.hasB && L.push(S), P.hasB && P.b || (A = !0);
          }
          T._extremes[a._id] = e.findExtremes(a, L, { tozero: A, padded: !0 });
        }
      }
      function i(a) {
        for (var y = a.traces, f = 0; f < y.length; f++)
          for (var _ = y[f], b = 0; b < _.length; b++) {
            var w = _[b];
            w.s !== k && a.put(w.p, w.b + w.s);
          }
      }
      function p(a, y, f) {
        var _ = y.traces, b = c(a), w = f.norm === "fraction" ? 1 : 100, T = w / 1e9, L = a.l2c(a.c2l(0)), A = f.mode === "stack" ? w : L;
        function I(re) {
          return m(a.c2l(re)) && (re < L - T || re > A + T || !m(L));
        }
        for (var P = 0; P < _.length; P++) {
          for (var S = _[P], E = S[0].trace, R = [], z = !1, j = !1, H = 0; H < S.length; H++) {
            var Y = S[H];
            if (Y.s !== k) {
              var J = Math.abs(w / y.get(Y.p, Y.s));
              Y.b *= J, Y.s *= J;
              var W = Y.b, Z = W + Y.s;
              Y[b] = Z, R.push(Z), j = j || I(Z), Y.hasB && (R.push(W), j = j || I(W)), Y.hasB && Y.b || (z = !0);
            }
          }
          E._extremes[a._id] = e.findExtremes(a, R, { tozero: z, padded: j });
        }
      }
      function c(a) {
        return a._id.charAt(0);
      }
      Q.exports = { crossTraceCalc: function(a, y) {
        for (var f = y.xaxis, _ = y.yaxis, b = a._fullLayout, w = a._fullData, T = a.calcdata, L = [], A = [], I = 0; I < w.length; I++) {
          var P = w[I];
          if (P.visible === !0 && x.traceIs(P, "bar") && P.xaxis === f._id && P.yaxis === _._id && (P.orientation === "h" ? L.push(T[I]) : A.push(T[I]), P._computePh))
            for (var S = a.calcdata[I], E = 0; E < S.length; E++)
              typeof S[E].ph0 == "function" && (S[E].ph0 = S[E].ph0()), typeof S[E].ph1 == "function" && (S[E].ph1 = S[E].ph1());
        }
        var R = { xCat: f.type === "category" || f.type === "multicategory", yCat: _.type === "category" || _.type === "multicategory", mode: b.barmode, norm: b.barnorm, gap: b.bargap, groupgap: b.bargroupgap };
        s(a, f, _, A, R), s(a, _, f, L, R);
      }, setGroupPositions: s };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/axes": 566, "../../plots/cartesian/constraints": 574, "../../registry": 647, "./sieve.js": 670, "fast-isnumeric": 190 }], 661: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../../registry"), x = v("../scatter/xy_defaults"), e = v("../scatter/period_defaults"), r = v("./style_defaults"), n = v("../../plots/cartesian/constraints").getAxisGroup, s = v("./attributes"), t = m.coerceFont;
      function d(o, h, l, i) {
        var p = h.orientation, c = h[{ v: "x", h: "y" }[p] + "axis"], a = n(l, c) + p, y = l._alignmentOpts || {}, f = i("alignmentgroup"), _ = y[a];
        _ || (_ = y[a] = {});
        var b = _[f];
        b ? b.traces.push(h) : b = _[f] = { traces: [h], alignmentIndex: Object.keys(_).length, offsetGroups: {} };
        var w = i("offsetgroup"), T = b.offsetGroups, L = T[w];
        w && (L || (L = T[w] = { offsetIndex: Object.keys(T).length }), h._offsetIndex = L.offsetIndex);
      }
      function u(o, h, l, i, p, c) {
        var a = (c = c || {}).moduleHasSelected !== !1, y = c.moduleHasUnselected !== !1, f = c.moduleHasConstrain !== !1, _ = c.moduleHasCliponaxis !== !1, b = c.moduleHasTextangle !== !1, w = c.moduleHasInsideanchor !== !1, T = !!c.hasPathbar, L = Array.isArray(p) || p === "auto", A = L || p === "inside", I = L || p === "outside";
        if (A || I) {
          var P = t(i, "textfont", l.font), S = m.extendFlat({}, P), E = !(o.textfont && o.textfont.color);
          if (E && delete S.color, t(i, "insidetextfont", S), T) {
            var R = m.extendFlat({}, P);
            E && delete R.color, t(i, "pathbar.textfont", R);
          }
          I && t(i, "outsidetextfont", P), a && i("selected.textfont.color"), y && i("unselected.textfont.color"), f && i("constraintext"), _ && i("cliponaxis"), b && i("textangle"), i("texttemplate");
        }
        A && w && i("insidetextanchor");
      }
      Q.exports = { supplyDefaults: function(o, h, l, i) {
        function p(f, _) {
          return m.coerce(o, h, s, f, _);
        }
        if (x(o, h, i, p)) {
          e(o, h, i, p), p("xhoverformat"), p("yhoverformat"), p("orientation", h.x && !h.y ? "h" : "v"), p("base"), p("offset"), p("width"), p("text"), p("hovertext"), p("hovertemplate");
          var c = p("textposition");
          u(o, h, i, p, c, { moduleHasSelected: !0, moduleHasUnselected: !0, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), r(o, h, p, l, i);
          var a = (h.marker.line || {}).color, y = k.getComponentMethod("errorbars", "supplyDefaults");
          y(o, h, a || g.defaultLine, { axis: "y" }), y(o, h, a || g.defaultLine, { axis: "x", inherit: "y" }), m.coerceSelectionMarkerOpacity(h, p);
        } else
          h.visible = !1;
      }, crossTraceDefaults: function(o, h) {
        var l;
        function i(c) {
          return m.coerce(l._input, l, s, c);
        }
        if (h.barmode === "group")
          for (var p = 0; p < o.length; p++)
            (l = o[p]).type === "bar" && (l._input, d(0, l, h, i));
      }, handleGroupingDefaults: d, handleText: u };
    }, { "../../components/color": 367, "../../lib": 515, "../../plots/cartesian/constraints": 574, "../../registry": 647, "../scatter/period_defaults": 956, "../scatter/xy_defaults": 963, "./attributes": 657, "./style_defaults": 672 }], 662: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        return m.x = "xVal" in g ? g.xVal : g.x, m.y = "yVal" in g ? g.yVal : g.y, g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), k.orientation === "h" ? (m.label = m.y, m.value = m.x) : (m.label = m.x, m.value = m.y), m;
      };
    }, {}], 663: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("tinycolor2"), k = v("../../lib").isArrayOrTypedArray;
      $.coerceString = function(x, e, r) {
        if (typeof e == "string") {
          if (e || !x.noBlank)
            return e;
        } else if ((typeof e == "number" || e === !0) && !x.strict)
          return String(e);
        return r !== void 0 ? r : x.dflt;
      }, $.coerceNumber = function(x, e, r) {
        if (m(e)) {
          e = +e;
          var n = x.min, s = x.max;
          if (!(n !== void 0 && e < n || s !== void 0 && e > s))
            return e;
        }
        return r !== void 0 ? r : x.dflt;
      }, $.coerceColor = function(x, e, r) {
        return g(e).isValid() ? e : r !== void 0 ? r : x.dflt;
      }, $.coerceEnumerated = function(x, e, r) {
        return x.coerceNumber && (e = +e), x.values.indexOf(e) !== -1 ? e : r !== void 0 ? r : x.dflt;
      }, $.getValue = function(x, e) {
        var r;
        return Array.isArray(x) ? e < x.length && (r = x[e]) : r = x, r;
      }, $.getLineWidth = function(x, e) {
        return 0 < e.mlw ? e.mlw : k(x.marker.line.width) ? 0 : x.marker.line.width;
      };
    }, { "../../lib": 515, "fast-isnumeric": 190, tinycolor2: 313 }], 664: [function(v, Q, $) {
      var m = v("../../components/fx"), g = v("../../registry"), k = v("../../components/color"), x = v("../../lib").fillText, e = v("./helpers").getLineWidth, r = v("../../plots/cartesian/axes").hoverLabelText, n = v("../../constants/numerical").BADNUM;
      function s(d, u, o, h, l) {
        var i, p, c, a, y, f, _, b = d.cd, w = b[0].trace, T = b[0].t, L = h === "closest", A = w.type === "waterfall", I = d.maxHoverDistance, P = d.maxSpikeDistance;
        w.orientation === "h" ? (i = o, p = u, c = "y", a = "x", y = V, f = Z) : (i = u, p = o, c = "x", a = "y", f = V, y = Z);
        var S = w[c + "period"], E = L || S;
        function R(ie) {
          return j(ie, -1);
        }
        function z(ie) {
          return j(ie, 1);
        }
        function j(ie, le) {
          var oe = ie.w;
          return ie[c] + le * oe / 2;
        }
        function H(ie) {
          return ie[c + "End"] - ie[c + "Start"];
        }
        var Y = L ? R : S ? function(ie) {
          return ie.p - H(ie) / 2;
        } : function(ie) {
          return Math.min(R(ie), ie.p - T.bardelta / 2);
        }, J = L ? z : S ? function(ie) {
          return ie.p + H(ie) / 2;
        } : function(ie) {
          return Math.max(z(ie), ie.p + T.bardelta / 2);
        };
        function W(ie, le, oe) {
          return l.finiteRange && (oe = 0), m.inbox(ie - i, le - i, oe + Math.min(1, Math.abs(le - ie) / _) - 1);
        }
        function Z(ie) {
          return W(Y(ie), J(ie), I);
        }
        function re(ie) {
          var le = ie[a];
          if (A) {
            var oe = Math.abs(ie.rawS) || 0;
            p > 0 ? le += oe : p < 0 && (le -= oe);
          }
          return le;
        }
        function V(ie) {
          var le = p, oe = ie.b, ve = re(ie);
          return m.inbox(oe - le, ve - le, I + (ve - le) / (ve - oe) - 1);
        }
        var B = d[c + "a"], U = d[a + "a"];
        _ = Math.abs(B.r2c(B.range[1]) - B.r2c(B.range[0]));
        var ee = m.getDistanceFunction(h, y, f, function(ie) {
          return (y(ie) + f(ie)) / 2;
        });
        if (m.getClosest(b, ee, d), d.index !== !1 && b[d.index].p !== n) {
          E || (Y = function(ie) {
            return Math.min(R(ie), ie.p - T.bargroupwidth / 2);
          }, J = function(ie) {
            return Math.max(z(ie), ie.p + T.bargroupwidth / 2);
          });
          var N = b[d.index], K = w.base ? N.b + N.s : N.s;
          d[a + "0"] = d[a + "1"] = U.c2p(N[a], !0), d[a + "LabelVal"] = K;
          var X = T.extents[T.extents.round(N.p)];
          d[c + "0"] = B.c2p(L ? Y(N) : X[0], !0), d[c + "1"] = B.c2p(L ? J(N) : X[1], !0);
          var te = N.orig_p !== void 0;
          return d[c + "LabelVal"] = te ? N.orig_p : N.p, d.labelLabel = r(B, d[c + "LabelVal"], w[c + "hoverformat"]), d.valueLabel = r(U, d[a + "LabelVal"], w[a + "hoverformat"]), d.baseLabel = r(U, N.b, w[a + "hoverformat"]), d.spikeDistance = (function(ie) {
            var le = p, oe = ie.b, ve = re(ie);
            return m.inbox(oe - le, ve - le, P + (ve - le) / (ve - oe) - 1);
          }(N) + function(ie) {
            return W(R(ie), z(ie), P);
          }(N)) / 2, d[c + "Spike"] = B.c2p(N.p, !0), x(N, w, d), d.hovertemplate = w.hovertemplate, d;
        }
      }
      function t(d, u) {
        var o = u.mcc || d.marker.color, h = u.mlcc || d.marker.line.color, l = e(d, u);
        return k.opacity(o) ? o : k.opacity(h) && l ? h : void 0;
      }
      Q.exports = { hoverPoints: function(d, u, o, h, l) {
        var i = s(d, u, o, h, l);
        if (i) {
          var p = i.cd, c = p[0].trace, a = p[i.index];
          return i.color = t(c, a), g.getComponentMethod("errorbars", "hoverInfo")(a, c, i), [i];
        }
      }, hoverOnBars: s, getTraceColor: t };
    }, { "../../components/color": 367, "../../components/fx": 407, "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/axes": 566, "../../registry": 647, "./helpers": 663 }], 665: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults").supplyDefaults, crossTraceDefaults: v("./defaults").crossTraceDefaults, supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc"), crossTraceCalc: v("./cross_trace_calc").crossTraceCalc, colorbar: v("../scatter/marker_colorbar"), arraysToCalcdata: v("./arrays_to_calcdata"), plot: v("./plot").plot, style: v("./style").style, styleOnSelect: v("./style").styleOnSelect, hoverPoints: v("./hover").hoverPoints, eventData: v("./event_data"), selectPoints: v("./select"), moduleType: "trace", name: "bar", basePlotModule: v("../../plots/cartesian"), categories: ["bar-like", "cartesian", "svg", "bar", "oriented", "errorBarsOK", "showLegend", "zoomScale"], animatable: !0, meta: {} };
    }, { "../../plots/cartesian": 578, "../scatter/marker_colorbar": 954, "./arrays_to_calcdata": 656, "./attributes": 657, "./calc": 658, "./cross_trace_calc": 660, "./defaults": 661, "./event_data": 662, "./hover": 664, "./layout_attributes": 666, "./layout_defaults": 667, "./plot": 668, "./select": 669, "./style": 671 }], 666: [function(v, Q, $) {
      Q.exports = { barmode: { valType: "enumerated", values: ["stack", "group", "overlay", "relative"], dflt: "group", editType: "calc" }, barnorm: { valType: "enumerated", values: ["", "fraction", "percent"], dflt: "", editType: "calc" }, bargap: { valType: "number", min: 0, max: 1, editType: "calc" }, bargroupgap: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" } };
    }, {}], 667: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../plots/cartesian/axes"), k = v("../../lib"), x = v("./layout_attributes");
      Q.exports = function(e, r, n) {
        function s(c, a) {
          return k.coerce(e, r, x, c, a);
        }
        for (var t = !1, d = !1, u = !1, o = {}, h = s("barmode"), l = 0; l < n.length; l++) {
          var i = n[l];
          if (m.traceIs(i, "bar") && i.visible) {
            if (t = !0, h === "group") {
              var p = i.xaxis + i.yaxis;
              o[p] && (u = !0), o[p] = !0;
            }
            i.visible && i.type === "histogram" && g.getFromId({ _fullLayout: r }, i[i.orientation === "v" ? "xaxis" : "yaxis"]).type !== "category" && (d = !0);
          }
        }
        t ? (h !== "overlay" && s("barnorm"), s("bargap", d && !u ? 0 : 0.2), s("bargroupgap")) : delete r.barmode;
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "../../registry": 647, "./layout_attributes": 666 }], 668: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../../lib"), x = v("../../lib/svg_text_utils"), e = v("../../components/color"), r = v("../../components/drawing"), n = v("../../registry"), s = v("../../plots/cartesian/axes").tickText, t = v("./uniform_text"), d = t.recordMinTextSize, u = t.clearMinTextSize, o = v("./style"), h = v("./helpers"), l = v("./constants"), i = v("./attributes"), p = i.text, c = i.textposition, a = v("../../components/fx/helpers").appendArrayPointValue, y = l.TEXTPAD;
      function f(P) {
        return P.id;
      }
      function _(P) {
        if (P.ids)
          return f;
      }
      function b(P, S) {
        return P < S ? 1 : -1;
      }
      function w(P, S, E, R) {
        var z;
        return !S.uniformtext.mode && T(E) ? (R && (z = R()), P.transition().duration(E.duration).ease(E.easing).each("end", function() {
          z && z();
        }).each("interrupt", function() {
          z && z();
        })) : P;
      }
      function T(P) {
        return P && P.duration > 0;
      }
      function L(P) {
        return P === "auto" ? 0 : P;
      }
      function A(P, S) {
        var E = Math.PI / 180 * S, R = Math.abs(Math.sin(E)), z = Math.abs(Math.cos(E));
        return { x: P.width * z + P.height * R, y: P.width * R + P.height * z };
      }
      function I(P, S, E, R, z, j) {
        var H = !!j.isHorizontal, Y = !!j.constrained, J = j.angle || 0, W = j.anchor || "end", Z = W === "end", re = W === "start", V = ((j.leftToRight || 0) + 1) / 2, B = 1 - V, U = z.width, ee = z.height, N = Math.abs(S - P), K = Math.abs(R - E), X = N > 2 * y && K > 2 * y ? y : 0;
        N -= 2 * X, K -= 2 * X;
        var te = L(J);
        J !== "auto" || U <= N && ee <= K || !(U > N || ee > K) || (U > K || ee > N) && U < ee == N < K || (te += 90);
        var ie = A(z, te), le = 1;
        Y && (le = Math.min(1, N / ie.x, K / ie.y));
        var oe = z.left * B + z.right * V, ve = (z.top + z.bottom) / 2, ue = (P + y) * B + (S - y) * V, ye = (E + R) / 2, Ae = 0, pe = 0;
        if (re || Z) {
          var ge = (H ? ie.x : ie.y) / 2, we = H ? b(P, S) : b(E, R);
          H ? re ? (ue = P + we * X, Ae = -we * ge) : (ue = S - we * X, Ae = we * ge) : re ? (ye = E + we * X, pe = -we * ge) : (ye = R - we * X, pe = we * ge);
        }
        return { textX: oe, textY: ve, targetX: ue, targetY: ye, anchorX: Ae, anchorY: pe, scale: le, rotate: te };
      }
      Q.exports = { plot: function(P, S, E, R, z, j) {
        var H = S.xaxis, Y = S.yaxis, J = P._fullLayout;
        z || (z = { mode: J.barmode, norm: J.barmode, gap: J.bargap, groupgap: J.bargroupgap }, u("bar", J));
        var W = k.makeTraceGroups(R, E, "trace bars").each(function(Z) {
          var re = m.select(this), V = Z[0].trace, B = V.type === "waterfall", U = V.type === "funnel", ee = V.type === "bar" || U, N = 0;
          B && V.connector.visible && V.connector.mode === "between" && (N = V.connector.line.width / 2);
          var K = V.orientation === "h", X = T(z), te = k.ensureSingle(re, "g", "points"), ie = _(V), le = te.selectAll("g.point").data(k.identity, ie);
          le.enter().append("g").classed("point", !0), le.exit().remove(), le.each(function(ve, ue) {
            var ye, Ae, pe = m.select(this), ge = function(Fe, Pe, De, Ge) {
              var Qe = [], ot = [], vt = Ge ? Pe : De, bt = Ge ? De : Pe;
              return Qe[0] = vt.c2p(Fe.s0, !0), ot[0] = bt.c2p(Fe.p0, !0), Qe[1] = vt.c2p(Fe.s1, !0), ot[1] = bt.c2p(Fe.p1, !0), Ge ? [Qe, ot] : [ot, Qe];
            }(ve, H, Y, K), we = ge[0][0], se = ge[0][1], de = ge[1][0], Te = ge[1][1], Ee = (K ? se - we : Te - de) == 0;
            if (Ee && ee && h.getLineWidth(V, ve) && (Ee = !1), Ee || (Ee = !(g(we) && g(se) && g(de) && g(Te))), ve.isBlank = Ee, Ee && (K ? se = we : Te = de), N && !Ee && (K ? (we -= b(we, se) * N, se += b(we, se) * N) : (de -= b(de, Te) * N, Te += b(de, Te) * N)), V.type === "waterfall") {
              if (!Ee) {
                var Me = V[ve.dir].marker;
                ye = Me.line.width, Ae = Me.color;
              }
            } else
              ye = h.getLineWidth(V, ve), Ae = ve.mc || V.marker.color;
            function ze(Fe) {
              var Pe = m.round(ye / 2 % 1, 2);
              return z.gap === 0 && z.groupgap === 0 ? m.round(Math.round(Fe) - Pe, 2) : Fe;
            }
            if (!P._context.staticPlot) {
              var Ie = e.opacity(Ae) < 1 || ye > 0.01 ? ze : function(Fe, Pe, De) {
                return De && Fe === Pe ? Fe : Math.abs(Fe - Pe) >= 2 ? ze(Fe) : Fe > Pe ? Math.ceil(Fe) : Math.floor(Fe);
              };
              we = Ie(we, se, K), se = Ie(se, we, K), de = Ie(de, Te, !K), Te = Ie(Te, de, !K);
            }
            var Oe = w(k.ensureSingle(pe, "path"), J, z, j);
            if (Oe.style("vector-effect", "non-scaling-stroke").attr("d", isNaN((se - we) * (Te - de)) || Ee && P._context.staticPlot ? "M0,0Z" : "M" + we + "," + de + "V" + Te + "H" + se + "V" + de + "Z").call(r.setClipUrl, S.layerClipId, P), !J.uniformtext.mode && X) {
              var Ze = r.makePointStyleFns(V);
              r.singlePointStyle(ve, Oe, V, Ze, P);
            }
            (function(Fe, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke) {
              var mt, Ft = Pe.xaxis, Vt = Pe.yaxis, Xt = Fe._fullLayout;
              function Gt(Ut, fr, Tr) {
                return k.ensureSingle(Ut, "text").text(fr).attr({ class: "bartext bartext-" + mt, "text-anchor": "middle", "data-notex": 1 }).call(r.font, Tr).call(x.convertToTspans, Fe);
              }
              var nr = Ge[0].trace, It = nr.orientation === "h", Be = function(Ut, fr, Tr, ur, Kt) {
                var $t, er = fr[0].trace;
                return $t = er.texttemplate ? function(cr, gr, Mr, Ir, Fr) {
                  var Gr = gr[0].trace, un = k.castOption(Gr, Mr, "texttemplate");
                  if (!un)
                    return "";
                  var $r, Dn, rn, vn, xn = Gr.type === "histogram", $n = Gr.type === "waterfall", Br = Gr.type === "funnel", tn = Gr.orientation === "h";
                  tn ? ($r = "y", Dn = Fr, rn = "x", vn = Ir) : ($r = "x", Dn = Ir, rn = "y", vn = Fr);
                  function mn(tr) {
                    return s(vn, vn.c2l(tr), !0).text;
                  }
                  var Qr = gr[Mr], cn = {};
                  cn.label = Qr.p, cn.labelLabel = cn[$r + "Label"] = (Hn = Qr.p, s(Dn, Dn.c2l(Hn), !0).text);
                  var Hn, _n = k.castOption(Gr, Qr.i, "text");
                  (_n === 0 || _n) && (cn.text = _n), cn.value = Qr.s, cn.valueLabel = cn[rn + "Label"] = mn(Qr.s);
                  var En = {};
                  a(En, Gr, Qr.i), (xn || En.x === void 0) && (En.x = tn ? cn.value : cn.label), (xn || En.y === void 0) && (En.y = tn ? cn.label : cn.value), (xn || En.xLabel === void 0) && (En.xLabel = tn ? cn.valueLabel : cn.labelLabel), (xn || En.yLabel === void 0) && (En.yLabel = tn ? cn.labelLabel : cn.valueLabel), $n && (cn.delta = +Qr.rawS || Qr.s, cn.deltaLabel = mn(cn.delta), cn.final = Qr.v, cn.finalLabel = mn(cn.final), cn.initial = cn.final - cn.delta, cn.initialLabel = mn(cn.initial)), Br && (cn.value = Qr.s, cn.valueLabel = mn(cn.value), cn.percentInitial = Qr.begR, cn.percentInitialLabel = k.formatPercent(Qr.begR), cn.percentPrevious = Qr.difR, cn.percentPreviousLabel = k.formatPercent(Qr.difR), cn.percentTotal = Qr.sumR, cn.percenTotalLabel = k.formatPercent(Qr.sumR));
                  var aa = k.castOption(Gr, Qr.i, "customdata");
                  return aa && (cn.customdata = aa), k.texttemplateString(un, cn, cr._d3locale, En, cn, Gr._meta || {});
                }(Ut, fr, Tr, ur, Kt) : er.textinfo ? function(cr, gr, Mr, Ir) {
                  var Fr = cr[0].trace, Gr = Fr.orientation === "h", un = Fr.type === "waterfall", $r = Fr.type === "funnel";
                  function Dn(aa) {
                    return s(Gr ? Mr : Ir, +aa, !0).text;
                  }
                  var rn, vn = Fr.textinfo, xn = cr[gr], $n = vn.split("+"), Br = [], tn = function(aa) {
                    return $n.indexOf(aa) !== -1;
                  };
                  tn("label") && Br.push((mn = cr[gr].p, s(Gr ? Ir : Mr, mn, !0).text));
                  var mn;
                  if (tn("text") && ((rn = k.castOption(Fr, xn.i, "text")) === 0 || rn) && Br.push(rn), un) {
                    var Qr = +xn.rawS || xn.s, cn = xn.v, Hn = cn - Qr;
                    tn("initial") && Br.push(Dn(Hn)), tn("delta") && Br.push(Dn(Qr)), tn("final") && Br.push(Dn(cn));
                  }
                  if ($r) {
                    tn("value") && Br.push(Dn(xn.s));
                    var _n = 0;
                    tn("percent initial") && _n++, tn("percent previous") && _n++, tn("percent total") && _n++;
                    var En = _n > 1;
                    tn("percent initial") && (rn = k.formatPercent(xn.begR), En && (rn += " of initial"), Br.push(rn)), tn("percent previous") && (rn = k.formatPercent(xn.difR), En && (rn += " of previous"), Br.push(rn)), tn("percent total") && (rn = k.formatPercent(xn.sumR), En && (rn += " of total"), Br.push(rn));
                  }
                  return Br.join("<br>");
                }(fr, Tr, ur, Kt) : h.getValue(er.text, Tr), h.coerceString(p, $t);
              }(Xt, Ge, Qe, Ft, Vt);
              mt = function(Ut, fr) {
                var Tr = h.getValue(Ut.textposition, fr);
                return h.coerceEnumerated(c, Tr);
              }(nr, Qe);
              var He = tt.mode === "stack" || tt.mode === "relative", he = Ge[Qe], be = !He || he._outmost;
              if (!Be || mt === "none" || (he.isBlank || ot === vt || bt === yt) && (mt === "auto" || mt === "inside"))
                return void De.select("text").remove();
              var Re = Xt.font, Ue = o.getBarColor(Ge[Qe], nr), Xe = o.getInsideTextFont(nr, Qe, Re, Ue), qe = o.getOutsideTextFont(nr, Qe, Re), st = De.datum();
              It ? Ft.type === "log" && st.s0 <= 0 && (ot = Ft.range[0] < Ft.range[1] ? 0 : Ft._length) : Vt.type === "log" && st.s0 <= 0 && (bt = Vt.range[0] < Vt.range[1] ? Vt._length : 0);
              var it, Tt, Pt, rt, ut, Bt = Math.abs(vt - ot) - 2 * y, wt = Math.abs(yt - bt) - 2 * y;
              if (mt === "outside" && (be || he.hasB || (mt = "inside")), mt === "auto")
                if (be) {
                  mt = "inside", ut = k.ensureUniformFontSize(Fe, Xe), it = Gt(De, Be, ut), Tt = r.bBox(it.node()), Pt = Tt.width, rt = Tt.height;
                  var Lt = Pt <= Bt && rt <= wt, Se = Pt <= wt && rt <= Bt, We = It ? Bt >= Pt * (wt / rt) : wt >= rt * (Bt / Pt);
                  Pt > 0 && rt > 0 && (Lt || Se || We) ? mt = "inside" : (mt = "outside", it.remove(), it = null);
                } else
                  mt = "inside";
              if (!it) {
                ut = k.ensureUniformFontSize(Fe, mt === "outside" ? qe : Xe);
                var nt = (it = Gt(De, Be, ut)).attr("transform");
                if (it.attr("transform", ""), Tt = r.bBox(it.node()), Pt = Tt.width, rt = Tt.height, it.attr("transform", nt), Pt <= 0 || rt <= 0)
                  return void it.remove();
              }
              var ft, Mt, Nt = nr.textangle;
              mt === "outside" ? (Mt = nr.constraintext === "both" || nr.constraintext === "outside", ft = function(Ut, fr, Tr, ur, Kt, $t) {
                var er, cr = !!$t.isHorizontal, gr = !!$t.constrained, Mr = $t.angle || 0, Ir = Kt.width, Fr = Kt.height, Gr = Math.abs(fr - Ut), un = Math.abs(ur - Tr);
                er = cr ? un > 2 * y ? y : 0 : Gr > 2 * y ? y : 0;
                var $r = 1;
                gr && ($r = cr ? Math.min(1, un / Fr) : Math.min(1, Gr / Ir));
                var Dn = L(Mr), rn = A(Kt, Dn), vn = (cr ? rn.x : rn.y) / 2, xn = (Kt.left + Kt.right) / 2, $n = (Kt.top + Kt.bottom) / 2, Br = (Ut + fr) / 2, tn = (Tr + ur) / 2, mn = 0, Qr = 0, cn = cr ? b(fr, Ut) : b(Tr, ur);
                return cr ? (Br = fr - cn * er, mn = cn * vn) : (tn = ur + cn * er, Qr = -cn * vn), { textX: xn, textY: $n, targetX: Br, targetY: tn, anchorX: mn, anchorY: Qr, scale: $r, rotate: Dn };
              }(ot, vt, bt, yt, Tt, { isHorizontal: It, constrained: Mt, angle: Nt })) : (Mt = nr.constraintext === "both" || nr.constraintext === "inside", ft = I(ot, vt, bt, yt, Tt, { isHorizontal: It, constrained: Mt, angle: Nt, anchor: nr.insidetextanchor })), ft.fontSize = ut.size, d(nr.type === "histogram" ? "bar" : nr.type, ft, Xt), he.transform = ft;
              var Zt = w(it, Xt, tt, Ke);
              k.setTransormAndDisplay(Zt, ft);
            })(P, S, pe, Z, ue, we, se, de, Te, z, j), S.layerClipId && r.hideOutsideRangePoint(ve, pe.select("text"), H, Y, V.xcalendar, V.ycalendar);
          });
          var oe = V.cliponaxis === !1;
          r.setClipUrl(re, oe ? null : S.layerClipId, P);
        });
        n.getComponentMethod("errorbars", "plot")(P, W, S, z);
      }, toMoveInsideBar: I };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../components/fx/helpers": 403, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "../../registry": 647, "./attributes": 657, "./constants": 659, "./helpers": 663, "./style": 671, "./uniform_text": 673, "@plotly/d3": 58, "fast-isnumeric": 190 }], 669: [function(v, Q, $) {
      function m(g, k, x, e, r) {
        var n = k.c2p(e ? g.s0 : g.p0, !0), s = k.c2p(e ? g.s1 : g.p1, !0), t = x.c2p(e ? g.p0 : g.s0, !0), d = x.c2p(e ? g.p1 : g.s1, !0);
        return r ? [(n + s) / 2, (t + d) / 2] : e ? [s, (t + d) / 2] : [(n + s) / 2, d];
      }
      Q.exports = function(g, k) {
        var x, e = g.cd, r = g.xaxis, n = g.yaxis, s = e[0].trace, t = s.type === "funnel", d = s.orientation === "h", u = [];
        if (k === !1)
          for (x = 0; x < e.length; x++)
            e[x].selected = 0;
        else
          for (x = 0; x < e.length; x++) {
            var o = e[x], h = "ct" in o ? o.ct : m(o, r, n, d, t);
            k.contains(h, !1, x, g) ? (u.push({ pointNumber: x, x: r.c2d(o.x), y: n.c2d(o.y) }), o.selected = 1) : o.selected = 0;
          }
        return u;
      };
    }, {}], 670: [function(v, Q, $) {
      Q.exports = k;
      var m = v("../../lib").distinctVals, g = v("../../constants/numerical").BADNUM;
      function k(x, e) {
        this.traces = x, this.sepNegVal = e.sepNegVal, this.overlapNoMerge = e.overlapNoMerge;
        for (var r = 1 / 0, n = [], s = 0; s < x.length; s++) {
          for (var t = x[s], d = 0; d < t.length; d++) {
            var u = t[d];
            u.p !== g && n.push(u.p);
          }
          t[0] && t[0].width1 && (r = Math.min(t[0].width1, r));
        }
        this.positions = n;
        var o = m(n);
        this.distinctPositions = o.vals, o.vals.length === 1 && r !== 1 / 0 ? this.minDiff = r : this.minDiff = Math.min(o.minDiff, r);
        var h = (e.posAxis || {}).type;
        h !== "category" && h !== "multicategory" || (this.minDiff = 1), this.binWidth = this.minDiff, this.bins = {};
      }
      k.prototype.put = function(x, e) {
        var r = this.getLabel(x, e), n = this.bins[r] || 0;
        return this.bins[r] = n + e, n;
      }, k.prototype.get = function(x, e) {
        var r = this.getLabel(x, e);
        return this.bins[r] || 0;
      }, k.prototype.getLabel = function(x, e) {
        return (e < 0 && this.sepNegVal ? "v" : "^") + (this.overlapNoMerge ? x : Math.round(x / this.binWidth));
      };
    }, { "../../constants/numerical": 491, "../../lib": 515 }], 671: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../../components/drawing"), x = v("../../lib"), e = v("../../registry"), r = v("./uniform_text").resizeText, n = v("./attributes"), s = n.textfont, t = n.insidetextfont, d = n.outsidetextfont, u = v("./helpers");
      function o(f, _, b) {
        k.pointStyle(f.selectAll("path"), _, b), h(f, _, b);
      }
      function h(f, _, b) {
        f.selectAll("text").each(function(w) {
          var T = m.select(this), L = x.ensureUniformFontSize(b, l(T, w, _, b));
          k.font(T, L);
        });
      }
      function l(f, _, b, w) {
        var T = w._fullLayout.font, L = b.textfont;
        if (f.classed("bartext-inside")) {
          var A = y(_, b);
          L = p(b, _.i, T, A);
        } else
          f.classed("bartext-outside") && (L = c(b, _.i, T));
        return L;
      }
      function i(f, _, b) {
        return a(s, f.textfont, _, b);
      }
      function p(f, _, b, w) {
        var T = i(f, _, b);
        return (f._input.textfont === void 0 || f._input.textfont.color === void 0 || Array.isArray(f.textfont.color) && f.textfont.color[_] === void 0) && (T = { color: g.contrast(w), family: T.family, size: T.size }), a(t, f.insidetextfont, _, T);
      }
      function c(f, _, b) {
        var w = i(f, _, b);
        return a(d, f.outsidetextfont, _, w);
      }
      function a(f, _, b, w) {
        _ = _ || {};
        var T = u.getValue(_.family, b), L = u.getValue(_.size, b), A = u.getValue(_.color, b);
        return { family: u.coerceString(f.family, T, w.family), size: u.coerceNumber(f.size, L, w.size), color: u.coerceColor(f.color, A, w.color) };
      }
      function y(f, _) {
        return _.type === "waterfall" ? _[f.dir].marker.color : f.mcc || f.mc || _.marker.color;
      }
      Q.exports = { style: function(f) {
        var _ = m.select(f).selectAll("g.barlayer").selectAll("g.trace");
        r(f, _, "bar");
        var b = _.size(), w = f._fullLayout;
        _.style("opacity", function(T) {
          return T[0].trace.opacity;
        }).each(function(T) {
          (w.barmode === "stack" && b > 1 || w.bargap === 0 && w.bargroupgap === 0 && !T[0].trace.marker.line.width) && m.select(this).attr("shape-rendering", "crispEdges");
        }), _.selectAll("g.points").each(function(T) {
          o(m.select(this), T[0].trace, f);
        }), e.getComponentMethod("errorbars", "style")(_);
      }, styleTextPoints: h, styleOnSelect: function(f, _, b) {
        var w = _[0].trace;
        w.selectedpoints ? function(T, L, A) {
          k.selectedPointStyle(T.selectAll("path"), L), function(I, P, S) {
            I.each(function(E) {
              var R, z = m.select(this);
              if (E.selected) {
                R = x.ensureUniformFontSize(S, l(z, E, P, S));
                var j = P.selected.textfont && P.selected.textfont.color;
                j && (R.color = j), k.font(z, R);
              } else
                k.selectedTextStyle(z, P);
            });
          }(T.selectAll("text"), L, A);
        }(b, w, f) : (o(b, w, f), e.getComponentMethod("errorbars", "style")(b));
      }, getInsideTextFont: p, getOutsideTextFont: c, getBarColor: y, resizeText: r };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../lib": 515, "../../registry": 647, "./attributes": 657, "./helpers": 663, "./uniform_text": 673, "@plotly/d3": 58 }], 672: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../../components/colorscale/helpers").hasColorscale, k = v("../../components/colorscale/defaults"), x = v("../../lib").coercePattern;
      Q.exports = function(e, r, n, s, t) {
        var d = n("marker.color", s), u = g(e, "marker");
        u && k(e, r, t, n, { prefix: "marker.", cLetter: "c" }), n("marker.line.color", m.defaultLine), g(e, "marker.line") && k(e, r, t, n, { prefix: "marker.line.", cLetter: "c" }), n("marker.line.width"), n("marker.opacity"), x(n, "marker.pattern", d, u), n("selected.marker.color"), n("unselected.marker.color");
      };
    }, { "../../components/color": 367, "../../components/colorscale/defaults": 377, "../../components/colorscale/helpers": 378, "../../lib": 515 }], 673: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib");
      function k(x) {
        return "_" + x + "Text_minsize";
      }
      Q.exports = { recordMinTextSize: function(x, e, r) {
        if (r.uniformtext.mode) {
          var n = k(x), s = r.uniformtext.minsize, t = e.scale * e.fontSize;
          e.hide = t < s, r[n] = r[n] || 1 / 0, e.hide || (r[n] = Math.min(r[n], Math.max(t, s)));
        }
      }, clearMinTextSize: function(x, e) {
        e[k(x)] = void 0;
      }, resizeText: function(x, e, r) {
        var n = x._fullLayout, s = n["_" + r + "Text_minsize"];
        if (s) {
          var t, d = n.uniformtext.mode === "hide";
          switch (r) {
            case "funnelarea":
            case "pie":
            case "sunburst":
              t = "g.slice";
              break;
            case "treemap":
            case "icicle":
              t = "g.slice, g.pathbar";
              break;
            default:
              t = "g.points > g.point";
          }
          e.selectAll(t).each(function(u) {
            var o = u.transform;
            if (o) {
              o.scale = d && o.hide ? 0 : s / o.fontSize;
              var h = m.select(this).select("text");
              g.setTransormAndDisplay(h, o);
            }
          });
        }
      } };
    }, { "../../lib": 515, "@plotly/d3": 58 }], 674: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../lib/extend").extendFlat, k = v("../scatterpolar/attributes"), x = v("../bar/attributes");
      Q.exports = { r: k.r, theta: k.theta, r0: k.r0, dr: k.dr, theta0: k.theta0, dtheta: k.dtheta, thetaunit: k.thetaunit, base: g({}, x.base, {}), offset: g({}, x.offset, {}), width: g({}, x.width, {}), text: g({}, x.text, {}), hovertext: g({}, x.hovertext, {}), marker: x.marker, hoverinfo: k.hoverinfo, hovertemplate: m(), selected: x.selected, unselected: x.unselected };
    }, { "../../lib/extend": 505, "../../plots/template_attributes": 642, "../bar/attributes": 657, "../scatterpolar/attributes": 1011 }], 675: [function(v, Q, $) {
      var m = v("../../components/colorscale/helpers").hasColorscale, g = v("../../components/colorscale/calc"), k = v("../bar/arrays_to_calcdata"), x = v("../bar/cross_trace_calc").setGroupPositions, e = v("../scatter/calc_selection"), r = v("../../registry").traceIs, n = v("../../lib").extendFlat;
      Q.exports = { calc: function(s, t) {
        for (var d = s._fullLayout, u = t.subplot, o = d[u].radialaxis, h = d[u].angularaxis, l = o.makeCalcdata(t, "r"), i = h.makeCalcdata(t, "theta"), p = t._length, c = new Array(p), a = l, y = i, f = 0; f < p; f++)
          c[f] = { p: y[f], s: a[f] };
        function _(b) {
          var w = t[b];
          w !== void 0 && (t["_" + b] = Array.isArray(w) ? h.makeCalcdata(t, b) : h.d2c(w, t.thetaunit));
        }
        return h.type === "linear" && (_("width"), _("offset")), m(t, "marker") && g(s, t, { vals: t.marker.color, containerStr: "marker", cLetter: "c" }), m(t, "marker.line") && g(s, t, { vals: t.marker.line.color, containerStr: "marker.line", cLetter: "c" }), k(c, t), e(c, t), c;
      }, crossTraceCalc: function(s, t, d) {
        for (var u = s.calcdata, o = [], h = 0; h < u.length; h++) {
          var l = u[h], i = l[0].trace;
          i.visible === !0 && r(i, "bar") && i.subplot === d && o.push(l);
        }
        var p = n({}, t.radialaxis, { _id: "x" }), c = t.angularaxis;
        x(s, c, p, o, { mode: t.barmode, norm: t.barnorm, gap: t.bargap, groupgap: t.bargroupgap });
      } };
    }, { "../../components/colorscale/calc": 375, "../../components/colorscale/helpers": 378, "../../lib": 515, "../../registry": 647, "../bar/arrays_to_calcdata": 656, "../bar/cross_trace_calc": 660, "../scatter/calc_selection": 938 }], 676: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatterpolar/defaults").handleRThetaDefaults, k = v("../bar/style_defaults"), x = v("./attributes");
      Q.exports = function(e, r, n, s) {
        function t(d, u) {
          return m.coerce(e, r, x, d, u);
        }
        g(e, r, s, t) ? (t("thetaunit"), t("base"), t("offset"), t("width"), t("text"), t("hovertext"), t("hovertemplate"), k(e, r, t, n, s), m.coerceSelectionMarkerOpacity(r, t)) : r.visible = !1;
      };
    }, { "../../lib": 515, "../bar/style_defaults": 672, "../scatterpolar/defaults": 1013, "./attributes": 674 }], 677: [function(v, Q, $) {
      var m = v("../../components/fx"), g = v("../../lib"), k = v("../bar/hover").getTraceColor, x = g.fillText, e = v("../scatterpolar/hover").makeHoverPointText, r = v("../../plots/polar/helpers").isPtInsidePolygon;
      Q.exports = function(n, s, t) {
        var d = n.cd, u = d[0].trace, o = n.subplot, h = o.radialAxis, l = o.angularAxis, i = o.vangles, p = i ? r : g.isPtInsideSector, c = n.maxHoverDistance, a = l._period || 2 * Math.PI, y = Math.abs(h.g2p(Math.sqrt(s * s + t * t))), f = Math.atan2(t, s);
        if (h.range[0] > h.range[1] && (f += Math.PI), m.getClosest(d, function(w) {
          return p(y, f, [w.rp0, w.rp1], [w.thetag0, w.thetag1], i) ? c + Math.min(1, Math.abs(w.thetag1 - w.thetag0) / a) - 1 + (w.rp1 - y) / (w.rp1 - w.rp0) - 1 : 1 / 0;
        }, n), n.index !== !1) {
          var _ = d[n.index];
          n.x0 = n.x1 = _.ct[0], n.y0 = n.y1 = _.ct[1];
          var b = g.extendFlat({}, _, { r: _.s, theta: _.p });
          return x(_, u, n), e(b, u, o, n), n.hovertemplate = u.hovertemplate, n.color = k(u, _), n.xLabelVal = n.yLabelVal = void 0, _.s < 0 && (n.idealAlign = "left"), [n];
        }
      };
    }, { "../../components/fx": 407, "../../lib": 515, "../../plots/polar/helpers": 630, "../bar/hover": 664, "../scatterpolar/hover": 1015 }], 678: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "barpolar", basePlotModule: v("../../plots/polar"), categories: ["polar", "bar", "showLegend"], attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults"), supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc").calc, crossTraceCalc: v("./calc").crossTraceCalc, plot: v("./plot"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("../scatterpolar/format_labels"), style: v("../bar/style").style, styleOnSelect: v("../bar/style").styleOnSelect, hoverPoints: v("./hover"), selectPoints: v("../bar/select"), meta: {} };
    }, { "../../plots/polar": 631, "../bar/select": 669, "../bar/style": 671, "../scatter/marker_colorbar": 954, "../scatterpolar/format_labels": 1014, "./attributes": 674, "./calc": 675, "./defaults": 676, "./hover": 677, "./layout_attributes": 679, "./layout_defaults": 680, "./plot": 681 }], 679: [function(v, Q, $) {
      Q.exports = { barmode: { valType: "enumerated", values: ["stack", "overlay"], dflt: "stack", editType: "calc" }, bargap: { valType: "number", dflt: 0.1, min: 0, max: 1, editType: "calc" } };
    }, {}], 680: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x, e) {
        var r, n = {};
        function s(u, o) {
          return m.coerce(k[r] || {}, x[r], g, u, o);
        }
        for (var t = 0; t < e.length; t++) {
          var d = e[t];
          d.type === "barpolar" && d.visible === !0 && (n[r = d.subplot] || (s("barmode"), s("bargap"), n[r] = 1));
        }
      };
    }, { "../../lib": 515, "./layout_attributes": 679 }], 681: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("fast-isnumeric"), k = v("../../lib"), x = v("../../components/drawing"), e = v("../../plots/polar/helpers");
      Q.exports = function(r, n, s) {
        var t = n.xaxis, d = n.yaxis, u = n.radialAxis, o = n.angularAxis, h = function(i) {
          var p = i.cxx, c = i.cyy;
          return i.vangles ? function(a, y, f, _) {
            var b, w;
            k.angleDelta(f, _) > 0 ? (b = f, w = _) : (b = _, w = f);
            var T = [e.findEnclosingVertexAngles(b, i.vangles)[0], (b + w) / 2, e.findEnclosingVertexAngles(w, i.vangles)[1]];
            return e.pathPolygonAnnulus(a, y, b, w, T, p, c);
          } : function(a, y, f, _) {
            return k.pathAnnulus(a, y, f, _, p, c);
          };
        }(n), l = n.layers.frontplot.select("g.barlayer");
        k.makeTraceGroups(l, s, "trace bars").each(function() {
          var i = m.select(this), p = k.ensureSingle(i, "g", "points").selectAll("g.point").data(k.identity);
          p.enter().append("g").style("vector-effect", "non-scaling-stroke").style("stroke-miterlimit", 2).classed("point", !0), p.exit().remove(), p.each(function(c) {
            var a, y = m.select(this), f = c.rp0 = u.c2p(c.s0), _ = c.rp1 = u.c2p(c.s1), b = c.thetag0 = o.c2g(c.p0), w = c.thetag1 = o.c2g(c.p1);
            if (g(f) && g(_) && g(b) && g(w) && f !== _ && b !== w) {
              var T = u.c2g(c.s1), L = (b + w) / 2;
              c.ct = [t.c2p(T * Math.cos(L)), d.c2p(T * Math.sin(L))], a = h(f, _, b, w);
            } else
              a = "M0,0Z";
            k.ensureSingle(y, "path").attr("d", a);
          }), x.setClipUrl(i, n._hasClipOnAxisFalse ? n.clipIds.forTraces : null, r);
        });
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../plots/polar/helpers": 630, "@plotly/d3": 58, "fast-isnumeric": 190 }], 682: [function(v, Q, $) {
      var m = v("../scatter/attributes"), g = v("../bar/attributes"), k = v("../../components/color/attributes"), x = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, e = v("../../plots/template_attributes").hovertemplateAttrs, r = v("../../lib/extend").extendFlat, n = m.marker, s = n.line;
      Q.exports = { y: { valType: "data_array", editType: "calc+clearAxisTypes" }, x: { valType: "data_array", editType: "calc+clearAxisTypes" }, x0: { valType: "any", editType: "calc+clearAxisTypes" }, y0: { valType: "any", editType: "calc+clearAxisTypes" }, dx: { valType: "number", editType: "calc" }, dy: { valType: "number", editType: "calc" }, xperiod: m.xperiod, yperiod: m.yperiod, xperiod0: m.xperiod0, yperiod0: m.yperiod0, xperiodalignment: m.xperiodalignment, yperiodalignment: m.yperiodalignment, xhoverformat: x("x"), yhoverformat: x("y"), name: { valType: "string", editType: "calc+clearAxisTypes" }, q1: { valType: "data_array", editType: "calc+clearAxisTypes" }, median: { valType: "data_array", editType: "calc+clearAxisTypes" }, q3: { valType: "data_array", editType: "calc+clearAxisTypes" }, lowerfence: { valType: "data_array", editType: "calc" }, upperfence: { valType: "data_array", editType: "calc" }, notched: { valType: "boolean", editType: "calc" }, notchwidth: { valType: "number", min: 0, max: 0.5, dflt: 0.25, editType: "calc" }, notchspan: { valType: "data_array", editType: "calc" }, boxpoints: { valType: "enumerated", values: ["all", "outliers", "suspectedoutliers", !1], editType: "calc" }, jitter: { valType: "number", min: 0, max: 1, editType: "calc" }, pointpos: { valType: "number", min: -2, max: 2, editType: "calc" }, boxmean: { valType: "enumerated", values: [!0, "sd", !1], editType: "calc" }, mean: { valType: "data_array", editType: "calc" }, sd: { valType: "data_array", editType: "calc" }, orientation: { valType: "enumerated", values: ["v", "h"], editType: "calc+clearAxisTypes" }, quartilemethod: { valType: "enumerated", values: ["linear", "exclusive", "inclusive"], dflt: "linear", editType: "calc" }, width: { valType: "number", min: 0, dflt: 0, editType: "calc" }, marker: { outliercolor: { valType: "color", dflt: "rgba(0, 0, 0, 0)", editType: "style" }, symbol: r({}, n.symbol, { arrayOk: !1, editType: "plot" }), opacity: r({}, n.opacity, { arrayOk: !1, dflt: 1, editType: "style" }), angle: r({}, n.angle, { arrayOk: !1, editType: "calc" }), size: r({}, n.size, { arrayOk: !1, editType: "calc" }), color: r({}, n.color, { arrayOk: !1, editType: "style" }), line: { color: r({}, s.color, { arrayOk: !1, dflt: k.defaultLine, editType: "style" }), width: r({}, s.width, { arrayOk: !1, dflt: 0, editType: "style" }), outliercolor: { valType: "color", editType: "style" }, outlierwidth: { valType: "number", min: 0, dflt: 1, editType: "style" }, editType: "style" }, editType: "plot" }, line: { color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, dflt: 2, editType: "style" }, editType: "plot" }, fillcolor: m.fillcolor, whiskerwidth: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "calc" }, offsetgroup: g.offsetgroup, alignmentgroup: g.alignmentgroup, selected: { marker: m.selected.marker, editType: "style" }, unselected: { marker: m.unselected.marker, editType: "style" }, text: r({}, m.text, {}), hovertext: r({}, m.hovertext, {}), hovertemplate: e({}), hoveron: { valType: "flaglist", flags: ["boxes", "points"], dflt: "boxes+points", editType: "style" } };
    }, { "../../components/color/attributes": 366, "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../bar/attributes": 657, "../scatter/attributes": 936 }], 683: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../plots/cartesian/axes"), k = v("../../plots/cartesian/align_period"), x = v("../../lib"), e = v("../../constants/numerical").BADNUM, r = x._;
      Q.exports = function(p, c) {
        var a, y, f, _, b, w, T, L = p._fullLayout, A = g.getFromId(p, c.xaxis || "x"), I = g.getFromId(p, c.yaxis || "y"), P = [], S = c.type === "violin" ? "_numViolins" : "_numBoxes";
        c.orientation === "h" ? (f = A, _ = "x", b = I, w = "y", T = !!c.yperiodalignment) : (f = I, _ = "y", b = A, w = "x", T = !!c.xperiodalignment);
        var E, R, z, j, H, Y, J = function(De, Ge, Qe, ot) {
          var vt, bt = Ge + "0" in De, yt = "d" + Ge in De;
          if (Ge in De || bt && yt) {
            var tt = Qe.makeCalcdata(De, Ge);
            return [k(De, Qe, Ge, tt).vals, tt];
          }
          vt = bt ? De[Ge + "0"] : "name" in De && (Qe.type === "category" || m(De.name) && ["linear", "log"].indexOf(Qe.type) !== -1 || x.isDateTime(De.name) && Qe.type === "date") ? De.name : ot;
          for (var Ke = Qe.type === "multicategory" ? Qe.r2c_just_indices(vt) : Qe.d2c(vt, 0, De[Ge + "calendar"]), mt = De._length, Ft = new Array(mt), Vt = 0; Vt < mt; Vt++)
            Ft[Vt] = Ke;
          return [Ft];
        }(c, w, b, L[S]), W = J[0], Z = J[1], re = x.distinctVals(W, b), V = re.vals, B = re.minDiff / 2, U = (c.boxpoints || c.points) === "all" ? x.identity : function(De) {
          return De.v < E.lf || De.v > E.uf;
        };
        if (c._hasPreCompStats) {
          var ee = c[_], N = function(De) {
            return f.d2c((c[De] || [])[a]);
          }, K = 1 / 0, X = -1 / 0;
          for (a = 0; a < c._length; a++) {
            var te = W[a];
            if (m(te)) {
              if ((E = {}).pos = E[w] = te, T && Z && (E.orig_p = Z[a]), E.q1 = N("q1"), E.med = N("median"), E.q3 = N("q3"), R = [], ee && x.isArrayOrTypedArray(ee[a]))
                for (y = 0; y < ee[a].length; y++)
                  (Y = f.d2c(ee[a][y])) !== e && (s(H = { v: Y, i: [a, y] }, c, [a, y]), R.push(H));
              if (E.pts = R.sort(t), j = (z = E[_] = R.map(d)).length, E.med !== e && E.q1 !== e && E.q3 !== e && E.med >= E.q1 && E.q3 >= E.med) {
                var ie = N("lowerfence");
                E.lf = ie !== e && ie <= E.q1 ? ie : u(E, z, j);
                var le = N("upperfence");
                E.uf = le !== e && le >= E.q3 ? le : o(E, z, j);
                var oe = N("mean");
                E.mean = oe !== e ? oe : j ? x.mean(z, j) : (E.q1 + E.q3) / 2;
                var ve = N("sd");
                E.sd = oe !== e && ve >= 0 ? ve : j ? x.stdev(z, j, E.mean) : E.q3 - E.q1, E.lo = h(E), E.uo = l(E);
                var ue = N("notchspan");
                ue = ue !== e && ue > 0 ? ue : i(E, j), E.ln = E.med - ue, E.un = E.med + ue;
                var ye = E.lf, Ae = E.uf;
                c.boxpoints && z.length && (ye = Math.min(ye, z[0]), Ae = Math.max(Ae, z[j - 1])), c.notched && (ye = Math.min(ye, E.ln), Ae = Math.max(Ae, E.un)), E.min = ye, E.max = Ae;
              } else {
                var pe;
                x.warn(["Invalid input - make sure that q1 <= median <= q3", "q1 = " + E.q1, "median = " + E.med, "q3 = " + E.q3].join(`
`)), pe = E.med !== e ? E.med : E.q1 !== e ? E.q3 !== e ? (E.q1 + E.q3) / 2 : E.q1 : E.q3 !== e ? E.q3 : 0, E.med = pe, E.q1 = E.q3 = pe, E.lf = E.uf = pe, E.mean = E.sd = pe, E.ln = E.un = pe, E.min = E.max = pe;
              }
              K = Math.min(K, E.min), X = Math.max(X, E.max), E.pts2 = R.filter(U), P.push(E);
            }
          }
          c._extremes[f._id] = g.findExtremes(f, [K, X], { padded: !0 });
        } else {
          var ge = f.makeCalcdata(c, _), we = function(De, Ge) {
            for (var Qe = De.length, ot = new Array(Qe + 1), vt = 0; vt < Qe; vt++)
              ot[vt] = De[vt] - Ge;
            return ot[Qe] = De[Qe - 1] + Ge, ot;
          }(V, B), se = V.length, de = function(De) {
            for (var Ge = new Array(De), Qe = 0; Qe < De; Qe++)
              Ge[Qe] = [];
            return Ge;
          }(se);
          for (a = 0; a < c._length; a++)
            if (Y = ge[a], m(Y)) {
              var Te = x.findBin(W[a], we);
              Te >= 0 && Te < se && (s(H = { v: Y, i: a }, c, a), de[Te].push(H));
            }
          var Ee = 1 / 0, Me = -1 / 0, ze = c.quartilemethod, Ie = ze === "exclusive", Oe = ze === "inclusive";
          for (a = 0; a < se; a++)
            if (de[a].length > 0) {
              var Ze, Fe;
              (E = {}).pos = E[w] = V[a], R = E.pts = de[a].sort(t), j = (z = E[_] = R.map(d)).length, E.min = z[0], E.max = z[j - 1], E.mean = x.mean(z, j), E.sd = x.stdev(z, j, E.mean), E.med = x.interp(z, 0.5), j % 2 && (Ie || Oe) ? (Ie ? (Ze = z.slice(0, j / 2), Fe = z.slice(j / 2 + 1)) : Oe && (Ze = z.slice(0, j / 2 + 1), Fe = z.slice(j / 2)), E.q1 = x.interp(Ze, 0.5), E.q3 = x.interp(Fe, 0.5)) : (E.q1 = x.interp(z, 0.25), E.q3 = x.interp(z, 0.75)), E.lf = u(E, z, j), E.uf = o(E, z, j), E.lo = h(E), E.uo = l(E);
              var Pe = i(E, j);
              E.ln = E.med - Pe, E.un = E.med + Pe, Ee = Math.min(Ee, E.ln), Me = Math.max(Me, E.un), E.pts2 = R.filter(U), P.push(E);
            }
          c._extremes[f._id] = g.findExtremes(f, c.notched ? ge.concat([Ee, Me]) : ge, { padded: !0 });
        }
        return function(De, Ge) {
          if (x.isArrayOrTypedArray(Ge.selectedpoints))
            for (var Qe = 0; Qe < De.length; Qe++) {
              for (var ot = De[Qe].pts || [], vt = {}, bt = 0; bt < ot.length; bt++)
                vt[ot[bt].i] = bt;
              x.tagSelected(ot, Ge, vt);
            }
        }(P, c), P.length > 0 ? (P[0].t = { num: L[S], dPos: B, posLetter: w, valLetter: _, labels: { med: r(p, "median:"), min: r(p, "min:"), q1: r(p, "q1:"), q3: r(p, "q3:"), max: r(p, "max:"), mean: c.boxmean === "sd" ? r(p, "mean \xB1 \u03C3:") : r(p, "mean:"), lf: r(p, "lower fence:"), uf: r(p, "upper fence:") } }, L[S]++, P) : [{ t: { empty: !0 } }];
      };
      var n = { text: "tx", hovertext: "htx" };
      function s(p, c, a) {
        for (var y in n)
          x.isArrayOrTypedArray(c[y]) && (Array.isArray(a) ? x.isArrayOrTypedArray(c[y][a[0]]) && (p[n[y]] = c[y][a[0]][a[1]]) : p[n[y]] = c[y][a]);
      }
      function t(p, c) {
        return p.v - c.v;
      }
      function d(p) {
        return p.v;
      }
      function u(p, c, a) {
        return a === 0 ? p.q1 : Math.min(p.q1, c[Math.min(x.findBin(2.5 * p.q1 - 1.5 * p.q3, c, !0) + 1, a - 1)]);
      }
      function o(p, c, a) {
        return a === 0 ? p.q3 : Math.max(p.q3, c[Math.max(x.findBin(2.5 * p.q3 - 1.5 * p.q1, c), 0)]);
      }
      function h(p) {
        return 4 * p.q1 - 3 * p.q3;
      }
      function l(p) {
        return 4 * p.q3 - 3 * p.q1;
      }
      function i(p, c) {
        return c === 0 ? 0 : 1.57 * (p.q3 - p.q1) / Math.sqrt(c);
      }
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "fast-isnumeric": 190 }], 684: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib"), k = v("../../plots/cartesian/constraints").getAxisGroup, x = ["v", "h"];
      function e(r, n, s, t) {
        var d, u, o, h = n.calcdata, l = n._fullLayout, i = t._id, p = i.charAt(0), c = [], a = 0;
        for (d = 0; d < s.length; d++)
          for (o = h[s[d]], u = 0; u < o.length; u++)
            c.push(t.c2l(o[u].pos, !0)), a += (o[u].pts2 || []).length;
        if (c.length) {
          var y = g.distinctVals(c);
          t.type !== "category" && t.type !== "multicategory" || (y.minDiff = 1);
          var f = y.minDiff / 2;
          m.minDtick(t, y.minDiff, y.vals[0], !0);
          var _ = l[r === "violin" ? "_numViolins" : "_numBoxes"], b = l[r + "mode"] === "group" && _ > 1, w = 1 - l[r + "gap"], T = 1 - l[r + "groupgap"];
          for (d = 0; d < s.length; d++) {
            var L, A, I, P, S, E, R = (o = h[s[d]])[0].trace, z = o[0].t, j = R.width, H = R.side;
            if (j)
              L = A = P = j / 2, I = 0;
            else if (L = f, b) {
              var Y = k(l, t._id) + R.orientation, J = (l._alignmentOpts[Y] || {})[R.alignmentgroup] || {}, W = Object.keys(J.offsetGroups || {}).length, Z = W || _;
              A = L * w * T / Z, I = 2 * L * (((W ? R._offsetIndex : z.num) + 0.5) / Z - 0.5) * w, P = L * w / Z;
            } else
              A = L * w * T, I = 0, P = L;
            z.dPos = L, z.bPos = I, z.bdPos = A, z.wHover = P;
            var re, V, B, U, ee, N, K = I + A, X = Boolean(j);
            if (H === "positive" ? (S = L * (j ? 1 : 0.5), re = K, E = re = I) : H === "negative" ? (S = re = I, E = L * (j ? 1 : 0.5), V = K) : (S = E = L, re = V = K), (R.boxpoints || R.points) && a > 0) {
              var te = R.pointpos, ie = R.jitter, le = R.marker.size / 2, oe = 0;
              te + ie >= 0 && ((oe = K * (te + ie)) > S ? (X = !0, ee = le, B = oe) : oe > re && (ee = le, B = S)), oe <= S && (B = S);
              var ve = 0;
              te - ie <= 0 && ((ve = -K * (te - ie)) > E ? (X = !0, N = le, U = ve) : ve > V && (N = le, U = E)), ve <= E && (U = E);
            } else
              B = S, U = E;
            var ue = new Array(o.length);
            for (u = 0; u < o.length; u++)
              ue[u] = o[u].pos;
            R._extremes[i] = m.findExtremes(t, ue, { padded: X, vpadminus: U, vpadplus: B, vpadLinearized: !0, ppadminus: { x: N, y: ee }[p], ppadplus: { x: ee, y: N }[p] });
          }
        }
      }
      Q.exports = { crossTraceCalc: function(r, n) {
        for (var s = r.calcdata, t = n.xaxis, d = n.yaxis, u = 0; u < x.length; u++) {
          for (var o = x[u], h = o === "h" ? d : t, l = [], i = 0; i < s.length; i++) {
            var p = s[i], c = p[0].t, a = p[0].trace;
            a.visible !== !0 || a.type !== "box" && a.type !== "candlestick" || c.empty || (a.orientation || "v") !== o || a.xaxis !== t._id || a.yaxis !== d._id || l.push(i);
          }
          e("box", r, l, h);
        }
      }, setPositionOffset: e };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "../../plots/cartesian/constraints": 574 }], 685: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry"), k = v("../../components/color"), x = v("../scatter/period_defaults"), e = v("../bar/defaults").handleGroupingDefaults, r = v("../../plots/cartesian/axis_autotype"), n = v("./attributes");
      function s(d, u, o, h) {
        function l(H) {
          var Y = 0;
          return H && H.length && (Y += 1, m.isArrayOrTypedArray(H[0]) && H[0].length && (Y += 1)), Y;
        }
        function i(H) {
          return m.validate(d[H], n[H]);
        }
        var p, c = o("y"), a = o("x");
        if (u.type === "box") {
          var y = o("q1"), f = o("median"), _ = o("q3");
          u._hasPreCompStats = y && y.length && f && f.length && _ && _.length, p = Math.min(m.minRowLength(y), m.minRowLength(f), m.minRowLength(_));
        }
        var b, w, T = l(c), L = l(a), A = T && m.minRowLength(c), I = L && m.minRowLength(a), P = h.calendar, S = { autotypenumbers: h.autotypenumbers };
        if (u._hasPreCompStats)
          switch (String(L) + String(T)) {
            case "00":
              var E = i("x0") || i("dx");
              b = (i("y0") || i("dy")) && !E ? "h" : "v", w = p;
              break;
            case "10":
              b = "v", w = Math.min(p, I);
              break;
            case "20":
              b = "h", w = Math.min(p, a.length);
              break;
            case "01":
              b = "h", w = Math.min(p, A);
              break;
            case "02":
              b = "v", w = Math.min(p, c.length);
              break;
            case "12":
              b = "v", w = Math.min(p, I, c.length);
              break;
            case "21":
              b = "h", w = Math.min(p, a.length, A);
              break;
            case "11":
              w = 0;
              break;
            case "22":
              var R, z = !1;
              for (R = 0; R < a.length; R++)
                if (r(a[R], P, S) === "category") {
                  z = !0;
                  break;
                }
              if (z)
                b = "v", w = Math.min(p, I, c.length);
              else {
                for (R = 0; R < c.length; R++)
                  if (r(c[R], P, S) === "category") {
                    z = !0;
                    break;
                  }
                z ? (b = "h", w = Math.min(p, a.length, A)) : (b = "v", w = Math.min(p, I, c.length));
              }
          }
        else
          T > 0 ? (b = "v", w = L > 0 ? Math.min(I, A) : Math.min(A)) : L > 0 ? (b = "h", w = Math.min(I)) : w = 0;
        if (w) {
          u._length = w;
          var j = o("orientation", b);
          u._hasPreCompStats ? j === "v" && L === 0 ? (o("x0", 0), o("dx", 1)) : j === "h" && T === 0 && (o("y0", 0), o("dy", 1)) : j === "v" && L === 0 ? o("x0") : j === "h" && T === 0 && o("y0"), g.getComponentMethod("calendars", "handleTraceDefaults")(d, u, ["x", "y"], h);
        } else
          u.visible = !1;
      }
      function t(d, u, o, h) {
        var l = h.prefix, i = m.coerce2(d, u, n, "marker.outliercolor"), p = o("marker.line.outliercolor"), c = "outliers";
        u._hasPreCompStats ? c = "all" : (i || p) && (c = "suspectedoutliers");
        var a = o(l + "points", c);
        a ? (o("jitter", a === "all" ? 0.3 : 0), o("pointpos", a === "all" ? -1.5 : 0), o("marker.symbol"), o("marker.opacity"), o("marker.size"), o("marker.angle"), o("marker.color", u.line.color), o("marker.line.color"), o("marker.line.width"), a === "suspectedoutliers" && (o("marker.line.outliercolor", u.marker.color), o("marker.line.outlierwidth")), o("selected.marker.color"), o("unselected.marker.color"), o("selected.marker.size"), o("unselected.marker.size"), o("text"), o("hovertext")) : delete u.marker;
        var y = o("hoveron");
        y !== "all" && y.indexOf("points") === -1 || o("hovertemplate"), m.coerceSelectionMarkerOpacity(u, o);
      }
      Q.exports = { supplyDefaults: function(d, u, o, h) {
        function l(_, b) {
          return m.coerce(d, u, n, _, b);
        }
        if (s(d, u, l, h), u.visible !== !1) {
          x(d, u, h, l), l("xhoverformat"), l("yhoverformat");
          var i = u._hasPreCompStats;
          i && (l("lowerfence"), l("upperfence")), l("line.color", (d.marker || {}).color || o), l("line.width"), l("fillcolor", k.addOpacity(u.line.color, 0.5));
          var p = !1;
          if (i) {
            var c = l("mean"), a = l("sd");
            c && c.length && (p = !0, a && a.length && (p = "sd"));
          }
          l("boxmean", p), l("whiskerwidth"), l("width"), l("quartilemethod");
          var y = !1;
          if (i) {
            var f = l("notchspan");
            f && f.length && (y = !0);
          } else
            m.validate(d.notchwidth, n.notchwidth) && (y = !0);
          l("notched", y) && l("notchwidth"), t(d, u, l, { prefix: "box" });
        }
      }, crossTraceDefaults: function(d, u) {
        var o, h;
        function l(c) {
          return m.coerce(h._input, h, n, c);
        }
        for (var i = 0; i < d.length; i++) {
          var p = (h = d[i]).type;
          p !== "box" && p !== "violin" || (o = h._input, u[p + "mode"] === "group" && e(o, h, u, l));
        }
      }, handleSampleDefaults: s, handlePointsDefaults: t };
    }, { "../../components/color": 367, "../../lib": 515, "../../plots/cartesian/axis_autotype": 567, "../../registry": 647, "../bar/defaults": 661, "../scatter/period_defaults": 956, "./attributes": 682 }], 686: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return g.hoverOnBox && (m.hoverOnBox = g.hoverOnBox), "xVal" in g && (m.x = g.xVal), "yVal" in g && (m.y = g.yVal), g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), m;
      };
    }, {}], 687: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib"), k = v("../../components/fx"), x = v("../../components/color"), e = g.fillText;
      function r(s, t, d, u) {
        var o, h, l, i, p, c, a, y, f, _, b, w, T, L, A = s.cd, I = s.xa, P = s.ya, S = A[0].trace, E = A[0].t, R = S.type === "violin", z = E.bdPos, j = E.wHover, H = function(pe) {
          return l.c2l(pe.pos) + E.bPos - l.c2l(c);
        };
        R && S.side !== "both" ? (S.side === "positive" && (f = function(pe) {
          var ge = H(pe);
          return k.inbox(ge, ge + j, _);
        }, w = z, T = 0), S.side === "negative" && (f = function(pe) {
          var ge = H(pe);
          return k.inbox(ge - j, ge, _);
        }, w = 0, T = z)) : (f = function(pe) {
          var ge = H(pe);
          return k.inbox(ge - j, ge + j, _);
        }, w = T = z), L = R ? function(pe) {
          return k.inbox(pe.span[0] - p, pe.span[1] - p, _);
        } : function(pe) {
          return k.inbox(pe.min - p, pe.max - p, _);
        }, S.orientation === "h" ? (p = t, c = d, a = L, y = f, o = "y", l = P, h = "x", i = I) : (p = d, c = t, a = f, y = L, o = "x", l = I, h = "y", i = P);
        var Y = Math.min(1, z / Math.abs(l.r2c(l.range[1]) - l.r2c(l.range[0])));
        function J(pe) {
          return (a(pe) + y(pe)) / 2;
        }
        _ = s.maxHoverDistance - Y, b = s.maxSpikeDistance - Y;
        var W = k.getDistanceFunction(u, a, y, J);
        if (k.getClosest(A, W, s), s.index === !1)
          return [];
        var Z = A[s.index], re = S.line.color, V = (S.marker || {}).color;
        x.opacity(re) && S.line.width ? s.color = re : x.opacity(V) && S.boxpoints ? s.color = V : s.color = S.fillcolor, s[o + "0"] = l.c2p(Z.pos + E.bPos - T, !0), s[o + "1"] = l.c2p(Z.pos + E.bPos + w, !0), s[o + "LabelVal"] = Z.orig_p !== void 0 ? Z.orig_p : Z.pos;
        var B = o + "Spike";
        s.spikeDistance = J(Z) * b / _, s[B] = l.c2p(Z.pos, !0);
        var U = S.boxmean || (S.meanline || {}).visible, ee = S.boxpoints || S.points, N = ee && U ? ["max", "uf", "q3", "med", "mean", "q1", "lf", "min"] : ee && !U ? ["max", "uf", "q3", "med", "q1", "lf", "min"] : !ee && U ? ["max", "q3", "med", "mean", "q1", "min"] : ["max", "q3", "med", "q1", "min"], K = i.range[1] < i.range[0];
        S.orientation === (K ? "v" : "h") && N.reverse();
        for (var X = s.spikeDistance, te = s[B], ie = [], le = 0; le < N.length; le++) {
          var oe = N[le];
          if (oe in Z) {
            var ve = Z[oe], ue = i.c2p(ve, !0), ye = g.extendFlat({}, s);
            ye.attr = oe, ye[h + "0"] = ye[h + "1"] = ue, ye[h + "LabelVal"] = ve, ye[h + "Label"] = (E.labels ? E.labels[oe] + " " : "") + m.hoverLabelText(i, ve, S[h + "hoverformat"]), ye.hoverOnBox = !0, oe === "mean" && "sd" in Z && S.boxmean === "sd" && (ye[h + "err"] = Z.sd), ye.hovertemplate = !1, ie.push(ye);
          }
        }
        s.name = "", s.spikeDistance = void 0, s[B] = void 0;
        for (var Ae = 0; Ae < ie.length; Ae++)
          ie[Ae].attr !== "med" ? (ie[Ae].name = "", ie[Ae].spikeDistance = void 0, ie[Ae][B] = void 0) : (ie[Ae].spikeDistance = X, ie[Ae][B] = te);
        return ie;
      }
      function n(s, t, d) {
        for (var u, o, h, l = s.cd, i = s.xa, p = s.ya, c = l[0].trace, a = i.c2p(t), y = p.c2p(d), f = k.quadrature(function(R) {
          var z = Math.max(3, R.mrc || 0);
          return Math.max(Math.abs(i.c2p(R.x) - a) - z, 1 - 3 / z);
        }, function(R) {
          var z = Math.max(3, R.mrc || 0);
          return Math.max(Math.abs(p.c2p(R.y) - y) - z, 1 - 3 / z);
        }), _ = !1, b = 0; b < l.length; b++) {
          o = l[b];
          for (var w = 0; w < (o.pts || []).length; w++) {
            var T = f(h = o.pts[w]);
            T <= s.distance && (s.distance = T, _ = [b, w]);
          }
        }
        if (!_)
          return !1;
        h = (o = l[_[0]]).pts[_[1]];
        var L = i.c2p(h.x, !0), A = p.c2p(h.y, !0), I = h.mrc || 1;
        u = g.extendFlat({}, s, { index: h.i, color: (c.marker || {}).color, name: c.name, x0: L - I, x1: L + I, y0: A - I, y1: A + I, spikeDistance: s.distance, hovertemplate: c.hovertemplate });
        var P, S = o.orig_p, E = S !== void 0 ? S : o.pos;
        return c.orientation === "h" ? (P = p, u.xLabelVal = h.x, u.yLabelVal = E) : (P = i, u.xLabelVal = E, u.yLabelVal = h.y), u[P._id.charAt(0) + "Spike"] = P.c2p(o.pos, !0), e(h, c, u), u;
      }
      Q.exports = { hoverPoints: function(s, t, d, u) {
        var o, h = s.cd[0].trace.hoveron, l = [];
        return h.indexOf("boxes") !== -1 && (l = l.concat(r(s, t, d, u))), h.indexOf("points") !== -1 && (o = n(s, t, d)), u === "closest" ? o ? [o] : l : (o && l.push(o), l);
      }, hoverOnBoxes: r, hoverOnPoints: n };
    }, { "../../components/color": 367, "../../components/fx": 407, "../../lib": 515, "../../plots/cartesian/axes": 566 }], 688: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults").supplyDefaults, crossTraceDefaults: v("./defaults").crossTraceDefaults, supplyLayoutDefaults: v("./layout_defaults").supplyLayoutDefaults, calc: v("./calc"), crossTraceCalc: v("./cross_trace_calc").crossTraceCalc, plot: v("./plot").plot, style: v("./style").style, styleOnSelect: v("./style").styleOnSelect, hoverPoints: v("./hover").hoverPoints, eventData: v("./event_data"), selectPoints: v("./select"), moduleType: "trace", name: "box", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "symbols", "oriented", "box-violin", "showLegend", "boxLayout", "zoomScale"], meta: {} };
    }, { "../../plots/cartesian": 578, "./attributes": 682, "./calc": 683, "./cross_trace_calc": 684, "./defaults": 685, "./event_data": 686, "./hover": 687, "./layout_attributes": 689, "./layout_defaults": 690, "./plot": 691, "./select": 692, "./style": 693 }], 689: [function(v, Q, $) {
      Q.exports = { boxmode: { valType: "enumerated", values: ["group", "overlay"], dflt: "overlay", editType: "calc" }, boxgap: { valType: "number", min: 0, max: 1, dflt: 0.3, editType: "calc" }, boxgroupgap: { valType: "number", min: 0, max: 1, dflt: 0.3, editType: "calc" } };
    }, {}], 690: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("./layout_attributes");
      function x(e, r, n, s, t) {
        for (var d = t + "Layout", u = !1, o = 0; o < n.length; o++) {
          var h = n[o];
          if (m.traceIs(h, d)) {
            u = !0;
            break;
          }
        }
        u && (s(t + "mode"), s(t + "gap"), s(t + "groupgap"));
      }
      Q.exports = { supplyLayoutDefaults: function(e, r, n) {
        x(0, 0, n, function(s, t) {
          return g.coerce(e, r, k, s, t);
        }, "box");
      }, _supply: x };
    }, { "../../lib": 515, "../../registry": 647, "./layout_attributes": 689 }], 691: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing");
      function x(n, s, t, d) {
        var u, o, h = t.orientation === "h", l = s.val, i = s.pos, p = !!i.rangebreaks, c = d.bPos, a = d.wdPos || 0, y = d.bPosPxOffset || 0, f = t.whiskerwidth || 0, _ = t.notched || !1, b = _ ? 1 - 2 * t.notchwidth : 1;
        Array.isArray(d.bdPos) ? (u = d.bdPos[0], o = d.bdPos[1]) : (u = d.bdPos, o = d.bdPos);
        var w = n.selectAll("path.box").data(t.type !== "violin" || t.box.visible ? g.identity : []);
        w.enter().append("path").style("vector-effect", "non-scaling-stroke").attr("class", "box"), w.exit().remove(), w.each(function(T) {
          if (T.empty)
            return "M0,0Z";
          var L = i.c2l(T.pos + c, !0), A = i.l2p(L - u) + y, I = i.l2p(L + o) + y, P = p ? (A + I) / 2 : i.l2p(L) + y, S = t.whiskerwidth, E = p ? A * S + (1 - S) * P : i.l2p(L - a) + y, R = p ? I * S + (1 - S) * P : i.l2p(L + a) + y, z = i.l2p(L - u * b) + y, j = i.l2p(L + o * b) + y, H = l.c2p(T.q1, !0), Y = l.c2p(T.q3, !0), J = g.constrain(l.c2p(T.med, !0), Math.min(H, Y) + 1, Math.max(H, Y) - 1), W = T.lf === void 0 || t.boxpoints === !1, Z = l.c2p(W ? T.min : T.lf, !0), re = l.c2p(W ? T.max : T.uf, !0), V = l.c2p(T.ln, !0), B = l.c2p(T.un, !0);
          h ? m.select(this).attr("d", "M" + J + "," + z + "V" + j + "M" + H + "," + A + "V" + I + (_ ? "H" + V + "L" + J + "," + j + "L" + B + "," + I : "") + "H" + Y + "V" + A + (_ ? "H" + B + "L" + J + "," + z + "L" + V + "," + A : "") + "ZM" + H + "," + P + "H" + Z + "M" + Y + "," + P + "H" + re + (f === 0 ? "" : "M" + Z + "," + E + "V" + R + "M" + re + "," + E + "V" + R)) : m.select(this).attr("d", "M" + z + "," + J + "H" + j + "M" + A + "," + H + "H" + I + (_ ? "V" + V + "L" + j + "," + J + "L" + I + "," + B : "") + "V" + Y + "H" + A + (_ ? "V" + B + "L" + z + "," + J + "L" + A + "," + V : "") + "ZM" + P + "," + H + "V" + Z + "M" + P + "," + Y + "V" + re + (f === 0 ? "" : "M" + E + "," + Z + "H" + R + "M" + E + "," + re + "H" + R));
        });
      }
      function e(n, s, t, d) {
        var u = s.x, o = s.y, h = d.bdPos, l = d.bPos, i = t.boxpoints || t.points;
        g.seedPseudoRandom();
        var p = n.selectAll("g.points").data(i ? function(a) {
          return a.forEach(function(y) {
            y.t = d, y.trace = t;
          }), a;
        } : []);
        p.enter().append("g").attr("class", "points"), p.exit().remove();
        var c = p.selectAll("path").data(function(a) {
          var y, f, _ = a.pts2, b = Math.max((a.max - a.min) / 10, a.q3 - a.q1), w = 1e-9 * b, T = 0.01 * b, L = [], A = 0;
          if (t.jitter) {
            if (b === 0)
              for (A = 1, L = new Array(_.length), y = 0; y < _.length; y++)
                L[y] = 1;
            else
              for (y = 0; y < _.length; y++) {
                var I = Math.max(0, y - 5), P = _[I].v, S = Math.min(_.length - 1, y + 5), E = _[S].v;
                i !== "all" && (_[y].v < a.lf ? E = Math.min(E, a.lf) : P = Math.max(P, a.uf));
                var R = Math.sqrt(T * (S - I) / (E - P + w)) || 0;
                R = g.constrain(Math.abs(R), 0, 1), L.push(R), A = Math.max(R, A);
              }
            f = 2 * t.jitter / (A || 1);
          }
          for (y = 0; y < _.length; y++) {
            var z = _[y], j = z.v, H = t.jitter ? f * L[y] * (g.pseudoRandom() - 0.5) : 0, Y = a.pos + l + h * (t.pointpos + H);
            t.orientation === "h" ? (z.y = Y, z.x = j) : (z.x = Y, z.y = j), i === "suspectedoutliers" && j < a.uo && j > a.lo && (z.so = !0);
          }
          return _;
        });
        c.enter().append("path").classed("point", !0), c.exit().remove(), c.call(k.translatePoints, u, o);
      }
      function r(n, s, t, d) {
        var u, o, h = s.val, l = s.pos, i = !!l.rangebreaks, p = d.bPos, c = d.bPosPxOffset || 0, a = t.boxmean || (t.meanline || {}).visible;
        Array.isArray(d.bdPos) ? (u = d.bdPos[0], o = d.bdPos[1]) : (u = d.bdPos, o = d.bdPos);
        var y = n.selectAll("path.mean").data(t.type === "box" && t.boxmean || t.type === "violin" && t.box.visible && t.meanline.visible ? g.identity : []);
        y.enter().append("path").attr("class", "mean").style({ fill: "none", "vector-effect": "non-scaling-stroke" }), y.exit().remove(), y.each(function(f) {
          var _ = l.c2l(f.pos + p, !0), b = l.l2p(_ - u) + c, w = l.l2p(_ + o) + c, T = i ? (b + w) / 2 : l.l2p(_) + c, L = h.c2p(f.mean, !0), A = h.c2p(f.mean - f.sd, !0), I = h.c2p(f.mean + f.sd, !0);
          t.orientation === "h" ? m.select(this).attr("d", "M" + L + "," + b + "V" + w + (a === "sd" ? "m0,0L" + A + "," + T + "L" + L + "," + b + "L" + I + "," + T + "Z" : "")) : m.select(this).attr("d", "M" + b + "," + L + "H" + w + (a === "sd" ? "m0,0L" + T + "," + A + "L" + b + "," + L + "L" + T + "," + I + "Z" : ""));
        });
      }
      Q.exports = { plot: function(n, s, t, d) {
        var u = s.xaxis, o = s.yaxis;
        g.makeTraceGroups(d, t, "trace boxes").each(function(h) {
          var l, i, p = m.select(this), c = h[0], a = c.t, y = c.trace;
          a.wdPos = a.bdPos * y.whiskerwidth, y.visible !== !0 || a.empty ? p.remove() : (y.orientation === "h" ? (l = o, i = u) : (l = u, i = o), x(p, { pos: l, val: i }, y, a), e(p, { x: u, y: o }, y, a), r(p, { pos: l, val: i }, y, a));
        });
      }, plotBoxAndWhiskers: x, plotPoints: e, plotBoxMean: r };
    }, { "../../components/drawing": 389, "../../lib": 515, "@plotly/d3": 58 }], 692: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k, x, e = m.cd, r = m.xaxis, n = m.yaxis, s = [];
        if (g === !1)
          for (k = 0; k < e.length; k++)
            for (x = 0; x < (e[k].pts || []).length; x++)
              e[k].pts[x].selected = 0;
        else
          for (k = 0; k < e.length; k++)
            for (x = 0; x < (e[k].pts || []).length; x++) {
              var t = e[k].pts[x], d = r.c2p(t.x), u = n.c2p(t.y);
              g.contains([d, u], null, t.i, m) ? (s.push({ pointNumber: t.i, x: r.c2d(t.x), y: n.c2d(t.y) }), t.selected = 1) : t.selected = 0;
            }
        return s;
      };
    }, {}], 693: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../../components/drawing");
      Q.exports = { style: function(x, e, r) {
        var n = r || m.select(x).selectAll("g.trace.boxes");
        n.style("opacity", function(s) {
          return s[0].trace.opacity;
        }), n.each(function(s) {
          var t = m.select(this), d = s[0].trace, u = d.line.width;
          function o(i, p, c, a) {
            i.style("stroke-width", p + "px").call(g.stroke, c).call(g.fill, a);
          }
          var h = t.selectAll("path.box");
          if (d.type === "candlestick")
            h.each(function(i) {
              if (!i.empty) {
                var p = m.select(this), c = d[i.dir];
                o(p, c.line.width, c.line.color, c.fillcolor), p.style("opacity", d.selectedpoints && !i.selected ? 0.3 : 1);
              }
            });
          else {
            o(h, u, d.line.color, d.fillcolor), t.selectAll("path.mean").style({ "stroke-width": u, "stroke-dasharray": 2 * u + "px," + u + "px" }).call(g.stroke, d.line.color);
            var l = t.selectAll("path.point");
            k.pointStyle(l, d, x);
          }
        });
      }, styleOnSelect: function(x, e, r) {
        var n = e[0].trace, s = r.selectAll("path.point");
        n.selectedpoints ? k.selectedPointStyle(s, n) : k.pointStyle(s, n, x);
      } };
    }, { "../../components/color": 367, "../../components/drawing": 389, "@plotly/d3": 58 }], 694: [function(v, Q, $) {
      var m = v("../../lib").extendFlat, g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../ohlc/attributes"), x = v("../box/attributes");
      function e(r) {
        return { line: { color: m({}, x.line.color, { dflt: r }), width: x.line.width, editType: "style" }, fillcolor: x.fillcolor, editType: "style" };
      }
      Q.exports = { xperiod: k.xperiod, xperiod0: k.xperiod0, xperiodalignment: k.xperiodalignment, xhoverformat: g("x"), yhoverformat: g("y"), x: k.x, open: k.open, high: k.high, low: k.low, close: k.close, line: { width: m({}, x.line.width, {}), editType: "style" }, increasing: e(k.increasing.line.color.dflt), decreasing: e(k.decreasing.line.color.dflt), text: k.text, hovertext: k.hovertext, whiskerwidth: m({}, x.whiskerwidth, { dflt: 0 }), hoverlabel: k.hoverlabel };
    }, { "../../lib": 515, "../../plots/cartesian/axis_format_attributes": 569, "../box/attributes": 682, "../ohlc/attributes": 881 }], 695: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../../plots/cartesian/align_period"), x = v("../ohlc/calc").calcCommon;
      function e(r, n, s, t) {
        return { min: s, q1: Math.min(r, t), med: t, q3: Math.max(r, t), max: n };
      }
      Q.exports = function(r, n) {
        var s = r._fullLayout, t = g.getFromId(r, n.xaxis), d = g.getFromId(r, n.yaxis), u = t.makeCalcdata(n, "x"), o = k(n, t, "x", u).vals, h = x(r, n, u, o, d, e);
        return h.length ? (m.extendFlat(h[0].t, { num: s._numBoxes, dPos: m.distinctVals(o).minDiff / 2, posLetter: "x", valLetter: "y" }), s._numBoxes++, h) : [{ t: { empty: !0 } }];
      };
    }, { "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "../ohlc/calc": 882 }], 696: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../ohlc/ohlc_defaults"), x = v("../scatter/period_defaults"), e = v("./attributes");
      function r(n, s, t, d) {
        var u = t(d + ".line.color");
        t(d + ".line.width", s.line.width), t(d + ".fillcolor", g.addOpacity(u, 0.5));
      }
      Q.exports = function(n, s, t, d) {
        function u(o, h) {
          return m.coerce(n, s, e, o, h);
        }
        k(n, s, u, d) ? (x(n, s, d, u, { x: !0 }), u("xhoverformat"), u("yhoverformat"), u("line.width"), r(n, s, u, "increasing"), r(n, s, u, "decreasing"), u("text"), u("hovertext"), u("whiskerwidth"), d._requestRangeslider[s.xaxis] = !0) : s.visible = !1;
      };
    }, { "../../components/color": 367, "../../lib": 515, "../ohlc/ohlc_defaults": 886, "../scatter/period_defaults": 956, "./attributes": 694 }], 697: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "candlestick", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "showLegend", "candlestick", "boxLayout"], meta: {}, attributes: v("./attributes"), layoutAttributes: v("../box/layout_attributes"), supplyLayoutDefaults: v("../box/layout_defaults").supplyLayoutDefaults, crossTraceCalc: v("../box/cross_trace_calc").crossTraceCalc, supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("../box/plot").plot, layerName: "boxlayer", style: v("../box/style").style, hoverPoints: v("../ohlc/hover").hoverPoints, selectPoints: v("../ohlc/select") };
    }, { "../../plots/cartesian": 578, "../box/cross_trace_calc": 684, "../box/layout_attributes": 689, "../box/layout_defaults": 690, "../box/plot": 691, "../box/style": 693, "../ohlc/hover": 884, "../ohlc/select": 888, "./attributes": 694, "./calc": 695, "./defaults": 696 }], 698: [function(v, Q, $) {
      var m = v("./axis_defaults"), g = v("../../plot_api/plot_template");
      Q.exports = function(k, x, e, r, n) {
        r("a") || (r("da"), r("a0")), r("b") || (r("db"), r("b0")), function(s, t, d, u) {
          ["aaxis", "baxis"].forEach(function(o) {
            var h = o.charAt(0), l = s[o] || {}, i = g.newContainer(t, o), p = { noTicklabelstep: !0, tickfont: "x", id: h + "axis", letter: h, font: t.font, name: o, data: s[h], calendar: t.calendar, dfltColor: u, bgColor: d.paper_bgcolor, autotypenumbersDflt: d.autotypenumbers, fullLayout: d };
            m(l, i, p), i._categories = i._categories || [], s[o] || l.type === "-" || (s[o] = { type: l.type });
          });
        }(k, x, e, n);
      };
    }, { "../../plot_api/plot_template": 555, "./axis_defaults": 703 }], 699: [function(v, Q, $) {
      var m = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(g) {
        return function k(x, e) {
          if (!m(x) || e >= 10)
            return null;
          for (var r = 1 / 0, n = -1 / 0, s = x.length, t = 0; t < s; t++) {
            var d = x[t];
            if (m(d)) {
              var u = k(d, e + 1);
              u && (r = Math.min(u[0], r), n = Math.max(u[1], n));
            } else
              r = Math.min(d, r), n = Math.max(d, n);
          }
          return [r, n];
        }(g, 0);
      };
    }, { "../../lib": 515 }], 700: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("./axis_attributes"), k = v("../../components/color/attributes"), x = m({ editType: "calc" });
      x.family.dflt = '"Open Sans", verdana, arial, sans-serif', x.size.dflt = 12, x.color.dflt = k.defaultLine, Q.exports = { carpet: { valType: "string", editType: "calc" }, x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, a: { valType: "data_array", editType: "calc" }, a0: { valType: "number", dflt: 0, editType: "calc" }, da: { valType: "number", dflt: 1, editType: "calc" }, b: { valType: "data_array", editType: "calc" }, b0: { valType: "number", dflt: 0, editType: "calc" }, db: { valType: "number", dflt: 1, editType: "calc" }, cheaterslope: { valType: "number", dflt: 1, editType: "calc" }, aaxis: g, baxis: g, font: x, color: { valType: "color", dflt: k.defaultLine, editType: "plot" }, transforms: void 0 };
    }, { "../../components/color/attributes": 366, "../../plots/font_attributes": 594, "./axis_attributes": 702 }], 701: [function(v, Q, $) {
      var m = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(g, k, x, e) {
        var r, n, s, t, d, u, o, h, l, i, p, c, a, y = m(x) ? "a" : "b", f = (y === "a" ? g.aaxis : g.baxis).smoothing, _ = y === "a" ? g.a2i : g.b2j, b = y === "a" ? x : e, w = y === "a" ? e : x, T = y === "a" ? k.a.length : k.b.length, L = y === "a" ? k.b.length : k.a.length, A = Math.floor(y === "a" ? g.b2j(w) : g.a2i(w)), I = y === "a" ? function(re) {
          return g.evalxy([], re, A);
        } : function(re) {
          return g.evalxy([], A, re);
        };
        f && (s = Math.max(0, Math.min(L - 2, A)), t = A - s, n = y === "a" ? function(re, V) {
          return g.dxydi([], re, s, V, t);
        } : function(re, V) {
          return g.dxydj([], s, re, t, V);
        });
        var P = _(b[0]), S = _(b[1]), E = P < S ? 1 : -1, R = 1e-8 * (S - P), z = E > 0 ? Math.floor : Math.ceil, j = E > 0 ? Math.ceil : Math.floor, H = E > 0 ? Math.min : Math.max, Y = E > 0 ? Math.max : Math.min, J = z(P + R), W = j(S - R), Z = [[o = I(P)]];
        for (r = J; r * E < W * E; r += E)
          d = [], p = Y(P, r), a = (c = H(S, r + E)) - p, u = Math.max(0, Math.min(T - 2, Math.floor(0.5 * (p + c)))), h = I(c), f && (l = n(u, p - u), i = n(u, c - u), d.push([o[0] + l[0] / 3 * a, o[1] + l[1] / 3 * a]), d.push([h[0] - i[0] / 3 * a, h[1] - i[1] / 3 * a])), d.push(h), Z.push(d), o = h;
        return Z;
      };
    }, { "../../lib": 515 }], 702: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("../../components/color/attributes"), k = v("../../plots/cartesian/layout_attributes"), x = v("../../plots/cartesian/axis_format_attributes").descriptionWithDates, e = v("../../plot_api/edit_types").overrideAll, r = v("../../components/drawing/attributes").dash, n = v("../../lib/extend").extendFlat;
      Q.exports = { color: { valType: "color", editType: "calc" }, smoothing: { valType: "number", dflt: 1, min: 0, max: 1.3, editType: "calc" }, title: { text: { valType: "string", dflt: "", editType: "calc" }, font: m({ editType: "calc" }), offset: { valType: "number", dflt: 10, editType: "calc" }, editType: "calc" }, type: { valType: "enumerated", values: ["-", "linear", "date", "category"], dflt: "-", editType: "calc" }, autotypenumbers: k.autotypenumbers, autorange: { valType: "enumerated", values: [!0, !1, "reversed"], dflt: !0, editType: "calc" }, rangemode: { valType: "enumerated", values: ["normal", "tozero", "nonnegative"], dflt: "normal", editType: "calc" }, range: { valType: "info_array", editType: "calc", items: [{ valType: "any", editType: "calc" }, { valType: "any", editType: "calc" }] }, fixedrange: { valType: "boolean", dflt: !1, editType: "calc" }, cheatertype: { valType: "enumerated", values: ["index", "value"], dflt: "value", editType: "calc" }, tickmode: { valType: "enumerated", values: ["linear", "array"], dflt: "array", editType: "calc" }, nticks: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, tickvals: { valType: "data_array", editType: "calc" }, ticktext: { valType: "data_array", editType: "calc" }, showticklabels: { valType: "enumerated", values: ["start", "end", "both", "none"], dflt: "start", editType: "calc" }, tickfont: m({ editType: "calc" }), tickangle: { valType: "angle", dflt: "auto", editType: "calc" }, tickprefix: { valType: "string", dflt: "", editType: "calc" }, showtickprefix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "calc" }, ticksuffix: { valType: "string", dflt: "", editType: "calc" }, showticksuffix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "calc" }, showexponent: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "calc" }, exponentformat: { valType: "enumerated", values: ["none", "e", "E", "power", "SI", "B"], dflt: "B", editType: "calc" }, minexponent: { valType: "number", dflt: 3, min: 0, editType: "calc" }, separatethousands: { valType: "boolean", dflt: !1, editType: "calc" }, tickformat: { valType: "string", dflt: "", editType: "calc", description: x("tick label") }, tickformatstops: e(k.tickformatstops, "calc", "from-root"), categoryorder: { valType: "enumerated", values: ["trace", "category ascending", "category descending", "array"], dflt: "trace", editType: "calc" }, categoryarray: { valType: "data_array", editType: "calc" }, labelpadding: { valType: "integer", dflt: 10, editType: "calc" }, labelprefix: { valType: "string", editType: "calc" }, labelsuffix: { valType: "string", dflt: "", editType: "calc" }, showline: { valType: "boolean", dflt: !1, editType: "calc" }, linecolor: { valType: "color", dflt: g.defaultLine, editType: "calc" }, linewidth: { valType: "number", min: 0, dflt: 1, editType: "calc" }, gridcolor: { valType: "color", editType: "calc" }, gridwidth: { valType: "number", min: 0, dflt: 1, editType: "calc" }, griddash: n({}, r, { editType: "calc" }), showgrid: { valType: "boolean", dflt: !0, editType: "calc" }, minorgridcount: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, minorgridwidth: { valType: "number", min: 0, dflt: 1, editType: "calc" }, minorgriddash: n({}, r, { editType: "calc" }), minorgridcolor: { valType: "color", dflt: g.lightLine, editType: "calc" }, startline: { valType: "boolean", editType: "calc" }, startlinecolor: { valType: "color", editType: "calc" }, startlinewidth: { valType: "number", dflt: 1, editType: "calc" }, endline: { valType: "boolean", editType: "calc" }, endlinewidth: { valType: "number", dflt: 1, editType: "calc" }, endlinecolor: { valType: "color", editType: "calc" }, tick0: { valType: "number", min: 0, dflt: 0, editType: "calc" }, dtick: { valType: "number", min: 0, dflt: 1, editType: "calc" }, arraytick0: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, arraydtick: { valType: "integer", min: 1, dflt: 1, editType: "calc" }, _deprecated: { title: { valType: "string", editType: "calc" }, titlefont: m({ editType: "calc" }), titleoffset: { valType: "number", dflt: 10, editType: "calc" } }, editType: "calc" };
    }, { "../../components/color/attributes": 366, "../../components/drawing/attributes": 388, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/cartesian/layout_attributes": 579, "../../plots/font_attributes": 594 }], 703: [function(v, Q, $) {
      var m = v("./attributes"), g = v("../../components/color").addOpacity, k = v("../../registry"), x = v("../../lib"), e = v("../../plots/cartesian/tick_value_defaults"), r = v("../../plots/cartesian/tick_label_defaults"), n = v("../../plots/cartesian/prefix_suffix_defaults"), s = v("../../plots/cartesian/category_order_defaults"), t = v("../../plots/cartesian/set_convert"), d = v("../../plots/cartesian/axis_autotype");
      Q.exports = function(u, o, h) {
        var l = h.letter, i = h.font || {}, p = m[l + "axis"];
        function c(E, R) {
          return x.coerce(u, o, p, E, R);
        }
        function a(E, R) {
          return x.coerce2(u, o, p, E, R);
        }
        h.name && (o._name = h.name, o._id = h.name), c("autotypenumbers", h.autotypenumbersDflt);
        var y = c("type");
        y === "-" && (h.data && function(E, R) {
          if (E.type === "-") {
            var z = E._id.charAt(0), j = E[z + "calendar"];
            E.type = d(R, j, { autotypenumbers: E.autotypenumbers });
          }
        }(o, h.data), o.type === "-" ? o.type = "linear" : y = u.type = o.type), c("smoothing"), c("cheatertype"), c("showticklabels"), c("labelprefix", l + " = "), c("labelsuffix"), c("showtickprefix"), c("showticksuffix"), c("separatethousands"), c("tickformat"), c("exponentformat"), c("minexponent"), c("showexponent"), c("categoryorder"), c("tickmode"), c("tickvals"), c("ticktext"), c("tick0"), c("dtick"), o.tickmode === "array" && (c("arraytick0"), c("arraydtick")), c("labelpadding"), o._hovertitle = l, y === "date" && k.getComponentMethod("calendars", "handleDefaults")(u, o, "calendar", h.calendar), t(o, h.fullLayout), o.c2p = x.identity;
        var f = c("color", h.dfltColor), _ = f === u.color ? f : i.color;
        c("title.text") && (x.coerceFont(c, "title.font", { family: i.family, size: x.bigFont(i.size), color: _ }), c("title.offset")), c("tickangle"), c("autorange", !o.isValidRange(u.range)) && c("rangemode"), c("range"), o.cleanRange(), c("fixedrange"), e(u, o, c, y), n(u, o, c, y, h), r(u, o, c, y, h), s(u, o, c, { data: h.data, dataAttr: l });
        var b = a("gridcolor", g(f, 0.3)), w = a("gridwidth"), T = a("griddash"), L = c("showgrid");
        L || (delete o.gridcolor, delete o.gridwidth, delete o.griddash);
        var A = a("startlinecolor", f), I = a("startlinewidth", w);
        c("startline", o.showgrid || !!A || !!I) || (delete o.startlinecolor, delete o.startlinewidth);
        var P = a("endlinecolor", f), S = a("endlinewidth", w);
        return c("endline", o.showgrid || !!P || !!S) || (delete o.endlinecolor, delete o.endlinewidth), L ? (c("minorgridcount"), c("minorgridwidth", w), c("minorgriddash", T), c("minorgridcolor", g(b, 0.06)), o.minorgridcount || (delete o.minorgridwidth, delete o.minorgriddash, delete o.minorgridcolor)) : (delete o.gridcolor, delete o.gridwidth, delete o.griddash), o.showticklabels === "none" && (delete o.tickfont, delete o.tickangle, delete o.showexponent, delete o.exponentformat, delete o.minexponent, delete o.tickformat, delete o.showticksuffix, delete o.showtickprefix), o.showticksuffix || delete o.ticksuffix, o.showtickprefix || delete o.tickprefix, c("tickmode"), o;
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../plots/cartesian/axis_autotype": 567, "../../plots/cartesian/category_order_defaults": 571, "../../plots/cartesian/prefix_suffix_defaults": 583, "../../plots/cartesian/set_convert": 585, "../../plots/cartesian/tick_label_defaults": 587, "../../plots/cartesian/tick_value_defaults": 589, "../../registry": 647, "./attributes": 700 }], 704: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib").isArray1D, k = v("./cheater_basis"), x = v("./array_minmax"), e = v("./calc_gridlines"), r = v("./calc_labels"), n = v("./calc_clippath"), s = v("../heatmap/clean_2d_array"), t = v("./smooth_fill_2d_array"), d = v("../heatmap/convert_column_xyz"), u = v("./set_convert");
      Q.exports = function(o, h) {
        var l = m.getFromId(o, h.xaxis), i = m.getFromId(o, h.yaxis), p = h.aaxis, c = h.baxis, a = h.x, y = h.y, f = [];
        a && g(a) && f.push("x"), y && g(y) && f.push("y"), f.length && d(h, p, c, "a", "b", f);
        var _ = h._a = h._a || h.a, b = h._b = h._b || h.b;
        a = h._x || h.x, y = h._y || h.y;
        var w = {};
        if (h._cheater) {
          var T = p.cheatertype === "index" ? _.length : _, L = c.cheatertype === "index" ? b.length : b;
          a = k(T, L, h.cheaterslope);
        }
        h._x = a = s(a), h._y = y = s(y), t(a, _, b), t(y, _, b), u(h), h.setScale();
        var A = x(a), I = x(y), P = 0.5 * (A[1] - A[0]), S = 0.5 * (A[1] + A[0]), E = 0.5 * (I[1] - I[0]), R = 0.5 * (I[1] + I[0]);
        return A = [S - 1.3 * P, S + 1.3 * P], I = [R - 1.3 * E, R + 1.3 * E], h._extremes[l._id] = m.findExtremes(l, A, { padded: !0 }), h._extremes[i._id] = m.findExtremes(i, I, { padded: !0 }), e(h, "a", "b"), e(h, "b", "a"), r(h, p), r(h, c), w.clipsegments = n(h._xctrl, h._yctrl, p, c), w.x = a, w.y = y, w.a = _, w.b = b, [w];
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "../heatmap/clean_2d_array": 803, "../heatmap/convert_column_xyz": 805, "./array_minmax": 699, "./calc_clippath": 705, "./calc_gridlines": 706, "./calc_labels": 707, "./cheater_basis": 709, "./set_convert": 722, "./smooth_fill_2d_array": 723 }], 705: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e, r, n, s = [], t = !!k.smoothing, d = !!x.smoothing, u = m[0].length - 1, o = m.length - 1;
        for (e = 0, r = [], n = []; e <= u; e++)
          r[e] = m[0][e], n[e] = g[0][e];
        for (s.push({ x: r, y: n, bicubic: t }), e = 0, r = [], n = []; e <= o; e++)
          r[e] = m[e][u], n[e] = g[e][u];
        for (s.push({ x: r, y: n, bicubic: d }), e = u, r = [], n = []; e >= 0; e--)
          r[u - e] = m[o][e], n[u - e] = g[o][e];
        for (s.push({ x: r, y: n, bicubic: t }), e = o, r = [], n = []; e >= 0; e--)
          r[o - e] = m[e][0], n[o - e] = g[e][0];
        return s.push({ x: r, y: n, bicubic: d }), s;
      };
    }, {}], 706: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib/extend").extendFlat;
      Q.exports = function(k, x, e) {
        var r, n, s, t, d, u, o, h, l, i, p, c, a, y, f = k["_" + x], _ = k[x + "axis"], b = _._gridlines = [], w = _._minorgridlines = [], T = _._boundarylines = [], L = k["_" + e], A = k[e + "axis"];
        _.tickmode === "array" && (_.tickvals = f.slice());
        var I = k._xctrl, P = k._yctrl, S = I[0].length, E = I.length, R = k._a.length, z = k._b.length;
        m.prepTicks(_), _.tickmode === "array" && delete _.tickvals;
        var j = _.smoothing ? 3 : 1;
        function H(J) {
          var W, Z, re, V, B, U, ee, N, K, X, te, ie, le = [], oe = [], ve = {};
          if (x === "b")
            for (Z = k.b2j(J), re = Math.floor(Math.max(0, Math.min(z - 2, Z))), V = Z - re, ve.length = z, ve.crossLength = R, ve.xy = function(ue) {
              return k.evalxy([], ue, Z);
            }, ve.dxy = function(ue, ye) {
              return k.dxydi([], ue, re, ye, V);
            }, W = 0; W < R; W++)
              U = Math.min(R - 2, W), ee = W - U, N = k.evalxy([], W, Z), A.smoothing && W > 0 && (K = k.dxydi([], W - 1, re, 0, V), le.push(B[0] + K[0] / 3), oe.push(B[1] + K[1] / 3), X = k.dxydi([], W - 1, re, 1, V), le.push(N[0] - X[0] / 3), oe.push(N[1] - X[1] / 3)), le.push(N[0]), oe.push(N[1]), B = N;
          else
            for (W = k.a2i(J), U = Math.floor(Math.max(0, Math.min(R - 2, W))), ee = W - U, ve.length = R, ve.crossLength = z, ve.xy = function(ue) {
              return k.evalxy([], W, ue);
            }, ve.dxy = function(ue, ye) {
              return k.dxydj([], U, ue, ee, ye);
            }, Z = 0; Z < z; Z++)
              re = Math.min(z - 2, Z), V = Z - re, N = k.evalxy([], W, Z), A.smoothing && Z > 0 && (te = k.dxydj([], U, Z - 1, ee, 0), le.push(B[0] + te[0] / 3), oe.push(B[1] + te[1] / 3), ie = k.dxydj([], U, Z - 1, ee, 1), le.push(N[0] - ie[0] / 3), oe.push(N[1] - ie[1] / 3)), le.push(N[0]), oe.push(N[1]), B = N;
          return ve.axisLetter = x, ve.axis = _, ve.crossAxis = A, ve.value = J, ve.constvar = e, ve.index = h, ve.x = le, ve.y = oe, ve.smoothing = A.smoothing, ve;
        }
        function Y(J) {
          var W, Z, re, V, B, U = [], ee = [], N = {};
          if (N.length = f.length, N.crossLength = L.length, x === "b")
            for (re = Math.max(0, Math.min(z - 2, J)), B = Math.min(1, Math.max(0, J - re)), N.xy = function(K) {
              return k.evalxy([], K, J);
            }, N.dxy = function(K, X) {
              return k.dxydi([], K, re, X, B);
            }, W = 0; W < S; W++)
              U[W] = I[J * j][W], ee[W] = P[J * j][W];
          else
            for (Z = Math.max(0, Math.min(R - 2, J)), V = Math.min(1, Math.max(0, J - Z)), N.xy = function(K) {
              return k.evalxy([], J, K);
            }, N.dxy = function(K, X) {
              return k.dxydj([], Z, K, V, X);
            }, W = 0; W < E; W++)
              U[W] = I[W][J * j], ee[W] = P[W][J * j];
          return N.axisLetter = x, N.axis = _, N.crossAxis = A, N.value = f[J], N.constvar = e, N.index = J, N.x = U, N.y = ee, N.smoothing = A.smoothing, N;
        }
        if (_.tickmode === "array") {
          for (t = 5e-15, u = (d = [Math.floor((f.length - 1 - _.arraytick0) / _.arraydtick * (1 + t)), Math.ceil(-_.arraytick0 / _.arraydtick / (1 + t))].sort(function(J, W) {
            return J - W;
          }))[0] - 1, o = d[1] + 1, h = u; h < o; h++)
            (n = _.arraytick0 + _.arraydtick * h) < 0 || n > f.length - 1 || b.push(g(Y(n), { color: _.gridcolor, width: _.gridwidth, dash: _.griddash }));
          for (h = u; h < o; h++)
            if (s = _.arraytick0 + _.arraydtick * h, p = Math.min(s + _.arraydtick, f.length - 1), !(s < 0 || s > f.length - 1 || p < 0 || p > f.length - 1))
              for (c = f[s], a = f[p], r = 0; r < _.minorgridcount; r++)
                (y = p - s) <= 0 || (i = c + (a - c) * (r + 1) / (_.minorgridcount + 1) * (_.arraydtick / y)) < f[0] || i > f[f.length - 1] || w.push(g(H(i), { color: _.minorgridcolor, width: _.minorgridwidth, dash: _.minorgriddash }));
          _.startline && T.push(g(Y(0), { color: _.startlinecolor, width: _.startlinewidth })), _.endline && T.push(g(Y(f.length - 1), { color: _.endlinecolor, width: _.endlinewidth }));
        } else {
          for (t = 5e-15, u = (d = [Math.floor((f[f.length - 1] - _.tick0) / _.dtick * (1 + t)), Math.ceil((f[0] - _.tick0) / _.dtick / (1 + t))].sort(function(J, W) {
            return J - W;
          }))[0], o = d[1], h = u; h <= o; h++)
            l = _.tick0 + _.dtick * h, b.push(g(H(l), { color: _.gridcolor, width: _.gridwidth, dash: _.griddash }));
          for (h = u - 1; h < o + 1; h++)
            for (l = _.tick0 + _.dtick * h, r = 0; r < _.minorgridcount; r++)
              (i = l + _.dtick * (r + 1) / (_.minorgridcount + 1)) < f[0] || i > f[f.length - 1] || w.push(g(H(i), { color: _.minorgridcolor, width: _.minorgridwidth, dash: _.minorgriddash }));
          _.startline && T.push(g(H(f[0]), { color: _.startlinecolor, width: _.startlinewidth })), _.endline && T.push(g(H(f[f.length - 1]), { color: _.endlinecolor, width: _.endlinewidth }));
        }
      };
    }, { "../../lib/extend": 505, "../../plots/cartesian/axes": 566 }], 707: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib/extend").extendFlat;
      Q.exports = function(k, x) {
        var e, r, n, s = x._labels = [], t = x._gridlines;
        for (e = 0; e < t.length; e++)
          n = t[e], ["start", "both"].indexOf(x.showticklabels) !== -1 && (r = m.tickText(x, n.value), g(r, { prefix: void 0, suffix: void 0, endAnchor: !0, xy: n.xy(0), dxy: n.dxy(0, 0), axis: n.axis, length: n.crossAxis.length, font: n.axis.tickfont, isFirst: e === 0, isLast: e === t.length - 1 }), s.push(r)), ["end", "both"].indexOf(x.showticklabels) !== -1 && (r = m.tickText(x, n.value), g(r, { endAnchor: !1, xy: n.xy(n.crossLength - 1), dxy: n.dxy(n.crossLength - 2, 1), axis: n.axis, length: n.crossAxis.length, font: n.axis.tickfont, isFirst: e === 0, isLast: e === t.length - 1 }), s.push(r));
      };
    }, { "../../lib/extend": 505, "../../plots/cartesian/axes": 566 }], 708: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e = m[0] - g[0], r = m[1] - g[1], n = k[0] - g[0], s = k[1] - g[1], t = Math.pow(e * e + r * r, 0.25), d = Math.pow(n * n + s * s, 0.25), u = (d * d * e - t * t * n) * x, o = (d * d * r - t * t * s) * x, h = d * (t + d) * 3, l = t * (t + d) * 3;
        return [[g[0] + (h && u / h), g[1] + (h && o / h)], [g[0] - (l && u / l), g[1] - (l && o / l)]];
      };
    }, {}], 709: [function(v, Q, $) {
      var m = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(g, k, x) {
        var e, r, n, s, t, d, u = [], o = m(g) ? g.length : g, h = m(k) ? k.length : k, l = m(g) ? g : null, i = m(k) ? k : null;
        l && (n = (l.length - 1) / (l[l.length - 1] - l[0]) / (o - 1)), i && (s = (i.length - 1) / (i[i.length - 1] - i[0]) / (h - 1));
        var p = 1 / 0, c = -1 / 0;
        for (r = 0; r < h; r++)
          for (u[r] = [], t = i ? (i[r] - i[0]) * s : r / (h - 1), e = 0; e < o; e++)
            d = (l ? (l[e] - l[0]) * n : e / (o - 1)) - t * x, p = Math.min(d, p), c = Math.max(d, c), u[r][e] = d;
        var a = 1 / (c - p), y = -p * a;
        for (r = 0; r < h; r++)
          for (e = 0; e < o; e++)
            u[r][e] = a * u[r][e] + y;
        return u;
      };
    }, { "../../lib": 515 }], 710: [function(v, Q, $) {
      var m = v("./catmull_rom"), g = v("../../lib").ensureArray;
      function k(x, e, r) {
        var n = -0.5 * r[0] + 1.5 * e[0], s = -0.5 * r[1] + 1.5 * e[1];
        return [(2 * n + x[0]) / 3, (2 * s + x[1]) / 3];
      }
      Q.exports = function(x, e, r, n, s, t) {
        var d, u, o, h, l, i, p, c, a, y, f = r[0].length, _ = r.length, b = s ? 3 * f - 2 : f, w = t ? 3 * _ - 2 : _;
        for (x = g(x, w), e = g(e, w), o = 0; o < w; o++)
          x[o] = g(x[o], b), e[o] = g(e[o], b);
        for (u = 0, h = 0; u < _; u++, h += t ? 3 : 1)
          for (l = x[h], i = e[h], p = r[u], c = n[u], d = 0, o = 0; d < f; d++, o += s ? 3 : 1)
            l[o] = p[d], i[o] = c[d];
        if (s)
          for (u = 0, h = 0; u < _; u++, h += t ? 3 : 1) {
            for (d = 1, o = 3; d < f - 1; d++, o += 3)
              a = m([r[u][d - 1], n[u][d - 1]], [r[u][d], n[u][d]], [r[u][d + 1], n[u][d + 1]], s), x[h][o - 1] = a[0][0], e[h][o - 1] = a[0][1], x[h][o + 1] = a[1][0], e[h][o + 1] = a[1][1];
            y = k([x[h][0], e[h][0]], [x[h][2], e[h][2]], [x[h][3], e[h][3]]), x[h][1] = y[0], e[h][1] = y[1], y = k([x[h][b - 1], e[h][b - 1]], [x[h][b - 3], e[h][b - 3]], [x[h][b - 4], e[h][b - 4]]), x[h][b - 2] = y[0], e[h][b - 2] = y[1];
          }
        if (t)
          for (o = 0; o < b; o++) {
            for (h = 3; h < w - 3; h += 3)
              a = m([x[h - 3][o], e[h - 3][o]], [x[h][o], e[h][o]], [x[h + 3][o], e[h + 3][o]], t), x[h - 1][o] = a[0][0], e[h - 1][o] = a[0][1], x[h + 1][o] = a[1][0], e[h + 1][o] = a[1][1];
            y = k([x[0][o], e[0][o]], [x[2][o], e[2][o]], [x[3][o], e[3][o]]), x[1][o] = y[0], e[1][o] = y[1], y = k([x[w - 1][o], e[w - 1][o]], [x[w - 3][o], e[w - 3][o]], [x[w - 4][o], e[w - 4][o]]), x[w - 2][o] = y[0], e[w - 2][o] = y[1];
          }
        if (s && t)
          for (h = 1; h < w; h += (h + 1) % 3 == 0 ? 2 : 1) {
            for (o = 3; o < b - 3; o += 3)
              a = m([x[h][o - 3], e[h][o - 3]], [x[h][o], e[h][o]], [x[h][o + 3], e[h][o + 3]], s), x[h][o - 1] = 0.5 * (x[h][o - 1] + a[0][0]), e[h][o - 1] = 0.5 * (e[h][o - 1] + a[0][1]), x[h][o + 1] = 0.5 * (x[h][o + 1] + a[1][0]), e[h][o + 1] = 0.5 * (e[h][o + 1] + a[1][1]);
            y = k([x[h][0], e[h][0]], [x[h][2], e[h][2]], [x[h][3], e[h][3]]), x[h][1] = 0.5 * (x[h][1] + y[0]), e[h][1] = 0.5 * (e[h][1] + y[1]), y = k([x[h][b - 1], e[h][b - 1]], [x[h][b - 3], e[h][b - 3]], [x[h][b - 4], e[h][b - 4]]), x[h][b - 2] = 0.5 * (x[h][b - 2] + y[0]), e[h][b - 2] = 0.5 * (e[h][b - 2] + y[1]);
          }
        return [x, e];
      };
    }, { "../../lib": 515, "./catmull_rom": 708 }], 711: [function(v, Q, $) {
      Q.exports = { RELATIVE_CULL_TOLERANCE: 1e-6 };
    }, {}], 712: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        return g && k ? function(x, e, r, n, s) {
          var t, d, u, o, h, l;
          x || (x = []), e *= 3, r *= 3;
          var i = n * n, p = 1 - n, c = p * p, a = p * n * 2, y = -3 * c, f = 3 * (c - a), _ = 3 * (a - i), b = 3 * i, w = s * s, T = w * s, L = 1 - s, A = L * L, I = A * L;
          for (l = 0; l < m.length; l++)
            t = y * (h = m[l])[r][e] + f * h[r][e + 1] + _ * h[r][e + 2] + b * h[r][e + 3], d = y * h[r + 1][e] + f * h[r + 1][e + 1] + _ * h[r + 1][e + 2] + b * h[r + 1][e + 3], u = y * h[r + 2][e] + f * h[r + 2][e + 1] + _ * h[r + 2][e + 2] + b * h[r + 2][e + 3], o = y * h[r + 3][e] + f * h[r + 3][e + 1] + _ * h[r + 3][e + 2] + b * h[r + 3][e + 3], x[l] = I * t + 3 * (A * s * d + L * w * u) + T * o;
          return x;
        } : g ? function(x, e, r, n, s) {
          var t, d, u, o;
          x || (x = []), e *= 3;
          var h = n * n, l = 1 - n, i = l * l, p = l * n * 2, c = -3 * i, a = 3 * (i - p), y = 3 * (p - h), f = 3 * h, _ = 1 - s;
          for (u = 0; u < m.length; u++)
            t = c * (o = m[u])[r][e] + a * o[r][e + 1] + y * o[r][e + 2] + f * o[r][e + 3], d = c * o[r + 1][e] + a * o[r + 1][e + 1] + y * o[r + 1][e + 2] + f * o[r + 1][e + 3], x[u] = _ * t + s * d;
          return x;
        } : k ? function(x, e, r, n, s) {
          var t, d, u, o, h, l;
          x || (x = []), r *= 3;
          var i = s * s, p = i * s, c = 1 - s, a = c * c, y = a * c;
          for (h = 0; h < m.length; h++)
            t = (l = m[h])[r][e + 1] - l[r][e], d = l[r + 1][e + 1] - l[r + 1][e], u = l[r + 2][e + 1] - l[r + 2][e], o = l[r + 3][e + 1] - l[r + 3][e], x[h] = y * t + 3 * (a * s * d + c * i * u) + p * o;
          return x;
        } : function(x, e, r, n, s) {
          var t, d, u, o;
          x || (x = []);
          var h = 1 - s;
          for (u = 0; u < m.length; u++)
            t = (o = m[u])[r][e + 1] - o[r][e], d = o[r + 1][e + 1] - o[r + 1][e], x[u] = h * t + s * d;
          return x;
        };
      };
    }, {}], 713: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        return g && k ? function(x, e, r, n, s) {
          var t, d, u, o, h, l;
          x || (x = []), e *= 3, r *= 3;
          var i = n * n, p = i * n, c = 1 - n, a = c * c, y = a * c, f = s * s, _ = 1 - s, b = _ * _, w = _ * s * 2, T = -3 * b, L = 3 * (b - w), A = 3 * (w - f), I = 3 * f;
          for (l = 0; l < m.length; l++)
            t = T * (h = m[l])[r][e] + L * h[r + 1][e] + A * h[r + 2][e] + I * h[r + 3][e], d = T * h[r][e + 1] + L * h[r + 1][e + 1] + A * h[r + 2][e + 1] + I * h[r + 3][e + 1], u = T * h[r][e + 2] + L * h[r + 1][e + 2] + A * h[r + 2][e + 2] + I * h[r + 3][e + 2], o = T * h[r][e + 3] + L * h[r + 1][e + 3] + A * h[r + 2][e + 3] + I * h[r + 3][e + 3], x[l] = y * t + 3 * (a * n * d + c * i * u) + p * o;
          return x;
        } : g ? function(x, e, r, n, s) {
          var t, d, u, o, h, l;
          x || (x = []), e *= 3;
          var i = s * s, p = i * s, c = 1 - s, a = c * c, y = a * c;
          for (h = 0; h < m.length; h++)
            t = (l = m[h])[r + 1][e] - l[r][e], d = l[r + 1][e + 1] - l[r][e + 1], u = l[r + 1][e + 2] - l[r][e + 2], o = l[r + 1][e + 3] - l[r][e + 3], x[h] = y * t + 3 * (a * s * d + c * i * u) + p * o;
          return x;
        } : k ? function(x, e, r, n, s) {
          var t, d, u, o;
          x || (x = []), r *= 3;
          var h = 1 - n, l = s * s, i = 1 - s, p = i * i, c = i * s * 2, a = -3 * p, y = 3 * (p - c), f = 3 * (c - l), _ = 3 * l;
          for (u = 0; u < m.length; u++)
            t = a * (o = m[u])[r][e] + y * o[r + 1][e] + f * o[r + 2][e] + _ * o[r + 3][e], d = a * o[r][e + 1] + y * o[r + 1][e + 1] + f * o[r + 2][e + 1] + _ * o[r + 3][e + 1], x[u] = h * t + n * d;
          return x;
        } : function(x, e, r, n, s) {
          var t, d, u, o;
          x || (x = []);
          var h = 1 - n;
          for (u = 0; u < m.length; u++)
            t = (o = m[u])[r + 1][e] - o[r][e], d = o[r + 1][e + 1] - o[r][e + 1], x[u] = h * t + n * d;
          return x;
        };
      };
    }, {}], 714: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        var r = g - 2, n = k - 2;
        return x && e ? function(s, t, d) {
          var u, o, h, l, i, p;
          s || (s = []);
          var c = Math.max(0, Math.min(Math.floor(t), r)), a = Math.max(0, Math.min(Math.floor(d), n)), y = Math.max(0, Math.min(1, t - c)), f = Math.max(0, Math.min(1, d - a));
          c *= 3, a *= 3;
          var _ = y * y, b = _ * y, w = 1 - y, T = w * w, L = T * w, A = f * f, I = A * f, P = 1 - f, S = P * P, E = S * P;
          for (p = 0; p < m.length; p++)
            u = L * (i = m[p])[a][c] + 3 * (T * y * i[a][c + 1] + w * _ * i[a][c + 2]) + b * i[a][c + 3], o = L * i[a + 1][c] + 3 * (T * y * i[a + 1][c + 1] + w * _ * i[a + 1][c + 2]) + b * i[a + 1][c + 3], h = L * i[a + 2][c] + 3 * (T * y * i[a + 2][c + 1] + w * _ * i[a + 2][c + 2]) + b * i[a + 2][c + 3], l = L * i[a + 3][c] + 3 * (T * y * i[a + 3][c + 1] + w * _ * i[a + 3][c + 2]) + b * i[a + 3][c + 3], s[p] = E * u + 3 * (S * f * o + P * A * h) + I * l;
          return s;
        } : x ? function(s, t, d) {
          s || (s = []);
          var u, o, h, l, i, p, c = Math.max(0, Math.min(Math.floor(t), r)), a = Math.max(0, Math.min(Math.floor(d), n)), y = Math.max(0, Math.min(1, t - c)), f = Math.max(0, Math.min(1, d - a));
          c *= 3;
          var _ = y * y, b = _ * y, w = 1 - y, T = w * w, L = T * w, A = 1 - f;
          for (i = 0; i < m.length; i++)
            u = A * (p = m[i])[a][c] + f * p[a + 1][c], o = A * p[a][c + 1] + f * p[a + 1][c + 1], h = A * p[a][c + 2] + f * p[a + 1][c + 1], l = A * p[a][c + 3] + f * p[a + 1][c + 1], s[i] = L * u + 3 * (T * y * o + w * _ * h) + b * l;
          return s;
        } : e ? function(s, t, d) {
          s || (s = []);
          var u, o, h, l, i, p, c = Math.max(0, Math.min(Math.floor(t), r)), a = Math.max(0, Math.min(Math.floor(d), n)), y = Math.max(0, Math.min(1, t - c)), f = Math.max(0, Math.min(1, d - a));
          a *= 3;
          var _ = f * f, b = _ * f, w = 1 - f, T = w * w, L = T * w, A = 1 - y;
          for (i = 0; i < m.length; i++)
            u = A * (p = m[i])[a][c] + y * p[a][c + 1], o = A * p[a + 1][c] + y * p[a + 1][c + 1], h = A * p[a + 2][c] + y * p[a + 2][c + 1], l = A * p[a + 3][c] + y * p[a + 3][c + 1], s[i] = L * u + 3 * (T * f * o + w * _ * h) + b * l;
          return s;
        } : function(s, t, d) {
          s || (s = []);
          var u, o, h, l, i = Math.max(0, Math.min(Math.floor(t), r)), p = Math.max(0, Math.min(Math.floor(d), n)), c = Math.max(0, Math.min(1, t - i)), a = Math.max(0, Math.min(1, d - p)), y = 1 - a, f = 1 - c;
          for (h = 0; h < m.length; h++)
            u = f * (l = m[h])[p][i] + c * l[p][i + 1], o = f * l[p + 1][i] + c * l[p + 1][i + 1], s[h] = y * u + a * o;
          return s;
        };
      };
    }, {}], 715: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./xy_defaults"), k = v("./ab_defaults"), x = v("./attributes"), e = v("../../components/color/attributes");
      Q.exports = function(r, n, s, t) {
        function d(o, h) {
          return m.coerce(r, n, x, o, h);
        }
        n._clipPathId = "clip" + n.uid + "carpet";
        var u = d("color", e.defaultLine);
        m.coerceFont(d, "font"), d("carpet"), k(r, n, t, d, u), n.a && n.b ? (n.a.length < 3 && (n.aaxis.smoothing = 0), n.b.length < 3 && (n.baxis.smoothing = 0), g(r, n, d) || (n.visible = !1), n._cheater && d("cheaterslope")) : n.visible = !1;
      };
    }, { "../../components/color/attributes": 366, "../../lib": 515, "./ab_defaults": 698, "./attributes": 700, "./xy_defaults": 724 }], 716: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), plot: v("./plot"), calc: v("./calc"), animatable: !0, isContainer: !0, moduleType: "trace", name: "carpet", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "carpet", "carpetAxis", "notLegendIsolatable", "noMultiCategory", "noHover", "noSortingByValue"], meta: {} };
    }, { "../../plots/cartesian": 578, "./attributes": 700, "./calc": 704, "./defaults": 715, "./plot": 721 }], 717: [function(v, Q, $) {
      Q.exports = function(m, g) {
        for (var k, x = m._fullData.length, e = 0; e < x; e++) {
          var r = m._fullData[e];
          if (r.index !== g.index && r.type === "carpet" && (k || (k = r), r.carpet === g.carpet))
            return r;
        }
        return k;
      };
    }, {}], 718: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        if (m.length === 0)
          return "";
        var x, e = [], r = k ? 3 : 1;
        for (x = 0; x < m.length; x += r)
          e.push(m[x] + "," + g[x]), k && x < m.length - r && (e.push("C"), e.push([m[x + 1] + "," + g[x + 1], m[x + 2] + "," + g[x + 2] + " "].join(" ")));
        return e.join(k ? "" : "L");
      };
    }, {}], 719: [function(v, Q, $) {
      var m = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(g, k, x) {
        var e;
        for (m(g) ? g.length > k.length && (g = g.slice(0, k.length)) : g = [], e = 0; e < k.length; e++)
          g[e] = x(k[e]);
        return g;
      };
    }, { "../../lib": 515 }], 720: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e, r) {
        var n = e[0] * m.dpdx(g), s = e[1] * m.dpdy(k), t = 1, d = 1;
        if (r) {
          var u = Math.sqrt(e[0] * e[0] + e[1] * e[1]), o = Math.sqrt(r[0] * r[0] + r[1] * r[1]), h = (e[0] * r[0] + e[1] * r[1]) / u / o;
          d = Math.max(0, h);
        }
        var l = 180 * Math.atan2(s, n) / Math.PI;
        return l < -90 ? (l += 180, t = -t) : l > 90 && (l -= 180, t = -t), { angle: l, flip: t, p: m.c2p(x, g, k), offsetMultplier: d };
      };
    }, {}], 721: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("./map_1d_array"), x = v("./makepath"), e = v("./orient_text"), r = v("../../lib/svg_text_utils"), n = v("../../lib"), s = n.strRotate, t = n.strTranslate, d = v("../../constants/alignment");
      function u(p, c, a, y, f, _) {
        var b = "const-" + f + "-lines", w = a.selectAll("." + b).data(_);
        w.enter().append("path").classed(b, !0).style("vector-effect", "non-scaling-stroke"), w.each(function(T) {
          var L = T, A = L.x, I = L.y, P = k([], A, p.c2p), S = k([], I, c.c2p), E = "M" + x(P, S, L.smoothing);
          m.select(this).attr("d", E).style("stroke-width", L.width).style("stroke", L.color).style("stroke-dasharray", g.dashStyle(L.dash, L.width)).style("fill", "none");
        }), w.exit().remove();
      }
      function o(p, c, a, y, f, _, b, w) {
        var T = _.selectAll("text." + w).data(b);
        T.enter().append("text").classed(w, !0);
        var L = 0, A = {};
        return T.each(function(I, P) {
          var S;
          if (I.axis.tickangle === "auto")
            S = e(y, c, a, I.xy, I.dxy);
          else {
            var E = (I.axis.tickangle + 180) * Math.PI / 180;
            S = e(y, c, a, I.xy, [Math.cos(E), Math.sin(E)]);
          }
          P || (A = { angle: S.angle, flip: S.flip });
          var R = (I.endAnchor ? -1 : 1) * S.flip, z = m.select(this).attr({ "text-anchor": R > 0 ? "start" : "end", "data-notex": 1 }).call(g.font, I.font).text(I.text).call(r.convertToTspans, p), j = g.bBox(this);
          z.attr("transform", t(S.p[0], S.p[1]) + s(S.angle) + t(I.axis.labelpadding * R, 0.3 * j.height)), L = Math.max(L, j.width + I.axis.labelpadding);
        }), T.exit().remove(), A.maxExtent = L, A;
      }
      Q.exports = function(p, c, a, y) {
        var f = c.xaxis, _ = c.yaxis, b = p._fullLayout._clips;
        n.makeTraceGroups(y, a, "trace").each(function(w) {
          var T = m.select(this), L = w[0], A = L.trace, I = A.aaxis, P = A.baxis, S = n.ensureSingle(T, "g", "minorlayer"), E = n.ensureSingle(T, "g", "majorlayer"), R = n.ensureSingle(T, "g", "boundarylayer"), z = n.ensureSingle(T, "g", "labellayer");
          T.style("opacity", A.opacity), u(f, _, E, I, "a", I._gridlines), u(f, _, E, P, "b", P._gridlines), u(f, _, S, I, "a", I._minorgridlines), u(f, _, S, P, "b", P._minorgridlines), u(f, _, R, I, "a-boundary", I._boundarylines), u(f, _, R, P, "b-boundary", P._boundarylines);
          var j = o(p, f, _, A, L, z, I._labels, "a-label"), H = o(p, f, _, A, L, z, P._labels, "b-label");
          (function(Y, J, W, Z, re, V, B, U) {
            var ee, N, K, X, te = n.aggNums(Math.min, null, W.a), ie = n.aggNums(Math.max, null, W.a), le = n.aggNums(Math.min, null, W.b), oe = n.aggNums(Math.max, null, W.b);
            ee = 0.5 * (te + ie), N = le, K = W.ab2xy(ee, N, !0), X = W.dxyda_rough(ee, N), B.angle === void 0 && n.extendFlat(B, e(W, re, V, K, W.dxydb_rough(ee, N))), i(Y, J, W, Z, K, X, W.aaxis, re, V, B, "a-title"), ee = te, N = 0.5 * (le + oe), K = W.ab2xy(ee, N, !0), X = W.dxydb_rough(ee, N), U.angle === void 0 && n.extendFlat(U, e(W, re, V, K, W.dxyda_rough(ee, N))), i(Y, J, W, Z, K, X, W.baxis, re, V, U, "b-title");
          })(p, z, A, L, f, _, j, H), function(Y, J, W, Z, re) {
            var V, B, U, ee, N = W.select("#" + Y._clipPathId);
            N.size() || (N = W.append("clipPath").classed("carpetclip", !0));
            var K = n.ensureSingle(N, "path", "carpetboundary"), X = J.clipsegments, te = [];
            for (ee = 0; ee < X.length; ee++)
              V = X[ee], B = k([], V.x, Z.c2p), U = k([], V.y, re.c2p), te.push(x(B, U, V.bicubic));
            var ie = "M" + te.join("L") + "Z";
            N.attr("id", Y._clipPathId), K.attr("d", ie);
          }(A, L, b, f, _);
        });
      };
      var h = d.LINE_SPACING, l = (1 - d.MID_SHIFT) / h + 1;
      function i(p, c, a, y, f, _, b, w, T, L, A) {
        var I = [];
        b.title.text && I.push(b.title.text);
        var P = c.selectAll("text." + A).data(I), S = L.maxExtent;
        P.enter().append("text").classed(A, !0), P.each(function() {
          var E = e(a, w, T, f, _);
          ["start", "both"].indexOf(b.showticklabels) === -1 && (S = 0);
          var R = b.title.font.size;
          S += R + b.title.offset;
          var z = (L.angle + (L.flip < 0 ? 180 : 0) - E.angle + 450) % 360, j = z > 90 && z < 270, H = m.select(this);
          H.text(b.title.text).call(r.convertToTspans, p), j && (S = (-r.lineCount(H) + l) * h * R - S), H.attr("transform", t(E.p[0], E.p[1]) + s(E.angle) + t(0, S)).attr("text-anchor", "middle").call(g.font, b.title.font);
        }), P.exit().remove();
      }
    }, { "../../components/drawing": 389, "../../constants/alignment": 483, "../../lib": 515, "../../lib/svg_text_utils": 541, "./makepath": 718, "./map_1d_array": 719, "./orient_text": 720, "@plotly/d3": 58 }], 722: [function(v, Q, $) {
      var m = v("./constants"), g = v("../../lib/search").findBin, k = v("./compute_control_points"), x = v("./create_spline_evaluator"), e = v("./create_i_derivative_evaluator"), r = v("./create_j_derivative_evaluator");
      Q.exports = function(n) {
        var s = n._a, t = n._b, d = s.length, u = t.length, o = n.aaxis, h = n.baxis, l = s[0], i = s[d - 1], p = t[0], c = t[u - 1], a = s[s.length - 1] - s[0], y = t[t.length - 1] - t[0], f = a * m.RELATIVE_CULL_TOLERANCE, _ = y * m.RELATIVE_CULL_TOLERANCE;
        l -= f, i += f, p -= _, c += _, n.isVisible = function(b, w) {
          return b > l && b < i && w > p && w < c;
        }, n.isOccluded = function(b, w) {
          return b < l || b > i || w < p || w > c;
        }, n.setScale = function() {
          var b = n._x, w = n._y, T = k(n._xctrl, n._yctrl, b, w, o.smoothing, h.smoothing);
          n._xctrl = T[0], n._yctrl = T[1], n.evalxy = x([n._xctrl, n._yctrl], d, u, o.smoothing, h.smoothing), n.dxydi = e([n._xctrl, n._yctrl], o.smoothing, h.smoothing), n.dxydj = r([n._xctrl, n._yctrl], o.smoothing, h.smoothing);
        }, n.i2a = function(b) {
          var w = Math.max(0, Math.floor(b[0]), d - 2), T = b[0] - w;
          return (1 - T) * s[w] + T * s[w + 1];
        }, n.j2b = function(b) {
          var w = Math.max(0, Math.floor(b[1]), d - 2), T = b[1] - w;
          return (1 - T) * t[w] + T * t[w + 1];
        }, n.ij2ab = function(b) {
          return [n.i2a(b[0]), n.j2b(b[1])];
        }, n.a2i = function(b) {
          var w = Math.max(0, Math.min(g(b, s), d - 2)), T = s[w], L = s[w + 1];
          return Math.max(0, Math.min(d - 1, w + (b - T) / (L - T)));
        }, n.b2j = function(b) {
          var w = Math.max(0, Math.min(g(b, t), u - 2)), T = t[w], L = t[w + 1];
          return Math.max(0, Math.min(u - 1, w + (b - T) / (L - T)));
        }, n.ab2ij = function(b) {
          return [n.a2i(b[0]), n.b2j(b[1])];
        }, n.i2c = function(b, w) {
          return n.evalxy([], b, w);
        }, n.ab2xy = function(b, w, T) {
          if (!T && (b < s[0] || b > s[d - 1] | w < t[0] || w > t[u - 1]))
            return [!1, !1];
          var L = n.a2i(b), A = n.b2j(w), I = n.evalxy([], L, A);
          if (T) {
            var P, S, E, R, z = 0, j = 0, H = [];
            b < s[0] ? (P = 0, S = 0, z = (b - s[0]) / (s[1] - s[0])) : b > s[d - 1] ? (P = d - 2, S = 1, z = (b - s[d - 1]) / (s[d - 1] - s[d - 2])) : S = L - (P = Math.max(0, Math.min(d - 2, Math.floor(L)))), w < t[0] ? (E = 0, R = 0, j = (w - t[0]) / (t[1] - t[0])) : w > t[u - 1] ? (E = u - 2, R = 1, j = (w - t[u - 1]) / (t[u - 1] - t[u - 2])) : R = A - (E = Math.max(0, Math.min(u - 2, Math.floor(A)))), z && (n.dxydi(H, P, E, S, R), I[0] += H[0] * z, I[1] += H[1] * z), j && (n.dxydj(H, P, E, S, R), I[0] += H[0] * j, I[1] += H[1] * j);
          }
          return I;
        }, n.c2p = function(b, w, T) {
          return [w.c2p(b[0]), T.c2p(b[1])];
        }, n.p2x = function(b, w, T) {
          return [w.p2c(b[0]), T.p2c(b[1])];
        }, n.dadi = function(b) {
          var w = Math.max(0, Math.min(s.length - 2, b));
          return s[w + 1] - s[w];
        }, n.dbdj = function(b) {
          var w = Math.max(0, Math.min(t.length - 2, b));
          return t[w + 1] - t[w];
        }, n.dxyda = function(b, w, T, L) {
          var A = n.dxydi(null, b, w, T, L), I = n.dadi(b, T);
          return [A[0] / I, A[1] / I];
        }, n.dxydb = function(b, w, T, L) {
          var A = n.dxydj(null, b, w, T, L), I = n.dbdj(w, L);
          return [A[0] / I, A[1] / I];
        }, n.dxyda_rough = function(b, w, T) {
          var L = a * (T || 0.1), A = n.ab2xy(b + L, w, !0), I = n.ab2xy(b - L, w, !0);
          return [0.5 * (A[0] - I[0]) / L, 0.5 * (A[1] - I[1]) / L];
        }, n.dxydb_rough = function(b, w, T) {
          var L = y * (T || 0.1), A = n.ab2xy(b, w + L, !0), I = n.ab2xy(b, w - L, !0);
          return [0.5 * (A[0] - I[0]) / L, 0.5 * (A[1] - I[1]) / L];
        }, n.dpdx = function(b) {
          return b._m;
        }, n.dpdy = function(b) {
          return b._m;
        };
      };
    }, { "../../lib/search": 535, "./compute_control_points": 710, "./constants": 711, "./create_i_derivative_evaluator": 712, "./create_j_derivative_evaluator": 713, "./create_spline_evaluator": 714 }], 723: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k, x) {
        var e, r, n, s = [], t = [], d = g[0].length, u = g.length;
        function o(J, W) {
          var Z, re = 0, V = 0;
          return J > 0 && (Z = g[W][J - 1]) !== void 0 && (V++, re += Z), J < d - 1 && (Z = g[W][J + 1]) !== void 0 && (V++, re += Z), W > 0 && (Z = g[W - 1][J]) !== void 0 && (V++, re += Z), W < u - 1 && (Z = g[W + 1][J]) !== void 0 && (V++, re += Z), re / Math.max(1, V);
        }
        var h, l, i, p, c, a, y, f, _, b, w, T = 0;
        for (e = 0; e < d; e++)
          for (r = 0; r < u; r++)
            g[r][e] === void 0 && (s.push(e), t.push(r), g[r][e] = o(e, r)), T = Math.max(T, Math.abs(g[r][e]));
        if (!s.length)
          return g;
        var L = 0, A = 0, I = s.length;
        do {
          for (L = 0, n = 0; n < I; n++) {
            e = s[n], r = t[n];
            var P, S, E, R, z, j, H = 0, Y = 0;
            e === 0 ? (E = k[z = Math.min(d - 1, 2)], R = k[1], P = g[r][z], Y += (S = g[r][1]) + (S - P) * (k[0] - R) / (R - E), H++) : e === d - 1 && (E = k[z = Math.max(0, d - 3)], R = k[d - 2], P = g[r][z], Y += (S = g[r][d - 2]) + (S - P) * (k[d - 1] - R) / (R - E), H++), (e === 0 || e === d - 1) && r > 0 && r < u - 1 && (h = x[r + 1] - x[r], Y += ((l = x[r] - x[r - 1]) * g[r + 1][e] + h * g[r - 1][e]) / (l + h), H++), r === 0 ? (E = x[j = Math.min(u - 1, 2)], R = x[1], P = g[j][e], Y += (S = g[1][e]) + (S - P) * (x[0] - R) / (R - E), H++) : r === u - 1 && (E = x[j = Math.max(0, u - 3)], R = x[u - 2], P = g[j][e], Y += (S = g[u - 2][e]) + (S - P) * (x[u - 1] - R) / (R - E), H++), (r === 0 || r === u - 1) && e > 0 && e < d - 1 && (h = k[e + 1] - k[e], Y += ((l = k[e] - k[e - 1]) * g[r][e + 1] + h * g[r][e - 1]) / (l + h), H++), H ? Y /= H : (i = k[e + 1] - k[e], p = k[e] - k[e - 1], f = (c = x[r + 1] - x[r]) * (a = x[r] - x[r - 1]) * (c + a), Y = ((y = i * p * (i + p)) * (a * g[r + 1][e] + c * g[r - 1][e]) + f * (p * g[r][e + 1] + i * g[r][e - 1])) / (f * (p + i) + y * (a + c))), L += (b = (_ = Y - g[r][e]) / T) * b, w = H ? 0 : 0.85, g[r][e] += _ * (1 + w);
          }
          L = Math.sqrt(L);
        } while (A++ < 100 && L > 1e-5);
        return m.log("Smoother converged to", L, "after", A, "iterations"), g;
      };
    }, { "../../lib": 515 }], 724: [function(v, Q, $) {
      var m = v("../../lib").isArray1D;
      Q.exports = function(g, k, x) {
        var e = x("x"), r = e && e.length, n = x("y"), s = n && n.length;
        if (!r && !s)
          return !1;
        if (k._cheater = !e, r && !m(e) || s && !m(n))
          k._length = null;
        else {
          var t = r ? e.length : 1 / 0;
          s && (t = Math.min(t, n.length)), k.a && k.a.length && (t = Math.min(t, k.a.length)), k.b && k.b.length && (t = Math.min(t, k.b.length)), k._length = t;
        }
        return !0;
      };
    }, { "../../lib": 515 }], 725: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../scattergeo/attributes"), k = v("../../components/colorscale/attributes"), x = v("../../plots/attributes"), e = v("../../components/color/attributes").defaultLine, r = v("../../lib/extend").extendFlat, n = g.marker.line;
      Q.exports = r({ locations: { valType: "data_array", editType: "calc" }, locationmode: g.locationmode, z: { valType: "data_array", editType: "calc" }, geojson: r({}, g.geojson, {}), featureidkey: g.featureidkey, text: r({}, g.text, {}), hovertext: r({}, g.hovertext, {}), marker: { line: { color: r({}, n.color, { dflt: e }), width: r({}, n.width, { dflt: 1 }), editType: "calc" }, opacity: { valType: "number", arrayOk: !0, min: 0, max: 1, dflt: 1, editType: "style" }, editType: "calc" }, selected: { marker: { opacity: g.selected.marker.opacity, editType: "plot" }, editType: "plot" }, unselected: { marker: { opacity: g.unselected.marker.opacity, editType: "plot" }, editType: "plot" }, hoverinfo: r({}, x.hoverinfo, { editType: "calc", flags: ["location", "z", "text", "name"] }), hovertemplate: m(), showlegend: r({}, x.showlegend, { dflt: !1 }) }, k("", { cLetter: "z", editTypeOverride: "calc" }));
    }, { "../../components/color/attributes": 366, "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scattergeo/attributes": 978 }], 726: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../constants/numerical").BADNUM, k = v("../../components/colorscale/calc"), x = v("../scatter/arrays_to_calcdata"), e = v("../scatter/calc_selection");
      function r(n) {
        return n && typeof n == "string";
      }
      Q.exports = function(n, s) {
        var t, d = s._length, u = new Array(d);
        t = s.geojson ? function(p) {
          return r(p) || m(p);
        } : r;
        for (var o = 0; o < d; o++) {
          var h = u[o] = {}, l = s.locations[o], i = s.z[o];
          t(l) && m(i) ? (h.loc = l, h.z = i) : (h.loc = null, h.z = g), h.index = o;
        }
        return x(u, s), k(n, s, { vals: s.z, containerStr: "", cLetter: "z" }), e(u, s), u;
      };
    }, { "../../components/colorscale/calc": 375, "../../constants/numerical": 491, "../scatter/arrays_to_calcdata": 935, "../scatter/calc_selection": 938, "fast-isnumeric": 190 }], 727: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/defaults"), k = v("./attributes");
      Q.exports = function(x, e, r, n) {
        function s(h, l) {
          return m.coerce(x, e, k, h, l);
        }
        var t = s("locations"), d = s("z");
        if (t && t.length && m.isArrayOrTypedArray(d) && d.length) {
          e._length = Math.min(t.length, d.length);
          var u, o = s("geojson");
          (typeof o == "string" && o !== "" || m.isPlainObject(o)) && (u = "geojson-id"), s("locationmode", u) === "geojson-id" && s("featureidkey"), s("text"), s("hovertext"), s("hovertemplate"), s("marker.line.width") && s("marker.line.color"), s("marker.opacity"), g(x, e, n, s, { prefix: "", cLetter: "z" }), m.coerceSelectionMarkerOpacity(e, s);
        } else
          e.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "./attributes": 725 }], 728: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        m.location = g.location, m.z = g.z;
        var r = x[e];
        return r.fIn && r.fIn.properties && (m.properties = r.fIn.properties), m.ct = r.ct, m;
      };
    }, {}], 729: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("./attributes"), k = v("../../lib").fillText;
      Q.exports = function(x, e, r) {
        var n, s, t, d, u = x.cd, o = u[0].trace, h = x.subplot, l = [e, r], i = [e + 360, r];
        for (s = 0; s < u.length; s++)
          if (d = !1, (n = u[s])._polygons) {
            for (t = 0; t < n._polygons.length; t++)
              n._polygons[t].contains(l) && (d = !d), n._polygons[t].contains(i) && (d = !d);
            if (d)
              break;
          }
        if (d && n)
          return x.x0 = x.x1 = x.xa.c2p(n.ct), x.y0 = x.y1 = x.ya.c2p(n.ct), x.index = n.index, x.location = n.loc, x.z = n.z, x.zLabel = m.tickText(h.mockAxis, h.mockAxis.c2l(n.z), "hover").text, x.hovertemplate = n.hovertemplate, function(p, c, a) {
            if (!c.hovertemplate) {
              var y = a.hi || c.hoverinfo, f = String(a.loc), _ = y === "all" ? g.hoverinfo.flags : y.split("+"), b = _.indexOf("name") !== -1, w = _.indexOf("location") !== -1, T = _.indexOf("z") !== -1, L = _.indexOf("text") !== -1, A = [];
              !b && w ? p.nameOverride = f : (b && (p.nameOverride = c.name), w && A.push(f)), T && A.push(p.zLabel), L && k(a, c, A), p.extraText = A.join("<br>");
            }
          }(x, o, n), [x];
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "./attributes": 725 }], 730: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../heatmap/colorbar"), calc: v("./calc"), calcGeoJSON: v("./plot").calcGeoJSON, plot: v("./plot").plot, style: v("./style").style, styleOnSelect: v("./style").styleOnSelect, hoverPoints: v("./hover"), eventData: v("./event_data"), selectPoints: v("./select"), moduleType: "trace", name: "choropleth", basePlotModule: v("../../plots/geo"), categories: ["geo", "noOpacity", "showLegend"], meta: {} };
    }, { "../../plots/geo": 598, "../heatmap/colorbar": 804, "./attributes": 725, "./calc": 726, "./defaults": 727, "./event_data": 728, "./hover": 729, "./plot": 731, "./select": 732, "./style": 733 }], 731: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../lib/geo_location_utils"), x = v("../../lib/topojson_utils").getTopojsonFeatures, e = v("../../plots/cartesian/autorange").findExtremes, r = v("./style").style;
      Q.exports = { calcGeoJSON: function(n, s) {
        for (var t = n[0].trace, d = s[t.geo], u = d._subplot, o = t.locationmode, h = t._length, l = o === "geojson-id" ? k.extractTraceFeature(n) : x(t, u.topojson), i = [], p = [], c = 0; c < h; c++) {
          var a = n[c], y = o === "geojson-id" ? a.fOut : k.locationToFeature(o, a.loc, l);
          if (y) {
            a.geojson = y, a.ct = y.properties.ct, a._polygons = k.feature2polygons(y);
            var f = k.computeBbox(y);
            i.push(f[0], f[2]), p.push(f[1], f[3]);
          } else
            a.geojson = null;
        }
        if (d.fitbounds === "geojson" && o === "geojson-id") {
          var _ = k.computeBbox(k.getTraceGeojson(t));
          i = [_[0], _[2]], p = [_[1], _[3]];
        }
        var b = { padded: !0 };
        t._extremes.lon = e(d.lonaxis._ax, i, b), t._extremes.lat = e(d.lataxis._ax, p, b);
      }, plot: function(n, s, t) {
        var d = s.layers.backplot.select(".choroplethlayer");
        g.makeTraceGroups(d, t, "trace choropleth").each(function(u) {
          var o = m.select(this).selectAll("path.choroplethlocation").data(g.identity);
          o.enter().append("path").classed("choroplethlocation", !0), o.exit().remove(), r(n, u);
        });
      } };
    }, { "../../lib": 515, "../../lib/geo_location_utils": 508, "../../lib/topojson_utils": 544, "../../plots/cartesian/autorange": 565, "./style": 733, "@plotly/d3": 58 }], 732: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k, x, e, r, n, s = m.cd, t = m.xaxis, d = m.yaxis, u = [];
        if (g === !1)
          for (k = 0; k < s.length; k++)
            s[k].selected = 0;
        else
          for (k = 0; k < s.length; k++)
            (e = (x = s[k]).ct) && (r = t.c2p(e), n = d.c2p(e), g.contains([r, n], null, k, m) ? (u.push({ pointNumber: k, lon: e[0], lat: e[1] }), x.selected = 1) : x.selected = 0);
        return u;
      };
    }, {}], 733: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../../components/drawing"), x = v("../../components/colorscale");
      function e(r, n) {
        var s = n[0].trace, t = n[0].node3.selectAll(".choroplethlocation"), d = s.marker || {}, u = d.line || {}, o = x.makeColorScaleFuncFromTrace(s);
        t.each(function(h) {
          m.select(this).attr("fill", o(h.z)).call(g.stroke, h.mlc || u.color).call(k.dashLine, "", h.mlw || u.width || 0).style("opacity", d.opacity);
        }), k.selectedPointStyle(t, s);
      }
      Q.exports = { style: function(r, n) {
        n && e(r, n);
      }, styleOnSelect: function(r, n) {
        var s = n[0].node3, t = n[0].trace;
        t.selectedpoints ? k.selectedPointStyle(s.selectAll(".choroplethlocation"), t) : e(0, n);
      } };
    }, { "../../components/color": 367, "../../components/colorscale": 379, "../../components/drawing": 389, "@plotly/d3": 58 }], 734: [function(v, Q, $) {
      var m = v("../choropleth/attributes"), g = v("../../components/colorscale/attributes"), k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../../plots/attributes"), e = v("../../lib/extend").extendFlat;
      Q.exports = e({ locations: { valType: "data_array", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, geojson: { valType: "any", editType: "calc" }, featureidkey: e({}, m.featureidkey, {}), below: { valType: "string", editType: "plot" }, text: m.text, hovertext: m.hovertext, marker: { line: { color: e({}, m.marker.line.color, { editType: "plot" }), width: e({}, m.marker.line.width, { editType: "plot" }), editType: "calc" }, opacity: e({}, m.marker.opacity, { editType: "plot" }), editType: "calc" }, selected: { marker: { opacity: e({}, m.selected.marker.opacity, { editType: "plot" }), editType: "plot" }, editType: "plot" }, unselected: { marker: { opacity: e({}, m.unselected.marker.opacity, { editType: "plot" }), editType: "plot" }, editType: "plot" }, hoverinfo: m.hoverinfo, hovertemplate: k({}, { keys: ["properties"] }), showlegend: e({}, x.showlegend, { dflt: !1 }) }, g("", { cLetter: "z", editTypeOverride: "calc" }));
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../choropleth/attributes": 725 }], 735: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../components/colorscale"), x = v("../../components/drawing"), e = v("../../lib/geojson_utils").makeBlank, r = v("../../lib/geo_location_utils");
      function n(s) {
        var t, d = s[0].trace, u = d._opts;
        if (d.selectedpoints) {
          for (var o = x.makeSelectedPointStyleFns(d), h = 0; h < s.length; h++) {
            var l = s[h];
            l.fOut && (l.fOut.properties.mo2 = o.selectedOpacityFn(l));
          }
          t = { type: "identity", property: "mo2" };
        } else
          t = g.isArrayOrTypedArray(d.marker.opacity) ? { type: "identity", property: "mo" } : d.marker.opacity;
        return g.extendFlat(u.fill.paint, { "fill-opacity": t }), g.extendFlat(u.line.paint, { "line-opacity": t }), u;
      }
      Q.exports = { convert: function(s) {
        var t = s[0].trace, d = t.visible === !0 && t._length !== 0, u = { layout: { visibility: "none" }, paint: {} }, o = { layout: { visibility: "none" }, paint: {} }, h = t._opts = { fill: u, line: o, geojson: e() };
        if (!d)
          return h;
        var l = r.extractTraceFeature(s);
        if (!l)
          return h;
        var i, p, c, a = k.makeColorScaleFuncFromTrace(t), y = t.marker, f = y.line || {};
        g.isArrayOrTypedArray(y.opacity) && (i = function(A) {
          var I = A.mo;
          return m(I) ? +g.constrain(I, 0, 1) : 0;
        }), g.isArrayOrTypedArray(f.color) && (p = function(A) {
          return A.mlc;
        }), g.isArrayOrTypedArray(f.width) && (c = function(A) {
          return A.mlw;
        });
        for (var _ = 0; _ < s.length; _++) {
          var b = s[_], w = b.fOut;
          if (w) {
            var T = w.properties;
            T.fc = a(b.z), i && (T.mo = i(b)), p && (T.mlc = p(b)), c && (T.mlw = c(b)), b.ct = T.ct, b._polygons = r.feature2polygons(w);
          }
        }
        var L = i ? { type: "identity", property: "mo" } : y.opacity;
        return g.extendFlat(u.paint, { "fill-color": { type: "identity", property: "fc" }, "fill-opacity": L }), g.extendFlat(o.paint, { "line-color": p ? { type: "identity", property: "mlc" } : f.color, "line-width": c ? { type: "identity", property: "mlw" } : f.width, "line-opacity": L }), u.layout.visibility = "visible", o.layout.visibility = "visible", h.geojson = { type: "FeatureCollection", features: l }, n(s), h;
      }, convertOnSelect: n };
    }, { "../../components/colorscale": 379, "../../components/drawing": 389, "../../lib": 515, "../../lib/geo_location_utils": 508, "../../lib/geojson_utils": 509, "fast-isnumeric": 190 }], 736: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/defaults"), k = v("./attributes");
      Q.exports = function(x, e, r, n) {
        function s(o, h) {
          return m.coerce(x, e, k, o, h);
        }
        var t = s("locations"), d = s("z"), u = s("geojson");
        m.isArrayOrTypedArray(t) && t.length && m.isArrayOrTypedArray(d) && d.length && (typeof u == "string" && u !== "" || m.isPlainObject(u)) ? (s("featureidkey"), e._length = Math.min(t.length, d.length), s("below"), s("text"), s("hovertext"), s("hovertemplate"), s("marker.line.width") && s("marker.line.color"), s("marker.opacity"), g(x, e, n, s, { prefix: "", cLetter: "z" }), m.coerceSelectionMarkerOpacity(e, s)) : e.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "./attributes": 734 }], 737: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../heatmap/colorbar"), calc: v("../choropleth/calc"), plot: v("./plot"), hoverPoints: v("../choropleth/hover"), eventData: v("../choropleth/event_data"), selectPoints: v("../choropleth/select"), styleOnSelect: function(m, g) {
        g && g[0].trace._glTrace.updateOnSelect(g);
      }, getBelow: function(m, g) {
        for (var k = g.getMapLayers(), x = k.length - 2; x >= 0; x--) {
          var e = k[x].id;
          if (typeof e == "string" && e.indexOf("water") === 0) {
            for (var r = x + 1; r < k.length; r++)
              if (typeof (e = k[r].id) == "string" && e.indexOf("plotly-") === -1)
                return e;
          }
        }
      }, moduleType: "trace", name: "choroplethmapbox", basePlotModule: v("../../plots/mapbox"), categories: ["mapbox", "gl", "noOpacity", "showLegend"], meta: { hr_name: "choropleth_mapbox" } };
    }, { "../../plots/mapbox": 622, "../choropleth/calc": 726, "../choropleth/event_data": 728, "../choropleth/hover": 729, "../choropleth/select": 732, "../heatmap/colorbar": 804, "./attributes": 734, "./defaults": 736, "./plot": 738 }], 738: [function(v, Q, $) {
      var m = v("./convert").convert, g = v("./convert").convertOnSelect, k = v("../../plots/mapbox/constants").traceLayerPrefix;
      function x(r, n) {
        this.type = "choroplethmapbox", this.subplot = r, this.uid = n, this.sourceId = "source-" + n, this.layerList = [["fill", k + n + "-fill"], ["line", k + n + "-line"]], this.below = null;
      }
      var e = x.prototype;
      e.update = function(r) {
        this._update(m(r)), r[0].trace._glTrace = this;
      }, e.updateOnSelect = function(r) {
        this._update(g(r));
      }, e._update = function(r) {
        var n = this.subplot, s = this.layerList, t = n.belowLookup["trace-" + this.uid];
        n.map.getSource(this.sourceId).setData(r.geojson), t !== this.below && (this._removeLayers(), this._addLayers(r, t), this.below = t);
        for (var d = 0; d < s.length; d++) {
          var u = s[d], o = u[0], h = u[1], l = r[o];
          n.setOptions(h, "setLayoutProperty", l.layout), l.layout.visibility === "visible" && n.setOptions(h, "setPaintProperty", l.paint);
        }
      }, e._addLayers = function(r, n) {
        for (var s = this.subplot, t = this.layerList, d = this.sourceId, u = 0; u < t.length; u++) {
          var o = t[u], h = o[0], l = r[h];
          s.addLayer({ type: h, id: o[1], source: d, layout: l.layout, paint: l.paint }, n);
        }
      }, e._removeLayers = function() {
        for (var r = this.subplot.map, n = this.layerList, s = n.length - 1; s >= 0; s--)
          r.removeLayer(n[s][1]);
      }, e.dispose = function() {
        var r = this.subplot.map;
        this._removeLayers(), r.removeSource(this.sourceId);
      }, Q.exports = function(r, n) {
        var s = n[0].trace, t = new x(r, s.uid), d = t.sourceId, u = m(n), o = t.below = r.belowLookup["trace-" + s.uid];
        return r.map.addSource(d, { type: "geojson", data: u.geojson }), t._addLayers(u, o), n[0].trace._glTrace = t, t;
      };
    }, { "../../plots/mapbox/constants": 620, "./convert": 735 }], 739: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../mesh3d/attributes"), e = v("../../plots/attributes"), r = v("../../lib/extend").extendFlat, n = { x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, z: { valType: "data_array", editType: "calc+clearAxisTypes" }, u: { valType: "data_array", editType: "calc" }, v: { valType: "data_array", editType: "calc" }, w: { valType: "data_array", editType: "calc" }, sizemode: { valType: "enumerated", values: ["scaled", "absolute"], editType: "calc", dflt: "scaled" }, sizeref: { valType: "number", editType: "calc", min: 0 }, anchor: { valType: "enumerated", editType: "calc", values: ["tip", "tail", "cm", "center"], dflt: "cm" }, text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertemplate: k({ editType: "calc" }, { keys: ["norm"] }), uhoverformat: g("u", 1), vhoverformat: g("v", 1), whoverformat: g("w", 1), xhoverformat: g("x"), yhoverformat: g("y"), zhoverformat: g("z"), showlegend: r({}, e.showlegend, { dflt: !1 }) };
      r(n, m("", { colorAttr: "u/v/w norm", showScaleDflt: !0, editTypeOverride: "calc" })), ["opacity", "lightposition", "lighting"].forEach(function(s) {
        n[s] = x[s];
      }), n.hoverinfo = r({}, e.hoverinfo, { editType: "calc", flags: ["x", "y", "z", "u", "v", "w", "norm", "text", "name"], dflt: "x+y+z+norm+text+name" }), n.transforms = void 0, Q.exports = n;
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../mesh3d/attributes": 876 }], 740: [function(v, Q, $) {
      var m = v("../../components/colorscale/calc");
      Q.exports = function(g, k) {
        for (var x = k.u, e = k.v, r = k.w, n = Math.min(k.x.length, k.y.length, k.z.length, x.length, e.length, r.length), s = -1 / 0, t = 1 / 0, d = 0; d < n; d++) {
          var u = x[d], o = e[d], h = r[d], l = Math.sqrt(u * u + o * o + h * h);
          s = Math.max(s, l), t = Math.min(t, l);
        }
        k._len = n, k._normMax = s, m(g, k, { vals: [t, s], containerStr: "", cLetter: "c" });
      };
    }, { "../../components/colorscale/calc": 375 }], 741: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_cone3d, g = v("../../../stackgl_modules").gl_cone3d.createConeMesh, k = v("../../lib").simpleMap, x = v("../../lib/gl_format_color").parseColorScale, e = v("../../components/colorscale").extractOpts, r = v("../../plots/gl3d/zip3");
      function n(h, l) {
        this.scene = h, this.uid = l, this.mesh = null, this.data = null;
      }
      var s = n.prototype;
      s.handlePick = function(h) {
        if (h.object === this.mesh) {
          var l = h.index = h.data.index, i = this.data.x[l], p = this.data.y[l], c = this.data.z[l], a = this.data.u[l], y = this.data.v[l], f = this.data.w[l];
          h.traceCoordinate = [i, p, c, a, y, f, Math.sqrt(a * a + y * y + f * f)];
          var _ = this.data.hovertext || this.data.text;
          return Array.isArray(_) && _[l] !== void 0 ? h.textLabel = _[l] : _ && (h.textLabel = _), !0;
        }
      };
      var t = { xaxis: 0, yaxis: 1, zaxis: 2 }, d = { tip: 1, tail: 0, cm: 0.25, center: 0.5 }, u = { tip: 1, tail: 1, cm: 0.75, center: 0.5 };
      function o(h, l) {
        var i = h.fullSceneLayout, p = h.dataScale, c = {};
        function a(b, w) {
          var T = i[w], L = p[t[w]];
          return k(b, function(A) {
            return T.d2l(A) * L;
          });
        }
        c.vectors = r(a(l.u, "xaxis"), a(l.v, "yaxis"), a(l.w, "zaxis"), l._len), c.positions = r(a(l.x, "xaxis"), a(l.y, "yaxis"), a(l.z, "zaxis"), l._len);
        var y = e(l);
        c.colormap = x(l), c.vertexIntensityBounds = [y.min / l._normMax, y.max / l._normMax], c.coneOffset = d[l.anchor], l.sizemode === "scaled" ? c.coneSize = l.sizeref || 0.5 : c.coneSize = l.sizeref && l._normMax ? l.sizeref / l._normMax : 0.5;
        var f = m(c), _ = l.lightposition;
        return f.lightPosition = [_.x, _.y, _.z], f.ambient = l.lighting.ambient, f.diffuse = l.lighting.diffuse, f.specular = l.lighting.specular, f.roughness = l.lighting.roughness, f.fresnel = l.lighting.fresnel, f.opacity = l.opacity, l._pad = u[l.anchor] * f.vectorScale * f.coneScale * l._normMax, f;
      }
      s.update = function(h) {
        this.data = h;
        var l = o(this.scene, h);
        this.mesh.update(l);
      }, s.dispose = function() {
        this.scene.glplot.remove(this.mesh), this.mesh.dispose();
      }, Q.exports = function(h, l) {
        var i = h.glplot.gl, p = o(h, l), c = g(i, p), a = new n(h, l.uid);
        return a.mesh = c, a.data = l, c._trace = a, h.glplot.add(c), a;
      };
    }, { "../../../stackgl_modules": 1133, "../../components/colorscale": 379, "../../lib": 515, "../../lib/gl_format_color": 511, "../../plots/gl3d/zip3": 618 }], 742: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/defaults"), k = v("./attributes");
      Q.exports = function(x, e, r, n) {
        function s(i, p) {
          return m.coerce(x, e, k, i, p);
        }
        var t = s("u"), d = s("v"), u = s("w"), o = s("x"), h = s("y"), l = s("z");
        t && t.length && d && d.length && u && u.length && o && o.length && h && h.length && l && l.length ? (s("sizeref"), s("sizemode"), s("anchor"), s("lighting.ambient"), s("lighting.diffuse"), s("lighting.specular"), s("lighting.roughness"), s("lighting.fresnel"), s("lightposition.x"), s("lightposition.y"), s("lightposition.z"), g(x, e, n, s, { prefix: "", cLetter: "c" }), s("text"), s("hovertext"), s("hovertemplate"), s("uhoverformat"), s("vhoverformat"), s("whoverformat"), s("xhoverformat"), s("yhoverformat"), s("zhoverformat"), e._length = null) : e.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "./attributes": 739 }], 743: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "cone", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "showLegend"], attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: { min: "cmin", max: "cmax" }, calc: v("./calc"), plot: v("./convert"), eventData: function(m, g) {
        return m.norm = g.traceCoordinate[6], m;
      }, meta: {} };
    }, { "../../plots/gl3d": 607, "./attributes": 739, "./calc": 740, "./convert": 741, "./defaults": 742 }], 744: [function(v, Q, $) {
      var m = v("../heatmap/attributes"), g = v("../scatter/attributes"), k = v("../../plots/cartesian/axis_format_attributes"), x = k.axisHoverFormat, e = k.descriptionOnlyNumbers, r = v("../../components/colorscale/attributes"), n = v("../../components/drawing/attributes").dash, s = v("../../plots/font_attributes"), t = v("../../lib/extend").extendFlat, d = v("../../constants/filter_ops"), u = d.COMPARISON_OPS2, o = d.INTERVAL_OPS, h = g.line;
      Q.exports = t({ z: m.z, x: m.x, x0: m.x0, dx: m.dx, y: m.y, y0: m.y0, dy: m.dy, xperiod: m.xperiod, yperiod: m.yperiod, xperiod0: g.xperiod0, yperiod0: g.yperiod0, xperiodalignment: m.xperiodalignment, yperiodalignment: m.yperiodalignment, text: m.text, hovertext: m.hovertext, transpose: m.transpose, xtype: m.xtype, ytype: m.ytype, xhoverformat: x("x"), yhoverformat: x("y"), zhoverformat: x("z", 1), hovertemplate: m.hovertemplate, texttemplate: t({}, m.texttemplate, {}), textfont: t({}, m.textfont, {}), hoverongaps: m.hoverongaps, connectgaps: t({}, m.connectgaps, {}), fillcolor: { valType: "color", editType: "calc" }, autocontour: { valType: "boolean", dflt: !0, editType: "calc", impliedEdits: { "contours.start": void 0, "contours.end": void 0, "contours.size": void 0 } }, ncontours: { valType: "integer", dflt: 15, min: 1, editType: "calc" }, contours: { type: { valType: "enumerated", values: ["levels", "constraint"], dflt: "levels", editType: "calc" }, start: { valType: "number", dflt: null, editType: "plot", impliedEdits: { "^autocontour": !1 } }, end: { valType: "number", dflt: null, editType: "plot", impliedEdits: { "^autocontour": !1 } }, size: { valType: "number", dflt: null, min: 0, editType: "plot", impliedEdits: { "^autocontour": !1 } }, coloring: { valType: "enumerated", values: ["fill", "heatmap", "lines", "none"], dflt: "fill", editType: "calc" }, showlines: { valType: "boolean", dflt: !0, editType: "plot" }, showlabels: { valType: "boolean", dflt: !1, editType: "plot" }, labelfont: s({ editType: "plot", colorEditType: "style" }), labelformat: { valType: "string", dflt: "", editType: "plot", description: e("contour label") }, operation: { valType: "enumerated", values: [].concat(u).concat(o), dflt: "=", editType: "calc" }, value: { valType: "any", dflt: 0, editType: "calc" }, editType: "calc", impliedEdits: { autocontour: !1 } }, line: { color: t({}, h.color, { editType: "style+colorbars" }), width: { valType: "number", min: 0, editType: "style+colorbars" }, dash: n, smoothing: t({}, h.smoothing, {}), editType: "plot" } }, r("", { cLetter: "z", autoColorDflt: !1, editTypeOverride: "calc" }));
    }, { "../../components/colorscale/attributes": 374, "../../components/drawing/attributes": 388, "../../constants/filter_ops": 487, "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/font_attributes": 594, "../heatmap/attributes": 801, "../scatter/attributes": 936 }], 745: [function(v, Q, $) {
      var m = v("../../components/colorscale"), g = v("../heatmap/calc"), k = v("./set_contours"), x = v("./end_plus");
      Q.exports = function(e, r) {
        var n = g(e, r), s = n[0].z;
        k(r, s);
        var t, d = r.contours, u = m.extractOpts(r);
        if (d.coloring === "heatmap" && u.auto && r.autocontour === !1) {
          var o = d.start, h = x(d), l = d.size || 1, i = Math.floor((h - o) / l) + 1;
          isFinite(l) || (l = 1, i = 1);
          var p = o - l / 2;
          t = [p, p + i * l];
        } else
          t = s;
        return m.calc(e, r, { vals: t, cLetter: "z" }), n;
      };
    }, { "../../components/colorscale": 379, "../heatmap/calc": 802, "./end_plus": 755, "./set_contours": 763 }], 746: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k, x = m[0], e = x.z;
        switch (g.type) {
          case "levels":
            var r = Math.min(e[0][0], e[0][1]);
            for (k = 0; k < m.length; k++) {
              var n = m[k];
              n.prefixBoundary = !n.edgepaths.length && (r > n.level || n.starts.length && r === n.level);
            }
            break;
          case "constraint":
            if (x.prefixBoundary = !1, x.edgepaths.length)
              return;
            var s = x.x.length, t = x.y.length, d = -1 / 0, u = 1 / 0;
            for (k = 0; k < t; k++)
              u = Math.min(u, e[k][0]), u = Math.min(u, e[k][s - 1]), d = Math.max(d, e[k][0]), d = Math.max(d, e[k][s - 1]);
            for (k = 1; k < s - 1; k++)
              u = Math.min(u, e[0][k]), u = Math.min(u, e[t - 1][k]), d = Math.max(d, e[0][k]), d = Math.max(d, e[t - 1][k]);
            var o, h, l = g.value;
            switch (g._operation) {
              case ">":
                l > d && (x.prefixBoundary = !0);
                break;
              case "<":
                (l < u || x.starts.length && l === u) && (x.prefixBoundary = !0);
                break;
              case "[]":
                o = Math.min(l[0], l[1]), ((h = Math.max(l[0], l[1])) < u || o > d || x.starts.length && h === u) && (x.prefixBoundary = !0);
                break;
              case "][":
                o = Math.min(l[0], l[1]), h = Math.max(l[0], l[1]), o < u && h > d && (x.prefixBoundary = !0);
            }
        }
      };
    }, {}], 747: [function(v, Q, $) {
      var m = v("../../components/colorscale"), g = v("./make_color_map"), k = v("./end_plus");
      Q.exports = { min: "zmin", max: "zmax", calc: function(x, e, r) {
        var n = e.contours, s = e.line, t = n.size || 1, d = n.coloring, u = g(e, { isColorbar: !0 });
        if (d === "heatmap") {
          var o = m.extractOpts(e);
          r._fillgradient = o.reversescale ? m.flipScale(o.colorscale) : o.colorscale, r._zrange = [o.min, o.max];
        } else
          d === "fill" && (r._fillcolor = u);
        r._line = { color: d === "lines" ? u : s.color, width: n.showlines !== !1 ? s.width : 0, dash: s.dash }, r._levels = { start: n.start, end: k(n), size: t };
      } };
    }, { "../../components/colorscale": 379, "./end_plus": 755, "./make_color_map": 760 }], 748: [function(v, Q, $) {
      Q.exports = { BOTTOMSTART: [1, 9, 13, 104, 713], TOPSTART: [4, 6, 7, 104, 713], LEFTSTART: [8, 12, 14, 208, 1114], RIGHTSTART: [2, 3, 11, 208, 1114], NEWDELTA: [null, [-1, 0], [0, -1], [-1, 0], [1, 0], null, [0, -1], [-1, 0], [0, 1], [0, 1], null, [0, 1], [1, 0], [1, 0], [0, -1]], CHOOSESADDLE: { 104: [4, 1], 208: [2, 8], 713: [7, 13], 1114: [11, 14] }, SADDLEREMAINDER: { 1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11 }, LABELDISTANCE: 2, LABELINCREASE: 10, LABELMIN: 3, LABELMAX: 10, LABELOPTIMIZER: { EDGECOST: 1, ANGLECOST: 1, NEIGHBORCOST: 5, SAMELEVELFACTOR: 10, SAMELEVELDISTANCE: 5, MAXCOST: 100, INITIALSEARCHPOINTS: 10, ITERATIONS: 5 } };
    }, {}], 749: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("./label_defaults"), k = v("../../components/color"), x = k.addOpacity, e = k.opacity, r = v("../../constants/filter_ops"), n = r.CONSTRAINT_REDUCTION, s = r.COMPARISON_OPS2;
      Q.exports = function(t, d, u, o, h, l) {
        var i, p, c, a = d.contours, y = u("contours.operation");
        a._operation = n[y], function(f, _) {
          var b;
          s.indexOf(_.operation) === -1 ? (f("contours.value", [0, 1]), Array.isArray(_.value) ? _.value.length > 2 ? _.value = _.value.slice(2) : _.length === 0 ? _.value = [0, 1] : _.length < 2 ? (b = parseFloat(_.value[0]), _.value = [b, b + 1]) : _.value = [parseFloat(_.value[0]), parseFloat(_.value[1])] : m(_.value) && (b = parseFloat(_.value), _.value = [b, b + 1])) : (f("contours.value", 0), m(_.value) || (Array.isArray(_.value) ? _.value = parseFloat(_.value[0]) : _.value = 0));
        }(u, a), y === "=" ? i = a.showlines = !0 : (i = u("contours.showlines"), c = u("fillcolor", x((t.line || {}).color || h, 0.5))), i && (p = u("line.color", c && e(c) ? x(d.fillcolor, 1) : h), u("line.width", 2), u("line.dash")), u("line.smoothing"), g(u, o, p, l);
      };
    }, { "../../components/color": 367, "../../constants/filter_ops": 487, "./label_defaults": 759, "fast-isnumeric": 190 }], 750: [function(v, Q, $) {
      var m = v("../../constants/filter_ops"), g = v("fast-isnumeric");
      function k(r, n) {
        var s, t = Array.isArray(n);
        function d(u) {
          return g(u) ? +u : null;
        }
        return m.COMPARISON_OPS2.indexOf(r) !== -1 ? s = d(t ? n[0] : n) : m.INTERVAL_OPS.indexOf(r) !== -1 ? s = t ? [d(n[0]), d(n[1])] : [d(n), d(n)] : m.SET_OPS.indexOf(r) !== -1 && (s = t ? n.map(d) : [d(n)]), s;
      }
      function x(r) {
        return function(n) {
          n = k(r, n);
          var s = Math.min(n[0], n[1]), t = Math.max(n[0], n[1]);
          return { start: s, end: t, size: t - s };
        };
      }
      function e(r) {
        return function(n) {
          return { start: n = k(r, n), end: 1 / 0, size: 1 / 0 };
        };
      }
      Q.exports = { "[]": x("[]"), "][": x("]["), ">": e(">"), "<": e("<"), "=": e("=") };
    }, { "../../constants/filter_ops": 487, "fast-isnumeric": 190 }], 751: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e = x("contours.start"), r = x("contours.end"), n = e === !1 || r === !1, s = k("contours.size");
        !(n ? g.autocontour = !0 : k("autocontour", !1)) && s || k("ncontours");
      };
    }, {}], 752: [function(v, Q, $) {
      var m = v("../../lib");
      function g(k) {
        return m.extendFlat({}, k, { edgepaths: m.extendDeep([], k.edgepaths), paths: m.extendDeep([], k.paths), starts: m.extendDeep([], k.starts) });
      }
      Q.exports = function(k, x) {
        var e, r, n, s = function(u) {
          return u.reverse();
        }, t = function(u) {
          return u;
        };
        switch (x) {
          case "=":
          case "<":
            return k;
          case ">":
            for (k.length !== 1 && m.warn("Contour data invalid for the specified inequality operation."), r = k[0], e = 0; e < r.edgepaths.length; e++)
              r.edgepaths[e] = s(r.edgepaths[e]);
            for (e = 0; e < r.paths.length; e++)
              r.paths[e] = s(r.paths[e]);
            for (e = 0; e < r.starts.length; e++)
              r.starts[e] = s(r.starts[e]);
            return k;
          case "][":
            var d = s;
            s = t, t = d;
          case "[]":
            for (k.length !== 2 && m.warn("Contour data invalid for the specified inequality range operation."), r = g(k[0]), n = g(k[1]), e = 0; e < r.edgepaths.length; e++)
              r.edgepaths[e] = s(r.edgepaths[e]);
            for (e = 0; e < r.paths.length; e++)
              r.paths[e] = s(r.paths[e]);
            for (e = 0; e < r.starts.length; e++)
              r.starts[e] = s(r.starts[e]);
            for (; n.edgepaths.length; )
              r.edgepaths.push(t(n.edgepaths.shift()));
            for (; n.paths.length; )
              r.paths.push(t(n.paths.shift()));
            for (; n.starts.length; )
              r.starts.push(t(n.starts.shift()));
            return [r];
        }
      };
    }, { "../../lib": 515 }], 753: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../heatmap/xyz_defaults"), k = v("../scatter/period_defaults"), x = v("./constraint_defaults"), e = v("./contours_defaults"), r = v("./style_defaults"), n = v("../heatmap/label_defaults"), s = v("./attributes");
      Q.exports = function(t, d, u, o) {
        function h(i, p) {
          return m.coerce(t, d, s, i, p);
        }
        if (g(t, d, h, o)) {
          k(t, d, o, h), h("xhoverformat"), h("yhoverformat"), h("text"), h("hovertext"), h("hoverongaps"), h("hovertemplate");
          var l = h("contours.type") === "constraint";
          h("connectgaps", m.isArray1D(d.z)), l ? x(t, d, h, o, u) : (e(t, d, h, function(i) {
            return m.coerce2(t, d, s, i);
          }), r(t, d, h, o)), d.contours && d.contours.coloring === "heatmap" && n(h, o);
        } else
          d.visible = !1;
      };
    }, { "../../lib": 515, "../heatmap/label_defaults": 811, "../heatmap/xyz_defaults": 816, "../scatter/period_defaults": 956, "./attributes": 744, "./constraint_defaults": 749, "./contours_defaults": 751, "./style_defaults": 765 }], 754: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./constraint_mapping"), k = v("./end_plus");
      Q.exports = function(x, e, r) {
        for (var n = x.type === "constraint" ? g[x._operation](x.value) : x, s = n.size, t = [], d = k(n), u = r.trace._carpetTrace, o = u ? { xaxis: u.aaxis, yaxis: u.baxis, x: r.a, y: r.b } : { xaxis: e.xaxis, yaxis: e.yaxis, x: r.x, y: r.y }, h = n.start; h < d; h += s)
          if (t.push(m.extendFlat({ level: h, crossings: {}, starts: [], edgepaths: [], paths: [], z: r.z, smoothing: r.trace.line.smoothing }, o)), t.length > 1e3) {
            m.warn("Too many contours, clipping at 1000", x);
            break;
          }
        return t;
      };
    }, { "../../lib": 515, "./constraint_mapping": 750, "./end_plus": 755 }], 755: [function(v, Q, $) {
      Q.exports = function(m) {
        return m.end + m.size / 1e6;
      };
    }, {}], 756: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./constants");
      function k(r, n, s, t) {
        return Math.abs(r[0] - n[0]) < s && Math.abs(r[1] - n[1]) < t;
      }
      function x(r, n, s, t, d) {
        var u, o = n.join(","), h = r.crossings[o], l = function(K, X, te) {
          var ie = 0, le = 0;
          return K > 20 && X ? K === 208 || K === 1114 ? ie = te[0] === 0 ? 1 : -1 : le = te[1] === 0 ? 1 : -1 : g.BOTTOMSTART.indexOf(K) !== -1 ? le = 1 : g.LEFTSTART.indexOf(K) !== -1 ? ie = 1 : g.TOPSTART.indexOf(K) !== -1 ? le = -1 : ie = -1, [ie, le];
        }(h, s, n), i = [e(r, n, [-l[0], -l[1]])], p = r.z.length, c = r.z[0].length, a = n.slice(), y = l.slice();
        for (u = 0; u < 1e4; u++) {
          if (h > 20 ? (h = g.CHOOSESADDLE[h][(l[0] || l[1]) < 0 ? 0 : 1], r.crossings[o] = g.SADDLEREMAINDER[h]) : delete r.crossings[o], !(l = g.NEWDELTA[h])) {
            m.log("Found bad marching index:", h, n, r.level);
            break;
          }
          i.push(e(r, n, l)), n[0] += l[0], n[1] += l[1], o = n.join(","), k(i[i.length - 1], i[i.length - 2], t, d) && i.pop();
          var f = l[0] && (n[0] < 0 || n[0] > c - 2) || l[1] && (n[1] < 0 || n[1] > p - 2);
          if (n[0] === a[0] && n[1] === a[1] && l[0] === y[0] && l[1] === y[1] || s && f)
            break;
          h = r.crossings[o];
        }
        u === 1e4 && m.log("Infinite loop in contour?");
        var _, b, w, T, L, A, I, P, S, E, R, z, j, H, Y, J = k(i[0], i[i.length - 1], t, d), W = 0, Z = 0.2 * r.smoothing, re = [], V = 0;
        for (u = 1; u < i.length; u++)
          z = i[u], j = i[u - 1], H = void 0, Y = void 0, H = z[2] - j[2], Y = z[3] - j[3], W += I = Math.sqrt(H * H + Y * Y), re.push(I);
        var B = W / re.length * Z;
        function U(K) {
          return i[K % i.length];
        }
        for (u = i.length - 2; u >= V; u--)
          if ((_ = re[u]) < B) {
            for (w = 0, b = u - 1; b >= V && _ + re[b] < B; b--)
              _ += re[b];
            if (J && u === i.length - 2)
              for (w = 0; w < b && _ + re[w] < B; w++)
                _ += re[w];
            L = u - b + w + 1, A = Math.floor((u + b + w + 2) / 2), T = J || u !== i.length - 2 ? J || b !== -1 ? L % 2 ? U(A) : [(U(A)[0] + U(A + 1)[0]) / 2, (U(A)[1] + U(A + 1)[1]) / 2] : i[0] : i[i.length - 1], i.splice(b + 1, u - b + 1, T), u = b + 1, w && (V = w), J && (u === i.length - 2 ? i[w] = i[i.length - 1] : u === 0 && (i[i.length - 1] = i[0]));
          }
        for (i.splice(0, V), u = 0; u < i.length; u++)
          i[u].length = 2;
        if (!(i.length < 2))
          if (J)
            i.pop(), r.paths.push(i);
          else {
            s || m.log("Unclosed interior contour?", r.level, a.join(","), i.join("L"));
            var ee = !1;
            for (P = 0; P < r.edgepaths.length; P++)
              if (E = r.edgepaths[P], !ee && k(E[0], i[i.length - 1], t, d)) {
                i.pop(), ee = !0;
                var N = !1;
                for (S = 0; S < r.edgepaths.length; S++)
                  if (k((R = r.edgepaths[S])[R.length - 1], i[0], t, d)) {
                    N = !0, i.shift(), r.edgepaths.splice(P, 1), S === P ? r.paths.push(i.concat(R)) : (S > P && S--, r.edgepaths[S] = R.concat(i, E));
                    break;
                  }
                N || (r.edgepaths[P] = i.concat(E));
              }
            for (P = 0; P < r.edgepaths.length && !ee; P++)
              k((E = r.edgepaths[P])[E.length - 1], i[0], t, d) && (i.shift(), r.edgepaths[P] = E.concat(i), ee = !0);
            ee || r.edgepaths.push(i);
          }
      }
      function e(r, n, s) {
        var t = n[0] + Math.max(s[0], 0), d = n[1] + Math.max(s[1], 0), u = r.z[d][t], o = r.xaxis, h = r.yaxis;
        if (s[1]) {
          var l = (r.level - u) / (r.z[d][t + 1] - u), i = (l !== 1 ? (1 - l) * o.c2l(r.x[t]) : 0) + (l !== 0 ? l * o.c2l(r.x[t + 1]) : 0);
          return [o.c2p(o.l2c(i), !0), h.c2p(r.y[d], !0), t + l, d];
        }
        var p = (r.level - u) / (r.z[d + 1][t] - u), c = (p !== 1 ? (1 - p) * h.c2l(r.y[d]) : 0) + (p !== 0 ? p * h.c2l(r.y[d + 1]) : 0);
        return [o.c2p(r.x[t], !0), h.c2p(h.l2c(c), !0), t, d + p];
      }
      Q.exports = function(r, n, s) {
        var t, d, u, o;
        for (n = n || 0.01, s = s || 0.01, d = 0; d < r.length; d++) {
          for (u = r[d], o = 0; o < u.starts.length; o++)
            x(u, u.starts[o], "edge", n, s);
          for (t = 0; Object.keys(u.crossings).length && t < 1e4; )
            t++, x(u, Object.keys(u.crossings)[0].split(",").map(Number), void 0, n, s);
          t === 1e4 && m.log("Infinite loop in contour?");
        }
      };
    }, { "../../lib": 515, "./constants": 748 }], 757: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../heatmap/hover");
      Q.exports = function(k, x, e, r, n) {
        n || (n = {}), n.isContour = !0;
        var s = g(k, x, e, r, n);
        return s && s.forEach(function(t) {
          var d = t.trace;
          d.contours.type === "constraint" && (d.fillcolor && m.opacity(d.fillcolor) ? t.color = m.addOpacity(d.fillcolor, 1) : d.contours.showlines && m.opacity(d.line.color) && (t.color = m.addOpacity(d.line.color, 1)));
        }), s;
      };
    }, { "../../components/color": 367, "../heatmap/hover": 808 }], 758: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("./plot").plot, style: v("./style"), colorbar: v("./colorbar"), hoverPoints: v("./hover"), moduleType: "trace", name: "contour", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "2dMap", "contour", "showLegend"], meta: {} };
    }, { "../../plots/cartesian": 578, "./attributes": 744, "./calc": 745, "./colorbar": 747, "./defaults": 753, "./hover": 757, "./plot": 762, "./style": 764 }], 759: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k, x, e) {
        if (e || (e = {}), g("contours.showlabels")) {
          var r = k.font;
          m.coerceFont(g, "contours.labelfont", { family: r.family, size: r.size, color: x }), g("contours.labelformat");
        }
        e.hasHover !== !1 && g("zhoverformat");
      };
    }, { "../../lib": 515 }], 760: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/colorscale"), k = v("./end_plus");
      Q.exports = function(x) {
        var e = x.contours, r = e.start, n = k(e), s = e.size || 1, t = Math.floor((n - r) / s) + 1, d = e.coloring === "lines" ? 0 : 1, u = g.extractOpts(x);
        isFinite(s) || (s = 1, t = 1);
        var o, h, l = u.reversescale ? g.flipScale(u.colorscale) : u.colorscale, i = l.length, p = new Array(i), c = new Array(i);
        if (e.coloring === "heatmap") {
          var a = u.min, y = u.max;
          for (h = 0; h < i; h++)
            o = l[h], p[h] = o[0] * (y - a) + a, c[h] = o[1];
          var f = m.extent([a, y, e.start, e.start + s * (t - 1)]), _ = f[a < y ? 0 : 1], b = f[a < y ? 1 : 0];
          _ !== a && (p.splice(0, 0, _), c.splice(0, 0, c[0])), b !== y && (p.push(b), c.push(c[c.length - 1]));
        } else
          for (h = 0; h < i; h++)
            o = l[h], p[h] = (o[0] * (t + d - 1) - d / 2) * s + r, c[h] = o[1];
        return g.makeColorScaleFunc({ domain: p, range: c }, { noNumericCheck: !0 });
      };
    }, { "../../components/colorscale": 379, "./end_plus": 755, "@plotly/d3": 58 }], 761: [function(v, Q, $) {
      var m = v("./constants");
      function g(k, x) {
        var e = (x[0][0] > k ? 0 : 1) + (x[0][1] > k ? 0 : 2) + (x[1][1] > k ? 0 : 4) + (x[1][0] > k ? 0 : 8);
        return e === 5 || e === 10 ? k > (x[0][0] + x[0][1] + x[1][0] + x[1][1]) / 4 ? e === 5 ? 713 : 1114 : e === 5 ? 104 : 208 : e === 15 ? 0 : e;
      }
      Q.exports = function(k) {
        var x, e, r, n, s, t, d, u, o, h = k[0].z, l = h.length, i = h[0].length, p = l === 2 || i === 2;
        for (e = 0; e < l - 1; e++)
          for (n = [], e === 0 && (n = n.concat(m.BOTTOMSTART)), e === l - 2 && (n = n.concat(m.TOPSTART)), x = 0; x < i - 1; x++)
            for (r = n.slice(), x === 0 && (r = r.concat(m.LEFTSTART)), x === i - 2 && (r = r.concat(m.RIGHTSTART)), s = x + "," + e, t = [[h[e][x], h[e][x + 1]], [h[e + 1][x], h[e + 1][x + 1]]], o = 0; o < k.length; o++)
              (d = g((u = k[o]).level, t)) && (u.crossings[s] = d, r.indexOf(d) !== -1 && (u.starts.push([x, e]), p && r.indexOf(d, r.indexOf(d) + 1) !== -1 && u.starts.push([x, e])));
      };
    }, { "./constants": 748 }], 762: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../../components/colorscale"), e = v("../../lib/svg_text_utils"), r = v("../../plots/cartesian/axes"), n = v("../../plots/cartesian/set_convert"), s = v("../heatmap/plot"), t = v("./make_crossings"), d = v("./find_all_paths"), u = v("./empty_pathinfo"), o = v("./convert_to_constraints"), h = v("./close_boundaries"), l = v("./constants"), i = l.LABELOPTIMIZER;
      function p(y, f) {
        var _, b, w, T, L, A, I, P = "", S = 0, E = y.edgepaths.map(function(J, W) {
          return W;
        }), R = !0;
        function z(J) {
          return Math.abs(J[1] - f[2][1]) < 0.01;
        }
        function j(J) {
          return Math.abs(J[0] - f[0][0]) < 0.01;
        }
        function H(J) {
          return Math.abs(J[0] - f[2][0]) < 0.01;
        }
        for (; E.length; ) {
          for (A = k.smoothopen(y.edgepaths[S], y.smoothing), P += R ? A : A.replace(/^M/, "L"), E.splice(E.indexOf(S), 1), _ = y.edgepaths[S][y.edgepaths[S].length - 1], T = -1, w = 0; w < 4; w++) {
            if (!_) {
              g.log("Missing end?", S, y);
              break;
            }
            for (I = _, Math.abs(I[1] - f[0][1]) < 0.01 && !H(_) ? b = f[1] : j(_) ? b = f[0] : z(_) ? b = f[3] : H(_) && (b = f[2]), L = 0; L < y.edgepaths.length; L++) {
              var Y = y.edgepaths[L][0];
              Math.abs(_[0] - b[0]) < 0.01 ? Math.abs(_[0] - Y[0]) < 0.01 && (Y[1] - _[1]) * (b[1] - Y[1]) >= 0 && (b = Y, T = L) : Math.abs(_[1] - b[1]) < 0.01 ? Math.abs(_[1] - Y[1]) < 0.01 && (Y[0] - _[0]) * (b[0] - Y[0]) >= 0 && (b = Y, T = L) : g.log("endpt to newendpt is not vert. or horz.", _, b, Y);
            }
            if (_ = b, T >= 0)
              break;
            P += "L" + b;
          }
          if (T === y.edgepaths.length) {
            g.log("unclosed perimeter path");
            break;
          }
          S = T, (R = E.indexOf(S) === -1) && (S = E[0], P += "Z");
        }
        for (S = 0; S < y.paths.length; S++)
          P += k.smoothclosed(y.paths[S], y.smoothing);
        return P;
      }
      function c(y, f, _, b) {
        var w = f.width / 2, T = f.height / 2, L = y.x, A = y.y, I = y.theta, P = Math.cos(I) * w, S = Math.sin(I) * w, E = (L > b.center ? b.right - L : L - b.left) / (P + Math.abs(Math.sin(I) * T)), R = (A > b.middle ? b.bottom - A : A - b.top) / (Math.abs(S) + Math.cos(I) * T);
        if (E < 1 || R < 1)
          return 1 / 0;
        var z = i.EDGECOST * (1 / (E - 1) + 1 / (R - 1));
        z += i.ANGLECOST * I * I;
        for (var j = L - P, H = A - S, Y = L + P, J = A + S, W = 0; W < _.length; W++) {
          var Z = _[W], re = Math.cos(Z.theta) * Z.width / 2, V = Math.sin(Z.theta) * Z.width / 2, B = 2 * g.segmentDistance(j, H, Y, J, Z.x - re, Z.y - V, Z.x + re, Z.y + V) / (f.height + Z.height), U = Z.level === f.level, ee = U ? i.SAMELEVELDISTANCE : 1;
          if (B <= ee)
            return 1 / 0;
          z += i.NEIGHBORCOST * (U ? i.SAMELEVELFACTOR : 1) / (B - ee);
        }
        return z;
      }
      function a(y) {
        var f, _, b = y.trace._emptypoints, w = [], T = y.z.length, L = y.z[0].length, A = [];
        for (f = 0; f < L; f++)
          A.push(1);
        for (f = 0; f < T; f++)
          w.push(A.slice());
        for (f = 0; f < b.length; f++)
          w[(_ = b[f])[0]][_[1]] = 0;
        return y.zmask = w, w;
      }
      $.plot = function(y, f, _, b) {
        var w = f.xaxis, T = f.yaxis;
        g.makeTraceGroups(b, _, "contour").each(function(L) {
          var A = m.select(this), I = L[0], P = I.trace, S = I.x, E = I.y, R = P.contours, z = u(R, f, I), j = g.ensureSingle(A, "g", "heatmapcoloring"), H = [];
          R.coloring === "heatmap" && (H = [L]), s(y, f, H, j), t(z), d(z);
          var Y = w.c2p(S[0], !0), J = w.c2p(S[S.length - 1], !0), W = T.c2p(E[0], !0), Z = T.c2p(E[E.length - 1], !0), re = [[Y, Z], [J, Z], [J, W], [Y, W]], V = z;
          R.type === "constraint" && (V = o(z, R._operation)), function(B, U, ee) {
            var N = g.ensureSingle(B, "g", "contourbg").selectAll("path").data(ee.coloring === "fill" ? [0] : []);
            N.enter().append("path"), N.exit().remove(), N.attr("d", "M" + U.join("L") + "Z").style("stroke", "none");
          }(A, re, R), function(B, U, ee, N) {
            var K = N.coloring === "fill" || N.type === "constraint" && N._operation !== "=", X = "M" + ee.join("L") + "Z";
            K && h(U, N);
            var te = g.ensureSingle(B, "g", "contourfill").selectAll("path").data(K ? U : []);
            te.enter().append("path"), te.exit().remove(), te.each(function(ie) {
              var le = (ie.prefixBoundary ? X : "") + p(ie, ee);
              le ? m.select(this).attr("d", le).style("stroke", "none") : m.select(this).remove();
            });
          }(A, V, re, R), function(B, U, ee, N, K) {
            var X = g.ensureSingle(B, "g", "contourlines"), te = K.showlines !== !1, ie = K.showlabels, le = te && ie, oe = $.createLines(X, te || ie, U), ve = $.createLineClip(X, le, ee, N.trace.uid), ue = B.selectAll("g.contourlabels").data(ie ? [0] : []);
            if (ue.exit().remove(), ue.enter().append("g").classed("contourlabels", !0), ie) {
              var ye = [], Ae = [];
              g.clearLocationCache();
              var pe = $.labelFormatter(ee, N), ge = k.tester.append("text").attr("data-notex", 1).call(k.font, K.labelfont), we = U[0].xaxis, se = U[0].yaxis, de = we._length, Te = se._length, Ee = we.range, Me = se.range, ze = g.aggNums(Math.min, null, N.x), Ie = g.aggNums(Math.max, null, N.x), Oe = g.aggNums(Math.min, null, N.y), Ze = g.aggNums(Math.max, null, N.y), Fe = Math.max(we.c2p(ze, !0), 0), Pe = Math.min(we.c2p(Ie, !0), de), De = Math.max(se.c2p(Ze, !0), 0), Ge = Math.min(se.c2p(Oe, !0), Te), Qe = {};
              Ee[0] < Ee[1] ? (Qe.left = Fe, Qe.right = Pe) : (Qe.left = Pe, Qe.right = Fe), Me[0] < Me[1] ? (Qe.top = De, Qe.bottom = Ge) : (Qe.top = Ge, Qe.bottom = De), Qe.middle = (Qe.top + Qe.bottom) / 2, Qe.center = (Qe.left + Qe.right) / 2, ye.push([[Qe.left, Qe.top], [Qe.right, Qe.top], [Qe.right, Qe.bottom], [Qe.left, Qe.bottom]]);
              var ot = Math.sqrt(de * de + Te * Te), vt = l.LABELDISTANCE * ot / Math.max(1, U.length / l.LABELINCREASE);
              oe.each(function(bt) {
                var yt = $.calcTextOpts(bt.level, pe, ge, ee);
                m.select(this).selectAll("path").each(function() {
                  var tt = g.getVisibleSegment(this, Qe, yt.height / 2);
                  if (tt && !(tt.len < (yt.width + yt.height) * l.LABELMIN))
                    for (var Ke = Math.min(Math.ceil(tt.len / vt), l.LABELMAX), mt = 0; mt < Ke; mt++) {
                      var Ft = $.findBestTextLocation(this, tt, yt, Ae, Qe);
                      if (!Ft)
                        break;
                      $.addLabelData(Ft, yt, Ae, ye);
                    }
                });
              }), ge.remove(), $.drawLabels(ue, Ae, ee, ve, le ? ye : null);
            }
            ie && !te && oe.remove();
          }(A, z, y, I, R), function(B, U, ee, N, K) {
            var X = N.trace, te = ee._fullLayout._clips, ie = "clip" + X.uid, le = te.selectAll("#" + ie).data(X.connectgaps ? [] : [0]);
            if (le.enter().append("clipPath").classed("contourclip", !0).attr("id", ie), le.exit().remove(), X.connectgaps === !1) {
              var oe = { level: 0.9, crossings: {}, starts: [], edgepaths: [], paths: [], xaxis: U.xaxis, yaxis: U.yaxis, x: N.x, y: N.y, z: a(N), smoothing: 0 };
              t([oe]), d([oe]), h([oe], { type: "levels" }), g.ensureSingle(le, "path", "").attr("d", (oe.prefixBoundary ? "M" + K.join("L") + "Z" : "") + p(oe, K));
            } else
              ie = null;
            k.setClipUrl(B, ie, ee);
          }(A, f, y, I, re);
        });
      }, $.createLines = function(y, f, _) {
        var b = _[0].smoothing, w = y.selectAll("g.contourlevel").data(f ? _ : []);
        if (w.exit().remove(), w.enter().append("g").classed("contourlevel", !0), f) {
          var T = w.selectAll("path.openline").data(function(A) {
            return A.pedgepaths || A.edgepaths;
          });
          T.exit().remove(), T.enter().append("path").classed("openline", !0), T.attr("d", function(A) {
            return k.smoothopen(A, b);
          }).style("stroke-miterlimit", 1).style("vector-effect", "non-scaling-stroke");
          var L = w.selectAll("path.closedline").data(function(A) {
            return A.ppaths || A.paths;
          });
          L.exit().remove(), L.enter().append("path").classed("closedline", !0), L.attr("d", function(A) {
            return k.smoothclosed(A, b);
          }).style("stroke-miterlimit", 1).style("vector-effect", "non-scaling-stroke");
        }
        return w;
      }, $.createLineClip = function(y, f, _, b) {
        var w = f ? "clipline" + b : null, T = _._fullLayout._clips.selectAll("#" + w).data(f ? [0] : []);
        return T.exit().remove(), T.enter().append("clipPath").classed("contourlineclip", !0).attr("id", w), k.setClipUrl(y, w, _), T;
      }, $.labelFormatter = function(y, f) {
        var _ = y._fullLayout, b = f.trace, w = b.contours, T = { type: "linear", _id: "ycontour", showexponent: "all", exponentformat: "B" };
        if (w.labelformat)
          T.tickformat = w.labelformat, n(T, _);
        else {
          var L = x.extractOpts(b);
          if (L && L.colorbar && L.colorbar._axis)
            T = L.colorbar._axis;
          else {
            if (w.type === "constraint") {
              var A = w.value;
              Array.isArray(A) ? T.range = [A[0], A[A.length - 1]] : T.range = [A, A];
            } else
              T.range = [w.start, w.end], T.nticks = (w.end - w.start) / w.size;
            T.range[0] === T.range[1] && (T.range[1] += T.range[0] || 1), T.nticks || (T.nticks = 1e3), n(T, _), r.prepTicks(T), T._tmin = null, T._tmax = null;
          }
        }
        return function(I) {
          return r.tickText(T, I).text;
        };
      }, $.calcTextOpts = function(y, f, _, b) {
        var w = f(y);
        _.text(w).call(e.convertToTspans, b);
        var T = _.node(), L = k.bBox(T, !0);
        return { text: w, width: L.width, height: L.height, fontSize: +T.style["font-size"].replace("px", ""), level: y, dy: (L.top + L.bottom) / 2 };
      }, $.findBestTextLocation = function(y, f, _, b, w) {
        var T, L, A, I, P, S = _.width;
        f.isClosed ? (L = f.len / i.INITIALSEARCHPOINTS, T = f.min + L / 2, A = f.max) : (L = (f.len - S) / (i.INITIALSEARCHPOINTS + 1), T = f.min + L + S / 2, A = f.max - (L + S) / 2);
        for (var E = 1 / 0, R = 0; R < i.ITERATIONS; R++) {
          for (var z = T; z < A; z += L) {
            var j = g.getTextLocation(y, f.total, z, S), H = c(j, _, b, w);
            H < E && (E = H, P = j, I = z);
          }
          if (E > 2 * i.MAXCOST)
            break;
          R && (L /= 2), A = (T = I - L / 2) + 1.5 * L;
        }
        if (E <= i.MAXCOST)
          return P;
      }, $.addLabelData = function(y, f, _, b) {
        var w = f.fontSize, T = f.width + w / 3, L = Math.max(0, f.height - w / 3), A = y.x, I = y.y, P = y.theta, S = Math.sin(P), E = Math.cos(P), R = function(j, H) {
          return [A + j * E - H * S, I + j * S + H * E];
        }, z = [R(-T / 2, -L / 2), R(-T / 2, L / 2), R(T / 2, L / 2), R(T / 2, -L / 2)];
        _.push({ text: f.text, x: A, y: I, dy: f.dy, theta: P, level: f.level, width: T, height: L }), b.push(z);
      }, $.drawLabels = function(y, f, _, b, w) {
        var T = y.selectAll("text").data(f, function(I) {
          return I.text + "," + I.x + "," + I.y + "," + I.theta;
        });
        if (T.exit().remove(), T.enter().append("text").attr({ "data-notex": 1, "text-anchor": "middle" }).each(function(I) {
          var P = I.x + Math.sin(I.theta) * I.dy, S = I.y - Math.cos(I.theta) * I.dy;
          m.select(this).text(I.text).attr({ x: P, y: S, transform: "rotate(" + 180 * I.theta / Math.PI + " " + P + " " + S + ")" }).call(e.convertToTspans, _);
        }), w) {
          for (var L = "", A = 0; A < w.length; A++)
            L += "M" + w[A].join("L") + "Z";
          g.ensureSingle(b, "path", "").attr("d", L);
        }
      };
    }, { "../../components/colorscale": 379, "../../components/drawing": 389, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "../../plots/cartesian/set_convert": 585, "../heatmap/plot": 813, "./close_boundaries": 746, "./constants": 748, "./convert_to_constraints": 752, "./empty_pathinfo": 754, "./find_all_paths": 756, "./make_crossings": 761, "@plotly/d3": 58 }], 763: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib");
      function k(x, e, r) {
        var n = { type: "linear", range: [x, e] };
        return m.autoTicks(n, (e - x) / (r || 15)), n;
      }
      Q.exports = function(x, e) {
        var r = x.contours;
        if (x.autocontour) {
          var n = x.zmin, s = x.zmax;
          (x.zauto || n === void 0) && (n = g.aggNums(Math.min, null, e)), (x.zauto || s === void 0) && (s = g.aggNums(Math.max, null, e));
          var t = k(n, s, x.ncontours);
          r.size = t.dtick, r.start = m.tickFirst(t), t.range.reverse(), r.end = m.tickFirst(t), r.start === n && (r.start += r.size), r.end === s && (r.end -= r.size), r.start > r.end && (r.start = r.end = (r.start + r.end) / 2), x._input.contours || (x._input.contours = {}), g.extendFlat(x._input.contours, { start: r.start, end: r.end, size: r.size }), x._input.autocontour = !0;
        } else if (r.type !== "constraint") {
          var d, u = r.start, o = r.end, h = x._input.contours;
          u > o && (r.start = h.start = o, o = r.end = h.end = u, u = r.start), !(r.size > 0) && (d = u === o ? 1 : k(u, o, x.ncontours).dtick, h.size = r.size = d);
        }
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566 }], 764: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../heatmap/style"), x = v("./make_color_map");
      Q.exports = function(e) {
        var r = m.select(e).selectAll("g.contour");
        r.style("opacity", function(n) {
          return n[0].trace.opacity;
        }), r.each(function(n) {
          var s = m.select(this), t = n[0].trace, d = t.contours, u = t.line, o = d.size || 1, h = d.start, l = d.type === "constraint", i = !l && d.coloring === "lines", p = !l && d.coloring === "fill", c = i || p ? x(t) : null;
          s.selectAll("g.contourlevel").each(function(f) {
            m.select(this).selectAll("path").call(g.lineGroupStyle, u.width, i ? c(f.level) : u.color, u.dash);
          });
          var a = d.labelfont;
          if (s.selectAll("g.contourlabels text").each(function(f) {
            g.font(m.select(this), { family: a.family, size: a.size, color: a.color || (i ? c(f.level) : u.color) });
          }), l)
            s.selectAll("g.contourfill path").style("fill", t.fillcolor);
          else if (p) {
            var y;
            s.selectAll("g.contourfill path").style("fill", function(f) {
              return y === void 0 && (y = f.level), c(f.level + 0.5 * o);
            }), y === void 0 && (y = h), s.selectAll("g.contourbg path").style("fill", c(y - 0.5 * o));
          }
        }), k(e);
      };
    }, { "../../components/drawing": 389, "../heatmap/style": 814, "./make_color_map": 760, "@plotly/d3": 58 }], 765: [function(v, Q, $) {
      var m = v("../../components/colorscale/defaults"), g = v("./label_defaults");
      Q.exports = function(k, x, e, r, n) {
        var s, t = e("contours.coloring"), d = "";
        t === "fill" && (s = e("contours.showlines")), s !== !1 && (t !== "lines" && (d = e("line.color", "#000")), e("line.width", 0.5), e("line.dash")), t !== "none" && (k.showlegend !== !0 && (x.showlegend = !1), x._dfltShowLegend = !1, m(k, x, r, e, { prefix: "", cLetter: "z" })), e("line.smoothing"), g(e, r, d, n);
      };
    }, { "../../components/colorscale/defaults": 377, "./label_defaults": 759 }], 766: [function(v, Q, $) {
      var m = v("../heatmap/attributes"), g = v("../contour/attributes"), k = v("../../components/colorscale/attributes"), x = v("../../lib/extend").extendFlat, e = g.contours;
      Q.exports = x({ carpet: { valType: "string", editType: "calc" }, z: m.z, a: m.x, a0: m.x0, da: m.dx, b: m.y, b0: m.y0, db: m.dy, text: m.text, hovertext: m.hovertext, transpose: m.transpose, atype: m.xtype, btype: m.ytype, fillcolor: g.fillcolor, autocontour: g.autocontour, ncontours: g.ncontours, contours: { type: e.type, start: e.start, end: e.end, size: e.size, coloring: { valType: "enumerated", values: ["fill", "lines", "none"], dflt: "fill", editType: "calc" }, showlines: e.showlines, showlabels: e.showlabels, labelfont: e.labelfont, labelformat: e.labelformat, operation: e.operation, value: e.value, editType: "calc", impliedEdits: { autocontour: !1 } }, line: { color: g.line.color, width: g.line.width, dash: g.line.dash, smoothing: g.line.smoothing, editType: "plot" }, transforms: void 0 }, k("", { cLetter: "z", autoColorDflt: !1 }));
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../contour/attributes": 744, "../heatmap/attributes": 801 }], 767: [function(v, Q, $) {
      var m = v("../../components/colorscale/calc"), g = v("../../lib"), k = v("../heatmap/convert_column_xyz"), x = v("../heatmap/clean_2d_array"), e = v("../heatmap/interp2d"), r = v("../heatmap/find_empties"), n = v("../heatmap/make_bound_array"), s = v("./defaults"), t = v("../carpet/lookup_carpetid"), d = v("../contour/set_contours");
      Q.exports = function(u, o) {
        var h = o._carpetTrace = t(u, o);
        if (h && h.visible && h.visible !== "legendonly") {
          if (!o.a || !o.b) {
            var l = u.data[h.index], i = u.data[o.index];
            i.a || (i.a = l.a), i.b || (i.b = l.b), s(i, o, o._defaultColor, u._fullLayout);
          }
          var p = function(c, a) {
            var y, f, _, b, w, T, L, A = a._carpetTrace, I = A.aaxis, P = A.baxis;
            I._minDtick = 0, P._minDtick = 0, g.isArray1D(a.z) && k(a, I, P, "a", "b", ["z"]), y = a._a = a._a || a.a, b = a._b = a._b || a.b, y = y ? I.makeCalcdata(a, "_a") : [], b = b ? P.makeCalcdata(a, "_b") : [], f = a.a0 || 0, _ = a.da || 1, w = a.b0 || 0, T = a.db || 1, L = a._z = x(a._z || a.z, a.transpose), a._emptypoints = r(L), e(L, a._emptypoints);
            var S = g.maxRowLength(L), E = a.xtype === "scaled" ? "" : y, R = n(a, E, f, _, S, I), z = a.ytype === "scaled" ? "" : b, j = n(a, z, w, T, L.length, P), H = { a: R, b: j, z: L };
            return a.contours.type === "levels" && a.contours.coloring !== "none" && m(c, a, { vals: L, containerStr: "", cLetter: "z" }), [H];
          }(u, o);
          return d(o, o._z), p;
        }
      };
    }, { "../../components/colorscale/calc": 375, "../../lib": 515, "../carpet/lookup_carpetid": 717, "../contour/set_contours": 763, "../heatmap/clean_2d_array": 803, "../heatmap/convert_column_xyz": 805, "../heatmap/find_empties": 807, "../heatmap/interp2d": 810, "../heatmap/make_bound_array": 812, "./defaults": 768 }], 768: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../heatmap/xyz_defaults"), k = v("./attributes"), x = v("../contour/constraint_defaults"), e = v("../contour/contours_defaults"), r = v("../contour/style_defaults");
      Q.exports = function(n, s, t, d) {
        function u(o, h) {
          return m.coerce(n, s, k, o, h);
        }
        if (u("carpet"), n.a && n.b) {
          if (!g(n, s, u, d, "a", "b"))
            return void (s.visible = !1);
          u("text"), u("contours.type") === "constraint" ? x(n, s, u, d, t, { hasHover: !1 }) : (e(n, s, u, function(o) {
            return m.coerce2(n, s, k, o);
          }), r(n, s, u, d, { hasHover: !1 }));
        } else
          s._defaultColor = t, s._length = null;
      };
    }, { "../../lib": 515, "../contour/constraint_defaults": 749, "../contour/contours_defaults": 751, "../contour/style_defaults": 765, "../heatmap/xyz_defaults": 816, "./attributes": 766 }], 769: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../contour/colorbar"), calc: v("./calc"), plot: v("./plot"), style: v("../contour/style"), moduleType: "trace", name: "contourcarpet", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "carpet", "contour", "symbols", "showLegend", "hasLines", "carpetDependent", "noHover", "noSortingByValue"], meta: {} };
    }, { "../../plots/cartesian": 578, "../contour/colorbar": 747, "../contour/style": 764, "./attributes": 766, "./calc": 767, "./defaults": 768, "./plot": 770 }], 770: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../carpet/map_1d_array"), k = v("../carpet/makepath"), x = v("../../components/drawing"), e = v("../../lib"), r = v("../contour/make_crossings"), n = v("../contour/find_all_paths"), s = v("../contour/plot"), t = v("../contour/constants"), d = v("../contour/convert_to_constraints"), u = v("../contour/empty_pathinfo"), o = v("../contour/close_boundaries"), h = v("../carpet/lookup_carpetid"), l = v("../carpet/axis_aligned_line");
      function i(a, y, f) {
        var _ = a.getPointAtLength(y), b = a.getPointAtLength(f), w = b.x - _.x, T = b.y - _.y, L = Math.sqrt(w * w + T * T);
        return [w / L, T / L];
      }
      function p(a) {
        var y = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
        return [a[0] / y, a[1] / y];
      }
      function c(a, y) {
        var f = Math.abs(a[0] * y[0] + a[1] * y[1]);
        return Math.sqrt(1 - f * f) / f;
      }
      Q.exports = function(a, y, f, _) {
        var b = y.xaxis, w = y.yaxis;
        e.makeTraceGroups(_, f, "contour").each(function(T) {
          var L = m.select(this), A = T[0], I = A.trace, P = I._carpetTrace = h(a, I), S = a.calcdata[P.index][0];
          if (P.visible && P.visible !== "legendonly") {
            var E = A.a, R = A.b, z = I.contours, j = u(z, y, A), H = z.type === "constraint", Y = z._operation, J = H ? Y === "=" ? "lines" : "fill" : z.coloring, W = [[E[0], R[R.length - 1]], [E[E.length - 1], R[R.length - 1]], [E[E.length - 1], R[0]], [E[0], R[0]]];
            r(j);
            var Z = 1e-8 * (E[E.length - 1] - E[0]), re = 1e-8 * (R[R.length - 1] - R[0]);
            n(j, Z, re);
            var V, B, U, ee, N = j;
            z.type === "constraint" && (N = d(j, Y)), function(ie, le) {
              var oe, ve, ue, ye, Ae, pe, ge, we, se;
              for (oe = 0; oe < ie.length; oe++) {
                for (ye = ie[oe], Ae = ye.pedgepaths = [], pe = ye.ppaths = [], ve = 0; ve < ye.edgepaths.length; ve++) {
                  for (se = ye.edgepaths[ve], ge = [], ue = 0; ue < se.length; ue++)
                    ge[ue] = le(se[ue]);
                  Ae.push(ge);
                }
                for (ve = 0; ve < ye.paths.length; ve++) {
                  for (se = ye.paths[ve], we = [], ue = 0; ue < se.length; ue++)
                    we[ue] = le(se[ue]);
                  pe.push(we);
                }
              }
            }(j, te);
            var K = [];
            for (ee = S.clipsegments.length - 1; ee >= 0; ee--)
              V = S.clipsegments[ee], B = g([], V.x, b.c2p), U = g([], V.y, w.c2p), B.reverse(), U.reverse(), K.push(k(B, U, V.bicubic));
            var X = "M" + K.join("L") + "Z";
            (function(ie, le, oe, ve, ue, ye) {
              var Ae, pe, ge, we, se = e.ensureSingle(ie, "g", "contourbg").selectAll("path").data(ye !== "fill" || ue ? [] : [0]);
              se.enter().append("path"), se.exit().remove();
              var de = [];
              for (we = 0; we < le.length; we++)
                Ae = le[we], pe = g([], Ae.x, oe.c2p), ge = g([], Ae.y, ve.c2p), de.push(k(pe, ge, Ae.bicubic));
              se.attr("d", "M" + de.join("L") + "Z").style("stroke", "none");
            })(L, S.clipsegments, b, w, H, J), function(ie, le, oe, ve, ue, ye, Ae, pe, ge, we, se) {
              var de = we === "fill";
              de && o(ue, ie.contours);
              var Te = e.ensureSingle(le, "g", "contourfill").selectAll("path").data(de ? ue : []);
              Te.enter().append("path"), Te.exit().remove(), Te.each(function(Ee) {
                var Me = (Ee.prefixBoundary ? se : "") + function(ze, Ie, Oe, Ze, Fe, Pe, De, Ge) {
                  var Qe, ot, vt, bt, yt, tt, Ke, mt = "", Ft = Ie.edgepaths.map(function(Ue, Xe) {
                    return Xe;
                  }), Vt = !0, Xt = 1e-4 * Math.abs(Oe[0][0] - Oe[2][0]), Gt = 1e-4 * Math.abs(Oe[0][1] - Oe[2][1]);
                  function nr(Ue) {
                    return Math.abs(Ue[1] - Oe[0][1]) < Gt;
                  }
                  function It(Ue) {
                    return Math.abs(Ue[1] - Oe[2][1]) < Gt;
                  }
                  function Be(Ue) {
                    return Math.abs(Ue[0] - Oe[0][0]) < Xt;
                  }
                  function He(Ue) {
                    return Math.abs(Ue[0] - Oe[2][0]) < Xt;
                  }
                  function he(Ue, Xe) {
                    var qe, st, it, Tt, Pt = "";
                    for (nr(Ue) && !He(Ue) || It(Ue) && !Be(Ue) ? (Tt = Fe.aaxis, it = l(Fe, Pe, [Ue[0], Xe[0]], 0.5 * (Ue[1] + Xe[1]))) : (Tt = Fe.baxis, it = l(Fe, Pe, 0.5 * (Ue[0] + Xe[0]), [Ue[1], Xe[1]])), qe = 1; qe < it.length; qe++)
                      for (Pt += Tt.smoothing ? "C" : "L", st = 0; st < it[qe].length; st++) {
                        var rt = it[qe][st];
                        Pt += [De.c2p(rt[0]), Ge.c2p(rt[1])] + " ";
                      }
                    return Pt;
                  }
                  for (Qe = 0, ot = null; Ft.length; ) {
                    var be = Ie.edgepaths[Qe][0];
                    for (ot && (mt += he(ot, be)), Ke = x.smoothopen(Ie.edgepaths[Qe].map(Ze), Ie.smoothing), mt += Vt ? Ke : Ke.replace(/^M/, "L"), Ft.splice(Ft.indexOf(Qe), 1), ot = Ie.edgepaths[Qe][Ie.edgepaths[Qe].length - 1], yt = -1, bt = 0; bt < 4; bt++) {
                      if (!ot) {
                        e.log("Missing end?", Qe, Ie);
                        break;
                      }
                      for (nr(ot) && !He(ot) ? vt = Oe[1] : Be(ot) ? vt = Oe[0] : It(ot) ? vt = Oe[3] : He(ot) && (vt = Oe[2]), tt = 0; tt < Ie.edgepaths.length; tt++) {
                        var Re = Ie.edgepaths[tt][0];
                        Math.abs(ot[0] - vt[0]) < Xt ? Math.abs(ot[0] - Re[0]) < Xt && (Re[1] - ot[1]) * (vt[1] - Re[1]) >= 0 && (vt = Re, yt = tt) : Math.abs(ot[1] - vt[1]) < Gt ? Math.abs(ot[1] - Re[1]) < Gt && (Re[0] - ot[0]) * (vt[0] - Re[0]) >= 0 && (vt = Re, yt = tt) : e.log("endpt to newendpt is not vert. or horz.", ot, vt, Re);
                      }
                      if (yt >= 0)
                        break;
                      mt += he(ot, vt), ot = vt;
                    }
                    if (yt === Ie.edgepaths.length) {
                      e.log("unclosed perimeter path");
                      break;
                    }
                    Qe = yt, (Vt = Ft.indexOf(Qe) === -1) && (Qe = Ft[0], mt += he(ot, vt) + "Z", ot = null);
                  }
                  for (Qe = 0; Qe < Ie.paths.length; Qe++)
                    mt += x.smoothclosed(Ie.paths[Qe].map(Ze), Ie.smoothing);
                  return mt;
                }(0, Ee, ye, Ae, pe, ge, oe, ve);
                Me ? m.select(this).attr("d", Me).style("stroke", "none") : m.select(this).remove();
              });
            }(I, L, b, w, N, W, te, P, S, J, X), function(ie, le, oe, ve, ue, ye, Ae) {
              var pe = e.ensureSingle(ie, "g", "contourlines"), ge = ue.showlines !== !1, we = ue.showlabels, se = ge && we, de = s.createLines(pe, ge || we, le), Te = s.createLineClip(pe, se, oe, ve.trace.uid), Ee = ie.selectAll("g.contourlabels").data(we ? [0] : []);
              if (Ee.exit().remove(), Ee.enter().append("g").classed("contourlabels", !0), we) {
                var Me = ye.xaxis, ze = ye.yaxis, Ie = Me._length, Oe = ze._length, Ze = [[[0, 0], [Ie, 0], [Ie, Oe], [0, Oe]]], Fe = [];
                e.clearLocationCache();
                var Pe = s.labelFormatter(oe, ve), De = x.tester.append("text").attr("data-notex", 1).call(x.font, ue.labelfont), Ge = { left: 0, right: Ie, center: Ie / 2, top: 0, bottom: Oe, middle: Oe / 2 }, Qe = Math.sqrt(Ie * Ie + Oe * Oe), ot = t.LABELDISTANCE * Qe / Math.max(1, le.length / t.LABELINCREASE);
                de.each(function(vt) {
                  var bt = s.calcTextOpts(vt.level, Pe, De, oe);
                  m.select(this).selectAll("path").each(function(yt) {
                    var tt = e.getVisibleSegment(this, Ge, bt.height / 2);
                    if (tt && (function(Vt, Xt, Gt, nr, It, Be) {
                      for (var He, he = 0; he < Gt.pedgepaths.length; he++)
                        Xt === Gt.pedgepaths[he] && (He = Gt.edgepaths[he]);
                      if (!He)
                        return;
                      var be = It.a[0], Re = It.a[It.a.length - 1], Ue = It.b[0], Xe = It.b[It.b.length - 1];
                      function qe(rt, ut) {
                        var Bt, wt = 0;
                        return (Math.abs(rt[0] - be) < 0.1 || Math.abs(rt[0] - Re) < 0.1) && (Bt = p(It.dxydb_rough(rt[0], rt[1], 0.1)), wt = Math.max(wt, Be * c(ut, Bt) / 2)), (Math.abs(rt[1] - Ue) < 0.1 || Math.abs(rt[1] - Xe) < 0.1) && (Bt = p(It.dxyda_rough(rt[0], rt[1], 0.1)), wt = Math.max(wt, Be * c(ut, Bt) / 2)), wt;
                      }
                      var st = i(Vt, 0, 1), it = i(Vt, nr.total, nr.total - 1), Tt = qe(He[0], st), Pt = nr.total - qe(He[He.length - 1], it);
                      nr.min < Tt && (nr.min = Tt), nr.max > Pt && (nr.max = Pt), nr.len = nr.max - nr.min;
                    }(this, yt, vt, tt, Ae, bt.height), !(tt.len < (bt.width + bt.height) * t.LABELMIN)))
                      for (var Ke = Math.min(Math.ceil(tt.len / ot), t.LABELMAX), mt = 0; mt < Ke; mt++) {
                        var Ft = s.findBestTextLocation(this, tt, bt, Fe, Ge);
                        if (!Ft)
                          break;
                        s.addLabelData(Ft, bt, Fe, Ze);
                      }
                  });
                }), De.remove(), s.drawLabels(Ee, Fe, oe, Te, se ? Ze : null);
              }
              we && !ge && de.remove();
            }(L, j, a, A, z, y, P), x.setClipUrl(L, P._clipPathId, a);
          }
          function te(ie) {
            var le = P.ab2xy(ie[0], ie[1], !0);
            return [b.c2p(le[0]), w.c2p(le[1])];
          }
        });
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../carpet/axis_aligned_line": 701, "../carpet/lookup_carpetid": 717, "../carpet/makepath": 718, "../carpet/map_1d_array": 719, "../contour/close_boundaries": 746, "../contour/constants": 748, "../contour/convert_to_constraints": 752, "../contour/empty_pathinfo": 754, "../contour/find_all_paths": 756, "../contour/make_crossings": 761, "../contour/plot": 762, "@plotly/d3": 58 }], 771: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../../plots/template_attributes").hovertemplateAttrs, k = v("../../plots/attributes"), x = v("../scattermapbox/attributes"), e = v("../../lib/extend").extendFlat;
      Q.exports = e({ lon: x.lon, lat: x.lat, z: { valType: "data_array", editType: "calc" }, radius: { valType: "number", editType: "plot", arrayOk: !0, min: 1, dflt: 30 }, below: { valType: "string", editType: "plot" }, text: x.text, hovertext: x.hovertext, hoverinfo: e({}, k.hoverinfo, { flags: ["lon", "lat", "z", "text", "name"] }), hovertemplate: g(), showlegend: e({}, k.showlegend, { dflt: !1 }) }, m("", { cLetter: "z", editTypeOverride: "calc" }));
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scattermapbox/attributes": 1002 }], 772: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib").isArrayOrTypedArray, k = v("../../constants/numerical").BADNUM, x = v("../../components/colorscale/calc"), e = v("../../lib")._;
      Q.exports = function(r, n) {
        for (var s = n._length, t = new Array(s), d = n.z, u = g(d) && d.length, o = 0; o < s; o++) {
          var h = t[o] = {}, l = n.lon[o], i = n.lat[o];
          if (h.lonlat = m(l) && m(i) ? [+l, +i] : [k, k], u) {
            var p = d[o];
            h.z = m(p) ? p : k;
          }
        }
        return x(r, n, { vals: u ? d : [0, 1], containerStr: "", cLetter: "z" }), s && (t[0].t = { labels: { lat: e(r, "lat:") + " ", lon: e(r, "lon:") + " " } }), t;
      };
    }, { "../../components/colorscale/calc": 375, "../../constants/numerical": 491, "../../lib": 515, "fast-isnumeric": 190 }], 773: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../components/color"), x = v("../../components/colorscale"), e = v("../../constants/numerical").BADNUM, r = v("../../lib/geojson_utils").makeBlank;
      Q.exports = function(n) {
        var s = n[0].trace, t = s.visible === !0 && s._length !== 0, d = s._opts = { heatmap: { layout: { visibility: "none" }, paint: {} }, geojson: r() };
        if (!t)
          return d;
        var u, o = [], h = s.z, l = s.radius, i = g.isArrayOrTypedArray(h) && h.length, p = g.isArrayOrTypedArray(l);
        for (u = 0; u < n.length; u++) {
          var c = n[u], a = c.lonlat;
          if (a[0] !== e) {
            var y = {};
            if (i) {
              var f = c.z;
              y.z = f !== e ? f : 0;
            }
            p && (y.r = m(l[u]) && l[u] > 0 ? +l[u] : 0), o.push({ type: "Feature", geometry: { type: "Point", coordinates: a }, properties: y });
          }
        }
        var _ = x.extractOpts(s), b = _.reversescale ? x.flipScale(_.colorscale) : _.colorscale, w = b[0][1], T = ["interpolate", ["linear"], ["heatmap-density"], 0, k.opacity(w) < 1 ? w : k.addOpacity(w, 0)];
        for (u = 1; u < b.length; u++)
          T.push(b[u][0], b[u][1]);
        var L = ["interpolate", ["linear"], ["get", "z"], _.min, 0, _.max, 1];
        return g.extendFlat(d.heatmap.paint, { "heatmap-weight": i ? L : 1 / (_.max - _.min), "heatmap-color": T, "heatmap-radius": p ? { type: "identity", property: "r" } : s.radius, "heatmap-opacity": s.opacity }), d.geojson = { type: "FeatureCollection", features: o }, d.heatmap.layout.visibility = "visible", d;
      };
    }, { "../../components/color": 367, "../../components/colorscale": 379, "../../constants/numerical": 491, "../../lib": 515, "../../lib/geojson_utils": 509, "fast-isnumeric": 190 }], 774: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/defaults"), k = v("./attributes");
      Q.exports = function(x, e, r, n) {
        function s(o, h) {
          return m.coerce(x, e, k, o, h);
        }
        var t = s("lon") || [], d = s("lat") || [], u = Math.min(t.length, d.length);
        u ? (e._length = u, s("z"), s("radius"), s("below"), s("text"), s("hovertext"), s("hovertemplate"), g(x, e, n, s, { prefix: "", cLetter: "z" })) : e.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "./attributes": 771 }], 775: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m.lon = g.lon, m.lat = g.lat, m.z = g.z, m;
      };
    }, {}], 776: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../scattermapbox/hover").hoverPoints, k = v("../scattermapbox/hover").getExtraText;
      Q.exports = function(x, e, r) {
        var n = g(x, e, r);
        if (n) {
          var s = n[0], t = s.cd, d = t[0].trace, u = t[s.index];
          if (delete s.color, "z" in u) {
            var o = s.subplot.mockAxis;
            s.z = u.z, s.zLabel = m.tickText(o, o.c2l(u.z), "hover").text;
          }
          return s.extraText = k(d, u, t[0].t.labels), [s];
        }
      };
    }, { "../../plots/cartesian/axes": 566, "../scattermapbox/hover": 1007 }], 777: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../heatmap/colorbar"), formatLabels: v("../scattermapbox/format_labels"), calc: v("./calc"), plot: v("./plot"), hoverPoints: v("./hover"), eventData: v("./event_data"), getBelow: function(m, g) {
        for (var k = g.getMapLayers(), x = 0; x < k.length; x++) {
          var e = k[x], r = e.id;
          if (e.type === "symbol" && typeof r == "string" && r.indexOf("plotly-") === -1)
            return r;
        }
      }, moduleType: "trace", name: "densitymapbox", basePlotModule: v("../../plots/mapbox"), categories: ["mapbox", "gl", "showLegend"], meta: { hr_name: "density_mapbox" } };
    }, { "../../plots/mapbox": 622, "../heatmap/colorbar": 804, "../scattermapbox/format_labels": 1006, "./attributes": 771, "./calc": 772, "./defaults": 774, "./event_data": 775, "./hover": 776, "./plot": 778 }], 778: [function(v, Q, $) {
      var m = v("./convert"), g = v("../../plots/mapbox/constants").traceLayerPrefix;
      function k(e, r) {
        this.type = "densitymapbox", this.subplot = e, this.uid = r, this.sourceId = "source-" + r, this.layerList = [["heatmap", g + r + "-heatmap"]], this.below = null;
      }
      var x = k.prototype;
      x.update = function(e) {
        var r = this.subplot, n = this.layerList, s = m(e), t = r.belowLookup["trace-" + this.uid];
        r.map.getSource(this.sourceId).setData(s.geojson), t !== this.below && (this._removeLayers(), this._addLayers(s, t), this.below = t);
        for (var d = 0; d < n.length; d++) {
          var u = n[d], o = u[0], h = u[1], l = s[o];
          r.setOptions(h, "setLayoutProperty", l.layout), l.layout.visibility === "visible" && r.setOptions(h, "setPaintProperty", l.paint);
        }
      }, x._addLayers = function(e, r) {
        for (var n = this.subplot, s = this.layerList, t = this.sourceId, d = 0; d < s.length; d++) {
          var u = s[d], o = u[0], h = e[o];
          n.addLayer({ type: o, id: u[1], source: t, layout: h.layout, paint: h.paint }, r);
        }
      }, x._removeLayers = function() {
        for (var e = this.subplot.map, r = this.layerList, n = r.length - 1; n >= 0; n--)
          e.removeLayer(r[n][1]);
      }, x.dispose = function() {
        var e = this.subplot.map;
        this._removeLayers(), e.removeSource(this.sourceId);
      }, Q.exports = function(e, r) {
        var n = r[0].trace, s = new k(e, n.uid), t = s.sourceId, d = m(r), u = s.below = e.belowLookup["trace-" + n.uid];
        return e.map.addSource(t, { type: "geojson", data: d.geojson }), s._addLayers(d, u), s;
      };
    }, { "../../plots/mapbox/constants": 620, "./convert": 773 }], 779: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        for (var x = 0; x < g.length; x++)
          g[x].i = x;
        m.mergeArray(k.text, g, "tx"), m.mergeArray(k.hovertext, g, "htx");
        var e = k.marker;
        if (e) {
          m.mergeArray(e.opacity, g, "mo"), m.mergeArray(e.color, g, "mc");
          var r = e.line;
          r && (m.mergeArray(r.color, g, "mlc"), m.mergeArrayCastPositive(r.width, g, "mlw"));
        }
      };
    }, { "../../lib": 515 }], 780: [function(v, Q, $) {
      var m, g = v("../bar/attributes"), k = v("../scatter/attributes").line, x = v("../../plots/attributes"), e = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, r = v("../../plots/template_attributes").hovertemplateAttrs, n = v("../../plots/template_attributes").texttemplateAttrs, s = v("./constants"), t = v("../../lib/extend").extendFlat, d = v("../../components/color");
      Q.exports = { x: g.x, x0: g.x0, dx: g.dx, y: g.y, y0: g.y0, dy: g.dy, xperiod: g.xperiod, yperiod: g.yperiod, xperiod0: g.xperiod0, yperiod0: g.yperiod0, xperiodalignment: g.xperiodalignment, yperiodalignment: g.yperiodalignment, xhoverformat: e("x"), yhoverformat: e("y"), hovertext: g.hovertext, hovertemplate: r({}, { keys: s.eventDataKeys }), hoverinfo: t({}, x.hoverinfo, { flags: ["name", "x", "y", "text", "percent initial", "percent previous", "percent total"] }), textinfo: { valType: "flaglist", flags: ["label", "text", "percent initial", "percent previous", "percent total", "value"], extras: ["none"], editType: "plot", arrayOk: !1 }, texttemplate: n({ editType: "plot" }, { keys: s.eventDataKeys.concat(["label", "value"]) }), text: g.text, textposition: g.textposition, insidetextanchor: t({}, g.insidetextanchor, { dflt: "middle" }), textangle: t({}, g.textangle, { dflt: 0 }), textfont: g.textfont, insidetextfont: g.insidetextfont, outsidetextfont: g.outsidetextfont, constraintext: g.constraintext, cliponaxis: g.cliponaxis, orientation: t({}, g.orientation, {}), offset: t({}, g.offset, { arrayOk: !1 }), width: t({}, g.width, { arrayOk: !1 }), marker: (m = t({}, g.marker), delete m.pattern, m), connector: { fillcolor: { valType: "color", editType: "style" }, line: { color: t({}, k.color, { dflt: d.defaultLine }), width: t({}, k.width, { dflt: 0, editType: "plot" }), dash: k.dash, editType: "style" }, visible: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, offsetgroup: g.offsetgroup, alignmentgroup: g.alignmentgroup };
    }, { "../../components/color": 367, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../bar/attributes": 657, "../scatter/attributes": 936, "./constants": 782 }], 781: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../plots/cartesian/align_period"), k = v("./arrays_to_calcdata"), x = v("../scatter/calc_selection"), e = v("../../constants/numerical").BADNUM;
      function r(n) {
        return n === e ? 0 : n;
      }
      Q.exports = function(n, s) {
        var t, d, u, o, h, l, i, p, c = m.getFromId(n, s.xaxis || "x"), a = m.getFromId(n, s.yaxis || "y");
        s.orientation === "h" ? (t = c.makeCalcdata(s, "x"), u = a.makeCalcdata(s, "y"), o = g(s, a, "y", u), h = !!s.yperiodalignment, l = "y") : (t = a.makeCalcdata(s, "y"), u = c.makeCalcdata(s, "x"), o = g(s, c, "x", u), h = !!s.xperiodalignment, l = "x"), d = o.vals;
        var y, f = Math.min(d.length, t.length), _ = new Array(f);
        for (s._base = [], i = 0; i < f; i++) {
          t[i] < 0 && (t[i] = e);
          var b = !1;
          t[i] !== e && i + 1 < f && t[i + 1] !== e && (b = !0), p = _[i] = { p: d[i], s: t[i], cNext: b }, s._base[i] = -0.5 * p.s, h && (_[i].orig_p = u[i], _[i][l + "End"] = o.ends[i], _[i][l + "Start"] = o.starts[i]), s.ids && (p.id = String(s.ids[i])), i === 0 && (_[0].vTotal = 0), _[0].vTotal += r(p.s), p.begR = r(p.s) / r(_[0].s);
        }
        for (i = 0; i < f; i++)
          (p = _[i]).s !== e && (p.sumR = p.s / _[0].vTotal, p.difR = y !== void 0 ? p.s / y : 1, y = p.s);
        return k(_, s), x(_, s), _;
      };
    }, { "../../constants/numerical": 491, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "../scatter/calc_selection": 938, "./arrays_to_calcdata": 779 }], 782: [function(v, Q, $) {
      Q.exports = { eventDataKeys: ["percentInitial", "percentPrevious", "percentTotal"] };
    }, {}], 783: [function(v, Q, $) {
      var m = v("../bar/cross_trace_calc").setGroupPositions;
      Q.exports = function(g, k) {
        var x, e, r = g._fullLayout, n = g._fullData, s = g.calcdata, t = k.xaxis, d = k.yaxis, u = [], o = [], h = [];
        for (e = 0; e < n.length; e++) {
          var l = n[e], i = l.orientation === "h";
          l.visible === !0 && l.xaxis === t._id && l.yaxis === d._id && l.type === "funnel" && (x = s[e], i ? h.push(x) : o.push(x), u.push(x));
        }
        var p = { mode: r.funnelmode, norm: r.funnelnorm, gap: r.funnelgap, groupgap: r.funnelgroupgap };
        for (m(g, t, d, o, p), m(g, d, t, h, p), e = 0; e < u.length; e++) {
          x = u[e];
          for (var c = 0; c < x.length; c++)
            c + 1 < x.length && (x[c].nextP0 = x[c + 1].p0, x[c].nextS0 = x[c + 1].s0, x[c].nextP1 = x[c + 1].p1, x[c].nextS1 = x[c + 1].s1);
        }
      };
    }, { "../bar/cross_trace_calc": 660 }], 784: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../bar/defaults").handleGroupingDefaults, k = v("../bar/defaults").handleText, x = v("../scatter/xy_defaults"), e = v("../scatter/period_defaults"), r = v("./attributes"), n = v("../../components/color");
      Q.exports = { supplyDefaults: function(s, t, d, u) {
        function o(p, c) {
          return m.coerce(s, t, r, p, c);
        }
        if (x(s, t, u, o)) {
          e(s, t, u, o), o("xhoverformat"), o("yhoverformat"), o("orientation", t.y && !t.x ? "v" : "h"), o("offset"), o("width");
          var h = o("text");
          o("hovertext"), o("hovertemplate");
          var l = o("textposition");
          k(s, t, u, o, l, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), t.textposition === "none" || t.texttemplate || o("textinfo", Array.isArray(h) ? "text+value" : "value");
          var i = o("marker.color", d);
          o("marker.line.color", n.defaultLine), o("marker.line.width"), o("connector.visible") && (o("connector.fillcolor", function(p) {
            var c = m.isArrayOrTypedArray(p) ? "#000" : p;
            return n.addOpacity(c, 0.5 * n.opacity(c));
          }(i)), o("connector.line.width") && (o("connector.line.color"), o("connector.line.dash")));
        } else
          t.visible = !1;
      }, crossTraceDefaults: function(s, t) {
        var d, u;
        function o(l) {
          return m.coerce(u._input, u, r, l);
        }
        if (t.funnelmode === "group")
          for (var h = 0; h < s.length; h++)
            d = (u = s[h])._input, g(d, u, t, o);
      } };
    }, { "../../components/color": 367, "../../lib": 515, "../bar/defaults": 661, "../scatter/period_defaults": 956, "../scatter/xy_defaults": 963, "./attributes": 780 }], 785: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m.x = "xVal" in g ? g.xVal : g.x, m.y = "yVal" in g ? g.yVal : g.y, "percentInitial" in g && (m.percentInitial = g.percentInitial), "percentPrevious" in g && (m.percentPrevious = g.percentPrevious), "percentTotal" in g && (m.percentTotal = g.percentTotal), g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), m;
      };
    }, {}], 786: [function(v, Q, $) {
      var m = v("../../components/color").opacity, g = v("../bar/hover").hoverOnBars, k = v("../../lib").formatPercent;
      Q.exports = function(x, e, r, n, s) {
        var t = g(x, e, r, n, s);
        if (t) {
          var d = t.cd, u = d[0].trace, o = u.orientation === "h", h = d[t.index];
          t[(o ? "x" : "y") + "LabelVal"] = h.s, t.percentInitial = h.begR, t.percentInitialLabel = k(h.begR, 1), t.percentPrevious = h.difR, t.percentPreviousLabel = k(h.difR, 1), t.percentTotal = h.sumR, t.percentTotalLabel = k(h.sumR, 1);
          var l = h.hi || u.hoverinfo, i = [];
          if (l && l !== "none" && l !== "skip") {
            var p = l === "all", c = l.split("+"), a = function(y) {
              return p || c.indexOf(y) !== -1;
            };
            a("percent initial") && i.push(t.percentInitialLabel + " of initial"), a("percent previous") && i.push(t.percentPreviousLabel + " of previous"), a("percent total") && i.push(t.percentTotalLabel + " of total");
          }
          return t.extraText = i.join("<br>"), t.color = function(y, f) {
            var _ = y.marker, b = f.mc || _.color, w = f.mlc || _.line.color, T = f.mlw || _.line.width;
            if (m(b))
              return b;
            if (m(w) && T)
              return w;
          }(u, h), [t];
        }
      };
    }, { "../../components/color": 367, "../../lib": 515, "../bar/hover": 664 }], 787: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults").supplyDefaults, crossTraceDefaults: v("./defaults").crossTraceDefaults, supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc"), crossTraceCalc: v("./cross_trace_calc"), plot: v("./plot"), style: v("./style").style, hoverPoints: v("./hover"), eventData: v("./event_data"), selectPoints: v("../bar/select"), moduleType: "trace", name: "funnel", basePlotModule: v("../../plots/cartesian"), categories: ["bar-like", "cartesian", "svg", "oriented", "showLegend", "zoomScale"], meta: {} };
    }, { "../../plots/cartesian": 578, "../bar/select": 669, "./attributes": 780, "./calc": 781, "./cross_trace_calc": 783, "./defaults": 784, "./event_data": 785, "./hover": 786, "./layout_attributes": 788, "./layout_defaults": 789, "./plot": 790, "./style": 791 }], 788: [function(v, Q, $) {
      Q.exports = { funnelmode: { valType: "enumerated", values: ["stack", "group", "overlay"], dflt: "stack", editType: "calc" }, funnelgap: { valType: "number", min: 0, max: 1, editType: "calc" }, funnelgroupgap: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" } };
    }, {}], 789: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x, e) {
        var r = !1;
        function n(d, u) {
          return m.coerce(k, x, g, d, u);
        }
        for (var s = 0; s < e.length; s++) {
          var t = e[s];
          if (t.visible && t.type === "funnel") {
            r = !0;
            break;
          }
        }
        r && (n("funnelmode"), n("funnelgap", 0.2), n("funnelgroupgap"));
      };
    }, { "../../lib": 515, "./layout_attributes": 788 }], 790: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../../constants/numerical").BADNUM, e = v("../bar/plot"), r = v("../bar/uniform_text").clearMinTextSize;
      function n(s, t, d, u) {
        var o = [], h = [], l = u ? t : d, i = u ? d : t;
        return o[0] = l.c2p(s.s0, !0), h[0] = i.c2p(s.p0, !0), o[1] = l.c2p(s.s1, !0), h[1] = i.c2p(s.p1, !0), o[2] = l.c2p(s.nextS0, !0), h[2] = i.c2p(s.nextP0, !0), o[3] = l.c2p(s.nextS1, !0), h[3] = i.c2p(s.nextP1, !0), u ? [o, h] : [h, o];
      }
      Q.exports = function(s, t, d, u) {
        var o = s._fullLayout;
        r("funnel", o), function(h, l, i, p) {
          var c = l.xaxis, a = l.yaxis;
          g.makeTraceGroups(p, i, "trace bars").each(function(y) {
            var f = m.select(this), _ = y[0].trace, b = g.ensureSingle(f, "g", "regions");
            if (_.connector && _.connector.visible) {
              var w = _.orientation === "h", T = b.selectAll("g.region").data(g.identity);
              T.enter().append("g").classed("region", !0), T.exit().remove();
              var L = T.size();
              T.each(function(A, I) {
                if (I === L - 1 || A.cNext) {
                  var P = n(A, c, a, w), S = P[0], E = P[1], R = "";
                  S[0] !== x && E[0] !== x && S[1] !== x && E[1] !== x && S[2] !== x && E[2] !== x && S[3] !== x && E[3] !== x && (R += w ? "M" + S[0] + "," + E[1] + "L" + S[2] + "," + E[2] + "H" + S[3] + "L" + S[1] + "," + E[1] + "Z" : "M" + S[1] + "," + E[1] + "L" + S[2] + "," + E[3] + "V" + E[2] + "L" + S[1] + "," + E[0] + "Z"), R === "" && (R = "M0,0Z"), g.ensureSingle(m.select(this), "path").attr("d", R).call(k.setClipUrl, l.layerClipId, h);
                }
              });
            } else
              b.remove();
          });
        }(s, t, d, u), function(h, l, i, p) {
          var c = l.xaxis, a = l.yaxis;
          g.makeTraceGroups(p, i, "trace bars").each(function(y) {
            var f = m.select(this), _ = y[0].trace, b = g.ensureSingle(f, "g", "lines");
            if (_.connector && _.connector.visible && _.connector.line.width) {
              var w = _.orientation === "h", T = b.selectAll("g.line").data(g.identity);
              T.enter().append("g").classed("line", !0), T.exit().remove();
              var L = T.size();
              T.each(function(A, I) {
                if (I === L - 1 || A.cNext) {
                  var P = n(A, c, a, w), S = P[0], E = P[1], R = "";
                  S[3] !== void 0 && E[3] !== void 0 && (w ? (R += "M" + S[0] + "," + E[1] + "L" + S[2] + "," + E[2], R += "M" + S[1] + "," + E[1] + "L" + S[3] + "," + E[2]) : (R += "M" + S[1] + "," + E[1] + "L" + S[2] + "," + E[3], R += "M" + S[1] + "," + E[0] + "L" + S[2] + "," + E[2])), R === "" && (R = "M0,0Z"), g.ensureSingle(m.select(this), "path").attr("d", R).call(k.setClipUrl, l.layerClipId, h);
                }
              });
            } else
              b.remove();
          });
        }(s, t, d, u), e.plot(s, t, d, u, { mode: o.funnelmode, norm: o.funnelmode, gap: o.funnelgap, groupgap: o.funnelgroupgap });
      };
    }, { "../../components/drawing": 389, "../../constants/numerical": 491, "../../lib": 515, "../bar/plot": 668, "../bar/uniform_text": 673, "@plotly/d3": 58 }], 791: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../../components/color"), x = v("../../constants/interactions").DESELECTDIM, e = v("../bar/style"), r = v("../bar/uniform_text").resizeText, n = e.styleTextPoints;
      Q.exports = { style: function(s, t, d) {
        var u = d || m.select(s).selectAll("g.funnellayer").selectAll("g.trace");
        r(s, u, "funnel"), u.style("opacity", function(o) {
          return o[0].trace.opacity;
        }), u.each(function(o) {
          var h = m.select(this), l = o[0].trace;
          h.selectAll(".point > path").each(function(i) {
            if (!i.isBlank) {
              var p = l.marker;
              m.select(this).call(k.fill, i.mc || p.color).call(k.stroke, i.mlc || p.line.color).call(g.dashLine, p.line.dash, i.mlw || p.line.width).style("opacity", l.selectedpoints && !i.selected ? x : 1);
            }
          }), n(h, l, s), h.selectAll(".regions").each(function() {
            m.select(this).selectAll("path").style("stroke-width", 0).call(k.fill, l.connector.fillcolor);
          }), h.selectAll(".lines").each(function() {
            var i = l.connector.line;
            g.lineGroupStyle(m.select(this).selectAll("path"), i.width, i.color, i.dash);
          });
        });
      } };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../constants/interactions": 490, "../bar/style": 671, "../bar/uniform_text": 673, "@plotly/d3": 58 }], 792: [function(v, Q, $) {
      var m = v("../pie/attributes"), g = v("../../plots/attributes"), k = v("../../plots/domain").attributes, x = v("../../plots/template_attributes").hovertemplateAttrs, e = v("../../plots/template_attributes").texttemplateAttrs, r = v("../../lib/extend").extendFlat;
      Q.exports = { labels: m.labels, label0: m.label0, dlabel: m.dlabel, values: m.values, marker: { colors: m.marker.colors, line: { color: r({}, m.marker.line.color, { dflt: null }), width: r({}, m.marker.line.width, { dflt: 1 }), editType: "calc" }, editType: "calc" }, text: m.text, hovertext: m.hovertext, scalegroup: r({}, m.scalegroup, {}), textinfo: r({}, m.textinfo, { flags: ["label", "text", "value", "percent"] }), texttemplate: e({ editType: "plot" }, { keys: ["label", "color", "value", "text", "percent"] }), hoverinfo: r({}, g.hoverinfo, { flags: ["label", "text", "value", "percent", "name"] }), hovertemplate: x({}, { keys: ["label", "color", "value", "text", "percent"] }), textposition: r({}, m.textposition, { values: ["inside", "none"], dflt: "inside" }), textfont: m.textfont, insidetextfont: m.insidetextfont, title: { text: m.title.text, font: m.title.font, position: r({}, m.title.position, { values: ["top left", "top center", "top right"], dflt: "top center" }), editType: "plot" }, domain: k({ name: "funnelarea", trace: !0, editType: "calc" }), aspectratio: { valType: "number", min: 0, dflt: 1, editType: "plot" }, baseratio: { valType: "number", min: 0, max: 1, dflt: 0.333, editType: "plot" } };
    }, { "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/domain": 593, "../../plots/template_attributes": 642, "../pie/attributes": 910 }], 793: [function(v, Q, $) {
      var m = v("../../plots/plots");
      $.name = "funnelarea", $.plot = function(g, k, x, e) {
        m.plotBasePlot($.name, g, k, x, e);
      }, $.clean = function(g, k, x, e) {
        m.cleanBasePlot($.name, g, k, x, e);
      };
    }, { "../../plots/plots": 628 }], 794: [function(v, Q, $) {
      var m = v("../pie/calc");
      Q.exports = { calc: function(g, k) {
        return m.calc(g, k);
      }, crossTraceCalc: function(g) {
        m.crossTraceCalc(g, { type: "funnelarea" });
      } };
    }, { "../pie/calc": 912 }], 795: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../plots/domain").defaults, x = v("../bar/defaults").handleText, e = v("../pie/defaults").handleLabelsAndValues;
      Q.exports = function(r, n, s, t) {
        function d(y, f) {
          return m.coerce(r, n, g, y, f);
        }
        var u = d("labels"), o = d("values"), h = e(u, o), l = h.len;
        if (n._hasLabels = h.hasLabels, n._hasValues = h.hasValues, !n._hasLabels && n._hasValues && (d("label0"), d("dlabel")), l) {
          n._length = l, d("marker.line.width") && d("marker.line.color", t.paper_bgcolor), d("marker.colors"), d("scalegroup");
          var i, p = d("text"), c = d("texttemplate");
          if (c || (i = d("textinfo", Array.isArray(p) ? "text+percent" : "percent")), d("hovertext"), d("hovertemplate"), c || i && i !== "none") {
            var a = d("textposition");
            x(r, n, t, d, a, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 });
          }
          k(n, t, d), d("title.text") && (d("title.position"), m.coerceFont(d, "title.font", t.font)), d("aspectratio"), d("baseratio");
        } else
          n.visible = !1;
      };
    }, { "../../lib": 515, "../../plots/domain": 593, "../bar/defaults": 661, "../pie/defaults": 913, "./attributes": 792 }], 796: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "funnelarea", basePlotModule: v("./base_plot"), categories: ["pie-like", "funnelarea", "showLegend"], attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults"), supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc").calc, crossTraceCalc: v("./calc").crossTraceCalc, plot: v("./plot"), style: v("./style"), styleOne: v("../pie/style_one"), meta: {} };
    }, { "../pie/style_one": 921, "./attributes": 792, "./base_plot": 793, "./calc": 794, "./defaults": 795, "./layout_attributes": 797, "./layout_defaults": 798, "./plot": 799, "./style": 800 }], 797: [function(v, Q, $) {
      var m = v("../pie/layout_attributes").hiddenlabels;
      Q.exports = { hiddenlabels: m, funnelareacolorway: { valType: "colorlist", editType: "calc" }, extendfunnelareacolors: { valType: "boolean", dflt: !0, editType: "calc" } };
    }, { "../pie/layout_attributes": 917 }], 798: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x) {
        function e(r, n) {
          return m.coerce(k, x, g, r, n);
        }
        e("hiddenlabels"), e("funnelareacolorway", x.colorway), e("extendfunnelareacolors");
      };
    }, { "../../lib": 515, "./layout_attributes": 797 }], 799: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../../lib"), x = k.strScale, e = k.strTranslate, r = v("../../lib/svg_text_utils"), n = v("../bar/plot").toMoveInsideBar, s = v("../bar/uniform_text"), t = s.recordMinTextSize, d = s.clearMinTextSize, u = v("../pie/helpers"), o = v("../pie/plot"), h = o.attachFxHandlers, l = o.determineInsideTextFont, i = o.layoutAreas, p = o.prerenderTitles, c = o.positionTitleOutside, a = o.formatSliceLabel;
      function y(f, _) {
        return "l" + (_[0] - f[0]) + "," + (_[1] - f[1]);
      }
      Q.exports = function(f, _) {
        var b = f._context.staticPlot, w = f._fullLayout;
        d("funnelarea", w), p(_, f), i(_, w._size), k.makeTraceGroups(w._funnelarealayer, _, "trace").each(function(T) {
          var L = m.select(this), A = T[0], I = A.trace;
          (function(P) {
            if (!P.length)
              return;
            var S = P[0], E = S.trace, R = E.aspectratio, z = E.baseratio;
            z > 0.999 && (z = 0.999);
            var j, H = Math.pow(z, 2), Y = S.vTotal, J = Y, W = Y * H / (1 - H) / Y;
            function Z() {
              var we, se = { x: we = Math.sqrt(W), y: -we };
              return [se.x, se.y];
            }
            var re, V, B = [];
            for (B.push(Z()), re = P.length - 1; re > -1; re--)
              if (!(V = P[re]).hidden) {
                var U = V.v / J;
                W += U, B.push(Z());
              }
            var ee = 1 / 0, N = -1 / 0;
            for (re = 0; re < B.length; re++)
              j = B[re], ee = Math.min(ee, j[1]), N = Math.max(N, j[1]);
            for (re = 0; re < B.length; re++)
              B[re][1] -= (N + ee) / 2;
            var K = B[B.length - 1][0], X = S.r, te = (N - ee) / 2, ie = X / K, le = X / te * R;
            for (S.r = le * te, re = 0; re < B.length; re++)
              B[re][0] *= ie, B[re][1] *= le;
            var oe = [-(j = B[0])[0], j[1]], ve = [j[0], j[1]], ue = 0;
            for (re = P.length - 1; re > -1; re--)
              if (!(V = P[re]).hidden) {
                var ye = B[ue += 1][0], Ae = B[ue][1];
                V.TL = [-ye, Ae], V.TR = [ye, Ae], V.BL = oe, V.BR = ve, V.pxmid = (pe = V.TR, ge = V.BR, [0.5 * (pe[0] + ge[0]), 0.5 * (pe[1] + ge[1])]), oe = V.TL, ve = V.TR;
              }
            var pe, ge;
          })(T), L.each(function() {
            var P = m.select(this).selectAll("g.slice").data(T);
            P.enter().append("g").classed("slice", !0), P.exit().remove(), P.each(function(E, R) {
              if (E.hidden)
                m.select(this).selectAll("path,g").remove();
              else {
                E.pointNumber = E.i, E.curveNumber = I.index;
                var z = A.cx, j = A.cy, H = m.select(this), Y = H.selectAll("path.surface").data([E]);
                Y.enter().append("path").classed("surface", !0).style({ "pointer-events": b ? "none" : "all" }), H.call(h, f, T);
                var J = "M" + (z + E.TR[0]) + "," + (j + E.TR[1]) + y(E.TR, E.BR) + y(E.BR, E.BL) + y(E.BL, E.TL) + "Z";
                Y.attr("d", J), a(f, E, A);
                var W = u.castOption(I.textposition, E.pts), Z = H.selectAll("g.slicetext").data(E.text && W !== "none" ? [0] : []);
                Z.enter().append("g").classed("slicetext", !0), Z.exit().remove(), Z.each(function() {
                  var re = k.ensureSingle(m.select(this), "text", "", function(te) {
                    te.attr("data-notex", 1);
                  }), V = k.ensureUniformFontSize(f, l(I, E, w.font));
                  re.text(E.text).attr({ class: "slicetext", transform: "", "text-anchor": "middle" }).call(g.font, V).call(r.convertToTspans, f);
                  var B, U, ee, N = g.bBox(re.node()), K = Math.min(E.BL[1], E.BR[1]) + j, X = Math.max(E.TL[1], E.TR[1]) + j;
                  U = Math.max(E.TL[0], E.BL[0]) + z, ee = Math.min(E.TR[0], E.BR[0]) + z, (B = n(U, ee, K, X, N, { isHorizontal: !0, constrained: !0, angle: 0, anchor: "middle" })).fontSize = V.size, t(I.type, B, w), T[R].transform = B, k.setTransormAndDisplay(re, B);
                });
              }
            });
            var S = m.select(this).selectAll("g.titletext").data(I.title.text ? [0] : []);
            S.enter().append("g").classed("titletext", !0), S.exit().remove(), S.each(function() {
              var E = k.ensureSingle(m.select(this), "text", "", function(j) {
                j.attr("data-notex", 1);
              }), R = I.title.text;
              I._meta && (R = k.templateString(R, I._meta)), E.text(R).attr({ class: "titletext", transform: "", "text-anchor": "middle" }).call(g.font, I.title.font).call(r.convertToTspans, f);
              var z = c(A, w._size);
              E.attr("transform", e(z.x, z.y) + x(Math.min(1, z.scale)) + e(z.tx, z.ty));
            });
          });
        });
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../lib/svg_text_utils": 541, "../bar/plot": 668, "../bar/uniform_text": 673, "../pie/helpers": 915, "../pie/plot": 919, "@plotly/d3": 58 }], 800: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../pie/style_one"), k = v("../bar/uniform_text").resizeText;
      Q.exports = function(x) {
        var e = x._fullLayout._funnelarealayer.selectAll(".trace");
        k(x, e, "funnelarea"), e.each(function(r) {
          var n = r[0].trace, s = m.select(this);
          s.style({ opacity: n.opacity }), s.selectAll("path.surface").each(function(t) {
            m.select(this).call(g, t, n);
          });
        });
      };
    }, { "../bar/uniform_text": 673, "../pie/style_one": 921, "@plotly/d3": 58 }], 801: [function(v, Q, $) {
      var m = v("../scatter/attributes"), g = v("../../plots/attributes"), k = v("../../plots/font_attributes"), x = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, e = v("../../plots/template_attributes").hovertemplateAttrs, r = v("../../plots/template_attributes").texttemplateAttrs, n = v("../../components/colorscale/attributes"), s = v("../../lib/extend").extendFlat;
      Q.exports = s({ z: { valType: "data_array", editType: "calc" }, x: s({}, m.x, { impliedEdits: { xtype: "array" } }), x0: s({}, m.x0, { impliedEdits: { xtype: "scaled" } }), dx: s({}, m.dx, { impliedEdits: { xtype: "scaled" } }), y: s({}, m.y, { impliedEdits: { ytype: "array" } }), y0: s({}, m.y0, { impliedEdits: { ytype: "scaled" } }), dy: s({}, m.dy, { impliedEdits: { ytype: "scaled" } }), xperiod: s({}, m.xperiod, { impliedEdits: { xtype: "scaled" } }), yperiod: s({}, m.yperiod, { impliedEdits: { ytype: "scaled" } }), xperiod0: s({}, m.xperiod0, { impliedEdits: { xtype: "scaled" } }), yperiod0: s({}, m.yperiod0, { impliedEdits: { ytype: "scaled" } }), xperiodalignment: s({}, m.xperiodalignment, { impliedEdits: { xtype: "scaled" } }), yperiodalignment: s({}, m.yperiodalignment, { impliedEdits: { ytype: "scaled" } }), text: { valType: "data_array", editType: "calc" }, hovertext: { valType: "data_array", editType: "calc" }, transpose: { valType: "boolean", dflt: !1, editType: "calc" }, xtype: { valType: "enumerated", values: ["array", "scaled"], editType: "calc+clearAxisTypes" }, ytype: { valType: "enumerated", values: ["array", "scaled"], editType: "calc+clearAxisTypes" }, zsmooth: { valType: "enumerated", values: ["fast", "best", !1], dflt: !1, editType: "calc" }, hoverongaps: { valType: "boolean", dflt: !0, editType: "none" }, connectgaps: { valType: "boolean", editType: "calc" }, xgap: { valType: "number", dflt: 0, min: 0, editType: "plot" }, ygap: { valType: "number", dflt: 0, min: 0, editType: "plot" }, xhoverformat: x("x"), yhoverformat: x("y"), zhoverformat: x("z", 1), hovertemplate: e(), texttemplate: r({ arrayOk: !1, editType: "plot" }, { keys: ["x", "y", "z", "text"] }), textfont: k({ editType: "plot", autoSize: !0, autoColor: !0, colorEditType: "style" }), showlegend: s({}, g.showlegend, { dflt: !1 }) }, { transforms: void 0 }, n("", { cLetter: "z", autoColorDflt: !1 }));
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 802: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../../plots/cartesian/axes"), x = v("../../plots/cartesian/align_period"), e = v("../histogram2d/calc"), r = v("../../components/colorscale/calc"), n = v("./convert_column_xyz"), s = v("./clean_2d_array"), t = v("./interp2d"), d = v("./find_empties"), u = v("./make_bound_array"), o = v("../../constants/numerical").BADNUM;
      function h(l) {
        for (var i = [], p = l.length, c = 0; c < p; c++) {
          var a = l[c];
          a !== o && i.push(a);
        }
        return i;
      }
      Q.exports = function(l, i) {
        var p, c, a, y, f, _, b, w, T, L, A, I = k.getFromId(l, i.xaxis || "x"), P = k.getFromId(l, i.yaxis || "y"), S = m.traceIs(i, "contour"), E = m.traceIs(i, "histogram"), R = m.traceIs(i, "gl2d"), z = S ? "best" : i.zsmooth;
        if (I._minDtick = 0, P._minDtick = 0, E)
          y = (A = e(l, i)).orig_x, p = A.x, c = A.x0, a = A.dx, w = A.orig_y, f = A.y, _ = A.y0, b = A.dy, T = A.z;
        else {
          var j = i.z;
          g.isArray1D(j) ? (n(i, I, P, "x", "y", ["z"]), p = i._x, f = i._y, j = i._z) : (y = i.x ? I.makeCalcdata(i, "x") : [], w = i.y ? P.makeCalcdata(i, "y") : [], p = x(i, I, "x", y).vals, f = x(i, P, "y", w).vals, i._x = p, i._y = f), c = i.x0, a = i.dx, _ = i.y0, b = i.dy, T = s(j, i, I, P);
        }
        function H(X) {
          z = i._input.zsmooth = i.zsmooth = !1, g.warn('cannot use zsmooth: "fast": ' + X);
        }
        if ((I.rangebreaks || P.rangebreaks) && (T = function(X, te, ie) {
          for (var le = [], oe = -1, ve = 0; ve < ie.length; ve++)
            if (te[ve] !== o) {
              oe++, le[oe] = [];
              for (var ue = 0; ue < ie[ve].length; ue++)
                X[ue] !== o && le[oe].push(ie[ve][ue]);
            }
          return le;
        }(p, f, T), E || (p = h(p), f = h(f), i._x = p, i._y = f)), E || !S && !i.connectgaps || (i._emptypoints = d(T), t(T, i._emptypoints)), z === "fast") {
          if (I.type === "log" || P.type === "log")
            H("log axis found");
          else if (!E) {
            if (p.length) {
              var Y = (p[p.length - 1] - p[0]) / (p.length - 1), J = Math.abs(Y / 100);
              for (L = 0; L < p.length - 1; L++)
                if (Math.abs(p[L + 1] - p[L] - Y) > J) {
                  H("x scale is not linear");
                  break;
                }
            }
            if (f.length && z === "fast") {
              var W = (f[f.length - 1] - f[0]) / (f.length - 1), Z = Math.abs(W / 100);
              for (L = 0; L < f.length - 1; L++)
                if (Math.abs(f[L + 1] - f[L] - W) > Z) {
                  H("y scale is not linear");
                  break;
                }
            }
          }
        }
        var re = g.maxRowLength(T), V = i.xtype === "scaled" ? "" : p, B = u(i, V, c, a, re, I), U = i.ytype === "scaled" ? "" : f, ee = u(i, U, _, b, T.length, P);
        R || (i._extremes[I._id] = k.findExtremes(I, B), i._extremes[P._id] = k.findExtremes(P, ee));
        var N = { x: B, y: ee, z: T, text: i._text || i.text, hovertext: i._hovertext || i.hovertext };
        if (i.xperiodalignment && y && (N.orig_x = y), i.yperiodalignment && w && (N.orig_y = w), V && V.length === B.length - 1 && (N.xCenter = V), U && U.length === ee.length - 1 && (N.yCenter = U), E && (N.xRanges = A.xRanges, N.yRanges = A.yRanges, N.pts = A.pts), S || r(l, i, { vals: T, cLetter: "z" }), S && i.contours && i.contours.coloring === "heatmap") {
          var K = { type: i.type === "contour" ? "heatmap" : "histogram2d", xcalendar: i.xcalendar, ycalendar: i.ycalendar };
          N.xfill = u(K, V, c, a, re, I), N.yfill = u(K, U, _, b, T.length, P);
        }
        return [N];
      };
    }, { "../../components/colorscale/calc": 375, "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "../../registry": 647, "../histogram2d/calc": 835, "./clean_2d_array": 803, "./convert_column_xyz": 805, "./find_empties": 807, "./interp2d": 810, "./make_bound_array": 812 }], 803: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../constants/numerical").BADNUM;
      Q.exports = function(x, e, r, n) {
        var s, t, d, u, o, h;
        function l(f) {
          if (m(f))
            return +f;
        }
        if (e && e.transpose) {
          for (s = 0, o = 0; o < x.length; o++)
            s = Math.max(s, x[o].length);
          if (s === 0)
            return !1;
          d = function(f) {
            return f.length;
          }, u = function(f, _, b) {
            return (f[b] || [])[_];
          };
        } else
          s = x.length, d = function(f, _) {
            return f[_].length;
          }, u = function(f, _, b) {
            return (f[_] || [])[b];
          };
        var i = function(f, _, b) {
          return _ === k || b === k ? k : u(f, _, b);
        };
        function p(f) {
          if (e && e.type !== "carpet" && e.type !== "contourcarpet" && f && f.type === "category" && e["_" + f._id.charAt(0)].length) {
            var _ = f._id.charAt(0), b = {}, w = e["_" + _ + "CategoryMap"] || e[_];
            for (o = 0; o < w.length; o++)
              b[w[o]] = o;
            return function(T) {
              var L = b[f._categories[T]];
              return L + 1 ? L : k;
            };
          }
          return g.identity;
        }
        var c = p(r), a = p(n);
        n && n.type === "category" && (s = n._categories.length);
        var y = new Array(s);
        for (o = 0; o < s; o++)
          for (t = r && r.type === "category" ? r._categories.length : d(x, o), y[o] = new Array(t), h = 0; h < t; h++)
            y[o][h] = l(i(x, a(o), c(h)));
        return y;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "fast-isnumeric": 190 }], 804: [function(v, Q, $) {
      Q.exports = { min: "zmin", max: "zmax" };
    }, {}], 805: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../constants/numerical").BADNUM, k = v("../../plots/cartesian/align_period");
      Q.exports = function(x, e, r, n, s, t) {
        var d = x._length, u = e.makeCalcdata(x, n), o = r.makeCalcdata(x, s);
        u = k(x, e, n, u).vals, o = k(x, r, s, o).vals;
        var h, l, i, p, c = x.text, a = c !== void 0 && m.isArray1D(c), y = x.hovertext, f = y !== void 0 && m.isArray1D(y), _ = m.distinctVals(u), b = _.vals, w = m.distinctVals(o), T = w.vals, L = [], A = T.length, I = b.length;
        for (h = 0; h < t.length; h++)
          L[h] = m.init2dArray(A, I);
        a && (i = m.init2dArray(A, I)), f && (p = m.init2dArray(A, I));
        var P = m.init2dArray(A, I);
        for (h = 0; h < d; h++)
          if (u[h] !== g && o[h] !== g) {
            var S = m.findBin(u[h] + _.minDiff / 2, b), E = m.findBin(o[h] + w.minDiff / 2, T);
            for (l = 0; l < t.length; l++) {
              var R = x[t[l]];
              L[l][E][S] = R[h], P[E][S] = h;
            }
            a && (i[E][S] = c[h]), f && (p[E][S] = y[h]);
          }
        for (x["_" + n] = b, x["_" + s] = T, l = 0; l < t.length; l++)
          x["_" + t[l]] = L[l];
        a && (x._text = i), f && (x._hovertext = p), e && e.type === "category" && (x["_" + n + "CategoryMap"] = b.map(function(z) {
          return e._categories[z];
        })), r && r.type === "category" && (x["_" + s + "CategoryMap"] = T.map(function(z) {
          return r._categories[z];
        })), x._after2before = P;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563 }], 806: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./xyz_defaults"), k = v("./label_defaults"), x = v("../scatter/period_defaults"), e = v("./style_defaults"), r = v("../../components/colorscale/defaults"), n = v("./attributes");
      Q.exports = function(s, t, d, u) {
        function o(h, l) {
          return m.coerce(s, t, n, h, l);
        }
        g(s, t, o, u) ? (x(s, t, u, o), o("xhoverformat"), o("yhoverformat"), o("text"), o("hovertext"), o("hovertemplate"), k(o, u), e(s, t, o, u), o("hoverongaps"), o("connectgaps", m.isArray1D(t.z) && t.zsmooth !== !1), r(s, t, u, o, { prefix: "", cLetter: "z" })) : t.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "../scatter/period_defaults": 956, "./attributes": 801, "./label_defaults": 811, "./style_defaults": 815, "./xyz_defaults": 816 }], 807: [function(v, Q, $) {
      var m = v("../../lib").maxRowLength;
      Q.exports = function(g) {
        var k, x, e, r, n, s, t, d, u = [], o = {}, h = [], l = g[0], i = [], p = [0, 0, 0], c = m(g);
        for (x = 0; x < g.length; x++)
          for (k = i, i = l, l = g[x + 1] || [], e = 0; e < c; e++)
            i[e] === void 0 && ((s = (i[e - 1] !== void 0 ? 1 : 0) + (i[e + 1] !== void 0 ? 1 : 0) + (k[e] !== void 0 ? 1 : 0) + (l[e] !== void 0 ? 1 : 0)) ? (x === 0 && s++, e === 0 && s++, x === g.length - 1 && s++, e === i.length - 1 && s++, s < 4 && (o[[x, e]] = [x, e, s]), u.push([x, e, s])) : h.push([x, e]));
        for (; h.length; ) {
          for (t = {}, d = !1, n = h.length - 1; n >= 0; n--)
            (s = ((o[[(x = (r = h[n])[0]) - 1, e = r[1]]] || p)[2] + (o[[x + 1, e]] || p)[2] + (o[[x, e - 1]] || p)[2] + (o[[x, e + 1]] || p)[2]) / 20) && (t[r] = [x, e, s], h.splice(n, 1), d = !0);
          if (!d)
            throw "findEmpties iterated with no new neighbors";
          for (r in t)
            o[r] = t[r], u.push(t[r]);
        }
        return u.sort(function(a, y) {
          return y[2] - a[2];
        });
      };
    }, { "../../lib": 515 }], 808: [function(v, Q, $) {
      var m = v("../../components/fx"), g = v("../../lib"), k = v("../../plots/cartesian/axes"), x = v("../../components/colorscale").extractOpts;
      Q.exports = function(e, r, n, s, t) {
        t || (t = {});
        var d, u, o, h, l = t.isContour, i = e.cd[0], p = i.trace, c = e.xa, a = e.ya, y = i.x, f = i.y, _ = i.z, b = i.xCenter, w = i.yCenter, T = i.zmask, L = p.zhoverformat, A = y, I = f;
        if (e.index !== !1) {
          try {
            o = Math.round(e.index[1]), h = Math.round(e.index[0]);
          } catch {
            return void g.error("Error hovering on heatmap, pointNumber must be [row,col], found:", e.index);
          }
          if (o < 0 || o >= _[0].length || h < 0 || h > _.length)
            return;
        } else {
          if (m.inbox(r - y[0], r - y[y.length - 1], 0) > 0 || m.inbox(n - f[0], n - f[f.length - 1], 0) > 0)
            return;
          if (l) {
            var P;
            for (A = [2 * y[0] - y[1]], P = 1; P < y.length; P++)
              A.push((y[P] + y[P - 1]) / 2);
            for (A.push([2 * y[y.length - 1] - y[y.length - 2]]), I = [2 * f[0] - f[1]], P = 1; P < f.length; P++)
              I.push((f[P] + f[P - 1]) / 2);
            I.push([2 * f[f.length - 1] - f[f.length - 2]]);
          }
          o = Math.max(0, Math.min(A.length - 2, g.findBin(r, A))), h = Math.max(0, Math.min(I.length - 2, g.findBin(n, I)));
        }
        var S, E, R = c.c2p(y[o]), z = c.c2p(y[o + 1]), j = a.c2p(f[h]), H = a.c2p(f[h + 1]);
        l ? (S = i.orig_x || y, E = i.orig_y || f, z = R, d = S[o], H = j, u = E[h]) : (S = i.orig_x || b || y, E = i.orig_y || w || f, d = b ? S[o] : (S[o] + S[o + 1]) / 2, u = w ? E[h] : (E[h] + E[h + 1]) / 2, c && c.type === "category" && (d = y[o]), a && a.type === "category" && (u = f[h]), p.zsmooth && (R = z = c.c2p(d), j = H = a.c2p(u)));
        var Y = _[h][o];
        if (T && !T[h][o] && (Y = void 0), Y !== void 0 || p.hoverongaps) {
          var J;
          Array.isArray(i.hovertext) && Array.isArray(i.hovertext[h]) ? J = i.hovertext[h][o] : Array.isArray(i.text) && Array.isArray(i.text[h]) && (J = i.text[h][o]);
          var W = x(p), Z = { type: "linear", range: [W.min, W.max], hoverformat: L, _separators: c._separators, _numFormat: c._numFormat }, re = k.tickText(Z, Y, "hover").text;
          return [g.extendFlat(e, { index: p._after2before ? p._after2before[h][o] : [h, o], distance: e.maxHoverDistance, spikeDistance: e.maxSpikeDistance, x0: R, x1: z, y0: j, y1: H, xLabelVal: d, yLabelVal: u, zLabelVal: Y, zLabel: re, text: J })];
        }
      };
    }, { "../../components/colorscale": 379, "../../components/fx": 407, "../../lib": 515, "../../plots/cartesian/axes": 566 }], 809: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("./plot"), colorbar: v("./colorbar"), style: v("./style"), hoverPoints: v("./hover"), moduleType: "trace", name: "heatmap", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "2dMap", "showLegend"], meta: {} };
    }, { "../../plots/cartesian": 578, "./attributes": 801, "./calc": 802, "./colorbar": 804, "./defaults": 806, "./hover": 808, "./plot": 813, "./style": 814 }], 810: [function(v, Q, $) {
      var m = v("../../lib"), g = [[-1, 0], [1, 0], [0, -1], [0, 1]];
      function k(e) {
        return 0.5 - 0.25 * Math.min(1, 0.5 * e);
      }
      function x(e, r, n) {
        var s, t, d, u, o, h, l, i, p, c, a, y, f, _ = 0;
        for (u = 0; u < r.length; u++) {
          for (t = (s = r[u])[0], d = s[1], a = e[t][d], c = 0, p = 0, o = 0; o < 4; o++)
            (l = e[t + (h = g[o])[0]]) && (i = l[d + h[1]]) !== void 0 && (c === 0 ? y = f = i : (y = Math.min(y, i), f = Math.max(f, i)), p++, c += i);
          if (p === 0)
            throw "iterateInterp2d order is wrong: no defined neighbors";
          e[t][d] = c / p, a === void 0 ? p < 4 && (_ = 1) : (e[t][d] = (1 + n) * e[t][d] - n * a, f > y && (_ = Math.max(_, Math.abs(e[t][d] - a) / (f - y))));
        }
        return _;
      }
      Q.exports = function(e, r) {
        var n, s = 1;
        for (x(e, r), n = 0; n < r.length && !(r[n][2] < 4); n++)
          ;
        for (r = r.slice(n), n = 0; n < 100 && s > 0.01; n++)
          s = x(e, r, k(s));
        return s > 0.01 && m.log("interp2d didn't converge quickly", s), e;
      };
    }, { "../../lib": 515 }], 811: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        g("texttemplate");
        var x = m.extendFlat({}, k.font, { color: "auto", size: "auto" });
        m.coerceFont(g, "textfont", x);
      };
    }, { "../../lib": 515 }], 812: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(k, x, e, r, n, s) {
        var t, d, u, o = [], h = m.traceIs(k, "contour"), l = m.traceIs(k, "histogram"), i = m.traceIs(k, "gl2d");
        if (g(x) && x.length > 1 && !l && s.type !== "category") {
          var p = x.length;
          if (!(p <= n))
            return h ? x.slice(0, n) : x.slice(0, n + 1);
          if (h || i)
            o = x.slice(0, n);
          else if (n === 1)
            o = [x[0] - 0.5, x[0] + 0.5];
          else {
            for (o = [1.5 * x[0] - 0.5 * x[1]], u = 1; u < p; u++)
              o.push(0.5 * (x[u - 1] + x[u]));
            o.push(1.5 * x[p - 1] - 0.5 * x[p - 2]);
          }
          if (p < n) {
            var c = o[o.length - 1], a = c - o[o.length - 2];
            for (u = p; u < n; u++)
              c += a, o.push(c);
          }
        } else {
          var y = k[s._id.charAt(0) + "calendar"];
          for (l ? t = s.r2c(e, 0, y) : g(x) && x.length === 1 ? t = x[0] : e === void 0 ? t = 0 : t = (s.type === "log" ? s.d2c : s.r2c)(e, 0, y), d = r || 1, u = h || i ? 0 : -0.5; u < n; u++)
            o.push(t + d * u);
        }
        return o;
      };
    }, { "../../lib": 515, "../../registry": 647 }], 813: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("tinycolor2"), k = v("../../registry"), x = v("../../components/drawing"), e = v("../../plots/cartesian/axes"), r = v("../../lib"), n = v("../../lib/svg_text_utils"), s = v("../scatter/format_labels"), t = v("../../components/color"), d = v("../../components/colorscale").extractOpts, u = v("../../components/colorscale").makeColorScaleFuncFromTrace, o = v("../../constants/xmlns_namespaces"), h = v("../../constants/alignment").LINE_SPACING;
      function l(y) {
        return y.selectAll("g.heatmap-label");
      }
      function i(y) {
        l(y).remove();
      }
      function p(y, f) {
        var _ = f.length - 2, b = r.constrain(r.findBin(y, f), 0, _), w = f[b], T = f[b + 1], L = r.constrain(b + (y - w) / (T - w) - 0.5, 0, _), A = Math.round(L), I = Math.abs(L - A);
        return L && L !== _ && I ? { bin0: A, frac: I, bin1: Math.round(A + I / (L - A)) } : { bin0: A, bin1: A, frac: 0 };
      }
      function c(y, f) {
        var _ = f.length - 1, b = r.constrain(r.findBin(y, f), 0, _), w = f[b], T = (y - w) / (f[b + 1] - w) || 0;
        return T <= 0 ? { bin0: b, bin1: b, frac: 0 } : T < 0.5 ? { bin0: b, bin1: b + 1, frac: T } : { bin0: b + 1, bin1: b, frac: 1 - T };
      }
      function a(y, f, _) {
        y[f] = _[0], y[f + 1] = _[1], y[f + 2] = _[2], y[f + 3] = Math.round(255 * _[3]);
      }
      Q.exports = function(y, f, _, b) {
        var w = f.xaxis, T = f.yaxis;
        r.makeTraceGroups(b, _, "hm").each(function(L) {
          var A, I, P, S, E, R, z, j, H = m.select(this), Y = L[0], J = Y.trace, W = J.xgap || 0, Z = J.ygap || 0, re = Y.z, V = Y.x, B = Y.y, U = Y.xCenter, ee = Y.yCenter, N = k.traceIs(J, "contour"), K = N ? "best" : J.zsmooth, X = re.length, te = r.maxRowLength(re), ie = !1, le = !1;
          for (R = 0; A === void 0 && R < V.length - 1; )
            A = w.c2p(V[R]), R++;
          for (R = V.length - 1; I === void 0 && R > 0; )
            I = w.c2p(V[R]), R--;
          for (I < A && (P = I, I = A, A = P, ie = !0), R = 0; S === void 0 && R < B.length - 1; )
            S = T.c2p(B[R]), R++;
          for (R = B.length - 1; E === void 0 && R > 0; )
            E = T.c2p(B[R]), R--;
          if (E < S && (P = S, S = E, E = P, le = !0), N && (U = V, ee = B, V = Y.xfill, B = Y.yfill), K !== "fast") {
            var oe = K === "best" ? 0 : 0.5;
            A = Math.max(-oe * w._length, A), I = Math.min((1 + oe) * w._length, I), S = Math.max(-oe * T._length, S), E = Math.min((1 + oe) * T._length, E);
          }
          var ve, ue, ye = Math.round(I - A), Ae = Math.round(E - S);
          if (ye <= 0 || Ae <= 0)
            return H.selectAll("image").data([]).exit().remove(), void i(H);
          K === "fast" ? (ve = te, ue = X) : (ve = ye, ue = Ae);
          var pe = document.createElement("canvas");
          pe.width = ve, pe.height = ue;
          var ge, we, se = pe.getContext("2d"), de = u(J, { noNumericCheck: !0, returnArray: !0 });
          K === "fast" ? (ge = ie ? function(rn) {
            return te - 1 - rn;
          } : r.identity, we = le ? function(rn) {
            return X - 1 - rn;
          } : r.identity) : (ge = function(rn) {
            return r.constrain(Math.round(w.c2p(V[rn]) - A), 0, ye);
          }, we = function(rn) {
            return r.constrain(Math.round(T.c2p(B[rn]) - S), 0, Ae);
          });
          var Te, Ee, Me, ze, Ie = we(0), Oe = [Ie, Ie], Ze = ie ? 0 : 1, Fe = le ? 0 : 1, Pe = 0, De = 0, Ge = 0, Qe = 0;
          function ot(rn, vn) {
            if (rn !== void 0) {
              var xn = de(rn);
              return xn[0] = Math.round(xn[0]), xn[1] = Math.round(xn[1]), xn[2] = Math.round(xn[2]), Pe += vn, De += xn[0] * vn, Ge += xn[1] * vn, Qe += xn[2] * vn, xn;
            }
            return [0, 0, 0, 0];
          }
          function vt(rn, vn, xn, $n) {
            var Br = rn[xn.bin0];
            if (Br === void 0)
              return ot(void 0, 1);
            var tn, mn = rn[xn.bin1], Qr = vn[xn.bin0], cn = vn[xn.bin1], Hn = mn - Br || 0, _n = Qr - Br || 0;
            return tn = mn === void 0 ? cn === void 0 ? 0 : Qr === void 0 ? 2 * (cn - Br) : 2 * (2 * cn - Qr - Br) / 3 : cn === void 0 ? Qr === void 0 ? 0 : 2 * (2 * Br - mn - Qr) / 3 : Qr === void 0 ? 2 * (2 * cn - mn - Br) / 3 : cn + Br - mn - Qr, ot(Br + xn.frac * Hn + $n.frac * (_n + xn.frac * tn));
          }
          if (K) {
            var bt, yt = 0;
            try {
              bt = new Uint8Array(ye * Ae * 4);
            } catch {
              bt = new Array(ye * Ae * 4);
            }
            if (K === "best") {
              var tt, Ke, mt, Ft = U || V, Vt = ee || B, Xt = new Array(Ft.length), Gt = new Array(Vt.length), nr = new Array(ye), It = U ? c : p, Be = ee ? c : p;
              for (R = 0; R < Ft.length; R++)
                Xt[R] = Math.round(w.c2p(Ft[R]) - A);
              for (R = 0; R < Vt.length; R++)
                Gt[R] = Math.round(T.c2p(Vt[R]) - S);
              for (R = 0; R < ye; R++)
                nr[R] = It(R, Xt);
              for (z = 0; z < Ae; z++)
                for (Ke = re[(tt = Be(z, Gt)).bin0], mt = re[tt.bin1], R = 0; R < ye; R++, yt += 4)
                  a(bt, yt, ze = vt(Ke, mt, nr[R], tt));
            } else
              for (z = 0; z < X; z++)
                for (Me = re[z], Oe = we(z), R = 0; R < ye; R++)
                  ze = ot(Me[R], 1), a(bt, yt = 4 * (Oe * ye + ge(R)), ze);
            var He = se.createImageData(ye, Ae);
            try {
              He.data.set(bt);
            } catch {
              var he = He.data, be = he.length;
              for (z = 0; z < be; z++)
                he[z] = bt[z];
            }
            se.putImageData(He, 0, 0);
          } else {
            var Re = Math.floor(W / 2), Ue = Math.floor(Z / 2);
            for (z = 0; z < X; z++)
              if (Me = re[z], Oe.reverse(), Oe[Fe] = we(z + 1), Oe[0] !== Oe[1] && Oe[0] !== void 0 && Oe[1] !== void 0)
                for (Te = [Ee = ge(0), Ee], R = 0; R < te; R++)
                  Te.reverse(), Te[Ze] = ge(R + 1), Te[0] !== Te[1] && Te[0] !== void 0 && Te[1] !== void 0 && (ze = ot(Me[R], (Te[1] - Te[0]) * (Oe[1] - Oe[0])), se.fillStyle = "rgba(" + ze.join(",") + ")", se.fillRect(Te[0] + Re, Oe[0] + Ue, Te[1] - Te[0] - W, Oe[1] - Oe[0] - Z));
          }
          De = Math.round(De / Pe), Ge = Math.round(Ge / Pe), Qe = Math.round(Qe / Pe);
          var Xe = g("rgb(" + De + "," + Ge + "," + Qe + ")");
          y._hmpixcount = (y._hmpixcount || 0) + Pe, y._hmlumcount = (y._hmlumcount || 0) + Pe * Xe.getLuminance();
          var qe = H.selectAll("image").data(L);
          qe.enter().append("svg:image").attr({ xmlns: o.svg, preserveAspectRatio: "none" }), qe.attr({ height: Ae, width: ye, x: A, y: S, "xlink:href": pe.toDataURL("image/png") }), i(H);
          var st = J.texttemplate;
          if (st) {
            var it = d(J), Tt = { type: "linear", range: [it.min, it.max], _separators: w._separators, _numFormat: w._numFormat }, Pt = J.type === "histogram2dcontour", rt = J.type === "contour", ut = rt ? X - 1 : X, Bt = rt ? 1 : 0, wt = rt ? te - 1 : te, Lt = [];
            for (R = rt ? 1 : 0; R < ut; R++) {
              var Se;
              if (rt)
                Se = Y.y[R];
              else if (Pt) {
                if (R === 0 || R === X - 1)
                  continue;
                Se = Y.y[R];
              } else if (Y.yCenter)
                Se = Y.yCenter[R];
              else {
                if (R + 1 === X && Y.y[R + 1] === void 0)
                  continue;
                Se = (Y.y[R] + Y.y[R + 1]) / 2;
              }
              var We = Math.round(T.c2p(Se));
              if (!(0 > We || We > T._length))
                for (z = Bt; z < wt; z++) {
                  var nt;
                  if (rt)
                    nt = Y.x[z];
                  else if (Pt) {
                    if (z === 0 || z === te - 1)
                      continue;
                    nt = Y.x[z];
                  } else if (Y.xCenter)
                    nt = Y.xCenter[z];
                  else {
                    if (z + 1 === te && Y.x[z + 1] === void 0)
                      continue;
                    nt = (Y.x[z] + Y.x[z + 1]) / 2;
                  }
                  var ft = Math.round(w.c2p(nt));
                  if (!(0 > ft || ft > w._length)) {
                    var Mt = s({ x: nt, y: Se }, J, y._fullLayout);
                    Mt.x = nt, Mt.y = Se;
                    var Nt = Y.z[R][z];
                    Nt === void 0 ? (Mt.z = "", Mt.zLabel = "") : (Mt.z = Nt, Mt.zLabel = e.tickText(Tt, Nt, "hover").text);
                    var Zt = Y.text && Y.text[R] && Y.text[R][z];
                    Zt !== void 0 && Zt !== !1 || (Zt = ""), Mt.text = Zt;
                    var Ut = r.texttemplateString(st, Mt, y._fullLayout._d3locale, Mt, J._meta || {});
                    if (Ut) {
                      var fr = Ut.split("<br>"), Tr = fr.length, ur = 0;
                      for (j = 0; j < Tr; j++)
                        ur = Math.max(ur, fr[j].length);
                      Lt.push({ l: Tr, c: ur, t: Ut, x: ft, y: We, z: Nt });
                    }
                  }
                }
            }
            var Kt = J.textfont, $t = Kt.family, er = Kt.size, cr = y._fullLayout.font.size;
            if (!er || er === "auto") {
              var gr = 1 / 0, Mr = 1 / 0, Ir = 0, Fr = 0;
              for (j = 0; j < Lt.length; j++) {
                var Gr = Lt[j];
                if (Ir = Math.max(Ir, Gr.l), Fr = Math.max(Fr, Gr.c), j < Lt.length - 1) {
                  var un = Lt[j + 1], $r = Math.abs(un.x - Gr.x), Dn = Math.abs(un.y - Gr.y);
                  $r && (gr = Math.min(gr, $r)), Dn && (Mr = Math.min(Mr, Dn));
                }
              }
              isFinite(gr) && isFinite(Mr) ? (gr -= W, Mr -= Z, gr /= Fr, Mr /= Ir, gr /= h / 2, Mr /= h, er = Math.min(Math.floor(gr), Math.floor(Mr), cr)) : er = cr;
            }
            if (er <= 0 || !isFinite(er))
              return;
            l(H).data(Lt).enter().append("g").classed("heatmap-label", 1).append("text").attr("text-anchor", "middle").each(function(rn) {
              var vn = m.select(this), xn = Kt.color;
              xn && xn !== "auto" || (xn = t.contrast("rgba(" + de(rn.z).join() + ")")), vn.attr("data-notex", 1).call(n.positionText, function($n) {
                return $n.x;
              }(rn), function($n) {
                return $n.y - er * ($n.l * h / 2 - 1);
              }(rn)).call(x.font, $t, er, xn).text(rn.t).call(n.convertToTspans, y);
            });
          }
        });
      };
    }, { "../../components/color": 367, "../../components/colorscale": 379, "../../components/drawing": 389, "../../constants/alignment": 483, "../../constants/xmlns_namespaces": 492, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "../../registry": 647, "../scatter/format_labels": 945, "@plotly/d3": 58, tinycolor2: 313 }], 814: [function(v, Q, $) {
      var m = v("@plotly/d3");
      Q.exports = function(g) {
        m.select(g).selectAll(".hm image").style("opacity", function(k) {
          return k.trace.opacity;
        });
      };
    }, { "@plotly/d3": 58 }], 815: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        k("zsmooth") === !1 && (k("xgap"), k("ygap")), k("zhoverformat");
      };
    }, {}], 816: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../registry");
      function x(e, r) {
        var n = r(e);
        return (n ? r(e + "type", "array") : "scaled") === "scaled" && (r(e + "0"), r("d" + e)), n;
      }
      Q.exports = function(e, r, n, s, t, d) {
        var u, o, h = n("z");
        if (t = t || "x", d = d || "y", h === void 0 || !h.length)
          return 0;
        if (g.isArray1D(e.z)) {
          u = n(t), o = n(d);
          var l = g.minRowLength(u), i = g.minRowLength(o);
          if (l === 0 || i === 0)
            return 0;
          r._length = Math.min(l, i, h.length);
        } else {
          if (u = x(t, n), o = x(d, n), !function(p) {
            for (var c, a = !0, y = !1, f = !1, _ = 0; _ < p.length; _++) {
              if (c = p[_], !g.isArrayOrTypedArray(c)) {
                a = !1;
                break;
              }
              c.length > 0 && (y = !0);
              for (var b = 0; b < c.length; b++)
                if (m(c[b])) {
                  f = !0;
                  break;
                }
            }
            return a && y && f;
          }(h))
            return 0;
          n("transpose"), r._length = null;
        }
        return e.type === "heatmapgl" || k.getComponentMethod("calendars", "handleTraceDefaults")(e, r, [t, d], s), !0;
      };
    }, { "../../lib": 515, "../../registry": 647, "fast-isnumeric": 190 }], 817: [function(v, Q, $) {
      for (var m = v("../heatmap/attributes"), g = v("../../components/colorscale/attributes"), k = v("../../lib/extend").extendFlat, x = v("../../plot_api/edit_types").overrideAll, e = ["z", "x", "x0", "dx", "y", "y0", "dy", "text", "transpose", "xtype", "ytype"], r = {}, n = 0; n < e.length; n++) {
        var s = e[n];
        r[s] = m[s];
      }
      r.zsmooth = { valType: "enumerated", values: ["fast", !1], dflt: "fast", editType: "calc" }, k(r, g("", { cLetter: "z", autoColorDflt: !1 })), Q.exports = x(r, "calc", "nested");
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../heatmap/attributes": 801 }], 818: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_heatmap2d, g = v("../../plots/cartesian/axes"), k = v("../../lib/str2rgbarray");
      function x(r, n) {
        this.scene = r, this.uid = n, this.type = "heatmapgl", this.name = "", this.hoverinfo = "all", this.xData = [], this.yData = [], this.zData = [], this.textLabels = [], this.idToIndex = [], this.bounds = [0, 0, 0, 0], this.options = { zsmooth: "fast", z: [], x: [], y: [], shape: [0, 0], colorLevels: [0], colorValues: [0, 0, 0, 1] }, this.heatmap = m(r.glplot, this.options), this.heatmap._trace = this;
      }
      var e = x.prototype;
      e.handlePick = function(r) {
        var n = this.options, s = n.shape, t = r.pointId, d = t % s[0], u = Math.floor(t / s[0]), o = t;
        return { trace: this, dataCoord: r.dataCoord, traceCoord: [n.x[d], n.y[u], n.z[o]], textLabel: this.textLabels[t], name: this.name, pointIndex: [u, d], hoverinfo: this.hoverinfo };
      }, e.update = function(r, n) {
        var s = n[0];
        this.index = r.index, this.name = r.name, this.hoverinfo = r.hoverinfo;
        var t = s.z;
        this.options.z = [].concat.apply([], t);
        var d = t[0].length, u = t.length;
        this.options.shape = [d, u], this.options.x = s.x, this.options.y = s.y, this.options.zsmooth = r.zsmooth;
        var o = function(c) {
          for (var a = c.colorscale, y = c.zmin, f = c.zmax, _ = a.length, b = new Array(_), w = new Array(4 * _), T = 0; T < _; T++) {
            var L = a[T], A = k(L[1]);
            b[T] = y + L[0] * (f - y);
            for (var I = 0; I < 4; I++)
              w[4 * T + I] = A[I];
          }
          return { colorLevels: b, colorValues: w };
        }(r);
        this.options.colorLevels = o.colorLevels, this.options.colorValues = o.colorValues, this.textLabels = [].concat.apply([], r.text), this.heatmap.update(this.options);
        var h, l, i = this.scene.xaxis, p = this.scene.yaxis;
        r.zsmooth === !1 && (h = { ppad: s.x[1] - s.x[0] }, l = { ppad: s.y[1] - s.y[0] }), r._extremes[i._id] = g.findExtremes(i, s.x, h), r._extremes[p._id] = g.findExtremes(p, s.y, l);
      }, e.dispose = function() {
        this.heatmap.dispose();
      }, Q.exports = function(r, n, s) {
        var t = new x(r, n.uid);
        return t.update(n, s), t;
      };
    }, { "../../../stackgl_modules": 1133, "../../lib/str2rgbarray": 540, "../../plots/cartesian/axes": 566 }], 819: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../heatmap/xyz_defaults"), k = v("../../components/colorscale/defaults"), x = v("./attributes");
      Q.exports = function(e, r, n, s) {
        function t(d, u) {
          return m.coerce(e, r, x, d, u);
        }
        g(e, r, t, s) ? (t("text"), t("zsmooth"), k(e, r, s, t, { prefix: "", cLetter: "z" })) : r.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "../heatmap/xyz_defaults": 816, "./attributes": 817 }], 820: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../heatmap/colorbar"), calc: v("../heatmap/calc"), plot: v("./convert"), moduleType: "trace", name: "heatmapgl", basePlotModule: v("../../plots/gl2d"), categories: ["gl", "gl2d", "2dMap"], meta: {} };
    }, { "../../plots/gl2d": 605, "../heatmap/calc": 802, "../heatmap/colorbar": 804, "./attributes": 817, "./convert": 818, "./defaults": 819 }], 821: [function(v, Q, $) {
      var m = v("../bar/attributes"), g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../../plots/template_attributes").texttemplateAttrs, e = v("../../plots/font_attributes"), r = v("./bin_attributes"), n = v("./constants"), s = v("../../lib/extend").extendFlat;
      Q.exports = { x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, xhoverformat: g("x"), yhoverformat: g("y"), text: s({}, m.text, {}), hovertext: s({}, m.hovertext, {}), orientation: m.orientation, histfunc: { valType: "enumerated", values: ["count", "sum", "avg", "min", "max"], dflt: "count", editType: "calc" }, histnorm: { valType: "enumerated", values: ["", "percent", "probability", "density", "probability density"], dflt: "", editType: "calc" }, cumulative: { enabled: { valType: "boolean", dflt: !1, editType: "calc" }, direction: { valType: "enumerated", values: ["increasing", "decreasing"], dflt: "increasing", editType: "calc" }, currentbin: { valType: "enumerated", values: ["include", "exclude", "half"], dflt: "include", editType: "calc" }, editType: "calc" }, nbinsx: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, xbins: r("x", !0), nbinsy: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, ybins: r("y", !0), autobinx: { valType: "boolean", dflt: null, editType: "calc" }, autobiny: { valType: "boolean", dflt: null, editType: "calc" }, bingroup: { valType: "string", dflt: "", editType: "calc" }, hovertemplate: k({}, { keys: n.eventDataKeys }), texttemplate: x({ arrayOk: !1, editType: "plot" }, { keys: ["label", "value"] }), textposition: s({}, m.textposition, { arrayOk: !1 }), textfont: e({ arrayOk: !1, editType: "plot", colorEditType: "style" }), outsidetextfont: e({ arrayOk: !1, editType: "plot", colorEditType: "style" }), insidetextfont: e({ arrayOk: !1, editType: "plot", colorEditType: "style" }), insidetextanchor: m.insidetextanchor, textangle: m.textangle, cliponaxis: m.cliponaxis, constraintext: m.constraintext, marker: m.marker, offsetgroup: m.offsetgroup, alignmentgroup: m.alignmentgroup, selected: m.selected, unselected: m.unselected, _deprecated: { bardir: m._deprecated.bardir } };
    }, { "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642, "../bar/attributes": 657, "./bin_attributes": 823, "./constants": 827 }], 822: [function(v, Q, $) {
      Q.exports = function(m, g) {
        for (var k = m.length, x = 0, e = 0; e < k; e++)
          g[e] ? (m[e] /= g[e], x += m[e]) : m[e] = null;
        return x;
      };
    }, {}], 823: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return { start: { valType: "any", editType: "calc" }, end: { valType: "any", editType: "calc" }, size: { valType: "any", editType: "calc" }, editType: "calc" };
      };
    }, {}], 824: [function(v, Q, $) {
      var m = v("fast-isnumeric");
      Q.exports = { count: function(g, k, x) {
        return x[g]++, 1;
      }, sum: function(g, k, x, e) {
        var r = e[k];
        return m(r) ? (r = Number(r), x[g] += r, r) : 0;
      }, avg: function(g, k, x, e, r) {
        var n = e[k];
        return m(n) && (n = Number(n), x[g] += n, r[g]++), 0;
      }, min: function(g, k, x, e) {
        var r = e[k];
        if (m(r)) {
          if (r = Number(r), !m(x[g]))
            return x[g] = r, r;
          if (x[g] > r) {
            var n = r - x[g];
            return x[g] = r, n;
          }
        }
        return 0;
      }, max: function(g, k, x, e) {
        var r = e[k];
        if (m(r)) {
          if (r = Number(r), !m(x[g]))
            return x[g] = r, r;
          if (x[g] < r) {
            var n = r - x[g];
            return x[g] = r, n;
          }
        }
        return 0;
      } };
    }, { "fast-isnumeric": 190 }], 825: [function(v, Q, $) {
      var m = v("../../constants/numerical"), g = m.ONEAVGYEAR, k = m.ONEAVGMONTH, x = m.ONEDAY, e = m.ONEHOUR, r = m.ONEMIN, n = m.ONESEC, s = v("../../plots/cartesian/axes").tickIncrement;
      function t(h, l, i, p) {
        if (h * l <= 0)
          return 1 / 0;
        for (var c = Math.abs(l - h), a = i.type === "date", y = d(c, a), f = 0; f < 10; f++) {
          var _ = d(80 * y, a);
          if (y === _ || !u(_, h, l, a, i, p))
            break;
          y = _;
        }
        return y;
      }
      function d(h, l) {
        return l && h > n ? h > x ? h > 1.1 * g ? g : h > 1.1 * k ? k : x : h > e ? e : h > r ? r : n : Math.pow(10, Math.floor(Math.log(h) / Math.LN10));
      }
      function u(h, l, i, p, c, a) {
        if (p && h > x) {
          var y = o(l, c, a), f = o(i, c, a), _ = h === g ? 0 : 1;
          return y[_] !== f[_];
        }
        return Math.floor(i / h) - Math.floor(l / h) > 0.1;
      }
      function o(h, l, i) {
        var p = l.c2d(h, g, i).split("-");
        return p[0] === "" && (p.unshift(), p[0] = "-" + p[0]), p;
      }
      Q.exports = function(h, l, i, p, c) {
        var a, y, f = -1.1 * l, _ = -0.1 * l, b = h - _, w = i[0], T = i[1], L = Math.min(t(w + _, w + b, p, c), t(T + _, T + b, p, c)), A = Math.min(t(w + f, w + _, p, c), t(T + f, T + _, p, c));
        if (L > A && A < Math.abs(T - w) / 4e3 ? (a = L, y = !1) : (a = Math.min(L, A), y = !0), p.type === "date" && a > x) {
          var I = a === g ? 1 : 6, P = a === g ? "M12" : "M1";
          return function(S, E) {
            var R = p.c2d(S, g, c), z = R.indexOf("-", I);
            z > 0 && (R = R.substr(0, z));
            var j = p.d2c(R, 0, c);
            if (j < S) {
              var H = s(j, P, !1, c);
              (j + H) / 2 < S + h && (j = H);
            }
            return E && y ? s(j, P, !0, c) : j;
          };
        }
        return function(S, E) {
          var R = a * Math.round(S / a);
          return R + a / 10 < S && R + 0.9 * a < S + h && (R += a), E && y && (R -= a), R;
        };
      };
    }, { "../../constants/numerical": 491, "../../plots/cartesian/axes": 566 }], 826: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../registry"), x = v("../../plots/cartesian/axes"), e = v("../bar/arrays_to_calcdata"), r = v("./bin_functions"), n = v("./norm_functions"), s = v("./average"), t = v("./bin_label_vals");
      function d(u, o, h, l, i) {
        var p, c, a, y, f, _, b, w = l + "bins", T = u._fullLayout, L = o["_" + l + "bingroup"], A = T._histogramBinOpts[L], I = T.barmode === "overlay", P = function(ue) {
          return h.r2c(ue, 0, y);
        }, S = function(ue) {
          return h.c2r(ue, 0, y);
        }, E = h.type === "date" ? function(ue) {
          return ue || ue === 0 ? g.cleanDate(ue, null, y) : null;
        } : function(ue) {
          return m(ue) ? Number(ue) : null;
        };
        function R(ue, ye, Ae) {
          ye[ue + "Found"] ? (ye[ue] = E(ye[ue]), ye[ue] === null && (ye[ue] = Ae[ue])) : (_[ue] = ye[ue] = Ae[ue], g.nestedProperty(c[0], w + "." + ue).set(Ae[ue]));
        }
        if (o["_" + l + "autoBinFinished"])
          delete o["_" + l + "autoBinFinished"];
        else {
          c = A.traces;
          var z = [], j = !0, H = !1, Y = !1;
          for (p = 0; p < c.length; p++)
            if ((a = c[p]).visible) {
              var J = A.dirs[p];
              f = a["_" + J + "pos0"] = h.makeCalcdata(a, J), z = g.concat(z, f), delete a["_" + l + "autoBinFinished"], o.visible === !0 && (j ? j = !1 : (delete a._autoBin, a["_" + l + "autoBinFinished"] = 1), k.traceIs(a, "2dMap") && (H = !0), a.type === "histogram2dcontour" && (Y = !0));
            }
          y = c[0][l + "calendar"];
          var W = x.autoBin(z, h, A.nbins, H, y, A.sizeFound && A.size), Z = c[0]._autoBin = {};
          if (_ = Z[A.dirs[0]] = {}, Y && (A.size || (W.start = S(x.tickIncrement(P(W.start), W.size, !0, y))), A.end === void 0 && (W.end = S(x.tickIncrement(P(W.end), W.size, !1, y)))), I && !k.traceIs(o, "2dMap") && W._dataSpan === 0 && h.type !== "category" && h.type !== "multicategory") {
            if (i)
              return [W, f, !0];
            W = function(ue, ye, Ae, pe, ge) {
              var we, se, de, Te = ue._fullLayout, Ee = function(vt, bt) {
                for (var yt = bt.xaxis, tt = bt.yaxis, Ke = bt.orientation, mt = [], Ft = vt._fullData, Vt = 0; Vt < Ft.length; Vt++) {
                  var Xt = Ft[Vt];
                  Xt.type === "histogram" && Xt.visible === !0 && Xt.orientation === Ke && Xt.xaxis === yt && Xt.yaxis === tt && mt.push(Xt);
                }
                return mt;
              }(ue, ye), Me = !1, ze = 1 / 0, Ie = [ye];
              for (we = 0; we < Ee.length; we++)
                if ((se = Ee[we]) === ye)
                  Me = !0;
                else if (Me) {
                  var Oe = d(ue, se, Ae, pe, !0), Ze = Oe[0], Fe = Oe[2];
                  se["_" + pe + "autoBinFinished"] = 1, se["_" + pe + "pos0"] = Oe[1], Fe ? Ie.push(se) : ze = Math.min(ze, Ze.size);
                } else
                  de = Te._histogramBinOpts[se["_" + pe + "bingroup"]], ze = Math.min(ze, de.size || se[ge].size);
              var Pe = new Array(Ie.length);
              for (we = 0; we < Ie.length; we++)
                for (var De = Ie[we]["_" + pe + "pos0"], Ge = 0; Ge < De.length; Ge++)
                  if (De[Ge] !== void 0) {
                    Pe[we] = De[Ge];
                    break;
                  }
              for (isFinite(ze) || (ze = g.distinctVals(Pe).minDiff), we = 0; we < Ie.length; we++) {
                var Qe = (se = Ie[we])[pe + "calendar"], ot = { start: Ae.c2r(Pe[we] - ze / 2, 0, Qe), end: Ae.c2r(Pe[we] + ze / 2, 0, Qe), size: ze };
                se._input[ge] = se[ge] = ot, (de = Te._histogramBinOpts[se["_" + pe + "bingroup"]]) && g.extendFlat(de, ot);
              }
              return ye[ge];
            }(u, o, h, l, w);
          }
          (b = a.cumulative || {}).enabled && b.currentbin !== "include" && (b.direction === "decreasing" ? W.start = S(x.tickIncrement(P(W.start), W.size, !0, y)) : W.end = S(x.tickIncrement(P(W.end), W.size, !1, y))), A.size = W.size, A.sizeFound || (_.size = W.size, g.nestedProperty(c[0], w + ".size").set(W.size)), R("start", A, W), R("end", A, W);
        }
        f = o["_" + l + "pos0"], delete o["_" + l + "pos0"];
        var re = o._input[w] || {}, V = g.extendFlat({}, A), B = A.start, U = h.r2l(re.start), ee = U !== void 0;
        if ((A.startFound || ee) && U !== h.r2l(B)) {
          var N = ee ? U : g.aggNums(Math.min, null, f), K = { type: h.type === "category" || h.type === "multicategory" ? "linear" : h.type, r2l: h.r2l, dtick: A.size, tick0: B, calendar: y, range: [N, x.tickIncrement(N, A.size, !1, y)].map(h.l2r) }, X = x.tickFirst(K);
          X > h.r2l(N) && (X = x.tickIncrement(X, A.size, !0, y)), V.start = h.l2r(X), ee || g.nestedProperty(o, w + ".start").set(V.start);
        }
        var te = A.end, ie = h.r2l(re.end), le = ie !== void 0;
        if ((A.endFound || le) && ie !== h.r2l(te)) {
          var oe = le ? ie : g.aggNums(Math.max, null, f);
          V.end = h.l2r(oe), le || g.nestedProperty(o, w + ".start").set(V.end);
        }
        var ve = "autobin" + l;
        return o._input[ve] === !1 && (o._input[w] = g.extendFlat({}, o[w] || {}), delete o._input[ve], delete o[ve]), [V, f];
      }
      Q.exports = { calc: function(u, o) {
        var h, l, i, p, c = [], a = [], y = o.orientation === "h", f = x.getFromId(u, y ? o.yaxis : o.xaxis), _ = y ? "y" : "x", b = { x: "y", y: "x" }[_], w = o[_ + "calendar"], T = o.cumulative, L = d(u, o, f, _), A = L[0], I = L[1], P = typeof A.size == "string", S = [], E = P ? S : A, R = [], z = [], j = [], H = 0, Y = o.histnorm, J = o.histfunc, W = Y.indexOf("density") !== -1;
        T.enabled && W && (Y = Y.replace(/ ?density$/, ""), W = !1);
        var Z, re = J === "max" || J === "min" ? null : 0, V = r.count, B = n[Y], U = !1, ee = function(se) {
          return f.r2c(se, 0, w);
        };
        for (g.isArrayOrTypedArray(o[b]) && J !== "count" && (Z = o[b], U = J === "avg", V = r[J]), h = ee(A.start), i = ee(A.end) + (h - x.tickIncrement(h, A.size, !1, w)) / 1e6; h < i && c.length < 1e6 && (l = x.tickIncrement(h, A.size, !1, w), c.push((h + l) / 2), a.push(re), j.push([]), S.push(h), W && R.push(1 / (l - h)), U && z.push(0), !(l <= h)); )
          h = l;
        S.push(h), P || f.type !== "date" || (E = { start: ee(E.start), end: ee(E.end), size: E.size }), u._fullLayout._roundFnOpts || (u._fullLayout._roundFnOpts = {});
        var N = o["_" + _ + "bingroup"], K = { leftGap: 1 / 0, rightGap: 1 / 0 };
        N && (u._fullLayout._roundFnOpts[N] || (u._fullLayout._roundFnOpts[N] = K), K = u._fullLayout._roundFnOpts[N]);
        var X, te = a.length, ie = !0, le = K.leftGap, oe = K.rightGap, ve = {};
        for (h = 0; h < I.length; h++) {
          var ue = I[h];
          (p = g.findBin(ue, E)) >= 0 && p < te && (H += V(p, h, a, Z, z), ie && j[p].length && ue !== I[j[p][0]] && (ie = !1), j[p].push(h), ve[h] = p, le = Math.min(le, ue - S[p]), oe = Math.min(oe, S[p + 1] - ue));
        }
        K.leftGap = le, K.rightGap = oe, ie || (X = function(se, de) {
          return function() {
            var Te = u._fullLayout._roundFnOpts[N];
            return t(Te.leftGap, Te.rightGap, S, f, w)(se, de);
          };
        }), U && (H = s(a, z)), B && B(a, H, R), T.enabled && function(se, de, Te) {
          var Ee, Me, ze;
          function Ie(Ze) {
            ze = se[Ze], se[Ze] /= 2;
          }
          function Oe(Ze) {
            Me = se[Ze], se[Ze] = ze + Me / 2, ze += Me;
          }
          if (Te === "half")
            if (de === "increasing")
              for (Ie(0), Ee = 1; Ee < se.length; Ee++)
                Oe(Ee);
            else
              for (Ie(se.length - 1), Ee = se.length - 2; Ee >= 0; Ee--)
                Oe(Ee);
          else if (de === "increasing") {
            for (Ee = 1; Ee < se.length; Ee++)
              se[Ee] += se[Ee - 1];
            Te === "exclude" && (se.unshift(0), se.pop());
          } else {
            for (Ee = se.length - 2; Ee >= 0; Ee--)
              se[Ee] += se[Ee + 1];
            Te === "exclude" && (se.push(0), se.shift());
          }
        }(a, T.direction, T.currentbin);
        var ye = Math.min(c.length, a.length), Ae = [], pe = 0, ge = ye - 1;
        for (h = 0; h < ye; h++)
          if (a[h]) {
            pe = h;
            break;
          }
        for (h = ye - 1; h >= pe; h--)
          if (a[h]) {
            ge = h;
            break;
          }
        for (h = pe; h <= ge; h++)
          if (m(c[h]) && m(a[h])) {
            var we = { p: c[h], s: a[h], b: 0 };
            T.enabled || (we.pts = j[h], ie ? we.ph0 = we.ph1 = j[h].length ? I[j[h][0]] : c[h] : (o._computePh = !0, we.ph0 = X(S[h]), we.ph1 = X(S[h + 1], !0))), Ae.push(we);
          }
        return Ae.length === 1 && (Ae[0].width1 = x.tickIncrement(Ae[0].p, A.size, !1, w) - Ae[0].p), e(Ae, o), g.isArrayOrTypedArray(o.selectedpoints) && g.tagSelected(Ae, o, ve), Ae;
      }, calcAllAutoBins: d };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "../../registry": 647, "../bar/arrays_to_calcdata": 656, "./average": 822, "./bin_functions": 824, "./bin_label_vals": 825, "./norm_functions": 833, "fast-isnumeric": 190 }], 827: [function(v, Q, $) {
      Q.exports = { eventDataKeys: ["binNumber"] };
    }, {}], 828: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axis_ids"), k = v("../../registry").traceIs, x = v("../bar/defaults").handleGroupingDefaults, e = m.nestedProperty, r = v("../../plots/cartesian/constraints").getAxisGroup, n = [{ aStr: { x: "xbins.start", y: "ybins.start" }, name: "start" }, { aStr: { x: "xbins.end", y: "ybins.end" }, name: "end" }, { aStr: { x: "xbins.size", y: "ybins.size" }, name: "size" }, { aStr: { x: "nbinsx", y: "nbinsy" }, name: "nbins" }], s = ["x", "y"];
      Q.exports = function(t, d) {
        var u, o, h, l, i, p, c, a = d._histogramBinOpts = {}, y = [], f = {}, _ = [];
        function b(W, Z) {
          return m.coerce(u._input, u, u._module.attributes, W, Z);
        }
        function w(W) {
          return W.orientation === "v" ? "x" : "y";
        }
        function T(W, Z, re) {
          var V = W.uid + "__" + re;
          Z || (Z = V);
          var B = function(K, X) {
            return g.getFromTrace({ _fullLayout: d }, K, X).type;
          }(W, re), U = W[re + "calendar"] || "", ee = a[Z], N = !0;
          ee && (B === ee.axType && U === ee.calendar ? (N = !1, ee.traces.push(W), ee.dirs.push(re)) : (Z = V, B !== ee.axType && m.warn(["Attempted to group the bins of trace", W.index, "set on a", "type:" + B, "axis", "with bins on", "type:" + ee.axType, "axis."].join(" ")), U !== ee.calendar && m.warn(["Attempted to group the bins of trace", W.index, "set with a", U, "calendar", "with bins", ee.calendar ? "on a " + ee.calendar + " calendar" : "w/o a set calendar"].join(" ")))), N && (a[Z] = { traces: [W], dirs: [re], axType: B, calendar: W[re + "calendar"] || "" }), W["_" + re + "bingroup"] = Z;
        }
        for (i = 0; i < t.length; i++)
          u = t[i], k(u, "histogram") && (y.push(u), delete u._xautoBinFinished, delete u._yautoBinFinished, k(u, "2dMap") || x(u._input, u, d, b));
        var L = d._alignmentOpts || {};
        for (i = 0; i < y.length; i++) {
          if (u = y[i], h = "", !k(u, "2dMap")) {
            if (l = w(u), d.barmode === "group" && u.alignmentgroup) {
              var A = u[l + "axis"], I = r(d, A) + u.orientation;
              (L[I] || {})[u.alignmentgroup] && (h = I);
            }
            h || d.barmode === "overlay" || (h = r(d, u.xaxis) + r(d, u.yaxis) + w(u));
          }
          h ? (f[h] || (f[h] = []), f[h].push(u)) : _.push(u);
        }
        for (h in f)
          if ((o = f[h]).length !== 1) {
            var P = !1;
            for (o.length && (u = o[0], P = b("bingroup")), h = P || h, i = 0; i < o.length; i++) {
              var S = (u = o[i])._input.bingroup;
              S && S !== h && m.warn(["Trace", u.index, "must match", "within bingroup", h + ".", "Ignoring its bingroup:", S, "setting."].join(" ")), u.bingroup = h, T(u, h, w(u));
            }
          } else
            _.push(o[0]);
        for (i = 0; i < _.length; i++) {
          u = _[i];
          var E = b("bingroup");
          if (k(u, "2dMap"))
            for (c = 0; c < 2; c++) {
              var R = b((l = s[c]) + "bingroup", E ? E + "__" + l : null);
              T(u, R, l);
            }
          else
            T(u, E, w(u));
        }
        for (h in a) {
          var z = a[h];
          for (o = z.traces, p = 0; p < n.length; p++) {
            var j, H, Y = n[p], J = Y.name;
            if (J !== "nbins" || !z.sizeFound) {
              for (i = 0; i < o.length; i++) {
                if (u = o[i], l = z.dirs[i], j = Y.aStr[l], e(u._input, j).get() !== void 0) {
                  z[J] = b(j), z[J + "Found"] = !0;
                  break;
                }
                (H = (u._autoBin || {})[l] || {})[J] && e(u, j).set(H[J]);
              }
              if (J === "start" || J === "end")
                for (; i < o.length; i++)
                  (u = o[i])["_" + l + "bingroup"] && b(j, (H = (u._autoBin || {})[l] || {})[J]);
              J !== "nbins" || z.sizeFound || z.nbinsFound || (u = o[0], z[J] = b(j));
            }
          }
        }
      };
    }, { "../../lib": 515, "../../plots/cartesian/axis_ids": 570, "../../plots/cartesian/constraints": 574, "../../registry": 647, "../bar/defaults": 661 }], 829: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../../components/color"), x = v("../bar/defaults").handleText, e = v("../bar/style_defaults"), r = v("./attributes");
      Q.exports = function(n, s, t, d) {
        function u(_, b) {
          return g.coerce(n, s, r, _, b);
        }
        var o = u("x"), h = u("y");
        u("cumulative.enabled") && (u("cumulative.direction"), u("cumulative.currentbin")), u("text");
        var l = u("textposition");
        x(n, s, d, u, l, { moduleHasSelected: !0, moduleHasUnselected: !0, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), u("hovertext"), u("hovertemplate"), u("xhoverformat"), u("yhoverformat");
        var i = u("orientation", h && !o ? "h" : "v"), p = i === "v" ? "x" : "y", c = i === "v" ? "y" : "x", a = o && h ? Math.min(g.minRowLength(o) && g.minRowLength(h)) : g.minRowLength(s[p] || []);
        if (a) {
          s._length = a, m.getComponentMethod("calendars", "handleTraceDefaults")(n, s, ["x", "y"], d), s[c] && u("histfunc"), u("histnorm"), u("autobin" + p), e(n, s, u, t, d), g.coerceSelectionMarkerOpacity(s, u);
          var y = (s.marker.line || {}).color, f = m.getComponentMethod("errorbars", "supplyDefaults");
          f(n, s, y || k.defaultLine, { axis: "y" }), f(n, s, y || k.defaultLine, { axis: "x", inherit: "y" });
        } else
          s.visible = !1;
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../registry": 647, "../bar/defaults": 661, "../bar/style_defaults": 672, "./attributes": 821 }], 830: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        if (m.x = "xVal" in g ? g.xVal : g.x, m.y = "yVal" in g ? g.yVal : g.y, "zLabelVal" in g && (m.z = g.zLabelVal), g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), !(k.cumulative || {}).enabled) {
          var r, n = Array.isArray(e) ? x[0].pts[e[0]][e[1]] : x[e].pts;
          if (m.pointNumbers = n, m.binNumber = m.pointNumber, delete m.pointNumber, delete m.pointIndex, k._indexToPoints) {
            r = [];
            for (var s = 0; s < n.length; s++)
              r = r.concat(k._indexToPoints[n[s]]);
          } else
            r = n;
          m.pointIndices = r;
        }
        return m;
      };
    }, {}], 831: [function(v, Q, $) {
      var m = v("../bar/hover").hoverPoints, g = v("../../plots/cartesian/axes").hoverLabelText;
      Q.exports = function(k, x, e, r, n) {
        var s = m(k, x, e, r, n);
        if (s) {
          var t = (k = s[0]).cd[k.index], d = k.cd[0].trace;
          if (!d.cumulative.enabled) {
            var u = d.orientation === "h" ? "y" : "x";
            k[u + "Label"] = g(k[u + "a"], [t.ph0, t.ph1], d[u + "hoverformat"]);
          }
          return s;
        }
      };
    }, { "../../plots/cartesian/axes": 566, "../bar/hover": 664 }], 832: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), layoutAttributes: v("../bar/layout_attributes"), supplyDefaults: v("./defaults"), crossTraceDefaults: v("./cross_trace_defaults"), supplyLayoutDefaults: v("../bar/layout_defaults"), calc: v("./calc").calc, crossTraceCalc: v("../bar/cross_trace_calc").crossTraceCalc, plot: v("../bar/plot").plot, layerName: "barlayer", style: v("../bar/style").style, styleOnSelect: v("../bar/style").styleOnSelect, colorbar: v("../scatter/marker_colorbar"), hoverPoints: v("./hover"), selectPoints: v("../bar/select"), eventData: v("./event_data"), moduleType: "trace", name: "histogram", basePlotModule: v("../../plots/cartesian"), categories: ["bar-like", "cartesian", "svg", "bar", "histogram", "oriented", "errorBarsOK", "showLegend"], meta: {} };
    }, { "../../plots/cartesian": 578, "../bar/cross_trace_calc": 660, "../bar/layout_attributes": 666, "../bar/layout_defaults": 667, "../bar/plot": 668, "../bar/select": 669, "../bar/style": 671, "../scatter/marker_colorbar": 954, "./attributes": 821, "./calc": 826, "./cross_trace_defaults": 828, "./defaults": 829, "./event_data": 830, "./hover": 831 }], 833: [function(v, Q, $) {
      Q.exports = { percent: function(m, g) {
        for (var k = m.length, x = 100 / g, e = 0; e < k; e++)
          m[e] *= x;
      }, probability: function(m, g) {
        for (var k = m.length, x = 0; x < k; x++)
          m[x] /= g;
      }, density: function(m, g, k, x) {
        var e = m.length;
        x = x || 1;
        for (var r = 0; r < e; r++)
          m[r] *= k[r] * x;
      }, "probability density": function(m, g, k, x) {
        var e = m.length;
        x && (g /= x);
        for (var r = 0; r < e; r++)
          m[r] *= k[r] / g;
      } };
    }, {}], 834: [function(v, Q, $) {
      var m = v("../histogram/attributes"), g = v("../histogram/bin_attributes"), k = v("../heatmap/attributes"), x = v("../../plots/attributes"), e = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, r = v("../../plots/template_attributes").hovertemplateAttrs, n = v("../../plots/template_attributes").texttemplateAttrs, s = v("../../components/colorscale/attributes"), t = v("../../lib/extend").extendFlat;
      Q.exports = t({ x: m.x, y: m.y, z: { valType: "data_array", editType: "calc" }, marker: { color: { valType: "data_array", editType: "calc" }, editType: "calc" }, histnorm: m.histnorm, histfunc: m.histfunc, nbinsx: m.nbinsx, xbins: g("x"), nbinsy: m.nbinsy, ybins: g("y"), autobinx: m.autobinx, autobiny: m.autobiny, bingroup: t({}, m.bingroup, {}), xbingroup: t({}, m.bingroup, {}), ybingroup: t({}, m.bingroup, {}), xgap: k.xgap, ygap: k.ygap, zsmooth: k.zsmooth, xhoverformat: e("x"), yhoverformat: e("y"), zhoverformat: e("z", 1), hovertemplate: r({}, { keys: "z" }), texttemplate: n({ arrayOk: !1, editType: "plot" }, { keys: "z" }), textfont: k.textfont, showlegend: t({}, x.showlegend, { dflt: !1 }) }, s("", { cLetter: "z", autoColorDflt: !1 }));
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../heatmap/attributes": 801, "../histogram/attributes": 821, "../histogram/bin_attributes": 823 }], 835: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../histogram/bin_functions"), x = v("../histogram/norm_functions"), e = v("../histogram/average"), r = v("../histogram/bin_label_vals"), n = v("../histogram/calc").calcAllAutoBins;
      function s(u, o, h, l) {
        var i, p = new Array(u);
        if (l)
          for (i = 0; i < u; i++)
            p[i] = 1 / (o[i + 1] - o[i]);
        else {
          var c = 1 / h;
          for (i = 0; i < u; i++)
            p[i] = c;
        }
        return p;
      }
      function t(u, o) {
        return { start: u(o.start), end: u(o.end), size: o.size };
      }
      function d(u, o, h, l, i, p) {
        var c, a = u.length - 1, y = new Array(a), f = r(h, l, u, i, p);
        for (c = 0; c < a; c++) {
          var _ = (o || [])[c];
          y[c] = _ === void 0 ? [f(u[c]), f(u[c + 1], !0)] : [_, _];
        }
        return y;
      }
      Q.exports = function(u, o) {
        var h, l, i, p, c = g.getFromId(u, o.xaxis), a = g.getFromId(u, o.yaxis), y = o.xcalendar, f = o.ycalendar, _ = function(tt) {
          return c.r2c(tt, 0, y);
        }, b = function(tt) {
          return a.r2c(tt, 0, f);
        }, w = n(u, o, c, "x"), T = w[0], L = w[1], A = n(u, o, a, "y"), I = A[0], P = A[1], S = o._length;
        L.length > S && L.splice(S, L.length - S), P.length > S && P.splice(S, P.length - S);
        var E = [], R = [], z = [], j = typeof T.size == "string", H = typeof I.size == "string", Y = [], J = [], W = j ? Y : T, Z = H ? J : I, re = 0, V = [], B = [], U = o.histnorm, ee = o.histfunc, N = U.indexOf("density") !== -1, K = ee === "max" || ee === "min" ? null : 0, X = k.count, te = x[U], ie = !1, le = [], oe = [], ve = "z" in o ? o.z : "marker" in o && Array.isArray(o.marker.color) ? o.marker.color : "";
        ve && ee !== "count" && (ie = ee === "avg", X = k[ee]);
        var ue = T.size, ye = _(T.start), Ae = _(T.end) + (ye - g.tickIncrement(ye, ue, !1, y)) / 1e6;
        for (h = ye; h < Ae; h = g.tickIncrement(h, ue, !1, y))
          R.push(K), Y.push(h), ie && z.push(0);
        Y.push(h);
        var pe, ge = R.length, we = (h - ye) / ge, se = (pe = ye + we / 2, c.c2r(pe, 0, y)), de = I.size, Te = b(I.start), Ee = b(I.end) + (Te - g.tickIncrement(Te, de, !1, f)) / 1e6;
        for (h = Te; h < Ee; h = g.tickIncrement(h, de, !1, f)) {
          E.push(R.slice()), J.push(h);
          var Me = new Array(ge);
          for (l = 0; l < ge; l++)
            Me[l] = [];
          B.push(Me), ie && V.push(z.slice());
        }
        J.push(h);
        var ze = E.length, Ie = (h - Te) / ze, Oe = function(tt) {
          return a.c2r(tt, 0, f);
        }(Te + Ie / 2);
        N && (le = s(R.length, W, we, j), oe = s(E.length, Z, Ie, H)), j || c.type !== "date" || (W = t(_, W)), H || a.type !== "date" || (Z = t(b, Z));
        var Ze = !0, Fe = !0, Pe = new Array(ge), De = new Array(ze), Ge = 1 / 0, Qe = 1 / 0, ot = 1 / 0, vt = 1 / 0;
        for (h = 0; h < S; h++) {
          var bt = L[h], yt = P[h];
          i = m.findBin(bt, W), p = m.findBin(yt, Z), i >= 0 && i < ge && p >= 0 && p < ze && (re += X(i, h, E[p], ve, V[p]), B[p][i].push(h), Ze && (Pe[i] === void 0 ? Pe[i] = bt : Pe[i] !== bt && (Ze = !1)), Fe && (De[p] === void 0 ? De[p] = yt : De[p] !== yt && (Fe = !1)), Ge = Math.min(Ge, bt - Y[i]), Qe = Math.min(Qe, Y[i + 1] - bt), ot = Math.min(ot, yt - J[p]), vt = Math.min(vt, J[p + 1] - yt));
        }
        if (ie)
          for (p = 0; p < ze; p++)
            re += e(E[p], V[p]);
        if (te)
          for (p = 0; p < ze; p++)
            te(E[p], re, le, oe[p]);
        return { x: L, xRanges: d(Y, Ze && Pe, Ge, Qe, c, y), x0: se, dx: we, y: P, yRanges: d(J, Fe && De, ot, vt, a, f), y0: Oe, dy: Ie, z: E, pts: B };
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "../histogram/average": 822, "../histogram/bin_functions": 824, "../histogram/bin_label_vals": 825, "../histogram/calc": 826, "../histogram/norm_functions": 833 }], 836: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./sample_defaults"), k = v("../heatmap/style_defaults"), x = v("../../components/colorscale/defaults"), e = v("../heatmap/label_defaults"), r = v("./attributes");
      Q.exports = function(n, s, t, d) {
        function u(o, h) {
          return m.coerce(n, s, r, o, h);
        }
        g(n, s, u, d), s.visible !== !1 && (k(n, s, u, d), x(n, s, d, u, { prefix: "", cLetter: "z" }), u("hovertemplate"), e(u, d), u("xhoverformat"), u("yhoverformat"));
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "../heatmap/label_defaults": 811, "../heatmap/style_defaults": 815, "./attributes": 834, "./sample_defaults": 839 }], 837: [function(v, Q, $) {
      var m = v("../heatmap/hover"), g = v("../../plots/cartesian/axes").hoverLabelText;
      Q.exports = function(k, x, e, r, n) {
        var s = m(k, x, e, r, n);
        if (s) {
          var t = (k = s[0]).index, d = t[0], u = t[1], o = k.cd[0], h = o.trace, l = o.xRanges[u], i = o.yRanges[d];
          return k.xLabel = g(k.xa, [l[0], l[1]], h.xhoverformat), k.yLabel = g(k.ya, [i[0], i[1]], h.yhoverformat), s;
        }
      };
    }, { "../../plots/cartesian/axes": 566, "../heatmap/hover": 808 }], 838: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), crossTraceDefaults: v("../histogram/cross_trace_defaults"), calc: v("../heatmap/calc"), plot: v("../heatmap/plot"), layerName: "heatmaplayer", colorbar: v("../heatmap/colorbar"), style: v("../heatmap/style"), hoverPoints: v("./hover"), eventData: v("../histogram/event_data"), moduleType: "trace", name: "histogram2d", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "2dMap", "histogram", "showLegend"], meta: {} };
    }, { "../../plots/cartesian": 578, "../heatmap/calc": 802, "../heatmap/colorbar": 804, "../heatmap/plot": 813, "../heatmap/style": 814, "../histogram/cross_trace_defaults": 828, "../histogram/event_data": 830, "./attributes": 834, "./defaults": 836, "./hover": 837 }], 839: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib");
      Q.exports = function(k, x, e, r) {
        var n = e("x"), s = e("y"), t = g.minRowLength(n), d = g.minRowLength(s);
        t && d ? (x._length = Math.min(t, d), m.getComponentMethod("calendars", "handleTraceDefaults")(k, x, ["x", "y"], r), (e("z") || e("marker.color")) && e("histfunc"), e("histnorm"), e("autobinx"), e("autobiny")) : x.visible = !1;
      };
    }, { "../../lib": 515, "../../registry": 647 }], 840: [function(v, Q, $) {
      var m = v("../histogram2d/attributes"), g = v("../contour/attributes"), k = v("../../components/colorscale/attributes"), x = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, e = v("../../lib/extend").extendFlat;
      Q.exports = e({ x: m.x, y: m.y, z: m.z, marker: m.marker, histnorm: m.histnorm, histfunc: m.histfunc, nbinsx: m.nbinsx, xbins: m.xbins, nbinsy: m.nbinsy, ybins: m.ybins, autobinx: m.autobinx, autobiny: m.autobiny, bingroup: m.bingroup, xbingroup: m.xbingroup, ybingroup: m.ybingroup, autocontour: g.autocontour, ncontours: g.ncontours, contours: g.contours, line: { color: g.line.color, width: e({}, g.line.width, { dflt: 0.5 }), dash: g.line.dash, smoothing: g.line.smoothing, editType: "plot" }, xhoverformat: x("x"), yhoverformat: x("y"), zhoverformat: x("z", 1), hovertemplate: m.hovertemplate, texttemplate: g.texttemplate, textfont: g.textfont }, k("", { cLetter: "z", editTypeOverride: "calc" }));
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../contour/attributes": 744, "../histogram2d/attributes": 834 }], 841: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../histogram2d/sample_defaults"), k = v("../contour/contours_defaults"), x = v("../contour/style_defaults"), e = v("../heatmap/label_defaults"), r = v("./attributes");
      Q.exports = function(n, s, t, d) {
        function u(o, h) {
          return m.coerce(n, s, r, o, h);
        }
        g(n, s, u, d), s.visible !== !1 && (k(n, s, u, function(o) {
          return m.coerce2(n, s, r, o);
        }), x(n, s, u, d), u("xhoverformat"), u("yhoverformat"), u("hovertemplate"), s.contours && s.contours.coloring === "heatmap" && e(u, d));
      };
    }, { "../../lib": 515, "../contour/contours_defaults": 751, "../contour/style_defaults": 765, "../heatmap/label_defaults": 811, "../histogram2d/sample_defaults": 839, "./attributes": 840 }], 842: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), crossTraceDefaults: v("../histogram/cross_trace_defaults"), calc: v("../contour/calc"), plot: v("../contour/plot").plot, layerName: "contourlayer", style: v("../contour/style"), colorbar: v("../contour/colorbar"), hoverPoints: v("../contour/hover"), moduleType: "trace", name: "histogram2dcontour", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "2dMap", "contour", "histogram", "showLegend"], meta: {} };
    }, { "../../plots/cartesian": 578, "../contour/calc": 745, "../contour/colorbar": 747, "../contour/hover": 757, "../contour/plot": 762, "../contour/style": 764, "../histogram/cross_trace_defaults": 828, "./attributes": 840, "./defaults": 841 }], 843: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../../components/colorscale/attributes"), x = v("../../plots/domain").attributes, e = v("../pie/attributes"), r = v("../sunburst/attributes"), n = v("../treemap/attributes"), s = v("../treemap/constants"), t = v("../../lib/extend").extendFlat;
      Q.exports = { labels: r.labels, parents: r.parents, values: r.values, branchvalues: r.branchvalues, count: r.count, level: r.level, maxdepth: r.maxdepth, tiling: { orientation: { valType: "enumerated", values: ["v", "h"], dflt: "h", editType: "plot" }, flip: n.tiling.flip, pad: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "calc" }, marker: t({ colors: r.marker.colors, line: r.marker.line, editType: "calc" }, k("marker", { colorAttr: "colors", anim: !1 })), leaf: r.leaf, pathbar: n.pathbar, text: e.text, textinfo: r.textinfo, texttemplate: g({ editType: "plot" }, { keys: s.eventDataKeys.concat(["label", "value"]) }), hovertext: e.hovertext, hoverinfo: r.hoverinfo, hovertemplate: m({}, { keys: s.eventDataKeys }), textfont: e.textfont, insidetextfont: e.insidetextfont, outsidetextfont: n.outsidetextfont, textposition: n.textposition, sort: e.sort, root: r.root, domain: x({ name: "icicle", trace: !0, editType: "calc" }) };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/domain": 593, "../../plots/template_attributes": 642, "../pie/attributes": 910, "../sunburst/attributes": 1058, "../treemap/attributes": 1084, "../treemap/constants": 1087 }], 844: [function(v, Q, $) {
      var m = v("../../plots/plots");
      $.name = "icicle", $.plot = function(g, k, x, e) {
        m.plotBasePlot($.name, g, k, x, e);
      }, $.clean = function(g, k, x, e) {
        m.cleanBasePlot($.name, g, k, x, e);
      };
    }, { "../../plots/plots": 628 }], 845: [function(v, Q, $) {
      var m = v("../sunburst/calc");
      $.calc = function(g, k) {
        return m.calc(g, k);
      }, $.crossTraceCalc = function(g) {
        return m._runCrossTraceCalc("icicle", g);
      };
    }, { "../sunburst/calc": 1060 }], 846: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../components/color"), x = v("../../plots/domain").defaults, e = v("../bar/defaults").handleText, r = v("../bar/constants").TEXTPAD, n = v("../../components/colorscale"), s = n.hasColorscale, t = n.handleDefaults;
      Q.exports = function(d, u, o, h) {
        function l(_, b) {
          return m.coerce(d, u, g, _, b);
        }
        var i = l("labels"), p = l("parents");
        if (i && i.length && p && p.length) {
          var c = l("values");
          c && c.length ? l("branchvalues") : l("count"), l("level"), l("maxdepth"), l("tiling.orientation"), l("tiling.flip"), l("tiling.pad");
          var a = l("text");
          l("texttemplate"), u.texttemplate || l("textinfo", Array.isArray(a) ? "text+label" : "label"), l("hovertext"), l("hovertemplate");
          var y = l("pathbar.visible");
          e(d, u, h, l, "auto", { hasPathbar: y, moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), l("textposition"), l("marker.line.width") && l("marker.line.color", h.paper_bgcolor), l("marker.colors");
          var f = u._hasColorscale = s(d, "marker", "colors") || (d.marker || {}).coloraxis;
          f && t(d, u, h, l, { prefix: "marker.", cLetter: "c" }), l("leaf.opacity", f ? 1 : 0.7), u._hovered = { marker: { line: { width: 2, color: k.contrast(h.paper_bgcolor) } } }, y && (l("pathbar.thickness", u.pathbar.textfont.size + 2 * r), l("pathbar.side"), l("pathbar.edgeshape")), l("sort"), l("root.color"), x(u, h, l), u._length = null;
        } else
          u.visible = !1;
      };
    }, { "../../components/color": 367, "../../components/colorscale": 379, "../../lib": 515, "../../plots/domain": 593, "../bar/constants": 659, "../bar/defaults": 661, "./attributes": 843 }], 847: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../../lib/svg_text_utils"), e = v("./partition"), r = v("./style").styleOne, n = v("../treemap/constants"), s = v("../sunburst/helpers"), t = v("../sunburst/fx"), d = v("../sunburst/plot").formatSliceLabel;
      Q.exports = function(u, o, h, l, i) {
        var p = i.width, c = i.height, a = i.viewX, y = i.viewY, f = i.pathSlice, _ = i.toMoveInsideSlice, b = i.strTransform, w = i.hasTransition, T = i.handleSlicesExit, L = i.makeUpdateSliceInterpolator, A = i.makeUpdateTextInterpolator, I = i.prevEntry, P = u._context.staticPlot, S = u._fullLayout, E = o[0].trace, R = E.textposition.indexOf("left") !== -1, z = E.textposition.indexOf("right") !== -1, j = E.textposition.indexOf("bottom") !== -1, H = e(h, [p, c], { flipX: E.tiling.flip.indexOf("x") > -1, flipY: E.tiling.flip.indexOf("y") > -1, orientation: E.tiling.orientation, pad: { inner: E.tiling.pad }, maxDepth: E._maxDepth }).descendants(), Y = 1 / 0, J = -1 / 0;
        H.forEach(function(B) {
          var U = B.depth;
          U >= E._maxDepth ? (B.x0 = B.x1 = (B.x0 + B.x1) / 2, B.y0 = B.y1 = (B.y0 + B.y1) / 2) : (Y = Math.min(Y, U), J = Math.max(J, U));
        }), l = l.data(H, s.getPtId), E._maxVisibleLayers = isFinite(J) ? J - Y + 1 : 0, l.enter().append("g").classed("slice", !0), T(l, !1, {}, [p, c], f), l.order();
        var W = null;
        if (w && I) {
          var Z = s.getPtId(I);
          l.each(function(B) {
            W === null && s.getPtId(B) === Z && (W = { x0: B.x0, x1: B.x1, y0: B.y0, y1: B.y1 });
          });
        }
        var re = function() {
          return W || { x0: 0, x1: p, y0: 0, y1: c };
        }, V = l;
        return w && (V = V.transition().each("end", function() {
          var B = m.select(this);
          s.setSliceCursor(B, u, { hideOnRoot: !0, hideOnLeaves: !1, isTransitioning: !1 });
        })), V.each(function(B) {
          B._x0 = a(B.x0), B._x1 = a(B.x1), B._y0 = y(B.y0), B._y1 = y(B.y1), B._hoverX = a(B.x1 - E.tiling.pad), B._hoverY = y(j ? B.y1 - E.tiling.pad / 2 : B.y0 + E.tiling.pad / 2);
          var U = m.select(this), ee = g.ensureSingle(U, "path", "surface", function(te) {
            te.style("pointer-events", P ? "none" : "all");
          });
          w ? ee.transition().attrTween("d", function(te) {
            var ie = L(te, !1, re(), [p, c], { orientation: E.tiling.orientation, flipX: E.tiling.flip.indexOf("x") > -1, flipY: E.tiling.flip.indexOf("y") > -1 });
            return function(le) {
              return f(ie(le));
            };
          }) : ee.attr("d", f), U.call(t, h, u, o, { styleOne: r, eventDataKeys: n.eventDataKeys, transitionTime: n.CLICK_TRANSITION_TIME, transitionEasing: n.CLICK_TRANSITION_EASING }).call(s.setSliceCursor, u, { isTransitioning: u._transitioning }), ee.call(r, B, E, { hovered: !1 }), B.x0 === B.x1 || B.y0 === B.y1 ? B._text = "" : B._text = d(B, h, E, o, S) || "";
          var N = g.ensureSingle(U, "g", "slicetext"), K = g.ensureSingle(N, "text", "", function(te) {
            te.attr("data-notex", 1);
          }), X = g.ensureUniformFontSize(u, s.determineTextFont(E, B, S.font));
          K.text(B._text || " ").classed("slicetext", !0).attr("text-anchor", z ? "end" : R ? "start" : "middle").call(k.font, X).call(x.convertToTspans, u), B.textBB = k.bBox(K.node()), B.transform = _(B, { fontSize: X.size }), B.transform.fontSize = X.size, w ? K.transition().attrTween("transform", function(te) {
            var ie = A(te, !1, re(), [p, c]);
            return function(le) {
              return b(ie(le));
            };
          }) : K.attr("transform", b(B));
        }), W;
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../lib/svg_text_utils": 541, "../sunburst/fx": 1063, "../sunburst/helpers": 1064, "../sunburst/plot": 1068, "../treemap/constants": 1087, "./partition": 851, "./style": 853, "@plotly/d3": 58 }], 848: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "icicle", basePlotModule: v("./base_plot"), categories: [], animatable: !0, attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults"), supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc").calc, crossTraceCalc: v("./calc").crossTraceCalc, plot: v("./plot"), style: v("./style").style, colorbar: v("../scatter/marker_colorbar"), meta: {} };
    }, { "../scatter/marker_colorbar": 954, "./attributes": 843, "./base_plot": 844, "./calc": 845, "./defaults": 846, "./layout_attributes": 849, "./layout_defaults": 850, "./plot": 852, "./style": 853 }], 849: [function(v, Q, $) {
      Q.exports = { iciclecolorway: { valType: "colorlist", editType: "calc" }, extendiciclecolors: { valType: "boolean", dflt: !0, editType: "calc" } };
    }, {}], 850: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x) {
        function e(r, n) {
          return m.coerce(k, x, g, r, n);
        }
        e("iciclecolorway", x.colorway), e("extendiciclecolors");
      };
    }, { "../../lib": 515, "./layout_attributes": 849 }], 851: [function(v, Q, $) {
      var m = v("d3-hierarchy"), g = v("../treemap/flip_tree");
      Q.exports = function(k, x, e) {
        var r = e.flipX, n = e.flipY, s = e.orientation === "h", t = e.maxDepth, d = x[0], u = x[1];
        t && (d = (k.height + 1) * x[0] / Math.min(k.height + 1, t), u = (k.height + 1) * x[1] / Math.min(k.height + 1, t));
        var o = m.partition().padding(e.pad.inner).size(s ? [x[1], d] : [x[0], u])(k);
        return (s || r || n) && g(o, x, { swapXY: s, flipX: r, flipY: n }), o;
      };
    }, { "../treemap/flip_tree": 1092, "d3-hierarchy": 115 }], 852: [function(v, Q, $) {
      var m = v("../treemap/draw"), g = v("./draw_descendants");
      Q.exports = function(k, x, e, r) {
        return m(k, x, e, r, { type: "icicle", drawDescendants: g });
      };
    }, { "../treemap/draw": 1089, "./draw_descendants": 847 }], 853: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../../lib"), x = v("../bar/uniform_text").resizeText;
      function e(r, n, s) {
        var t = n.data.data, d = !n.children, u = t.i, o = k.castOption(s, u, "marker.line.color") || g.defaultLine, h = k.castOption(s, u, "marker.line.width") || 0;
        r.style("stroke-width", h).call(g.fill, t.color).call(g.stroke, o).style("opacity", d ? s.leaf.opacity : null);
      }
      Q.exports = { style: function(r) {
        var n = r._fullLayout._iciclelayer.selectAll(".trace");
        x(r, n, "icicle"), n.each(function(s) {
          var t = m.select(this), d = s[0].trace;
          t.style("opacity", d.opacity), t.selectAll("path.surface").each(function(u) {
            m.select(this).call(e, u, d);
          });
        });
      }, styleOne: e };
    }, { "../../components/color": 367, "../../lib": 515, "../bar/uniform_text": 673, "@plotly/d3": 58 }], 854: [function(v, Q, $) {
      for (var m = v("../../plots/attributes"), g = v("../../plots/template_attributes").hovertemplateAttrs, k = v("../../lib/extend").extendFlat, x = v("./constants").colormodel, e = ["rgb", "rgba", "rgba256", "hsl", "hsla"], r = [], n = [], s = 0; s < e.length; s++) {
        var t = x[e[s]];
        r.push("For the `" + e[s] + "` colormodel, it is [" + (t.zminDflt || t.min).join(", ") + "]."), n.push("For the `" + e[s] + "` colormodel, it is [" + (t.zmaxDflt || t.max).join(", ") + "].");
      }
      Q.exports = k({ source: { valType: "string", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, colormodel: { valType: "enumerated", values: e, editType: "calc" }, zsmooth: { valType: "enumerated", values: ["fast", !1], dflt: !1, editType: "plot" }, zmin: { valType: "info_array", items: [{ valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }], editType: "calc" }, zmax: { valType: "info_array", items: [{ valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }], editType: "calc" }, x0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, y0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, dx: { valType: "number", dflt: 1, editType: "calc" }, dy: { valType: "number", dflt: 1, editType: "calc" }, text: { valType: "data_array", editType: "plot" }, hovertext: { valType: "data_array", editType: "plot" }, hoverinfo: k({}, m.hoverinfo, { flags: ["x", "y", "z", "color", "name", "text"], dflt: "x+y+z+text+name" }), hovertemplate: g({}, { keys: ["z", "color", "colormodel"] }), transforms: void 0 });
    }, { "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "./constants": 856 }], 855: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./constants"), k = v("fast-isnumeric"), x = v("../../plots/cartesian/axes"), e = v("../../lib").maxRowLength, r = v("./helpers").getImageSize;
      function n(t, d, u, o) {
        return function(h) {
          return m.constrain((h - t) * d, u, o);
        };
      }
      function s(t, d) {
        return function(u) {
          return m.constrain(u, t, d);
        };
      }
      Q.exports = function(t, d) {
        var u, o;
        if (d._hasZ)
          u = d.z.length, o = e(d.z);
        else if (d._hasSource) {
          var h = r(d.source);
          u = h.height, o = h.width;
        }
        var l, i = x.getFromId(t, d.xaxis || "x"), p = x.getFromId(t, d.yaxis || "y"), c = i.d2c(d.x0) - d.dx / 2, a = p.d2c(d.y0) - d.dy / 2, y = [c, c + o * d.dx], f = [a, a + u * d.dy];
        if (i && i.type === "log")
          for (l = 0; l < o; l++)
            y.push(c + l * d.dx);
        if (p && p.type === "log")
          for (l = 0; l < u; l++)
            f.push(a + l * d.dy);
        return d._extremes[i._id] = x.findExtremes(i, y), d._extremes[p._id] = x.findExtremes(p, f), d._scaler = function(_) {
          var b = g.colormodel[_.colormodel], w = (b.colormodel || _.colormodel).length;
          _._sArray = [];
          for (var T = 0; T < w; T++)
            b.min[T] !== _.zmin[T] || b.max[T] !== _.zmax[T] ? _._sArray.push(n(_.zmin[T], (b.max[T] - b.min[T]) / (_.zmax[T] - _.zmin[T]), b.min[T], b.max[T])) : _._sArray.push(s(b.min[T], b.max[T]));
          return function(L) {
            for (var A = L.slice(0, w), I = 0; I < w; I++) {
              var P = A[I];
              if (!k(P))
                return !1;
              A[I] = _._sArray[I](P);
            }
            return A;
          };
        }(d), [{ x0: c, y0: a, z: d.z, w: o, h: u }];
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566, "./constants": 856, "./helpers": 859, "fast-isnumeric": 190 }], 856: [function(v, Q, $) {
      Q.exports = { colormodel: { rgb: { min: [0, 0, 0], max: [255, 255, 255], fmt: function(m) {
        return m.slice(0, 3);
      }, suffix: ["", "", ""] }, rgba: { min: [0, 0, 0, 0], max: [255, 255, 255, 1], fmt: function(m) {
        return m.slice(0, 4);
      }, suffix: ["", "", "", ""] }, rgba256: { colormodel: "rgba", zminDflt: [0, 0, 0, 0], zmaxDflt: [255, 255, 255, 255], min: [0, 0, 0, 0], max: [255, 255, 255, 1], fmt: function(m) {
        return m.slice(0, 4);
      }, suffix: ["", "", "", ""] }, hsl: { min: [0, 0, 0], max: [360, 100, 100], fmt: function(m) {
        var g = m.slice(0, 3);
        return g[1] = g[1] + "%", g[2] = g[2] + "%", g;
      }, suffix: ["\xB0", "%", "%"] }, hsla: { min: [0, 0, 0, 0], max: [360, 100, 100, 1], fmt: function(m) {
        var g = m.slice(0, 4);
        return g[1] = g[1] + "%", g[2] = g[2] + "%", g;
      }, suffix: ["\xB0", "%", "%", ""] } }, pixelatedStyle: ["image-rendering: optimizeSpeed", "image-rendering: -moz-crisp-edges", "image-rendering: -o-crisp-edges", "image-rendering: -webkit-optimize-contrast", "image-rendering: optimize-contrast", "image-rendering: crisp-edges", "image-rendering: pixelated", ""].join("; ") };
    }, {}], 857: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("./constants"), x = v("../../snapshot/helpers").IMAGE_URL_PREFIX;
      Q.exports = function(e, r) {
        function n(d, u) {
          return m.coerce(e, r, g, d, u);
        }
        n("source"), r.source && !r.source.match(x) && delete r.source, r._hasSource = !!r.source;
        var s, t = n("z");
        r._hasZ = !(t === void 0 || !t.length || !t[0] || !t[0].length), r._hasZ || r._hasSource ? (n("x0"), n("y0"), n("dx"), n("dy"), r._hasZ ? (n("colormodel", "rgb"), n("zmin", (s = k.colormodel[r.colormodel]).zminDflt || s.min), n("zmax", s.zmaxDflt || s.max)) : r._hasSource && (r.colormodel = "rgba256", s = k.colormodel[r.colormodel], r.zmin = s.zminDflt, r.zmax = s.zmaxDflt), n("zsmooth"), n("text"), n("hovertext"), n("hovertemplate"), r._length = null) : r.visible = !1;
      };
    }, { "../../lib": 515, "../../snapshot/helpers": 651, "./attributes": 854, "./constants": 856 }], 858: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return "xVal" in g && (m.x = g.xVal), "yVal" in g && (m.y = g.yVal), g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), m.color = g.color, m.colormodel = g.trace.colormodel, m.z || (m.z = g.color), m;
      };
    }, {}], 859: [function(v, Q, $) {
      var m = v("probe-image-size/sync"), g = v("../../snapshot/helpers").IMAGE_URL_PREFIX, k = v("buffer/").Buffer;
      $.getImageSize = function(x) {
        var e = x.replace(g, ""), r = new k(e, "base64");
        return m(r);
      };
    }, { "../../snapshot/helpers": 651, "buffer/": 85, "probe-image-size/sync": 277 }], 860: [function(v, Q, $) {
      var m = v("../../components/fx"), g = v("../../lib"), k = v("./constants");
      Q.exports = function(x, e, r) {
        var n = x.cd[0], s = n.trace, t = x.xa, d = x.ya;
        if (!(m.inbox(e - n.x0, e - (n.x0 + n.w * s.dx), 0) > 0 || m.inbox(r - n.y0, r - (n.y0 + n.h * s.dy), 0) > 0)) {
          var u, o = Math.floor((e - n.x0) / s.dx), h = Math.floor(Math.abs(r - n.y0) / s.dy);
          if (s._hasZ ? u = n.z[h][o] : s._hasSource && (u = s._canvas.el.getContext("2d", { willReadFrequently: !0 }).getImageData(o, h, 1, 1).data), u) {
            var l, i = n.hi || s.hoverinfo;
            if (i) {
              var p = i.split("+");
              p.indexOf("all") !== -1 && (p = ["color"]), p.indexOf("color") !== -1 && (l = !0);
            }
            var c, a = k.colormodel[s.colormodel], y = a.colormodel || s.colormodel, f = y.length, _ = s._scaler(u), b = a.suffix, w = [];
            (s.hovertemplate || l) && (w.push("[" + [_[0] + b[0], _[1] + b[1], _[2] + b[2]].join(", ")), f === 4 && w.push(", " + _[3] + b[3]), w.push("]"), w = w.join(""), x.extraText = y.toUpperCase() + ": " + w), Array.isArray(s.hovertext) && Array.isArray(s.hovertext[h]) ? c = s.hovertext[h][o] : Array.isArray(s.text) && Array.isArray(s.text[h]) && (c = s.text[h][o]);
            var T = d.c2p(n.y0 + (h + 0.5) * s.dy), L = n.x0 + (o + 0.5) * s.dx, A = n.y0 + (h + 0.5) * s.dy, I = "[" + u.slice(0, s.colormodel.length).join(", ") + "]";
            return [g.extendFlat(x, { index: [h, o], x0: t.c2p(n.x0 + o * s.dx), x1: t.c2p(n.x0 + (o + 1) * s.dx), y0: T, y1: T, color: _, xVal: L, xLabelVal: L, yVal: A, yLabelVal: A, zLabelVal: I, text: c, hovertemplateLabels: { zLabel: I, colorLabel: w, "color[0]Label": _[0] + b[0], "color[1]Label": _[1] + b[1], "color[2]Label": _[2] + b[2], "color[3]Label": _[3] + b[3] } })];
          }
        }
      };
    }, { "../../components/fx": 407, "../../lib": 515, "./constants": 856 }], 861: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("./plot"), style: v("./style"), hoverPoints: v("./hover"), eventData: v("./event_data"), moduleType: "trace", name: "image", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "2dMap", "noSortingByValue"], animatable: !1, meta: {} };
    }, { "../../plots/cartesian": 578, "./attributes": 854, "./calc": 855, "./defaults": 857, "./event_data": 858, "./hover": 860, "./plot": 862, "./style": 863 }], 862: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = g.strTranslate, x = v("../../constants/xmlns_namespaces"), e = v("./constants"), r = g.isIOS() || g.isSafari() || g.isIE();
      Q.exports = function(n, s, t, d) {
        var u = s.xaxis, o = s.yaxis, h = !(r || n._context._exportedPlot);
        g.makeTraceGroups(d, t, "im").each(function(l) {
          var i = m.select(this), p = l[0], c = p.trace, a = (c.zsmooth === "fast" || c.zsmooth === !1 && h) && !c._hasZ && c._hasSource && u.type === "linear" && o.type === "linear";
          c._realImage = a;
          var y, f, _, b, w, T, L = p.z, A = p.x0, I = p.y0, P = p.w, S = p.h, E = c.dx, R = c.dy;
          for (T = 0; y === void 0 && T < P; )
            y = u.c2p(A + T * E), T++;
          for (T = P; f === void 0 && T > 0; )
            f = u.c2p(A + T * E), T--;
          for (T = 0; b === void 0 && T < S; )
            b = o.c2p(I + T * R), T++;
          for (T = S; w === void 0 && T > 0; )
            w = o.c2p(I + T * R), T--;
          f < y && (_ = f, f = y, y = _), w < b && (_ = b, b = w, w = _), !a && (y = Math.max(-0.5 * u._length, y), f = Math.min(1.5 * u._length, f), b = Math.max(-0.5 * o._length, b), w = Math.min(1.5 * o._length, w));
          var z = Math.round(f - y), j = Math.round(w - b);
          if (z <= 0 || j <= 0)
            i.selectAll("image").data([]).exit().remove();
          else {
            var H = i.selectAll("image").data([l]);
            H.enter().append("svg:image").attr({ xmlns: x.svg, preserveAspectRatio: "none" }), H.exit().remove();
            var Y = c.zsmooth === !1 ? e.pixelatedStyle : "";
            if (a) {
              var J = g.simpleMap(u.range, u.r2l), W = g.simpleMap(o.range, o.r2l), Z = J[1] < J[0], re = W[1] > W[0];
              if (Z || re) {
                var V = y + z / 2, B = b + j / 2;
                Y += "transform:" + k(V + "px", B + "px") + "scale(" + (Z ? -1 : 1) + "," + (re ? -1 : 1) + ")" + k(-V + "px", -B + "px") + ";";
              }
            }
            H.attr("style", Y);
            var U = new Promise(function(N) {
              if (c._hasZ)
                N();
              else if (c._hasSource)
                if (c._canvas && c._canvas.el.width === P && c._canvas.el.height === S && c._canvas.source === c.source)
                  N();
                else {
                  var K = document.createElement("canvas");
                  K.width = P, K.height = S;
                  var X = K.getContext("2d", { willReadFrequently: !0 });
                  c._image = c._image || new Image();
                  var te = c._image;
                  te.onload = function() {
                    X.drawImage(te, 0, 0), c._canvas = { el: K, source: c.source }, N();
                  }, te.setAttribute("src", c.source);
                }
            }).then(function() {
              var N;
              if (c._hasZ)
                N = ee(function(X, te) {
                  return L[te][X];
                }).toDataURL("image/png");
              else if (c._hasSource)
                if (a)
                  N = c.source;
                else {
                  var K = c._canvas.el.getContext("2d", { willReadFrequently: !0 }).getImageData(0, 0, P, S).data;
                  N = ee(function(X, te) {
                    var ie = 4 * (te * P + X);
                    return [K[ie], K[ie + 1], K[ie + 2], K[ie + 3]];
                  }).toDataURL("image/png");
                }
              H.attr({ "xlink:href": N, height: j, width: z, x: y, y: b });
            });
            n._promises.push(U);
          }
          function ee(N) {
            var K = document.createElement("canvas");
            K.width = z, K.height = j;
            var X, te = K.getContext("2d", { willReadFrequently: !0 }), ie = function(se) {
              return g.constrain(Math.round(u.c2p(A + se * E) - y), 0, z);
            }, le = function(se) {
              return g.constrain(Math.round(o.c2p(I + se * R) - b), 0, j);
            }, oe = e.colormodel[c.colormodel], ve = oe.colormodel || c.colormodel, ue = oe.fmt;
            for (T = 0; T < p.w; T++) {
              var ye = ie(T), Ae = ie(T + 1);
              if (Ae !== ye && !isNaN(Ae) && !isNaN(ye))
                for (var pe = 0; pe < p.h; pe++) {
                  var ge = le(pe), we = le(pe + 1);
                  we === ge || isNaN(we) || isNaN(ge) || !N(T, pe) || (X = c._scaler(N(T, pe)), te.fillStyle = X ? ve + "(" + ue(X).join(",") + ")" : "rgba(0,0,0,0)", te.fillRect(ye, ge, Ae - ye, we - ge));
                }
            }
            return K;
          }
        });
      };
    }, { "../../constants/xmlns_namespaces": 492, "../../lib": 515, "./constants": 856, "@plotly/d3": 58 }], 863: [function(v, Q, $) {
      var m = v("@plotly/d3");
      Q.exports = function(g) {
        m.select(g).selectAll(".im image").style("opacity", function(k) {
          return k[0].trace.opacity;
        });
      };
    }, { "@plotly/d3": 58 }], 864: [function(v, Q, $) {
      var m = v("../../lib/extend").extendFlat, g = v("../../lib/extend").extendDeep, k = v("../../plot_api/edit_types").overrideAll, x = v("../../plots/font_attributes"), e = v("../../components/color/attributes"), r = v("../../plots/domain").attributes, n = v("../../plots/cartesian/layout_attributes"), s = v("../../plot_api/plot_template").templatedArray, t = v("../../constants/delta.js"), d = v("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers, u = x({ editType: "plot", colorEditType: "plot" }), o = { color: { valType: "color", editType: "plot" }, line: { color: { valType: "color", dflt: e.defaultLine, editType: "plot" }, width: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "calc" }, thickness: { valType: "number", min: 0, max: 1, dflt: 1, editType: "plot" }, editType: "calc" }, h = { valType: "info_array", items: [{ valType: "number", editType: "plot" }, { valType: "number", editType: "plot" }], editType: "plot" }, l = s("step", g({}, o, { range: h }));
      Q.exports = { mode: { valType: "flaglist", editType: "calc", flags: ["number", "delta", "gauge"], dflt: "number" }, value: { valType: "number", editType: "calc", anim: !0 }, align: { valType: "enumerated", values: ["left", "center", "right"], editType: "plot" }, domain: r({ name: "indicator", trace: !0, editType: "calc" }), title: { text: { valType: "string", editType: "plot" }, align: { valType: "enumerated", values: ["left", "center", "right"], editType: "plot" }, font: m({}, u, {}), editType: "plot" }, number: { valueformat: { valType: "string", dflt: "", editType: "plot", description: d("value") }, font: m({}, u, {}), prefix: { valType: "string", dflt: "", editType: "plot" }, suffix: { valType: "string", dflt: "", editType: "plot" }, editType: "plot" }, delta: { reference: { valType: "number", editType: "calc" }, position: { valType: "enumerated", values: ["top", "bottom", "left", "right"], dflt: "bottom", editType: "plot" }, relative: { valType: "boolean", editType: "plot", dflt: !1 }, valueformat: { valType: "string", editType: "plot", description: d("value") }, increasing: { symbol: { valType: "string", dflt: t.INCREASING.SYMBOL, editType: "plot" }, color: { valType: "color", dflt: t.INCREASING.COLOR, editType: "plot" }, editType: "plot" }, decreasing: { symbol: { valType: "string", dflt: t.DECREASING.SYMBOL, editType: "plot" }, color: { valType: "color", dflt: t.DECREASING.COLOR, editType: "plot" }, editType: "plot" }, font: m({}, u, {}), prefix: { valType: "string", dflt: "", editType: "plot" }, suffix: { valType: "string", dflt: "", editType: "plot" }, editType: "calc" }, gauge: { shape: { valType: "enumerated", editType: "plot", dflt: "angular", values: ["angular", "bullet"] }, bar: g({}, o, { color: { dflt: "green" } }), bgcolor: { valType: "color", editType: "plot" }, bordercolor: { valType: "color", dflt: e.defaultLine, editType: "plot" }, borderwidth: { valType: "number", min: 0, dflt: 1, editType: "plot" }, axis: k({ range: h, visible: m({}, n.visible, { dflt: !0 }), tickmode: n.tickmode, nticks: n.nticks, tick0: n.tick0, dtick: n.dtick, tickvals: n.tickvals, ticktext: n.ticktext, ticks: m({}, n.ticks, { dflt: "outside" }), ticklen: n.ticklen, tickwidth: n.tickwidth, tickcolor: n.tickcolor, ticklabelstep: n.ticklabelstep, showticklabels: n.showticklabels, tickfont: x({}), tickangle: n.tickangle, tickformat: n.tickformat, tickformatstops: n.tickformatstops, tickprefix: n.tickprefix, showtickprefix: n.showtickprefix, ticksuffix: n.ticksuffix, showticksuffix: n.showticksuffix, separatethousands: n.separatethousands, exponentformat: n.exponentformat, minexponent: n.minexponent, showexponent: n.showexponent, editType: "plot" }, "plot"), steps: l, threshold: { line: { color: m({}, o.line.color, {}), width: m({}, o.line.width, { dflt: 1 }), editType: "plot" }, thickness: m({}, o.thickness, { dflt: 0.85 }), value: { valType: "number", editType: "calc", dflt: !1 }, editType: "plot" }, editType: "plot" } };
    }, { "../../components/color/attributes": 366, "../../constants/delta.js": 485, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/cartesian/layout_attributes": 579, "../../plots/domain": 593, "../../plots/font_attributes": 594 }], 865: [function(v, Q, $) {
      var m = v("../../plots/plots");
      $.name = "indicator", $.plot = function(g, k, x, e) {
        m.plotBasePlot($.name, g, k, x, e);
      }, $.clean = function(g, k, x, e) {
        m.cleanBasePlot($.name, g, k, x, e);
      };
    }, { "../../plots/plots": 628 }], 866: [function(v, Q, $) {
      Q.exports = { calc: function(m, g) {
        var k = [], x = g.value;
        typeof g._lastValue != "number" && (g._lastValue = g.value);
        var e = g._lastValue, r = e;
        return g._hasDelta && typeof g.delta.reference == "number" && (r = g.delta.reference), k[0] = { y: x, lastY: e, delta: x - r, relativeDelta: (x - r) / r }, k;
      } };
    }, {}], 867: [function(v, Q, $) {
      Q.exports = { defaultNumberFontSize: 80, bulletNumberDomainSize: 0.25, bulletPadding: 0.025, innerRadius: 0.75, valueThickness: 0.5, titlePadding: 5, horizontalPadding: 10 };
    }, {}], 868: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../plots/domain").defaults, x = v("../../plot_api/plot_template"), e = v("../../plots/array_container_defaults"), r = v("./constants.js"), n = v("../../plots/cartesian/tick_value_defaults"), s = v("../../plots/cartesian/tick_mark_defaults"), t = v("../../plots/cartesian/tick_label_defaults"), d = v("../../plots/cartesian/prefix_suffix_defaults");
      function u(o, h) {
        function l(i, p) {
          return m.coerce(o, h, g.gauge.steps, i, p);
        }
        l("color"), l("line.color"), l("line.width"), l("range"), l("thickness");
      }
      Q.exports = { supplyDefaults: function(o, h, l, i) {
        function p(P, S) {
          return m.coerce(o, h, g, P, S);
        }
        k(h, i, p), p("mode"), h._hasNumber = h.mode.indexOf("number") !== -1, h._hasDelta = h.mode.indexOf("delta") !== -1, h._hasGauge = h.mode.indexOf("gauge") !== -1;
        var c = p("value");
        h._range = [0, typeof c == "number" ? 1.5 * c : 1];
        var a, y, f, _, b, w, T = new Array(2);
        function L(P, S) {
          return m.coerce(f, _, g.gauge, P, S);
        }
        function A(P, S) {
          return m.coerce(b, w, g.gauge.axis, P, S);
        }
        if (h._hasNumber && (p("number.valueformat"), p("number.font.color", i.font.color), p("number.font.family", i.font.family), p("number.font.size"), h.number.font.size === void 0 && (h.number.font.size = r.defaultNumberFontSize, T[0] = !0), p("number.prefix"), p("number.suffix"), a = h.number.font.size), h._hasDelta && (p("delta.font.color", i.font.color), p("delta.font.family", i.font.family), p("delta.font.size"), h.delta.font.size === void 0 && (h.delta.font.size = (h._hasNumber ? 0.5 : 1) * (a || r.defaultNumberFontSize), T[1] = !0), p("delta.reference", h.value), p("delta.relative"), p("delta.valueformat", h.delta.relative ? "2%" : ""), p("delta.increasing.symbol"), p("delta.increasing.color"), p("delta.decreasing.symbol"), p("delta.decreasing.color"), p("delta.position"), p("delta.prefix"), p("delta.suffix"), y = h.delta.font.size), h._scaleNumbers = (!h._hasNumber || T[0]) && (!h._hasDelta || T[1]) || !1, p("title.font.color", i.font.color), p("title.font.family", i.font.family), p("title.font.size", 0.25 * (a || y || r.defaultNumberFontSize)), p("title.text"), h._hasGauge) {
          (f = o.gauge) || (f = {}), _ = x.newContainer(h, "gauge"), L("shape"), (h._isBullet = h.gauge.shape === "bullet") || p("title.align", "center"), (h._isAngular = h.gauge.shape === "angular") || p("align", "center"), L("bgcolor", i.paper_bgcolor), L("borderwidth"), L("bordercolor"), L("bar.color"), L("bar.line.color"), L("bar.line.width"), L("bar.thickness", r.valueThickness * (h.gauge.shape === "bullet" ? 0.5 : 1)), e(f, _, { name: "steps", handleItemDefaults: u }), L("threshold.value"), L("threshold.thickness"), L("threshold.line.width"), L("threshold.line.color"), b = {}, f && (b = f.axis || {}), w = x.newContainer(_, "axis"), A("visible"), h._range = A("range", h._range);
          var I = { outerTicks: !0 };
          n(b, w, A, "linear"), d(b, w, A, "linear", I), t(b, w, A, "linear", I), s(b, w, A, I);
        } else
          p("title.align", "center"), p("align", "center"), h._isAngular = h._isBullet = !1;
        h._length = null;
      } };
    }, { "../../lib": 515, "../../plot_api/plot_template": 555, "../../plots/array_container_defaults": 561, "../../plots/cartesian/prefix_suffix_defaults": 583, "../../plots/cartesian/tick_label_defaults": 587, "../../plots/cartesian/tick_mark_defaults": 588, "../../plots/cartesian/tick_value_defaults": 589, "../../plots/domain": 593, "./attributes": 864, "./constants.js": 867 }], 869: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "indicator", basePlotModule: v("./base_plot"), categories: ["svg", "noOpacity", "noHover"], animatable: !0, attributes: v("./attributes"), supplyDefaults: v("./defaults").supplyDefaults, calc: v("./calc").calc, plot: v("./plot"), meta: {} };
    }, { "./attributes": 864, "./base_plot": 865, "./calc": 866, "./defaults": 868, "./plot": 870 }], 870: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-interpolate").interpolate, k = v("d3-interpolate").interpolateNumber, x = v("../../lib"), e = x.strScale, r = x.strTranslate, n = x.rad2deg, s = v("../../constants/alignment").MID_SHIFT, t = v("../../components/drawing"), d = v("./constants"), u = v("../../lib/svg_text_utils"), o = v("../../plots/cartesian/axes"), h = v("../../plots/cartesian/axis_defaults"), l = v("../../plots/cartesian/position_defaults"), i = v("../../plots/cartesian/layout_attributes"), p = v("../../components/color"), c = { left: "start", center: "middle", right: "end" }, a = { left: 0, center: 0.5, right: 1 }, y = /[yzafpn\xb5mkMGTPEZY]/;
      function f(A) {
        return A && A.duration > 0;
      }
      function _(A) {
        A.each(function(I) {
          p.stroke(m.select(this), I.line.color);
        }).each(function(I) {
          p.fill(m.select(this), I.color);
        }).style("stroke-width", function(I) {
          return I.line.width;
        });
      }
      function b(A, I, P) {
        var S = A._fullLayout, E = x.extendFlat({ type: "linear", ticks: "outside", range: P, showline: !0 }, I), R = { type: "linear", _id: "x" + I._id }, z = { letter: "x", font: S.font, noHover: !0, noTickson: !0 };
        function j(H, Y) {
          return x.coerce(E, R, i, H, Y);
        }
        return h(E, R, j, z, S), l(E, R, j, z), R;
      }
      function w(A, I, P) {
        return [Math.min(I / A.width, P / A.height), A, I + "x" + P];
      }
      function T(A, I, P, S) {
        var E = document.createElementNS("http://www.w3.org/2000/svg", "text"), R = m.select(E);
        return R.text(A).attr("x", 0).attr("y", 0).attr("text-anchor", P).attr("data-unformatted", A).call(u.convertToTspans, S).call(t.font, I), t.bBox(R.node());
      }
      function L(A, I, P, S, E, R) {
        var z = "_cache" + I;
        A[z] && A[z].key === E || (A[z] = { key: E, value: P });
        var j = x.aggNums(R, null, [A[z].value, S], 2);
        return A[z].value = j, j;
      }
      Q.exports = function(A, I, P, S) {
        var E, R = A._fullLayout;
        f(P) && S && (E = S()), x.makeTraceGroups(R._indicatorlayer, I, "trace").each(function(z) {
          var j, H, Y, J, W, Z = z[0].trace, re = m.select(this), V = Z._hasGauge, B = Z._isAngular, U = Z._isBullet, ee = Z.domain, N = { w: R._size.w * (ee.x[1] - ee.x[0]), h: R._size.h * (ee.y[1] - ee.y[0]), l: R._size.l + R._size.w * ee.x[0], r: R._size.r + R._size.w * (1 - ee.x[1]), t: R._size.t + R._size.h * (1 - ee.y[1]), b: R._size.b + R._size.h * ee.y[0] }, K = N.l + N.w / 2, X = N.t + N.h / 2, te = Math.min(N.w / 2, N.h), ie = d.innerRadius * te, le = Z.align || "center";
          if (H = X, V) {
            if (B && (j = K, H = X + te / 2, Y = function(we) {
              return function(se, de) {
                var Te = Math.sqrt(se.width / 2 * (se.width / 2) + se.height * se.height);
                return [de / Te, se, de];
              }(we, 0.9 * ie);
            }), U) {
              var oe = d.bulletPadding, ve = 1 - d.bulletNumberDomainSize + oe;
              j = N.l + (ve + (1 - ve) * a[le]) * N.w, Y = function(we) {
                return w(we, (d.bulletNumberDomainSize - oe) * N.w, N.h);
              };
            }
          } else
            j = N.l + a[le] * N.w, Y = function(we) {
              return w(we, N.w, N.h);
            };
          (function(we, se, de, Te) {
            var Ee, Me, ze, Ie = de[0].trace, Oe = Te.numbersX, Ze = Te.numbersY, Fe = Ie.align || "center", Pe = c[Fe], De = Te.transitionOpts, Ge = Te.onComplete, Qe = x.ensureSingle(se, "g", "numbers"), ot = [];
            Ie._hasNumber && ot.push("number"), Ie._hasDelta && (ot.push("delta"), Ie.delta.position === "left" && ot.reverse());
            var vt = Qe.selectAll("text").data(ot);
            function bt(Gt, nr, It, Be) {
              if (!Gt.match("s") || It >= 0 == Be >= 0 || nr(It).slice(-1).match(y) || nr(Be).slice(-1).match(y))
                return nr;
              var He = Gt.slice().replace("s", "f").replace(/\d+/, function(be) {
                return parseInt(be) - 1;
              }), he = b(we, { tickformat: He });
              return function(be) {
                return Math.abs(be) < 1 ? o.tickText(he, be).text : nr(be);
              };
            }
            vt.enter().append("text"), vt.attr("text-anchor", function() {
              return Pe;
            }).attr("class", function(Gt) {
              return Gt;
            }).attr("x", null).attr("y", null).attr("dx", null).attr("dy", null), vt.exit().remove();
            var yt, tt = Ie.mode + Ie.align;
            if (Ie._hasDelta && (yt = function() {
              var Gt = b(we, { tickformat: Ie.delta.valueformat }, Ie._range);
              Gt.setScale(), o.prepTicks(Gt);
              var nr = function(Xe) {
                return o.tickText(Gt, Xe).text;
              }, It = Ie.delta.suffix, Be = Ie.delta.prefix, He = function(Xe) {
                return Ie.delta.relative ? Xe.relativeDelta : Xe.delta;
              }, he = function(Xe, qe) {
                return Xe === 0 || typeof Xe != "number" || isNaN(Xe) ? "-" : (Xe > 0 ? Ie.delta.increasing.symbol : Ie.delta.decreasing.symbol) + Be + qe(Xe) + It;
              }, be = function(Xe) {
                return Xe.delta >= 0 ? Ie.delta.increasing.color : Ie.delta.decreasing.color;
              };
              Ie._deltaLastValue === void 0 && (Ie._deltaLastValue = He(de[0]));
              var Re = Qe.select("text.delta");
              function Ue() {
                Re.text(he(He(de[0]), nr)).call(p.fill, be(de[0])).call(u.convertToTspans, we);
              }
              return Re.call(t.font, Ie.delta.font).call(p.fill, be({ delta: Ie._deltaLastValue })), f(De) ? Re.transition().duration(De.duration).ease(De.easing).tween("text", function() {
                var Xe = m.select(this), qe = He(de[0]), st = Ie._deltaLastValue, it = bt(Ie.delta.valueformat, nr, st, qe), Tt = k(st, qe);
                return Ie._deltaLastValue = qe, function(Pt) {
                  Xe.text(he(Tt(Pt), it)), Xe.call(p.fill, be({ delta: Tt(Pt) }));
                };
              }).each("end", function() {
                Ue(), Ge && Ge();
              }).each("interrupt", function() {
                Ue(), Ge && Ge();
              }) : Ue(), Me = T(he(He(de[0]), nr), Ie.delta.font, Pe, we), Re;
            }(), tt += Ie.delta.position + Ie.delta.font.size + Ie.delta.font.family + Ie.delta.valueformat, tt += Ie.delta.increasing.symbol + Ie.delta.decreasing.symbol, ze = Me), Ie._hasNumber && (function() {
              var Gt = b(we, { tickformat: Ie.number.valueformat }, Ie._range);
              Gt.setScale(), o.prepTicks(Gt);
              var nr = function(be) {
                return o.tickText(Gt, be).text;
              }, It = Ie.number.suffix, Be = Ie.number.prefix, He = Qe.select("text.number");
              function he() {
                var be = typeof de[0].y == "number" ? Be + nr(de[0].y) + It : "-";
                He.text(be).call(t.font, Ie.number.font).call(u.convertToTspans, we);
              }
              f(De) ? He.transition().duration(De.duration).ease(De.easing).each("end", function() {
                he(), Ge && Ge();
              }).each("interrupt", function() {
                he(), Ge && Ge();
              }).attrTween("text", function() {
                var be = m.select(this), Re = k(de[0].lastY, de[0].y);
                Ie._lastValue = de[0].y;
                var Ue = bt(Ie.number.valueformat, nr, de[0].lastY, de[0].y);
                return function(Xe) {
                  be.text(Be + Ue(Re(Xe)) + It);
                };
              }) : he(), Ee = T(Be + nr(de[0].y) + It, Ie.number.font, Pe, we);
            }(), tt += Ie.number.font.size + Ie.number.font.family + Ie.number.valueformat + Ie.number.suffix + Ie.number.prefix, ze = Ee), Ie._hasDelta && Ie._hasNumber) {
              var Ke, mt, Ft = [(Ee.left + Ee.right) / 2, (Ee.top + Ee.bottom) / 2], Vt = [(Me.left + Me.right) / 2, (Me.top + Me.bottom) / 2], Xt = 0.75 * Ie.delta.font.size;
              Ie.delta.position === "left" && (Ke = L(Ie, "deltaPos", 0, -1 * (Ee.width * a[Ie.align] + Me.width * (1 - a[Ie.align]) + Xt), tt, Math.min), mt = Ft[1] - Vt[1], ze = { width: Ee.width + Me.width + Xt, height: Math.max(Ee.height, Me.height), left: Me.left + Ke, right: Ee.right, top: Math.min(Ee.top, Me.top + mt), bottom: Math.max(Ee.bottom, Me.bottom + mt) }), Ie.delta.position === "right" && (Ke = L(Ie, "deltaPos", 0, Ee.width * (1 - a[Ie.align]) + Me.width * a[Ie.align] + Xt, tt, Math.max), mt = Ft[1] - Vt[1], ze = { width: Ee.width + Me.width + Xt, height: Math.max(Ee.height, Me.height), left: Ee.left, right: Me.right + Ke, top: Math.min(Ee.top, Me.top + mt), bottom: Math.max(Ee.bottom, Me.bottom + mt) }), Ie.delta.position === "bottom" && (Ke = null, mt = Me.height, ze = { width: Math.max(Ee.width, Me.width), height: Ee.height + Me.height, left: Math.min(Ee.left, Me.left), right: Math.max(Ee.right, Me.right), top: Ee.bottom - Ee.height, bottom: Ee.bottom + Me.height }), Ie.delta.position === "top" && (Ke = null, mt = Ee.top, ze = { width: Math.max(Ee.width, Me.width), height: Ee.height + Me.height, left: Math.min(Ee.left, Me.left), right: Math.max(Ee.right, Me.right), top: Ee.bottom - Ee.height - Me.height, bottom: Ee.bottom }), yt.attr({ dx: Ke, dy: mt });
            }
            (Ie._hasNumber || Ie._hasDelta) && Qe.attr("transform", function() {
              var Gt = Te.numbersScaler(ze);
              tt += Gt[2];
              var nr, It = L(Ie, "numbersScale", 1, Gt[0], tt, Math.min);
              Ie._scaleNumbers || (It = 1), nr = Ie._isAngular ? Ze - It * ze.bottom : Ze - It * (ze.top + ze.bottom) / 2, Ie._numbersTop = It * ze.top + nr;
              var Be = ze[Fe];
              Fe === "center" && (Be = (ze.left + ze.right) / 2);
              var He = Oe - It * Be;
              return He = L(Ie, "numbersTranslate", 0, He, tt, Math.max), r(He, nr) + e(It);
            });
          })(A, re, z, { numbersX: j, numbersY: H, numbersScaler: Y, transitionOpts: P, onComplete: E }), V && (J = { range: Z.gauge.axis.range, color: Z.gauge.bgcolor, line: { color: Z.gauge.bordercolor, width: 0 }, thickness: 1 }, W = { range: Z.gauge.axis.range, color: "rgba(0, 0, 0, 0)", line: { color: Z.gauge.bordercolor, width: Z.gauge.borderwidth }, thickness: 1 });
          var ue = re.selectAll("g.angular").data(B ? z : []);
          ue.exit().remove();
          var ye = re.selectAll("g.angularaxis").data(B ? z : []);
          ye.exit().remove(), B && function(we, se, de, Te) {
            var Ee, Me, ze, Ie, Oe = de[0].trace, Ze = Te.size, Fe = Te.radius, Pe = Te.innerRadius, De = Te.gaugeBg, Ge = Te.gaugeOutline, Qe = [Ze.l + Ze.w / 2, Ze.t + Ze.h / 2 + Fe / 2], ot = Te.gauge, vt = Te.layer, bt = Te.transitionOpts, yt = Te.onComplete, tt = Math.PI / 2;
            function Ke(Pt) {
              var rt = Oe.gauge.axis.range[0], ut = (Pt - rt) / (Oe.gauge.axis.range[1] - rt) * Math.PI - tt;
              return ut < -tt ? -tt : ut > tt ? tt : ut;
            }
            function mt(Pt) {
              return m.svg.arc().innerRadius((Pe + Fe) / 2 - Pt / 2 * (Fe - Pe)).outerRadius((Pe + Fe) / 2 + Pt / 2 * (Fe - Pe)).startAngle(-tt);
            }
            function Ft(Pt) {
              Pt.attr("d", function(rt) {
                return mt(rt.thickness).startAngle(Ke(rt.range[0])).endAngle(Ke(rt.range[1]))();
              });
            }
            ot.enter().append("g").classed("angular", !0), ot.attr("transform", r(Qe[0], Qe[1])), vt.enter().append("g").classed("angularaxis", !0).classed("crisp", !0), vt.selectAll("g.xangularaxistick,path,text").remove(), (Ee = b(we, Oe.gauge.axis)).type = "linear", Ee.range = Oe.gauge.axis.range, Ee._id = "xangularaxis", Ee.ticklabeloverflow = "allow", Ee.setScale();
            var Vt = function(Pt) {
              return (Ee.range[0] - Pt.x) / (Ee.range[1] - Ee.range[0]) * Math.PI + Math.PI;
            }, Xt = {}, Gt = o.makeLabelFns(Ee, 0).labelStandoff;
            Xt.xFn = function(Pt) {
              var rt = Vt(Pt);
              return Math.cos(rt) * Gt;
            }, Xt.yFn = function(Pt) {
              var rt = Vt(Pt), ut = Math.sin(rt) > 0 ? 0.2 : 1;
              return -Math.sin(rt) * (Gt + Pt.fontSize * ut) + Math.abs(Math.cos(rt)) * (Pt.fontSize * s);
            }, Xt.anchorFn = function(Pt) {
              var rt = Vt(Pt), ut = Math.cos(rt);
              return Math.abs(ut) < 0.1 ? "middle" : ut > 0 ? "start" : "end";
            }, Xt.heightFn = function(Pt, rt, ut) {
              var Bt = Vt(Pt);
              return -0.5 * (1 + Math.sin(Bt)) * ut;
            };
            var nr = function(Pt) {
              return r(Qe[0] + Fe * Math.cos(Pt), Qe[1] - Fe * Math.sin(Pt));
            };
            if (ze = function(Pt) {
              return nr(Vt(Pt));
            }, Me = o.calcTicks(Ee), Ie = o.getTickSigns(Ee)[2], Ee.visible) {
              Ie = Ee.ticks === "inside" ? -1 : 1;
              var It = (Ee.linewidth || 1) / 2;
              o.drawTicks(we, Ee, { vals: Me, layer: vt, path: "M" + Ie * It + ",0h" + Ie * Ee.ticklen, transFn: function(Pt) {
                var rt = Vt(Pt);
                return nr(rt) + "rotate(" + -n(rt) + ")";
              } }), o.drawLabels(we, Ee, { vals: Me, layer: vt, transFn: ze, labelFns: Xt });
            }
            var Be = [De].concat(Oe.gauge.steps), He = ot.selectAll("g.bg-arc").data(Be);
            He.enter().append("g").classed("bg-arc", !0).append("path"), He.select("path").call(Ft).call(_), He.exit().remove();
            var he = mt(Oe.gauge.bar.thickness), be = ot.selectAll("g.value-arc").data([Oe.gauge.bar]);
            be.enter().append("g").classed("value-arc", !0).append("path");
            var Re = be.select("path");
            f(bt) ? (Re.transition().duration(bt.duration).ease(bt.easing).each("end", function() {
              yt && yt();
            }).each("interrupt", function() {
              yt && yt();
            }).attrTween("d", (Ue = he, Xe = Ke(de[0].lastY), qe = Ke(de[0].y), function() {
              var Pt = g(Xe, qe);
              return function(rt) {
                return Ue.endAngle(Pt(rt))();
              };
            })), Oe._lastValue = de[0].y) : Re.attr("d", typeof de[0].y == "number" ? he.endAngle(Ke(de[0].y)) : "M0,0Z");
            var Ue, Xe, qe;
            Re.call(_), be.exit().remove(), Be = [];
            var st = Oe.gauge.threshold.value;
            (st || st === 0) && Be.push({ range: [st, st], color: Oe.gauge.threshold.color, line: { color: Oe.gauge.threshold.line.color, width: Oe.gauge.threshold.line.width }, thickness: Oe.gauge.threshold.thickness });
            var it = ot.selectAll("g.threshold-arc").data(Be);
            it.enter().append("g").classed("threshold-arc", !0).append("path"), it.select("path").call(Ft).call(_), it.exit().remove();
            var Tt = ot.selectAll("g.gauge-outline").data([Ge]);
            Tt.enter().append("g").classed("gauge-outline", !0).append("path"), Tt.select("path").call(Ft).call(_), Tt.exit().remove();
          }(A, 0, z, { radius: te, innerRadius: ie, gauge: ue, layer: ye, size: N, gaugeBg: J, gaugeOutline: W, transitionOpts: P, onComplete: E });
          var Ae = re.selectAll("g.bullet").data(U ? z : []);
          Ae.exit().remove();
          var pe = re.selectAll("g.bulletaxis").data(U ? z : []);
          pe.exit().remove(), U && function(we, se, de, Te) {
            var Ee, Me, ze, Ie, Oe, Ze = de[0].trace, Fe = Te.gauge, Pe = Te.layer, De = Te.gaugeBg, Ge = Te.gaugeOutline, Qe = Te.size, ot = Ze.domain, vt = Te.transitionOpts, bt = Te.onComplete;
            Fe.enter().append("g").classed("bullet", !0), Fe.attr("transform", r(Qe.l, Qe.t)), Pe.enter().append("g").classed("bulletaxis", !0).classed("crisp", !0), Pe.selectAll("g.xbulletaxistick,path,text").remove();
            var yt = Qe.h, tt = Ze.gauge.bar.thickness * yt, Ke = ot.x[0], mt = ot.x[0] + (ot.x[1] - ot.x[0]) * (Ze._hasNumber || Ze._hasDelta ? 1 - d.bulletNumberDomainSize : 1);
            (Ee = b(we, Ze.gauge.axis))._id = "xbulletaxis", Ee.domain = [Ke, mt], Ee.setScale(), Me = o.calcTicks(Ee), ze = o.makeTransTickFn(Ee), Ie = o.getTickSigns(Ee)[2], Oe = Qe.t + Qe.h, Ee.visible && (o.drawTicks(we, Ee, { vals: Ee.ticks === "inside" ? o.clipEnds(Ee, Me) : Me, layer: Pe, path: o.makeTickPath(Ee, Oe, Ie), transFn: ze }), o.drawLabels(we, Ee, { vals: Me, layer: Pe, transFn: ze, labelFns: o.makeLabelFns(Ee, Oe) }));
            function Ft(He) {
              He.attr("width", function(he) {
                return Math.max(0, Ee.c2p(he.range[1]) - Ee.c2p(he.range[0]));
              }).attr("x", function(he) {
                return Ee.c2p(he.range[0]);
              }).attr("y", function(he) {
                return 0.5 * (1 - he.thickness) * yt;
              }).attr("height", function(he) {
                return he.thickness * yt;
              });
            }
            var Vt = [De].concat(Ze.gauge.steps), Xt = Fe.selectAll("g.bg-bullet").data(Vt);
            Xt.enter().append("g").classed("bg-bullet", !0).append("rect"), Xt.select("rect").call(Ft).call(_), Xt.exit().remove();
            var Gt = Fe.selectAll("g.value-bullet").data([Ze.gauge.bar]);
            Gt.enter().append("g").classed("value-bullet", !0).append("rect"), Gt.select("rect").attr("height", tt).attr("y", (yt - tt) / 2).call(_), f(vt) ? Gt.select("rect").transition().duration(vt.duration).ease(vt.easing).each("end", function() {
              bt && bt();
            }).each("interrupt", function() {
              bt && bt();
            }).attr("width", Math.max(0, Ee.c2p(Math.min(Ze.gauge.axis.range[1], de[0].y)))) : Gt.select("rect").attr("width", typeof de[0].y == "number" ? Math.max(0, Ee.c2p(Math.min(Ze.gauge.axis.range[1], de[0].y))) : 0), Gt.exit().remove();
            var nr = de.filter(function() {
              return Ze.gauge.threshold.value || Ze.gauge.threshold.value === 0;
            }), It = Fe.selectAll("g.threshold-bullet").data(nr);
            It.enter().append("g").classed("threshold-bullet", !0).append("line"), It.select("line").attr("x1", Ee.c2p(Ze.gauge.threshold.value)).attr("x2", Ee.c2p(Ze.gauge.threshold.value)).attr("y1", (1 - Ze.gauge.threshold.thickness) / 2 * yt).attr("y2", (1 - (1 - Ze.gauge.threshold.thickness) / 2) * yt).call(p.stroke, Ze.gauge.threshold.line.color).style("stroke-width", Ze.gauge.threshold.line.width), It.exit().remove();
            var Be = Fe.selectAll("g.gauge-outline").data([Ge]);
            Be.enter().append("g").classed("gauge-outline", !0).append("rect"), Be.select("rect").call(Ft).call(_), Be.exit().remove();
          }(A, 0, z, { gauge: Ae, layer: pe, size: N, gaugeBg: J, gaugeOutline: W, transitionOpts: P, onComplete: E });
          var ge = re.selectAll("text.title").data(z);
          ge.exit().remove(), ge.enter().append("text").classed("title", !0), ge.attr("text-anchor", function() {
            return U ? c.right : c[Z.title.align];
          }).text(Z.title.text).call(t.font, Z.title.font).call(u.convertToTspans, A), ge.attr("transform", function() {
            var we, se = N.l + N.w * a[Z.title.align], de = d.titlePadding, Te = t.bBox(ge.node());
            return V ? (B && (Z.gauge.axis.visible ? we = t.bBox(ye.node()).top - de - Te.bottom : we = N.t + N.h / 2 - te / 2 - Te.bottom - de), U && (we = H - (Te.top + Te.bottom) / 2, se = N.l - d.bulletPadding * N.w)) : we = Z._numbersTop - de - Te.bottom, r(se, we);
          });
        });
      };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../constants/alignment": 483, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "../../plots/cartesian/axis_defaults": 568, "../../plots/cartesian/layout_attributes": 579, "../../plots/cartesian/position_defaults": 582, "./constants": 867, "@plotly/d3": 58, "d3-interpolate": 116 }], 871: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../mesh3d/attributes"), e = v("../../plots/attributes"), r = v("../../lib/extend").extendFlat, n = v("../../plot_api/edit_types").overrideAll, s = Q.exports = n(r({ x: { valType: "data_array" }, y: { valType: "data_array" }, z: { valType: "data_array" }, value: { valType: "data_array" }, isomin: { valType: "number" }, isomax: { valType: "number" }, surface: { show: { valType: "boolean", dflt: !0 }, count: { valType: "integer", dflt: 2, min: 1 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 }, pattern: { valType: "flaglist", flags: ["A", "B", "C", "D", "E"], extras: ["all", "odd", "even"], dflt: "all" } }, spaceframe: { show: { valType: "boolean", dflt: !1 }, fill: { valType: "number", min: 0, max: 1, dflt: 0.15 } }, slices: { x: { show: { valType: "boolean", dflt: !1 }, locations: { valType: "data_array", dflt: [] }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, y: { show: { valType: "boolean", dflt: !1 }, locations: { valType: "data_array", dflt: [] }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, z: { show: { valType: "boolean", dflt: !1 }, locations: { valType: "data_array", dflt: [] }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } } }, caps: { x: { show: { valType: "boolean", dflt: !0 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, y: { show: { valType: "boolean", dflt: !0 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, z: { show: { valType: "boolean", dflt: !0 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } } }, text: { valType: "string", dflt: "", arrayOk: !0 }, hovertext: { valType: "string", dflt: "", arrayOk: !0 }, hovertemplate: k(), xhoverformat: g("x"), yhoverformat: g("y"), zhoverformat: g("z"), valuehoverformat: g("value", 1), showlegend: r({}, e.showlegend, { dflt: !1 }) }, m("", { colorAttr: "`value`", showScaleDflt: !0, editTypeOverride: "calc" }), { opacity: x.opacity, lightposition: x.lightposition, lighting: x.lighting, flatshading: x.flatshading, contour: x.contour, hoverinfo: r({}, e.hoverinfo) }), "calc", "nested");
      s.flatshading.dflt = !0, s.lighting.facenormalsepsilon.dflt = 0, s.x.editType = s.y.editType = s.z.editType = s.value.editType = "calc+clearAxisTypes", s.transforms = void 0;
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../mesh3d/attributes": 876 }], 872: [function(v, Q, $) {
      var m = v("../../components/colorscale/calc"), g = v("../streamtube/calc").processGrid, k = v("../streamtube/calc").filter;
      Q.exports = function(x, e) {
        e._len = Math.min(e.x.length, e.y.length, e.z.length, e.value.length), e._x = k(e.x, e._len), e._y = k(e.y, e._len), e._z = k(e.z, e._len), e._value = k(e.value, e._len);
        var r = g(e);
        e._gridFill = r.fill, e._Xs = r.Xs, e._Ys = r.Ys, e._Zs = r.Zs, e._len = r.len;
        for (var n = 1 / 0, s = -1 / 0, t = 0; t < e._len; t++) {
          var d = e._value[t];
          n = Math.min(n, d), s = Math.max(s, d);
        }
        e._minValues = n, e._maxValues = s, e._vMin = e.isomin === void 0 || e.isomin === null ? n : e.isomin, e._vMax = e.isomax === void 0 || e.isomin === null ? s : e.isomax, m(x, e, { vals: [e._vMin, e._vMax], containerStr: "", cLetter: "c" });
      };
    }, { "../../components/colorscale/calc": 375, "../streamtube/calc": 1054 }], 873: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_mesh3d, g = v("../../lib/gl_format_color").parseColorScale, k = v("../../lib/str2rgbarray"), x = v("../../components/colorscale").extractOpts, e = v("../../plots/gl3d/zip3"), r = function(u, o) {
        for (var h = o.length - 1; h > 0; h--) {
          var l = Math.min(o[h], o[h - 1]), i = Math.max(o[h], o[h - 1]);
          if (i > l && l < u && u <= i)
            return { id: h, distRatio: (i - u) / (i - l) };
        }
        return { id: 0, distRatio: 0 };
      };
      function n(u, o, h) {
        this.scene = u, this.uid = h, this.mesh = o, this.name = "", this.data = null, this.showContour = !1;
      }
      var s = n.prototype;
      s.handlePick = function(u) {
        if (u.object === this.mesh) {
          var o = u.data.index, h = this.data._meshX[o], l = this.data._meshY[o], i = this.data._meshZ[o], p = this.data._Ys.length, c = this.data._Zs.length, a = r(h, this.data._Xs).id, y = r(l, this.data._Ys).id, f = r(i, this.data._Zs).id, _ = u.index = f + c * y + c * p * a;
          u.traceCoordinate = [this.data._meshX[_], this.data._meshY[_], this.data._meshZ[_], this.data._value[_]];
          var b = this.data.hovertext || this.data.text;
          return Array.isArray(b) && b[_] !== void 0 ? u.textLabel = b[_] : b && (u.textLabel = b), !0;
        }
      }, s.update = function(u) {
        var o = this.scene, h = o.fullSceneLayout;
        function l(c, a, y, f) {
          return a.map(function(_) {
            return c.d2l(_, 0, f) * y;
          });
        }
        this.data = d(u);
        var i = { positions: e(l(h.xaxis, u._meshX, o.dataScale[0], u.xcalendar), l(h.yaxis, u._meshY, o.dataScale[1], u.ycalendar), l(h.zaxis, u._meshZ, o.dataScale[2], u.zcalendar)), cells: e(u._meshI, u._meshJ, u._meshK), lightPosition: [u.lightposition.x, u.lightposition.y, u.lightposition.z], ambient: u.lighting.ambient, diffuse: u.lighting.diffuse, specular: u.lighting.specular, roughness: u.lighting.roughness, fresnel: u.lighting.fresnel, vertexNormalsEpsilon: u.lighting.vertexnormalsepsilon, faceNormalsEpsilon: u.lighting.facenormalsepsilon, opacity: u.opacity, contourEnable: u.contour.show, contourColor: k(u.contour.color).slice(0, 3), contourWidth: u.contour.width, useFacetNormals: u.flatshading }, p = x(u);
        i.vertexIntensity = u._meshIntensity, i.vertexIntensityBounds = [p.min, p.max], i.colormap = g(u), this.mesh.update(i);
      }, s.dispose = function() {
        this.scene.glplot.remove(this.mesh), this.mesh.dispose();
      };
      var t = ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"];
      function d(u) {
        u._meshI = [], u._meshJ = [], u._meshK = [];
        var o, h, l, i, p, c, a, y = u.surface.show, f = u.spaceframe.show, _ = u.surface.fill, b = u.spaceframe.fill, w = !1, T = !1, L = 0, A = u._Xs, I = u._Ys, P = u._Zs, S = A.length, E = I.length, R = P.length, z = t.indexOf(u._gridFill.replace(/-/g, "").replace(/\+/g, "")), j = function(Fe, Pe, De) {
          switch (z) {
            case 5:
              return De + R * Pe + R * E * Fe;
            case 4:
              return De + R * Fe + R * S * Pe;
            case 3:
              return Pe + E * De + E * R * Fe;
            case 2:
              return Pe + E * Fe + E * S * De;
            case 1:
              return Fe + S * De + S * R * Pe;
            default:
              return Fe + S * Pe + S * E * De;
          }
        }, H = u._minValues, Y = u._maxValues, J = u._vMin, W = u._vMax;
        function Z(Fe, Pe, De) {
          for (var Ge = c.length, Qe = h; Qe < Ge; Qe++)
            if (Fe === l[Qe] && Pe === i[Qe] && De === p[Qe])
              return Qe;
          return -1;
        }
        function re() {
          h = o;
        }
        function V() {
          l = [], i = [], p = [], c = [], o = 0, re();
        }
        function B(Fe, Pe, De, Ge) {
          return l.push(Fe), i.push(Pe), p.push(De), c.push(Ge), ++o - 1;
        }
        function U(Fe, Pe, De) {
          for (var Ge = [], Qe = 0; Qe < Fe.length; Qe++)
            Ge[Qe] = Fe[Qe] * (1 - De) + De * Pe[Qe];
          return Ge;
        }
        function ee(Fe) {
          a = Fe;
        }
        function N(Fe, Pe) {
          return Fe === "all" || Fe === null || Fe.indexOf(Pe) > -1;
        }
        function K(Fe, Pe) {
          return Fe === null ? Pe : Fe;
        }
        function X(Fe, Pe, De) {
          re();
          var Ge, Qe, ot, vt = [Pe], bt = [De];
          if (a >= 1)
            vt = [Pe], bt = [De];
          else if (a > 0) {
            var yt = function(It, Be) {
              var He = It[0], he = It[1], be = It[2], Re = function(rt, ut, Bt) {
                for (var wt = [], Lt = 0; Lt < rt.length; Lt++)
                  wt[Lt] = (rt[Lt] + ut[Lt] + Bt[Lt]) / 3;
                return wt;
              }(He, he, be), Ue = Math.sqrt(1 - a), Xe = U(Re, He, Ue), qe = U(Re, he, Ue), st = U(Re, be, Ue), it = Be[0], Tt = Be[1], Pt = Be[2];
              return { xyzv: [[He, he, qe], [qe, Xe, He], [he, be, st], [st, qe, he], [be, He, Xe], [Xe, st, be]], abc: [[it, Tt, -1], [-1, -1, it], [Tt, Pt, -1], [-1, -1, Tt], [Pt, it, -1], [-1, -1, Pt]] };
            }(Pe, De);
            vt = yt.xyzv, bt = yt.abc;
          }
          for (var tt = 0; tt < vt.length; tt++) {
            Pe = vt[tt], De = bt[tt];
            for (var Ke = [], mt = 0; mt < 3; mt++) {
              var Ft = Pe[mt][0], Vt = Pe[mt][1], Xt = Pe[mt][2], Gt = Pe[mt][3], nr = De[mt] > -1 ? De[mt] : Z(Ft, Vt, Xt);
              Ke[mt] = nr > -1 ? nr : B(Ft, Vt, Xt, K(Fe, Gt));
            }
            Ge = Ke[0], Qe = Ke[1], ot = Ke[2], u._meshI.push(Ge), u._meshJ.push(Qe), u._meshK.push(ot), ++L;
          }
        }
        function te(Fe, Pe, De, Ge) {
          var Qe = Fe[3];
          Qe < De && (Qe = De), Qe > Ge && (Qe = Ge);
          for (var ot = (Fe[3] - Qe) / (Fe[3] - Pe[3] + 1e-9), vt = [], bt = 0; bt < 4; bt++)
            vt[bt] = (1 - ot) * Fe[bt] + ot * Pe[bt];
          return vt;
        }
        function ie(Fe, Pe, De) {
          return Fe >= Pe && Fe <= De;
        }
        function le(Fe) {
          var Pe = 1e-3 * (W - J);
          return Fe >= J - Pe && Fe <= W + Pe;
        }
        function oe(Fe) {
          for (var Pe = [], De = 0; De < 4; De++) {
            var Ge = Fe[De];
            Pe.push([u._x[Ge], u._y[Ge], u._z[Ge], u._value[Ge]]);
          }
          return Pe;
        }
        function ve(Fe, Pe, De, Ge, Qe, ot) {
          ot || (ot = 1), De = [-1, -1, -1];
          var vt = !1, bt = [ie(Pe[0][3], Ge, Qe), ie(Pe[1][3], Ge, Qe), ie(Pe[2][3], Ge, Qe)];
          if (!bt[0] && !bt[1] && !bt[2])
            return !1;
          var yt = function(Ke, mt, Ft) {
            return le(mt[0][3]) && le(mt[1][3]) && le(mt[2][3]) ? (X(Ke, mt, Ft), !0) : ot < 3 && ve(Ke, mt, Ft, J, W, ++ot);
          };
          if (bt[0] && bt[1] && bt[2])
            return yt(Fe, Pe, De) || vt;
          var tt = !1;
          return [[0, 1, 2], [2, 0, 1], [1, 2, 0]].forEach(function(Ke) {
            if (bt[Ke[0]] && bt[Ke[1]] && !bt[Ke[2]]) {
              var mt = Pe[Ke[0]], Ft = Pe[Ke[1]], Vt = Pe[Ke[2]], Xt = te(Vt, mt, Ge, Qe), Gt = te(Vt, Ft, Ge, Qe);
              vt = yt(Fe, [Gt, Xt, mt], [-1, -1, De[Ke[0]]]) || vt, vt = yt(Fe, [mt, Ft, Gt], [De[Ke[0]], De[Ke[1]], -1]) || vt, tt = !0;
            }
          }), tt || [[0, 1, 2], [1, 2, 0], [2, 0, 1]].forEach(function(Ke) {
            if (bt[Ke[0]] && !bt[Ke[1]] && !bt[Ke[2]]) {
              var mt = Pe[Ke[0]], Ft = Pe[Ke[1]], Vt = Pe[Ke[2]], Xt = te(Ft, mt, Ge, Qe), Gt = te(Vt, mt, Ge, Qe);
              vt = yt(Fe, [Gt, Xt, mt], [-1, -1, De[Ke[0]]]) || vt, tt = !0;
            }
          }), vt;
        }
        function ue(Fe, Pe, De, Ge) {
          var Qe = !1, ot = oe(Pe), vt = [ie(ot[0][3], De, Ge), ie(ot[1][3], De, Ge), ie(ot[2][3], De, Ge), ie(ot[3][3], De, Ge)];
          if (!(vt[0] || vt[1] || vt[2] || vt[3]))
            return Qe;
          if (vt[0] && vt[1] && vt[2] && vt[3])
            return T && (Qe = function(yt, tt, Ke) {
              var mt = function(Ft, Vt, Xt) {
                X(yt, [tt[Ft], tt[Vt], tt[Xt]], [Ke[Ft], Ke[Vt], Ke[Xt]]);
              };
              mt(0, 1, 2), mt(3, 0, 1), mt(2, 3, 0), mt(1, 2, 3);
            }(Fe, ot, Pe) || Qe), Qe;
          var bt = !1;
          return [[0, 1, 2, 3], [3, 0, 1, 2], [2, 3, 0, 1], [1, 2, 3, 0]].forEach(function(yt) {
            if (vt[yt[0]] && vt[yt[1]] && vt[yt[2]] && !vt[yt[3]]) {
              var tt = ot[yt[0]], Ke = ot[yt[1]], mt = ot[yt[2]], Ft = ot[yt[3]];
              if (T)
                Qe = X(Fe, [tt, Ke, mt], [Pe[yt[0]], Pe[yt[1]], Pe[yt[2]]]) || Qe;
              else {
                var Vt = te(Ft, tt, De, Ge), Xt = te(Ft, Ke, De, Ge), Gt = te(Ft, mt, De, Ge);
                Qe = X(null, [Vt, Xt, Gt], [-1, -1, -1]) || Qe;
              }
              bt = !0;
            }
          }), bt || ([[0, 1, 2, 3], [1, 2, 3, 0], [2, 3, 0, 1], [3, 0, 1, 2], [0, 2, 3, 1], [1, 3, 2, 0]].forEach(function(yt) {
            if (vt[yt[0]] && vt[yt[1]] && !vt[yt[2]] && !vt[yt[3]]) {
              var tt = ot[yt[0]], Ke = ot[yt[1]], mt = ot[yt[2]], Ft = ot[yt[3]], Vt = te(mt, tt, De, Ge), Xt = te(mt, Ke, De, Ge), Gt = te(Ft, Ke, De, Ge), nr = te(Ft, tt, De, Ge);
              T ? (Qe = X(Fe, [tt, nr, Vt], [Pe[yt[0]], -1, -1]) || Qe, Qe = X(Fe, [Ke, Xt, Gt], [Pe[yt[1]], -1, -1]) || Qe) : Qe = function(It, Be, He) {
                var he = function(be, Re, Ue) {
                  X(It, [Be[be], Be[Re], Be[Ue]], [He[be], He[Re], He[Ue]]);
                };
                he(0, 1, 2), he(2, 3, 0);
              }(null, [Vt, Xt, Gt, nr], [-1, -1, -1, -1]) || Qe, bt = !0;
            }
          }), bt || [[0, 1, 2, 3], [1, 2, 3, 0], [2, 3, 0, 1], [3, 0, 1, 2]].forEach(function(yt) {
            if (vt[yt[0]] && !vt[yt[1]] && !vt[yt[2]] && !vt[yt[3]]) {
              var tt = ot[yt[0]], Ke = ot[yt[1]], mt = ot[yt[2]], Ft = ot[yt[3]], Vt = te(Ke, tt, De, Ge), Xt = te(mt, tt, De, Ge), Gt = te(Ft, tt, De, Ge);
              T ? (Qe = X(Fe, [tt, Vt, Xt], [Pe[yt[0]], -1, -1]) || Qe, Qe = X(Fe, [tt, Xt, Gt], [Pe[yt[0]], -1, -1]) || Qe, Qe = X(Fe, [tt, Gt, Vt], [Pe[yt[0]], -1, -1]) || Qe) : Qe = X(null, [Vt, Xt, Gt], [-1, -1, -1]) || Qe, bt = !0;
            }
          })), Qe;
        }
        function ye(Fe, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke) {
          var mt = !1;
          return w && (N(Fe, "A") && (mt = ue(null, [Pe, De, Ge, ot], tt, Ke) || mt), N(Fe, "B") && (mt = ue(null, [De, Ge, Qe, yt], tt, Ke) || mt), N(Fe, "C") && (mt = ue(null, [De, ot, vt, yt], tt, Ke) || mt), N(Fe, "D") && (mt = ue(null, [Ge, ot, bt, yt], tt, Ke) || mt), N(Fe, "E") && (mt = ue(null, [De, Ge, ot, yt], tt, Ke) || mt)), T && (mt = ue(Fe, [De, Ge, ot, yt], tt, Ke) || mt), mt;
        }
        function Ae(Fe, Pe, De, Ge, Qe, ot, vt, bt) {
          return [bt[0] === !0 || ve(Fe, oe([Pe, De, Ge]), [Pe, De, Ge], ot, vt), bt[1] === !0 || ve(Fe, oe([Ge, Qe, Pe]), [Ge, Qe, Pe], ot, vt)];
        }
        function pe(Fe, Pe, De, Ge, Qe, ot, vt, bt, yt) {
          return bt ? Ae(Fe, Pe, De, Qe, Ge, ot, vt, yt) : Ae(Fe, De, Qe, Ge, Pe, ot, vt, yt);
        }
        function ge(Fe, Pe, De, Ge, Qe, ot, vt) {
          var bt, yt, tt, Ke, mt = !1, Ft = function() {
            mt = ve(Fe, [bt, yt, tt], [-1, -1, -1], Qe, ot) || mt, mt = ve(Fe, [tt, Ke, bt], [-1, -1, -1], Qe, ot) || mt;
          }, Vt = vt[0], Xt = vt[1], Gt = vt[2];
          return Vt && (bt = U(oe([j(Pe, De - 0, Ge - 0)])[0], oe([j(Pe - 1, De - 0, Ge - 0)])[0], Vt), yt = U(oe([j(Pe, De - 0, Ge - 1)])[0], oe([j(Pe - 1, De - 0, Ge - 1)])[0], Vt), tt = U(oe([j(Pe, De - 1, Ge - 1)])[0], oe([j(Pe - 1, De - 1, Ge - 1)])[0], Vt), Ke = U(oe([j(Pe, De - 1, Ge - 0)])[0], oe([j(Pe - 1, De - 1, Ge - 0)])[0], Vt), Ft()), Xt && (bt = U(oe([j(Pe - 0, De, Ge - 0)])[0], oe([j(Pe - 0, De - 1, Ge - 0)])[0], Xt), yt = U(oe([j(Pe - 0, De, Ge - 1)])[0], oe([j(Pe - 0, De - 1, Ge - 1)])[0], Xt), tt = U(oe([j(Pe - 1, De, Ge - 1)])[0], oe([j(Pe - 1, De - 1, Ge - 1)])[0], Xt), Ke = U(oe([j(Pe - 1, De, Ge - 0)])[0], oe([j(Pe - 1, De - 1, Ge - 0)])[0], Xt), Ft()), Gt && (bt = U(oe([j(Pe - 0, De - 0, Ge)])[0], oe([j(Pe - 0, De - 0, Ge - 1)])[0], Gt), yt = U(oe([j(Pe - 0, De - 1, Ge)])[0], oe([j(Pe - 0, De - 1, Ge - 1)])[0], Gt), tt = U(oe([j(Pe - 1, De - 1, Ge)])[0], oe([j(Pe - 1, De - 1, Ge - 1)])[0], Gt), Ke = U(oe([j(Pe - 1, De - 0, Ge)])[0], oe([j(Pe - 1, De - 0, Ge - 1)])[0], Gt), Ft()), mt;
        }
        function we(Fe, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke, mt) {
          var Ft = Fe;
          return mt ? (w && Fe === "even" && (Ft = null), ye(Ft, Pe, De, Ge, Qe, ot, vt, bt, yt, tt, Ke)) : (w && Fe === "odd" && (Ft = null), ye(Ft, yt, bt, vt, ot, Qe, Ge, De, Pe, tt, Ke));
        }
        function se(Fe, Pe, De, Ge, Qe) {
          for (var ot = [], vt = 0, bt = 0; bt < Pe.length; bt++)
            for (var yt = Pe[bt], tt = 1; tt < R; tt++)
              for (var Ke = 1; Ke < E; Ke++)
                ot.push(pe(Fe, j(yt, Ke - 1, tt - 1), j(yt, Ke - 1, tt), j(yt, Ke, tt - 1), j(yt, Ke, tt), De, Ge, (yt + Ke + tt) % 2, Qe && Qe[vt] ? Qe[vt] : [])), vt++;
          return ot;
        }
        function de(Fe, Pe, De, Ge, Qe) {
          for (var ot = [], vt = 0, bt = 0; bt < Pe.length; bt++)
            for (var yt = Pe[bt], tt = 1; tt < S; tt++)
              for (var Ke = 1; Ke < R; Ke++)
                ot.push(pe(Fe, j(tt - 1, yt, Ke - 1), j(tt, yt, Ke - 1), j(tt - 1, yt, Ke), j(tt, yt, Ke), De, Ge, (tt + yt + Ke) % 2, Qe && Qe[vt] ? Qe[vt] : [])), vt++;
          return ot;
        }
        function Te(Fe, Pe, De, Ge, Qe) {
          for (var ot = [], vt = 0, bt = 0; bt < Pe.length; bt++)
            for (var yt = Pe[bt], tt = 1; tt < E; tt++)
              for (var Ke = 1; Ke < S; Ke++)
                ot.push(pe(Fe, j(Ke - 1, tt - 1, yt), j(Ke - 1, tt, yt), j(Ke, tt - 1, yt), j(Ke, tt, yt), De, Ge, (Ke + tt + yt) % 2, Qe && Qe[vt] ? Qe[vt] : [])), vt++;
          return ot;
        }
        function Ee(Fe, Pe, De) {
          for (var Ge = 1; Ge < R; Ge++)
            for (var Qe = 1; Qe < E; Qe++)
              for (var ot = 1; ot < S; ot++)
                we(Fe, j(ot - 1, Qe - 1, Ge - 1), j(ot - 1, Qe - 1, Ge), j(ot - 1, Qe, Ge - 1), j(ot - 1, Qe, Ge), j(ot, Qe - 1, Ge - 1), j(ot, Qe - 1, Ge), j(ot, Qe, Ge - 1), j(ot, Qe, Ge), Pe, De, (ot + Qe + Ge) % 2);
        }
        function Me(Fe, Pe, De) {
          w = !0, Ee(Fe, Pe, De), w = !1;
        }
        function ze(Fe, Pe, De, Ge, Qe, ot) {
          for (var vt = [], bt = 0, yt = 0; yt < Pe.length; yt++)
            for (var tt = Pe[yt], Ke = 1; Ke < R; Ke++)
              for (var mt = 1; mt < E; mt++)
                vt.push(ge(Fe, tt, mt, Ke, De, Ge, Qe[yt], ot && ot[bt] && ot[bt])), bt++;
          return vt;
        }
        function Ie(Fe, Pe, De, Ge, Qe, ot) {
          for (var vt = [], bt = 0, yt = 0; yt < Pe.length; yt++)
            for (var tt = Pe[yt], Ke = 1; Ke < S; Ke++)
              for (var mt = 1; mt < R; mt++)
                vt.push(ge(Fe, Ke, tt, mt, De, Ge, Qe[yt], ot && ot[bt] && ot[bt])), bt++;
          return vt;
        }
        function Oe(Fe, Pe, De, Ge, Qe, ot) {
          for (var vt = [], bt = 0, yt = 0; yt < Pe.length; yt++)
            for (var tt = Pe[yt], Ke = 1; Ke < E; Ke++)
              for (var mt = 1; mt < S; mt++)
                vt.push(ge(Fe, mt, Ke, tt, De, Ge, Qe[yt], ot && ot[bt] && ot[bt])), bt++;
          return vt;
        }
        function Ze(Fe, Pe) {
          for (var De = [], Ge = Fe; Ge < Pe; Ge++)
            De.push(Ge);
          return De;
        }
        return function() {
          if (V(), function() {
            for (var bt = 0; bt < S; bt++)
              for (var yt = 0; yt < E; yt++)
                for (var tt = 0; tt < R; tt++) {
                  var Ke = j(bt, yt, tt);
                  B(u._x[Ke], u._y[Ke], u._z[Ke], u._value[Ke]);
                }
          }(), f && b && (ee(b), T = !0, Ee(null, J, W), T = !1), y && _) {
            ee(_);
            for (var Fe = u.surface.pattern, Pe = u.surface.count, De = 0; De < Pe; De++) {
              var Ge = Pe === 1 ? 0.5 : De / (Pe - 1), Qe = (1 - Ge) * J + Ge * W, ot = Math.abs(Qe - H) > Math.abs(Qe - Y) ? [H, Qe] : [Qe, Y];
              Me(Fe, ot[0], ot[1]);
            }
          }
          var vt = [[Math.min(J, Y), Math.max(J, Y)], [Math.min(H, W), Math.max(H, W)]];
          ["x", "y", "z"].forEach(function(bt) {
            for (var yt = [], tt = 0; tt < vt.length; tt++) {
              var Ke = 0, mt = vt[tt][0], Ft = vt[tt][1], Vt = u.slices[bt];
              if (Vt.show && Vt.fill) {
                ee(Vt.fill);
                var Xt = [], Gt = [], nr = [];
                if (Vt.locations.length)
                  for (var It = 0; It < Vt.locations.length; It++) {
                    var Be = r(Vt.locations[It], bt === "x" ? A : bt === "y" ? I : P);
                    Be.distRatio === 0 ? Xt.push(Be.id) : Be.id > 0 && (Gt.push(Be.id), bt === "x" ? nr.push([Be.distRatio, 0, 0]) : bt === "y" ? nr.push([0, Be.distRatio, 0]) : nr.push([0, 0, Be.distRatio]));
                  }
                else
                  Xt = Ze(1, bt === "x" ? S - 1 : bt === "y" ? E - 1 : R - 1);
                Gt.length > 0 && (yt[Ke] = bt === "x" ? ze(null, Gt, mt, Ft, nr, yt[Ke]) : bt === "y" ? Ie(null, Gt, mt, Ft, nr, yt[Ke]) : Oe(null, Gt, mt, Ft, nr, yt[Ke]), Ke++), Xt.length > 0 && (yt[Ke] = bt === "x" ? se(null, Xt, mt, Ft, yt[Ke]) : bt === "y" ? de(null, Xt, mt, Ft, yt[Ke]) : Te(null, Xt, mt, Ft, yt[Ke]), Ke++);
              }
              var He = u.caps[bt];
              He.show && He.fill && (ee(He.fill), yt[Ke] = bt === "x" ? se(null, [0, S - 1], mt, Ft, yt[Ke]) : bt === "y" ? de(null, [0, E - 1], mt, Ft, yt[Ke]) : Te(null, [0, R - 1], mt, Ft, yt[Ke]), Ke++);
            }
          }), L === 0 && V(), u._meshX = l, u._meshY = i, u._meshZ = p, u._meshIntensity = c, u._Xs = A, u._Ys = I, u._Zs = P;
        }(), u;
      }
      Q.exports = { findNearestOnAxis: r, generateIsoMeshes: d, createIsosurfaceTrace: function(u, o) {
        var h = u.glplot.gl, l = m({ gl: h }), i = new n(u, l, o.uid);
        return l._trace = i, i.update(o), u.glplot.add(l), i;
      } };
    }, { "../../../stackgl_modules": 1133, "../../components/colorscale": 379, "../../lib/gl_format_color": 511, "../../lib/str2rgbarray": 540, "../../plots/gl3d/zip3": 618 }], 874: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry"), k = v("./attributes"), x = v("../../components/colorscale/defaults");
      function e(r, n, s, t, d) {
        var u = d("isomin"), o = d("isomax");
        o != null && u != null && u > o && (n.isomin = null, n.isomax = null);
        var h = d("x"), l = d("y"), i = d("z"), p = d("value");
        h && h.length && l && l.length && i && i.length && p && p.length ? (g.getComponentMethod("calendars", "handleTraceDefaults")(r, n, ["x", "y", "z"], t), d("valuehoverformat"), ["x", "y", "z"].forEach(function(c) {
          d(c + "hoverformat");
          var a = "caps." + c;
          d(a + ".show") && d(a + ".fill");
          var y = "slices." + c;
          d(y + ".show") && (d(y + ".fill"), d(y + ".locations"));
        }), d("spaceframe.show") && d("spaceframe.fill"), d("surface.show") && (d("surface.count"), d("surface.fill"), d("surface.pattern")), d("contour.show") && (d("contour.color"), d("contour.width")), ["text", "hovertext", "hovertemplate", "lighting.ambient", "lighting.diffuse", "lighting.specular", "lighting.roughness", "lighting.fresnel", "lighting.vertexnormalsepsilon", "lighting.facenormalsepsilon", "lightposition.x", "lightposition.y", "lightposition.z", "flatshading", "opacity"].forEach(function(c) {
          d(c);
        }), x(r, n, t, d, { prefix: "", cLetter: "c" }), n._length = null) : n.visible = !1;
      }
      Q.exports = { supplyDefaults: function(r, n, s, t) {
        e(r, n, s, t, function(d, u) {
          return m.coerce(r, n, k, d, u);
        });
      }, supplyIsoDefaults: e };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "../../registry": 647, "./attributes": 871 }], 875: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults").supplyDefaults, calc: v("./calc"), colorbar: { min: "cmin", max: "cmax" }, plot: v("./convert").createIsosurfaceTrace, moduleType: "trace", name: "isosurface", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "showLegend"], meta: {} };
    }, { "../../plots/gl3d": 607, "./attributes": 871, "./calc": 872, "./convert": 873, "./defaults": 874 }], 876: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../surface/attributes"), e = v("../../plots/attributes"), r = v("../../lib/extend").extendFlat;
      Q.exports = r({ x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, z: { valType: "data_array", editType: "calc+clearAxisTypes" }, i: { valType: "data_array", editType: "calc" }, j: { valType: "data_array", editType: "calc" }, k: { valType: "data_array", editType: "calc" }, text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertemplate: k({ editType: "calc" }), xhoverformat: g("x"), yhoverformat: g("y"), zhoverformat: g("z"), delaunayaxis: { valType: "enumerated", values: ["x", "y", "z"], dflt: "z", editType: "calc" }, alphahull: { valType: "number", dflt: -1, editType: "calc" }, intensity: { valType: "data_array", editType: "calc" }, intensitymode: { valType: "enumerated", values: ["vertex", "cell"], dflt: "vertex", editType: "calc" }, color: { valType: "color", editType: "calc" }, vertexcolor: { valType: "data_array", editType: "calc" }, facecolor: { valType: "data_array", editType: "calc" }, transforms: void 0 }, m("", { colorAttr: "`intensity`", showScaleDflt: !0, editTypeOverride: "calc" }), { opacity: x.opacity, flatshading: { valType: "boolean", dflt: !1, editType: "calc" }, contour: { show: r({}, x.contours.x.show, {}), color: x.contours.x.color, width: x.contours.x.width, editType: "calc" }, lightposition: { x: r({}, x.lightposition.x, { dflt: 1e5 }), y: r({}, x.lightposition.y, { dflt: 1e5 }), z: r({}, x.lightposition.z, { dflt: 0 }), editType: "calc" }, lighting: r({ vertexnormalsepsilon: { valType: "number", min: 0, max: 1, dflt: 1e-12, editType: "calc" }, facenormalsepsilon: { valType: "number", min: 0, max: 1, dflt: 1e-6, editType: "calc" }, editType: "calc" }, x.lighting), hoverinfo: r({}, e.hoverinfo, { editType: "calc" }), showlegend: r({}, e.showlegend, { dflt: !1 }) });
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../surface/attributes": 1070 }], 877: [function(v, Q, $) {
      var m = v("../../components/colorscale/calc");
      Q.exports = function(g, k) {
        k.intensity && m(g, k, { vals: k.intensity, containerStr: "", cLetter: "c" });
      };
    }, { "../../components/colorscale/calc": 375 }], 878: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_mesh3d, g = v("../../../stackgl_modules").delaunay_triangulate, k = v("../../../stackgl_modules").alpha_shape, x = v("../../../stackgl_modules").convex_hull, e = v("../../lib/gl_format_color").parseColorScale, r = v("../../lib/str2rgbarray"), n = v("../../components/colorscale").extractOpts, s = v("../../plots/gl3d/zip3");
      function t(i, p, c) {
        this.scene = i, this.uid = c, this.mesh = p, this.name = "", this.color = "#fff", this.data = null, this.showContour = !1;
      }
      var d = t.prototype;
      function u(i) {
        for (var p = [], c = i.length, a = 0; a < c; a++)
          p[a] = r(i[a]);
        return p;
      }
      function o(i, p, c, a) {
        for (var y = [], f = p.length, _ = 0; _ < f; _++)
          y[_] = i.d2l(p[_], 0, a) * c;
        return y;
      }
      function h(i) {
        for (var p = [], c = i.length, a = 0; a < c; a++)
          p[a] = Math.round(i[a]);
        return p;
      }
      function l(i, p) {
        for (var c = i.length, a = 0; a < c; a++)
          if (i[a] <= -0.5 || i[a] >= p - 0.5)
            return !1;
        return !0;
      }
      d.handlePick = function(i) {
        if (i.object === this.mesh) {
          var p = i.index = i.data.index;
          i.data._cellCenter ? i.traceCoordinate = i.data.dataCoordinate : i.traceCoordinate = [this.data.x[p], this.data.y[p], this.data.z[p]];
          var c = this.data.hovertext || this.data.text;
          return Array.isArray(c) && c[p] !== void 0 ? i.textLabel = c[p] : c && (i.textLabel = c), !0;
        }
      }, d.update = function(i) {
        var p = this.scene, c = p.fullSceneLayout;
        this.data = i;
        var a, y = i.x.length, f = s(o(c.xaxis, i.x, p.dataScale[0], i.xcalendar), o(c.yaxis, i.y, p.dataScale[1], i.ycalendar), o(c.zaxis, i.z, p.dataScale[2], i.zcalendar));
        if (i.i && i.j && i.k) {
          if (i.i.length !== i.j.length || i.j.length !== i.k.length || !l(i.i, y) || !l(i.j, y) || !l(i.k, y))
            return;
          a = s(h(i.i), h(i.j), h(i.k));
        } else
          a = i.alphahull === 0 ? x(f) : i.alphahull > 0 ? k(i.alphahull, f) : function(T, L) {
            for (var A = ["x", "y", "z"].indexOf(T), I = [], P = L.length, S = 0; S < P; S++)
              I[S] = [L[S][(A + 1) % 3], L[S][(A + 2) % 3]];
            return g(I);
          }(i.delaunayaxis, f);
        var _ = { positions: f, cells: a, lightPosition: [i.lightposition.x, i.lightposition.y, i.lightposition.z], ambient: i.lighting.ambient, diffuse: i.lighting.diffuse, specular: i.lighting.specular, roughness: i.lighting.roughness, fresnel: i.lighting.fresnel, vertexNormalsEpsilon: i.lighting.vertexnormalsepsilon, faceNormalsEpsilon: i.lighting.facenormalsepsilon, opacity: i.opacity, contourEnable: i.contour.show, contourColor: r(i.contour.color).slice(0, 3), contourWidth: i.contour.width, useFacetNormals: i.flatshading };
        if (i.intensity) {
          var b = n(i);
          this.color = "#fff";
          var w = i.intensitymode;
          _[w + "Intensity"] = i.intensity, _[w + "IntensityBounds"] = [b.min, b.max], _.colormap = e(i);
        } else
          i.vertexcolor ? (this.color = i.vertexcolor[0], _.vertexColors = u(i.vertexcolor)) : i.facecolor ? (this.color = i.facecolor[0], _.cellColors = u(i.facecolor)) : (this.color = i.color, _.meshColor = r(i.color));
        this.mesh.update(_);
      }, d.dispose = function() {
        this.scene.glplot.remove(this.mesh), this.mesh.dispose();
      }, Q.exports = function(i, p) {
        var c = i.glplot.gl, a = m({ gl: c }), y = new t(i, a, p.uid);
        return a._trace = y, y.update(p), i.glplot.add(a), y;
      };
    }, { "../../../stackgl_modules": 1133, "../../components/colorscale": 379, "../../lib/gl_format_color": 511, "../../lib/str2rgbarray": 540, "../../plots/gl3d/zip3": 618 }], 879: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../../components/colorscale/defaults"), x = v("./attributes");
      Q.exports = function(e, r, n, s) {
        function t(u, o) {
          return g.coerce(e, r, x, u, o);
        }
        function d(u) {
          var o = u.map(function(h) {
            var l = t(h);
            return l && g.isArrayOrTypedArray(l) ? l : null;
          });
          return o.every(function(h) {
            return h && h.length === o[0].length;
          }) && o;
        }
        d(["x", "y", "z"]) ? (d(["i", "j", "k"]), (!r.i || r.j && r.k) && (!r.j || r.k && r.i) && (!r.k || r.i && r.j) ? (m.getComponentMethod("calendars", "handleTraceDefaults")(e, r, ["x", "y", "z"], s), ["lighting.ambient", "lighting.diffuse", "lighting.specular", "lighting.roughness", "lighting.fresnel", "lighting.vertexnormalsepsilon", "lighting.facenormalsepsilon", "lightposition.x", "lightposition.y", "lightposition.z", "flatshading", "alphahull", "delaunayaxis", "opacity"].forEach(function(u) {
          t(u);
        }), t("contour.show") && (t("contour.color"), t("contour.width")), "intensity" in e ? (t("intensity"), t("intensitymode"), k(e, r, s, t, { prefix: "", cLetter: "c" })) : (r.showscale = !1, "facecolor" in e ? t("facecolor") : "vertexcolor" in e ? t("vertexcolor") : t("color", n)), t("text"), t("hovertext"), t("hovertemplate"), t("xhoverformat"), t("yhoverformat"), t("zhoverformat"), r._length = null) : r.visible = !1) : r.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "../../registry": 647, "./attributes": 876 }], 880: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), colorbar: { min: "cmin", max: "cmax" }, plot: v("./convert"), moduleType: "trace", name: "mesh3d", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "showLegend"], meta: {} };
    }, { "../../plots/gl3d": 607, "./attributes": 876, "./calc": 877, "./convert": 878, "./defaults": 879 }], 881: [function(v, Q, $) {
      var m = v("../../lib").extendFlat, g = v("../scatter/attributes"), k = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, x = v("../../components/drawing/attributes").dash, e = v("../../components/fx/attributes"), r = v("../../constants/delta.js"), n = r.INCREASING.COLOR, s = r.DECREASING.COLOR, t = g.line;
      function d(u) {
        return { line: { color: m({}, t.color, { dflt: u }), width: t.width, dash: x, editType: "style" }, editType: "style" };
      }
      Q.exports = { xperiod: g.xperiod, xperiod0: g.xperiod0, xperiodalignment: g.xperiodalignment, xhoverformat: k("x"), yhoverformat: k("y"), x: { valType: "data_array", editType: "calc+clearAxisTypes" }, open: { valType: "data_array", editType: "calc" }, high: { valType: "data_array", editType: "calc" }, low: { valType: "data_array", editType: "calc" }, close: { valType: "data_array", editType: "calc" }, line: { width: m({}, t.width, {}), dash: m({}, x, {}), editType: "style" }, increasing: d(n), decreasing: d(s), text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, tickwidth: { valType: "number", min: 0, max: 0.5, dflt: 0.3, editType: "calc" }, hoverlabel: m({}, e.hoverlabel, { split: { valType: "boolean", dflt: !1, editType: "style" } }) };
    }, { "../../components/drawing/attributes": 388, "../../components/fx/attributes": 398, "../../constants/delta.js": 485, "../../lib": 515, "../../plots/cartesian/axis_format_attributes": 569, "../scatter/attributes": 936 }], 882: [function(v, Q, $) {
      var m = v("../../lib"), g = m._, k = v("../../plots/cartesian/axes"), x = v("../../plots/cartesian/align_period"), e = v("../../constants/numerical").BADNUM;
      function r(s, t, d, u) {
        return { o: s, h: t, l: d, c: u };
      }
      function n(s, t, d, u, o, h) {
        for (var l = o.makeCalcdata(t, "open"), i = o.makeCalcdata(t, "high"), p = o.makeCalcdata(t, "low"), c = o.makeCalcdata(t, "close"), a = Array.isArray(t.text), y = Array.isArray(t.hovertext), f = !0, _ = null, b = !!t.xperiodalignment, w = [], T = 0; T < u.length; T++) {
          var L = u[T], A = l[T], I = i[T], P = p[T], S = c[T];
          if (L !== e && A !== e && I !== e && P !== e && S !== e) {
            S === A ? _ !== null && S !== _ && (f = S > _) : f = S > A, _ = S;
            var E = h(A, I, P, S);
            E.pos = L, E.yc = (A + S) / 2, E.i = T, E.dir = f ? "increasing" : "decreasing", E.x = E.pos, E.y = [P, I], b && (E.orig_p = d[T]), a && (E.tx = t.text[T]), y && (E.htx = t.hovertext[T]), w.push(E);
          } else
            w.push({ pos: L, empty: !0 });
        }
        return t._extremes[o._id] = k.findExtremes(o, m.concat(p, i), { padded: !0 }), w.length && (w[0].t = { labels: { open: g(s, "open:") + " ", high: g(s, "high:") + " ", low: g(s, "low:") + " ", close: g(s, "close:") + " " } }), w;
      }
      Q.exports = { calc: function(s, t) {
        var d = k.getFromId(s, t.xaxis), u = k.getFromId(s, t.yaxis), o = function(c, a, y) {
          var f = y._minDiff;
          if (!f) {
            var _, b = c._fullData, w = [];
            for (f = 1 / 0, _ = 0; _ < b.length; _++) {
              var T = b[_];
              if (T.type === "ohlc" && T.visible === !0 && T.xaxis === a._id) {
                w.push(T);
                var L = a.makeCalcdata(T, "x");
                T._origX = L;
                var A = x(y, a, "x", L).vals;
                T._xcalc = A;
                var I = m.distinctVals(A).minDiff;
                I && isFinite(I) && (f = Math.min(f, I));
              }
            }
            for (f === 1 / 0 && (f = 1), _ = 0; _ < w.length; _++)
              w[_]._minDiff = f;
          }
          return f * y.tickwidth;
        }(s, d, t), h = t._minDiff;
        t._minDiff = null;
        var l = t._origX;
        t._origX = null;
        var i = t._xcalc;
        t._xcalc = null;
        var p = n(s, t, l, i, u, r);
        return t._extremes[d._id] = k.findExtremes(d, i, { vpad: h / 2 }), p.length ? (m.extendFlat(p[0].t, { wHover: h / 2, tickLen: o }), p) : [{ t: { empty: !0 } }];
      }, calcCommon: n };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566 }], 883: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./ohlc_defaults"), k = v("../scatter/period_defaults"), x = v("./attributes");
      function e(r, n, s, t) {
        s(t + ".line.color"), s(t + ".line.width", n.line.width), s(t + ".line.dash", n.line.dash);
      }
      Q.exports = function(r, n, s, t) {
        function d(u, o) {
          return m.coerce(r, n, x, u, o);
        }
        g(r, n, d, t) ? (k(r, n, t, d, { x: !0 }), d("xhoverformat"), d("yhoverformat"), d("line.width"), d("line.dash"), e(r, n, d, "increasing"), e(r, n, d, "decreasing"), d("text"), d("hovertext"), d("tickwidth"), t._requestRangeslider[n.xaxis] = !0) : n.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/period_defaults": 956, "./attributes": 881, "./ohlc_defaults": 886 }], 884: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../lib"), k = v("../../components/fx"), x = v("../../components/color"), e = v("../../lib").fillText, r = v("../../constants/delta.js"), n = { increasing: r.INCREASING.SYMBOL, decreasing: r.DECREASING.SYMBOL };
      function s(u, o, h, l) {
        var i, p, c = u.cd, a = u.xa, y = c[0].trace, f = c[0].t, _ = y.type, b = _ === "ohlc" ? "l" : "min", w = _ === "ohlc" ? "h" : "max", T = f.bPos || 0, L = f.bdPos || f.tickLen, A = f.wHover, I = Math.min(1, L / Math.abs(a.r2c(a.range[1]) - a.r2c(a.range[0])));
        function P(Y) {
          var J = function(W) {
            return W.pos + T - o;
          }(Y);
          return k.inbox(J - A, J + A, i);
        }
        function S(Y) {
          var J = Y[b], W = Y[w];
          return J === W || k.inbox(J - h, W - h, i);
        }
        function E(Y) {
          return (P(Y) + S(Y)) / 2;
        }
        i = u.maxHoverDistance - I, p = u.maxSpikeDistance - I;
        var R = k.getDistanceFunction(l, P, S, E);
        if (k.getClosest(c, R, u), u.index === !1)
          return null;
        var z = c[u.index];
        if (z.empty)
          return null;
        var j = y[z.dir], H = j.line.color;
        return x.opacity(H) && j.line.width ? u.color = H : u.color = j.fillcolor, u.x0 = a.c2p(z.pos + T - L, !0), u.x1 = a.c2p(z.pos + T + L, !0), u.xLabelVal = z.orig_p !== void 0 ? z.orig_p : z.pos, u.spikeDistance = E(z) * p / i, u.xSpike = a.c2p(z.pos, !0), u;
      }
      function t(u, o, h, l) {
        var i = u.cd, p = u.ya, c = i[0].trace, a = i[0].t, y = [], f = s(u, o, h, l);
        if (!f)
          return [];
        var _ = i[f.index].hi || c.hoverinfo, b = _.split("+");
        if (!(_ === "all" || b.indexOf("y") !== -1))
          return [];
        for (var w = ["high", "open", "close", "low"], T = {}, L = 0; L < w.length; L++) {
          var A, I = w[L], P = c[I][f.index], S = p.c2p(P, !0);
          P in T ? (A = T[P]).yLabel += "<br>" + a.labels[I] + m.hoverLabelText(p, P, c.yhoverformat) : ((A = g.extendFlat({}, f)).y0 = A.y1 = S, A.yLabelVal = P, A.yLabel = a.labels[I] + m.hoverLabelText(p, P, c.yhoverformat), A.name = "", y.push(A), T[P] = A);
        }
        return y;
      }
      function d(u, o, h, l) {
        var i = u.cd, p = u.ya, c = i[0].trace, a = i[0].t, y = s(u, o, h, l);
        if (!y)
          return [];
        var f = i[y.index], _ = y.index = f.i, b = f.dir;
        function w(E) {
          return a.labels[E] + m.hoverLabelText(p, c[E][_], c.yhoverformat);
        }
        var T = f.hi || c.hoverinfo, L = T.split("+"), A = T === "all", I = A || L.indexOf("y") !== -1, P = A || L.indexOf("text") !== -1, S = I ? [w("open"), w("high"), w("low"), w("close") + "  " + n[b]] : [];
        return P && e(f, c, S), y.extraText = S.join("<br>"), y.y0 = y.y1 = p.c2p(f.yc, !0), [y];
      }
      Q.exports = { hoverPoints: function(u, o, h, l) {
        return u.cd[0].trace.hoverlabel.split ? t(u, o, h, l) : d(u, o, h, l);
      }, hoverSplit: t, hoverOnPoints: d };
    }, { "../../components/color": 367, "../../components/fx": 407, "../../constants/delta.js": 485, "../../lib": 515, "../../plots/cartesian/axes": 566 }], 885: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "ohlc", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "showLegend"], meta: {}, attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc").calc, plot: v("./plot"), style: v("./style"), hoverPoints: v("./hover").hoverPoints, selectPoints: v("./select") };
    }, { "../../plots/cartesian": 578, "./attributes": 881, "./calc": 882, "./defaults": 883, "./hover": 884, "./plot": 887, "./select": 888, "./style": 889 }], 886: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib");
      Q.exports = function(k, x, e, r) {
        var n = e("x"), s = e("open"), t = e("high"), d = e("low"), u = e("close");
        if (e("hoverlabel.split"), m.getComponentMethod("calendars", "handleTraceDefaults")(k, x, ["x"], r), s && t && d && u) {
          var o = Math.min(s.length, t.length, d.length, u.length);
          return n && (o = Math.min(o, g.minRowLength(n))), x._length = o, o;
        }
      };
    }, { "../../lib": 515, "../../registry": 647 }], 887: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib");
      Q.exports = function(k, x, e, r) {
        var n = x.yaxis, s = x.xaxis, t = !!s.rangebreaks;
        g.makeTraceGroups(r, e, "trace ohlc").each(function(d) {
          var u = m.select(this), o = d[0], h = o.t;
          if (o.trace.visible !== !0 || h.empty)
            u.remove();
          else {
            var l = h.tickLen, i = u.selectAll("path").data(g.identity);
            i.enter().append("path"), i.exit().remove(), i.attr("d", function(p) {
              if (p.empty)
                return "M0,0Z";
              var c = s.c2p(p.pos - l, !0), a = s.c2p(p.pos + l, !0), y = t ? (c + a) / 2 : s.c2p(p.pos, !0);
              return "M" + c + "," + n.c2p(p.o, !0) + "H" + y + "M" + y + "," + n.c2p(p.h, !0) + "V" + n.c2p(p.l, !0) + "M" + a + "," + n.c2p(p.c, !0) + "H" + y;
            });
          }
        });
      };
    }, { "../../lib": 515, "@plotly/d3": 58 }], 888: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k, x = m.cd, e = m.xaxis, r = m.yaxis, n = [], s = x[0].t.bPos || 0;
        if (g === !1)
          for (k = 0; k < x.length; k++)
            x[k].selected = 0;
        else
          for (k = 0; k < x.length; k++) {
            var t = x[k];
            g.contains([e.c2p(t.pos + s), r.c2p(t.yc)], null, t.i, m) ? (n.push({ pointNumber: t.i, x: e.c2d(t.pos), y: r.c2d(t.yc) }), t.selected = 1) : t.selected = 0;
          }
        return n;
      };
    }, {}], 889: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../../components/color");
      Q.exports = function(x, e, r) {
        var n = r || m.select(x).selectAll("g.ohlclayer").selectAll("g.trace");
        n.style("opacity", function(s) {
          return s[0].trace.opacity;
        }), n.each(function(s) {
          var t = s[0].trace;
          m.select(this).selectAll("path").each(function(d) {
            if (!d.empty) {
              var u = t[d.dir].line;
              m.select(this).style("fill", "none").call(k.stroke, u.color).call(g.dashLine, u.dash, u.width).style("opacity", t.selectedpoints && !d.selected ? 0.3 : 1);
            }
          });
        });
      };
    }, { "../../components/color": 367, "../../components/drawing": 389, "@plotly/d3": 58 }], 890: [function(v, Q, $) {
      var m = v("../../lib/extend").extendFlat, g = v("../../plots/attributes"), k = v("../../plots/font_attributes"), x = v("../../components/colorscale/attributes"), e = v("../../plots/template_attributes").hovertemplateAttrs, r = v("../../plots/domain").attributes, n = m({ editType: "calc" }, x("line", { editTypeOverride: "calc" }), { shape: { valType: "enumerated", values: ["linear", "hspline"], dflt: "linear", editType: "plot" }, hovertemplate: e({ editType: "plot", arrayOk: !1 }, { keys: ["count", "probability"] }) });
      Q.exports = { domain: r({ name: "parcats", trace: !0, editType: "calc" }), hoverinfo: m({}, g.hoverinfo, { flags: ["count", "probability"], editType: "plot", arrayOk: !1 }), hoveron: { valType: "enumerated", values: ["category", "color", "dimension"], dflt: "category", editType: "plot" }, hovertemplate: e({ editType: "plot", arrayOk: !1 }, { keys: ["count", "probability", "category", "categorycount", "colorcount", "bandcolorcount"] }), arrangement: { valType: "enumerated", values: ["perpendicular", "freeform", "fixed"], dflt: "perpendicular", editType: "plot" }, bundlecolors: { valType: "boolean", dflt: !0, editType: "plot" }, sortpaths: { valType: "enumerated", values: ["forward", "backward"], dflt: "forward", editType: "plot" }, labelfont: k({ editType: "calc" }), tickfont: k({ editType: "calc" }), dimensions: { _isLinkedToArray: "dimension", label: { valType: "string", editType: "calc" }, categoryorder: { valType: "enumerated", values: ["trace", "category ascending", "category descending", "array"], dflt: "trace", editType: "calc" }, categoryarray: { valType: "data_array", editType: "calc" }, ticktext: { valType: "data_array", editType: "calc" }, values: { valType: "data_array", dflt: [], editType: "calc" }, displayindex: { valType: "integer", editType: "calc" }, editType: "calc", visible: { valType: "boolean", dflt: !0, editType: "calc" } }, line: n, counts: { valType: "number", min: 0, dflt: 1, arrayOk: !0, editType: "calc" }, customdata: void 0, hoverlabel: void 0, ids: void 0, legendgroup: void 0, legendrank: void 0, opacity: void 0, selectedpoints: void 0, showlegend: void 0 };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/domain": 593, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642 }], 891: [function(v, Q, $) {
      var m = v("../../plots/get_data").getModuleCalcData, g = v("./plot");
      $.name = "parcats", $.plot = function(k, x, e, r) {
        var n = m(k.calcdata, "parcats");
        if (n.length) {
          var s = n[0];
          g(k, s, e, r);
        }
      }, $.clean = function(k, x, e, r) {
        var n = r._has && r._has("parcats"), s = x._has && x._has("parcats");
        n && !s && r._paperdiv.selectAll(".parcats").remove();
      };
    }, { "../../plots/get_data": 602, "./plot": 896 }], 892: [function(v, Q, $) {
      var m = v("../../lib/gup").wrap, g = v("../../components/colorscale/helpers").hasColorscale, k = v("../../components/colorscale/calc"), x = v("../../lib/filter_unique.js"), e = v("../../components/drawing"), r = v("../../lib"), n = v("fast-isnumeric");
      function s(u, o, h) {
        u.valueInds.push(o), u.count += h;
      }
      function t(u, o, h) {
        return { categoryInds: u, color: o, rawColor: h, valueInds: [], count: 0 };
      }
      function d(u, o, h) {
        u.valueInds.push(o), u.count += h;
      }
      Q.exports = function(u, o) {
        var h = r.filterVisible(o.dimensions);
        if (h.length === 0)
          return [];
        var l, i, p, c = h.map(function(Z) {
          var re;
          if (Z.categoryorder === "trace")
            re = null;
          else if (Z.categoryorder === "array")
            re = Z.categoryarray;
          else {
            re = x(Z.values);
            for (var V = !0, B = 0; B < re.length; B++)
              if (!n(re[B])) {
                V = !1;
                break;
              }
            re.sort(V ? r.sorterAsc : void 0), Z.categoryorder === "category descending" && (re = re.reverse());
          }
          return function(U, ee) {
            ee = ee == null ? [] : ee.map(function(ve) {
              return ve;
            });
            var N = {}, K = {}, X = [];
            ee.forEach(function(ve, ue) {
              N[ve] = 0, K[ve] = ue;
            });
            for (var te = 0; te < U.length; te++) {
              var ie, le = U[te];
              N[le] === void 0 ? (N[le] = 1, ie = ee.push(le) - 1, K[le] = ie) : (N[le]++, ie = K[le]), X.push(ie);
            }
            var oe = ee.map(function(ve) {
              return N[ve];
            });
            return { uniqueValues: ee, uniqueCounts: oe, inds: X };
          }(Z.values, re);
        });
        l = r.isArrayOrTypedArray(o.counts) ? o.counts : [o.counts], function(Z) {
          var re;
          if (function(V) {
            for (var B = new Array(V.length), U = 0; U < V.length; U++) {
              if (V[U] < 0 || V[U] >= V.length || B[V[U]] !== void 0)
                return !1;
              B[V[U]] = !0;
            }
            return !0;
          }(Z.map(function(V) {
            return V.displayindex;
          })))
            for (re = 0; re < Z.length; re++)
              Z[re]._displayindex = Z[re].displayindex;
          else
            for (re = 0; re < Z.length; re++)
              Z[re]._displayindex = re;
        }(h), h.forEach(function(Z, re) {
          (function(V, B) {
            V._categoryarray = B.uniqueValues, V.ticktext === null || V.ticktext === void 0 ? V._ticktext = [] : V._ticktext = V.ticktext.slice();
            for (var U = V._ticktext.length; U < B.uniqueValues.length; U++)
              V._ticktext.push(B.uniqueValues[U]);
          })(Z, c[re]);
        });
        var a, y = o.line;
        y ? (g(o, "line") && k(u, o, { vals: o.line.color, containerStr: "line", cLetter: "c" }), a = e.tryColorscale(y)) : a = r.identity;
        var f, _, b, w, T, L = h[0].values.length, A = {}, I = c.map(function(Z) {
          return Z.inds;
        });
        for (p = 0, f = 0; f < L; f++) {
          var P = [];
          for (_ = 0; _ < I.length; _++)
            P.push(I[_][f]);
          i = l[f % l.length], p += i;
          var S = (b = f, w = void 0, T = void 0, r.isArrayOrTypedArray(y.color) ? T = w = y.color[b % y.color.length] : w = y.color, { color: a(w), rawColor: T }), E = P + "-" + S.rawColor;
          A[E] === void 0 && (A[E] = t(P, S.color, S.rawColor)), d(A[E], f, i);
        }
        var R, z = h.map(function(Z, re) {
          return function(V, B, U, ee, N) {
            return { dimensionInd: V, containerInd: B, displayInd: U, dimensionLabel: ee, count: N, categories: [], dragX: null };
          }(re, Z._index, Z._displayindex, Z.label, p);
        });
        for (f = 0; f < L; f++)
          for (i = l[f % l.length], _ = 0; _ < z.length; _++) {
            var j = z[_].containerInd, H = c[_].inds[f], Y = z[_].categories;
            if (Y[H] === void 0) {
              var J = o.dimensions[j]._categoryarray[H], W = o.dimensions[j]._ticktext[H];
              Y[H] = { dimensionInd: _, categoryInd: R = H, categoryValue: J, displayInd: R, categoryLabel: W, valueInds: [], count: 0, dragY: null };
            }
            s(Y[H], f, i);
          }
        return m(function(Z, re, V) {
          var B = Z.map(function(U) {
            return U.categories.length;
          }).reduce(function(U, ee) {
            return Math.max(U, ee);
          });
          return { dimensions: Z, paths: re, trace: void 0, maxCats: B, count: V };
        }(z, A, p));
      };
    }, { "../../components/colorscale/calc": 375, "../../components/colorscale/helpers": 378, "../../components/drawing": 389, "../../lib": 515, "../../lib/filter_unique.js": 506, "../../lib/gup": 512, "fast-isnumeric": 190 }], 893: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/helpers").hasColorscale, k = v("../../components/colorscale/defaults"), x = v("../../plots/domain").defaults, e = v("../../plots/array_container_defaults"), r = v("./attributes"), n = v("../parcoords/merge_length");
      function s(t, d) {
        function u(a, y) {
          return m.coerce(t, d, r.dimensions, a, y);
        }
        var o = u("values"), h = u("visible");
        if (o && o.length || (h = d.visible = !1), h) {
          u("label"), u("displayindex", d._index);
          var l, i = t.categoryarray, p = Array.isArray(i) && i.length > 0;
          p && (l = "array");
          var c = u("categoryorder", l);
          c === "array" ? (u("categoryarray"), u("ticktext")) : (delete t.categoryarray, delete t.ticktext), p || c !== "array" || (d.categoryorder = "trace");
        }
      }
      Q.exports = function(t, d, u, o) {
        function h(a, y) {
          return m.coerce(t, d, r, a, y);
        }
        var l = e(t, d, { name: "dimensions", handleItemDefaults: s }), i = function(a, y, f, _, b) {
          b("line.shape"), b("line.hovertemplate");
          var w = b("line.color", _.colorway[0]);
          if (g(a, "line") && m.isArrayOrTypedArray(w)) {
            if (w.length)
              return b("line.colorscale"), k(a, y, _, b, { prefix: "line.", cLetter: "c" }), w.length;
            y.line.color = f;
          }
          return 1 / 0;
        }(t, d, u, o, h);
        x(d, o, h), Array.isArray(l) && l.length || (d.visible = !1), n(d, l, "values", i), h("hoveron"), h("hovertemplate"), h("arrangement"), h("bundlecolors"), h("sortpaths"), h("counts");
        var p = { family: o.font.family, size: Math.round(o.font.size), color: o.font.color };
        m.coerceFont(h, "labelfont", p);
        var c = { family: o.font.family, size: Math.round(o.font.size / 1.2), color: o.font.color };
        m.coerceFont(h, "tickfont", c);
      };
    }, { "../../components/colorscale/defaults": 377, "../../components/colorscale/helpers": 378, "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/domain": 593, "../parcoords/merge_length": 907, "./attributes": 890 }], 894: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("./plot"), colorbar: { container: "line", min: "cmin", max: "cmax" }, moduleType: "trace", name: "parcats", basePlotModule: v("./base_plot"), categories: ["noOpacity"], meta: {} };
    }, { "./attributes": 890, "./base_plot": 891, "./calc": 892, "./defaults": 893, "./plot": 896 }], 895: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-interpolate").interpolateNumber, k = v("../../plot_api/plot_api"), x = v("../../components/fx"), e = v("../../lib"), r = e.strTranslate, n = v("../../components/drawing"), s = v("tinycolor2"), t = v("../../lib/svg_text_utils");
      function d(V, B, U, ee) {
        var N = B._context.staticPlot, K = V.map(Y.bind(0, B, U)), X = ee.selectAll("g.parcatslayer").data([null]);
        X.enter().append("g").attr("class", "parcatslayer").style("pointer-events", N ? "none" : "all");
        var te = X.selectAll("g.trace.parcats").data(K, u), ie = te.enter().append("g").attr("class", "trace parcats");
        te.attr("transform", function(we) {
          return r(we.x, we.y);
        }), ie.append("g").attr("class", "paths");
        var le = te.select("g.paths").selectAll("path.path").data(function(we) {
          return we.paths;
        }, u);
        le.attr("fill", function(we) {
          return we.model.color;
        });
        var oe = le.enter().append("path").attr("class", "path").attr("stroke-opacity", 0).attr("fill", function(we) {
          return we.model.color;
        }).attr("fill-opacity", 0);
        y(oe), le.attr("d", function(we) {
          return we.svgD;
        }), oe.empty() || le.sort(h), le.exit().remove(), le.on("mouseover", l).on("mouseout", i).on("click", a), ie.append("g").attr("class", "dimensions");
        var ve = te.select("g.dimensions").selectAll("g.dimension").data(function(we) {
          return we.dimensions;
        }, u);
        ve.enter().append("g").attr("class", "dimension"), ve.attr("transform", function(we) {
          return r(we.x, 0);
        }), ve.exit().remove();
        var ue = ve.selectAll("g.category").data(function(we) {
          return we.categories;
        }, u), ye = ue.enter().append("g").attr("class", "category");
        ue.attr("transform", function(we) {
          return r(0, we.y);
        }), ye.append("rect").attr("class", "catrect").attr("pointer-events", "none"), ue.select("rect.catrect").attr("fill", "none").attr("width", function(we) {
          return we.width;
        }).attr("height", function(we) {
          return we.height;
        }), _(ye);
        var Ae = ue.selectAll("rect.bandrect").data(function(we) {
          return we.bands;
        }, u);
        Ae.each(function() {
          e.raiseToTop(this);
        }), Ae.attr("fill", function(we) {
          return we.color;
        });
        var pe = Ae.enter().append("rect").attr("class", "bandrect").attr("stroke-opacity", 0).attr("fill", function(we) {
          return we.color;
        }).attr("fill-opacity", 0);
        Ae.attr("fill", function(we) {
          return we.color;
        }).attr("width", function(we) {
          return we.width;
        }).attr("height", function(we) {
          return we.height;
        }).attr("y", function(we) {
          return we.y;
        }).attr("cursor", function(we) {
          return we.parcatsViewModel.arrangement === "fixed" ? "default" : we.parcatsViewModel.arrangement === "perpendicular" ? "ns-resize" : "move";
        }), b(pe), Ae.exit().remove(), ye.append("text").attr("class", "catlabel").attr("pointer-events", "none");
        var ge = B._fullLayout.paper_bgcolor;
        ue.select("text.catlabel").attr("text-anchor", function(we) {
          return o(we) ? "start" : "end";
        }).attr("alignment-baseline", "middle").style("text-shadow", t.makeTextShadow(ge)).style("fill", "rgb(0, 0, 0)").attr("x", function(we) {
          return o(we) ? we.width + 5 : -5;
        }).attr("y", function(we) {
          return we.height / 2;
        }).text(function(we) {
          return we.model.categoryLabel;
        }).each(function(we) {
          n.font(m.select(this), we.parcatsViewModel.categorylabelfont), t.convertToTspans(m.select(this), B);
        }), ye.append("text").attr("class", "dimlabel"), ue.select("text.dimlabel").attr("text-anchor", "middle").attr("alignment-baseline", "baseline").attr("cursor", function(we) {
          return we.parcatsViewModel.arrangement === "fixed" ? "default" : "ew-resize";
        }).attr("x", function(we) {
          return we.width / 2;
        }).attr("y", -5).text(function(we, se) {
          return se === 0 ? we.parcatsViewModel.model.dimensions[we.model.dimensionInd].dimensionLabel : null;
        }).each(function(we) {
          n.font(m.select(this), we.parcatsViewModel.labelfont);
        }), ue.selectAll("rect.bandrect").on("mouseover", I).on("mouseout", P), ue.exit().remove(), ve.call(m.behavior.drag().origin(function(we) {
          return { x: we.x, y: 0 };
        }).on("dragstart", S).on("drag", E).on("dragend", R)), te.each(function(we) {
          we.traceSelection = m.select(this), we.pathSelection = m.select(this).selectAll("g.paths").selectAll("path.path"), we.dimensionSelection = m.select(this).selectAll("g.dimensions").selectAll("g.dimension");
        }), te.exit().remove();
      }
      function u(V) {
        return V.key;
      }
      function o(V) {
        var B = V.parcatsViewModel.dimensions.length, U = V.parcatsViewModel.dimensions[B - 1].model.dimensionInd;
        return V.model.dimensionInd === U;
      }
      function h(V, B) {
        return V.model.rawColor > B.model.rawColor ? 1 : V.model.rawColor < B.model.rawColor ? -1 : 0;
      }
      function l(V) {
        if (!V.parcatsViewModel.dragDimension && V.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1) {
          e.raiseToTop(this), f(m.select(this));
          var B = p(V), U = c(V);
          if (V.parcatsViewModel.graphDiv.emit("plotly_hover", { points: B, event: m.event, constraints: U }), V.parcatsViewModel.hoverinfoItems.indexOf("none") === -1) {
            var ee, N, K, X = m.mouse(this)[0], te = V.parcatsViewModel.graphDiv, ie = V.parcatsViewModel.trace, le = te._fullLayout, oe = le._paperdiv.node().getBoundingClientRect(), ve = V.parcatsViewModel.graphDiv.getBoundingClientRect();
            for (K = 0; K < V.leftXs.length - 1; K++)
              if (V.leftXs[K] + V.dimWidths[K] - 2 <= X && X <= V.leftXs[K + 1] + 2) {
                var ue = V.parcatsViewModel.dimensions[K], ye = V.parcatsViewModel.dimensions[K + 1];
                ee = (ue.x + ue.width + ye.x) / 2, N = (V.topYs[K] + V.topYs[K + 1] + V.height) / 2;
                break;
              }
            var Ae = V.parcatsViewModel.x + ee, pe = V.parcatsViewModel.y + N, ge = s.mostReadable(V.model.color, ["black", "white"]), we = V.model.count, se = we / V.parcatsViewModel.model.count, de = { countLabel: we, probabilityLabel: se.toFixed(3) }, Te = [];
            V.parcatsViewModel.hoverinfoItems.indexOf("count") !== -1 && Te.push(["Count:", de.countLabel].join(" ")), V.parcatsViewModel.hoverinfoItems.indexOf("probability") !== -1 && Te.push(["P:", de.probabilityLabel].join(" "));
            var Ee = Te.join("<br>"), Me = m.mouse(te)[0];
            x.loneHover({ trace: ie, x: Ae - oe.left + ve.left, y: pe - oe.top + ve.top, text: Ee, color: V.model.color, borderColor: "black", fontFamily: 'Monaco, "Courier New", monospace', fontSize: 10, fontColor: ge, idealAlign: Me < Ae ? "right" : "left", hovertemplate: (ie.line || {}).hovertemplate, hovertemplateLabels: de, eventData: [{ data: ie._input, fullData: ie, count: we, probability: se }] }, { container: le._hoverlayer.node(), outerContainer: le._paper.node(), gd: te });
          }
        }
      }
      function i(V) {
        if (!V.parcatsViewModel.dragDimension && (y(m.select(this)), x.loneUnhover(V.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()), V.parcatsViewModel.pathSelection.sort(h), V.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1)) {
          var B = p(V), U = c(V);
          V.parcatsViewModel.graphDiv.emit("plotly_unhover", { points: B, event: m.event, constraints: U });
        }
      }
      function p(V) {
        for (var B = [], U = z(V.parcatsViewModel), ee = 0; ee < V.model.valueInds.length; ee++) {
          var N = V.model.valueInds[ee];
          B.push({ curveNumber: U, pointNumber: N });
        }
        return B;
      }
      function c(V) {
        for (var B = {}, U = V.parcatsViewModel.model.dimensions, ee = 0; ee < U.length; ee++) {
          var N = U[ee], K = N.categories[V.model.categoryInds[ee]];
          B[N.containerInd] = K.categoryValue;
        }
        return V.model.rawColor !== void 0 && (B.color = V.model.rawColor), B;
      }
      function a(V) {
        if (V.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1) {
          var B = p(V), U = c(V);
          V.parcatsViewModel.graphDiv.emit("plotly_click", { points: B, event: m.event, constraints: U });
        }
      }
      function y(V) {
        V.attr("fill", function(B) {
          return B.model.color;
        }).attr("fill-opacity", 0.6).attr("stroke", "lightgray").attr("stroke-width", 0.2).attr("stroke-opacity", 1);
      }
      function f(V) {
        V.attr("fill-opacity", 0.8).attr("stroke", function(B) {
          return s.mostReadable(B.model.color, ["black", "white"]);
        }).attr("stroke-width", 0.3);
      }
      function _(V) {
        V.select("rect.catrect").attr("stroke", "black").attr("stroke-width", 1).attr("stroke-opacity", 1);
      }
      function b(V) {
        V.attr("stroke", "black").attr("stroke-width", 0.2).attr("stroke-opacity", 1).attr("fill-opacity", 1);
      }
      function w(V) {
        var B = V.parcatsViewModel.pathSelection, U = V.categoryViewModel.model.dimensionInd, ee = V.categoryViewModel.model.categoryInd;
        return B.filter(function(N) {
          return N.model.categoryInds[U] === ee && N.model.color === V.color;
        });
      }
      function T(V, B, U) {
        var ee = m.select(V).datum(), N = ee.categoryViewModel.model, K = ee.parcatsViewModel.graphDiv, X = m.select(V.parentNode).selectAll("rect.bandrect"), te = [];
        X.each(function(le) {
          w(le).each(function(oe) {
            Array.prototype.push.apply(te, p(oe));
          });
        });
        var ie = {};
        ie[N.dimensionInd] = N.categoryValue, K.emit(B, { points: te, event: U, constraints: ie });
      }
      function L(V, B, U) {
        var ee = m.select(V).datum(), N = ee.categoryViewModel.model, K = ee.parcatsViewModel.graphDiv, X = w(ee), te = [];
        X.each(function(le) {
          Array.prototype.push.apply(te, p(le));
        });
        var ie = {};
        ie[N.dimensionInd] = N.categoryValue, ee.rawColor !== void 0 && (ie.color = ee.rawColor), K.emit(B, { points: te, event: U, constraints: ie });
      }
      function A(V, B, U) {
        V._fullLayout._calcInverseTransform(V);
        var ee, N, K = V._fullLayout._invScaleX, X = V._fullLayout._invScaleY, te = m.select(U.parentNode).select("rect.catrect"), ie = te.node().getBoundingClientRect(), le = te.datum(), oe = le.parcatsViewModel, ve = oe.model.dimensions[le.model.dimensionInd], ue = oe.trace, ye = ie.top + ie.height / 2;
        oe.dimensions.length > 1 && ve.displayInd === oe.dimensions.length - 1 ? (ee = ie.left, N = "left") : (ee = ie.left + ie.width, N = "right");
        var Ae = le.model.count, pe = le.model.categoryLabel, ge = Ae / le.parcatsViewModel.model.count, we = { countLabel: Ae, categoryLabel: pe, probabilityLabel: ge.toFixed(3) }, se = [];
        le.parcatsViewModel.hoverinfoItems.indexOf("count") !== -1 && se.push(["Count:", we.countLabel].join(" ")), le.parcatsViewModel.hoverinfoItems.indexOf("probability") !== -1 && se.push(["P(" + we.categoryLabel + "):", we.probabilityLabel].join(" "));
        var de = se.join("<br>");
        return { trace: ue, x: K * (ee - B.left), y: X * (ye - B.top), text: de, color: "lightgray", borderColor: "black", fontFamily: 'Monaco, "Courier New", monospace', fontSize: 12, fontColor: "black", idealAlign: N, hovertemplate: ue.hovertemplate, hovertemplateLabels: we, eventData: [{ data: ue._input, fullData: ue, count: Ae, category: pe, probability: ge }] };
      }
      function I(V) {
        if (!V.parcatsViewModel.dragDimension && V.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1) {
          if (m.mouse(this)[1] < -1)
            return;
          var B, U = V.parcatsViewModel.graphDiv, ee = U._fullLayout, N = ee._paperdiv.node().getBoundingClientRect(), K = V.parcatsViewModel.hoveron;
          K === "color" ? (function(X) {
            var te = m.select(X).datum(), ie = w(te);
            f(ie), ie.each(function() {
              e.raiseToTop(this);
            }), m.select(X.parentNode).selectAll("rect.bandrect").filter(function(le) {
              return le.color === te.color;
            }).each(function() {
              e.raiseToTop(this), m.select(this).attr("stroke", "black").attr("stroke-width", 1.5);
            });
          }(this), L(this, "plotly_hover", m.event)) : (function(X) {
            m.select(X.parentNode).selectAll("rect.bandrect").each(function(te) {
              var ie = w(te);
              f(ie), ie.each(function() {
                e.raiseToTop(this);
              });
            }), m.select(X.parentNode).select("rect.catrect").attr("stroke", "black").attr("stroke-width", 2.5);
          }(this), T(this, "plotly_hover", m.event)), V.parcatsViewModel.hoverinfoItems.indexOf("none") === -1 && (K === "category" ? B = A(U, N, this) : K === "color" ? B = function(X, te, ie) {
            X._fullLayout._calcInverseTransform(X);
            var le, oe, ve = X._fullLayout._invScaleX, ue = X._fullLayout._invScaleY, ye = ie.getBoundingClientRect(), Ae = m.select(ie).datum(), pe = Ae.categoryViewModel, ge = pe.parcatsViewModel, we = ge.model.dimensions[pe.model.dimensionInd], se = ge.trace, de = ye.y + ye.height / 2;
            ge.dimensions.length > 1 && we.displayInd === ge.dimensions.length - 1 ? (le = ye.left, oe = "left") : (le = ye.left + ye.width, oe = "right");
            var Te = pe.model.categoryLabel, Ee = Ae.parcatsViewModel.model.count, Me = 0;
            Ae.categoryViewModel.bands.forEach(function(ot) {
              ot.color === Ae.color && (Me += ot.count);
            });
            var ze = pe.model.count, Ie = 0;
            ge.pathSelection.each(function(ot) {
              ot.model.color === Ae.color && (Ie += ot.model.count);
            });
            var Oe = Me / Ee, Ze = Me / Ie, Fe = Me / ze, Pe = { countLabel: Ee, categoryLabel: Te, probabilityLabel: Oe.toFixed(3) }, De = [];
            pe.parcatsViewModel.hoverinfoItems.indexOf("count") !== -1 && De.push(["Count:", Pe.countLabel].join(" ")), pe.parcatsViewModel.hoverinfoItems.indexOf("probability") !== -1 && (De.push("P(color \u2229 " + Te + "): " + Pe.probabilityLabel), De.push("P(" + Te + " | color): " + Ze.toFixed(3)), De.push("P(color | " + Te + "): " + Fe.toFixed(3)));
            var Ge = De.join("<br>"), Qe = s.mostReadable(Ae.color, ["black", "white"]);
            return { trace: se, x: ve * (le - te.left), y: ue * (de - te.top), text: Ge, color: Ae.color, borderColor: "black", fontFamily: 'Monaco, "Courier New", monospace', fontColor: Qe, fontSize: 10, idealAlign: oe, hovertemplate: se.hovertemplate, hovertemplateLabels: Pe, eventData: [{ data: se._input, fullData: se, category: Te, count: Ee, probability: Oe, categorycount: ze, colorcount: Ie, bandcolorcount: Me }] };
          }(U, N, this) : K === "dimension" && (B = function(X, te, ie) {
            var le = [];
            return m.select(ie.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function() {
              le.push(A(X, te, this));
            }), le;
          }(U, N, this)), B && x.loneHover(B, { container: ee._hoverlayer.node(), outerContainer: ee._paper.node(), gd: U }));
        }
      }
      function P(V) {
        var B = V.parcatsViewModel;
        !B.dragDimension && (y(B.pathSelection), _(B.dimensionSelection.selectAll("g.category")), b(B.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")), x.loneUnhover(B.graphDiv._fullLayout._hoverlayer.node()), B.pathSelection.sort(h), B.hoverinfoItems.indexOf("skip") === -1) && (V.parcatsViewModel.hoveron === "color" ? L(this, "plotly_unhover", m.event) : T(this, "plotly_unhover", m.event));
      }
      function S(V) {
        V.parcatsViewModel.arrangement !== "fixed" && (V.dragDimensionDisplayInd = V.model.displayInd, V.initialDragDimensionDisplayInds = V.parcatsViewModel.model.dimensions.map(function(B) {
          return B.displayInd;
        }), V.dragHasMoved = !1, V.dragCategoryDisplayInd = null, m.select(this).selectAll("g.category").select("rect.catrect").each(function(B) {
          var U = m.mouse(this)[0], ee = m.mouse(this)[1];
          -2 <= U && U <= B.width + 2 && -2 <= ee && ee <= B.height + 2 && (V.dragCategoryDisplayInd = B.model.displayInd, V.initialDragCategoryDisplayInds = V.model.categories.map(function(N) {
            return N.displayInd;
          }), B.model.dragY = B.y, e.raiseToTop(this.parentNode), m.select(this.parentNode).selectAll("rect.bandrect").each(function(N) {
            N.y < ee && ee <= N.y + N.height && (V.potentialClickBand = this);
          }));
        }), V.parcatsViewModel.dragDimension = V, x.loneUnhover(V.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()));
      }
      function E(V) {
        if (V.parcatsViewModel.arrangement !== "fixed" && (V.dragHasMoved = !0, V.dragDimensionDisplayInd !== null)) {
          var B = V.dragDimensionDisplayInd, U = B - 1, ee = B + 1, N = V.parcatsViewModel.dimensions[B];
          if (V.dragCategoryDisplayInd !== null) {
            var K = N.categories[V.dragCategoryDisplayInd];
            K.model.dragY += m.event.dy;
            var X = K.model.dragY, te = K.model.displayInd, ie = N.categories, le = ie[te - 1], oe = ie[te + 1];
            le !== void 0 && X < le.y + le.height / 2 && (K.model.displayInd = le.model.displayInd, le.model.displayInd = te), oe !== void 0 && X + K.height > oe.y + oe.height / 2 && (K.model.displayInd = oe.model.displayInd, oe.model.displayInd = te), V.dragCategoryDisplayInd = K.model.displayInd;
          }
          if (V.dragCategoryDisplayInd === null || V.parcatsViewModel.arrangement === "freeform") {
            N.model.dragX = m.event.x;
            var ve = V.parcatsViewModel.dimensions[U], ue = V.parcatsViewModel.dimensions[ee];
            ve !== void 0 && N.model.dragX < ve.x + ve.width && (N.model.displayInd = ve.model.displayInd, ve.model.displayInd = B), ue !== void 0 && N.model.dragX + N.width > ue.x && (N.model.displayInd = ue.model.displayInd, ue.model.displayInd = V.dragDimensionDisplayInd), V.dragDimensionDisplayInd = N.model.displayInd;
          }
          Z(V.parcatsViewModel), W(V.parcatsViewModel), H(V.parcatsViewModel), j(V.parcatsViewModel);
        }
      }
      function R(V) {
        if (V.parcatsViewModel.arrangement !== "fixed" && V.dragDimensionDisplayInd !== null) {
          m.select(this).selectAll("text").attr("font-weight", "normal");
          var B = {}, U = z(V.parcatsViewModel), ee = V.parcatsViewModel.model.dimensions.map(function(oe) {
            return oe.displayInd;
          }), N = V.initialDragDimensionDisplayInds.some(function(oe, ve) {
            return oe !== ee[ve];
          });
          N && ee.forEach(function(oe, ve) {
            var ue = V.parcatsViewModel.model.dimensions[ve].containerInd;
            B["dimensions[" + ue + "].displayindex"] = oe;
          });
          var K = !1;
          if (V.dragCategoryDisplayInd !== null) {
            var X = V.model.categories.map(function(oe) {
              return oe.displayInd;
            });
            if (K = V.initialDragCategoryDisplayInds.some(function(oe, ve) {
              return oe !== X[ve];
            })) {
              var te = V.model.categories.slice().sort(function(oe, ve) {
                return oe.displayInd - ve.displayInd;
              }), ie = te.map(function(oe) {
                return oe.categoryValue;
              }), le = te.map(function(oe) {
                return oe.categoryLabel;
              });
              B["dimensions[" + V.model.containerInd + "].categoryarray"] = [ie], B["dimensions[" + V.model.containerInd + "].ticktext"] = [le], B["dimensions[" + V.model.containerInd + "].categoryorder"] = "array";
            }
          }
          V.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1 && !V.dragHasMoved && V.potentialClickBand && (V.parcatsViewModel.hoveron === "color" ? L(V.potentialClickBand, "plotly_click", m.event.sourceEvent) : T(V.potentialClickBand, "plotly_click", m.event.sourceEvent)), V.model.dragX = null, V.dragCategoryDisplayInd !== null && (V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd].model.dragY = null, V.dragCategoryDisplayInd = null), V.dragDimensionDisplayInd = null, V.parcatsViewModel.dragDimension = null, V.dragHasMoved = null, V.potentialClickBand = null, Z(V.parcatsViewModel), W(V.parcatsViewModel), m.transition().duration(300).ease("cubic-in-out").each(function() {
            H(V.parcatsViewModel, !0), j(V.parcatsViewModel, !0);
          }).each("end", function() {
            (N || K) && k.restyle(V.parcatsViewModel.graphDiv, B, [U]);
          });
        }
      }
      function z(V) {
        for (var B, U = V.graphDiv._fullData, ee = 0; ee < U.length; ee++)
          if (V.key === U[ee].uid) {
            B = ee;
            break;
          }
        return B;
      }
      function j(V, B) {
        var U;
        B === void 0 && (B = !1), V.pathSelection.data(function(ee) {
          return ee.paths;
        }, u), (U = V.pathSelection, B ? U.transition() : U).attr("d", function(ee) {
          return ee.svgD;
        });
      }
      function H(V, B) {
        function U(X) {
          return B ? X.transition() : X;
        }
        B === void 0 && (B = !1), V.dimensionSelection.data(function(X) {
          return X.dimensions;
        }, u);
        var ee = V.dimensionSelection.selectAll("g.category").data(function(X) {
          return X.categories;
        }, u);
        U(V.dimensionSelection).attr("transform", function(X) {
          return r(X.x, 0);
        }), U(ee).attr("transform", function(X) {
          return r(0, X.y);
        }), ee.select(".dimlabel").text(function(X, te) {
          return te === 0 ? X.parcatsViewModel.model.dimensions[X.model.dimensionInd].dimensionLabel : null;
        }), ee.select(".catlabel").attr("text-anchor", function(X) {
          return o(X) ? "start" : "end";
        }).attr("x", function(X) {
          return o(X) ? X.width + 5 : -5;
        }).each(function(X) {
          var te, ie;
          o(X) ? (te = X.width + 5, ie = "start") : (te = -5, ie = "end"), m.select(this).selectAll("tspan").attr("x", te).attr("text-anchor", ie);
        });
        var N = ee.selectAll("rect.bandrect").data(function(X) {
          return X.bands;
        }, u), K = N.enter().append("rect").attr("class", "bandrect").attr("cursor", "move").attr("stroke-opacity", 0).attr("fill", function(X) {
          return X.color;
        }).attr("fill-opacity", 0);
        N.attr("fill", function(X) {
          return X.color;
        }).attr("width", function(X) {
          return X.width;
        }).attr("height", function(X) {
          return X.height;
        }).attr("y", function(X) {
          return X.y;
        }), b(K), N.each(function() {
          e.raiseToTop(this);
        }), N.exit().remove();
      }
      function Y(V, B, U) {
        var ee, N = U[0], K = B.margin || { l: 80, r: 80, t: 100, b: 80 }, X = N.trace, te = X.domain, ie = B.width, le = B.height, oe = Math.floor(ie * (te.x[1] - te.x[0])), ve = Math.floor(le * (te.y[1] - te.y[0])), ue = te.x[0] * ie + K.l, ye = B.height - te.y[1] * B.height + K.t, Ae = X.line.shape;
        ee = X.hoverinfo === "all" ? ["count", "probability"] : (X.hoverinfo || "").split("+");
        var pe = { trace: X, key: X.uid, model: N, x: ue, y: ye, width: oe, height: ve, hoveron: X.hoveron, hoverinfoItems: ee, arrangement: X.arrangement, bundlecolors: X.bundlecolors, sortpaths: X.sortpaths, labelfont: X.labelfont, categorylabelfont: X.tickfont, pathShape: Ae, dragDimension: null, margin: K, paths: [], dimensions: [], graphDiv: V, traceSelection: null, pathSelection: null, dimensionSelection: null };
        return N.dimensions && (Z(pe), W(pe)), pe;
      }
      function J(V, B, U, ee, N) {
        var K, X, te = [], ie = [];
        for (X = 0; X < U.length - 1; X++)
          K = g(U[X] + V[X], V[X + 1]), te.push(K(N)), ie.push(K(1 - N));
        var le = "M " + V[0] + "," + B[0];
        for (le += "l" + U[0] + ",0 ", X = 1; X < U.length; X++)
          le += "C" + te[X - 1] + "," + B[X - 1] + " " + ie[X - 1] + "," + B[X] + " " + V[X] + "," + B[X], le += "l" + U[X] + ",0 ";
        for (le += "l0," + ee + " ", le += "l -" + U[U.length - 1] + ",0 ", X = U.length - 2; X >= 0; X--)
          le += "C" + ie[X] + "," + (B[X + 1] + ee) + " " + te[X] + "," + (B[X] + ee) + " " + (V[X] + U[X]) + "," + (B[X] + ee), le += "l-" + U[X] + ",0 ";
        return le += "Z";
      }
      function W(V) {
        var B = V.dimensions, U = V.model, ee = B.map(function(De) {
          return De.categories.map(function(Ge) {
            return Ge.y;
          });
        }), N = V.model.dimensions.map(function(De) {
          return De.categories.map(function(Ge) {
            return Ge.displayInd;
          });
        }), K = V.model.dimensions.map(function(De) {
          return De.displayInd;
        }), X = V.dimensions.map(function(De) {
          return De.model.dimensionInd;
        }), te = B.map(function(De) {
          return De.x;
        }), ie = B.map(function(De) {
          return De.width;
        }), le = [];
        for (var oe in U.paths)
          U.paths.hasOwnProperty(oe) && le.push(U.paths[oe]);
        function ve(De) {
          var Ge = De.categoryInds.map(function(Qe, ot) {
            return N[ot][Qe];
          });
          return X.map(function(Qe) {
            return Ge[Qe];
          });
        }
        le.sort(function(De, Ge) {
          var Qe = ve(De), ot = ve(Ge);
          return V.sortpaths === "backward" && (Qe.reverse(), ot.reverse()), Qe.push(De.valueInds[0]), ot.push(Ge.valueInds[0]), V.bundlecolors && (Qe.unshift(De.rawColor), ot.unshift(Ge.rawColor)), Qe < ot ? -1 : Qe > ot ? 1 : 0;
        });
        for (var ue = new Array(le.length), ye = B[0].model.count, Ae = B[0].categories.map(function(De) {
          return De.height;
        }).reduce(function(De, Ge) {
          return De + Ge;
        }), pe = 0; pe < le.length; pe++) {
          var ge, we = le[pe];
          ge = ye > 0 ? Ae * (we.count / ye) : 0;
          for (var se, de = new Array(ee.length), Te = 0; Te < we.categoryInds.length; Te++) {
            var Ee = we.categoryInds[Te], Me = N[Te][Ee], ze = K[Te];
            de[ze] = ee[ze][Me], ee[ze][Me] += ge;
            var Ie = V.dimensions[ze].categories[Me], Oe = Ie.bands.length, Ze = Ie.bands[Oe - 1];
            if (Ze === void 0 || we.rawColor !== Ze.rawColor) {
              var Fe = Ze === void 0 ? 0 : Ze.y + Ze.height;
              Ie.bands.push({ key: Fe, color: we.color, rawColor: we.rawColor, height: ge, width: Ie.width, count: we.count, y: Fe, categoryViewModel: Ie, parcatsViewModel: V });
            } else {
              var Pe = Ie.bands[Oe - 1];
              Pe.height += ge, Pe.count += we.count;
            }
          }
          se = V.pathShape === "hspline" ? J(te, de, ie, ge, 0.5) : J(te, de, ie, ge, 0), ue[pe] = { key: we.valueInds[0], model: we, height: ge, leftXs: te, topYs: de, dimWidths: ie, svgD: se, parcatsViewModel: V };
        }
        V.paths = ue;
      }
      function Z(V) {
        var B = V.model.dimensions.map(function(X) {
          return { displayInd: X.displayInd, dimensionInd: X.dimensionInd };
        });
        B.sort(function(X, te) {
          return X.displayInd - te.displayInd;
        });
        var U = [];
        for (var ee in B) {
          var N = B[ee].dimensionInd, K = V.model.dimensions[N];
          U.push(re(V, K));
        }
        V.dimensions = U;
      }
      function re(V, B) {
        var U, ee = V.model.dimensions.length, N = B.displayInd;
        U = 40 + (ee > 1 ? (V.width - 80 - 16) / (ee - 1) : 0) * N;
        var K, X, te, ie, le, oe = [], ve = V.model.maxCats, ue = B.categories.length, ye = B.count, Ae = V.height - 8 * (ve - 1), pe = 8 * (ve - ue) / 2, ge = B.categories.map(function(we) {
          return { displayInd: we.displayInd, categoryInd: we.categoryInd };
        });
        for (ge.sort(function(we, se) {
          return we.displayInd - se.displayInd;
        }), le = 0; le < ue; le++)
          ie = ge[le].categoryInd, X = B.categories[ie], K = ye > 0 ? X.count / ye * Ae : 0, te = { key: X.valueInds[0], model: X, width: 16, height: K, y: X.dragY !== null ? X.dragY : pe, bands: [], parcatsViewModel: V }, pe = pe + K + 8, oe.push(te);
        return { key: B.dimensionInd, x: B.dragX !== null ? B.dragX : U, y: 0, width: 16, model: B, categories: oe, parcatsViewModel: V, dragCategoryDisplayInd: null, dragDimensionDisplayInd: null, initialDragDimensionDisplayInds: null, initialDragCategoryDisplayInds: null, dragHasMoved: null, potentialClickBand: null };
      }
      Q.exports = function(V, B, U, ee) {
        d(U, V, ee, B);
      };
    }, { "../../components/drawing": 389, "../../components/fx": 407, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plot_api/plot_api": 552, "@plotly/d3": 58, "d3-interpolate": 116, tinycolor2: 313 }], 896: [function(v, Q, $) {
      var m = v("./parcats");
      Q.exports = function(g, k, x, e) {
        var r = g._fullLayout, n = r._paper, s = r._size;
        m(g, n, k, { width: s.w, height: s.h, margin: { t: s.t, r: s.r, b: s.b, l: s.l } }, x, e);
      };
    }, { "./parcats": 895 }], 897: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../../plots/cartesian/layout_attributes"), k = v("../../plots/font_attributes"), x = v("../../plots/domain").attributes, e = v("../../lib/extend").extendFlat, r = v("../../plot_api/plot_template").templatedArray;
      Q.exports = { domain: x({ name: "parcoords", trace: !0, editType: "plot" }), labelangle: { valType: "angle", dflt: 0, editType: "plot" }, labelside: { valType: "enumerated", values: ["top", "bottom"], dflt: "top", editType: "plot" }, labelfont: k({ editType: "plot" }), tickfont: k({ editType: "plot" }), rangefont: k({ editType: "plot" }), dimensions: r("dimension", { label: { valType: "string", editType: "plot" }, tickvals: e({}, g.tickvals, { editType: "plot" }), ticktext: e({}, g.ticktext, { editType: "plot" }), tickformat: e({}, g.tickformat, { editType: "plot" }), visible: { valType: "boolean", dflt: !0, editType: "plot" }, range: { valType: "info_array", items: [{ valType: "number", editType: "plot" }, { valType: "number", editType: "plot" }], editType: "plot" }, constraintrange: { valType: "info_array", freeLength: !0, dimensions: "1-2", items: [{ valType: "any", editType: "plot" }, { valType: "any", editType: "plot" }], editType: "plot" }, multiselect: { valType: "boolean", dflt: !0, editType: "plot" }, values: { valType: "data_array", editType: "calc" }, editType: "calc" }), line: e({ editType: "calc" }, m("line", { colorscaleDflt: "Viridis", autoColorDflt: !1, editTypeOverride: "calc" })), unselected: { line: { color: { valType: "color", dflt: "#7f7f7f", editType: "plot" }, opacity: { valType: "number", min: 0, max: 1, dflt: "auto", editType: "plot" }, editType: "plot" }, editType: "plot" } };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/plot_template": 555, "../../plots/cartesian/layout_attributes": 579, "../../plots/domain": 593, "../../plots/font_attributes": 594 }], 898: [function(v, Q, $) {
      var m = v("./constants"), g = v("@plotly/d3"), k = v("../../lib/gup").keyFun, x = v("../../lib/gup").repeat, e = v("../../lib").sorterAsc, r = v("../../lib").strTranslate, n = m.bar.snapRatio;
      function s(A, I) {
        return A * (1 - n) + I * n;
      }
      var t = m.bar.snapClose;
      function d(A, I) {
        return A * (1 - t) + I * t;
      }
      function u(A, I, P, S) {
        if (function(re, V) {
          for (var B = 0; B < V.length; B++)
            if (re >= V[B][0] && re <= V[B][1])
              return !0;
          return !1;
        }(P, S))
          return P;
        var E = A ? -1 : 1, R = 0, z = I.length - 1;
        if (E < 0) {
          var j = R;
          R = z, z = j;
        }
        for (var H = I[R], Y = H, J = R; E * J < E * z; J += E) {
          var W = J + E, Z = I[W];
          if (E * P < E * d(H, Z))
            return s(H, Y);
          if (E * P < E * Z || W === z)
            return s(Z, H);
          Y = H, H = Z;
        }
      }
      function o(A) {
        A.attr("x", -m.bar.captureWidth / 2).attr("width", m.bar.captureWidth);
      }
      function h(A) {
        A.attr("visibility", "visible").style("visibility", "visible").attr("fill", "yellow").attr("opacity", 0);
      }
      function l(A) {
        if (!A.brush.filterSpecified)
          return "0," + A.height;
        for (var I, P, S, E = i(A.brush.filter.getConsolidated(), A.height), R = [0], z = E.length ? E[0][0] : null, j = 0; j < E.length; j++)
          P = (I = E[j])[1] - I[0], R.push(z), R.push(P), (S = j + 1) < E.length && (z = E[S][0] - I[1]);
        return R.push(A.height), R;
      }
      function i(A, I) {
        return A.map(function(P) {
          return P.map(function(S) {
            return Math.max(0, S * I);
          }).sort(e);
        });
      }
      function p() {
        g.select(document.body).style("cursor", null);
      }
      function c(A) {
        A.attr("stroke-dasharray", l);
      }
      function a(A, I) {
        var P = g.select(A).selectAll(".highlight, .highlight-shadow");
        c(I ? P.transition().duration(m.bar.snapDuration).each("end", I) : P);
      }
      function y(A, I) {
        var P, S = A.brush, E = NaN, R = {};
        if (S.filterSpecified) {
          var z = A.height, j = S.filter.getConsolidated(), H = i(j, z), Y = NaN, J = NaN, W = NaN;
          for (P = 0; P <= H.length; P++) {
            var Z = H[P];
            if (Z && Z[0] <= I && I <= Z[1]) {
              Y = P;
              break;
            }
            if (J = P ? P - 1 : NaN, Z && Z[0] > I) {
              W = P;
              break;
            }
          }
          if (E = Y, isNaN(E) && (E = isNaN(J) || isNaN(W) ? isNaN(J) ? W : J : I - H[J][1] < H[W][0] - I ? J : W), !isNaN(E)) {
            var re = H[E], V = function(N, K) {
              var X = m.bar.handleHeight;
              if (!(K > N[1] + X || K < N[0] - X))
                return K >= 0.9 * N[1] + 0.1 * N[0] ? "n" : K <= 0.9 * N[0] + 0.1 * N[1] ? "s" : "ns";
            }(re, I);
            V && (R.interval = j[E], R.intervalPix = re, R.region = V);
          }
        }
        if (A.ordinal && !R.region) {
          var B = A.unitTickvals, U = A.unitToPaddedPx.invert(I);
          for (P = 0; P < B.length; P++) {
            var ee = [0.25 * B[Math.max(P - 1, 0)] + 0.75 * B[P], 0.25 * B[Math.min(P + 1, B.length - 1)] + 0.75 * B[P]];
            if (U >= ee[0] && U <= ee[1]) {
              R.clickableOrdinalRange = ee;
              break;
            }
          }
        }
        return R;
      }
      function f(A, I) {
        g.event.sourceEvent.stopPropagation();
        var P = I.height - g.mouse(A)[1] - 2 * m.verticalPadding, S = I.brush.svgBrush;
        S.wasDragged = !0, S._dragging = !0, S.grabbingBar ? S.newExtent = [P - S.grabPoint, P + S.barLength - S.grabPoint].map(I.unitToPaddedPx.invert) : S.newExtent = [S.startExtent, I.unitToPaddedPx.invert(P)].sort(e), I.brush.filterSpecified = !0, S.extent = S.stayingIntervals.concat([S.newExtent]), S.brushCallback(I), a(A.parentNode);
      }
      function _(A, I) {
        var P = y(I, I.height - g.mouse(A)[1] - 2 * m.verticalPadding), S = "crosshair";
        P.clickableOrdinalRange ? S = "pointer" : P.region && (S = P.region + "-resize"), g.select(document.body).style("cursor", S);
      }
      function b(A) {
        A.on("mousemove", function(I) {
          g.event.preventDefault(), I.parent.inBrushDrag || _(this, I);
        }).on("mouseleave", function(I) {
          I.parent.inBrushDrag || p();
        }).call(g.behavior.drag().on("dragstart", function(I) {
          (function(P, S) {
            g.event.sourceEvent.stopPropagation();
            var E = S.height - g.mouse(P)[1] - 2 * m.verticalPadding, R = S.unitToPaddedPx.invert(E), z = S.brush, j = y(S, E), H = j.interval, Y = z.svgBrush;
            if (Y.wasDragged = !1, Y.grabbingBar = j.region === "ns", Y.grabbingBar) {
              var J = H.map(S.unitToPaddedPx);
              Y.grabPoint = E - J[0] - m.verticalPadding, Y.barLength = J[1] - J[0];
            }
            Y.clickableOrdinalRange = j.clickableOrdinalRange, Y.stayingIntervals = S.multiselect && z.filterSpecified ? z.filter.getConsolidated() : [], H && (Y.stayingIntervals = Y.stayingIntervals.filter(function(W) {
              return W[0] !== H[0] && W[1] !== H[1];
            })), Y.startExtent = j.region ? H[j.region === "s" ? 1 : 0] : R, S.parent.inBrushDrag = !0, Y.brushStartCallback();
          })(this, I);
        }).on("drag", function(I) {
          f(this, I);
        }).on("dragend", function(I) {
          (function(P, S) {
            var E = S.brush, R = E.filter, z = E.svgBrush;
            z._dragging || (_(P, S), f(P, S), S.brush.svgBrush.wasDragged = !1), z._dragging = !1, g.event.sourceEvent.stopPropagation();
            var j = z.grabbingBar;
            if (z.grabbingBar = !1, z.grabLocation = void 0, S.parent.inBrushDrag = !1, p(), !z.wasDragged)
              return z.wasDragged = void 0, z.clickableOrdinalRange ? E.filterSpecified && S.multiselect ? z.extent.push(z.clickableOrdinalRange) : (z.extent = [z.clickableOrdinalRange], E.filterSpecified = !0) : j ? (z.extent = z.stayingIntervals, z.extent.length === 0 && T(E)) : T(E), z.brushCallback(S), a(P.parentNode), void z.brushEndCallback(E.filterSpecified ? R.getConsolidated() : []);
            var H = function() {
              R.set(R.getConsolidated());
            };
            if (S.ordinal) {
              var Y = S.unitTickvals;
              Y[Y.length - 1] < Y[0] && Y.reverse(), z.newExtent = [u(0, Y, z.newExtent[0], z.stayingIntervals), u(1, Y, z.newExtent[1], z.stayingIntervals)];
              var J = z.newExtent[1] > z.newExtent[0];
              z.extent = z.stayingIntervals.concat(J ? [z.newExtent] : []), z.extent.length || T(E), z.brushCallback(S), J ? a(P.parentNode, H) : (H(), a(P.parentNode));
            } else
              H();
            z.brushEndCallback(E.filterSpecified ? R.getConsolidated() : []);
          })(this, I);
        }));
      }
      function w(A, I) {
        return A[0] - I[0];
      }
      function T(A) {
        A.filterSpecified = !1, A.svgBrush.extent = [[-1 / 0, 1 / 0]];
      }
      function L(A) {
        for (var I, P = A.slice(), S = [], E = P.shift(); E; ) {
          for (I = E.slice(); (E = P.shift()) && E[0] <= I[1]; )
            I[1] = Math.max(I[1], E[1]);
          S.push(I);
        }
        return S.length === 1 && S[0][0] > S[0][1] && (S = []), S;
      }
      Q.exports = { makeBrush: function(A, I, P, S, E, R) {
        var z, j = function() {
          var H, Y, J = [];
          return { set: function(W) {
            (J = W.map(function(Z) {
              return Z.slice().sort(e);
            }).sort(w)).length === 1 && J[0][0] === -1 / 0 && J[0][1] === 1 / 0 && (J = [[0, -1]]), H = L(J), Y = J.reduce(function(Z, re) {
              return [Math.min(Z[0], re[0]), Math.max(Z[1], re[1])];
            }, [1 / 0, -1 / 0]);
          }, get: function() {
            return J.slice();
          }, getConsolidated: function() {
            return H;
          }, getBounds: function() {
            return Y;
          } };
        }();
        return j.set(P), { filter: j, filterSpecified: I, svgBrush: { extent: [], brushStartCallback: S, brushCallback: (z = E, function(H) {
          var Y = H.brush, J = function(W) {
            return W.svgBrush.extent.map(function(Z) {
              return Z.slice();
            });
          }(Y).slice();
          Y.filter.set(J), z();
        }), brushEndCallback: R } };
      }, ensureAxisBrush: function(A, I, P) {
        var S = A.selectAll("." + m.cn.axisBrush).data(x, k);
        S.enter().append("g").classed(m.cn.axisBrush, !0), function(E, R, z) {
          var j = z._context.staticPlot, H = E.selectAll(".background").data(x);
          H.enter().append("rect").classed("background", !0).call(o).call(h).style("pointer-events", j ? "none" : "auto").attr("transform", r(0, m.verticalPadding)), H.call(b).attr("height", function(W) {
            return W.height - m.verticalPadding;
          });
          var Y = E.selectAll(".highlight-shadow").data(x);
          Y.enter().append("line").classed("highlight-shadow", !0).attr("x", -m.bar.width / 2).attr("stroke-width", m.bar.width + m.bar.strokeWidth).attr("stroke", R).attr("opacity", m.bar.strokeOpacity).attr("stroke-linecap", "butt"), Y.attr("y1", function(W) {
            return W.height;
          }).call(c);
          var J = E.selectAll(".highlight").data(x);
          J.enter().append("line").classed("highlight", !0).attr("x", -m.bar.width / 2).attr("stroke-width", m.bar.width - m.bar.strokeWidth).attr("stroke", m.bar.fillColor).attr("opacity", m.bar.fillOpacity).attr("stroke-linecap", "butt"), J.attr("y1", function(W) {
            return W.height;
          }).call(c);
        }(S, I, P);
      }, cleanRanges: function(A, I) {
        if (Array.isArray(A[0]) ? (A = A.map(function(S) {
          return S.sort(e);
        }), A = I.multiselect ? L(A.sort(w)) : [A[0]]) : A = [A.sort(e)], I.tickvals) {
          var P = I.tickvals.slice().sort(e);
          if (!(A = A.map(function(S) {
            var E = [u(0, P, S[0], []), u(1, P, S[1], [])];
            if (E[1] > E[0])
              return E;
          }).filter(function(S) {
            return S;
          })).length)
            return;
        }
        return A.length > 1 ? A : A[0];
      } };
    }, { "../../lib": 515, "../../lib/gup": 512, "./constants": 902, "@plotly/d3": 58 }], 899: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), colorbar: { container: "line", min: "cmin", max: "cmax" }, moduleType: "trace", name: "parcoords", basePlotModule: v("./base_plot"), categories: ["gl", "regl", "noOpacity", "noHover"], meta: {} };
    }, { "./attributes": 897, "./base_plot": 900, "./calc": 901, "./defaults": 903 }], 900: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../plots/get_data").getModuleCalcData, k = v("./plot"), x = v("../../constants/xmlns_namespaces");
      $.name = "parcoords", $.plot = function(e) {
        var r = g(e.calcdata, "parcoords")[0];
        r.length && k(e, r);
      }, $.clean = function(e, r, n, s) {
        var t = s._has && s._has("parcoords"), d = r._has && r._has("parcoords");
        t && !d && (s._paperdiv.selectAll(".parcoords").remove(), s._glimages.selectAll("*").remove());
      }, $.toSVG = function(e) {
        var r = e._fullLayout._glimages, n = m.select(e).selectAll(".svg-container");
        n.filter(function(s, t) {
          return t === n.size() - 1;
        }).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function() {
          var s = this.toDataURL("image/png");
          r.append("svg:image").attr({ xmlns: x.svg, "xlink:href": s, preserveAspectRatio: "none", x: 0, y: 0, width: this.style.width, height: this.style.height });
        }), window.setTimeout(function() {
          m.selectAll("#filterBarPattern").attr("id", "filterBarPattern");
        }, 60);
      };
    }, { "../../constants/xmlns_namespaces": 492, "../../plots/get_data": 602, "./plot": 909, "@plotly/d3": 58 }], 901: [function(v, Q, $) {
      var m = v("../../lib").isArrayOrTypedArray, g = v("../../components/colorscale"), k = v("../../lib/gup").wrap;
      Q.exports = function(x, e) {
        var r, n;
        return g.hasColorscale(e, "line") && m(e.line.color) ? (r = e.line.color, n = g.extractOpts(e.line).colorscale, g.calc(x, e, { vals: r, containerStr: "line", cLetter: "c" })) : (r = function(s) {
          for (var t = new Array(s), d = 0; d < s; d++)
            t[d] = 0.5;
          return t;
        }(e._length), n = [[0, e.line.color], [1, e.line.color]]), k({ lineColor: r, cscale: n });
      };
    }, { "../../components/colorscale": 379, "../../lib": 515, "../../lib/gup": 512 }], 902: [function(v, Q, $) {
      Q.exports = { maxDimensionCount: 60, overdrag: 45, verticalPadding: 2, tickDistance: 50, canvasPixelRatio: 1, blockLineCount: 5e3, layers: ["contextLineLayer", "focusLineLayer", "pickLineLayer"], axisTitleOffset: 28, axisExtentOffset: 10, bar: { width: 4, captureWidth: 10, fillColor: "magenta", fillOpacity: 1, snapDuration: 150, snapRatio: 0.25, snapClose: 0.01, strokeOpacity: 1, strokeWidth: 1, handleHeight: 8, handleOpacity: 1, handleOverlap: 0 }, cn: { axisExtentText: "axis-extent-text", parcoordsLineLayers: "parcoords-line-layers", parcoordsLineLayer: "parcoords-lines", parcoords: "parcoords", parcoordsControlView: "parcoords-control-view", yAxis: "y-axis", axisOverlays: "axis-overlays", axis: "axis", axisHeading: "axis-heading", axisTitle: "axis-title", axisExtent: "axis-extent", axisExtentTop: "axis-extent-top", axisExtentTopText: "axis-extent-top-text", axisExtentBottom: "axis-extent-bottom", axisExtentBottomText: "axis-extent-bottom-text", axisBrush: "axis-brush" }, id: { filterBarPattern: "filter-bar-pattern" } };
    }, {}], 903: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/helpers").hasColorscale, k = v("../../components/colorscale/defaults"), x = v("../../plots/domain").defaults, e = v("../../plots/array_container_defaults"), r = v("../../plots/cartesian/axes"), n = v("./attributes"), s = v("./axisbrush"), t = v("./constants").maxDimensionCount, d = v("./merge_length");
      function u(o, h, l, i) {
        function p(_, b) {
          return m.coerce(o, h, n.dimensions, _, b);
        }
        var c = p("values"), a = p("visible");
        if (c && c.length || (a = h.visible = !1), a) {
          p("label"), p("tickvals"), p("ticktext"), p("tickformat");
          var y = p("range");
          h._ax = { _id: "y", type: "linear", showexponent: "all", exponentformat: "B", range: y }, r.setConvert(h._ax, i.layout), p("multiselect");
          var f = p("constraintrange");
          f && (h.constraintrange = s.cleanRanges(f, h));
        }
      }
      Q.exports = function(o, h, l, i) {
        function p(_, b) {
          return m.coerce(o, h, n, _, b);
        }
        var c = o.dimensions;
        Array.isArray(c) && c.length > t && (m.log("parcoords traces support up to " + t + " dimensions at the moment"), c.splice(t));
        var a = e(o, h, { name: "dimensions", layout: i, handleItemDefaults: u }), y = function(_, b, w, T, L) {
          var A = L("line.color", w);
          if (g(_, "line") && m.isArrayOrTypedArray(A)) {
            if (A.length)
              return L("line.colorscale"), k(_, b, T, L, { prefix: "line.", cLetter: "c" }), A.length;
            b.line.color = w;
          }
          return 1 / 0;
        }(o, h, l, i, p);
        x(h, i, p), Array.isArray(a) && a.length || (h.visible = !1), d(h, a, "values", y);
        var f = { family: i.font.family, size: Math.round(i.font.size / 1.2), color: i.font.color };
        m.coerceFont(p, "labelfont", f), m.coerceFont(p, "tickfont", f), m.coerceFont(p, "rangefont", f), p("labelangle"), p("labelside"), p("unselected.line.color"), p("unselected.line.opacity");
      };
    }, { "../../components/colorscale/defaults": 377, "../../components/colorscale/helpers": 378, "../../lib": 515, "../../plots/array_container_defaults": 561, "../../plots/cartesian/axes": 566, "../../plots/domain": 593, "./attributes": 897, "./axisbrush": 898, "./constants": 902, "./merge_length": 907 }], 904: [function(v, Q, $) {
      var m = v("../../lib").isTypedArray;
      $.convertTypedArray = function(g) {
        return m(g) ? Array.prototype.slice.call(g) : g;
      }, $.isOrdinal = function(g) {
        return !!g.tickvals;
      }, $.isVisible = function(g) {
        return g.visible || !("visible" in g);
      };
    }, { "../../lib": 515 }], 905: [function(v, Q, $) {
      var m = v("./base_index");
      m.plot = v("./plot"), Q.exports = m;
    }, { "./base_index": 899, "./plot": 909 }], 906: [function(v, Q, $) {
      var m = v("glslify"), g = m([`precision highp float;
#define GLSLIFY 1

varying vec4 fragColor;

attribute vec4 p01_04, p05_08, p09_12, p13_16,
               p17_20, p21_24, p25_28, p29_32,
               p33_36, p37_40, p41_44, p45_48,
               p49_52, p53_56, p57_60, colors;

uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,
             loA, hiA, loB, hiB, loC, hiC, loD, hiD;

uniform vec2 resolution, viewBoxPos, viewBoxSize;
uniform float maskHeight;
uniform float drwLayer; // 0: context, 1: focus, 2: pick
uniform vec4 contextColor;
uniform sampler2D maskTexture, palette;

bool isPick    = (drwLayer > 1.5);
bool isContext = (drwLayer < 0.5);

const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);
const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);

float val(mat4 p, mat4 v) {
    return dot(matrixCompMult(p, v) * UNITS, UNITS);
}

float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {
    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);
    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);
    return y1 * (1.0 - ratio) + y2 * ratio;
}

int iMod(int a, int b) {
    return a - b * (a / b);
}

bool fOutside(float p, float lo, float hi) {
    return (lo < hi) && (lo > p || p > hi);
}

bool vOutside(vec4 p, vec4 lo, vec4 hi) {
    return (
        fOutside(p[0], lo[0], hi[0]) ||
        fOutside(p[1], lo[1], hi[1]) ||
        fOutside(p[2], lo[2], hi[2]) ||
        fOutside(p[3], lo[3], hi[3])
    );
}

bool mOutside(mat4 p, mat4 lo, mat4 hi) {
    return (
        vOutside(p[0], lo[0], hi[0]) ||
        vOutside(p[1], lo[1], hi[1]) ||
        vOutside(p[2], lo[2], hi[2]) ||
        vOutside(p[3], lo[3], hi[3])
    );
}

bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {
    return mOutside(A, loA, hiA) ||
           mOutside(B, loB, hiB) ||
           mOutside(C, loC, hiC) ||
           mOutside(D, loD, hiD);
}

bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {
    mat4 pnts[4];
    pnts[0] = A;
    pnts[1] = B;
    pnts[2] = C;
    pnts[3] = D;

    for(int i = 0; i < 4; ++i) {
        for(int j = 0; j < 4; ++j) {
            for(int k = 0; k < 4; ++k) {
                if(0 == iMod(
                    int(255.0 * texture2D(maskTexture,
                        vec2(
                            (float(i * 2 + j / 2) + 0.5) / 8.0,
                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight
                        ))[3]
                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),
                    2
                )) return true;
            }
        }
    }
    return false;
}

vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {
    float x = 0.5 * sign(v) + 0.5;
    float y = axisY(x, A, B, C, D);
    float z = 1.0 - abs(v);

    z += isContext ? 0.0 : 2.0 * float(
        outsideBoundingBox(A, B, C, D) ||
        outsideRasterMask(A, B, C, D)
    );

    return vec4(
        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,
        z,
        1.0
    );
}

void main() {
    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);
    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);
    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);
    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);

    float v = colors[3];

    gl_Position = position(isContext, v, A, B, C, D);

    fragColor =
        isContext ? vec4(contextColor) :
        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));
}
`]), k = m([`precision highp float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
    gl_FragColor = fragColor;
}
`]), x = v("./constants").maxDimensionCount, e = v("../../lib"), r = new Uint8Array(4), n = new Uint8Array(4), s = { shape: [256, 1], format: "rgba", type: "uint8", mag: "nearest", min: "nearest" };
      function t(a, y, f, _, b) {
        var w = a._gl;
        w.enable(w.SCISSOR_TEST), w.scissor(y, f, _, b), a.clear({ color: [0, 0, 0, 0], depth: 1 });
      }
      function d(a, y, f, _, b, w) {
        var T = w.key;
        f.drawCompleted || (function(L) {
          L.read({ x: 0, y: 0, width: 1, height: 1, data: r });
        }(a), f.drawCompleted = !0), function L(A) {
          var I = Math.min(_, b - A * _);
          A === 0 && (window.cancelAnimationFrame(f.currentRafs[T]), delete f.currentRafs[T], t(a, w.scissorX, w.scissorY, w.scissorWidth, w.viewBoxSize[1])), f.clearOnly || (w.count = 2 * I, w.offset = 2 * A * _, y(w), A * _ + I < b && (f.currentRafs[T] = window.requestAnimationFrame(function() {
            L(A + 1);
          })), f.drawCompleted = !1);
        }(0);
      }
      function u(a, y) {
        for (var f = new Array(256), _ = 0; _ < 256; _++)
          f[_] = a(_ / 255).concat(y);
        return f;
      }
      function o(a, y) {
        return (a >>> 8 * y) % 256 / 255;
      }
      function h(a, y, f) {
        for (var _ = new Array(8 * y), b = 0, w = 0; w < y; w++)
          for (var T = 0; T < 2; T++)
            for (var L = 0; L < 4; L++) {
              var A = 4 * a + L, I = f[64 * w + A];
              A === 63 && T === 0 && (I *= -1), _[b++] = I;
            }
        return _;
      }
      function l(a) {
        var y = "0" + a;
        return y.substr(y.length - 2);
      }
      function i(a) {
        return a < x ? "p" + l(a + 1) + "_" + l(a + 4) : "colors";
      }
      function p(a, y, f, _, b, w, T, L, A, I, P, S, E, R) {
        for (var z = [[], []], j = 0; j < 64; j++)
          z[0][j] = j === b ? 1 : 0, z[1][j] = j === w ? 1 : 0;
        T *= R, L *= R, A *= R, I *= R;
        var H = a.lines.canvasOverdrag * R, Y = a.domain, J = a.canvasWidth * R, W = a.canvasHeight * R, Z = a.pad.l * R, re = a.pad.b * R, V = a.layoutHeight * R, B = a.layoutWidth * R, U = a.deselectedLines.color, ee = a.deselectedLines.opacity;
        return e.extendFlat({ key: P, resolution: [J, W], viewBoxPos: [T + H, L], viewBoxSize: [A, I], i0: b, i1: w, dim0A: z[0].slice(0, 16), dim0B: z[0].slice(16, 32), dim0C: z[0].slice(32, 48), dim0D: z[0].slice(48, 64), dim1A: z[1].slice(0, 16), dim1B: z[1].slice(16, 32), dim1C: z[1].slice(32, 48), dim1D: z[1].slice(48, 64), drwLayer: S, contextColor: [U[0] / 255, U[1] / 255, U[2] / 255, ee !== "auto" ? U[3] * ee : Math.max(1 / 255, Math.pow(1 / a.lines.color.length, 1 / 3))], scissorX: (_ === y ? 0 : T + H) + (Z - H) + B * Y.x[0], scissorWidth: (_ === f ? J - T + H : A + 0.5) + (_ === y ? T + H : 0), scissorY: L + re + V * Y.y[0], scissorHeight: I, viewportX: Z - H + B * Y.x[0], viewportY: re + V * Y.y[0], viewportWidth: J, viewportHeight: W }, E);
      }
      function c(a) {
        var y = Math.max(0, Math.floor(2047 * a[0]), 0), f = Math.min(2047, Math.ceil(2047 * a[1]), 2047);
        return [Math.min(y, f), Math.max(y, f)];
      }
      Q.exports = function(a, y) {
        var f, _, b, w, T, L = y.context, A = y.pick, I = y.regl, P = I._gl, S = P.getParameter(P.ALIASED_LINE_WIDTH_RANGE), E = Math.max(S[0], Math.min(S[1], y.viewModel.plotGlPixelRatio)), R = { currentRafs: {}, drawCompleted: !0, clearOnly: !1 }, z = function(W) {
          for (var Z = {}, re = 0; re <= x; re += 4)
            Z[i(re)] = W.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) });
          return Z;
        }(I), j = I.texture(s), H = [];
        J(y);
        var Y = I({ profile: !1, blend: { enable: L, func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: 1, dstAlpha: 1 }, equation: { rgb: "add", alpha: "add" }, color: [0, 0, 0, 0] }, depth: { enable: !L, mask: !0, func: "less", range: [0, 1] }, cull: { enable: !0, face: "back" }, scissor: { enable: !0, box: { x: I.prop("scissorX"), y: I.prop("scissorY"), width: I.prop("scissorWidth"), height: I.prop("scissorHeight") } }, viewport: { x: I.prop("viewportX"), y: I.prop("viewportY"), width: I.prop("viewportWidth"), height: I.prop("viewportHeight") }, dither: !1, vert: g, frag: k, primitive: "lines", lineWidth: E, attributes: z, uniforms: { resolution: I.prop("resolution"), viewBoxPos: I.prop("viewBoxPos"), viewBoxSize: I.prop("viewBoxSize"), dim0A: I.prop("dim0A"), dim1A: I.prop("dim1A"), dim0B: I.prop("dim0B"), dim1B: I.prop("dim1B"), dim0C: I.prop("dim0C"), dim1C: I.prop("dim1C"), dim0D: I.prop("dim0D"), dim1D: I.prop("dim1D"), loA: I.prop("loA"), hiA: I.prop("hiA"), loB: I.prop("loB"), hiB: I.prop("hiB"), loC: I.prop("loC"), hiC: I.prop("hiC"), loD: I.prop("loD"), hiD: I.prop("hiD"), palette: j, contextColor: I.prop("contextColor"), maskTexture: I.prop("maskTexture"), drwLayer: I.prop("drwLayer"), maskHeight: I.prop("maskHeight") }, offset: I.prop("offset"), count: I.prop("count") });
        function J(W) {
          f = W.model, _ = W.viewModel, b = _.dimensions.slice(), w = b[0] ? b[0].values.length : 0;
          var Z = f.lines, re = A ? Z.color.map(function(B, U) {
            return U / Z.color.length;
          }) : Z.color, V = function(B, U, ee) {
            for (var N, K = new Array(B * (x + 4)), X = 0, te = 0; te < B; te++) {
              for (var ie = 0; ie < x; ie++)
                K[X++] = ie < U.length ? U[ie].paddedUnitValues[te] : 0.5;
              K[X++] = o(te, 2), K[X++] = o(te, 1), K[X++] = o(te, 0), K[X++] = (N = ee[te], Math.max(1e-6, Math.min(0.999999, N)));
            }
            return K;
          }(w, b, re);
          (function(B, U, ee) {
            for (var N = 0; N <= x; N += 4)
              B[i(N)](h(N / 4, U, ee));
          })(z, w, V), L || A || (j = I.texture(e.extendFlat({ data: u(f.unitToColor, 255) }, s)));
        }
        return { render: function(W, Z, re) {
          var V, B, U, ee = W.length, N = 1 / 0, K = -1 / 0;
          for (V = 0; V < ee; V++)
            W[V].dim0.canvasX < N && (N = W[V].dim0.canvasX, B = V), W[V].dim1.canvasX > K && (K = W[V].dim1.canvasX, U = V);
          ee === 0 && t(I, 0, 0, f.canvasWidth, f.canvasHeight);
          var X = function(ge) {
            var we, se, de, Te = [[], []];
            for (de = 0; de < 64; de++) {
              var Ee = !ge && de < b.length ? b[de].brush.filter.getBounds() : [-1 / 0, 1 / 0];
              Te[0][de] = Ee[0], Te[1][de] = Ee[1];
            }
            var Me = new Array(16384);
            for (we = 0; we < 16384; we++)
              Me[we] = 255;
            if (!ge)
              for (we = 0; we < b.length; we++) {
                var ze = we % 8, Ie = (we - ze) / 8, Oe = Math.pow(2, ze), Ze = b[we].brush.filter.get();
                if (!(Ze.length < 2)) {
                  var Fe = c(Ze[0])[1];
                  for (se = 1; se < Ze.length; se++) {
                    var Pe = c(Ze[se]);
                    for (de = Fe + 1; de < Pe[0]; de++)
                      Me[8 * de + Ie] &= ~Oe;
                    Fe = Math.max(Fe, Pe[1]);
                  }
                }
              }
            var De = { shape: [8, 2048], format: "alpha", type: "uint8", mag: "nearest", min: "nearest", data: Me };
            return T ? T(De) : T = I.texture(De), { maskTexture: T, maskHeight: 2048, loA: Te[0].slice(0, 16), loB: Te[0].slice(16, 32), loC: Te[0].slice(32, 48), loD: Te[0].slice(48, 64), hiA: Te[1].slice(0, 16), hiB: Te[1].slice(16, 32), hiC: Te[1].slice(32, 48), hiD: Te[1].slice(48, 64) };
          }(L);
          for (V = 0; V < ee; V++) {
            var te = W[V], ie = te.dim0.crossfilterDimensionIndex, le = te.dim1.crossfilterDimensionIndex, oe = te.canvasX, ve = te.canvasY, ue = oe + te.panelSizeX, ye = te.plotGlPixelRatio;
            if (Z || !H[ie] || H[ie][0] !== oe || H[ie][1] !== ue) {
              H[ie] = [oe, ue];
              var Ae = p(f, B, U, V, ie, le, oe, ve, te.panelSizeX, te.panelSizeY, te.dim0.crossfilterDimensionIndex, L ? 0 : A ? 2 : 1, X, ye);
              R.clearOnly = re;
              var pe = Z ? f.lines.blockLineCount : w;
              d(I, Y, R, pe, w, Ae);
            }
          }
        }, readPixel: function(W, Z) {
          return I.read({ x: W, y: Z, width: 1, height: 1, data: n }), n;
        }, readPixels: function(W, Z, re, V) {
          var B = new Uint8Array(4 * re * V);
          return I.read({ x: W, y: Z, width: re, height: V, data: B }), B;
        }, destroy: function() {
          for (var W in a.style["pointer-events"] = "none", j.destroy(), T && T.destroy(), z)
            z[W].destroy();
        }, update: J };
      };
    }, { "../../lib": 515, "./constants": 902, glslify: 227 }], 907: [function(v, Q, $) {
      Q.exports = function(m, g, k, x) {
        var e, r;
        for (x || (x = 1 / 0), e = 0; e < g.length; e++)
          (r = g[e]).visible && (x = Math.min(x, r[k].length));
        for (x === 1 / 0 && (x = 0), m._length = x, e = 0; e < g.length; e++)
          (r = g[e]).visible && (r._length = x);
        return x;
      };
    }, {}], 908: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = g.numberFormat, x = v("color-rgba"), e = v("../../plots/cartesian/axes"), r = g.strRotate, n = g.strTranslate, s = v("../../lib/svg_text_utils"), t = v("../../components/drawing"), d = v("../../components/colorscale"), u = v("../../lib/gup"), o = u.keyFun, h = u.repeat, l = u.unwrap, i = v("./helpers"), p = v("./constants"), c = v("./axisbrush"), a = v("./lines");
      function y(H, Y, J) {
        return g.aggNums(H, null, Y, J);
      }
      function f(H, Y) {
        return b(y(Math.min, H, Y), y(Math.max, H, Y));
      }
      function _(H) {
        var Y = H.range;
        return Y ? b(Y[0], Y[1]) : f(H.values, H._length);
      }
      function b(H, Y) {
        return !isNaN(H) && isFinite(H) || (H = 0), !isNaN(Y) && isFinite(Y) || (Y = 0), H === Y && (H === 0 ? (H -= 1, Y += 1) : (H *= 0.9, Y *= 1.1)), [H, Y];
      }
      function w(H, Y, J, W, Z) {
        var re, V, B = _(J);
        return W ? m.scale.ordinal().domain(W.map((re = k(J.tickformat), V = Z, V ? function(U, ee) {
          var N = V[ee];
          return N == null ? re(U) : N;
        } : re))).range(W.map(function(U) {
          var ee = (U - B[0]) / (B[1] - B[0]);
          return H - Y + ee * (2 * Y - H);
        })) : m.scale.linear().domain(B).range([H - Y, Y]);
      }
      function T(H) {
        if (H.tickvals) {
          var Y = _(H);
          return m.scale.ordinal().domain(H.tickvals).range(H.tickvals.map(function(J) {
            return (J - Y[0]) / (Y[1] - Y[0]);
          }));
        }
      }
      function L(H) {
        var Y = H.map(function(Z) {
          return Z[0];
        }), J = H.map(function(Z) {
          var re = x(Z[1]);
          return m.rgb("rgb(" + re[0] + "," + re[1] + "," + re[2] + ")");
        }), W = "rgb".split("").map(function(Z) {
          return m.scale.linear().clamp(!0).domain(Y).range(J.map((re = Z, function(V) {
            return V[re];
          })));
          var re;
        });
        return function(Z) {
          return W.map(function(re) {
            return re(Z);
          });
        };
      }
      function A(H) {
        return H.dimensions.some(function(Y) {
          return Y.brush.filterSpecified;
        });
      }
      function I(H, Y, J) {
        var W = l(Y), Z = W.trace, re = i.convertTypedArray(W.lineColor), V = Z.line, B = { color: x(Z.unselected.line.color), opacity: Z.unselected.line.opacity }, U = d.extractOpts(V), ee = U.reversescale ? d.flipScale(W.cscale) : W.cscale, N = Z.domain, K = Z.dimensions, X = H.width, te = Z.labelangle, ie = Z.labelside, le = Z.labelfont, oe = Z.tickfont, ve = Z.rangefont, ue = g.extendDeepNoArrays({}, V, { color: re.map(m.scale.linear().domain(_({ values: re, range: [U.min, U.max], _length: Z._length }))), blockLineCount: p.blockLineCount, canvasOverdrag: p.overdrag * p.canvasPixelRatio }), ye = Math.floor(X * (N.x[1] - N.x[0])), Ae = Math.floor(H.height * (N.y[1] - N.y[0])), pe = H.margin || { l: 80, r: 80, t: 100, b: 80 }, ge = ye, we = Ae;
        return { key: J, colCount: K.filter(i.isVisible).length, dimensions: K, tickDistance: p.tickDistance, unitToColor: L(ee), lines: ue, deselectedLines: B, labelAngle: te, labelSide: ie, labelFont: le, tickFont: oe, rangeFont: ve, layoutWidth: X, layoutHeight: H.height, domain: N, translateX: N.x[0] * X, translateY: H.height - N.y[1] * H.height, pad: pe, canvasWidth: ge * p.canvasPixelRatio + 2 * ue.canvasOverdrag, canvasHeight: we * p.canvasPixelRatio, width: ge, height: we, canvasPixelRatio: p.canvasPixelRatio };
      }
      function P(H, Y, J) {
        var W = J.width, Z = J.height, re = J.dimensions, V = J.canvasPixelRatio, B = function(X) {
          return W * X / Math.max(1, J.colCount - 1);
        }, U = p.verticalPadding / Z, ee = function(X, te) {
          return m.scale.linear().range([te, X - te]);
        }(Z, p.verticalPadding), N = { key: J.key, xScale: B, model: J, inBrushDrag: !1 }, K = {};
        return N.dimensions = re.filter(i.isVisible).map(function(X, te) {
          var ie = function(Me, ze) {
            return m.scale.linear().domain(_(Me)).range([ze, 1 - ze]);
          }(X, U), le = K[X.label];
          K[X.label] = (le || 0) + 1;
          var oe = X.label + (le ? "__" + le : ""), ve = X.constraintrange, ue = ve && ve.length;
          ue && !Array.isArray(ve[0]) && (ve = [ve]);
          var ye = ue ? ve.map(function(Me) {
            return Me.map(ie);
          }) : [[-1 / 0, 1 / 0]], Ae = X.values;
          Ae.length > X._length && (Ae = Ae.slice(0, X._length));
          var pe, ge = X.tickvals;
          function we(Me, ze) {
            return { val: Me, text: pe[ze] };
          }
          function se(Me, ze) {
            return Me.val - ze.val;
          }
          if (Array.isArray(ge) && ge.length) {
            pe = X.ticktext, Array.isArray(pe) && pe.length ? pe.length > ge.length ? pe = pe.slice(0, ge.length) : ge.length > pe.length && (ge = ge.slice(0, pe.length)) : pe = ge.map(k(X.tickformat));
            for (var de = 1; de < ge.length; de++)
              if (ge[de] < ge[de - 1]) {
                for (var Te = ge.map(we).sort(se), Ee = 0; Ee < ge.length; Ee++)
                  ge[Ee] = Te[Ee].val, pe[Ee] = Te[Ee].text;
                break;
              }
          } else
            ge = void 0;
          return Ae = i.convertTypedArray(Ae), { key: oe, label: X.label, tickFormat: X.tickformat, tickvals: ge, ticktext: pe, ordinal: i.isOrdinal(X), multiselect: X.multiselect, xIndex: te, crossfilterDimensionIndex: te, visibleIndex: X._index, height: Z, values: Ae, paddedUnitValues: Ae.map(ie), unitTickvals: ge && ge.map(ie), xScale: B, x: B(te), canvasX: B(te) * V, unitToPaddedPx: ee, domainScale: w(Z, p.verticalPadding, X, ge, pe), ordinalScale: T(X), parent: N, model: J, brush: c.makeBrush(H, ue, ye, function() {
            H.linePickActive(!1);
          }, function() {
            var Me = N;
            Me.focusLayer && Me.focusLayer.render(Me.panels, !0);
            var ze = A(Me);
            !H.contextShown() && ze ? (Me.contextLayer && Me.contextLayer.render(Me.panels, !0), H.contextShown(!0)) : H.contextShown() && !ze && (Me.contextLayer && Me.contextLayer.render(Me.panels, !0, !0), H.contextShown(!1));
          }, function(Me) {
            if (N.focusLayer.render(N.panels, !0), N.pickLayer && N.pickLayer.render(N.panels, !0), H.linePickActive(!0), Y && Y.filterChanged) {
              var ze = ie.invert, Ie = Me.map(function(Oe) {
                return Oe.map(ze).sort(g.sorterAsc);
              }).sort(function(Oe, Ze) {
                return Oe[0] - Ze[0];
              });
              Y.filterChanged(N.key, X._index, Ie);
            }
          }) };
        }), N;
      }
      function S(H) {
        H.classed(p.cn.axisExtentText, !0).attr("text-anchor", "middle").style("cursor", "default");
      }
      function E(H, Y) {
        var J = Y === "top" ? 1 : -1, W = H * Math.PI / 180;
        return { dir: J, dx: Math.sin(W), dy: Math.cos(W), degrees: H };
      }
      function R(H, Y, J) {
        for (var W = Y.panels || (Y.panels = []), Z = H.data(), re = 0; re < Z.length - 1; re++) {
          var V = W[re] || (W[re] = {}), B = Z[re], U = Z[re + 1];
          V.dim0 = B, V.dim1 = U, V.canvasX = B.canvasX, V.panelSizeX = U.canvasX - B.canvasX, V.panelSizeY = Y.model.canvasHeight, V.y = 0, V.canvasY = 0, V.plotGlPixelRatio = J;
        }
      }
      function z(H, Y) {
        return e.tickText(H._ax, Y, !1).text;
      }
      function j(H, Y) {
        if (H.ordinal)
          return "";
        var J = H.domainScale.domain(), W = J[Y ? J.length - 1 : 0];
        return z(H.model.dimensions[H.visibleIndex], W);
      }
      Q.exports = function(H, Y, J, W) {
        var Z = H._context.staticPlot, re = H._fullLayout, V = re._toppaper, B = re._glcontainer, U = H._context.plotGlPixelRatio, ee = H._fullLayout.paper_bgcolor;
        (function(Me) {
          for (var ze = 0; ze < Me.length; ze++)
            for (var Ie = 0; Ie < Me[ze].length; Ie++)
              for (var Oe = Me[ze][Ie].trace, Ze = Oe.dimensions, Fe = 0; Fe < Ze.length; Fe++) {
                var Pe = Ze[Fe].values, De = Ze[Fe]._ax;
                De && (De.range ? De.range = b(De.range[0], De.range[1]) : De.range = f(Pe, Oe._length), De.dtick || (De.dtick = 0.01 * (Math.abs(De.range[1] - De.range[0]) || 1)), De.tickformat = Ze[Fe].tickformat, e.calcTicks(De), De.cleanRange());
              }
        })(Y);
        var N, K, X = (N = !0, K = !1, { linePickActive: function(Me) {
          return arguments.length ? N = !!Me : N;
        }, contextShown: function(Me) {
          return arguments.length ? K = !!Me : K;
        } }), te = Y.filter(function(Me) {
          return l(Me).trace.visible;
        }).map(I.bind(0, J)).map(P.bind(0, X, W));
        B.each(function(Me, ze) {
          return g.extendFlat(Me, te[ze]);
        });
        var ie = B.selectAll(".gl-canvas").each(function(Me) {
          Me.viewModel = te[0], Me.viewModel.plotGlPixelRatio = U, Me.viewModel.paperColor = ee, Me.model = Me.viewModel ? Me.viewModel.model : null;
        }), le = null;
        ie.filter(function(Me) {
          return Me.pick;
        }).style("pointer-events", Z ? "none" : "auto").on("mousemove", function(Me) {
          if (X.linePickActive() && Me.lineLayer && W && W.hover) {
            var ze = m.event, Ie = this.width, Oe = this.height, Ze = m.mouse(this), Fe = Ze[0], Pe = Ze[1];
            if (Fe < 0 || Pe < 0 || Fe >= Ie || Pe >= Oe)
              return;
            var De = Me.lineLayer.readPixel(Fe, Oe - 1 - Pe), Ge = De[3] !== 0, Qe = Ge ? De[2] + 256 * (De[1] + 256 * De[0]) : null, ot = { x: Fe, y: Pe, clientX: ze.clientX, clientY: ze.clientY, dataIndex: Me.model.key, curveNumber: Qe };
            Qe !== le && (Ge ? W.hover(ot) : W.unhover && W.unhover(ot), le = Qe);
          }
        }), ie.style("opacity", function(Me) {
          return Me.pick ? 0 : 1;
        }), V.style("background", "rgba(255, 255, 255, 0)");
        var oe = V.selectAll("." + p.cn.parcoords).data(te, o);
        oe.exit().remove(), oe.enter().append("g").classed(p.cn.parcoords, !0).style("shape-rendering", "crispEdges").style("pointer-events", "none"), oe.attr("transform", function(Me) {
          return n(Me.model.translateX, Me.model.translateY);
        });
        var ve = oe.selectAll("." + p.cn.parcoordsControlView).data(h, o);
        ve.enter().append("g").classed(p.cn.parcoordsControlView, !0), ve.attr("transform", function(Me) {
          return n(Me.model.pad.l, Me.model.pad.t);
        });
        var ue = ve.selectAll("." + p.cn.yAxis).data(function(Me) {
          return Me.dimensions;
        }, o);
        ue.enter().append("g").classed(p.cn.yAxis, !0), ve.each(function(Me) {
          R(ue, Me, U);
        }), ie.each(function(Me) {
          if (Me.viewModel) {
            !Me.lineLayer || W ? Me.lineLayer = a(this, Me) : Me.lineLayer.update(Me), (Me.key || Me.key === 0) && (Me.viewModel[Me.key] = Me.lineLayer);
            var ze = !Me.context || W;
            Me.lineLayer.render(Me.viewModel.panels, ze);
          }
        }), ue.attr("transform", function(Me) {
          return n(Me.xScale(Me.xIndex), 0);
        }), ue.call(m.behavior.drag().origin(function(Me) {
          return Me;
        }).on("drag", function(Me) {
          var ze = Me.parent;
          X.linePickActive(!1), Me.x = Math.max(-p.overdrag, Math.min(Me.model.width + p.overdrag, m.event.x)), Me.canvasX = Me.x * Me.model.canvasPixelRatio, ue.sort(function(Ie, Oe) {
            return Ie.x - Oe.x;
          }).each(function(Ie, Oe) {
            Ie.xIndex = Oe, Ie.x = Me === Ie ? Ie.x : Ie.xScale(Ie.xIndex), Ie.canvasX = Ie.x * Ie.model.canvasPixelRatio;
          }), R(ue, ze, U), ue.filter(function(Ie) {
            return Math.abs(Me.xIndex - Ie.xIndex) !== 0;
          }).attr("transform", function(Ie) {
            return n(Ie.xScale(Ie.xIndex), 0);
          }), m.select(this).attr("transform", n(Me.x, 0)), ue.each(function(Ie, Oe, Ze) {
            Ze === Me.parent.key && (ze.dimensions[Oe] = Ie);
          }), ze.contextLayer && ze.contextLayer.render(ze.panels, !1, !A(ze)), ze.focusLayer.render && ze.focusLayer.render(ze.panels);
        }).on("dragend", function(Me) {
          var ze = Me.parent;
          Me.x = Me.xScale(Me.xIndex), Me.canvasX = Me.x * Me.model.canvasPixelRatio, R(ue, ze, U), m.select(this).attr("transform", function(Ie) {
            return n(Ie.x, 0);
          }), ze.contextLayer && ze.contextLayer.render(ze.panels, !1, !A(ze)), ze.focusLayer && ze.focusLayer.render(ze.panels), ze.pickLayer && ze.pickLayer.render(ze.panels, !0), X.linePickActive(!0), W && W.axesMoved && W.axesMoved(ze.key, ze.dimensions.map(function(Ie) {
            return Ie.crossfilterDimensionIndex;
          }));
        })), ue.exit().remove();
        var ye = ue.selectAll("." + p.cn.axisOverlays).data(h, o);
        ye.enter().append("g").classed(p.cn.axisOverlays, !0), ye.selectAll("." + p.cn.axis).remove();
        var Ae = ye.selectAll("." + p.cn.axis).data(h, o);
        Ae.enter().append("g").classed(p.cn.axis, !0), Ae.each(function(Me) {
          var ze = Me.model.height / Me.model.tickDistance, Ie = Me.domainScale, Oe = Ie.domain();
          m.select(this).call(m.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(ze, Me.tickFormat).tickValues(Me.ordinal ? Oe : null).tickFormat(function(Ze) {
            return i.isOrdinal(Me) ? Ze : z(Me.model.dimensions[Me.visibleIndex], Ze);
          }).scale(Ie)), t.font(Ae.selectAll("text"), Me.model.tickFont);
        }), Ae.selectAll(".domain, .tick>line").attr("fill", "none").attr("stroke", "black").attr("stroke-opacity", 0.25).attr("stroke-width", "1px"), Ae.selectAll("text").style("text-shadow", s.makeTextShadow(ee)).style("cursor", "default");
        var pe = ye.selectAll("." + p.cn.axisHeading).data(h, o);
        pe.enter().append("g").classed(p.cn.axisHeading, !0);
        var ge = pe.selectAll("." + p.cn.axisTitle).data(h, o);
        ge.enter().append("text").classed(p.cn.axisTitle, !0).attr("text-anchor", "middle").style("cursor", "ew-resize").style("pointer-events", Z ? "none" : "auto"), ge.text(function(Me) {
          return Me.label;
        }).each(function(Me) {
          var ze = m.select(this);
          t.font(ze, Me.model.labelFont), s.convertToTspans(ze, H);
        }).attr("transform", function(Me) {
          var ze = E(Me.model.labelAngle, Me.model.labelSide), Ie = p.axisTitleOffset;
          return (ze.dir > 0 ? "" : n(0, 2 * Ie + Me.model.height)) + r(ze.degrees) + n(-Ie * ze.dx, -Ie * ze.dy);
        }).attr("text-anchor", function(Me) {
          var ze = E(Me.model.labelAngle, Me.model.labelSide);
          return 2 * Math.abs(ze.dx) > Math.abs(ze.dy) ? ze.dir * ze.dx < 0 ? "start" : "end" : "middle";
        });
        var we = ye.selectAll("." + p.cn.axisExtent).data(h, o);
        we.enter().append("g").classed(p.cn.axisExtent, !0);
        var se = we.selectAll("." + p.cn.axisExtentTop).data(h, o);
        se.enter().append("g").classed(p.cn.axisExtentTop, !0), se.attr("transform", n(0, -p.axisExtentOffset));
        var de = se.selectAll("." + p.cn.axisExtentTopText).data(h, o);
        de.enter().append("text").classed(p.cn.axisExtentTopText, !0).call(S), de.text(function(Me) {
          return j(Me, !0);
        }).each(function(Me) {
          t.font(m.select(this), Me.model.rangeFont);
        });
        var Te = we.selectAll("." + p.cn.axisExtentBottom).data(h, o);
        Te.enter().append("g").classed(p.cn.axisExtentBottom, !0), Te.attr("transform", function(Me) {
          return n(0, Me.model.height + p.axisExtentOffset);
        });
        var Ee = Te.selectAll("." + p.cn.axisExtentBottomText).data(h, o);
        Ee.enter().append("text").classed(p.cn.axisExtentBottomText, !0).attr("dy", "0.75em").call(S), Ee.text(function(Me) {
          return j(Me, !1);
        }).each(function(Me) {
          t.font(m.select(this), Me.model.rangeFont);
        }), c.ensureAxisBrush(ye, ee, H);
      };
    }, { "../../components/colorscale": 379, "../../components/drawing": 389, "../../lib": 515, "../../lib/gup": 512, "../../lib/svg_text_utils": 541, "../../plots/cartesian/axes": 566, "./axisbrush": 898, "./constants": 902, "./helpers": 904, "./lines": 906, "@plotly/d3": 58, "color-rgba": 91 }], 909: [function(v, Q, $) {
      var m = v("./parcoords"), g = v("../../lib/prepare_regl"), k = v("./helpers").isVisible, x = {};
      function e(r, n, s) {
        var t = n.indexOf(s), d = r.indexOf(t);
        return d === -1 && (d += n.length), d;
      }
      (Q.exports = function(r, n) {
        var s = r._fullLayout;
        if (g(r, [], x)) {
          var t = {}, d = {}, u = {}, o = {}, h = s._size;
          n.forEach(function(l, i) {
            var p = l[0].trace;
            u[i] = p.index;
            var c = o[i] = p._fullInput.index;
            t[i] = r.data[c].dimensions, d[i] = r.data[c].dimensions.slice();
          }), m(r, n, { width: h.w, height: h.h, margin: { t: h.t, r: h.r, b: h.b, l: h.l } }, { filterChanged: function(l, i, p) {
            var c = d[l][i], a = p.map(function(T) {
              return T.slice();
            }), y = "dimensions[" + i + "].constraintrange", f = s._tracePreGUI[r._fullData[u[l]]._fullInput.uid];
            if (f[y] === void 0) {
              var _ = c.constraintrange;
              f[y] = _ || null;
            }
            var b = r._fullData[u[l]].dimensions[i];
            a.length ? (a.length === 1 && (a = a[0]), c.constraintrange = a, b.constraintrange = a.slice(), a = [a]) : (delete c.constraintrange, delete b.constraintrange, a = null);
            var w = {};
            w[y] = a, r.emit("plotly_restyle", [w, [o[l]]]);
          }, hover: function(l) {
            r.emit("plotly_hover", l);
          }, unhover: function(l) {
            r.emit("plotly_unhover", l);
          }, axesMoved: function(l, i) {
            var p = function(c, a) {
              return function(y, f) {
                return e(c, a, y) - e(c, a, f);
              };
            }(i, d[l].filter(k));
            t[l].sort(p), d[l].filter(function(c) {
              return !k(c);
            }).sort(function(c) {
              return d[l].indexOf(c);
            }).forEach(function(c) {
              t[l].splice(t[l].indexOf(c), 1), t[l].splice(d[l].indexOf(c), 0, c);
            }), r.emit("plotly_restyle", [{ dimensions: [t[l]] }, [o[l]]]);
          } });
        }
      }).reglPrecompiled = x;
    }, { "../../lib/prepare_regl": 528, "./helpers": 904, "./parcoords": 908 }], 910: [function(v, Q, $) {
      var m = v("../../plots/attributes"), g = v("../../plots/domain").attributes, k = v("../../plots/font_attributes"), x = v("../../components/color/attributes"), e = v("../../plots/template_attributes").hovertemplateAttrs, r = v("../../plots/template_attributes").texttemplateAttrs, n = v("../../lib/extend").extendFlat, s = k({ editType: "plot", arrayOk: !0, colorEditType: "plot" });
      Q.exports = { labels: { valType: "data_array", editType: "calc" }, label0: { valType: "number", dflt: 0, editType: "calc" }, dlabel: { valType: "number", dflt: 1, editType: "calc" }, values: { valType: "data_array", editType: "calc" }, marker: { colors: { valType: "data_array", editType: "calc" }, line: { color: { valType: "color", dflt: x.defaultLine, arrayOk: !0, editType: "style" }, width: { valType: "number", min: 0, dflt: 0, arrayOk: !0, editType: "style" }, editType: "calc" }, editType: "calc" }, text: { valType: "data_array", editType: "plot" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "style" }, scalegroup: { valType: "string", dflt: "", editType: "calc" }, textinfo: { valType: "flaglist", flags: ["label", "text", "value", "percent"], extras: ["none"], editType: "calc" }, hoverinfo: n({}, m.hoverinfo, { flags: ["label", "text", "value", "percent", "name"] }), hovertemplate: e({}, { keys: ["label", "color", "value", "percent", "text"] }), texttemplate: r({ editType: "plot" }, { keys: ["label", "color", "value", "percent", "text"] }), textposition: { valType: "enumerated", values: ["inside", "outside", "auto", "none"], dflt: "auto", arrayOk: !0, editType: "plot" }, textfont: n({}, s, {}), insidetextorientation: { valType: "enumerated", values: ["horizontal", "radial", "tangential", "auto"], dflt: "auto", editType: "plot" }, insidetextfont: n({}, s, {}), outsidetextfont: n({}, s, {}), automargin: { valType: "boolean", dflt: !1, editType: "plot" }, title: { text: { valType: "string", dflt: "", editType: "plot" }, font: n({}, s, {}), position: { valType: "enumerated", values: ["top left", "top center", "top right", "middle center", "bottom left", "bottom center", "bottom right"], editType: "plot" }, editType: "plot" }, domain: g({ name: "pie", trace: !0, editType: "calc" }), hole: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" }, sort: { valType: "boolean", dflt: !0, editType: "calc" }, direction: { valType: "enumerated", values: ["clockwise", "counterclockwise"], dflt: "counterclockwise", editType: "calc" }, rotation: { valType: "angle", dflt: 0, editType: "calc" }, pull: { valType: "number", min: 0, max: 1, dflt: 0, arrayOk: !0, editType: "calc" }, _deprecated: { title: { valType: "string", dflt: "", editType: "calc" }, titlefont: n({}, s, {}), titleposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle center", "bottom left", "bottom center", "bottom right"], editType: "calc" } } };
    }, { "../../components/color/attributes": 366, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/domain": 593, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642 }], 911: [function(v, Q, $) {
      var m = v("../../plots/plots");
      $.name = "pie", $.plot = function(g, k, x, e) {
        m.plotBasePlot($.name, g, k, x, e);
      }, $.clean = function(g, k, x, e) {
        m.cleanBasePlot($.name, g, k, x, e);
      };
    }, { "../../plots/plots": 628 }], 912: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("tinycolor2"), k = v("../../components/color"), x = {};
      function e(n) {
        return function(s, t) {
          return !!s && !!(s = g(s)).isValid() && (s = k.addOpacity(s, s.getAlpha()), n[t] || (n[t] = s), s);
        };
      }
      function r(n, s) {
        var t, d = JSON.stringify(n), u = s[d];
        if (!u) {
          for (u = n.slice(), t = 0; t < n.length; t++)
            u.push(g(n[t]).lighten(20).toHexString());
          for (t = 0; t < n.length; t++)
            u.push(g(n[t]).darken(20).toHexString());
          s[d] = u;
        }
        return u;
      }
      Q.exports = { calc: function(n, s) {
        var t, d, u = [], o = n._fullLayout, h = o.hiddenlabels || [], l = s.labels, i = s.marker.colors || [], p = s.values, c = s._length, a = s._hasValues && c;
        if (s.dlabel)
          for (l = new Array(c), t = 0; t < c; t++)
            l[t] = String(s.label0 + t * s.dlabel);
        var y = {}, f = e(o["_" + s.type + "colormap"]), _ = 0, b = !1;
        for (t = 0; t < c; t++) {
          var w, T, L;
          if (a) {
            if (w = p[t], !m(w))
              continue;
            w = +w;
          } else
            w = 1;
          (T = l[t]) !== void 0 && T !== "" || (T = t);
          var A = y[T = String(T)];
          A === void 0 ? (y[T] = u.length, (L = h.indexOf(T) !== -1) || (_ += w), u.push({ v: w, label: T, color: f(i[t], T), i: t, pts: [t], hidden: L })) : (b = !0, (d = u[A]).v += w, d.pts.push(t), d.hidden || (_ += w), d.color === !1 && i[t] && (d.color = f(i[t], T)));
        }
        return u = u.filter(function(I) {
          return I.v >= 0;
        }), (s.type === "funnelarea" ? b : s.sort) && u.sort(function(I, P) {
          return P.v - I.v;
        }), u[0] && (u[0].vTotal = _), u;
      }, crossTraceCalc: function(n, s) {
        var t = (s || {}).type;
        t || (t = "pie");
        var d = n._fullLayout, u = n.calcdata, o = d[t + "colorway"], h = d["_" + t + "colormap"];
        d["extend" + t + "colors"] && (o = r(o, x));
        for (var l = 0, i = 0; i < u.length; i++) {
          var p = u[i];
          if (p[0].trace.type === t)
            for (var c = 0; c < p.length; c++) {
              var a = p[c];
              a.color === !1 && (h[a.label] ? a.color = h[a.label] : (h[a.label] = a.color = o[l % o.length], l++));
            }
        }
      }, makePullColorFn: e, generateExtendedColors: r };
    }, { "../../components/color": 367, "fast-isnumeric": 190, tinycolor2: 313 }], 913: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("./attributes"), x = v("../../plots/domain").defaults, e = v("../bar/defaults").handleText;
      function r(n, s) {
        var t = Array.isArray(n), d = g.isArrayOrTypedArray(s), u = Math.min(t ? n.length : 1 / 0, d ? s.length : 1 / 0);
        if (isFinite(u) || (u = 0), u && d) {
          for (var o, h = 0; h < u; h++) {
            var l = s[h];
            if (m(l) && l > 0) {
              o = !0;
              break;
            }
          }
          o || (u = 0);
        }
        return { hasLabels: t, hasValues: d, len: u };
      }
      Q.exports = { handleLabelsAndValues: r, supplyDefaults: function(n, s, t, d) {
        function u(f, _) {
          return g.coerce(n, s, k, f, _);
        }
        var o = r(u("labels"), u("values")), h = o.len;
        if (s._hasLabels = o.hasLabels, s._hasValues = o.hasValues, !s._hasLabels && s._hasValues && (u("label0"), u("dlabel")), h) {
          s._length = h, u("marker.line.width") && u("marker.line.color"), u("marker.colors"), u("scalegroup");
          var l, i = u("text"), p = u("texttemplate");
          if (p || (l = u("textinfo", Array.isArray(i) ? "text+percent" : "percent")), u("hovertext"), u("hovertemplate"), p || l && l !== "none") {
            var c = u("textposition");
            e(n, s, d, u, c, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), (Array.isArray(c) || c === "auto" || c === "outside") && u("automargin"), (c === "inside" || c === "auto" || Array.isArray(c)) && u("insidetextorientation");
          }
          x(s, d, u);
          var a = u("hole");
          if (u("title.text")) {
            var y = u("title.position", a ? "middle center" : "top center");
            a || y !== "middle center" || (s.title.position = "top center"), g.coerceFont(u, "title.font", d.font);
          }
          u("sort"), u("direction"), u("rotation"), u("pull");
        } else
          s.visible = !1;
      } };
    }, { "../../lib": 515, "../../plots/domain": 593, "../bar/defaults": 661, "./attributes": 910, "fast-isnumeric": 190 }], 914: [function(v, Q, $) {
      var m = v("../../components/fx/helpers").appendArrayMultiPointValues;
      Q.exports = function(g, k) {
        var x = { curveNumber: k.index, pointNumbers: g.pts, data: k._input, fullData: k, label: g.label, color: g.color, value: g.v, percent: g.percent, text: g.text, bbox: g.bbox, v: g.v };
        return g.pts.length === 1 && (x.pointNumber = x.i = g.pts[0]), m(x, k, g.pts), k.type === "funnelarea" && (delete x.v, delete x.i), x;
      };
    }, { "../../components/fx/helpers": 403 }], 915: [function(v, Q, $) {
      var m = v("../../lib");
      function g(k) {
        return k.indexOf("e") !== -1 ? k.replace(/[.]?0+e/, "e") : k.indexOf(".") !== -1 ? k.replace(/[.]?0+$/, "") : k;
      }
      $.formatPiePercent = function(k, x) {
        var e = g((100 * k).toPrecision(3));
        return m.numSeparate(e, x) + "%";
      }, $.formatPieValue = function(k, x) {
        var e = g(k.toPrecision(10));
        return m.numSeparate(e, x);
      }, $.getFirstFilled = function(k, x) {
        if (Array.isArray(k))
          for (var e = 0; e < x.length; e++) {
            var r = k[x[e]];
            if (r || r === 0 || r === "")
              return r;
          }
      }, $.castOption = function(k, x) {
        return Array.isArray(k) ? $.getFirstFilled(k, x) : k || void 0;
      }, $.getRotationAngle = function(k) {
        return (k === "auto" ? 0 : k) * Math.PI / 180;
      };
    }, { "../../lib": 515 }], 916: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults").supplyDefaults, supplyLayoutDefaults: v("./layout_defaults"), layoutAttributes: v("./layout_attributes"), calc: v("./calc").calc, crossTraceCalc: v("./calc").crossTraceCalc, plot: v("./plot").plot, style: v("./style"), styleOne: v("./style_one"), moduleType: "trace", name: "pie", basePlotModule: v("./base_plot"), categories: ["pie-like", "pie", "showLegend"], meta: {} };
    }, { "./attributes": 910, "./base_plot": 911, "./calc": 912, "./defaults": 913, "./layout_attributes": 917, "./layout_defaults": 918, "./plot": 919, "./style": 920, "./style_one": 921 }], 917: [function(v, Q, $) {
      Q.exports = { hiddenlabels: { valType: "data_array", editType: "calc" }, piecolorway: { valType: "colorlist", editType: "calc" }, extendpiecolors: { valType: "boolean", dflt: !0, editType: "calc" } };
    }, {}], 918: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x) {
        function e(r, n) {
          return m.coerce(k, x, g, r, n);
        }
        e("hiddenlabels"), e("piecolorway", x.colorway), e("extendpiecolors");
      };
    }, { "../../lib": 515, "./layout_attributes": 917 }], 919: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../plots/plots"), k = v("../../components/fx"), x = v("../../components/color"), e = v("../../components/drawing"), r = v("../../lib"), n = r.strScale, s = r.strTranslate, t = v("../../lib/svg_text_utils"), d = v("../bar/uniform_text"), u = d.recordMinTextSize, o = d.clearMinTextSize, h = v("../bar/constants").TEXTPAD, l = v("./helpers"), i = v("./event_data"), p = v("../../lib").isValidTextValue;
      function c(Y, J, W) {
        var Z = W[0], re = Z.cx, V = Z.cy, B = Z.trace, U = B.type === "funnelarea";
        "_hasHoverLabel" in B || (B._hasHoverLabel = !1), "_hasHoverEvent" in B || (B._hasHoverEvent = !1), Y.on("mouseover", function(ee) {
          var N = J._fullLayout, K = J._fullData[B.index];
          if (!J._dragging && N.hovermode !== !1) {
            var X = K.hoverinfo;
            if (Array.isArray(X) && (X = k.castHoverinfo({ hoverinfo: [l.castOption(X, ee.pts)], _module: B._module }, N, 0)), X === "all" && (X = "label+text+value+percent+name"), K.hovertemplate || X !== "none" && X !== "skip" && X) {
              var te = ee.rInscribed || 0, ie = re + ee.pxmid[0] * (1 - te), le = V + ee.pxmid[1] * (1 - te), oe = N.separators, ve = [];
              if (X && X.indexOf("label") !== -1 && ve.push(ee.label), ee.text = l.castOption(K.hovertext || K.text, ee.pts), X && X.indexOf("text") !== -1) {
                var ue = ee.text;
                r.isValidTextValue(ue) && ve.push(ue);
              }
              ee.value = ee.v, ee.valueLabel = l.formatPieValue(ee.v, oe), X && X.indexOf("value") !== -1 && ve.push(ee.valueLabel), ee.percent = ee.v / Z.vTotal, ee.percentLabel = l.formatPiePercent(ee.percent, oe), X && X.indexOf("percent") !== -1 && ve.push(ee.percentLabel);
              var ye = K.hoverlabel, Ae = ye.font, pe = [];
              k.loneHover({ trace: B, x0: ie - te * Z.r, x1: ie + te * Z.r, y: le, _x0: U ? re + ee.TL[0] : ie - te * Z.r, _x1: U ? re + ee.TR[0] : ie + te * Z.r, _y0: U ? V + ee.TL[1] : le - te * Z.r, _y1: U ? V + ee.BL[1] : le + te * Z.r, text: ve.join("<br>"), name: K.hovertemplate || X.indexOf("name") !== -1 ? K.name : void 0, idealAlign: ee.pxmid[0] < 0 ? "left" : "right", color: l.castOption(ye.bgcolor, ee.pts) || ee.color, borderColor: l.castOption(ye.bordercolor, ee.pts), fontFamily: l.castOption(Ae.family, ee.pts), fontSize: l.castOption(Ae.size, ee.pts), fontColor: l.castOption(Ae.color, ee.pts), nameLength: l.castOption(ye.namelength, ee.pts), textAlign: l.castOption(ye.align, ee.pts), hovertemplate: l.castOption(K.hovertemplate, ee.pts), hovertemplateLabels: ee, eventData: [i(ee, K)] }, { container: N._hoverlayer.node(), outerContainer: N._paper.node(), gd: J, inOut_bbox: pe }), ee.bbox = pe[0], B._hasHoverLabel = !0;
            }
            B._hasHoverEvent = !0, J.emit("plotly_hover", { points: [i(ee, K)], event: m.event });
          }
        }), Y.on("mouseout", function(ee) {
          var N = J._fullLayout, K = J._fullData[B.index], X = m.select(this).datum();
          B._hasHoverEvent && (ee.originalEvent = m.event, J.emit("plotly_unhover", { points: [i(X, K)], event: m.event }), B._hasHoverEvent = !1), B._hasHoverLabel && (k.loneUnhover(N._hoverlayer.node()), B._hasHoverLabel = !1);
        }), Y.on("click", function(ee) {
          var N = J._fullLayout, K = J._fullData[B.index];
          J._dragging || N.hovermode === !1 || (J._hoverdata = [i(ee, K)], k.click(J, m.event));
        });
      }
      function a(Y, J, W) {
        var Z = l.castOption(Y.insidetextfont.color, J.pts);
        !Z && Y._input.textfont && (Z = l.castOption(Y._input.textfont.color, J.pts));
        var re = l.castOption(Y.insidetextfont.family, J.pts) || l.castOption(Y.textfont.family, J.pts) || W.family, V = l.castOption(Y.insidetextfont.size, J.pts) || l.castOption(Y.textfont.size, J.pts) || W.size;
        return { color: Z || x.contrast(J.color), family: re, size: V };
      }
      function y(Y, J) {
        for (var W, Z, re = 0; re < Y.length; re++)
          if ((Z = (W = Y[re][0]).trace).title.text) {
            var V = Z.title.text;
            Z._meta && (V = r.templateString(V, Z._meta));
            var B = e.tester.append("text").attr("data-notex", 1).text(V).call(e.font, Z.title.font).call(t.convertToTspans, J), U = e.bBox(B.node(), !0);
            W.titleBox = { width: U.width, height: U.height }, B.remove();
          }
      }
      function f(Y, J, W) {
        var Z = W.r || J.rpx1, re = J.rInscribed;
        if (J.startangle === J.stopangle)
          return { rCenter: 1 - re, scale: 0, rotate: 0, textPosAngle: 0 };
        var V, B = J.ring, U = B === 1 && Math.abs(J.startangle - J.stopangle) === 2 * Math.PI, ee = J.halfangle, N = J.midangle, K = W.trace.insidetextorientation, X = K === "horizontal", te = K === "tangential", ie = K === "radial", le = K === "auto", oe = [];
        if (!le) {
          var ve, ue = function(se, de) {
            if (function(ze, Ie) {
              var Oe = ze.startangle, Ze = ze.stopangle;
              return Oe > Ie && Ie > Ze || Oe < Ie && Ie < Ze;
            }(J, se)) {
              var Te = Math.abs(se - J.startangle), Ee = Math.abs(se - J.stopangle), Me = Te < Ee ? Te : Ee;
              (V = de === "tan" ? b(Y, Z, B, Me, 0) : _(Y, Z, B, Me, Math.PI / 2)).textPosAngle = se, oe.push(V);
            }
          };
          if (X || te) {
            for (ve = 4; ve >= -4; ve -= 2)
              ue(Math.PI * ve, "tan");
            for (ve = 4; ve >= -4; ve -= 2)
              ue(Math.PI * (ve + 1), "tan");
          }
          if (X || ie) {
            for (ve = 4; ve >= -4; ve -= 2)
              ue(Math.PI * (ve + 1.5), "rad");
            for (ve = 4; ve >= -4; ve -= 2)
              ue(Math.PI * (ve + 0.5), "rad");
          }
        }
        if (U || le || X) {
          var ye = Math.sqrt(Y.width * Y.width + Y.height * Y.height);
          if ((V = { scale: re * Z * 2 / ye, rCenter: 1 - re, rotate: 0 }).textPosAngle = (J.startangle + J.stopangle) / 2, V.scale >= 1)
            return V;
          oe.push(V);
        }
        (le || ie) && ((V = _(Y, Z, B, ee, N)).textPosAngle = (J.startangle + J.stopangle) / 2, oe.push(V)), (le || te) && ((V = b(Y, Z, B, ee, N)).textPosAngle = (J.startangle + J.stopangle) / 2, oe.push(V));
        for (var Ae = 0, pe = 0, ge = 0; ge < oe.length; ge++) {
          var we = oe[ge].scale;
          if (pe < we && (pe = we, Ae = ge), !le && pe >= 1)
            break;
        }
        return oe[Ae];
      }
      function _(Y, J, W, Z, re) {
        J = Math.max(0, J - 2 * h);
        var V = Y.width / Y.height, B = L(V, Z, J, W);
        return { scale: 2 * B / Y.height, rCenter: w(V, B / J), rotate: T(re) };
      }
      function b(Y, J, W, Z, re) {
        J = Math.max(0, J - 2 * h);
        var V = Y.height / Y.width, B = L(V, Z, J, W);
        return { scale: 2 * B / Y.width, rCenter: w(V, B / J), rotate: T(re + Math.PI / 2) };
      }
      function w(Y, J) {
        return Math.cos(J) - Y * J;
      }
      function T(Y) {
        return (180 / Math.PI * Y + 720) % 180 - 90;
      }
      function L(Y, J, W, Z) {
        var re = Y + 1 / (2 * Math.tan(J));
        return W * Math.min(1 / (Math.sqrt(re * re + 0.5) + re), Z / (Math.sqrt(Y * Y + Z / 2) + Y));
      }
      function A(Y, J) {
        return Y.v !== J.vTotal || J.trace.hole ? Math.min(1 / (1 + 1 / Math.sin(Y.halfangle)), Y.ring / 2) : 1;
      }
      function I(Y, J) {
        var W = J.pxmid[0], Z = J.pxmid[1], re = Y.width / 2, V = Y.height / 2;
        return W < 0 && (re *= -1), Z < 0 && (V *= -1), { scale: 1, rCenter: 1, rotate: 0, x: re + Math.abs(V) * (re > 0 ? 1 : -1) / 2, y: V / (1 + W * W / (Z * Z)), outside: !0 };
      }
      function P(Y, J) {
        var W, Z, re, V = Y.trace, B = { x: Y.cx, y: Y.cy }, U = { tx: 0, ty: 0 };
        U.ty += V.title.font.size, re = E(V), V.title.position.indexOf("top") !== -1 ? (B.y -= (1 + re) * Y.r, U.ty -= Y.titleBox.height) : V.title.position.indexOf("bottom") !== -1 && (B.y += (1 + re) * Y.r);
        var ee, N, K = (ee = Y.r, N = Y.trace.aspectratio, ee / (N === void 0 ? 1 : N)), X = J.w * (V.domain.x[1] - V.domain.x[0]) / 2;
        return V.title.position.indexOf("left") !== -1 ? (X += K, B.x -= (1 + re) * K, U.tx += Y.titleBox.width / 2) : V.title.position.indexOf("center") !== -1 ? X *= 2 : V.title.position.indexOf("right") !== -1 && (X += K, B.x += (1 + re) * K, U.tx -= Y.titleBox.width / 2), W = X / Y.titleBox.width, Z = S(Y, J) / Y.titleBox.height, { x: B.x, y: B.y, scale: Math.min(W, Z), tx: U.tx, ty: U.ty };
      }
      function S(Y, J) {
        var W = Y.trace, Z = J.h * (W.domain.y[1] - W.domain.y[0]);
        return Math.min(Y.titleBox.height, Z / 2);
      }
      function E(Y) {
        var J, W = Y.pull;
        if (!W)
          return 0;
        if (Array.isArray(W))
          for (W = 0, J = 0; J < Y.pull.length; J++)
            Y.pull[J] > W && (W = Y.pull[J]);
        return W;
      }
      function R(Y, J) {
        for (var W = [], Z = 0; Z < Y.length; Z++) {
          var re = Y[Z][0], V = re.trace, B = V.domain, U = J.w * (B.x[1] - B.x[0]), ee = J.h * (B.y[1] - B.y[0]);
          V.title.text && V.title.position !== "middle center" && (ee -= S(re, J));
          var N = U / 2, K = ee / 2;
          V.type !== "funnelarea" || V.scalegroup || (K /= V.aspectratio), re.r = Math.min(N, K) / (1 + E(V)), re.cx = J.l + J.w * (V.domain.x[1] + V.domain.x[0]) / 2, re.cy = J.t + J.h * (1 - V.domain.y[0]) - ee / 2, V.title.text && V.title.position.indexOf("bottom") !== -1 && (re.cy -= S(re, J)), V.scalegroup && W.indexOf(V.scalegroup) === -1 && W.push(V.scalegroup);
        }
        (function(X, te) {
          for (var ie, le, oe, ve = 0; ve < te.length; ve++) {
            var ue = 1 / 0, ye = te[ve];
            for (le = 0; le < X.length; le++)
              if (ie = X[le][0], (oe = ie.trace).scalegroup === ye) {
                var Ae;
                if (oe.type === "pie")
                  Ae = ie.r * ie.r;
                else if (oe.type === "funnelarea") {
                  var pe, ge;
                  oe.aspectratio > 1 ? (pe = ie.r, ge = pe / oe.aspectratio) : (ge = ie.r, pe = ge * oe.aspectratio), pe *= (1 + oe.baseratio) / 2, Ae = pe * ge;
                }
                ue = Math.min(ue, Ae / ie.vTotal);
              }
            for (le = 0; le < X.length; le++)
              if (ie = X[le][0], (oe = ie.trace).scalegroup === ye) {
                var we = ue * ie.vTotal;
                oe.type === "funnelarea" && (we /= (1 + oe.baseratio) / 2, we /= oe.aspectratio), ie.r = Math.sqrt(we);
              }
          }
        })(Y, W);
      }
      function z(Y, J) {
        return [Y * Math.sin(J), -Y * Math.cos(J)];
      }
      function j(Y, J, W) {
        var Z = Y._fullLayout, re = W.trace, V = re.texttemplate, B = re.textinfo;
        if (!V && B && B !== "none") {
          var U, ee = B.split("+"), N = function(Ae) {
            return ee.indexOf(Ae) !== -1;
          }, K = N("label"), X = N("text"), te = N("value"), ie = N("percent"), le = Z.separators;
          if (U = K ? [J.label] : [], X) {
            var oe = l.getFirstFilled(re.text, J.pts);
            p(oe) && U.push(oe);
          }
          te && U.push(l.formatPieValue(J.v, le)), ie && U.push(l.formatPiePercent(J.v / W.vTotal, le)), J.text = U.join("<br>");
        }
        if (V) {
          var ve = r.castOption(re, J.i, "texttemplate");
          if (ve) {
            var ue = function(Ae) {
              return { label: Ae.label, value: Ae.v, valueLabel: l.formatPieValue(Ae.v, Z.separators), percent: Ae.v / W.vTotal, percentLabel: l.formatPiePercent(Ae.v / W.vTotal, Z.separators), color: Ae.color, text: Ae.text, customdata: r.castOption(re, Ae.i, "customdata") };
            }(J), ye = l.getFirstFilled(re.text, J.pts);
            (p(ye) || ye === "") && (ue.text = ye), J.text = r.texttemplateString(ve, ue, Y._fullLayout._d3locale, ue, re._meta || {});
          } else
            J.text = "";
        }
      }
      function H(Y, J) {
        var W = Y.rotate * Math.PI / 180, Z = Math.cos(W), re = Math.sin(W), V = (J.left + J.right) / 2, B = (J.top + J.bottom) / 2;
        Y.textX = V * Z - B * re, Y.textY = V * re + B * Z, Y.noCenter = !0;
      }
      Q.exports = { plot: function(Y, J) {
        var W = Y._context.staticPlot, Z = Y._fullLayout, re = Z._size;
        o("pie", Z), y(J, Y), R(J, re);
        var V = r.makeTraceGroups(Z._pielayer, J, "trace").each(function(B) {
          var U = m.select(this), ee = B[0], N = ee.trace;
          (function(K) {
            var X, te, ie, le = K[0], oe = le.r, ve = le.trace, ue = l.getRotationAngle(ve.rotation), ye = 2 * Math.PI / le.vTotal, Ae = "px0", pe = "px1";
            if (ve.direction === "counterclockwise") {
              for (X = 0; X < K.length && K[X].hidden; X++)
                ;
              if (X === K.length)
                return;
              ue += ye * K[X].v, ye *= -1, Ae = "px1", pe = "px0";
            }
            for (ie = z(oe, ue), X = 0; X < K.length; X++)
              (te = K[X]).hidden || (te[Ae] = ie, te.startangle = ue, ue += ye * te.v / 2, te.pxmid = z(oe, ue), te.midangle = ue, ue += ye * te.v / 2, ie = z(oe, ue), te.stopangle = ue, te[pe] = ie, te.largeArc = te.v > le.vTotal / 2 ? 1 : 0, te.halfangle = Math.PI * Math.min(te.v / le.vTotal, 0.5), te.ring = 1 - ve.hole, te.rInscribed = A(te, le));
          })(B), U.attr("stroke-linejoin", "round"), U.each(function() {
            var K = m.select(this).selectAll("g.slice").data(B);
            K.enter().append("g").classed("slice", !0), K.exit().remove();
            var X = [[[], []], [[], []]], te = !1;
            K.each(function(pe, ge) {
              if (pe.hidden)
                m.select(this).selectAll("path,g").remove();
              else {
                pe.pointNumber = pe.i, pe.curveNumber = N.index, X[pe.pxmid[1] < 0 ? 0 : 1][pe.pxmid[0] < 0 ? 0 : 1].push(pe);
                var we = ee.cx, se = ee.cy, de = m.select(this), Te = de.selectAll("path.surface").data([pe]);
                if (Te.enter().append("path").classed("surface", !0).style({ "pointer-events": W ? "none" : "all" }), de.call(c, Y, B), N.pull) {
                  var Ee = +l.castOption(N.pull, pe.pts) || 0;
                  Ee > 0 && (we += Ee * pe.pxmid[0], se += Ee * pe.pxmid[1]);
                }
                pe.cxFinal = we, pe.cyFinal = se;
                var Me = N.hole;
                if (pe.v === ee.vTotal) {
                  var ze = "M" + (we + pe.px0[0]) + "," + (se + pe.px0[1]) + Pe(pe.px0, pe.pxmid, !0, 1) + Pe(pe.pxmid, pe.px0, !0, 1) + "Z";
                  Me ? Te.attr("d", "M" + (we + Me * pe.px0[0]) + "," + (se + Me * pe.px0[1]) + Pe(pe.px0, pe.pxmid, !1, Me) + Pe(pe.pxmid, pe.px0, !1, Me) + "Z" + ze) : Te.attr("d", ze);
                } else {
                  var Ie = Pe(pe.px0, pe.px1, !0, 1);
                  if (Me) {
                    var Oe = 1 - Me;
                    Te.attr("d", "M" + (we + Me * pe.px1[0]) + "," + (se + Me * pe.px1[1]) + Pe(pe.px1, pe.px0, !1, Me) + "l" + Oe * pe.px0[0] + "," + Oe * pe.px0[1] + Ie + "Z");
                  } else
                    Te.attr("d", "M" + we + "," + se + "l" + pe.px0[0] + "," + pe.px0[1] + Ie + "Z");
                }
                j(Y, pe, ee);
                var Ze = l.castOption(N.textposition, pe.pts), Fe = de.selectAll("g.slicetext").data(pe.text && Ze !== "none" ? [0] : []);
                Fe.enter().append("g").classed("slicetext", !0), Fe.exit().remove(), Fe.each(function() {
                  var De = r.ensureSingle(m.select(this), "text", "", function(Ke) {
                    Ke.attr("data-notex", 1);
                  }), Ge = r.ensureUniformFontSize(Y, Ze === "outside" ? function(Ke, mt, Ft) {
                    var Vt = l.castOption(Ke.outsidetextfont.color, mt.pts) || l.castOption(Ke.textfont.color, mt.pts) || Ft.color, Xt = l.castOption(Ke.outsidetextfont.family, mt.pts) || l.castOption(Ke.textfont.family, mt.pts) || Ft.family, Gt = l.castOption(Ke.outsidetextfont.size, mt.pts) || l.castOption(Ke.textfont.size, mt.pts) || Ft.size;
                    return { color: Vt, family: Xt, size: Gt };
                  }(N, pe, Z.font) : a(N, pe, Z.font));
                  De.text(pe.text).attr({ class: "slicetext", transform: "", "text-anchor": "middle" }).call(e.font, Ge).call(t.convertToTspans, Y);
                  var Qe, ot = e.bBox(De.node());
                  if (Ze === "outside")
                    Qe = I(ot, pe);
                  else if (Qe = f(ot, pe, ee), Ze === "auto" && Qe.scale < 1) {
                    var vt = r.ensureUniformFontSize(Y, N.outsidetextfont);
                    De.call(e.font, vt), Qe = I(ot = e.bBox(De.node()), pe);
                  }
                  var bt = Qe.textPosAngle, yt = bt === void 0 ? pe.pxmid : z(ee.r, bt);
                  if (Qe.targetX = we + yt[0] * Qe.rCenter + (Qe.x || 0), Qe.targetY = se + yt[1] * Qe.rCenter + (Qe.y || 0), H(Qe, ot), Qe.outside) {
                    var tt = Qe.targetY;
                    pe.yLabelMin = tt - ot.height / 2, pe.yLabelMid = tt, pe.yLabelMax = tt + ot.height / 2, pe.labelExtraX = 0, pe.labelExtraY = 0, te = !0;
                  }
                  Qe.fontSize = Ge.size, u(N.type, Qe, Z), B[ge].transform = Qe, r.setTransormAndDisplay(De, Qe);
                });
              }
              function Pe(De, Ge, Qe, ot) {
                var vt = ot * (Ge[0] - De[0]), bt = ot * (Ge[1] - De[1]);
                return "a" + ot * ee.r + "," + ot * ee.r + " 0 " + pe.largeArc + (Qe ? " 1 " : " 0 ") + vt + "," + bt;
              }
            });
            var ie = m.select(this).selectAll("g.titletext").data(N.title.text ? [0] : []);
            if (ie.enter().append("g").classed("titletext", !0), ie.exit().remove(), ie.each(function() {
              var pe, ge = r.ensureSingle(m.select(this), "text", "", function(se) {
                se.attr("data-notex", 1);
              }), we = N.title.text;
              N._meta && (we = r.templateString(we, N._meta)), ge.text(we).attr({ class: "titletext", transform: "", "text-anchor": "middle" }).call(e.font, N.title.font).call(t.convertToTspans, Y), pe = N.title.position === "middle center" ? function(se) {
                var de = Math.sqrt(se.titleBox.width * se.titleBox.width + se.titleBox.height * se.titleBox.height);
                return { x: se.cx, y: se.cy, scale: se.trace.hole * se.r * 2 / de, tx: 0, ty: -se.titleBox.height / 2 + se.trace.title.font.size };
              }(ee) : P(ee, re), ge.attr("transform", s(pe.x, pe.y) + n(Math.min(1, pe.scale)) + s(pe.tx, pe.ty));
            }), te && function(pe, ge) {
              var we, se, de, Te, Ee, Me, ze, Ie, Oe, Ze, Fe, Pe, De;
              function Ge(bt, yt) {
                return bt.pxmid[1] - yt.pxmid[1];
              }
              function Qe(bt, yt) {
                return yt.pxmid[1] - bt.pxmid[1];
              }
              function ot(bt, yt) {
                yt || (yt = {});
                var tt, Ke, mt, Ft, Vt = yt.labelExtraY + (se ? yt.yLabelMax : yt.yLabelMin), Xt = se ? bt.yLabelMin : bt.yLabelMax, Gt = se ? bt.yLabelMax : bt.yLabelMin, nr = bt.cyFinal + Ee(bt.px0[1], bt.px1[1]), It = Vt - Xt;
                if (It * ze > 0 && (bt.labelExtraY = It), Array.isArray(ge.pull))
                  for (Ke = 0; Ke < Ze.length; Ke++)
                    (mt = Ze[Ke]) === bt || (l.castOption(ge.pull, bt.pts) || 0) >= (l.castOption(ge.pull, mt.pts) || 0) || ((bt.pxmid[1] - mt.pxmid[1]) * ze > 0 ? (It = mt.cyFinal + Ee(mt.px0[1], mt.px1[1]) - Xt - bt.labelExtraY) * ze > 0 && (bt.labelExtraY += It) : (Gt + bt.labelExtraY - nr) * ze > 0 && (tt = 3 * Me * Math.abs(Ke - Ze.indexOf(bt)), (Ft = mt.cxFinal + Te(mt.px0[0], mt.px1[0]) + tt - (bt.cxFinal + bt.pxmid[0]) - bt.labelExtraX) * Me > 0 && (bt.labelExtraX += Ft)));
              }
              for (se = 0; se < 2; se++)
                for (de = se ? Ge : Qe, Ee = se ? Math.max : Math.min, ze = se ? 1 : -1, we = 0; we < 2; we++) {
                  for (Te = we ? Math.max : Math.min, Me = we ? 1 : -1, (Ie = pe[se][we]).sort(de), Oe = pe[1 - se][we], Ze = Oe.concat(Ie), Pe = [], Fe = 0; Fe < Ie.length; Fe++)
                    Ie[Fe].yLabelMid !== void 0 && Pe.push(Ie[Fe]);
                  for (De = !1, Fe = 0; se && Fe < Oe.length; Fe++)
                    if (Oe[Fe].yLabelMid !== void 0) {
                      De = Oe[Fe];
                      break;
                    }
                  for (Fe = 0; Fe < Pe.length; Fe++) {
                    var vt = Fe && Pe[Fe - 1];
                    De && !Fe && (vt = De), ot(Pe[Fe], vt);
                  }
                }
            }(X, N), function(pe, ge) {
              pe.each(function(we) {
                var se = m.select(this);
                if (we.labelExtraX || we.labelExtraY) {
                  var de = se.select("g.slicetext text");
                  we.transform.targetX += we.labelExtraX, we.transform.targetY += we.labelExtraY, r.setTransormAndDisplay(de, we.transform);
                  var Te = we.cxFinal + we.pxmid[0], Ee = "M" + Te + "," + (we.cyFinal + we.pxmid[1]), Me = (we.yLabelMax - we.yLabelMin) * (we.pxmid[0] < 0 ? -1 : 1) / 4;
                  if (we.labelExtraX) {
                    var ze = we.labelExtraX * we.pxmid[1] / we.pxmid[0], Ie = we.yLabelMid + we.labelExtraY - (we.cyFinal + we.pxmid[1]);
                    Math.abs(ze) > Math.abs(Ie) ? Ee += "l" + Ie * we.pxmid[0] / we.pxmid[1] + "," + Ie + "H" + (Te + we.labelExtraX + Me) : Ee += "l" + we.labelExtraX + "," + ze + "v" + (Ie - ze) + "h" + Me;
                  } else
                    Ee += "V" + (we.yLabelMid + we.labelExtraY) + "h" + Me;
                  r.ensureSingle(se, "path", "textline").call(x.stroke, ge.outsidetextfont.color).attr({ "stroke-width": Math.min(2, ge.outsidetextfont.size / 8), d: Ee, fill: "none" });
                } else
                  se.select("path.textline").remove();
              });
            }(K, N), te && N.automargin) {
              var le = e.bBox(U.node()), oe = N.domain, ve = re.w * (oe.x[1] - oe.x[0]), ue = re.h * (oe.y[1] - oe.y[0]), ye = (0.5 * ve - ee.r) / re.w, Ae = (0.5 * ue - ee.r) / re.h;
              g.autoMargin(Y, "pie." + N.uid + ".automargin", { xl: oe.x[0] - ye, xr: oe.x[1] + ye, yb: oe.y[0] - Ae, yt: oe.y[1] + Ae, l: Math.max(ee.cx - ee.r - le.left, 0), r: Math.max(le.right - (ee.cx + ee.r), 0), b: Math.max(le.bottom - (ee.cy + ee.r), 0), t: Math.max(ee.cy - ee.r - le.top, 0), pad: 5 });
            }
          });
        });
        setTimeout(function() {
          V.selectAll("tspan").each(function() {
            var B = m.select(this);
            B.attr("dy") && B.attr("dy", B.attr("dy"));
          });
        }, 0);
      }, formatSliceLabel: j, transformInsideText: f, determineInsideTextFont: a, positionTitleOutside: P, prerenderTitles: y, layoutAreas: R, attachFxHandlers: c, computeTransform: H };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../components/fx": 407, "../../lib": 515, "../../lib/svg_text_utils": 541, "../../plots/plots": 628, "../bar/constants": 659, "../bar/uniform_text": 673, "./event_data": 914, "./helpers": 915, "@plotly/d3": 58 }], 920: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("./style_one"), k = v("../bar/uniform_text").resizeText;
      Q.exports = function(x) {
        var e = x._fullLayout._pielayer.selectAll(".trace");
        k(x, e, "pie"), e.each(function(r) {
          var n = r[0].trace, s = m.select(this);
          s.style({ opacity: n.opacity }), s.selectAll("path.surface").each(function(t) {
            m.select(this).call(g, t, n);
          });
        });
      };
    }, { "../bar/uniform_text": 673, "./style_one": 921, "@plotly/d3": 58 }], 921: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("./helpers").castOption;
      Q.exports = function(k, x, e) {
        var r = e.marker.line, n = g(r.color, x.pts) || m.defaultLine, s = g(r.width, x.pts) || 0;
        k.style("stroke-width", s).call(m.fill, x.color).call(m.stroke, n);
      };
    }, { "../../components/color": 367, "./helpers": 915 }], 922: [function(v, Q, $) {
      var m = v("../scatter/attributes");
      Q.exports = { x: m.x, y: m.y, xy: { valType: "data_array", editType: "calc" }, indices: { valType: "data_array", editType: "calc" }, xbounds: { valType: "data_array", editType: "calc" }, ybounds: { valType: "data_array", editType: "calc" }, text: m.text, marker: { color: { valType: "color", arrayOk: !1, editType: "calc" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, arrayOk: !1, editType: "calc" }, blend: { valType: "boolean", dflt: null, editType: "calc" }, sizemin: { valType: "number", min: 0.1, max: 2, dflt: 0.5, editType: "calc" }, sizemax: { valType: "number", min: 0.1, dflt: 20, editType: "calc" }, border: { color: { valType: "color", arrayOk: !1, editType: "calc" }, arearatio: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" }, editType: "calc" }, editType: "calc" }, transforms: void 0 };
    }, { "../scatter/attributes": 936 }], 923: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_pointcloud2d, g = v("../../lib/str2rgbarray"), k = v("../../plots/cartesian/autorange").findExtremes, x = v("../scatter/get_trace_color");
      function e(n, s) {
        this.scene = n, this.uid = s, this.type = "pointcloud", this.pickXData = [], this.pickYData = [], this.xData = [], this.yData = [], this.textLabels = [], this.color = "rgb(0, 0, 0)", this.name = "", this.hoverinfo = "all", this.idToIndex = new Int32Array(0), this.bounds = [0, 0, 0, 0], this.pointcloudOptions = { positions: new Float32Array(0), idToIndex: this.idToIndex, sizemin: 0.5, sizemax: 12, color: [0, 0, 0, 1], areaRatio: 1, borderColor: [0, 0, 0, 1] }, this.pointcloud = m(n.glplot, this.pointcloudOptions), this.pointcloud._trace = this;
      }
      var r = e.prototype;
      r.handlePick = function(n) {
        var s = this.idToIndex[n.pointId];
        return { trace: this, dataCoord: n.dataCoord, traceCoord: this.pickXYData ? [this.pickXYData[2 * s], this.pickXYData[2 * s + 1]] : [this.pickXData[s], this.pickYData[s]], textLabel: Array.isArray(this.textLabels) ? this.textLabels[s] : this.textLabels, color: this.color, name: this.name, pointIndex: s, hoverinfo: this.hoverinfo };
      }, r.update = function(n) {
        this.index = n.index, this.textLabels = n.text, this.name = n.name, this.hoverinfo = n.hoverinfo, this.bounds = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.updateFast(n), this.color = x(n, {});
      }, r.updateFast = function(n) {
        var s, t, d, u, o, h, l = this.xData = this.pickXData = n.x, i = this.yData = this.pickYData = n.y, p = this.pickXYData = n.xy, c = n.xbounds && n.ybounds, a = n.indices, y = this.bounds;
        if (p) {
          if (d = p, s = p.length >>> 1, c)
            y[0] = n.xbounds[0], y[2] = n.xbounds[1], y[1] = n.ybounds[0], y[3] = n.ybounds[1];
          else
            for (h = 0; h < s; h++)
              u = d[2 * h], o = d[2 * h + 1], u < y[0] && (y[0] = u), u > y[2] && (y[2] = u), o < y[1] && (y[1] = o), o > y[3] && (y[3] = o);
          if (a)
            t = a;
          else
            for (t = new Int32Array(s), h = 0; h < s; h++)
              t[h] = h;
        } else
          for (s = l.length, d = new Float32Array(2 * s), t = new Int32Array(s), h = 0; h < s; h++)
            u = l[h], o = i[h], t[h] = h, d[2 * h] = u, d[2 * h + 1] = o, u < y[0] && (y[0] = u), u > y[2] && (y[2] = u), o < y[1] && (y[1] = o), o > y[3] && (y[3] = o);
        this.idToIndex = t, this.pointcloudOptions.idToIndex = t, this.pointcloudOptions.positions = d;
        var f = g(n.marker.color), _ = g(n.marker.border.color), b = n.opacity * n.marker.opacity;
        f[3] *= b, this.pointcloudOptions.color = f;
        var w = n.marker.blend;
        w === null && (w = l.length < 100 || i.length < 100), this.pointcloudOptions.blend = w, _[3] *= b, this.pointcloudOptions.borderColor = _;
        var T = n.marker.sizemin, L = Math.max(n.marker.sizemax, n.marker.sizemin);
        this.pointcloudOptions.sizeMin = T, this.pointcloudOptions.sizeMax = L, this.pointcloudOptions.areaRatio = n.marker.border.arearatio, this.pointcloud.update(this.pointcloudOptions);
        var A = this.scene.xaxis, I = this.scene.yaxis, P = L / 2 || 0.5;
        n._extremes[A._id] = k(A, [y[0], y[2]], { ppad: P }), n._extremes[I._id] = k(I, [y[1], y[3]], { ppad: P });
      }, r.dispose = function() {
        this.pointcloud.dispose();
      }, Q.exports = function(n, s) {
        var t = new e(n, s.uid);
        return t.update(s), t;
      };
    }, { "../../../stackgl_modules": 1133, "../../lib/str2rgbarray": 540, "../../plots/cartesian/autorange": 565, "../scatter/get_trace_color": 946 }], 924: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes");
      Q.exports = function(k, x, e) {
        function r(n, s) {
          return m.coerce(k, x, g, n, s);
        }
        r("x"), r("y"), r("xbounds"), r("ybounds"), k.xy && k.xy instanceof Float32Array && (x.xy = k.xy), k.indices && k.indices instanceof Int32Array && (x.indices = k.indices), r("text"), r("marker.color", e), r("marker.opacity"), r("marker.blend"), r("marker.sizemin"), r("marker.sizemax"), r("marker.border.color", e), r("marker.border.arearatio"), x._length = null;
      };
    }, { "../../lib": 515, "./attributes": 922 }], 925: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("../scatter3d/calc"), plot: v("./convert"), moduleType: "trace", name: "pointcloud", basePlotModule: v("../../plots/gl2d"), categories: ["gl", "gl2d", "showLegend"], meta: {} };
    }, { "../../plots/gl2d": 605, "../scatter3d/calc": 965, "./attributes": 922, "./convert": 923, "./defaults": 924 }], 926: [function(v, Q, $) {
      var m = v("../../plots/font_attributes"), g = v("../../plots/attributes"), k = v("../../components/color/attributes"), x = v("../../components/fx/attributes"), e = v("../../plots/domain").attributes, r = v("../../plots/template_attributes").hovertemplateAttrs, n = v("../../components/colorscale/attributes"), s = v("../../plot_api/plot_template").templatedArray, t = v("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers, d = v("../../lib/extend").extendFlat, u = v("../../plot_api/edit_types").overrideAll;
      (Q.exports = u({ hoverinfo: d({}, g.hoverinfo, { flags: [], arrayOk: !1 }), hoverlabel: x.hoverlabel, domain: e({ name: "sankey", trace: !0 }), orientation: { valType: "enumerated", values: ["v", "h"], dflt: "h" }, valueformat: { valType: "string", dflt: ".3s", description: t("value") }, valuesuffix: { valType: "string", dflt: "" }, arrangement: { valType: "enumerated", values: ["snap", "perpendicular", "freeform", "fixed"], dflt: "snap" }, textfont: m({}), customdata: void 0, node: { label: { valType: "data_array", dflt: [] }, groups: { valType: "info_array", impliedEdits: { x: [], y: [] }, dimensions: 2, freeLength: !0, dflt: [], items: { valType: "number", editType: "calc" } }, x: { valType: "data_array", dflt: [] }, y: { valType: "data_array", dflt: [] }, color: { valType: "color", arrayOk: !0 }, customdata: { valType: "data_array", editType: "calc" }, line: { color: { valType: "color", dflt: k.defaultLine, arrayOk: !0 }, width: { valType: "number", min: 0, dflt: 0.5, arrayOk: !0 } }, pad: { valType: "number", arrayOk: !1, min: 0, dflt: 20 }, thickness: { valType: "number", arrayOk: !1, min: 1, dflt: 20 }, hoverinfo: { valType: "enumerated", values: ["all", "none", "skip"], dflt: "all" }, hoverlabel: x.hoverlabel, hovertemplate: r({}, { keys: ["value", "label"] }) }, link: { arrowlen: { valType: "number", min: 0, dflt: 0 }, label: { valType: "data_array", dflt: [] }, color: { valType: "color", arrayOk: !0 }, customdata: { valType: "data_array", editType: "calc" }, line: { color: { valType: "color", dflt: k.defaultLine, arrayOk: !0 }, width: { valType: "number", min: 0, dflt: 0, arrayOk: !0 } }, source: { valType: "data_array", dflt: [] }, target: { valType: "data_array", dflt: [] }, value: { valType: "data_array", dflt: [] }, hoverinfo: { valType: "enumerated", values: ["all", "none", "skip"], dflt: "all" }, hoverlabel: x.hoverlabel, hovertemplate: r({}, { keys: ["value", "label"] }), colorscales: s("concentrationscales", { editType: "calc", label: { valType: "string", editType: "calc", dflt: "" }, cmax: { valType: "number", editType: "calc", dflt: 1 }, cmin: { valType: "number", editType: "calc", dflt: 0 }, colorscale: d(n().colorscale, { dflt: [[0, "white"], [1, "black"]] }) }) } }, "calc", "nested")).transforms = void 0;
    }, { "../../components/color/attributes": 366, "../../components/colorscale/attributes": 374, "../../components/fx/attributes": 398, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plot_api/plot_template": 555, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/domain": 593, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642 }], 927: [function(v, Q, $) {
      var m = v("../../plot_api/edit_types").overrideAll, g = v("../../plots/get_data").getModuleCalcData, k = v("./plot"), x = v("../../components/fx/layout_attributes"), e = v("../../lib/setcursor"), r = v("../../components/dragelement"), n = v("../../components/selections").prepSelect, s = v("../../lib"), t = v("../../registry");
      function d(u, o) {
        var h = u._fullData[o], l = u._fullLayout, i = l.dragmode, p = l.dragmode === "pan" ? "move" : "crosshair", c = h._bgRect;
        if (c && i !== "pan" && i !== "zoom") {
          e(c, p);
          var a = { _id: "x", c2p: s.identity, _offset: h._sankey.translateX, _length: h._sankey.width }, y = { _id: "y", c2p: s.identity, _offset: h._sankey.translateY, _length: h._sankey.height }, f = { gd: u, element: c.node(), plotinfo: { id: o, xaxis: a, yaxis: y, fillRangeItems: s.noop }, subplot: o, xaxes: [a], yaxes: [y], doneFnCompleted: function(_) {
            var b, w = u._fullData[o], T = w.node.groups.slice(), L = [];
            function A(E) {
              for (var R = w._sankey.graph.nodes, z = 0; z < R.length; z++)
                if (R[z].pointNumber === E)
                  return R[z];
            }
            for (var I = 0; I < _.length; I++) {
              var P = A(_[I].pointNumber);
              if (P)
                if (P.group) {
                  for (var S = 0; S < P.childrenNodes.length; S++)
                    L.push(P.childrenNodes[S].pointNumber);
                  T[P.pointNumber - w.node._count] = !1;
                } else
                  L.push(P.pointNumber);
            }
            b = T.filter(Boolean).concat([L]), t.call("_guiRestyle", u, { "node.groups": [b] }, o);
          }, prepFn: function(_, b, w) {
            n(_, b, w, f, i);
          } };
          r.init(f);
        }
      }
      $.name = "sankey", $.baseLayoutAttrOverrides = m({ hoverlabel: x.hoverlabel }, "plot", "nested"), $.plot = function(u) {
        var o = g(u.calcdata, "sankey")[0];
        k(u, o), $.updateFx(u);
      }, $.clean = function(u, o, h, l) {
        var i = l._has && l._has("sankey"), p = o._has && o._has("sankey");
        i && !p && (l._paperdiv.selectAll(".sankey").remove(), l._paperdiv.selectAll(".bgsankey").remove());
      }, $.updateFx = function(u) {
        for (var o = 0; o < u._fullData.length; o++)
          d(u, o);
      };
    }, { "../../components/dragelement": 386, "../../components/fx/layout_attributes": 408, "../../components/selections": 455, "../../lib": 515, "../../lib/setcursor": 536, "../../plot_api/edit_types": 548, "../../plots/get_data": 602, "../../registry": 647, "./plot": 932 }], 928: [function(v, Q, $) {
      var m = v("strongly-connected-components"), g = v("../../lib"), k = v("../../lib/gup").wrap, x = g.isArrayOrTypedArray, e = g.isIndex, r = v("../../components/colorscale");
      function n(s) {
        var t, d = s.node, u = s.link, o = [], h = x(u.color), l = x(u.customdata), i = {}, p = {}, c = u.colorscales.length;
        for (t = 0; t < c; t++) {
          var a = u.colorscales[t], y = r.extractScale(a, { cLetter: "c" }), f = r.makeColorScaleFunc(y);
          p[a.label] = f;
        }
        var _ = 0;
        for (t = 0; t < u.value.length; t++)
          u.source[t] > _ && (_ = u.source[t]), u.target[t] > _ && (_ = u.target[t]);
        var b, w = _ + 1;
        s.node._count = w;
        var T = s.node.groups, L = {};
        for (t = 0; t < T.length; t++) {
          var A = T[t];
          for (b = 0; b < A.length; b++) {
            var I = A[b], P = w + t;
            L.hasOwnProperty(I) ? g.warn("Node " + I + " is already part of a group.") : L[I] = P;
          }
        }
        var S = { source: [], target: [] };
        for (t = 0; t < u.value.length; t++) {
          var E = u.value[t], R = u.source[t], z = u.target[t];
          if (E > 0 && e(R, w) && e(z, w) && (!L.hasOwnProperty(R) || !L.hasOwnProperty(z) || L[R] !== L[z])) {
            L.hasOwnProperty(z) && (z = L[z]), L.hasOwnProperty(R) && (R = L[R]), z = +z, i[R = +R] = i[z] = !0;
            var j = "";
            u.label && u.label[t] && (j = u.label[t]);
            var H = null;
            j && p.hasOwnProperty(j) && (H = p[j]), o.push({ pointNumber: t, label: j, color: h ? u.color[t] : u.color, customdata: l ? u.customdata[t] : u.customdata, concentrationscale: H, source: R, target: z, value: +E }), S.source.push(R), S.target.push(z);
          }
        }
        var Y = w + T.length, J = x(d.color), W = x(d.customdata), Z = [];
        for (t = 0; t < Y; t++)
          if (i[t]) {
            var re = d.label[t];
            Z.push({ group: t > w - 1, childrenNodes: [], pointNumber: t, label: re, color: J ? d.color[t] : d.color, customdata: W ? d.customdata[t] : d.customdata });
          }
        var V = !1;
        return function(B, U, ee) {
          for (var N = g.init2dArray(B, 0), K = 0; K < Math.min(U.length, ee.length); K++)
            if (g.isIndex(U[K], B) && g.isIndex(ee[K], B)) {
              if (U[K] === ee[K])
                return !0;
              N[U[K]].push(ee[K]);
            }
          return m(N).components.some(function(X) {
            return X.length > 1;
          });
        }(Y, S.source, S.target) && (V = !0), { circular: V, links: o, nodes: Z, groups: T, groupLookup: L };
      }
      Q.exports = function(s, t) {
        var d = n(t);
        return k({ circular: d.circular, _nodes: d.nodes, _links: d.links, _groups: d.groups, _groupLookup: d.groupLookup });
      };
    }, { "../../components/colorscale": 379, "../../lib": 515, "../../lib/gup": 512, "strongly-connected-components": 307 }], 929: [function(v, Q, $) {
      Q.exports = { nodeTextOffsetHorizontal: 4, nodeTextOffsetVertical: 3, nodePadAcross: 10, sankeyIterations: 50, forceIterations: 5, forceTicksPerFrame: 10, duration: 500, ease: "linear", cn: { sankey: "sankey", sankeyLinks: "sankey-links", sankeyLink: "sankey-link", sankeyNodeSet: "sankey-node-set", sankeyNode: "sankey-node", nodeRect: "node-rect", nodeLabel: "node-label" } };
    }, {}], 930: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../components/color"), x = v("tinycolor2"), e = v("../../plots/domain").defaults, r = v("../../components/fx/hoverlabel_defaults"), n = v("../../plot_api/plot_template"), s = v("../../plots/array_container_defaults");
      function t(d, u) {
        function o(h, l) {
          return m.coerce(d, u, g.link.colorscales, h, l);
        }
        o("label"), o("cmin"), o("cmax"), o("colorscale");
      }
      Q.exports = function(d, u, o, h) {
        function l(L, A) {
          return m.coerce(d, u, g, L, A);
        }
        var i = m.extendDeep(h.hoverlabel, d.hoverlabel), p = d.node, c = n.newContainer(u, "node");
        function a(L, A) {
          return m.coerce(p, c, g.node, L, A);
        }
        a("label"), a("groups"), a("x"), a("y"), a("pad"), a("thickness"), a("line.color"), a("line.width"), a("hoverinfo", d.hoverinfo), r(p, c, a, i), a("hovertemplate");
        var y = h.colorway;
        a("color", c.label.map(function(L, A) {
          return k.addOpacity(function(I) {
            return y[I % y.length];
          }(A), 0.8);
        })), a("customdata");
        var f = d.link || {}, _ = n.newContainer(u, "link");
        function b(L, A) {
          return m.coerce(f, _, g.link, L, A);
        }
        b("label"), b("arrowlen"), b("source"), b("target"), b("value"), b("line.color"), b("line.width"), b("hoverinfo", d.hoverinfo), r(f, _, b, i), b("hovertemplate");
        var w, T = x(h.paper_bgcolor).getLuminance() < 0.333 ? "rgba(255, 255, 255, 0.6)" : "rgba(0, 0, 0, 0.2)";
        b("color", m.repeat(T, _.value.length)), b("customdata"), s(f, _, { name: "colorscales", handleItemDefaults: t }), e(u, h, l), l("orientation"), l("valueformat"), l("valuesuffix"), c.x.length && c.y.length && (w = "freeform"), l("arrangement", w), m.coerceFont(l, "textfont", m.extendFlat({}, h.font)), u._length = null;
      };
    }, { "../../components/color": 367, "../../components/fx/hoverlabel_defaults": 405, "../../lib": 515, "../../plot_api/plot_template": 555, "../../plots/array_container_defaults": 561, "../../plots/domain": 593, "./attributes": 926, tinycolor2: 313 }], 931: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("./plot"), moduleType: "trace", name: "sankey", basePlotModule: v("./base_plot"), selectPoints: v("./select.js"), categories: ["noOpacity"], meta: {} };
    }, { "./attributes": 926, "./base_plot": 927, "./calc": 928, "./defaults": 930, "./plot": 932, "./select.js": 934 }], 932: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = g.numberFormat, x = v("./render"), e = v("../../components/fx"), r = v("../../components/color"), n = v("./constants").cn, s = g._;
      function t(f) {
        return f !== "";
      }
      function d(f, _) {
        return f.filter(function(b) {
          return b.key === _.traceId;
        });
      }
      function u(f, _) {
        m.select(f).select("path").style("fill-opacity", _), m.select(f).select("rect").style("fill-opacity", _);
      }
      function o(f) {
        m.select(f).select("text.name").style("fill", "black");
      }
      function h(f) {
        return function(_) {
          return f.node.sourceLinks.indexOf(_.link) !== -1 || f.node.targetLinks.indexOf(_.link) !== -1;
        };
      }
      function l(f) {
        return function(_) {
          return _.node.sourceLinks.indexOf(f.link) !== -1 || _.node.targetLinks.indexOf(f.link) !== -1;
        };
      }
      function i(f, _, b) {
        _ && b && d(b, _).selectAll("." + n.sankeyLink).filter(h(_)).call(c.bind(0, _, b, !1));
      }
      function p(f, _, b) {
        _ && b && d(b, _).selectAll("." + n.sankeyLink).filter(h(_)).call(a.bind(0, _, b, !1));
      }
      function c(f, _, b, w) {
        var T = w.datum().link.label;
        w.style("fill-opacity", function(L) {
          if (!L.link.concentrationscale)
            return 0.4;
        }), T && d(_, f).selectAll("." + n.sankeyLink).filter(function(L) {
          return L.link.label === T;
        }).style("fill-opacity", function(L) {
          if (!L.link.concentrationscale)
            return 0.4;
        }), b && d(_, f).selectAll("." + n.sankeyNode).filter(l(f)).call(i);
      }
      function a(f, _, b, w) {
        var T = w.datum().link.label;
        w.style("fill-opacity", function(L) {
          return L.tinyColorAlpha;
        }), T && d(_, f).selectAll("." + n.sankeyLink).filter(function(L) {
          return L.link.label === T;
        }).style("fill-opacity", function(L) {
          return L.tinyColorAlpha;
        }), b && d(_, f).selectAll(n.sankeyNode).filter(l(f)).call(p);
      }
      function y(f, _) {
        var b = f.hoverlabel || {}, w = g.nestedProperty(b, _).get();
        return !Array.isArray(w) && w;
      }
      Q.exports = function(f, _) {
        for (var b = f._fullLayout, w = b._paper, T = b._size, L = 0; L < f._fullData.length; L++)
          if (f._fullData[L].visible && f._fullData[L].type === n.sankey && !f._fullData[L]._viewInitial) {
            var A = f._fullData[L].node;
            f._fullData[L]._viewInitial = { node: { groups: A.groups.slice(), x: A.x.slice(), y: A.y.slice() } };
          }
        var I = s(f, "source:") + " ", P = s(f, "target:") + " ", S = s(f, "concentration:") + " ", E = s(f, "incoming flow count:") + " ", R = s(f, "outgoing flow count:") + " ";
        x(f, w, _, { width: T.w, height: T.h, margin: { t: T.t, r: T.r, b: T.b, l: T.l } }, { linkEvents: { hover: function(z, j, H) {
          f._fullLayout.hovermode !== !1 && (m.select(z).call(c.bind(0, j, H, !0)), j.link.trace.link.hoverinfo !== "skip" && (j.link.fullData = j.link.trace, f.emit("plotly_hover", { event: m.event, points: [j.link] })));
        }, follow: function(z, j) {
          if (f._fullLayout.hovermode !== !1) {
            var H = j.link.trace.link;
            if (H.hoverinfo !== "none" && H.hoverinfo !== "skip") {
              for (var Y = [], J = 0, W = 0; W < j.flow.links.length; W++) {
                var Z = j.flow.links[W];
                if (f._fullLayout.hovermode !== "closest" || j.link.pointNumber === Z.pointNumber) {
                  j.link.pointNumber === Z.pointNumber && (J = W), Z.fullData = Z.trace, H = j.link.trace.link;
                  var re = B(Z), V = { valueLabel: k(j.valueFormat)(Z.value) + j.valueSuffix };
                  Y.push({ x: re[0], y: re[1], name: V.valueLabel, text: [Z.label || "", I + Z.source.label, P + Z.target.label, Z.concentrationscale ? S + k("%0.2f")(Z.flow.labelConcentration) : ""].filter(t).join("<br>"), color: y(H, "bgcolor") || r.addOpacity(Z.color, 1), borderColor: y(H, "bordercolor"), fontFamily: y(H, "font.family"), fontSize: y(H, "font.size"), fontColor: y(H, "font.color"), nameLength: y(H, "namelength"), textAlign: y(H, "align"), idealAlign: m.event.x < re[0] ? "right" : "left", hovertemplate: H.hovertemplate, hovertemplateLabels: V, eventData: [Z] });
                }
              }
              e.loneHover(Y, { container: b._hoverlayer.node(), outerContainer: b._paper.node(), gd: f, anchorIndex: J }).each(function() {
                j.link.concentrationscale || u(this, 0.65), o(this);
              });
            }
          }
          function B(U) {
            var ee, N;
            U.circular ? (ee = (U.circularPathData.leftInnerExtent + U.circularPathData.rightInnerExtent) / 2, N = U.circularPathData.verticalFullExtent) : (ee = (U.source.x1 + U.target.x0) / 2, N = (U.y0 + U.y1) / 2);
            var K = [ee, N];
            return U.trace.orientation === "v" && K.reverse(), K[0] += j.parent.translateX, K[1] += j.parent.translateY, K;
          }
        }, unhover: function(z, j, H) {
          f._fullLayout.hovermode !== !1 && (m.select(z).call(a.bind(0, j, H, !0)), j.link.trace.link.hoverinfo !== "skip" && (j.link.fullData = j.link.trace, f.emit("plotly_unhover", { event: m.event, points: [j.link] })), e.loneUnhover(b._hoverlayer.node()));
        }, select: function(z, j) {
          var H = j.link;
          H.originalEvent = m.event, f._hoverdata = [H], e.click(f, { target: !0 });
        } }, nodeEvents: { hover: function(z, j, H) {
          f._fullLayout.hovermode !== !1 && (m.select(z).call(i, j, H), j.node.trace.node.hoverinfo !== "skip" && (j.node.fullData = j.node.trace, f.emit("plotly_hover", { event: m.event, points: [j.node] })));
        }, follow: function(z, j) {
          if (f._fullLayout.hovermode !== !1) {
            var H = j.node.trace.node;
            if (H.hoverinfo !== "none" && H.hoverinfo !== "skip") {
              var Y = m.select(z).select("." + n.nodeRect), J = f._fullLayout._paperdiv.node().getBoundingClientRect(), W = Y.node().getBoundingClientRect(), Z = W.left - 2 - J.left, re = W.right + 2 - J.left, V = W.top + W.height / 4 - J.top, B = { valueLabel: k(j.valueFormat)(j.node.value) + j.valueSuffix };
              j.node.fullData = j.node.trace, f._fullLayout._calcInverseTransform(f);
              var U = f._fullLayout._invScaleX, ee = f._fullLayout._invScaleY, N = e.loneHover({ x0: U * Z, x1: U * re, y: ee * V, name: k(j.valueFormat)(j.node.value) + j.valueSuffix, text: [j.node.label, E + j.node.targetLinks.length, R + j.node.sourceLinks.length].filter(t).join("<br>"), color: y(H, "bgcolor") || j.tinyColorHue, borderColor: y(H, "bordercolor"), fontFamily: y(H, "font.family"), fontSize: y(H, "font.size"), fontColor: y(H, "font.color"), nameLength: y(H, "namelength"), textAlign: y(H, "align"), idealAlign: "left", hovertemplate: H.hovertemplate, hovertemplateLabels: B, eventData: [j.node] }, { container: b._hoverlayer.node(), outerContainer: b._paper.node(), gd: f });
              u(N, 0.85), o(N);
            }
          }
        }, unhover: function(z, j, H) {
          f._fullLayout.hovermode !== !1 && (m.select(z).call(p, j, H), j.node.trace.node.hoverinfo !== "skip" && (j.node.fullData = j.node.trace, f.emit("plotly_unhover", { event: m.event, points: [j.node] })), e.loneUnhover(b._hoverlayer.node()));
        }, select: function(z, j, H) {
          var Y = j.node;
          Y.originalEvent = m.event, f._hoverdata = [Y], m.select(z).call(p, j, H), e.click(f, { target: !0 });
        } } });
      };
    }, { "../../components/color": 367, "../../components/fx": 407, "../../lib": 515, "./constants": 929, "./render": 933, "@plotly/d3": 58 }], 933: [function(v, Q, $) {
      var m = v("d3-force"), g = v("d3-interpolate").interpolateNumber, k = v("@plotly/d3"), x = v("@plotly/d3-sankey"), e = v("@plotly/d3-sankey-circular"), r = v("./constants"), n = v("tinycolor2"), s = v("../../components/color"), t = v("../../components/drawing"), d = v("../../lib"), u = d.strTranslate, o = d.strRotate, h = v("../../lib/gup"), l = h.keyFun, i = h.repeat, p = h.unwrap, c = v("../../lib/svg_text_utils"), a = v("../../registry"), y = v("../../constants/alignment"), f = y.CAP_SHIFT, _ = y.LINE_SPACING;
      function b(W, Z, re) {
        var V, B = p(Z), U = B.trace, ee = U.domain, N = U.orientation === "h", K = U.node.pad, X = U.node.thickness, te = W.width * (ee.x[1] - ee.x[0]), ie = W.height * (ee.y[1] - ee.y[0]), le = B._nodes, oe = B._links, ve = B.circular;
        (V = ve ? e.sankeyCircular().circularLinkGap(0) : x.sankey()).iterations(r.sankeyIterations).size(N ? [te, ie] : [ie, te]).nodeWidth(X).nodePadding(K).nodeId(function(Me) {
          return Me.pointNumber;
        }).nodes(le).links(oe);
        var ue, ye, Ae, pe = V();
        for (var ge in V.nodePadding() < K && d.warn("node.pad was reduced to ", V.nodePadding(), " to fit within the figure."), B._groupLookup) {
          var we, se = parseInt(B._groupLookup[ge]);
          for (ue = 0; ue < pe.nodes.length; ue++)
            if (pe.nodes[ue].pointNumber === se) {
              we = pe.nodes[ue];
              break;
            }
          if (we) {
            var de = { pointNumber: parseInt(ge), x0: we.x0, x1: we.x1, y0: we.y0, y1: we.y1, partOfGroup: !0, sourceLinks: [], targetLinks: [] };
            pe.nodes.unshift(de), we.childrenNodes.unshift(de);
          }
        }
        if (function() {
          for (ue = 0; ue < pe.nodes.length; ue++) {
            var Me, ze, Ie = pe.nodes[ue], Oe = {};
            for (ye = 0; ye < Ie.targetLinks.length; ye++)
              Me = (ze = Ie.targetLinks[ye]).source.pointNumber + ":" + ze.target.pointNumber, Oe.hasOwnProperty(Me) || (Oe[Me] = []), Oe[Me].push(ze);
            var Ze = Object.keys(Oe);
            for (ye = 0; ye < Ze.length; ye++) {
              var Fe = Oe[Me = Ze[ye]], Pe = 0, De = {};
              for (Ae = 0; Ae < Fe.length; Ae++)
                De[(ze = Fe[Ae]).label] || (De[ze.label] = 0), De[ze.label] += ze.value, Pe += ze.value;
              for (Ae = 0; Ae < Fe.length; Ae++)
                (ze = Fe[Ae]).flow = { value: Pe, labelConcentration: De[ze.label] / Pe, concentration: ze.value / Pe, links: Fe }, ze.concentrationscale && (ze.color = n(ze.concentrationscale(ze.flow.labelConcentration)));
            }
            var Ge = 0;
            for (ye = 0; ye < Ie.sourceLinks.length; ye++)
              Ge += Ie.sourceLinks[ye].value;
            for (ye = 0; ye < Ie.sourceLinks.length; ye++)
              (ze = Ie.sourceLinks[ye]).concentrationOut = ze.value / Ge;
            var Qe = 0;
            for (ye = 0; ye < Ie.targetLinks.length; ye++)
              Qe += Ie.targetLinks[ye].value;
            for (ye = 0; ye < Ie.targetLinks.length; ye++)
              (ze = Ie.targetLinks[ye]).concenrationIn = ze.value / Qe;
          }
        }(), U.node.x.length && U.node.y.length) {
          for (ue = 0; ue < Math.min(U.node.x.length, U.node.y.length, pe.nodes.length); ue++)
            if (U.node.x[ue] && U.node.y[ue]) {
              var Te = [U.node.x[ue] * te, U.node.y[ue] * ie];
              pe.nodes[ue].x0 = Te[0] - X / 2, pe.nodes[ue].x1 = Te[0] + X / 2;
              var Ee = pe.nodes[ue].y1 - pe.nodes[ue].y0;
              pe.nodes[ue].y0 = Te[1] - Ee / 2, pe.nodes[ue].y1 = Te[1] + Ee / 2;
            }
          U.arrangement === "snap" && function(Me) {
            Me.forEach(function(ze) {
              var Ie, Oe, Ze, Fe = 0, Pe = ze.length;
              for (ze.sort(function(De, Ge) {
                return De.y0 - Ge.y0;
              }), Ze = 0; Ze < Pe; ++Ze)
                (Ie = ze[Ze]).y0 >= Fe || (Oe = Fe - Ie.y0) > 1e-6 && (Ie.y0 += Oe, Ie.y1 += Oe), Fe = Ie.y1 + K;
            });
          }(function(Me) {
            var ze, Ie, Oe = Me.map(function(Ge, Qe) {
              return { x0: Ge.x0, index: Qe };
            }).sort(function(Ge, Qe) {
              return Ge.x0 - Qe.x0;
            }), Ze = [], Fe = -1, Pe = -1 / 0;
            for (ue = 0; ue < Oe.length; ue++) {
              var De = Me[Oe[ue].index];
              De.x0 > Pe + X && (Fe += 1, ze = De.x0), Pe = De.x0, Ze[Fe] || (Ze[Fe] = []), Ze[Fe].push(De), Ie = ze - De.x0, De.x0 += Ie, De.x1 += Ie;
            }
            return Ze;
          }(le = pe.nodes)), V.update(pe);
        }
        return { circular: ve, key: re, trace: U, guid: d.randstr(), horizontal: N, width: te, height: ie, nodePad: U.node.pad, nodeLineColor: U.node.line.color, nodeLineWidth: U.node.line.width, linkLineColor: U.link.line.color, linkLineWidth: U.link.line.width, linkArrowLength: U.link.arrowlen, valueFormat: U.valueformat, valueSuffix: U.valuesuffix, textFont: U.textfont, translateX: ee.x[0] * W.width + W.margin.l, translateY: W.height - ee.y[1] * W.height + W.margin.t, dragParallel: N ? ie : te, dragPerpendicular: N ? te : ie, arrangement: U.arrangement, sankey: V, graph: pe, forceLayouts: {}, interactionState: { dragInProgress: !1, hovered: !1 } };
      }
      function w(W, Z, re) {
        var V = n(Z.color), B = Z.source.label + "|" + Z.target.label + "__" + re;
        return Z.trace = W.trace, Z.curveNumber = W.trace.index, { circular: W.circular, key: B, traceId: W.key, pointNumber: Z.pointNumber, link: Z, tinyColorHue: s.tinyRGB(V), tinyColorAlpha: V.getAlpha(), linkPath: T, linkLineColor: W.linkLineColor, linkLineWidth: W.linkLineWidth, linkArrowLength: W.linkArrowLength, valueFormat: W.valueFormat, valueSuffix: W.valueSuffix, sankey: W.sankey, parent: W, interactionState: W.interactionState, flow: Z.flow };
      }
      function T() {
        return function(W) {
          var Z = W.linkArrowLength;
          if (W.link.circular)
            return function(ye, Ae) {
              var pe = ye.width / 2, ge = ye.circularPathData;
              return ye.circularLinkType === "top" ? "M " + (ge.targetX - Ae) + " " + (ge.targetY + pe) + " L" + (ge.rightInnerExtent - Ae) + " " + (ge.targetY + pe) + "A" + (ge.rightLargeArcRadius + pe) + " " + (ge.rightSmallArcRadius + pe) + " 0 0 1 " + (ge.rightFullExtent - pe - Ae) + " " + (ge.targetY - ge.rightSmallArcRadius) + "L" + (ge.rightFullExtent - pe - Ae) + " " + ge.verticalRightInnerExtent + "A" + (ge.rightLargeArcRadius + pe) + " " + (ge.rightLargeArcRadius + pe) + " 0 0 1 " + (ge.rightInnerExtent - Ae) + " " + (ge.verticalFullExtent - pe) + "L" + ge.leftInnerExtent + " " + (ge.verticalFullExtent - pe) + "A" + (ge.leftLargeArcRadius + pe) + " " + (ge.leftLargeArcRadius + pe) + " 0 0 1 " + (ge.leftFullExtent + pe) + " " + ge.verticalLeftInnerExtent + "L" + (ge.leftFullExtent + pe) + " " + (ge.sourceY - ge.leftSmallArcRadius) + "A" + (ge.leftLargeArcRadius + pe) + " " + (ge.leftSmallArcRadius + pe) + " 0 0 1 " + ge.leftInnerExtent + " " + (ge.sourceY + pe) + "L" + ge.sourceX + " " + (ge.sourceY + pe) + "L" + ge.sourceX + " " + (ge.sourceY - pe) + "L" + ge.leftInnerExtent + " " + (ge.sourceY - pe) + "A" + (ge.leftLargeArcRadius - pe) + " " + (ge.leftSmallArcRadius - pe) + " 0 0 0 " + (ge.leftFullExtent - pe) + " " + (ge.sourceY - ge.leftSmallArcRadius) + "L" + (ge.leftFullExtent - pe) + " " + ge.verticalLeftInnerExtent + "A" + (ge.leftLargeArcRadius - pe) + " " + (ge.leftLargeArcRadius - pe) + " 0 0 0 " + ge.leftInnerExtent + " " + (ge.verticalFullExtent + pe) + "L" + (ge.rightInnerExtent - Ae) + " " + (ge.verticalFullExtent + pe) + "A" + (ge.rightLargeArcRadius - pe) + " " + (ge.rightLargeArcRadius - pe) + " 0 0 0 " + (ge.rightFullExtent + pe - Ae) + " " + ge.verticalRightInnerExtent + "L" + (ge.rightFullExtent + pe - Ae) + " " + (ge.targetY - ge.rightSmallArcRadius) + "A" + (ge.rightLargeArcRadius - pe) + " " + (ge.rightSmallArcRadius - pe) + " 0 0 0 " + (ge.rightInnerExtent - Ae) + " " + (ge.targetY - pe) + "L" + (ge.targetX - Ae) + " " + (ge.targetY - pe) + (Ae > 0 ? "L" + ge.targetX + " " + ge.targetY : "") + "Z" : "M " + (ge.targetX - Ae) + " " + (ge.targetY - pe) + " L" + (ge.rightInnerExtent - Ae) + " " + (ge.targetY - pe) + "A" + (ge.rightLargeArcRadius + pe) + " " + (ge.rightSmallArcRadius + pe) + " 0 0 0 " + (ge.rightFullExtent - pe - Ae) + " " + (ge.targetY + ge.rightSmallArcRadius) + "L" + (ge.rightFullExtent - pe - Ae) + " " + ge.verticalRightInnerExtent + "A" + (ge.rightLargeArcRadius + pe) + " " + (ge.rightLargeArcRadius + pe) + " 0 0 0 " + (ge.rightInnerExtent - Ae) + " " + (ge.verticalFullExtent + pe) + "L" + ge.leftInnerExtent + " " + (ge.verticalFullExtent + pe) + "A" + (ge.leftLargeArcRadius + pe) + " " + (ge.leftLargeArcRadius + pe) + " 0 0 0 " + (ge.leftFullExtent + pe) + " " + ge.verticalLeftInnerExtent + "L" + (ge.leftFullExtent + pe) + " " + (ge.sourceY + ge.leftSmallArcRadius) + "A" + (ge.leftLargeArcRadius + pe) + " " + (ge.leftSmallArcRadius + pe) + " 0 0 0 " + ge.leftInnerExtent + " " + (ge.sourceY - pe) + "L" + ge.sourceX + " " + (ge.sourceY - pe) + "L" + ge.sourceX + " " + (ge.sourceY + pe) + "L" + ge.leftInnerExtent + " " + (ge.sourceY + pe) + "A" + (ge.leftLargeArcRadius - pe) + " " + (ge.leftSmallArcRadius - pe) + " 0 0 1 " + (ge.leftFullExtent - pe) + " " + (ge.sourceY + ge.leftSmallArcRadius) + "L" + (ge.leftFullExtent - pe) + " " + ge.verticalLeftInnerExtent + "A" + (ge.leftLargeArcRadius - pe) + " " + (ge.leftLargeArcRadius - pe) + " 0 0 1 " + ge.leftInnerExtent + " " + (ge.verticalFullExtent - pe) + "L" + (ge.rightInnerExtent - Ae) + " " + (ge.verticalFullExtent - pe) + "A" + (ge.rightLargeArcRadius - pe) + " " + (ge.rightLargeArcRadius - pe) + " 0 0 1 " + (ge.rightFullExtent + pe - Ae) + " " + ge.verticalRightInnerExtent + "L" + (ge.rightFullExtent + pe - Ae) + " " + (ge.targetY + ge.rightSmallArcRadius) + "A" + (ge.rightLargeArcRadius - pe) + " " + (ge.rightSmallArcRadius - pe) + " 0 0 1 " + (ge.rightInnerExtent - Ae) + " " + (ge.targetY + pe) + "L" + (ge.targetX - Ae) + " " + (ge.targetY + pe) + (Ae > 0 ? "L" + ge.targetX + " " + ge.targetY : "") + "Z";
            }(W.link, Z);
          var re = Math.abs((W.link.target.x0 - W.link.source.x1) / 2);
          Z > re && (Z = re);
          var V = W.link.source.x1, B = W.link.target.x0 - Z, U = g(V, B), ee = U(0.5), N = U(0.5), K = W.link.y0 - W.link.width / 2, X = W.link.y0 + W.link.width / 2, te = W.link.y1 - W.link.width / 2, ie = W.link.y1 + W.link.width / 2, le = "M" + V + "," + K, oe = "C" + ee + "," + K + " " + N + "," + te + " " + B + "," + te, ve = "C" + N + "," + ie + " " + ee + "," + X + " " + V + "," + X, ue = Z > 0 ? "L" + (B + Z) + "," + (te + W.link.width / 2) : "";
          return le + oe + (ue += "L" + B + "," + ie) + ve + "Z";
        };
      }
      function L(W, Z) {
        var re = n(Z.color), V = r.nodePadAcross, B = W.nodePad / 2;
        Z.dx = Z.x1 - Z.x0, Z.dy = Z.y1 - Z.y0;
        var U = Z.dx, ee = Math.max(0.5, Z.dy), N = "node_" + Z.pointNumber;
        return Z.group && (N = d.randstr()), Z.trace = W.trace, Z.curveNumber = W.trace.index, { index: Z.pointNumber, key: N, partOfGroup: Z.partOfGroup || !1, group: Z.group, traceId: W.key, trace: W.trace, node: Z, nodePad: W.nodePad, nodeLineColor: W.nodeLineColor, nodeLineWidth: W.nodeLineWidth, textFont: W.textFont, size: W.horizontal ? W.height : W.width, visibleWidth: Math.ceil(U), visibleHeight: ee, zoneX: -V, zoneY: -B, zoneWidth: U + 2 * V, zoneHeight: ee + 2 * B, labelY: W.horizontal ? Z.dy / 2 + 1 : Z.dx / 2 + 1, left: Z.originalLayer === 1, sizeAcross: W.width, forceLayouts: W.forceLayouts, horizontal: W.horizontal, darkBackground: re.getBrightness() <= 128, tinyColorHue: s.tinyRGB(re), tinyColorAlpha: re.getAlpha(), valueFormat: W.valueFormat, valueSuffix: W.valueSuffix, sankey: W.sankey, graph: W.graph, arrangement: W.arrangement, uniqueNodeLabelPathId: [W.guid, W.key, N].join("_"), interactionState: W.interactionState, figure: W };
      }
      function A(W) {
        W.attr("transform", function(Z) {
          return u(Z.node.x0.toFixed(3), Z.node.y0.toFixed(3));
        });
      }
      function I(W) {
        W.call(A);
      }
      function P(W, Z) {
        W.call(I), Z.attr("d", T());
      }
      function S(W) {
        W.attr("width", function(Z) {
          return Z.node.x1 - Z.node.x0;
        }).attr("height", function(Z) {
          return Z.visibleHeight;
        });
      }
      function E(W) {
        return W.link.width > 1 || W.linkLineWidth > 0;
      }
      function R(W) {
        return u(W.translateX, W.translateY) + (W.horizontal ? "matrix(1 0 0 1 0 0)" : "matrix(0 1 1 0 0 0)");
      }
      function z(W, Z, re) {
        W.on(".basic", null).on("mouseover.basic", function(V) {
          V.interactionState.dragInProgress || V.partOfGroup || (re.hover(this, V, Z), V.interactionState.hovered = [this, V]);
        }).on("mousemove.basic", function(V) {
          V.interactionState.dragInProgress || V.partOfGroup || (re.follow(this, V), V.interactionState.hovered = [this, V]);
        }).on("mouseout.basic", function(V) {
          V.interactionState.dragInProgress || V.partOfGroup || (re.unhover(this, V, Z), V.interactionState.hovered = !1);
        }).on("click.basic", function(V) {
          V.interactionState.hovered && (re.unhover(this, V, Z), V.interactionState.hovered = !1), V.interactionState.dragInProgress || V.partOfGroup || re.select(this, V, Z);
        });
      }
      function j(W, Z, re, V) {
        var B = k.behavior.drag().origin(function(U) {
          return { x: U.node.x0 + U.visibleWidth / 2, y: U.node.y0 + U.visibleHeight / 2 };
        }).on("dragstart", function(U) {
          if (U.arrangement !== "fixed" && (d.ensureSingle(V._fullLayout._infolayer, "g", "dragcover", function(N) {
            V._fullLayout._dragCover = N;
          }), d.raiseToTop(this), U.interactionState.dragInProgress = U.node, Y(U.node), U.interactionState.hovered && (re.nodeEvents.unhover.apply(0, U.interactionState.hovered), U.interactionState.hovered = !1), U.arrangement === "snap")) {
            var ee = U.traceId + "|" + U.key;
            U.forceLayouts[ee] ? U.forceLayouts[ee].alpha(1) : function(N, K, X, te) {
              (function(le) {
                for (var oe = 0; oe < le.length; oe++)
                  le[oe].y = (le[oe].y0 + le[oe].y1) / 2, le[oe].x = (le[oe].x0 + le[oe].x1) / 2;
              })(X.graph.nodes);
              var ie = X.graph.nodes.filter(function(le) {
                return le.originalX === X.node.originalX;
              }).filter(function(le) {
                return !le.partOfGroup;
              });
              X.forceLayouts[K] = m.forceSimulation(ie).alphaDecay(0).force("collide", m.forceCollide().radius(function(le) {
                return le.dy / 2 + X.nodePad / 2;
              }).strength(1).iterations(r.forceIterations)).force("constrain", function(le, oe, ve, ue) {
                return function() {
                  for (var ye = 0, Ae = 0; Ae < ve.length; Ae++) {
                    var pe = ve[Ae];
                    pe === ue.interactionState.dragInProgress ? (pe.x = pe.lastDraggedX, pe.y = pe.lastDraggedY) : (pe.vx = (pe.originalX - pe.x) / r.forceTicksPerFrame, pe.y = Math.min(ue.size - pe.dy / 2, Math.max(pe.dy / 2, pe.y))), ye = Math.max(ye, Math.abs(pe.vx), Math.abs(pe.vy));
                  }
                  !ue.interactionState.dragInProgress && ye < 0.1 && ue.forceLayouts[oe].alpha() > 0 && ue.forceLayouts[oe].alpha(0);
                };
              }(0, K, ie, X)).stop();
            }(0, ee, U), function(N, K, X, te, ie) {
              window.requestAnimationFrame(function le() {
                var oe;
                for (oe = 0; oe < r.forceTicksPerFrame; oe++)
                  X.forceLayouts[te].tick();
                if (function(ue) {
                  for (var ye = 0; ye < ue.length; ye++)
                    ue[ye].y0 = ue[ye].y - ue[ye].dy / 2, ue[ye].y1 = ue[ye].y0 + ue[ye].dy, ue[ye].x0 = ue[ye].x - ue[ye].dx / 2, ue[ye].x1 = ue[ye].x0 + ue[ye].dx;
                }(X.graph.nodes), X.sankey.update(X.graph), P(N.filter(J(X)), K), X.forceLayouts[te].alpha() > 0)
                  window.requestAnimationFrame(le);
                else {
                  var ve = X.node.originalX;
                  X.node.x0 = ve - X.visibleWidth / 2, X.node.x1 = ve + X.visibleWidth / 2, H(X, ie);
                }
              });
            }(W, Z, U, ee, V);
          }
        }).on("drag", function(U) {
          if (U.arrangement !== "fixed") {
            var ee = k.event.x, N = k.event.y;
            U.arrangement === "snap" ? (U.node.x0 = ee - U.visibleWidth / 2, U.node.x1 = ee + U.visibleWidth / 2, U.node.y0 = N - U.visibleHeight / 2, U.node.y1 = N + U.visibleHeight / 2) : (U.arrangement === "freeform" && (U.node.x0 = ee - U.visibleWidth / 2, U.node.x1 = ee + U.visibleWidth / 2), N = Math.max(0, Math.min(U.size - U.visibleHeight / 2, N)), U.node.y0 = N - U.visibleHeight / 2, U.node.y1 = N + U.visibleHeight / 2), Y(U.node), U.arrangement !== "snap" && (U.sankey.update(U.graph), P(W.filter(J(U)), Z));
          }
        }).on("dragend", function(U) {
          if (U.arrangement !== "fixed") {
            U.interactionState.dragInProgress = !1;
            for (var ee = 0; ee < U.node.childrenNodes.length; ee++)
              U.node.childrenNodes[ee].x = U.node.x, U.node.childrenNodes[ee].y = U.node.y;
            U.arrangement !== "snap" && H(U, V);
          }
        });
        W.on(".drag", null).call(B);
      }
      function H(W, Z) {
        for (var re = [], V = [], B = 0; B < W.graph.nodes.length; B++) {
          var U = (W.graph.nodes[B].x0 + W.graph.nodes[B].x1) / 2, ee = (W.graph.nodes[B].y0 + W.graph.nodes[B].y1) / 2;
          re.push(U / W.figure.width), V.push(ee / W.figure.height);
        }
        a.call("_guiRestyle", Z, { "node.x": [re], "node.y": [V] }, W.trace.index).then(function() {
          Z._fullLayout._dragCover && Z._fullLayout._dragCover.remove();
        });
      }
      function Y(W) {
        W.lastDraggedX = W.x0 + W.dx / 2, W.lastDraggedY = W.y0 + W.dy / 2;
      }
      function J(W) {
        return function(Z) {
          return Z.node.originalX === W.node.originalX;
        };
      }
      Q.exports = function(W, Z, re, V, B) {
        var U = W._context.staticPlot, ee = !1;
        d.ensureSingle(W._fullLayout._infolayer, "g", "first-render", function() {
          ee = !0;
        });
        var N = W._fullLayout._dragCover, K = re.filter(function(ye) {
          return p(ye).trace.visible;
        }).map(b.bind(null, V)), X = Z.selectAll("." + r.cn.sankey).data(K, l);
        X.exit().remove(), X.enter().append("g").classed(r.cn.sankey, !0).style("box-sizing", "content-box").style("position", "absolute").style("left", 0).style("shape-rendering", "geometricPrecision").style("pointer-events", U ? "none" : "auto").attr("transform", R), X.each(function(ye, Ae) {
          W._fullData[Ae]._sankey = ye;
          var pe = "bgsankey-" + ye.trace.uid + "-" + Ae;
          d.ensureSingle(W._fullLayout._draggers, "rect", pe), W._fullData[Ae]._bgRect = k.select("." + pe), W._fullData[Ae]._bgRect.style("pointer-events", U ? "none" : "all").attr("width", ye.width).attr("height", ye.height).attr("x", ye.translateX).attr("y", ye.translateY).classed("bgsankey", !0).style({ fill: "transparent", "stroke-width": 0 });
        }), X.transition().ease(r.ease).duration(r.duration).attr("transform", R);
        var te = X.selectAll("." + r.cn.sankeyLinks).data(i, l);
        te.enter().append("g").classed(r.cn.sankeyLinks, !0).style("fill", "none");
        var ie = te.selectAll("." + r.cn.sankeyLink).data(function(ye) {
          return ye.graph.links.filter(function(Ae) {
            return Ae.value;
          }).map(w.bind(null, ye));
        }, l);
        ie.enter().append("path").classed(r.cn.sankeyLink, !0).call(z, X, B.linkEvents), ie.style("stroke", function(ye) {
          return E(ye) ? s.tinyRGB(n(ye.linkLineColor)) : ye.tinyColorHue;
        }).style("stroke-opacity", function(ye) {
          return E(ye) ? s.opacity(ye.linkLineColor) : ye.tinyColorAlpha;
        }).style("fill", function(ye) {
          return ye.tinyColorHue;
        }).style("fill-opacity", function(ye) {
          return ye.tinyColorAlpha;
        }).style("stroke-width", function(ye) {
          return E(ye) ? ye.linkLineWidth : 1;
        }).attr("d", T()), ie.style("opacity", function() {
          return W._context.staticPlot || ee || N ? 1 : 0;
        }).transition().ease(r.ease).duration(r.duration).style("opacity", 1), ie.exit().transition().ease(r.ease).duration(r.duration).style("opacity", 0).remove();
        var le = X.selectAll("." + r.cn.sankeyNodeSet).data(i, l);
        le.enter().append("g").classed(r.cn.sankeyNodeSet, !0), le.style("cursor", function(ye) {
          switch (ye.arrangement) {
            case "fixed":
              return "default";
            case "perpendicular":
              return "ns-resize";
            default:
              return "move";
          }
        });
        var oe = le.selectAll("." + r.cn.sankeyNode).data(function(ye) {
          var Ae = ye.graph.nodes;
          return function(pe) {
            var ge, we = [];
            for (ge = 0; ge < pe.length; ge++)
              pe[ge].originalX = (pe[ge].x0 + pe[ge].x1) / 2, pe[ge].originalY = (pe[ge].y0 + pe[ge].y1) / 2, we.indexOf(pe[ge].originalX) === -1 && we.push(pe[ge].originalX);
            for (we.sort(function(se, de) {
              return se - de;
            }), ge = 0; ge < pe.length; ge++)
              pe[ge].originalLayerIndex = we.indexOf(pe[ge].originalX), pe[ge].originalLayer = pe[ge].originalLayerIndex / (we.length - 1);
          }(Ae), Ae.map(L.bind(null, ye));
        }, l);
        oe.enter().append("g").classed(r.cn.sankeyNode, !0).call(A).style("opacity", function(ye) {
          return !W._context.staticPlot && !ee || ye.partOfGroup ? 0 : 1;
        }), oe.call(z, X, B.nodeEvents).call(j, ie, B, W), oe.transition().ease(r.ease).duration(r.duration).call(A).style("opacity", function(ye) {
          return ye.partOfGroup ? 0 : 1;
        }), oe.exit().transition().ease(r.ease).duration(r.duration).style("opacity", 0).remove();
        var ve = oe.selectAll("." + r.cn.nodeRect).data(i);
        ve.enter().append("rect").classed(r.cn.nodeRect, !0).call(S), ve.style("stroke-width", function(ye) {
          return ye.nodeLineWidth;
        }).style("stroke", function(ye) {
          return s.tinyRGB(n(ye.nodeLineColor));
        }).style("stroke-opacity", function(ye) {
          return s.opacity(ye.nodeLineColor);
        }).style("fill", function(ye) {
          return ye.tinyColorHue;
        }).style("fill-opacity", function(ye) {
          return ye.tinyColorAlpha;
        }), ve.transition().ease(r.ease).duration(r.duration).call(S);
        var ue = oe.selectAll("." + r.cn.nodeLabel).data(i);
        ue.enter().append("text").classed(r.cn.nodeLabel, !0).style("cursor", "default"), ue.attr("data-notex", 1).text(function(ye) {
          return ye.node.label;
        }).each(function(ye) {
          var Ae = k.select(this);
          t.font(Ae, ye.textFont), c.convertToTspans(Ae, W);
        }).style("text-shadow", c.makeTextShadow(W._fullLayout.paper_bgcolor)).attr("text-anchor", function(ye) {
          return ye.horizontal && ye.left ? "end" : "start";
        }).attr("transform", function(ye) {
          var Ae = k.select(this), pe = c.lineCount(Ae), ge = ye.textFont.size * ((pe - 1) * _ - f), we = ye.nodeLineWidth / 2 + 3, se = ((ye.horizontal ? ye.visibleHeight : ye.visibleWidth) - ge) / 2;
          ye.horizontal && (ye.left ? we = -we : we += ye.visibleWidth);
          var de = ye.horizontal ? "" : "scale(-1,1)" + o(90);
          return u(ye.horizontal ? we : se, ye.horizontal ? se : we) + de;
        }), ue.transition().ease(r.ease).duration(r.duration);
      };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../constants/alignment": 483, "../../lib": 515, "../../lib/gup": 512, "../../lib/svg_text_utils": 541, "../../registry": 647, "./constants": 929, "@plotly/d3": 58, "@plotly/d3-sankey": 57, "@plotly/d3-sankey-circular": 56, "d3-force": 111, "d3-interpolate": 116, tinycolor2: 313 }], 934: [function(v, Q, $) {
      Q.exports = function(m, g) {
        for (var k = [], x = m.cd[0].trace, e = x._sankey.graph.nodes, r = 0; r < e.length; r++) {
          var n = e[r];
          if (!n.partOfGroup) {
            var s = [(n.x0 + n.x1) / 2, (n.y0 + n.y1) / 2];
            x.orientation === "v" && s.reverse(), g && g.contains(s, !1, r, m) && k.push({ pointNumber: n.pointNumber });
          }
        }
        return k;
      };
    }, {}], 935: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        for (var x = 0; x < g.length; x++)
          g[x].i = x;
        m.mergeArray(k.text, g, "tx"), m.mergeArray(k.texttemplate, g, "txt"), m.mergeArray(k.hovertext, g, "htx"), m.mergeArray(k.customdata, g, "data"), m.mergeArray(k.textposition, g, "tp"), k.textfont && (m.mergeArrayCastPositive(k.textfont.size, g, "ts"), m.mergeArray(k.textfont.color, g, "tc"), m.mergeArray(k.textfont.family, g, "tf"));
        var e = k.marker;
        if (e) {
          m.mergeArrayCastPositive(e.size, g, "ms"), m.mergeArrayCastPositive(e.opacity, g, "mo"), m.mergeArray(e.symbol, g, "mx"), m.mergeArray(e.angle, g, "ma"), m.mergeArray(e.standoff, g, "mf"), m.mergeArray(e.color, g, "mc");
          var r = e.line;
          e.line && (m.mergeArray(r.color, g, "mlc"), m.mergeArrayCastPositive(r.width, g, "mlw"));
          var n = e.gradient;
          n && n.type !== "none" && (m.mergeArray(n.type, g, "mgt"), m.mergeArray(n.color, g, "mgc"));
        }
      };
    }, { "../../lib": 515 }], 936: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../../components/colorscale/attributes"), e = v("../../plots/font_attributes"), r = v("../../components/drawing/attributes").dash, n = v("../../components/drawing/attributes").pattern, s = v("../../components/drawing"), t = v("./constants"), d = v("../../lib/extend").extendFlat;
      Q.exports = { x: { valType: "data_array", editType: "calc+clearAxisTypes", anim: !0 }, x0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes", anim: !0 }, dx: { valType: "number", dflt: 1, editType: "calc", anim: !0 }, y: { valType: "data_array", editType: "calc+clearAxisTypes", anim: !0 }, y0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes", anim: !0 }, dy: { valType: "number", dflt: 1, editType: "calc", anim: !0 }, xperiod: { valType: "any", dflt: 0, editType: "calc" }, yperiod: { valType: "any", dflt: 0, editType: "calc" }, xperiod0: { valType: "any", editType: "calc" }, yperiod0: { valType: "any", editType: "calc" }, xperiodalignment: { valType: "enumerated", values: ["start", "middle", "end"], dflt: "middle", editType: "calc" }, yperiodalignment: { valType: "enumerated", values: ["start", "middle", "end"], dflt: "middle", editType: "calc" }, xhoverformat: m("x"), yhoverformat: m("y"), stackgroup: { valType: "string", dflt: "", editType: "calc" }, orientation: { valType: "enumerated", values: ["v", "h"], editType: "calc" }, groupnorm: { valType: "enumerated", values: ["", "fraction", "percent"], dflt: "", editType: "calc" }, stackgaps: { valType: "enumerated", values: ["infer zero", "interpolate"], dflt: "infer zero", editType: "calc" }, text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, texttemplate: g({}, {}), hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "style" }, mode: { valType: "flaglist", flags: ["lines", "markers", "text"], extras: ["none"], editType: "calc" }, hoveron: { valType: "flaglist", flags: ["points", "fills"], editType: "style" }, hovertemplate: k({}, { keys: t.eventDataKeys }), line: { color: { valType: "color", editType: "style", anim: !0 }, width: { valType: "number", min: 0, dflt: 2, editType: "style", anim: !0 }, shape: { valType: "enumerated", values: ["linear", "spline", "hv", "vh", "hvh", "vhv"], dflt: "linear", editType: "plot" }, smoothing: { valType: "number", min: 0, max: 1.3, dflt: 1, editType: "plot" }, dash: d({}, r, { editType: "style" }), backoff: { valType: "number", min: 0, dflt: "auto", arrayOk: !0, editType: "plot" }, simplify: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, connectgaps: { valType: "boolean", dflt: !1, editType: "calc" }, cliponaxis: { valType: "boolean", dflt: !0, editType: "plot" }, fill: { valType: "enumerated", values: ["none", "tozeroy", "tozerox", "tonexty", "tonextx", "toself", "tonext"], editType: "calc" }, fillcolor: { valType: "color", editType: "style", anim: !0 }, fillpattern: n, marker: d({ symbol: { valType: "enumerated", values: s.symbolList, dflt: "circle", arrayOk: !0, editType: "style" }, opacity: { valType: "number", min: 0, max: 1, arrayOk: !0, editType: "style", anim: !0 }, angle: { valType: "angle", dflt: 0, arrayOk: !0, editType: "plot", anim: !1 }, angleref: { valType: "enumerated", values: ["previous", "up"], dflt: "up", editType: "plot", anim: !1 }, standoff: { valType: "number", min: 0, dflt: 0, arrayOk: !0, editType: "plot", anim: !0 }, size: { valType: "number", min: 0, dflt: 6, arrayOk: !0, editType: "calc", anim: !0 }, maxdisplayed: { valType: "number", min: 0, dflt: 0, editType: "plot" }, sizeref: { valType: "number", dflt: 1, editType: "calc" }, sizemin: { valType: "number", min: 0, dflt: 0, editType: "calc" }, sizemode: { valType: "enumerated", values: ["diameter", "area"], dflt: "diameter", editType: "calc" }, line: d({ width: { valType: "number", min: 0, arrayOk: !0, editType: "style", anim: !0 }, editType: "calc" }, x("marker.line", { anim: !0 })), gradient: { type: { valType: "enumerated", values: ["radial", "horizontal", "vertical", "none"], arrayOk: !0, dflt: "none", editType: "calc" }, color: { valType: "color", arrayOk: !0, editType: "calc" }, editType: "calc" }, editType: "calc" }, x("marker", { anim: !0 })), selected: { marker: { opacity: { valType: "number", min: 0, max: 1, editType: "style" }, color: { valType: "color", editType: "style" }, size: { valType: "number", min: 0, editType: "style" }, editType: "style" }, textfont: { color: { valType: "color", editType: "style" }, editType: "style" }, editType: "style" }, unselected: { marker: { opacity: { valType: "number", min: 0, max: 1, editType: "style" }, color: { valType: "color", editType: "style" }, size: { valType: "number", min: 0, editType: "style" }, editType: "style" }, textfont: { color: { valType: "color", editType: "style" }, editType: "style" }, editType: "style" }, textposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle left", "middle center", "middle right", "bottom left", "bottom center", "bottom right"], dflt: "middle center", arrayOk: !0, editType: "calc" }, textfont: e({ editType: "calc", colorEditType: "style", arrayOk: !0 }) };
    }, { "../../components/colorscale/attributes": 374, "../../components/drawing": 389, "../../components/drawing/attributes": 388, "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/font_attributes": 594, "../../plots/template_attributes": 642, "./constants": 940 }], 937: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../plots/cartesian/axes"), x = v("../../plots/cartesian/align_period"), e = v("../../constants/numerical").BADNUM, r = v("./subtypes"), n = v("./colorscale_calc"), s = v("./arrays_to_calcdata"), t = v("./calc_selection");
      function d(i, p, c, a, y, f, _) {
        var b = p._length, w = i._fullLayout, T = c._id, L = a._id, A = w._firstScatter[h(p)] === p.uid, I = (l(p, w, c, a) || {}).orientation, P = p.fill;
        c._minDtick = 0, a._minDtick = 0;
        var S = { padded: !0 }, E = { padded: !0 };
        _ && (S.ppad = E.ppad = _);
        var R = b < 2 || y[0] !== y[b - 1] || f[0] !== f[b - 1];
        R && (P === "tozerox" || P === "tonextx" && (A || I === "h")) ? S.tozero = !0 : (p.error_y || {}).visible || P !== "tonexty" && P !== "tozeroy" && (r.hasMarkers(p) || r.hasText(p)) || (S.padded = !1, S.ppad = 0), R && (P === "tozeroy" || P === "tonexty" && (A || I === "v")) ? E.tozero = !0 : P !== "tonextx" && P !== "tozerox" || (E.padded = !1), T && (p._extremes[T] = k.findExtremes(c, y, S)), L && (p._extremes[L] = k.findExtremes(a, f, E));
      }
      function u(i, p) {
        if (r.hasMarkers(i)) {
          var c, a = i.marker, y = 1.6 * (i.marker.sizeref || 1);
          if (c = i.marker.sizemode === "area" ? function(T) {
            return Math.max(Math.sqrt((T || 0) / y), 3);
          } : function(T) {
            return Math.max((T || 0) / y, 3);
          }, g.isArrayOrTypedArray(a.size)) {
            var f = { type: "linear" };
            k.setConvert(f);
            for (var _ = f.makeCalcdata(i.marker, "size"), b = new Array(p), w = 0; w < p; w++)
              b[w] = c(_[w]);
            return b;
          }
          return c(a.size);
        }
      }
      function o(i, p) {
        var c = h(p), a = i._firstScatter;
        a[c] || (a[c] = p.uid);
      }
      function h(i) {
        var p = i.stackgroup;
        return i.xaxis + i.yaxis + i.type + (p ? "-" + p : "");
      }
      function l(i, p, c, a) {
        var y = i.stackgroup;
        if (y) {
          var f = p._scatterStackOpts[c._id + a._id][y], _ = f.orientation === "v" ? a : c;
          return _.type === "linear" || _.type === "log" ? f : void 0;
        }
      }
      Q.exports = { calc: function(i, p) {
        var c, a, y, f, _, b, w = i._fullLayout, T = p._xA = k.getFromId(i, p.xaxis || "x", "x"), L = p._yA = k.getFromId(i, p.yaxis || "y", "y"), A = T.makeCalcdata(p, "x"), I = L.makeCalcdata(p, "y"), P = x(p, T, "x", A), S = x(p, L, "y", I), E = P.vals, R = S.vals, z = p._length, j = new Array(z), H = p.ids, Y = l(p, w, T, L), J = !1;
        o(w, p);
        var W, Z = "x", re = "y";
        Y ? (g.pushUnique(Y.traceIndices, p._expandedIndex), (c = Y.orientation === "v") ? (re = "s", W = "x") : (Z = "s", W = "y"), _ = Y.stackgaps === "interpolate") : d(i, p, T, L, E, R, u(p, z));
        var V = !!p.xperiodalignment, B = !!p.yperiodalignment;
        for (a = 0; a < z; a++) {
          var U = j[a] = {}, ee = m(E[a]), N = m(R[a]);
          ee && N ? (U[Z] = E[a], U[re] = R[a], V && (U.orig_x = A[a], U.xEnd = P.ends[a], U.xStart = P.starts[a]), B && (U.orig_y = I[a], U.yEnd = S.ends[a], U.yStart = S.starts[a])) : Y && (c ? ee : N) ? (U[W] = c ? E[a] : R[a], U.gap = !0, _ ? (U.s = e, J = !0) : U.s = 0) : U[Z] = U[re] = e, H && (U.id = String(H[a]));
        }
        if (s(j, p), n(i, p), t(j, p), Y) {
          for (a = 0; a < j.length; )
            j[a][W] === e ? j.splice(a, 1) : a++;
          if (g.sort(j, function(ie, le) {
            return ie[W] - le[W] || ie.i - le.i;
          }), J) {
            for (a = 0; a < j.length - 1 && j[a].gap; )
              a++;
            for ((b = j[a].s) || (b = j[a].s = 0), y = 0; y < a; y++)
              j[y].s = b;
            for (f = j.length - 1; f > a && j[f].gap; )
              f--;
            for (b = j[f].s, y = j.length - 1; y > f; y--)
              j[y].s = b;
            for (; a < f; )
              if (j[++a].gap) {
                for (y = a + 1; j[y].gap; )
                  y++;
                for (var K = j[a - 1][W], X = j[a - 1].s, te = (j[y].s - X) / (j[y][W] - K); a < y; )
                  j[a].s = X + (j[a][W] - K) * te, a++;
              }
          }
        }
        return j;
      }, calcMarkerSize: u, calcAxisExpansion: d, setFirstScatter: o, getStackOpts: l };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "./arrays_to_calcdata": 935, "./calc_selection": 938, "./colorscale_calc": 939, "./subtypes": 961, "fast-isnumeric": 190 }], 938: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        m.isArrayOrTypedArray(k.selectedpoints) && m.tagSelected(g, k);
      };
    }, { "../../lib": 515 }], 939: [function(v, Q, $) {
      var m = v("../../components/colorscale/helpers").hasColorscale, g = v("../../components/colorscale/calc"), k = v("./subtypes");
      Q.exports = function(x, e) {
        k.hasLines(e) && m(e, "line") && g(x, e, { vals: e.line.color, containerStr: "line", cLetter: "c" }), k.hasMarkers(e) && (m(e, "marker") && g(x, e, { vals: e.marker.color, containerStr: "marker", cLetter: "c" }), m(e, "marker.line") && g(x, e, { vals: e.marker.line.color, containerStr: "marker.line", cLetter: "c" }));
      };
    }, { "../../components/colorscale/calc": 375, "../../components/colorscale/helpers": 378, "./subtypes": 961 }], 940: [function(v, Q, $) {
      Q.exports = { PTS_LINESONLY: 20, minTolerance: 0.2, toleranceGrowth: 10, maxScreensAway: 20, eventDataKeys: [] };
    }, {}], 941: [function(v, Q, $) {
      var m = v("./calc");
      function g(k, x, e, r, n, s, t) {
        n[r] = !0;
        var d = { i: null, gap: !0, s: 0 };
        if (d[t] = e, k.splice(x, 0, d), x && e === k[x - 1][t]) {
          var u = k[x - 1];
          d.s = u.s, d.i = u.i, d.gap = u.gap;
        } else
          s && (d.s = function(o, h, l, i) {
            var p = o[h - 1], c = o[h + 1];
            return c ? p ? p.s + (c.s - p.s) * (l - p[i]) / (c[i] - p[i]) : c.s : p.s;
          }(k, x, e, t));
        x || (k[0].t = k[1].t, k[0].trace = k[1].trace, delete k[1].t, delete k[1].trace);
      }
      Q.exports = function(k, x) {
        var e = x.xaxis, r = x.yaxis, n = e._id + r._id, s = k._fullLayout._scatterStackOpts[n];
        if (s) {
          var t, d, u, o, h, l, i, p, c, a, y, f, _, b, w, T = k.calcdata;
          for (var L in s) {
            var A = (a = s[L]).traceIndices;
            if (A.length) {
              for (y = a.stackgaps === "interpolate", f = a.groupnorm, a.orientation === "v" ? (_ = "x", b = "y") : (_ = "y", b = "x"), w = new Array(A.length), t = 0; t < w.length; t++)
                w[t] = !1;
              l = T[A[0]];
              var I = new Array(l.length);
              for (t = 0; t < l.length; t++)
                I[t] = l[t][_];
              for (t = 1; t < A.length; t++) {
                for (h = T[A[t]], d = u = 0; d < h.length; d++) {
                  for (i = h[d][_]; i > I[u] && u < I.length; u++)
                    g(h, d, I[u], t, w, y, _), d++;
                  if (i !== I[u]) {
                    for (o = 0; o < t; o++)
                      g(T[A[o]], u, i, o, w, y, _);
                    I.splice(u, 0, i);
                  }
                  u++;
                }
                for (; u < I.length; u++)
                  g(h, d, I[u], t, w, y, _), d++;
              }
              var P = I.length;
              for (d = 0; d < l.length; d++) {
                for (p = l[d][b] = l[d].s, t = 1; t < A.length; t++)
                  (h = T[A[t]])[0].trace._rawLength = h[0].trace._length, h[0].trace._length = P, p += h[d].s, h[d][b] = p;
                if (f)
                  for (c = (f === "fraction" ? p : p / 100) || 1, t = 0; t < A.length; t++) {
                    var S = T[A[t]][d];
                    S[b] /= c, S.sNorm = S.s / c;
                  }
              }
              for (t = 0; t < A.length; t++) {
                var E = (h = T[A[t]])[0].trace, R = m.calcMarkerSize(E, E._rawLength), z = Array.isArray(R);
                if (R && w[t] || z) {
                  var j = R;
                  for (R = new Array(P), d = 0; d < P; d++)
                    R[d] = h[d].gap ? 0 : z ? j[h[d].i] : j;
                }
                var H = new Array(P), Y = new Array(P);
                for (d = 0; d < P; d++)
                  H[d] = h[d].x, Y[d] = h[d].y;
                m.calcAxisExpansion(k, E, e, r, H, Y, R), h[0].t.orientation = a.orientation;
              }
            }
          }
        }
      };
    }, { "./calc": 937 }], 942: [function(v, Q, $) {
      Q.exports = function(m) {
        for (var g = 0; g < m.length; g++) {
          var k = m[g];
          if (k.type === "scatter") {
            var x = k.fill;
            if (x !== "none" && x !== "toself" && (k.opacity = void 0, x === "tonexty" || x === "tonextx"))
              for (var e = g - 1; e >= 0; e--) {
                var r = m[e];
                if (r.type === "scatter" && r.xaxis === k.xaxis && r.yaxis === k.yaxis) {
                  r.opacity = void 0;
                  break;
                }
              }
          }
        }
      };
    }, {}], 943: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry"), k = v("./attributes"), x = v("./constants"), e = v("./subtypes"), r = v("./xy_defaults"), n = v("./period_defaults"), s = v("./stack_defaults"), t = v("./marker_defaults"), d = v("./line_defaults"), u = v("./line_shape_defaults"), o = v("./text_defaults"), h = v("./fillcolor_defaults"), l = v("../../lib").coercePattern;
      Q.exports = function(i, p, c, a) {
        function y(I, P) {
          return m.coerce(i, p, k, I, P);
        }
        var f = r(i, p, a, y);
        if (f || (p.visible = !1), p.visible) {
          n(i, p, a, y), y("xhoverformat"), y("yhoverformat");
          var _ = s(i, p, a, y), b = !_ && f < x.PTS_LINESONLY ? "lines+markers" : "lines";
          y("text"), y("hovertext"), y("mode", b), e.hasLines(p) && (d(i, p, c, a, y, { backoff: !0 }), u(i, p, y), y("connectgaps"), y("line.simplify")), e.hasMarkers(p) && t(i, p, c, a, y, { gradient: !0 }), e.hasText(p) && (y("texttemplate"), o(i, p, a, y));
          var w = [];
          (e.hasMarkers(p) || e.hasText(p)) && (y("cliponaxis"), y("marker.maxdisplayed"), w.push("points")), y("fill", _ ? _.fillDflt : "none"), p.fill !== "none" && (h(i, p, c, y), e.hasLines(p) || u(i, p, y), l(y, "fillpattern", p.fillcolor, !1));
          var T = (p.line || {}).color, L = (p.marker || {}).color;
          p.fill !== "tonext" && p.fill !== "toself" || w.push("fills"), y("hoveron", w.join("+") || "points"), p.hoveron !== "fills" && y("hovertemplate");
          var A = g.getComponentMethod("errorbars", "supplyDefaults");
          A(i, p, T || L || c, { axis: "y" }), A(i, p, T || L || c, { axis: "x", inherit: "y" }), m.coerceSelectionMarkerOpacity(p, y);
        }
      };
    }, { "../../lib": 515, "../../registry": 647, "./attributes": 936, "./constants": 940, "./fillcolor_defaults": 944, "./line_defaults": 949, "./line_shape_defaults": 951, "./marker_defaults": 955, "./period_defaults": 956, "./stack_defaults": 959, "./subtypes": 961, "./text_defaults": 962, "./xy_defaults": 963 }], 944: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../../lib").isArrayOrTypedArray;
      Q.exports = function(k, x, e, r) {
        var n = !1;
        if (x.marker) {
          var s = x.marker.color, t = (x.marker.line || {}).color;
          s && !g(s) ? n = s : t && !g(t) && (n = t);
        }
        r("fillcolor", m.addOpacity((x.line || {}).color || n || e, 0.5));
      };
    }, { "../../components/color": 367, "../../lib": 515 }], 945: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes");
      Q.exports = function(g, k, x) {
        var e = {}, r = { _fullLayout: x }, n = m.getFromTrace(r, k, "x"), s = m.getFromTrace(r, k, "y");
        return e.xLabel = m.tickText(n, n.c2l(g.x), !0).text, e.yLabel = m.tickText(s, s.c2l(g.y), !0).text, e;
      };
    }, { "../../plots/cartesian/axes": 566 }], 946: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("./subtypes");
      Q.exports = function(k, x) {
        var e, r;
        if (k.mode === "lines")
          return (e = k.line.color) && m.opacity(e) ? e : k.fillcolor;
        if (k.mode === "none")
          return k.fill ? k.fillcolor : "";
        var n = x.mcc || (k.marker || {}).color, s = x.mlcc || ((k.marker || {}).line || {}).color;
        return (r = n && m.opacity(n) ? n : s && m.opacity(s) && (x.mlw || ((k.marker || {}).line || {}).width) ? s : "") ? m.opacity(r) < 0.3 ? m.addOpacity(r, 0.3) : r : (e = (k.line || {}).color) && m.opacity(e) && g.hasLines(k) && k.line.width ? e : k.fillcolor;
      };
    }, { "../../components/color": 367, "./subtypes": 961 }], 947: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/fx"), k = v("../../registry"), x = v("./get_trace_color"), e = v("../../components/color"), r = m.fillText;
      Q.exports = function(n, s, t, d) {
        var u = n.cd, o = u[0].trace, h = n.xa, l = n.ya, i = h.c2p(s), p = l.c2p(t), c = [i, p], a = o.hoveron || "", y = o.mode.indexOf("markers") !== -1 ? 3 : 0.5, f = !!o.xperiodalignment, _ = !!o.yperiodalignment;
        if (a.indexOf("points") !== -1) {
          var b = function(oe) {
            var ve = Math.max(y, oe.mrc || 0), ue = h.c2p(oe.x) - i, ye = l.c2p(oe.y) - p;
            return Math.max(Math.sqrt(ue * ue + ye * ye) - ve, 1 - y / ve);
          }, w = g.getDistanceFunction(d, function(oe) {
            if (f) {
              var ve = h.c2p(oe.xStart), ue = h.c2p(oe.xEnd);
              return i >= Math.min(ve, ue) && i <= Math.max(ve, ue) ? 0 : 1 / 0;
            }
            var ye = Math.max(3, oe.mrc || 0), Ae = 1 - 1 / ye, pe = Math.abs(h.c2p(oe.x) - i);
            return pe < ye ? Ae * pe / ye : pe - ye + Ae;
          }, function(oe) {
            if (_) {
              var ve = l.c2p(oe.yStart), ue = l.c2p(oe.yEnd);
              return p >= Math.min(ve, ue) && p <= Math.max(ve, ue) ? 0 : 1 / 0;
            }
            var ye = Math.max(3, oe.mrc || 0), Ae = 1 - 1 / ye, pe = Math.abs(l.c2p(oe.y) - p);
            return pe < ye ? Ae * pe / ye : pe - ye + Ae;
          }, b);
          if (g.getClosest(u, w, n), n.index !== !1) {
            var T = u[n.index], L = h.c2p(T.x, !0), A = l.c2p(T.y, !0), I = T.mrc || 1;
            n.index = T.i;
            var P = u[0].t.orientation, S = P && (T.sNorm || T.s), E = P === "h" ? S : T.orig_x !== void 0 ? T.orig_x : T.x, R = P === "v" ? S : T.orig_y !== void 0 ? T.orig_y : T.y;
            return m.extendFlat(n, { color: x(o, T), x0: L - I, x1: L + I, xLabelVal: E, y0: A - I, y1: A + I, yLabelVal: R, spikeDistance: b(T), hovertemplate: o.hovertemplate }), r(T, o, n), k.getComponentMethod("errorbars", "hoverInfo")(T, o, n), [n];
          }
        }
        if (a.indexOf("fills") !== -1 && o._polygons) {
          var z, j, H, Y, J, W, Z, re, V, B = o._polygons, U = [], ee = !1, N = 1 / 0, K = -1 / 0, X = 1 / 0, te = -1 / 0;
          for (z = 0; z < B.length; z++)
            (H = B[z]).contains(c) && (ee = !ee, U.push(H), X = Math.min(X, H.ymin), te = Math.max(te, H.ymax));
          if (ee) {
            var ie = ((X = Math.max(X, 0)) + (te = Math.min(te, l._length))) / 2;
            for (z = 0; z < U.length; z++)
              for (Y = U[z].pts, j = 1; j < Y.length; j++)
                (re = Y[j - 1][1]) > ie != (V = Y[j][1]) >= ie && (W = Y[j - 1][0], Z = Y[j][0], V - re && (J = W + (Z - W) * (ie - re) / (V - re), N = Math.min(N, J), K = Math.max(K, J)));
            N = Math.max(N, 0), K = Math.min(K, h._length);
            var le = e.defaultLine;
            return e.opacity(o.fillcolor) ? le = o.fillcolor : e.opacity((o.line || {}).color) && (le = o.line.color), m.extendFlat(n, { distance: n.maxHoverDistance, x0: N, x1: K, y0: ie, y1: ie, color: le, hovertemplate: !1 }), delete n.index, o.text && !Array.isArray(o.text) ? n.text = String(o.text) : n.text = o.name, [n];
          }
        }
      };
    }, { "../../components/color": 367, "../../components/fx": 407, "../../lib": 515, "../../registry": 647, "./get_trace_color": 946 }], 948: [function(v, Q, $) {
      var m = v("./subtypes");
      Q.exports = { hasLines: m.hasLines, hasMarkers: m.hasMarkers, hasText: m.hasText, isBubble: m.isBubble, attributes: v("./attributes"), supplyDefaults: v("./defaults"), crossTraceDefaults: v("./cross_trace_defaults"), calc: v("./calc").calc, crossTraceCalc: v("./cross_trace_calc"), arraysToCalcdata: v("./arrays_to_calcdata"), plot: v("./plot"), colorbar: v("./marker_colorbar"), formatLabels: v("./format_labels"), style: v("./style").style, styleOnSelect: v("./style").styleOnSelect, hoverPoints: v("./hover"), selectPoints: v("./select"), animatable: !0, moduleType: "trace", name: "scatter", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "symbols", "errorBarsOK", "showLegend", "scatter-like", "zoomScale"], meta: {} };
    }, { "../../plots/cartesian": 578, "./arrays_to_calcdata": 935, "./attributes": 936, "./calc": 937, "./cross_trace_calc": 941, "./cross_trace_defaults": 942, "./defaults": 943, "./format_labels": 945, "./hover": 947, "./marker_colorbar": 954, "./plot": 957, "./select": 958, "./style": 960, "./subtypes": 961 }], 949: [function(v, Q, $) {
      var m = v("../../lib").isArrayOrTypedArray, g = v("../../components/colorscale/helpers").hasColorscale, k = v("../../components/colorscale/defaults");
      Q.exports = function(x, e, r, n, s, t) {
        t || (t = {});
        var d = (x.marker || {}).color;
        s("line.color", r), g(x, "line") ? k(x, e, n, s, { prefix: "line.", cLetter: "c" }) : s("line.color", !m(d) && d || r), s("line.width"), t.noDash || s("line.dash"), t.backoff && s("line.backoff");
      };
    }, { "../../components/colorscale/defaults": 377, "../../components/colorscale/helpers": 378, "../../lib": 515 }], 950: [function(v, Q, $) {
      var m = v("../../components/drawing"), g = v("../../constants/numerical"), k = g.BADNUM, x = g.LOG_CLIP, e = x + 0.5, r = x - 0.5, n = v("../../lib"), s = n.segmentsIntersect, t = n.constrain, d = v("./constants");
      Q.exports = function(u, o) {
        var h, l, i, p, c, a, y, f, _, b, w, T, L, A, I, P, S, E, R = o.trace || {}, z = o.xaxis, j = o.yaxis, H = z.type === "log", Y = j.type === "log", J = z._length, W = j._length, Z = o.backoff, re = R.marker, V = o.connectGaps, B = o.baseTolerance, U = o.shape, ee = U === "linear", N = R.fill && R.fill !== "none", K = [], X = d.minTolerance, te = u.length, ie = new Array(te), le = 0;
        function oe(It) {
          var Be = u[It];
          if (!Be)
            return !1;
          var He = o.linearized ? z.l2p(Be.x) : z.c2p(Be.x), he = o.linearized ? j.l2p(Be.y) : j.c2p(Be.y);
          if (He === k) {
            if (H && (He = z.c2p(Be.x, !0)), He === k)
              return !1;
            Y && he === k && (He *= Math.abs(z._m * W * (z._m > 0 ? e : r) / (j._m * J * (j._m > 0 ? e : r)))), He *= 1e3;
          }
          if (he === k) {
            if (Y && (he = j.c2p(Be.y, !0)), he === k)
              return !1;
            he *= 1e3;
          }
          return [He, he];
        }
        function ve(It, Be, He, he) {
          var be = He - It, Re = he - Be, Ue = 0.5 - It, Xe = 0.5 - Be, qe = be * be + Re * Re, st = be * Ue + Re * Xe;
          if (st > 0 && st < qe) {
            var it = Ue * Re - Xe * be;
            if (it * it < qe)
              return !0;
          }
        }
        function ue(It, Be) {
          var He = It[0] / J, he = It[1] / W, be = Math.max(0, -He, He - 1, -he, he - 1);
          return be && S !== void 0 && ve(He, he, S, E) && (be = 0), be && Be && ve(He, he, Be[0] / J, Be[1] / W) && (be = 0), (1 + d.toleranceGrowth * be) * B;
        }
        function ye(It, Be) {
          var He = It[0] - Be[0], he = It[1] - Be[1];
          return Math.sqrt(He * He + he * he);
        }
        var Ae, pe, ge, we, se, de, Te, Ee = d.maxScreensAway, Me = -J * Ee, ze = J * (1 + Ee), Ie = -W * Ee, Oe = W * (1 + Ee), Ze = [[Me, Ie, ze, Ie], [ze, Ie, ze, Oe], [ze, Oe, Me, Oe], [Me, Oe, Me, Ie]];
        function Fe(It) {
          if (It[0] < Me || It[0] > ze || It[1] < Ie || It[1] > Oe)
            return [t(It[0], Me, ze), t(It[1], Ie, Oe)];
        }
        function Pe(It, Be) {
          return It[0] === Be[0] && (It[0] === Me || It[0] === ze) || It[1] === Be[1] && (It[1] === Ie || It[1] === Oe) || void 0;
        }
        function De(It, Be, He) {
          return function(he, be) {
            var Re = Fe(he), Ue = Fe(be), Xe = [];
            if (Re && Ue && Pe(Re, Ue))
              return Xe;
            Re && Xe.push(Re), Ue && Xe.push(Ue);
            var qe = 2 * n.constrain((he[It] + be[It]) / 2, Be, He) - ((Re || he)[It] + (Ue || be)[It]);
            return qe && ((Re && Ue ? qe > 0 == Re[It] > Ue[It] ? Re : Ue : Re || Ue)[It] += qe), Xe;
          };
        }
        function Ge(It) {
          var Be = It[0], He = It[1], he = Be === ie[le - 1][0], be = He === ie[le - 1][1];
          if (!he || !be)
            if (le > 1) {
              var Re = Be === ie[le - 2][0], Ue = He === ie[le - 2][1];
              he && (Be === Me || Be === ze) && Re ? Ue ? le-- : ie[le - 1] = It : be && (He === Ie || He === Oe) && Ue ? Re ? le-- : ie[le - 1] = It : ie[le++] = It;
            } else
              ie[le++] = It;
        }
        function Qe(It) {
          ie[le - 1][0] !== It[0] && ie[le - 1][1] !== It[1] && Ge([ge, we]), Ge(It), se = null, ge = we = 0;
        }
        U === "linear" || U === "spline" ? Te = function(It, Be) {
          for (var He = [], he = 0, be = 0; be < 4; be++) {
            var Re = Ze[be], Ue = s(It[0], It[1], Be[0], Be[1], Re[0], Re[1], Re[2], Re[3]);
            Ue && (!he || Math.abs(Ue.x - He[0][0]) > 1 || Math.abs(Ue.y - He[0][1]) > 1) && (Ue = [Ue.x, Ue.y], he && ye(Ue, It) < ye(He[0], It) ? He.unshift(Ue) : He.push(Ue), he++);
          }
          return He;
        } : U === "hv" || U === "vh" ? Te = function(It, Be) {
          var He = [], he = Fe(It), be = Fe(Be);
          return he && be && Pe(he, be) || (he && He.push(he), be && He.push(be)), He;
        } : U === "hvh" ? Te = De(0, Me, ze) : U === "vhv" && (Te = De(1, Ie, Oe));
        var ot = n.isArrayOrTypedArray(re);
        function vt(It) {
          if (It && Z && (It.i = h, It.d = u, It.trace = R, It.marker = ot ? re[It.i] : re, It.backoff = Z), S = It[0] / J, E = It[1] / W, Ae = It[0] < Me ? Me : It[0] > ze ? ze : 0, pe = It[1] < Ie ? Ie : It[1] > Oe ? Oe : 0, Ae || pe) {
            if (le)
              if (se) {
                var Be = Te(se, It);
                Be.length > 1 && (Qe(Be[0]), ie[le++] = Be[1]);
              } else
                de = Te(ie[le - 1], It)[0], ie[le++] = de;
            else
              ie[le++] = [Ae || It[0], pe || It[1]];
            var He = ie[le - 1];
            Ae && pe && (He[0] !== Ae || He[1] !== pe) ? (se && (ge !== Ae && we !== pe ? Ge(ge && we ? (he = se, Re = (be = It)[0] - he[0], Ue = (be[1] - he[1]) / Re, (he[1] * be[0] - be[1] * he[0]) / Re > 0 ? [Ue > 0 ? Me : ze, Oe] : [Ue > 0 ? ze : Me, Ie]) : [ge || Ae, we || pe]) : ge && we && Ge([ge, we])), Ge([Ae, pe])) : ge - Ae && we - pe && Ge([Ae || ge, pe || we]), se = It, ge = Ae, we = pe;
          } else
            se && Qe(Te(se, It)[0]), ie[le++] = It;
          var he, be, Re, Ue;
        }
        for (h = 0; h < te; h++)
          if (l = oe(h)) {
            for (le = 0, se = null, vt(l), h++; h < te; h++) {
              if (!(p = oe(h))) {
                if (V)
                  continue;
                break;
              }
              if (ee && o.simplify) {
                var bt = oe(h + 1);
                if (b = ye(p, l), N && (le === 0 || le === te - 1) || !(b < ue(p, bt) * X)) {
                  for (f = [(p[0] - l[0]) / b, (p[1] - l[1]) / b], c = l, w = b, T = A = I = 0, y = !1, i = p, h++; h < u.length; h++) {
                    if (a = bt, bt = oe(h + 1), !a) {
                      if (V)
                        continue;
                      break;
                    }
                    if (P = (_ = [a[0] - l[0], a[1] - l[1]])[0] * f[1] - _[1] * f[0], A = Math.min(A, P), (I = Math.max(I, P)) - A > ue(a, bt))
                      break;
                    i = a, (L = _[0] * f[0] + _[1] * f[1]) > w ? (w = L, p = a, y = !1) : L < T && (T = L, c = a, y = !0);
                  }
                  if (y ? (vt(p), i !== c && vt(c)) : (c !== l && vt(c), i !== p && vt(p)), vt(i), h >= u.length || !a)
                    break;
                  vt(a), l = a;
                }
              } else
                vt(p);
            }
            se && Ge([ge || se[0], we || se[1]]), K.push(ie.slice(0, le));
          }
        var yt = U.slice(U.length - 1);
        if (Z && yt !== "h" && yt !== "v") {
          for (var tt = !1, Ke = -1, mt = [], Ft = 0; Ft < K.length; Ft++)
            for (var Vt = 0; Vt < K[Ft].length - 1; Vt++) {
              var Xt = K[Ft][Vt], Gt = K[Ft][Vt + 1], nr = m.applyBackoff(Gt, Xt);
              nr[0] === Gt[0] && nr[1] === Gt[1] || (tt = !0), mt[Ke + 1] || (mt[++Ke] = [Xt, [nr[0], nr[1]]]);
            }
          return tt ? mt : K;
        }
        return K;
      };
    }, { "../../components/drawing": 389, "../../constants/numerical": 491, "../../lib": 515, "./constants": 940 }], 951: [function(v, Q, $) {
      Q.exports = function(m, g, k) {
        k("line.shape") === "spline" && k("line.smoothing");
      };
    }, {}], 952: [function(v, Q, $) {
      var m = { tonextx: 1, tonexty: 1, tonext: 1 };
      Q.exports = function(g, k, x) {
        var e, r, n, s, t, d = {}, u = !1, o = -1, h = 0, l = -1;
        for (r = 0; r < x.length; r++)
          (n = (e = x[r][0].trace).stackgroup || "") ? n in d ? t = d[n] : (t = d[n] = h, h++) : e.fill in m && l >= 0 ? t = l : (t = l = h, h++), t < o && (u = !0), e._groupIndex = o = t;
        var i = x.slice();
        u && i.sort(function(c, a) {
          var y = c[0].trace, f = a[0].trace;
          return y._groupIndex - f._groupIndex || y.index - f.index;
        });
        var p = {};
        for (r = 0; r < i.length; r++)
          n = (e = i[r][0].trace).stackgroup || "", e.visible === !0 ? (e._nexttrace = null, e.fill in m && (s = p[n], e._prevtrace = s || null, s && (s._nexttrace = e)), e._ownfill = e.fill && (e.fill.substr(0, 6) === "tozero" || e.fill === "toself" || e.fill.substr(0, 2) === "to" && !e._prevtrace), p[n] = e) : e._prevtrace = e._nexttrace = e._ownfill = null;
        return i;
      };
    }, {}], 953: [function(v, Q, $) {
      var m = v("fast-isnumeric");
      Q.exports = function(g, k) {
        k || (k = 2);
        var x = g.marker, e = x.sizeref || 1, r = x.sizemin || 0, n = x.sizemode === "area" ? function(s) {
          return Math.sqrt(s / e);
        } : function(s) {
          return s / e;
        };
        return function(s) {
          var t = n(s / k);
          return m(t) && t > 0 ? Math.max(t, r) : 0;
        };
      };
    }, { "fast-isnumeric": 190 }], 954: [function(v, Q, $) {
      Q.exports = { container: "marker", min: "cmin", max: "cmax" };
    }, {}], 955: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../../components/colorscale/helpers").hasColorscale, k = v("../../components/colorscale/defaults"), x = v("./subtypes");
      Q.exports = function(e, r, n, s, t, d) {
        var u = x.isBubble(e), o = (e.line || {}).color;
        d = d || {}, o && (n = o), t("marker.symbol"), t("marker.opacity", u ? 0.7 : 1), t("marker.size"), d.noAngle || (t("marker.angle"), d.noAngleRef || t("marker.angleref"), d.noStandOff || t("marker.standoff")), t("marker.color", n), g(e, "marker") && k(e, r, s, t, { prefix: "marker.", cLetter: "c" }), d.noSelect || (t("selected.marker.color"), t("unselected.marker.color"), t("selected.marker.size"), t("unselected.marker.size")), d.noLine || (t("marker.line.color", o && !Array.isArray(o) && r.marker.color !== o ? o : u ? m.background : m.defaultLine), g(e, "marker.line") && k(e, r, s, t, { prefix: "marker.line.", cLetter: "c" }), t("marker.line.width", u ? 1 : 0)), u && (t("marker.sizeref"), t("marker.sizemin"), t("marker.sizemode")), d.gradient && t("marker.gradient.type") !== "none" && t("marker.gradient.color");
      };
    }, { "../../components/color": 367, "../../components/colorscale/defaults": 377, "../../components/colorscale/helpers": 378, "./subtypes": 961 }], 956: [function(v, Q, $) {
      var m = v("../../lib").dateTick0, g = v("../../constants/numerical").ONEWEEK;
      function k(x, e) {
        return m(e, x % g == 0 ? 1 : 0);
      }
      Q.exports = function(x, e, r, n, s) {
        if (s || (s = { x: !0, y: !0 }), s.x) {
          var t = n("xperiod");
          t && (n("xperiod0", k(t, e.xcalendar)), n("xperiodalignment"));
        }
        if (s.y) {
          var d = n("yperiod");
          d && (n("yperiod0", k(d, e.ycalendar)), n("yperiodalignment"));
        }
      };
    }, { "../../constants/numerical": 491, "../../lib": 515 }], 957: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../lib"), x = k.ensureSingle, e = k.identity, r = v("../../components/drawing"), n = v("./subtypes"), s = v("./line_points"), t = v("./link_traces"), d = v("../../lib/polygon").tester;
      function u(o, h, l, i, p, c, a) {
        var y;
        (function(de, Te, Ee, Me, ze) {
          var Ie = Ee.xaxis, Oe = Ee.yaxis, Ze = m.extent(k.simpleMap(Ie.range, Ie.r2c)), Fe = m.extent(k.simpleMap(Oe.range, Oe.r2c)), Pe = Me[0].trace;
          if (!!n.hasMarkers(Pe)) {
            var De = Pe.marker.maxdisplayed;
            if (De !== 0) {
              var Ge = Me.filter(function(bt) {
                return bt.x >= Ze[0] && bt.x <= Ze[1] && bt.y >= Fe[0] && bt.y <= Fe[1];
              }), Qe = Math.ceil(Ge.length / De), ot = 0;
              ze.forEach(function(bt, yt) {
                var tt = bt[0].trace;
                n.hasMarkers(tt) && tt.marker.maxdisplayed > 0 && yt < Te && ot++;
              });
              var vt = Math.round(ot * Qe / 3 + Math.floor(ot / 3) * Qe / 7.1);
              Me.forEach(function(bt) {
                delete bt.vis;
              }), Ge.forEach(function(bt, yt) {
                Math.round((yt + vt) % Qe) === 0 && (bt.vis = !0);
              });
            }
          }
        })(0, h, l, i, p);
        var f = !!a && a.duration > 0;
        function _(de) {
          return f ? de.transition() : de;
        }
        var b = l.xaxis, w = l.yaxis, T = i[0].trace, L = T.line, A = m.select(c), I = x(A, "g", "errorbars"), P = x(A, "g", "lines"), S = x(A, "g", "points"), E = x(A, "g", "text");
        if (g.getComponentMethod("errorbars", "plot")(o, I, l, a), T.visible === !0) {
          var R, z;
          _(A).style("opacity", T.opacity);
          var j = T.fill.charAt(T.fill.length - 1);
          j !== "x" && j !== "y" && (j = ""), i[0][l.isRangePlot ? "nodeRangePlot3" : "node3"] = A;
          var H, Y, J = "", W = [], Z = T._prevtrace;
          Z && (J = Z._prevRevpath || "", z = Z._nextFill, W = Z._polygons);
          var re, V, B, U, ee, N, K, X = "", te = "", ie = [], le = k.noop;
          if (R = T._ownFill, n.hasLines(T) || T.fill !== "none") {
            for (z && z.datum(i), ["hv", "vh", "hvh", "vhv"].indexOf(L.shape) !== -1 ? (re = r.steps(L.shape), V = r.steps(L.shape.split("").reverse().join(""))) : re = V = L.shape === "spline" ? function(de) {
              var Te = de[de.length - 1];
              return de.length > 1 && de[0][0] === Te[0] && de[0][1] === Te[1] ? r.smoothclosed(de.slice(1), L.smoothing) : r.smoothopen(de, L.smoothing);
            } : function(de) {
              return "M" + de.join("L");
            }, B = function(de) {
              return V(de.reverse());
            }, ie = s(i, { xaxis: b, yaxis: w, trace: T, connectGaps: T.connectgaps, baseTolerance: Math.max(L.width || 1, 3) / 4, shape: L.shape, backoff: L.backoff, simplify: L.simplify, fill: T.fill }), K = T._polygons = new Array(ie.length), y = 0; y < ie.length; y++)
              T._polygons[y] = d(ie[y]);
            ie.length && (U = ie[0][0], N = (ee = ie[ie.length - 1])[ee.length - 1]), le = function(de) {
              return function(Te) {
                if (H = re(Te), Y = B(Te), X ? j ? (X += "L" + H.substr(1), te = Y + "L" + te.substr(1)) : (X += "Z" + H, te = Y + "Z" + te) : (X = H, te = Y), n.hasLines(T) && Te.length > 1) {
                  var Ee = m.select(this);
                  if (Ee.datum(i), de)
                    _(Ee.style("opacity", 0).attr("d", H).call(r.lineGroupStyle)).style("opacity", 1);
                  else {
                    var Me = _(Ee);
                    Me.attr("d", H), r.singleLineStyle(i, Me);
                  }
                }
              };
            };
          }
          var oe = P.selectAll(".js-line").data(ie);
          _(oe.exit()).style("opacity", 0).remove(), oe.each(le(!1)), oe.enter().append("path").classed("js-line", !0).style("vector-effect", "non-scaling-stroke").call(r.lineGroupStyle).each(le(!0)), r.setClipUrl(oe, l.layerClipId, o), ie.length ? (R ? (R.datum(i), U && N && (j ? (j === "y" ? U[1] = N[1] = w.c2p(0, !0) : j === "x" && (U[0] = N[0] = b.c2p(0, !0)), _(R).attr("d", "M" + N + "L" + U + "L" + X.substr(1)).call(r.singleFillStyle, o)) : _(R).attr("d", X + "Z").call(r.singleFillStyle, o))) : z && (T.fill.substr(0, 6) === "tonext" && X && J ? (T.fill === "tonext" ? _(z).attr("d", X + "Z" + J + "Z").call(r.singleFillStyle, o) : _(z).attr("d", X + "L" + J.substr(1) + "Z").call(r.singleFillStyle, o), T._polygons = T._polygons.concat(W)) : (ue(z), T._polygons = null)), T._prevRevpath = te, T._prevPolygons = K) : (R ? ue(R) : z && ue(z), T._polygons = T._prevRevpath = T._prevPolygons = null), S.datum(i), E.datum(i), function(de, Te, Ee) {
            var Me, ze = Ee[0].trace, Ie = n.hasMarkers(ze), Oe = n.hasText(ze), Ze = we(ze), Fe = se, Pe = se;
            if (Ie || Oe) {
              var De = e, Ge = ze.stackgroup, Qe = Ge && o._fullLayout._scatterStackOpts[b._id + w._id][Ge].stackgaps === "infer zero";
              ze.marker.maxdisplayed || ze._needsCull ? De = Qe ? Ae : ye : Ge && !Qe && (De = pe), Ie && (Fe = De), Oe && (Pe = De);
            }
            var ot, vt = (Me = de.selectAll("path.point").data(Fe, Ze)).enter().append("path").classed("point", !0);
            f && vt.call(r.pointStyle, ze, o).call(r.translatePoints, b, w).style("opacity", 0).transition().style("opacity", 1), Me.order(), Ie && (ot = r.makePointStyleFns(ze)), Me.each(function(bt) {
              var yt = m.select(this), tt = _(yt);
              r.translatePoint(bt, tt, b, w) ? (r.singlePointStyle(bt, tt, ze, ot, o), l.layerClipId && r.hideOutsideRangePoint(bt, tt, b, w, ze.xcalendar, ze.ycalendar), ze.customdata && yt.classed("plotly-customdata", bt.data !== null && bt.data !== void 0)) : tt.remove();
            }), f ? Me.exit().transition().style("opacity", 0).remove() : Me.exit().remove(), (Me = Te.selectAll("g").data(Pe, Ze)).enter().append("g").classed("textpoint", !0).append("text"), Me.order(), Me.each(function(bt) {
              var yt = m.select(this), tt = _(yt.select("text"));
              r.translatePoint(bt, tt, b, w) ? l.layerClipId && r.hideOutsideRangePoint(bt, yt, b, w, ze.xcalendar, ze.ycalendar) : yt.remove();
            }), Me.selectAll("text").call(r.textPointStyle, ze, o).each(function(bt) {
              var yt = b.c2p(bt.x), tt = w.c2p(bt.y);
              m.select(this).selectAll("tspan.line").each(function() {
                _(m.select(this)).attr({ x: yt, y: tt });
              });
            }), Me.exit().remove();
          }(S, E, i);
          var ve = T.cliponaxis === !1 ? null : l.layerClipId;
          r.setClipUrl(S, ve, o), r.setClipUrl(E, ve, o);
        }
        function ue(de) {
          _(de).attr("d", "M0,0Z");
        }
        function ye(de) {
          return de.filter(function(Te) {
            return !Te.gap && Te.vis;
          });
        }
        function Ae(de) {
          return de.filter(function(Te) {
            return Te.vis;
          });
        }
        function pe(de) {
          return de.filter(function(Te) {
            return !Te.gap;
          });
        }
        function ge(de) {
          return de.id;
        }
        function we(de) {
          if (de.ids)
            return ge;
        }
        function se() {
          return !1;
        }
      }
      Q.exports = function(o, h, l, i, p, c) {
        var a, y, f = !p, _ = !!p && p.duration > 0, b = t(o, h, l);
        (a = i.selectAll("g.trace").data(b, function(w) {
          return w[0].trace.uid;
        })).enter().append("g").attr("class", function(w) {
          return "trace scatter trace" + w[0].trace.uid;
        }).style("stroke-miterlimit", 2), a.order(), function(w, T, L) {
          T.each(function(A) {
            var I = x(m.select(this), "g", "fills");
            r.setClipUrl(I, L.layerClipId, w);
            var P = A[0].trace, S = [];
            P._ownfill && S.push("_ownFill"), P._nexttrace && S.push("_nextFill");
            var E = I.selectAll("g").data(S, e);
            E.enter().append("g"), E.exit().each(function(R) {
              P[R] = null;
            }).remove(), E.order().each(function(R) {
              P[R] = x(m.select(this), "path", "js-fill");
            });
          });
        }(o, a, h), _ ? (c && (y = c()), m.transition().duration(p.duration).ease(p.easing).each("end", function() {
          y && y();
        }).each("interrupt", function() {
          y && y();
        }).each(function() {
          i.selectAll("g.trace").each(function(w, T) {
            u(o, T, h, w, b, this, p);
          });
        })) : a.each(function(w, T) {
          u(o, T, h, w, b, this, p);
        }), f && a.exit().remove(), i.selectAll("path:not([d])").remove();
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../lib/polygon": 527, "../../registry": 647, "./line_points": 950, "./link_traces": 952, "./subtypes": 961, "@plotly/d3": 58 }], 958: [function(v, Q, $) {
      var m = v("./subtypes");
      Q.exports = function(g, k) {
        var x, e, r, n, s = g.cd, t = g.xaxis, d = g.yaxis, u = [], o = s[0].trace;
        if (!m.hasMarkers(o) && !m.hasText(o))
          return [];
        if (k === !1)
          for (x = 0; x < s.length; x++)
            s[x].selected = 0;
        else
          for (x = 0; x < s.length; x++)
            e = s[x], r = t.c2p(e.x), n = d.c2p(e.y), e.i !== null && k.contains([r, n], !1, x, g) ? (u.push({ pointNumber: e.i, x: t.c2d(e.x), y: d.c2d(e.y) }), e.selected = 1) : e.selected = 0;
        return u;
      };
    }, { "./subtypes": 961 }], 959: [function(v, Q, $) {
      var m = ["orientation", "groupnorm", "stackgaps"];
      Q.exports = function(g, k, x, e) {
        var r = x._scatterStackOpts, n = e("stackgroup");
        if (n) {
          var s = k.xaxis + k.yaxis, t = r[s];
          t || (t = r[s] = {});
          var d = t[n], u = !1;
          d ? d.traces.push(k) : (d = t[n] = { traceIndices: [], traces: [k] }, u = !0);
          for (var o = { orientation: k.x && !k.y ? "h" : "v" }, h = 0; h < m.length; h++) {
            var l = m[h], i = l + "Found";
            if (!d[i]) {
              var p = g[l] !== void 0, c = l === "orientation";
              if ((p || u) && (d[l] = e(l, o[l]), c && (d.fillDflt = d[l] === "h" ? "tonextx" : "tonexty"), p && (d[i] = !0, !u && (delete d.traces[0][l], c))))
                for (var a = 0; a < d.traces.length - 1; a++) {
                  var y = d.traces[a];
                  y._input.fill !== y.fill && (y.fill = d.fillDflt);
                }
            }
          }
          return d;
        }
      };
    }, {}], 960: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../../registry");
      function x(r, n, s) {
        g.pointStyle(r.selectAll("path.point"), n, s);
      }
      function e(r, n, s) {
        g.textPointStyle(r.selectAll("text"), n, s);
      }
      Q.exports = { style: function(r) {
        var n = m.select(r).selectAll("g.trace.scatter");
        n.style("opacity", function(s) {
          return s[0].trace.opacity;
        }), n.selectAll("g.points").each(function(s) {
          x(m.select(this), s.trace || s[0].trace, r);
        }), n.selectAll("g.text").each(function(s) {
          e(m.select(this), s.trace || s[0].trace, r);
        }), n.selectAll("g.trace path.js-line").call(g.lineGroupStyle), n.selectAll("g.trace path.js-fill").call(g.fillGroupStyle, r), k.getComponentMethod("errorbars", "style")(n);
      }, stylePoints: x, styleText: e, styleOnSelect: function(r, n, s) {
        var t = n[0].trace;
        t.selectedpoints ? (g.selectedPointStyle(s.selectAll("path.point"), t), g.selectedTextStyle(s.selectAll("text"), t)) : (x(s, t, r), e(s, t, r));
      } };
    }, { "../../components/drawing": 389, "../../registry": 647, "@plotly/d3": 58 }], 961: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = { hasLines: function(g) {
        return g.visible && g.mode && g.mode.indexOf("lines") !== -1;
      }, hasMarkers: function(g) {
        return g.visible && (g.mode && g.mode.indexOf("markers") !== -1 || g.type === "splom");
      }, hasText: function(g) {
        return g.visible && g.mode && g.mode.indexOf("text") !== -1;
      }, isBubble: function(g) {
        return m.isPlainObject(g.marker) && m.isArrayOrTypedArray(g.marker.size);
      } };
    }, { "../../lib": 515 }], 962: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k, x, e, r) {
        r = r || {}, e("textposition"), m.coerceFont(e, "textfont", x.font), r.noSelect || (e("selected.textfont.color"), e("unselected.textfont.color"));
      };
    }, { "../../lib": 515 }], 963: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry");
      Q.exports = function(k, x, e, r) {
        var n, s = r("x"), t = r("y");
        if (g.getComponentMethod("calendars", "handleTraceDefaults")(k, x, ["x", "y"], e), s) {
          var d = m.minRowLength(s);
          t ? n = Math.min(d, m.minRowLength(t)) : (n = d, r("y0"), r("dy"));
        } else {
          if (!t)
            return 0;
          n = m.minRowLength(t), r("x0"), r("dx");
        }
        return x._length = n, n;
      };
    }, { "../../lib": 515, "../../registry": 647 }], 964: [function(v, Q, $) {
      var m = v("../scatter/attributes"), g = v("../../components/colorscale/attributes"), k = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, x = v("../../plots/template_attributes").hovertemplateAttrs, e = v("../../plots/template_attributes").texttemplateAttrs, r = v("../../plots/attributes"), n = v("../../constants/gl3d_dashes"), s = v("../../constants/gl3d_markers"), t = v("../../lib/extend").extendFlat, d = v("../../plot_api/edit_types").overrideAll, u = v("../../lib/sort_object_keys"), o = m.line, h = m.marker, l = h.line, i = t({ width: o.width, dash: { valType: "enumerated", values: u(n), dflt: "solid" } }, g("line")), p = Q.exports = d({ x: m.x, y: m.y, z: { valType: "data_array" }, text: t({}, m.text, {}), texttemplate: e({}, {}), hovertext: t({}, m.hovertext, {}), hovertemplate: x(), xhoverformat: k("x"), yhoverformat: k("y"), zhoverformat: k("z"), mode: t({}, m.mode, { dflt: "lines+markers" }), surfaceaxis: { valType: "enumerated", values: [-1, 0, 1, 2], dflt: -1 }, surfacecolor: { valType: "color" }, projection: { x: { show: { valType: "boolean", dflt: !1 }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, scale: { valType: "number", min: 0, max: 10, dflt: 2 / 3 } }, y: { show: { valType: "boolean", dflt: !1 }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, scale: { valType: "number", min: 0, max: 10, dflt: 2 / 3 } }, z: { show: { valType: "boolean", dflt: !1 }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, scale: { valType: "number", min: 0, max: 10, dflt: 2 / 3 } } }, connectgaps: m.connectgaps, line: i, marker: t({ symbol: { valType: "enumerated", values: u(s), dflt: "circle", arrayOk: !0 }, size: t({}, h.size, { dflt: 8 }), sizeref: h.sizeref, sizemin: h.sizemin, sizemode: h.sizemode, opacity: t({}, h.opacity, { arrayOk: !1 }), colorbar: h.colorbar, line: t({ width: t({}, l.width, { arrayOk: !1 }) }, g("marker.line")) }, g("marker")), textposition: t({}, m.textposition, { dflt: "top center" }), textfont: { color: m.textfont.color, size: m.textfont.size, family: t({}, m.textfont.family, { arrayOk: !1 }) }, opacity: r.opacity, hoverinfo: t({}, r.hoverinfo) }, "calc", "nested");
      p.x.editType = p.y.editType = p.z.editType = "calc+clearAxisTypes";
    }, { "../../components/colorscale/attributes": 374, "../../constants/gl3d_dashes": 488, "../../constants/gl3d_markers": 489, "../../lib/extend": 505, "../../lib/sort_object_keys": 538, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 965: [function(v, Q, $) {
      var m = v("../scatter/arrays_to_calcdata"), g = v("../scatter/colorscale_calc");
      Q.exports = function(k, x) {
        var e = [{ x: !1, y: !1, trace: x, t: {} }];
        return m(e, x), g(k, x), e;
      };
    }, { "../scatter/arrays_to_calcdata": 935, "../scatter/colorscale_calc": 939 }], 966: [function(v, Q, $) {
      var m = v("../../registry");
      function g(k, x, e, r) {
        if (!x || !x.visible)
          return null;
        for (var n = m.getComponentMethod("errorbars", "makeComputeError")(x), s = new Array(k.length), t = 0; t < k.length; t++) {
          var d = n(+k[t], t);
          if (r.type === "log") {
            var u = r.c2l(k[t]), o = k[t] - d[0], h = k[t] + d[1];
            if (s[t] = [(r.c2l(o, !0) - u) * e, (r.c2l(h, !0) - u) * e], o > 0) {
              var l = r.c2l(o);
              r._lowerLogErrorBound || (r._lowerLogErrorBound = l), r._lowerErrorBound = Math.min(r._lowerLogErrorBound, l);
            }
          } else
            s[t] = [-d[0] * e, d[1] * e];
        }
        return s;
      }
      Q.exports = function(k, x, e) {
        var r = [g(k.x, k.error_x, x[0], e.xaxis), g(k.y, k.error_y, x[1], e.yaxis), g(k.z, k.error_z, x[2], e.zaxis)], n = function(h) {
          for (var l = 0; l < h.length; l++)
            if (h[l])
              return h[l].length;
          return 0;
        }(r);
        if (n === 0)
          return null;
        for (var s = new Array(n), t = 0; t < n; t++) {
          for (var d = [[0, 0, 0], [0, 0, 0]], u = 0; u < 3; u++)
            if (r[u])
              for (var o = 0; o < 2; o++)
                d[o][u] = r[u][t][o];
          s[t] = d;
        }
        return s;
      };
    }, { "../../registry": 647 }], 967: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_line3d, g = v("../../../stackgl_modules").gl_scatter3d, k = v("../../../stackgl_modules").gl_error3d, x = v("../../../stackgl_modules").gl_mesh3d, e = v("../../../stackgl_modules").delaunay_triangulate, r = v("../../lib"), n = v("../../lib/str2rgbarray"), s = v("../../lib/gl_format_color").formatColor, t = v("../scatter/make_bubble_size_func"), d = v("../../constants/gl3d_dashes"), u = v("../../constants/gl3d_markers"), o = v("../../plots/cartesian/axes"), h = v("../../components/fx/helpers").appendArrayPointValue, l = v("./calc_errors");
      function i(L, A) {
        this.scene = L, this.uid = A, this.linePlot = null, this.scatterPlot = null, this.errorBars = null, this.textMarkers = null, this.delaunayMesh = null, this.color = null, this.mode = "", this.dataPoints = [], this.axesBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.textLabels = null, this.data = null;
      }
      var p = i.prototype;
      function c(L) {
        return L == null ? 0 : L.indexOf("left") > -1 ? -1 : L.indexOf("right") > -1 ? 1 : 0;
      }
      function a(L) {
        return L == null ? 0 : L.indexOf("top") > -1 ? -1 : L.indexOf("bottom") > -1 ? 1 : 0;
      }
      function y(L, A) {
        return A(4 * L);
      }
      function f(L) {
        return u[L];
      }
      function _(L, A, I, P, S) {
        var E = null;
        if (r.isArrayOrTypedArray(L)) {
          E = [];
          for (var R = 0; R < A; R++)
            L[R] === void 0 ? E[R] = P : E[R] = I(L[R], S);
        } else
          E = I(L, r.identity);
        return E;
      }
      function b(L, A) {
        var I, P, S, E, R, z, j = [], H = L.fullSceneLayout, Y = L.dataScale, J = H.xaxis, W = H.yaxis, Z = H.zaxis, re = A.marker, V = A.line, B = A.x || [], U = A.y || [], ee = A.z || [], N = B.length, K = A.xcalendar, X = A.ycalendar, te = A.zcalendar;
        for (R = 0; R < N; R++)
          I = J.d2l(B[R], 0, K) * Y[0], P = W.d2l(U[R], 0, X) * Y[1], S = Z.d2l(ee[R], 0, te) * Y[2], j[R] = [I, P, S];
        if (Array.isArray(A.text))
          z = A.text;
        else if (A.text !== void 0)
          for (z = new Array(N), R = 0; R < N; R++)
            z[R] = A.text;
        function ie(Me, ze) {
          var Ie = H[Me];
          return o.tickText(Ie, Ie.d2l(ze), !0).text;
        }
        var le = A.texttemplate;
        if (le) {
          var oe = L.fullLayout._d3locale, ve = Array.isArray(le), ue = ve ? Math.min(le.length, N) : N, ye = ve ? function(Me) {
            return le[Me];
          } : function() {
            return le;
          };
          for (z = new Array(ue), R = 0; R < ue; R++) {
            var Ae = { x: B[R], y: U[R], z: ee[R] }, pe = { xLabel: ie("xaxis", B[R]), yLabel: ie("yaxis", U[R]), zLabel: ie("zaxis", ee[R]) }, ge = {};
            h(ge, A, R);
            var we = A._meta || {};
            z[R] = r.texttemplateString(ye(R), pe, oe, ge, Ae, we);
          }
        }
        if (E = { position: j, mode: A.mode, text: z }, "line" in A && (E.lineColor = s(V, 1, N), E.lineWidth = V.width, E.lineDashes = V.dash), "marker" in A) {
          var se = t(A);
          E.scatterColor = s(re, 1, N), E.scatterSize = _(re.size, N, y, 20, se), E.scatterMarker = _(re.symbol, N, f, "\u25CF"), E.scatterLineWidth = re.line.width, E.scatterLineColor = s(re.line, 1, N), E.scatterAngle = 0;
        }
        "textposition" in A && (E.textOffset = function(Me) {
          var ze = [0, 0];
          if (Array.isArray(Me))
            for (var Ie = 0; Ie < Me.length; Ie++)
              ze[Ie] = [0, 0], Me[Ie] && (ze[Ie][0] = c(Me[Ie]), ze[Ie][1] = a(Me[Ie]));
          else
            ze[0] = c(Me), ze[1] = a(Me);
          return ze;
        }(A.textposition), E.textColor = s(A.textfont, 1, N), E.textSize = _(A.textfont.size, N, r.identity, 12), E.textFont = A.textfont.family, E.textAngle = 0);
        var de = ["x", "y", "z"];
        for (E.project = [!1, !1, !1], E.projectScale = [1, 1, 1], E.projectOpacity = [1, 1, 1], R = 0; R < 3; ++R) {
          var Te = A.projection[de[R]];
          (E.project[R] = Te.show) && (E.projectOpacity[R] = Te.opacity, E.projectScale[R] = Te.scale);
        }
        E.errorBounds = l(A, Y, H);
        var Ee = function(Me) {
          for (var ze = [0, 0, 0], Ie = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], Oe = [1, 1, 1], Ze = 0; Ze < 3; Ze++) {
            var Fe = Me[Ze];
            Fe && Fe.copy_zstyle !== !1 && Me[2].visible !== !1 && (Fe = Me[2]), Fe && Fe.visible && (ze[Ze] = Fe.width / 2, Ie[Ze] = n(Fe.color), Oe[Ze] = Fe.thickness);
          }
          return { capSize: ze, color: Ie, lineWidth: Oe };
        }([A.error_x, A.error_y, A.error_z]);
        return E.errorColor = Ee.color, E.errorLineWidth = Ee.lineWidth, E.errorCapSize = Ee.capSize, E.delaunayAxis = A.surfaceaxis, E.delaunayColor = n(A.surfacecolor), E;
      }
      function w(L) {
        if (r.isArrayOrTypedArray(L)) {
          var A = L[0];
          return r.isArrayOrTypedArray(A) && (L = A), "rgb(" + L.slice(0, 3).map(function(I) {
            return Math.round(255 * I);
          }) + ")";
        }
        return null;
      }
      function T(L) {
        return r.isArrayOrTypedArray(L) ? L.length === 4 && typeof L[0] == "number" ? w(L) : L.map(w) : null;
      }
      p.handlePick = function(L) {
        if (L.object && (L.object === this.linePlot || L.object === this.delaunayMesh || L.object === this.textMarkers || L.object === this.scatterPlot)) {
          var A = L.index = L.data.index;
          return L.object.highlight && L.object.highlight(null), this.scatterPlot && (L.object = this.scatterPlot, this.scatterPlot.highlight(L.data)), L.textLabel = "", this.textLabels && (Array.isArray(this.textLabels) ? (this.textLabels[A] || this.textLabels[A] === 0) && (L.textLabel = this.textLabels[A]) : L.textLabel = this.textLabels), L.traceCoordinate = [this.data.x[A], this.data.y[A], this.data.z[A]], !0;
        }
      }, p.update = function(L) {
        var A, I, P, S, E = this.scene.glplot.gl, R = d.solid;
        this.data = L;
        var z = b(this.scene, L);
        "mode" in z && (this.mode = z.mode), "lineDashes" in z && z.lineDashes in d && (R = d[z.lineDashes]), this.color = T(z.scatterColor) || T(z.lineColor), this.dataPoints = z.position, A = { gl: this.scene.glplot.gl, position: z.position, color: z.lineColor, lineWidth: z.lineWidth || 1, dashes: R[0], dashScale: R[1], opacity: L.opacity, connectGaps: L.connectgaps }, this.mode.indexOf("lines") !== -1 ? this.linePlot ? this.linePlot.update(A) : (this.linePlot = m(A), this.linePlot._trace = this, this.scene.glplot.add(this.linePlot)) : this.linePlot && (this.scene.glplot.remove(this.linePlot), this.linePlot.dispose(), this.linePlot = null);
        var j = L.opacity;
        if (L.marker && L.marker.opacity && (j *= L.marker.opacity), I = { gl: this.scene.glplot.gl, position: z.position, color: z.scatterColor, size: z.scatterSize, glyph: z.scatterMarker, opacity: j, orthographic: !0, lineWidth: z.scatterLineWidth, lineColor: z.scatterLineColor, project: z.project, projectScale: z.projectScale, projectOpacity: z.projectOpacity }, this.mode.indexOf("markers") !== -1 ? this.scatterPlot ? this.scatterPlot.update(I) : (this.scatterPlot = g(I), this.scatterPlot._trace = this, this.scatterPlot.highlightScale = 1, this.scene.glplot.add(this.scatterPlot)) : this.scatterPlot && (this.scene.glplot.remove(this.scatterPlot), this.scatterPlot.dispose(), this.scatterPlot = null), S = { gl: this.scene.glplot.gl, position: z.position, glyph: z.text, color: z.textColor, size: z.textSize, angle: z.textAngle, alignment: z.textOffset, font: z.textFont, orthographic: !0, lineWidth: 0, project: !1, opacity: L.opacity }, this.textLabels = L.hovertext || L.text, this.mode.indexOf("text") !== -1 ? this.textMarkers ? this.textMarkers.update(S) : (this.textMarkers = g(S), this.textMarkers._trace = this, this.textMarkers.highlightScale = 1, this.scene.glplot.add(this.textMarkers)) : this.textMarkers && (this.scene.glplot.remove(this.textMarkers), this.textMarkers.dispose(), this.textMarkers = null), P = { gl: this.scene.glplot.gl, position: z.position, color: z.errorColor, error: z.errorBounds, lineWidth: z.errorLineWidth, capSize: z.errorCapSize, opacity: L.opacity }, this.errorBars ? z.errorBounds ? this.errorBars.update(P) : (this.scene.glplot.remove(this.errorBars), this.errorBars.dispose(), this.errorBars = null) : z.errorBounds && (this.errorBars = k(P), this.errorBars._trace = this, this.scene.glplot.add(this.errorBars)), z.delaunayAxis >= 0) {
          var H = function(Y, J, W) {
            var Z, re = (W + 1) % 3, V = (W + 2) % 3, B = [], U = [];
            for (Z = 0; Z < Y.length; ++Z) {
              var ee = Y[Z];
              !isNaN(ee[re]) && isFinite(ee[re]) && !isNaN(ee[V]) && isFinite(ee[V]) && (B.push([ee[re], ee[V]]), U.push(Z));
            }
            var N = e(B);
            for (Z = 0; Z < N.length; ++Z)
              for (var K = N[Z], X = 0; X < K.length; ++X)
                K[X] = U[K[X]];
            return { positions: Y, cells: N, meshColor: J };
          }(z.position, z.delaunayColor, z.delaunayAxis);
          H.opacity = L.opacity, this.delaunayMesh ? this.delaunayMesh.update(H) : (H.gl = E, this.delaunayMesh = x(H), this.delaunayMesh._trace = this, this.scene.glplot.add(this.delaunayMesh));
        } else
          this.delaunayMesh && (this.scene.glplot.remove(this.delaunayMesh), this.delaunayMesh.dispose(), this.delaunayMesh = null);
      }, p.dispose = function() {
        this.linePlot && (this.scene.glplot.remove(this.linePlot), this.linePlot.dispose()), this.scatterPlot && (this.scene.glplot.remove(this.scatterPlot), this.scatterPlot.dispose()), this.errorBars && (this.scene.glplot.remove(this.errorBars), this.errorBars.dispose()), this.textMarkers && (this.scene.glplot.remove(this.textMarkers), this.textMarkers.dispose()), this.delaunayMesh && (this.scene.glplot.remove(this.delaunayMesh), this.delaunayMesh.dispose());
      }, Q.exports = function(L, A) {
        var I = new i(L, A.uid);
        return I.update(A), I;
      };
    }, { "../../../stackgl_modules": 1133, "../../components/fx/helpers": 403, "../../constants/gl3d_dashes": 488, "../../constants/gl3d_markers": 489, "../../lib": 515, "../../lib/gl_format_color": 511, "../../lib/str2rgbarray": 540, "../../plots/cartesian/axes": 566, "../scatter/make_bubble_size_func": 953, "./calc_errors": 966 }], 968: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../scatter/subtypes"), x = v("../scatter/marker_defaults"), e = v("../scatter/line_defaults"), r = v("../scatter/text_defaults"), n = v("./attributes");
      Q.exports = function(s, t, d, u) {
        function o(y, f) {
          return g.coerce(s, t, n, y, f);
        }
        if (function(y, f, _, b) {
          var w = 0, T = _("x"), L = _("y"), A = _("z");
          return m.getComponentMethod("calendars", "handleTraceDefaults")(y, f, ["x", "y", "z"], b), T && L && A && (w = Math.min(T.length, L.length, A.length), f._length = f._xlength = f._ylength = f._zlength = w), w;
        }(s, t, o, u)) {
          o("text"), o("hovertext"), o("hovertemplate"), o("xhoverformat"), o("yhoverformat"), o("zhoverformat"), o("mode"), k.hasLines(t) && (o("connectgaps"), e(s, t, d, u, o)), k.hasMarkers(t) && x(s, t, d, u, o, { noSelect: !0, noAngle: !0 }), k.hasText(t) && (o("texttemplate"), r(s, t, u, o, { noSelect: !0 }));
          var h = (t.line || {}).color, l = (t.marker || {}).color;
          o("surfaceaxis") >= 0 && o("surfacecolor", h || l);
          for (var i = ["x", "y", "z"], p = 0; p < 3; ++p) {
            var c = "projection." + i[p];
            o(c + ".show") && (o(c + ".opacity"), o(c + ".scale"));
          }
          var a = m.getComponentMethod("errorbars", "supplyDefaults");
          a(s, t, h || l || d, { axis: "z" }), a(s, t, h || l || d, { axis: "y", inherit: "z" }), a(s, t, h || l || d, { axis: "x", inherit: "z" });
        } else
          t.visible = !1;
      };
    }, { "../../lib": 515, "../../registry": 647, "../scatter/line_defaults": 949, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 964 }], 969: [function(v, Q, $) {
      Q.exports = { plot: v("./convert"), attributes: v("./attributes"), markerSymbols: v("../../constants/gl3d_markers"), supplyDefaults: v("./defaults"), colorbar: [{ container: "marker", min: "cmin", max: "cmax" }, { container: "line", min: "cmin", max: "cmax" }], calc: v("./calc"), moduleType: "trace", name: "scatter3d", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "symbols", "showLegend", "scatter-like"], meta: {} };
    }, { "../../constants/gl3d_markers": 489, "../../plots/gl3d": 607, "./attributes": 964, "./calc": 965, "./convert": 967, "./defaults": 968 }], 970: [function(v, Q, $) {
      var m = v("../scatter/attributes"), g = v("../../plots/attributes"), k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../../plots/template_attributes").texttemplateAttrs, e = v("../../components/colorscale/attributes"), r = v("../../lib/extend").extendFlat, n = m.marker, s = m.line, t = n.line;
      Q.exports = { carpet: { valType: "string", editType: "calc" }, a: { valType: "data_array", editType: "calc" }, b: { valType: "data_array", editType: "calc" }, mode: r({}, m.mode, { dflt: "markers" }), text: r({}, m.text, {}), texttemplate: x({ editType: "plot" }, { keys: ["a", "b", "text"] }), hovertext: r({}, m.hovertext, {}), line: { color: s.color, width: s.width, dash: s.dash, backoff: s.backoff, shape: r({}, s.shape, { values: ["linear", "spline"] }), smoothing: s.smoothing, editType: "calc" }, connectgaps: m.connectgaps, fill: r({}, m.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: m.fillcolor, marker: r({ symbol: n.symbol, opacity: n.opacity, maxdisplayed: n.maxdisplayed, angle: n.angle, angleref: n.angleref, standoff: n.standoff, size: n.size, sizeref: n.sizeref, sizemin: n.sizemin, sizemode: n.sizemode, line: r({ width: t.width, editType: "calc" }, e("marker.line")), gradient: n.gradient, editType: "calc" }, e("marker")), textfont: m.textfont, textposition: m.textposition, selected: m.selected, unselected: m.unselected, hoverinfo: r({}, g.hoverinfo, { flags: ["a", "b", "text", "name"] }), hoveron: m.hoveron, hovertemplate: k() };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 971: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../scatter/colorscale_calc"), k = v("../scatter/arrays_to_calcdata"), x = v("../scatter/calc_selection"), e = v("../scatter/calc").calcMarkerSize, r = v("../carpet/lookup_carpetid");
      Q.exports = function(n, s) {
        var t = s._carpetTrace = r(n, s);
        if (t && t.visible && t.visible !== "legendonly") {
          var d;
          s.xaxis = t.xaxis, s.yaxis = t.yaxis;
          var u, o, h = s._length, l = new Array(h), i = !1;
          for (d = 0; d < h; d++)
            if (u = s.a[d], o = s.b[d], m(u) && m(o)) {
              var p = t.ab2xy(+u, +o, !0), c = t.isVisible(+u, +o);
              c || (i = !0), l[d] = { x: p[0], y: p[1], a: u, b: o, vis: c };
            } else
              l[d] = { x: !1, y: !1 };
          return s._needsCull = i, l[0].carpet = t, l[0].trace = s, e(s, h), g(n, s), k(l, s), x(l, s), l;
        }
      };
    }, { "../carpet/lookup_carpetid": 717, "../scatter/arrays_to_calcdata": 935, "../scatter/calc": 937, "../scatter/calc_selection": 938, "../scatter/colorscale_calc": 939, "fast-isnumeric": 190 }], 972: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/constants"), k = v("../scatter/subtypes"), x = v("../scatter/marker_defaults"), e = v("../scatter/line_defaults"), r = v("../scatter/line_shape_defaults"), n = v("../scatter/text_defaults"), s = v("../scatter/fillcolor_defaults"), t = v("./attributes");
      Q.exports = function(d, u, o, h) {
        function l(y, f) {
          return m.coerce(d, u, t, y, f);
        }
        l("carpet"), u.xaxis = "x", u.yaxis = "y";
        var i = l("a"), p = l("b"), c = Math.min(i.length, p.length);
        if (c) {
          u._length = c, l("text"), l("texttemplate"), l("hovertext"), l("mode", c < g.PTS_LINESONLY ? "lines+markers" : "lines"), k.hasLines(u) && (e(d, u, o, h, l, { backoff: !0 }), r(d, u, l), l("connectgaps")), k.hasMarkers(u) && x(d, u, o, h, l, { gradient: !0 }), k.hasText(u) && n(d, u, h, l);
          var a = [];
          (k.hasMarkers(u) || k.hasText(u)) && (l("marker.maxdisplayed"), a.push("points")), l("fill"), u.fill !== "none" && (s(d, u, o, l), k.hasLines(u) || r(d, u, l)), u.fill !== "tonext" && u.fill !== "toself" || a.push("fills"), l("hoveron", a.join("+") || "points") !== "fills" && l("hovertemplate"), m.coerceSelectionMarkerOpacity(u, l);
        } else
          u.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/constants": 940, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/line_shape_defaults": 951, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 970 }], 973: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        var r = x[e];
        return m.a = r.a, m.b = r.b, m.y = r.y, m;
      };
    }, {}], 974: [function(v, Q, $) {
      Q.exports = function(m, g) {
        var k = {}, x = g._carpet, e = x.ab2ij([m.a, m.b]), r = Math.floor(e[0]), n = e[0] - r, s = Math.floor(e[1]), t = e[1] - s, d = x.evalxy([], r, s, n, t);
        return k.yLabel = d[1].toFixed(3), k;
      };
    }, {}], 975: [function(v, Q, $) {
      var m = v("../scatter/hover"), g = v("../../lib").fillText;
      Q.exports = function(k, x, e, r) {
        var n = m(k, x, e, r);
        if (n && n[0].index !== !1) {
          var s = n[0];
          if (s.index === void 0) {
            var t = 1 - s.y0 / k.ya._length, d = k.xa._length, u = d * t / 2, o = d - u;
            return s.x0 = Math.max(Math.min(s.x0, o), u), s.x1 = Math.max(Math.min(s.x1, o), u), n;
          }
          var h = s.cd[s.index];
          s.a = h.a, s.b = h.b, s.xLabelVal = void 0, s.yLabelVal = void 0;
          var l = s.trace, i = l._carpet, p = l._module.formatLabels(h, l);
          s.yLabel = p.yLabel, delete s.text;
          var c = [];
          if (!l.hovertemplate) {
            var a = (h.hi || l.hoverinfo).split("+");
            a.indexOf("all") !== -1 && (a = ["a", "b", "text"]), a.indexOf("a") !== -1 && y(i.aaxis, h.a), a.indexOf("b") !== -1 && y(i.baxis, h.b), c.push("y: " + s.yLabel), a.indexOf("text") !== -1 && g(h, l, c), s.extraText = c.join("<br>");
          }
          return n;
        }
        function y(f, _) {
          var b;
          b = f.labelprefix && f.labelprefix.length > 0 ? f.labelprefix.replace(/ = $/, "") : f._hovertitle, c.push(b + ": " + _.toFixed(3) + f.labelsuffix);
        }
      };
    }, { "../../lib": 515, "../scatter/hover": 947 }], 976: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), plot: v("./plot"), style: v("../scatter/style").style, styleOnSelect: v("../scatter/style").styleOnSelect, hoverPoints: v("./hover"), selectPoints: v("../scatter/select"), eventData: v("./event_data"), moduleType: "trace", name: "scattercarpet", basePlotModule: v("../../plots/cartesian"), categories: ["svg", "carpet", "symbols", "showLegend", "carpetDependent", "zoomScale"], meta: {} };
    }, { "../../plots/cartesian": 578, "../scatter/marker_colorbar": 954, "../scatter/select": 958, "../scatter/style": 960, "./attributes": 970, "./calc": 971, "./defaults": 972, "./event_data": 973, "./format_labels": 974, "./hover": 975, "./plot": 977 }], 977: [function(v, Q, $) {
      var m = v("../scatter/plot"), g = v("../../plots/cartesian/axes"), k = v("../../components/drawing");
      Q.exports = function(x, e, r, n) {
        var s, t, d, u = r[0][0].carpet, o = g.getFromId(x, u.xaxis || "x"), h = g.getFromId(x, u.yaxis || "y"), l = { xaxis: o, yaxis: h, plot: e.plot };
        for (s = 0; s < r.length; s++)
          (t = r[s][0].trace)._xA = o, t._yA = h;
        for (m(x, l, r, n), s = 0; s < r.length; s++)
          t = r[s][0].trace, d = n.selectAll("g.trace" + t.uid + " .js-line"), k.setClipUrl(d, r[s][0].carpet._clipPathId, x);
      };
    }, { "../../components/drawing": 389, "../../plots/cartesian/axes": 566, "../scatter/plot": 957 }], 978: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../scatter/attributes"), x = v("../../plots/attributes"), e = v("../../components/colorscale/attributes"), r = v("../../components/drawing/attributes").dash, n = v("../../lib/extend").extendFlat, s = v("../../plot_api/edit_types").overrideAll, t = k.marker, d = k.line, u = t.line;
      Q.exports = s({ lon: { valType: "data_array" }, lat: { valType: "data_array" }, locations: { valType: "data_array" }, locationmode: { valType: "enumerated", values: ["ISO-3", "USA-states", "country names", "geojson-id"], dflt: "ISO-3" }, geojson: { valType: "any", editType: "calc" }, featureidkey: { valType: "string", editType: "calc", dflt: "id" }, mode: n({}, k.mode, { dflt: "markers" }), text: n({}, k.text, {}), texttemplate: g({ editType: "plot" }, { keys: ["lat", "lon", "location", "text"] }), hovertext: n({}, k.hovertext, {}), textfont: k.textfont, textposition: k.textposition, line: { color: d.color, width: d.width, dash: r }, connectgaps: k.connectgaps, marker: n({ symbol: t.symbol, opacity: t.opacity, angle: t.angle, angleref: n({}, t.angleref, { values: ["previous", "up", "north"] }), standoff: t.standoff, size: t.size, sizeref: t.sizeref, sizemin: t.sizemin, sizemode: t.sizemode, colorbar: t.colorbar, line: n({ width: u.width }, e("marker.line")), gradient: t.gradient }, e("marker")), fill: { valType: "enumerated", values: ["none", "toself"], dflt: "none" }, fillcolor: k.fillcolor, selected: k.selected, unselected: k.unselected, hoverinfo: n({}, x.hoverinfo, { flags: ["lon", "lat", "location", "text", "name"] }), hovertemplate: m() }, "calc", "nested");
    }, { "../../components/colorscale/attributes": 374, "../../components/drawing/attributes": 388, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 979: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../constants/numerical").BADNUM, k = v("../scatter/colorscale_calc"), x = v("../scatter/arrays_to_calcdata"), e = v("../scatter/calc_selection"), r = v("../../lib")._;
      function n(s) {
        return s && typeof s == "string";
      }
      Q.exports = function(s, t) {
        var d, u = Array.isArray(t.locations), o = u ? t.locations.length : t._length, h = new Array(o);
        d = t.geojson ? function(y) {
          return n(y) || m(y);
        } : n;
        for (var l = 0; l < o; l++) {
          var i = h[l] = {};
          if (u) {
            var p = t.locations[l];
            i.loc = d(p) ? p : null;
          } else {
            var c = t.lon[l], a = t.lat[l];
            m(c) && m(a) ? i.lonlat = [+c, +a] : i.lonlat = [g, g];
          }
        }
        return x(h, t), k(s, t), e(h, t), o && (h[0].t = { labels: { lat: r(s, "lat:") + " ", lon: r(s, "lon:") + " " } }), h;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../scatter/arrays_to_calcdata": 935, "../scatter/calc_selection": 938, "../scatter/colorscale_calc": 939, "fast-isnumeric": 190 }], 980: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/subtypes"), k = v("../scatter/marker_defaults"), x = v("../scatter/line_defaults"), e = v("../scatter/text_defaults"), r = v("../scatter/fillcolor_defaults"), n = v("./attributes");
      Q.exports = function(s, t, d, u) {
        function o(y, f) {
          return m.coerce(s, t, n, y, f);
        }
        var h, l = o("locations");
        if (l && l.length) {
          var i, p = o("geojson");
          (typeof p == "string" && p !== "" || m.isPlainObject(p)) && (i = "geojson-id"), o("locationmode", i) === "geojson-id" && o("featureidkey"), h = l.length;
        } else {
          var c = o("lon") || [], a = o("lat") || [];
          h = Math.min(c.length, a.length);
        }
        h ? (t._length = h, o("text"), o("hovertext"), o("hovertemplate"), o("mode"), g.hasLines(t) && (x(s, t, d, u, o), o("connectgaps")), g.hasMarkers(t) && k(s, t, d, u, o, { gradient: !0 }), g.hasText(t) && (o("texttemplate"), e(s, t, u, o)), o("fill"), t.fill !== "none" && r(s, t, d, o), m.coerceSelectionMarkerOpacity(t, o)) : t.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 978 }], 981: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        m.lon = g.lon, m.lat = g.lat, m.location = g.loc ? g.loc : null;
        var r = x[e];
        return r.fIn && r.fIn.properties && (m.properties = r.fIn.properties), m;
      };
    }, {}], 982: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes");
      Q.exports = function(g, k, x) {
        var e = {}, r = x[k.geo]._subplot.mockAxis, n = g.lonlat;
        return e.lonLabel = m.tickText(r, r.c2l(n[0]), !0).text, e.latLabel = m.tickText(r, r.c2l(n[1]), !0).text, e;
      };
    }, { "../../plots/cartesian/axes": 566 }], 983: [function(v, Q, $) {
      var m = v("../../components/fx"), g = v("../../constants/numerical").BADNUM, k = v("../scatter/get_trace_color"), x = v("../../lib").fillText, e = v("./attributes");
      Q.exports = function(r, n, s) {
        var t = r.cd, d = t[0].trace, u = r.xa, o = r.ya, h = r.subplot, l = h.projection.isLonLatOverEdges, i = h.project;
        if (m.getClosest(t, function(b) {
          var w = b.lonlat;
          if (w[0] === g || l(w))
            return 1 / 0;
          var T = i(w), L = i([n, s]), A = Math.abs(T[0] - L[0]), I = Math.abs(T[1] - L[1]), P = Math.max(3, b.mrc || 0);
          return Math.max(Math.sqrt(A * A + I * I) - P, 1 - 3 / P);
        }, r), r.index !== !1) {
          var p = t[r.index], c = p.lonlat, a = [u.c2p(c), o.c2p(c)], y = p.mrc || 1;
          r.x0 = a[0] - y, r.x1 = a[0] + y, r.y0 = a[1] - y, r.y1 = a[1] + y, r.loc = p.loc, r.lon = c[0], r.lat = c[1];
          var f = {};
          f[d.geo] = { _subplot: h };
          var _ = d._module.formatLabels(p, d, f);
          return r.lonLabel = _.lonLabel, r.latLabel = _.latLabel, r.color = k(d, p), r.extraText = function(b, w, T, L) {
            if (b.hovertemplate)
              return;
            var A = w.hi || b.hoverinfo, I = A === "all" ? e.hoverinfo.flags : A.split("+"), P = I.indexOf("location") !== -1 && Array.isArray(b.locations), S = I.indexOf("lon") !== -1, E = I.indexOf("lat") !== -1, R = I.indexOf("text") !== -1, z = [];
            function j(H) {
              return H + "\xB0";
            }
            return P ? z.push(w.loc) : S && E ? z.push("(" + j(T.latLabel) + ", " + j(T.lonLabel) + ")") : S ? z.push(L.lon + j(T.lonLabel)) : E && z.push(L.lat + j(T.latLabel)), R && x(w, b, z), z.join("<br>");
          }(d, p, r, t[0].t.labels), r.hovertemplate = d.hovertemplate, [r];
        }
      };
    }, { "../../components/fx": 407, "../../constants/numerical": 491, "../../lib": 515, "../scatter/get_trace_color": 946, "./attributes": 978 }], 984: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), calcGeoJSON: v("./plot").calcGeoJSON, plot: v("./plot").plot, style: v("./style"), styleOnSelect: v("../scatter/style").styleOnSelect, hoverPoints: v("./hover"), eventData: v("./event_data"), selectPoints: v("./select"), moduleType: "trace", name: "scattergeo", basePlotModule: v("../../plots/geo"), categories: ["geo", "symbols", "showLegend", "scatter-like"], meta: {} };
    }, { "../../plots/geo": 598, "../scatter/marker_colorbar": 954, "../scatter/style": 960, "./attributes": 978, "./calc": 979, "./defaults": 980, "./event_data": 981, "./format_labels": 982, "./hover": 983, "./plot": 985, "./select": 986, "./style": 987 }], 985: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../lib/topojson_utils").getTopojsonFeatures, x = v("../../lib/geojson_utils"), e = v("../../lib/geo_location_utils"), r = v("../../plots/cartesian/autorange").findExtremes, n = v("../../constants/numerical").BADNUM, s = v("../scatter/calc").calcMarkerSize, t = v("../scatter/subtypes"), d = v("./style");
      Q.exports = { calcGeoJSON: function(u, o) {
        var h, l, i = u[0].trace, p = o[i.geo], c = p._subplot, a = i._length;
        if (Array.isArray(i.locations)) {
          var y = i.locationmode, f = y === "geojson-id" ? e.extractTraceFeature(u) : k(i, c.topojson);
          for (h = 0; h < a; h++) {
            l = u[h];
            var _ = y === "geojson-id" ? l.fOut : e.locationToFeature(y, l.loc, f);
            l.lonlat = _ ? _.properties.ct : [n, n];
          }
        }
        var b, w, T = { padded: !0 };
        if (p.fitbounds === "geojson" && i.locationmode === "geojson-id") {
          var L = e.computeBbox(e.getTraceGeojson(i));
          b = [L[0], L[2]], w = [L[1], L[3]];
        } else {
          for (b = new Array(a), w = new Array(a), h = 0; h < a; h++)
            l = u[h], b[h] = l.lonlat[0], w[h] = l.lonlat[1];
          T.ppad = s(i, a);
        }
        i._extremes.lon = r(p.lonaxis._ax, b, T), i._extremes.lat = r(p.lataxis._ax, w, T);
      }, plot: function(u, o, h) {
        var l = o.layers.frontplot.select(".scatterlayer"), i = g.makeTraceGroups(l, h, "trace scattergeo");
        function p(c, a) {
          c.lonlat[0] === n && m.select(a).remove();
        }
        i.selectAll("*").remove(), i.each(function(c) {
          var a = m.select(this), y = c[0].trace;
          if (t.hasLines(y) || y.fill !== "none") {
            var f = x.calcTraceToLineCoords(c), _ = y.fill !== "none" ? x.makePolygon(f) : x.makeLine(f);
            a.selectAll("path.js-line").data([{ geojson: _, trace: y }]).enter().append("path").classed("js-line", !0).style("stroke-miterlimit", 2);
          }
          t.hasMarkers(y) && a.selectAll("path.point").data(g.identity).enter().append("path").classed("point", !0).each(function(b) {
            p(b, this);
          }), t.hasText(y) && a.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(b) {
            p(b, this);
          }), d(u, c);
        });
      } };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../lib/geo_location_utils": 508, "../../lib/geojson_utils": 509, "../../lib/topojson_utils": 544, "../../plots/cartesian/autorange": 565, "../scatter/calc": 937, "../scatter/subtypes": 961, "./style": 987, "@plotly/d3": 58 }], 986: [function(v, Q, $) {
      var m = v("../scatter/subtypes"), g = v("../../constants/numerical").BADNUM;
      Q.exports = function(k, x) {
        var e, r, n, s, t, d = k.cd, u = k.xaxis, o = k.yaxis, h = [], l = d[0].trace;
        if (!m.hasMarkers(l) && !m.hasText(l))
          return [];
        if (x === !1)
          for (t = 0; t < d.length; t++)
            d[t].selected = 0;
        else
          for (t = 0; t < d.length; t++)
            (r = (e = d[t]).lonlat)[0] !== g && (n = u.c2p(r), s = o.c2p(r), x.contains([n, s], null, t, k) ? (h.push({ pointNumber: t, lon: r[0], lat: r[1] }), e.selected = 1) : e.selected = 0);
        return h;
      };
    }, { "../../constants/numerical": 491, "../scatter/subtypes": 961 }], 987: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../../components/color"), x = v("../scatter/style"), e = x.stylePoints, r = x.styleText;
      Q.exports = function(n, s) {
        s && function(t, d) {
          var u = d[0].trace, o = d[0].node3;
          o.style("opacity", d[0].trace.opacity), e(o, u, t), r(o, u, t), o.selectAll("path.js-line").style("fill", "none").each(function(h) {
            var l = m.select(this), i = h.trace, p = i.line || {};
            l.call(k.stroke, p.color).call(g.dashLine, p.dash || "", p.width || 0), i.fill !== "none" && l.call(k.fill, i.fillcolor);
          });
        }(n, s);
      };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../scatter/style": 960, "@plotly/d3": 58 }], 988: [function(v, Q, $) {
      var m = v("../../plots/attributes"), g = v("../scatter/attributes"), k = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, x = v("../../components/colorscale/attributes"), e = v("../../lib/sort_object_keys"), r = v("../../lib/extend").extendFlat, n = v("../../plot_api/edit_types").overrideAll, s = v("./constants").DASHES, t = g.line, d = g.marker, u = d.line, o = Q.exports = n({ x: g.x, x0: g.x0, dx: g.dx, y: g.y, y0: g.y0, dy: g.dy, xperiod: g.xperiod, yperiod: g.yperiod, xperiod0: g.xperiod0, yperiod0: g.yperiod0, xperiodalignment: g.xperiodalignment, yperiodalignment: g.yperiodalignment, xhoverformat: k("x"), yhoverformat: k("y"), text: g.text, hovertext: g.hovertext, textposition: g.textposition, textfont: g.textfont, mode: { valType: "flaglist", flags: ["lines", "markers", "text"], extras: ["none"] }, line: { color: t.color, width: t.width, shape: { valType: "enumerated", values: ["linear", "hv", "vh", "hvh", "vhv"], dflt: "linear", editType: "plot" }, dash: { valType: "enumerated", values: e(s), dflt: "solid" } }, marker: r({}, x("marker"), { symbol: d.symbol, angle: d.angle, size: d.size, sizeref: d.sizeref, sizemin: d.sizemin, sizemode: d.sizemode, opacity: d.opacity, colorbar: d.colorbar, line: r({}, x("marker.line"), { width: u.width }) }), connectgaps: g.connectgaps, fill: r({}, g.fill, { dflt: "none" }), fillcolor: g.fillcolor, selected: { marker: g.selected.marker, textfont: g.selected.textfont }, unselected: { marker: g.unselected.marker, textfont: g.unselected.textfont }, opacity: m.opacity }, "calc", "nested");
      o.x.editType = o.y.editType = o.x0.editType = o.y0.editType = "calc+clearAxisTypes", o.hovertemplate = g.hovertemplate, o.texttemplate = g.texttemplate;
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../lib/sort_object_keys": 538, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../scatter/attributes": 936, "./constants": 991 }], 989: [function(v, Q, $) {
      var m = v("./hover");
      Q.exports = { moduleType: "trace", name: "scattergl", basePlotModule: v("../../plots/cartesian"), categories: ["gl", "regl", "cartesian", "symbols", "errorBarsOK", "showLegend", "scatter-like"], attributes: v("./attributes"), supplyDefaults: v("./defaults"), crossTraceDefaults: v("../scatter/cross_trace_defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), hoverPoints: m.hoverPoints, selectPoints: v("./select"), meta: {} };
    }, { "../../plots/cartesian": 578, "../scatter/cross_trace_defaults": 942, "../scatter/marker_colorbar": 954, "./attributes": 988, "./calc": 990, "./defaults": 993, "./format_labels": 995, "./hover": 997, "./select": 1001 }], 990: [function(v, Q, $) {
      var m = v("@plotly/point-cluster"), g = v("../../lib"), k = v("../../plots/cartesian/axis_ids"), x = v("../../plots/cartesian/autorange").findExtremes, e = v("../../plots/cartesian/align_period"), r = v("../scatter/calc"), n = r.calcMarkerSize, s = r.calcAxisExpansion, t = r.setFirstScatter, d = v("../scatter/colorscale_calc"), u = v("./convert"), o = v("./scene_update"), h = v("../../constants/numerical").BADNUM, l = v("./constants").TOO_MANY_POINTS;
      function i(p, c, a) {
        var y = p._extremes[c._id], f = x(c, a._bnds, { padded: !0 });
        y.min = y.min.concat(f.min), y.max = y.max.concat(f.max);
      }
      Q.exports = function(p, c) {
        var a, y = p._fullLayout, f = c._xA = k.getFromId(p, c.xaxis, "x"), _ = c._yA = k.getFromId(p, c.yaxis, "y"), b = y._plots[c.xaxis + c.yaxis], w = c._length, T = w >= l, L = 2 * w, A = {}, I = f.makeCalcdata(c, "x"), P = _.makeCalcdata(c, "y"), S = e(c, f, "x", I), E = e(c, _, "y", P), R = S.vals, z = E.vals;
        c._x = R, c._y = z, c.xperiodalignment && (c._origX = I, c._xStarts = S.starts, c._xEnds = S.ends), c.yperiodalignment && (c._origY = P, c._yStarts = E.starts, c._yEnds = E.ends);
        var j = new Array(L), H = new Array(w);
        for (a = 0; a < w; a++)
          j[2 * a] = R[a] === h ? NaN : R[a], j[2 * a + 1] = z[a] === h ? NaN : z[a], H[a] = a;
        if (f.type === "log")
          for (a = 0; a < L; a += 2)
            j[a] = f.c2l(j[a]);
        if (_.type === "log")
          for (a = 1; a < L; a += 2)
            j[a] = _.c2l(j[a]);
        T && f.type !== "log" && _.type !== "log" ? A.tree = m(j) : A.ids = H, d(p, c);
        var Y, J = function(Z, re, V, B, U, ee) {
          var N = u.style(Z, V);
          if (N.marker && (N.marker.positions = B), N.line && B.length > 1 && g.extendFlat(N.line, u.linePositions(Z, V, B)), N.errorX || N.errorY) {
            var K = u.errorBarPositions(Z, V, B, U, ee);
            N.errorX && g.extendFlat(N.errorX, K.x), N.errorY && g.extendFlat(N.errorY, K.y);
          }
          return N.text && (g.extendFlat(N.text, { positions: B }, u.textPosition(Z, V, N.text, N.marker)), g.extendFlat(N.textSel, { positions: B }, u.textPosition(Z, V, N.text, N.markerSel)), g.extendFlat(N.textUnsel, { positions: B }, u.textPosition(Z, V, N.text, N.markerUnsel))), N;
        }(p, 0, c, j, R, z), W = o(p, b);
        return t(y, c), T ? J.marker && (Y = J.marker.sizeAvg || Math.max(J.marker.size, 3)) : Y = n(c, w), s(p, c, f, _, R, z, Y), J.errorX && i(c, f, J.errorX), J.errorY && i(c, _, J.errorY), J.fill && !W.fill2d && (W.fill2d = !0), J.marker && !W.scatter2d && (W.scatter2d = !0), J.line && !W.line2d && (W.line2d = !0), !J.errorX && !J.errorY || W.error2d || (W.error2d = !0), J.text && !W.glText && (W.glText = !0), J.marker && (J.marker.snap = w), W.lineOptions.push(J.line), W.errorXOptions.push(J.errorX), W.errorYOptions.push(J.errorY), W.fillOptions.push(J.fill), W.markerOptions.push(J.marker), W.markerSelectedOptions.push(J.markerSel), W.markerUnselectedOptions.push(J.markerUnsel), W.textOptions.push(J.text), W.textSelectedOptions.push(J.textSel), W.textUnselectedOptions.push(J.textUnsel), W.selectBatch.push([]), W.unselectBatch.push([]), A._scene = W, A.index = W.count, A.x = R, A.y = z, A.positions = j, W.count++, [{ x: !1, y: !1, t: A, trace: c }];
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/autorange": 565, "../../plots/cartesian/axis_ids": 570, "../scatter/calc": 937, "../scatter/colorscale_calc": 939, "./constants": 991, "./convert": 992, "./scene_update": 1e3, "@plotly/point-cluster": 59 }], 991: [function(v, Q, $) {
      Q.exports = { TOO_MANY_POINTS: 1e5, SYMBOL_SDF_SIZE: 200, SYMBOL_SIZE: 20, SYMBOL_STROKE: 1, DOT_RE: /-dot/, OPEN_RE: /-open/, DASHES: { solid: [1], dot: [1, 1], dash: [4, 1], longdash: [8, 1], dashdot: [4, 1, 1, 1], longdashdot: [8, 1, 1, 1] } };
    }, {}], 992: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("svg-path-sdf"), k = v("color-normalize"), x = v("../../registry"), e = v("../../lib"), r = v("../../components/drawing"), n = v("../../plots/cartesian/axis_ids"), s = v("../../lib/gl_format_color").formatColor, t = v("../scatter/subtypes"), d = v("../scatter/make_bubble_size_func"), u = v("./helpers"), o = v("./constants"), h = v("../../constants/interactions").DESELECTDIM, l = { start: 1, left: 1, end: -1, right: -1, middle: 0, center: 0, bottom: 1, top: -1 }, i = v("../../components/fx/helpers").appendArrayPointValue;
      function p(I, P) {
        var S, E = I._fullLayout, R = P._length, z = P.textfont, j = P.textposition, H = Array.isArray(j) ? j : [j], Y = z.color, J = z.size, W = z.family, Z = {}, re = I._context.plotGlPixelRatio, V = P.texttemplate;
        if (V) {
          Z.text = [];
          var B = E._d3locale, U = Array.isArray(V), ee = U ? Math.min(V.length, R) : R, N = U ? function(ve) {
            return V[ve];
          } : function() {
            return V;
          };
          for (S = 0; S < ee; S++) {
            var K = { i: S }, X = P._module.formatLabels(K, P, E), te = {};
            i(te, P, S);
            var ie = P._meta || {};
            Z.text.push(e.texttemplateString(N(S), X, B, te, K, ie));
          }
        } else
          Array.isArray(P.text) && P.text.length < R ? Z.text = P.text.slice() : Z.text = P.text;
        if (Array.isArray(Z.text))
          for (S = Z.text.length; S < R; S++)
            Z.text[S] = "";
        for (Z.opacity = P.opacity, Z.font = {}, Z.align = [], Z.baseline = [], S = 0; S < H.length; S++) {
          var le = H[S].split(/\s+/);
          switch (le[1]) {
            case "left":
              Z.align.push("right");
              break;
            case "right":
              Z.align.push("left");
              break;
            default:
              Z.align.push(le[1]);
          }
          switch (le[0]) {
            case "top":
              Z.baseline.push("bottom");
              break;
            case "bottom":
              Z.baseline.push("top");
              break;
            default:
              Z.baseline.push(le[0]);
          }
        }
        if (Array.isArray(Y))
          for (Z.color = new Array(R), S = 0; S < R; S++)
            Z.color[S] = Y[S];
        else
          Z.color = Y;
        if (e.isArrayOrTypedArray(J) || Array.isArray(W))
          for (Z.font = new Array(R), S = 0; S < R; S++) {
            var oe = Z.font[S] = {};
            oe.size = (e.isTypedArray(J) ? J[S] : Array.isArray(J) ? m(J[S]) ? J[S] : 0 : J) * re, oe.family = Array.isArray(W) ? W[S] : W;
          }
        else
          Z.font = { size: J * re, family: W };
        return Z;
      }
      function c(I, P) {
        var S, E, R = P._length, z = P.marker, j = {}, H = e.isArrayOrTypedArray(z.symbol), Y = e.isArrayOrTypedArray(z.angle), J = e.isArrayOrTypedArray(z.color), W = e.isArrayOrTypedArray(z.line.color), Z = e.isArrayOrTypedArray(z.opacity), re = e.isArrayOrTypedArray(z.size), V = e.isArrayOrTypedArray(z.line.width);
        if (H || (E = u.isOpenSymbol(z.symbol)), H || J || W || Z || Y) {
          j.symbols = new Array(R), j.angles = new Array(R), j.colors = new Array(R), j.borderColors = new Array(R);
          var B = z.symbol, U = z.angle, ee = s(z, z.opacity, R), N = s(z.line, z.opacity, R);
          if (!Array.isArray(N[0])) {
            var K = N;
            for (N = Array(R), S = 0; S < R; S++)
              N[S] = K;
          }
          if (!Array.isArray(ee[0])) {
            var X = ee;
            for (ee = Array(R), S = 0; S < R; S++)
              ee[S] = X;
          }
          if (!Array.isArray(B)) {
            var te = B;
            for (B = Array(R), S = 0; S < R; S++)
              B[S] = te;
          }
          if (!Array.isArray(U)) {
            var ie = U;
            for (U = Array(R), S = 0; S < R; S++)
              U[S] = ie;
          }
          for (j.symbols = B, j.angles = U, j.colors = ee, j.borderColors = N, S = 0; S < R; S++)
            H && (E = u.isOpenSymbol(z.symbol[S])), E && (N[S] = ee[S].slice(), ee[S] = ee[S].slice(), ee[S][3] = 0);
          for (j.opacity = P.opacity, j.markers = new Array(R), S = 0; S < R; S++)
            j.markers[S] = A({ mx: j.symbols[S], ma: j.angles[S] }, P);
        } else
          E ? (j.color = k(z.color, "uint8"), j.color[3] = 0, j.borderColor = k(z.color, "uint8")) : (j.color = k(z.color, "uint8"), j.borderColor = k(z.line.color, "uint8")), j.opacity = P.opacity * z.opacity, j.marker = A({ mx: z.symbol, ma: z.angle }, P);
        var le, oe = d(P, 1);
        if (re || V) {
          var ve, ue = j.sizes = new Array(R), ye = j.borderSizes = new Array(R), Ae = 0;
          if (re) {
            for (S = 0; S < R; S++)
              ue[S] = oe(z.size[S]), Ae += ue[S];
            ve = Ae / R;
          } else
            for (le = oe(z.size), S = 0; S < R; S++)
              ue[S] = le;
          if (V)
            for (S = 0; S < R; S++)
              ye[S] = z.line.width[S];
          else
            for (le = z.line.width, S = 0; S < R; S++)
              ye[S] = le;
          j.sizeAvg = ve;
        } else
          j.size = oe(z && z.size || 10), j.borderSizes = oe(z.line.width);
        return j;
      }
      function a(I, P, S) {
        var E = P.marker, R = {};
        return S && (S.marker && S.marker.symbol ? R = c(0, e.extendFlat({}, E, S.marker)) : S.marker && (S.marker.size && (R.size = S.marker.size), S.marker.color && (R.colors = S.marker.color), S.marker.opacity !== void 0 && (R.opacity = S.marker.opacity))), R;
      }
      function y(I, P, S) {
        var E = {};
        if (!S)
          return E;
        if (S.textfont) {
          var R = { opacity: 1, text: P.text, texttemplate: P.texttemplate, textposition: P.textposition, textfont: e.extendFlat({}, P.textfont) };
          S.textfont && e.extendFlat(R.textfont, S.textfont), E = p(I, R);
        }
        return E;
      }
      function f(I, P, S) {
        var E = { capSize: 2 * P.width * S, lineWidth: P.thickness * S, color: P.color };
        return P.copy_ystyle && (E = I.error_y), E;
      }
      var _ = o.SYMBOL_SDF_SIZE, b = o.SYMBOL_SIZE, w = o.SYMBOL_STROKE, T = {}, L = r.symbolFuncs[0](0.05 * b);
      function A(I, P) {
        var S, E, R = I.mx;
        if (R === "circle")
          return null;
        var z = r.symbolNumber(R), j = r.symbolFuncs[z % 100], H = !!r.symbolNoDot[z % 100], Y = !!r.symbolNoFill[z % 100], J = u.isDotSymbol(R);
        if (I.ma && (R += "_" + I.ma), T[R])
          return T[R];
        var W = r.getMarkerAngle(I, P);
        return S = J && !H ? j(1.1 * b, W) + L : j(b, W), E = g(S, { w: _, h: _, viewBox: [-b, -b, b, b], stroke: Y ? w : -w }), T[R] = E, E || null;
      }
      Q.exports = { style: function(I, P) {
        var S, E = { marker: void 0, markerSel: void 0, markerUnsel: void 0, line: void 0, fill: void 0, errorX: void 0, errorY: void 0, text: void 0, textSel: void 0, textUnsel: void 0 }, R = I._context.plotGlPixelRatio;
        if (P.visible !== !0)
          return E;
        if (t.hasText(P) && (E.text = p(I, P), E.textSel = y(I, P, P.selected), E.textUnsel = y(I, P, P.unselected)), t.hasMarkers(P) && (E.marker = c(I, P), E.markerSel = a(I, P, P.selected), E.markerUnsel = a(I, P, P.unselected), !P.unselected && e.isArrayOrTypedArray(P.marker.opacity))) {
          var z = P.marker.opacity;
          for (E.markerUnsel.opacity = new Array(z.length), S = 0; S < z.length; S++)
            E.markerUnsel.opacity[S] = h * z[S];
        }
        if (t.hasLines(P)) {
          E.line = { overlay: !0, thickness: P.line.width * R, color: P.line.color, opacity: P.opacity };
          var j = (o.DASHES[P.line.dash] || [1]).slice();
          for (S = 0; S < j.length; ++S)
            j[S] *= P.line.width * R;
          E.line.dashes = j;
        }
        return P.error_x && P.error_x.visible && (E.errorX = f(P, P.error_x, R)), P.error_y && P.error_y.visible && (E.errorY = f(P, P.error_y, R)), P.fill && P.fill !== "none" && (E.fill = { closed: !0, fill: P.fillcolor, thickness: 0 }), E;
      }, markerStyle: c, markerSelection: a, linePositions: function(I, P, S) {
        var E, R, z = S.length, j = z / 2;
        if (t.hasLines(P) && j)
          if (P.line.shape === "hv") {
            for (E = [], R = 0; R < j - 1; R++)
              isNaN(S[2 * R]) || isNaN(S[2 * R + 1]) ? E.push(NaN, NaN, NaN, NaN) : (E.push(S[2 * R], S[2 * R + 1]), isNaN(S[2 * R + 2]) || isNaN(S[2 * R + 3]) ? E.push(NaN, NaN) : E.push(S[2 * R + 2], S[2 * R + 1]));
            E.push(S[z - 2], S[z - 1]);
          } else if (P.line.shape === "hvh") {
            for (E = [], R = 0; R < j - 1; R++)
              if (isNaN(S[2 * R]) || isNaN(S[2 * R + 1]) || isNaN(S[2 * R + 2]) || isNaN(S[2 * R + 3]))
                isNaN(S[2 * R]) || isNaN(S[2 * R + 1]) ? E.push(NaN, NaN) : E.push(S[2 * R], S[2 * R + 1]), E.push(NaN, NaN);
              else {
                var H = (S[2 * R] + S[2 * R + 2]) / 2;
                E.push(S[2 * R], S[2 * R + 1], H, S[2 * R + 1], H, S[2 * R + 3]);
              }
            E.push(S[z - 2], S[z - 1]);
          } else if (P.line.shape === "vhv") {
            for (E = [], R = 0; R < j - 1; R++)
              if (isNaN(S[2 * R]) || isNaN(S[2 * R + 1]) || isNaN(S[2 * R + 2]) || isNaN(S[2 * R + 3]))
                isNaN(S[2 * R]) || isNaN(S[2 * R + 1]) ? E.push(NaN, NaN) : E.push(S[2 * R], S[2 * R + 1]), E.push(NaN, NaN);
              else {
                var Y = (S[2 * R + 1] + S[2 * R + 3]) / 2;
                E.push(S[2 * R], S[2 * R + 1], S[2 * R], Y, S[2 * R + 2], Y);
              }
            E.push(S[z - 2], S[z - 1]);
          } else if (P.line.shape === "vh") {
            for (E = [], R = 0; R < j - 1; R++)
              isNaN(S[2 * R]) || isNaN(S[2 * R + 1]) ? E.push(NaN, NaN, NaN, NaN) : (E.push(S[2 * R], S[2 * R + 1]), isNaN(S[2 * R + 2]) || isNaN(S[2 * R + 3]) ? E.push(NaN, NaN) : E.push(S[2 * R], S[2 * R + 3]));
            E.push(S[z - 2], S[z - 1]);
          } else
            E = S;
        var J = !1;
        for (R = 0; R < E.length; R++)
          if (isNaN(E[R])) {
            J = !0;
            break;
          }
        var W = J || E.length > o.TOO_MANY_POINTS || t.hasMarkers(P) ? "rect" : "round";
        if (J && P.connectgaps) {
          var Z = E[0], re = E[1];
          for (R = 0; R < E.length; R += 2)
            isNaN(E[R]) || isNaN(E[R + 1]) ? (E[R] = Z, E[R + 1] = re) : (Z = E[R], re = E[R + 1]);
        }
        return { join: W, positions: E };
      }, errorBarPositions: function(I, P, S, E, R) {
        var z = x.getComponentMethod("errorbars", "makeComputeError"), j = n.getFromId(I, P.xaxis, "x"), H = n.getFromId(I, P.yaxis, "y"), Y = S.length / 2, J = {};
        function W(Z, re) {
          var V = re._id.charAt(0), B = P["error_" + V];
          if (B && B.visible && (re.type === "linear" || re.type === "log")) {
            for (var U = z(B), ee = { x: 0, y: 1 }[V], N = { x: [0, 1, 2, 3], y: [2, 3, 0, 1] }[V], K = new Float64Array(4 * Y), X = 1 / 0, te = -1 / 0, ie = 0, le = 0; ie < Y; ie++, le += 4) {
              var oe = Z[ie];
              if (m(oe)) {
                var ve = S[2 * ie + ee], ue = U(oe, ie), ye = ue[0], Ae = ue[1];
                if (m(ye) && m(Ae)) {
                  var pe = oe - ye, ge = oe + Ae;
                  K[le + N[0]] = ve - re.c2l(pe), K[le + N[1]] = re.c2l(ge) - ve, K[le + N[2]] = 0, K[le + N[3]] = 0, X = Math.min(X, oe - ye), te = Math.max(te, oe + Ae);
                }
              }
            }
            J[V] = { positions: S, errors: K, _bnds: [X, te] };
          }
        }
        return W(E, j), W(R, H), J;
      }, textPosition: function(I, P, S, E) {
        var R, z = P._length, j = {};
        if (t.hasMarkers(P)) {
          var H = S.font, Y = S.align, J = S.baseline;
          for (j.offset = new Array(z), R = 0; R < z; R++) {
            var W = E.sizes ? E.sizes[R] : E.size, Z = Array.isArray(H) ? H[R].size : H.size, re = Array.isArray(Y) ? Y.length > 1 ? Y[R] : Y[0] : Y, V = Array.isArray(J) ? J.length > 1 ? J[R] : J[0] : J, B = l[re], U = l[V], ee = W ? W / 0.8 + 1 : 0, N = -U * ee - 0.5 * U;
            j.offset[R] = [B * ee / Z, N / Z];
          }
        }
        return j;
      } };
    }, { "../../components/drawing": 389, "../../components/fx/helpers": 403, "../../constants/interactions": 490, "../../lib": 515, "../../lib/gl_format_color": 511, "../../plots/cartesian/axis_ids": 570, "../../registry": 647, "../scatter/make_bubble_size_func": 953, "../scatter/subtypes": 961, "./constants": 991, "./helpers": 996, "color-normalize": 89, "fast-isnumeric": 190, "svg-path-sdf": 311 }], 993: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../registry"), k = v("./helpers"), x = v("./attributes"), e = v("../scatter/constants"), r = v("../scatter/subtypes"), n = v("../scatter/xy_defaults"), s = v("../scatter/period_defaults"), t = v("../scatter/marker_defaults"), d = v("../scatter/line_defaults"), u = v("../scatter/fillcolor_defaults"), o = v("../scatter/text_defaults");
      Q.exports = function(h, l, i, p) {
        function c(L, A) {
          return m.coerce(h, l, x, L, A);
        }
        var a = !!h.marker && k.isOpenSymbol(h.marker.symbol), y = r.isBubble(h), f = n(h, l, p, c);
        if (f) {
          s(h, l, p, c), c("xhoverformat"), c("yhoverformat");
          var _ = f < e.PTS_LINESONLY ? "lines+markers" : "lines";
          c("text"), c("hovertext"), c("hovertemplate"), c("mode", _), r.hasLines(l) && (c("connectgaps"), d(h, l, i, p, c), c("line.shape")), r.hasMarkers(l) && (t(h, l, i, p, c, { noAngleRef: !0, noStandOff: !0 }), c("marker.line.width", a || y ? 1 : 0)), r.hasText(l) && (c("texttemplate"), o(h, l, p, c));
          var b = (l.line || {}).color, w = (l.marker || {}).color;
          c("fill"), l.fill !== "none" && u(h, l, i, c);
          var T = g.getComponentMethod("errorbars", "supplyDefaults");
          T(h, l, b || w || i, { axis: "y" }), T(h, l, b || w || i, { axis: "x", inherit: "y" }), m.coerceSelectionMarkerOpacity(l, c);
        } else
          l.visible = !1;
      };
    }, { "../../lib": 515, "../../registry": 647, "../scatter/constants": 940, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/marker_defaults": 955, "../scatter/period_defaults": 956, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "../scatter/xy_defaults": 963, "./attributes": 988, "./helpers": 996 }], 994: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../../constants/interactions").DESELECTDIM;
      Q.exports = { styleTextSelection: function(x) {
        var e, r, n = x[0], s = n.trace, t = n.t, d = t._scene, u = t.index, o = d.selectBatch[u], h = d.unselectBatch[u], l = d.textOptions[u], i = d.textSelectedOptions[u] || {}, p = d.textUnselectedOptions[u] || {}, c = m.extendFlat({}, l);
        if (o.length || h.length) {
          var a = i.color, y = p.color, f = l.color, _ = Array.isArray(f);
          for (c.color = new Array(s._length), e = 0; e < o.length; e++)
            r = o[e], c.color[r] = a || (_ ? f[r] : f);
          for (e = 0; e < h.length; e++) {
            r = h[e];
            var b = _ ? f[r] : f;
            c.color[r] = y || (a ? b : g.addOpacity(b, k));
          }
        }
        d.glText[u].update(c);
      } };
    }, { "../../components/color": 367, "../../constants/interactions": 490, "../../lib": 515 }], 995: [function(v, Q, $) {
      var m = v("../scatter/format_labels");
      Q.exports = function(g, k, x) {
        var e = g.i;
        return "x" in g || (g.x = k._x[e]), "y" in g || (g.y = k._y[e]), m(g, k, x);
      };
    }, { "../scatter/format_labels": 945 }], 996: [function(v, Q, $) {
      var m = v("./constants");
      $.isOpenSymbol = function(g) {
        return typeof g == "string" ? m.OPEN_RE.test(g) : g % 200 > 100;
      }, $.isDotSymbol = function(g) {
        return typeof g == "string" ? m.DOT_RE.test(g) : g > 200;
      };
    }, { "./constants": 991 }], 997: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../scatter/get_trace_color");
      function x(e, r, n, s) {
        var t = e.xa, d = e.ya, u = e.distance, o = e.dxy, h = e.index, l = { pointNumber: h, x: r[h], y: n[h] };
        l.tx = Array.isArray(s.text) ? s.text[h] : s.text, l.htx = Array.isArray(s.hovertext) ? s.hovertext[h] : s.hovertext, l.data = Array.isArray(s.customdata) ? s.customdata[h] : s.customdata, l.tp = Array.isArray(s.textposition) ? s.textposition[h] : s.textposition;
        var i = s.textfont;
        i && (l.ts = g.isArrayOrTypedArray(i.size) ? i.size[h] : i.size, l.tc = Array.isArray(i.color) ? i.color[h] : i.color, l.tf = Array.isArray(i.family) ? i.family[h] : i.family);
        var p = s.marker;
        p && (l.ms = g.isArrayOrTypedArray(p.size) ? p.size[h] : p.size, l.mo = g.isArrayOrTypedArray(p.opacity) ? p.opacity[h] : p.opacity, l.mx = g.isArrayOrTypedArray(p.symbol) ? p.symbol[h] : p.symbol, l.ma = g.isArrayOrTypedArray(p.angle) ? p.angle[h] : p.angle, l.mc = g.isArrayOrTypedArray(p.color) ? p.color[h] : p.color);
        var c = p && p.line;
        c && (l.mlc = Array.isArray(c.color) ? c.color[h] : c.color, l.mlw = g.isArrayOrTypedArray(c.width) ? c.width[h] : c.width);
        var a = p && p.gradient;
        a && a.type !== "none" && (l.mgt = Array.isArray(a.type) ? a.type[h] : a.type, l.mgc = Array.isArray(a.color) ? a.color[h] : a.color);
        var y = t.c2p(l.x, !0), f = d.c2p(l.y, !0), _ = l.mrc || 1, b = s.hoverlabel;
        b && (l.hbg = Array.isArray(b.bgcolor) ? b.bgcolor[h] : b.bgcolor, l.hbc = Array.isArray(b.bordercolor) ? b.bordercolor[h] : b.bordercolor, l.hts = g.isArrayOrTypedArray(b.font.size) ? b.font.size[h] : b.font.size, l.htc = Array.isArray(b.font.color) ? b.font.color[h] : b.font.color, l.htf = Array.isArray(b.font.family) ? b.font.family[h] : b.font.family, l.hnl = g.isArrayOrTypedArray(b.namelength) ? b.namelength[h] : b.namelength);
        var w = s.hoverinfo;
        w && (l.hi = Array.isArray(w) ? w[h] : w);
        var T = s.hovertemplate;
        T && (l.ht = Array.isArray(T) ? T[h] : T);
        var L = {};
        L[e.index] = l;
        var A = s._origX, I = s._origY, P = g.extendFlat({}, e, { color: k(s, l), x0: y - _, x1: y + _, xLabelVal: A ? A[h] : l.x, y0: f - _, y1: f + _, yLabelVal: I ? I[h] : l.y, cd: L, distance: u, spikeDistance: o, hovertemplate: l.ht });
        return l.htx ? P.text = l.htx : l.tx ? P.text = l.tx : s.text && (P.text = s.text), g.fillText(l, s, P), m.getComponentMethod("errorbars", "hoverInfo")(l, s, P), P;
      }
      Q.exports = { hoverPoints: function(e, r, n, s) {
        var t, d, u, o, h, l, i, p, c, a, y = e.cd, f = y[0].t, _ = y[0].trace, b = e.xa, w = e.ya, T = f.x, L = f.y, A = b.c2p(r), I = w.c2p(n), P = e.distance;
        if (f.tree) {
          var S = b.p2c(A - P), E = b.p2c(A + P), R = w.p2c(I - P), z = w.p2c(I + P);
          t = s === "x" ? f.tree.range(Math.min(S, E), Math.min(w._rl[0], w._rl[1]), Math.max(S, E), Math.max(w._rl[0], w._rl[1])) : f.tree.range(Math.min(S, E), Math.min(R, z), Math.max(S, E), Math.max(R, z));
        } else
          t = f.ids;
        var j = P;
        if (s === "x") {
          var H = !!_.xperiodalignment, Y = !!_.yperiodalignment;
          for (l = 0; l < t.length; l++) {
            if (o = T[d = t[l]], i = Math.abs(b.c2p(o) - A), H) {
              var J = b.c2p(_._xStarts[d]), W = b.c2p(_._xEnds[d]);
              i = A >= Math.min(J, W) && A <= Math.max(J, W) ? 0 : 1 / 0;
            }
            if (i < j) {
              if (j = i, h = L[d], p = w.c2p(h) - I, Y) {
                var Z = w.c2p(_._yStarts[d]), re = w.c2p(_._yEnds[d]);
                p = I >= Math.min(Z, re) && I <= Math.max(Z, re) ? 0 : 1 / 0;
              }
              a = Math.sqrt(i * i + p * p), u = t[l];
            }
          }
        } else
          for (l = t.length - 1; l > -1; l--)
            o = T[d = t[l]], h = L[d], i = b.c2p(o) - A, p = w.c2p(h) - I, (c = Math.sqrt(i * i + p * p)) < j && (j = a = c, u = d);
        return e.index = u, e.distance = j, e.dxy = a, u === void 0 ? [e] : [x(e, T, L, _)];
      }, calcHover: x };
    }, { "../../lib": 515, "../../registry": 647, "../scatter/get_trace_color": 946 }], 998: [function(v, Q, $) {
      arguments[4][905][0].apply($, arguments);
    }, { "./base_index": 989, "./plot": 999, dup: 905 }], 999: [function(v, Q, $) {
      var m = v("regl-scatter2d"), g = v("regl-line2d"), k = v("regl-error2d"), x = v("gl-text"), e = v("../../lib"), r = v("../../components/dragelement/helpers").selectMode, n = v("../../lib/prepare_regl"), s = v("../scatter/subtypes"), t = v("../scatter/link_traces"), d = v("./edit_style").styleTextSelection, u = {};
      function o(h, l, i, p) {
        var c = h._size, a = h.width * p, y = h.height * p, f = c.l * p, _ = c.b * p, b = c.r * p, w = c.t * p, T = c.w * p, L = c.h * p;
        return [f + l.domain[0] * T, _ + i.domain[0] * L, a - b - (1 - l.domain[1]) * T, y - w - (1 - i.domain[1]) * L];
      }
      (Q.exports = function(h, l, i) {
        if (i.length) {
          var p, c, a = h._fullLayout, y = l._scene, f = l.xaxis, _ = l.yaxis;
          if (y)
            if (n(h, ["ANGLE_instanced_arrays", "OES_element_index_uint"], u)) {
              var b = y.count, w = a._glcanvas.data()[0].regl;
              if (t(h, l, i), y.dirty) {
                if (y.error2d === !0 && (y.error2d = k(w)), y.line2d === !0 && (y.line2d = g(w)), y.scatter2d === !0 && (y.scatter2d = m(w)), y.fill2d === !0 && (y.fill2d = g(w)), y.glText === !0)
                  for (y.glText = new Array(b), p = 0; p < b; p++)
                    y.glText[p] = new x(w);
                if (y.glText) {
                  if (b > y.glText.length) {
                    var T = b - y.glText.length;
                    for (p = 0; p < T; p++)
                      y.glText.push(new x(w));
                  } else if (b < y.glText.length) {
                    var L = y.glText.length - b;
                    y.glText.splice(b, L).forEach(function(K) {
                      K.destroy();
                    });
                  }
                  for (p = 0; p < b; p++)
                    y.glText[p].update(y.textOptions[p]);
                }
                if (y.line2d && (y.line2d.update(y.lineOptions), y.lineOptions = y.lineOptions.map(function(K) {
                  if (K && K.positions) {
                    for (var X = K.positions, te = 0; te < X.length && (isNaN(X[te]) || isNaN(X[te + 1])); )
                      te += 2;
                    for (var ie = X.length - 2; ie > te && (isNaN(X[ie]) || isNaN(X[ie + 1])); )
                      ie -= 2;
                    K.positions = X.slice(te, ie + 2);
                  }
                  return K;
                }), y.line2d.update(y.lineOptions)), y.error2d) {
                  var A = (y.errorXOptions || []).concat(y.errorYOptions || []);
                  y.error2d.update(A);
                }
                y.scatter2d && y.scatter2d.update(y.markerOptions), y.fillOrder = e.repeat(null, b), y.fill2d && (y.fillOptions = y.fillOptions.map(function(K, X) {
                  var te = i[X];
                  if (K && te && te[0] && te[0].trace) {
                    var ie, le, oe = te[0], ve = oe.trace, ue = oe.t, ye = y.lineOptions[X], Ae = [];
                    ve._ownfill && Ae.push(X), ve._nexttrace && Ae.push(X + 1), Ae.length && (y.fillOrder[X] = Ae);
                    var pe, ge, we = [], se = ye && ye.positions || ue.positions;
                    if (ve.fill === "tozeroy") {
                      for (pe = 0; pe < se.length && isNaN(se[pe + 1]); )
                        pe += 2;
                      for (ge = se.length - 2; ge > pe && isNaN(se[ge + 1]); )
                        ge -= 2;
                      se[pe + 1] !== 0 && (we = [se[pe], 0]), we = we.concat(se.slice(pe, ge + 2)), se[ge + 1] !== 0 && (we = we.concat([se[ge], 0]));
                    } else if (ve.fill === "tozerox") {
                      for (pe = 0; pe < se.length && isNaN(se[pe]); )
                        pe += 2;
                      for (ge = se.length - 2; ge > pe && isNaN(se[ge]); )
                        ge -= 2;
                      se[pe] !== 0 && (we = [0, se[pe + 1]]), we = we.concat(se.slice(pe, ge + 2)), se[ge] !== 0 && (we = we.concat([0, se[ge + 1]]));
                    } else if (ve.fill === "toself" || ve.fill === "tonext") {
                      for (we = [], ie = 0, K.splitNull = !0, le = 0; le < se.length; le += 2)
                        (isNaN(se[le]) || isNaN(se[le + 1])) && ((we = we.concat(se.slice(ie, le))).push(se[ie], se[ie + 1]), we.push(null, null), ie = le + 2);
                      we = we.concat(se.slice(ie)), ie && we.push(se[ie], se[ie + 1]);
                    } else {
                      var de = ve._nexttrace;
                      if (de) {
                        var Te = y.lineOptions[X + 1];
                        if (Te) {
                          var Ee = Te.positions;
                          if (ve.fill === "tonexty") {
                            for (we = se.slice(), X = Math.floor(Ee.length / 2); X--; ) {
                              var Me = Ee[2 * X], ze = Ee[2 * X + 1];
                              isNaN(Me) || isNaN(ze) || we.push(Me, ze);
                            }
                            K.fill = de.fillcolor;
                          }
                        }
                      }
                    }
                    if (ve._prevtrace && ve._prevtrace.fill === "tonext") {
                      var Ie = y.lineOptions[X - 1].positions, Oe = we.length / 2, Ze = [ie = Oe];
                      for (le = 0; le < Ie.length; le += 2)
                        (isNaN(Ie[le]) || isNaN(Ie[le + 1])) && (Ze.push(le / 2 + Oe + 1), ie = le + 2);
                      we = we.concat(Ie), K.hole = Ze;
                    }
                    return K.fillmode = ve.fill, K.opacity = ve.opacity, K.positions = we, K;
                  }
                }), y.fill2d.update(y.fillOptions));
              }
              var I = a.dragmode, P = r(I), S = a.clickmode.indexOf("select") > -1;
              for (p = 0; p < b; p++) {
                var E = i[p][0], R = E.trace, z = E.t, j = z.index, H = R._length, Y = z.x, J = z.y;
                if (R.selectedpoints || P || S) {
                  if (P || (P = !0), R.selectedpoints) {
                    var W = y.selectBatch[j] = e.selIndices2selPoints(R), Z = {};
                    for (c = 0; c < W.length; c++)
                      Z[W[c]] = 1;
                    var re = [];
                    for (c = 0; c < H; c++)
                      Z[c] || re.push(c);
                    y.unselectBatch[j] = re;
                  }
                  var V = z.xpx = new Array(H), B = z.ypx = new Array(H);
                  for (c = 0; c < H; c++)
                    V[c] = f.c2p(Y[c]), B[c] = _.c2p(J[c]);
                } else
                  z.xpx = z.ypx = null;
              }
              if (P) {
                if (y.select2d || (y.select2d = m(a._glcanvas.data()[1].regl)), y.scatter2d) {
                  var U = new Array(b);
                  for (p = 0; p < b; p++)
                    U[p] = y.selectBatch[p].length || y.unselectBatch[p].length ? y.markerUnselectedOptions[p] : {};
                  y.scatter2d.update(U);
                }
                y.select2d && (y.select2d.update(y.markerOptions), y.select2d.update(y.markerSelectedOptions)), y.glText && i.forEach(function(K) {
                  var X = ((K || [])[0] || {}).trace || {};
                  s.hasText(X) && d(K);
                });
              } else
                y.scatter2d && y.scatter2d.update(y.markerOptions);
              var ee = { viewport: o(a, f, _, h._context.plotGlPixelRatio), range: [(f._rl || f.range)[0], (_._rl || _.range)[0], (f._rl || f.range)[1], (_._rl || _.range)[1]] }, N = e.repeat(ee, y.count);
              y.fill2d && y.fill2d.update(N), y.line2d && y.line2d.update(N), y.error2d && y.error2d.update(N.concat(N)), y.scatter2d && y.scatter2d.update(N), y.select2d && y.select2d.update(N), y.glText && y.glText.forEach(function(K) {
                K.update(ee);
              });
            } else
              y.init();
        }
      }).reglPrecompiled = u;
    }, { "../../components/dragelement/helpers": 385, "../../lib": 515, "../../lib/prepare_regl": 528, "../scatter/link_traces": 952, "../scatter/subtypes": 961, "./edit_style": 994, "gl-text": 225, "regl-error2d": 280, "regl-line2d": 281, "regl-scatter2d": 282 }], 1e3: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        var x = k._scene, e = { count: 0, dirty: !0, lineOptions: [], fillOptions: [], markerOptions: [], markerSelectedOptions: [], markerUnselectedOptions: [], errorXOptions: [], errorYOptions: [], textOptions: [], textSelectedOptions: [], textUnselectedOptions: [], selectBatch: [], unselectBatch: [] }, r = { fill2d: !1, scatter2d: !1, error2d: !1, line2d: !1, glText: !1, select2d: !1 };
        return k._scene || ((x = k._scene = {}).init = function() {
          m.extendFlat(x, r, e);
        }, x.init(), x.update = function(n) {
          var s = m.repeat(n, x.count);
          if (x.fill2d && x.fill2d.update(s), x.scatter2d && x.scatter2d.update(s), x.line2d && x.line2d.update(s), x.error2d && x.error2d.update(s.concat(s)), x.select2d && x.select2d.update(s), x.glText)
            for (var t = 0; t < x.count; t++)
              x.glText[t].update(n);
        }, x.draw = function() {
          for (var n = x.count, s = x.fill2d, t = x.error2d, d = x.line2d, u = x.scatter2d, o = x.glText, h = x.select2d, l = x.selectBatch, i = x.unselectBatch, p = 0; p < n; p++) {
            if (s && x.fillOrder[p] && s.draw(x.fillOrder[p]), d && x.lineOptions[p] && d.draw(p), t && (x.errorXOptions[p] && t.draw(p), x.errorYOptions[p] && t.draw(p + n)), u && x.markerOptions[p])
              if (i[p].length) {
                var c = m.repeat([], x.count);
                c[p] = i[p], u.draw(c);
              } else
                l[p].length || u.draw(p);
            o[p] && x.textOptions[p] && o[p].render();
          }
          h && h.draw(l), x.dirty = !1;
        }, x.destroy = function() {
          x.fill2d && x.fill2d.destroy && x.fill2d.destroy(), x.scatter2d && x.scatter2d.destroy && x.scatter2d.destroy(), x.error2d && x.error2d.destroy && x.error2d.destroy(), x.line2d && x.line2d.destroy && x.line2d.destroy(), x.select2d && x.select2d.destroy && x.select2d.destroy(), x.glText && x.glText.forEach(function(n) {
            n.destroy && n.destroy();
          }), x.lineOptions = null, x.fillOptions = null, x.markerOptions = null, x.markerSelectedOptions = null, x.markerUnselectedOptions = null, x.errorXOptions = null, x.errorYOptions = null, x.textOptions = null, x.textSelectedOptions = null, x.textUnselectedOptions = null, x.selectBatch = null, x.unselectBatch = null, k._scene = null;
        }), x.dirty || m.extendFlat(x, e), x;
      };
    }, { "../../lib": 515 }], 1001: [function(v, Q, $) {
      var m = v("../scatter/subtypes"), g = v("./edit_style").styleTextSelection;
      Q.exports = function(k, x) {
        var e = k.cd, r = k.xaxis, n = k.yaxis, s = [], t = e[0].trace, d = e[0].t, u = t._length, o = d.x, h = d.y, l = d._scene, i = d.index;
        if (!l)
          return s;
        var p = m.hasText(t), c = m.hasMarkers(t), a = !c && !p;
        if (t.visible !== !0 || a)
          return s;
        var y = [], f = [];
        if (x !== !1 && !x.degenerate)
          for (var _ = 0; _ < u; _++)
            x.contains([d.xpx[_], d.ypx[_]], !1, _, k) ? (y.push(_), s.push({ pointNumber: _, x: r.c2d(o[_]), y: n.c2d(h[_]) })) : f.push(_);
        if (c) {
          var b = l.scatter2d;
          if (y.length || f.length) {
            if (!l.selectBatch[i].length && !l.unselectBatch[i].length) {
              var w = new Array(l.count);
              w[i] = l.markerUnselectedOptions[i], b.update.apply(b, w);
            }
          } else {
            var T = new Array(l.count);
            T[i] = l.markerOptions[i], b.update.apply(b, T);
          }
        }
        return l.selectBatch[i] = y, l.unselectBatch[i] = f, p && g(e), s;
      };
    }, { "../scatter/subtypes": 961, "./edit_style": 994 }], 1002: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../scattergeo/attributes"), x = v("../scatter/attributes"), e = v("../../plots/mapbox/layout_attributes"), r = v("../../plots/attributes"), n = v("../../components/colorscale/attributes"), s = v("../../lib/extend").extendFlat, t = v("../../plot_api/edit_types").overrideAll, d = v("../../plots/mapbox/layout_attributes"), u = k.line, o = k.marker;
      Q.exports = t({ lon: k.lon, lat: k.lat, cluster: { enabled: { valType: "boolean" }, maxzoom: s({}, d.layers.maxzoom, {}), step: { valType: "number", arrayOk: !0, dflt: -1, min: -1 }, size: { valType: "number", arrayOk: !0, dflt: 20, min: 0 }, color: { valType: "color", arrayOk: !0 }, opacity: s({}, o.opacity, { dflt: 1 }) }, mode: s({}, x.mode, { dflt: "markers" }), text: s({}, x.text, {}), texttemplate: g({ editType: "plot" }, { keys: ["lat", "lon", "text"] }), hovertext: s({}, x.hovertext, {}), line: { color: u.color, width: u.width }, connectgaps: x.connectgaps, marker: s({ symbol: { valType: "string", dflt: "circle", arrayOk: !0 }, angle: { valType: "number", dflt: "auto", arrayOk: !0 }, allowoverlap: { valType: "boolean", dflt: !1 }, opacity: o.opacity, size: o.size, sizeref: o.sizeref, sizemin: o.sizemin, sizemode: o.sizemode }, n("marker")), fill: k.fill, fillcolor: x.fillcolor, textfont: e.layers.symbol.textfont, textposition: e.layers.symbol.textposition, below: { valType: "string" }, selected: { marker: x.selected.marker }, unselected: { marker: x.unselected.marker }, hoverinfo: s({}, r.hoverinfo, { flags: ["lon", "lat", "text", "name"] }), hovertemplate: m() }, "calc", "nested");
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../../plots/mapbox/layout_attributes": 624, "../../plots/template_attributes": 642, "../scatter/attributes": 936, "../scattergeo/attributes": 978 }], 1003: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../lib"), k = v("../../constants/numerical").BADNUM, x = v("../../lib/geojson_utils"), e = v("../../components/colorscale"), r = v("../../components/drawing"), n = v("../scatter/make_bubble_size_func"), s = v("../scatter/subtypes"), t = v("../../plots/mapbox/convert_text_opts"), d = v("../../components/fx/helpers").appendArrayPointValue, u = v("../../lib/svg_text_utils").NEWLINES, o = v("../../lib/svg_text_utils").BR_TAG_ALL;
      function h(a) {
        return { type: a, geojson: x.makeBlank(), layout: { visibility: "none" }, filter: null, paint: {} };
      }
      function l(a, y) {
        return g.isArrayOrTypedArray(a) ? y ? function(f) {
          return m(a[f]) ? +a[f] : 0;
        } : function(f) {
          return a[f];
        } : a ? function() {
          return a;
        } : i;
      }
      function i() {
        return "";
      }
      function p(a) {
        return a[0] === k;
      }
      function c(a, y) {
        var f;
        if (g.isArrayOrTypedArray(a) && g.isArrayOrTypedArray(y)) {
          f = ["step", ["get", "point_count"], a[0]];
          for (var _ = 1; _ < a.length; _++)
            f.push(y[_ - 1], a[_]);
        } else
          f = a;
        return f;
      }
      Q.exports = function(a, y) {
        var f, _ = y[0].trace, b = _.visible === !0 && _._length !== 0, w = _.fill !== "none", T = s.hasLines(_), L = s.hasMarkers(_), A = s.hasText(_), I = L && _.marker.symbol === "circle", P = L && _.marker.symbol !== "circle", S = _.cluster && _.cluster.enabled, E = h("fill"), R = h("line"), z = h("circle"), j = h("symbol"), H = { fill: E, line: R, circle: z, symbol: j };
        if (!b)
          return H;
        if ((w || T) && (f = x.calcTraceToLineCoords(y)), w && (E.geojson = x.makePolygon(f), E.layout.visibility = "visible", g.extendFlat(E.paint, { "fill-color": _.fillcolor })), T && (R.geojson = x.makeLine(f), R.layout.visibility = "visible", g.extendFlat(R.paint, { "line-width": _.line.width, "line-color": _.line.color, "line-opacity": _.opacity })), I) {
          var Y = function(Z) {
            var re, V, B, U, ee = Z[0].trace, N = ee.marker, K = ee.selectedpoints, X = g.isArrayOrTypedArray(N.color), te = g.isArrayOrTypedArray(N.size), ie = g.isArrayOrTypedArray(N.opacity);
            function le(we) {
              return ee.opacity * we;
            }
            X && (V = e.hasColorscale(ee, "marker") ? e.makeColorScaleFuncFromTrace(N) : g.identity), te && (B = n(ee)), ie && (U = function(we) {
              return le(m(we) ? +g.constrain(we, 0, 1) : 0);
            });
            var oe, ve = [];
            for (re = 0; re < Z.length; re++) {
              var ue = Z[re], ye = ue.lonlat;
              if (!p(ye)) {
                var Ae = {};
                V && (Ae.mcc = ue.mcc = V(ue.mc)), B && (Ae.mrc = ue.mrc = B(ue.ms)), U && (Ae.mo = U(ue.mo)), K && (Ae.selected = ue.selected || 0), ve.push({ type: "Feature", id: re + 1, geometry: { type: "Point", coordinates: ye }, properties: Ae });
              }
            }
            if (K)
              for (oe = r.makeSelectedPointStyleFns(ee), re = 0; re < ve.length; re++) {
                var pe = ve[re].properties;
                oe.selectedOpacityFn && (pe.mo = le(oe.selectedOpacityFn(pe))), oe.selectedColorFn && (pe.mcc = oe.selectedColorFn(pe)), oe.selectedSizeFn && (pe.mrc = oe.selectedSizeFn(pe));
              }
            return { geojson: { type: "FeatureCollection", features: ve }, mcc: X || oe && oe.selectedColorFn ? { type: "identity", property: "mcc" } : N.color, mrc: te || oe && oe.selectedSizeFn ? { type: "identity", property: "mrc" } : (ge = N.size, ge / 2), mo: ie || oe && oe.selectedOpacityFn ? { type: "identity", property: "mo" } : le(N.opacity) };
            var ge;
          }(y);
          z.geojson = Y.geojson, z.layout.visibility = "visible", S && (z.filter = ["!", ["has", "point_count"]], H.cluster = { type: "circle", filter: ["has", "point_count"], layout: { visibility: "visible" }, paint: { "circle-color": c(_.cluster.color, _.cluster.step), "circle-radius": c(_.cluster.size, _.cluster.step), "circle-opacity": c(_.cluster.opacity, _.cluster.step) } }, H.clusterCount = { type: "symbol", filter: ["has", "point_count"], paint: {}, layout: { "text-field": "{point_count_abbreviated}", "text-font": ["Open Sans Regular", "Arial Unicode MS Regular"], "text-size": 12 } }), g.extendFlat(z.paint, { "circle-color": Y.mcc, "circle-radius": Y.mrc, "circle-opacity": Y.mo });
        }
        if (I && S && (z.filter = ["!", ["has", "point_count"]]), (P || A) && (j.geojson = function(Z, re) {
          for (var V = re._fullLayout, B = Z[0].trace, U = B.marker || {}, ee = U.symbol, N = U.angle, K = ee !== "circle" ? l(ee) : i, X = N !== "auto" ? l(N, !0) : i, te = s.hasText(B) ? l(B.text) : i, ie = [], le = 0; le < Z.length; le++) {
            var oe = Z[le];
            if (!p(oe.lonlat)) {
              var ve, ue = B.texttemplate;
              if (ue) {
                var ye = Array.isArray(ue) ? ue[le] || "" : ue, Ae = B._module.formatLabels(oe, B, V), pe = {};
                d(pe, B, oe.i);
                var ge = B._meta || {};
                ve = g.texttemplateString(ye, Ae, V._d3locale, pe, oe, ge);
              } else
                ve = te(le);
              ve && (ve = ve.replace(u, "").replace(o, `
`)), ie.push({ type: "Feature", geometry: { type: "Point", coordinates: oe.lonlat }, properties: { symbol: K(le), angle: X(le), text: ve } });
            }
          }
          return { type: "FeatureCollection", features: ie };
        }(y, a), g.extendFlat(j.layout, { visibility: "visible", "icon-image": "{symbol}-15", "text-field": "{text}" }), P && (g.extendFlat(j.layout, { "icon-size": _.marker.size / 10 }), "angle" in _.marker && _.marker.angle !== "auto" && g.extendFlat(j.layout, { "icon-rotate": { type: "identity", property: "angle" }, "icon-rotation-alignment": "map" }), j.layout["icon-allow-overlap"] = _.marker.allowoverlap, g.extendFlat(j.paint, { "icon-opacity": _.opacity * _.marker.opacity, "icon-color": _.marker.color })), A)) {
          var J = (_.marker || {}).size, W = t(_.textposition, J);
          g.extendFlat(j.layout, { "text-size": _.textfont.size, "text-anchor": W.anchor, "text-offset": W.offset }), g.extendFlat(j.paint, { "text-color": _.textfont.color, "text-opacity": _.opacity });
        }
        return H;
      };
    }, { "../../components/colorscale": 379, "../../components/drawing": 389, "../../components/fx/helpers": 403, "../../constants/numerical": 491, "../../lib": 515, "../../lib/geojson_utils": 509, "../../lib/svg_text_utils": 541, "../../plots/mapbox/convert_text_opts": 621, "../scatter/make_bubble_size_func": 953, "../scatter/subtypes": 961, "fast-isnumeric": 190 }], 1004: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/subtypes"), k = v("../scatter/marker_defaults"), x = v("../scatter/line_defaults"), e = v("../scatter/text_defaults"), r = v("../scatter/fillcolor_defaults"), n = v("./attributes");
      Q.exports = function(s, t, d, u) {
        function o(f, _) {
          return m.coerce(s, t, n, f, _);
        }
        function h(f, _) {
          return m.coerce2(s, t, n, f, _);
        }
        if (function(f, _, b) {
          var w = b("lon") || [], T = b("lat") || [], L = Math.min(w.length, T.length);
          return _._length = L, L;
        }(0, t, o)) {
          if (o("text"), o("texttemplate"), o("hovertext"), o("hovertemplate"), o("mode"), o("below"), g.hasLines(t) && (x(s, t, d, u, o, { noDash: !0 }), o("connectgaps")), g.hasMarkers(t)) {
            k(s, t, d, u, o, { noLine: !0, noAngle: !0 }), o("marker.allowoverlap"), o("marker.angle");
            var l = t.marker;
            l.symbol !== "circle" && (m.isArrayOrTypedArray(l.size) && (l.size = l.size[0]), m.isArrayOrTypedArray(l.color) && (l.color = l.color[0]));
          }
          var i = h("cluster.maxzoom"), p = h("cluster.step"), c = h("cluster.color", t.marker && t.marker.color || d), a = h("cluster.size"), y = h("cluster.opacity");
          o("cluster.enabled", i !== !1 || p !== !1 || c !== !1 || a !== !1 || y !== !1), g.hasText(t) && e(s, t, u, o, { noSelect: !0 }), o("fill"), t.fill !== "none" && r(s, t, d, o), m.coerceSelectionMarkerOpacity(t, o);
        } else
          t.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 1002 }], 1005: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m.lon = g.lon, m.lat = g.lat, m;
      };
    }, {}], 1006: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes");
      Q.exports = function(g, k, x) {
        var e = {}, r = x[k.subplot]._subplot.mockAxis, n = g.lonlat;
        return e.lonLabel = m.tickText(r, r.c2l(n[0]), !0).text, e.latLabel = m.tickText(r, r.c2l(n[1]), !0).text, e;
      };
    }, { "../../plots/cartesian/axes": 566 }], 1007: [function(v, Q, $) {
      var m = v("../../components/fx"), g = v("../../lib"), k = v("../scatter/get_trace_color"), x = g.fillText, e = v("../../constants/numerical").BADNUM, r = v("../../plots/mapbox/constants").traceLayerPrefix;
      function n(s, t, d) {
        if (!s.hovertemplate) {
          var u = (t.hi || s.hoverinfo).split("+"), o = u.indexOf("all") !== -1, h = u.indexOf("lon") !== -1, l = u.indexOf("lat") !== -1, i = t.lonlat, p = [];
          return o || h && l ? p.push("(" + c(i[1]) + ", " + c(i[0]) + ")") : h ? p.push(d.lon + c(i[0])) : l && p.push(d.lat + c(i[1])), (o || u.indexOf("text") !== -1) && x(t, s, p), p.join("<br>");
        }
        function c(a) {
          return a + "\xB0";
        }
      }
      Q.exports = { hoverPoints: function(s, t, d) {
        var u = s.cd, o = u[0].trace, h = s.xa, l = s.ya, i = s.subplot, p = [], c = r + o.uid + "-circle", a = o.cluster && o.cluster.enabled;
        if (a) {
          var y = i.map.queryRenderedFeatures(null, { layers: [c] });
          p = y.map(function(E) {
            return E.id;
          });
        }
        var f = 360 * (t >= 0 ? Math.floor((t + 180) / 360) : Math.ceil((t - 180) / 360)), _ = t - f;
        if (m.getClosest(u, function(E) {
          var R = E.lonlat;
          if (R[0] === e || a && p.indexOf(E.i + 1) === -1)
            return 1 / 0;
          var z = g.modHalf(R[0], 360), j = R[1], H = i.project([z, j]), Y = H.x - h.c2p([_, j]), J = H.y - l.c2p([z, d]), W = Math.max(3, E.mrc || 0);
          return Math.max(Math.sqrt(Y * Y + J * J) - W, 1 - 3 / W);
        }, s), s.index !== !1) {
          var b = u[s.index], w = b.lonlat, T = [g.modHalf(w[0], 360) + f, w[1]], L = h.c2p(T), A = l.c2p(T), I = b.mrc || 1;
          s.x0 = L - I, s.x1 = L + I, s.y0 = A - I, s.y1 = A + I;
          var P = {};
          P[o.subplot] = { _subplot: i };
          var S = o._module.formatLabels(b, o, P);
          return s.lonLabel = S.lonLabel, s.latLabel = S.latLabel, s.color = k(o, b), s.extraText = n(o, b, u[0].t.labels), s.hovertemplate = o.hovertemplate, [s];
        }
      }, getExtraText: n };
    }, { "../../components/fx": 407, "../../constants/numerical": 491, "../../lib": 515, "../../plots/mapbox/constants": 620, "../scatter/get_trace_color": 946 }], 1008: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("../scattergeo/calc"), plot: v("./plot"), hoverPoints: v("./hover").hoverPoints, eventData: v("./event_data"), selectPoints: v("./select"), styleOnSelect: function(m, g) {
        g && g[0].trace._glTrace.update(g);
      }, moduleType: "trace", name: "scattermapbox", basePlotModule: v("../../plots/mapbox"), categories: ["mapbox", "gl", "symbols", "showLegend", "scatter-like"], meta: {} };
    }, { "../../plots/mapbox": 622, "../scatter/marker_colorbar": 954, "../scattergeo/calc": 979, "./attributes": 1002, "./defaults": 1004, "./event_data": 1005, "./format_labels": 1006, "./hover": 1007, "./plot": 1009, "./select": 1010 }], 1009: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./convert"), k = v("../../plots/mapbox/constants").traceLayerPrefix, x = { cluster: ["cluster", "clusterCount", "circle"], nonCluster: ["fill", "line", "circle", "symbol"] };
      function e(n, s, t) {
        this.type = "scattermapbox", this.subplot = n, this.uid = s, this.clusterEnabled = t, this.sourceIds = { fill: "source-" + s + "-fill", line: "source-" + s + "-line", circle: "source-" + s + "-circle", symbol: "source-" + s + "-symbol", cluster: "source-" + s + "-circle", clusterCount: "source-" + s + "-circle" }, this.layerIds = { fill: k + s + "-fill", line: k + s + "-line", circle: k + s + "-circle", symbol: k + s + "-symbol", cluster: k + s + "-cluster", clusterCount: k + s + "-cluster-count" }, this.below = null;
      }
      var r = e.prototype;
      r.addSource = function(n, s, t) {
        var d = { type: "geojson", data: s.geojson };
        t && t.enabled && m.extendFlat(d, { cluster: !0, clusterMaxZoom: t.maxzoom }), this.subplot.map.addSource(this.sourceIds[n], d);
      }, r.setSourceData = function(n, s) {
        this.subplot.map.getSource(this.sourceIds[n]).setData(s.geojson);
      }, r.addLayer = function(n, s, t) {
        var d = { type: s.type, id: this.layerIds[n], source: this.sourceIds[n], layout: s.layout, paint: s.paint };
        s.filter && (d.filter = s.filter), this.subplot.addLayer(d, t);
      }, r.update = function(n) {
        var s, t, d, u = n[0].trace, o = this.subplot, h = o.map, l = g(o.gd, n), i = o.belowLookup["trace-" + this.uid], p = !(!u.cluster || !u.cluster.enabled), c = !!this.clusterEnabled;
        if (i !== this.below) {
          var a = x.nonCluster;
          for (s = a.length - 1; s >= 0; s--)
            t = a[s], h.removeLayer(this.layerIds[t]);
          for (s = 0; s < a.length; s++)
            d = l[t = a[s]], this.addLayer(t, d, i);
          this.below = i;
        } else if (p && !c) {
          for (s = x.nonCluster.length - 1; s >= 0; s--)
            t = x.nonCluster[s], h.removeLayer(this.layerIds[t]), h.removeSource(this.sourceIds[t]);
          for (this.addSource("circle", l.circle, u.cluster), s = 0; s < x.cluster.length; s++)
            d = l[t = x.cluster[s]], this.addLayer(t, d, i);
          this.clusterEnabled = p;
        } else if (!p && c) {
          for (s = 0; s < x.cluster.length; s++)
            t = x.cluster[s], h.removeLayer(this.layerIds[t]);
          for (h.removeSource(this.sourceIds.circle), s = 0; s < x.nonCluster.length; s++)
            d = l[t = x.nonCluster[s]], this.addSource(t, d, u.cluster), this.addLayer(t, d, i);
          this.clusterEnabled = p;
        }
        n[0].trace._glTrace = this;
      }, r.dispose = function() {
        for (var n = this.subplot.map, s = this.clusterEnabled ? x.cluster : x.nonCluster, t = s.length - 1; t >= 0; t--) {
          var d = s[t];
          n.removeLayer(this.layerIds[d]), n.removeSource(this.sourceIds[d]);
        }
      }, Q.exports = function(n, s) {
        var t, d, u, o = s[0].trace, h = o.cluster && o.cluster.enabled, l = new e(n, o.uid, h), i = g(n.gd, s), p = l.below = n.belowLookup["trace-" + o.uid];
        if (h)
          for (l.addSource("circle", i.circle, o.cluster), t = 0; t < x.cluster.length; t++)
            u = i[d = x.cluster[t]], l.addLayer(d, u, p);
        else
          for (t = 0; t < x.nonCluster.length; t++)
            u = i[d = x.nonCluster[t]], l.addSource(d, u, o.cluster), l.addLayer(d, u, p);
        return s[0].trace._glTrace = l, l;
      };
    }, { "../../lib": 515, "../../plots/mapbox/constants": 620, "./convert": 1003 }], 1010: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/subtypes"), k = v("../../constants/numerical").BADNUM;
      Q.exports = function(x, e) {
        var r, n = x.cd, s = x.xaxis, t = x.yaxis, d = [], u = n[0].trace;
        if (!g.hasMarkers(u))
          return [];
        if (e === !1)
          for (r = 0; r < n.length; r++)
            n[r].selected = 0;
        else
          for (r = 0; r < n.length; r++) {
            var o = n[r], h = o.lonlat;
            if (h[0] !== k) {
              var l = [m.modHalf(h[0], 360), h[1]], i = [s.c2p(l), t.c2p(l)];
              e.contains(i, null, r, x) ? (d.push({ pointNumber: r, lon: h[0], lat: h[1] }), o.selected = 1) : o.selected = 0;
            }
          }
        return d;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../scatter/subtypes": 961 }], 1011: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../../lib/extend").extendFlat, x = v("../scatter/attributes"), e = v("../../plots/attributes"), r = x.line;
      Q.exports = { mode: x.mode, r: { valType: "data_array", editType: "calc+clearAxisTypes" }, theta: { valType: "data_array", editType: "calc+clearAxisTypes" }, r0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, dr: { valType: "number", dflt: 1, editType: "calc" }, theta0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, dtheta: { valType: "number", editType: "calc" }, thetaunit: { valType: "enumerated", values: ["radians", "degrees", "gradians"], dflt: "degrees", editType: "calc+clearAxisTypes" }, text: x.text, texttemplate: g({ editType: "plot" }, { keys: ["r", "theta", "text"] }), hovertext: x.hovertext, line: { color: r.color, width: r.width, dash: r.dash, backoff: r.backoff, shape: k({}, r.shape, { values: ["linear", "spline"] }), smoothing: r.smoothing, editType: "calc" }, connectgaps: x.connectgaps, marker: x.marker, cliponaxis: k({}, x.cliponaxis, { dflt: !1 }), textposition: x.textposition, textfont: x.textfont, fill: k({}, x.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: x.fillcolor, hoverinfo: k({}, e.hoverinfo, { flags: ["r", "theta", "text", "name"] }), hoveron: x.hoveron, hovertemplate: m(), selected: x.selected, unselected: x.unselected };
    }, { "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 1012: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../constants/numerical").BADNUM, k = v("../../plots/cartesian/axes"), x = v("../scatter/colorscale_calc"), e = v("../scatter/arrays_to_calcdata"), r = v("../scatter/calc_selection"), n = v("../scatter/calc").calcMarkerSize;
      Q.exports = function(s, t) {
        for (var d = s._fullLayout, u = t.subplot, o = d[u].radialaxis, h = d[u].angularaxis, l = o.makeCalcdata(t, "r"), i = h.makeCalcdata(t, "theta"), p = t._length, c = new Array(p), a = 0; a < p; a++) {
          var y = l[a], f = i[a], _ = c[a] = {};
          m(y) && m(f) ? (_.r = y, _.theta = f) : _.r = g;
        }
        var b = n(t, p);
        return t._extremes.x = k.findExtremes(o, l, { ppad: b }), x(s, t), e(c, t), r(c, t), c;
      };
    }, { "../../constants/numerical": 491, "../../plots/cartesian/axes": 566, "../scatter/arrays_to_calcdata": 935, "../scatter/calc": 937, "../scatter/calc_selection": 938, "../scatter/colorscale_calc": 939, "fast-isnumeric": 190 }], 1013: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/subtypes"), k = v("../scatter/marker_defaults"), x = v("../scatter/line_defaults"), e = v("../scatter/line_shape_defaults"), r = v("../scatter/text_defaults"), n = v("../scatter/fillcolor_defaults"), s = v("../scatter/constants").PTS_LINESONLY, t = v("./attributes");
      function d(u, o, h, l) {
        var i, p = l("r"), c = l("theta");
        if (p)
          c ? i = Math.min(p.length, c.length) : (i = p.length, l("theta0"), l("dtheta"));
        else {
          if (!c)
            return 0;
          i = o.theta.length, l("r0"), l("dr");
        }
        return o._length = i, i;
      }
      Q.exports = { handleRThetaDefaults: d, supplyDefaults: function(u, o, h, l) {
        function i(a, y) {
          return m.coerce(u, o, t, a, y);
        }
        var p = d(u, o, l, i);
        if (p) {
          i("thetaunit"), i("mode", p < s ? "lines+markers" : "lines"), i("text"), i("hovertext"), o.hoveron !== "fills" && i("hovertemplate"), g.hasLines(o) && (x(u, o, h, l, i, { backoff: !0 }), e(u, o, i), i("connectgaps")), g.hasMarkers(o) && k(u, o, h, l, i, { gradient: !0 }), g.hasText(o) && (i("texttemplate"), r(u, o, l, i));
          var c = [];
          (g.hasMarkers(o) || g.hasText(o)) && (i("cliponaxis"), i("marker.maxdisplayed"), c.push("points")), i("fill"), o.fill !== "none" && (n(u, o, h, i), g.hasLines(o) || e(u, o, i)), o.fill !== "tonext" && o.fill !== "toself" || c.push("fills"), i("hoveron", c.join("+") || "points"), m.coerceSelectionMarkerOpacity(o, i);
        } else
          o.visible = !1;
      } };
    }, { "../../lib": 515, "../scatter/constants": 940, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/line_shape_defaults": 951, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 1011 }], 1014: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes");
      Q.exports = function(k, x, e) {
        var r, n, s = {}, t = e[x.subplot]._subplot;
        t ? (r = t.radialAxis, n = t.angularAxis) : (r = (t = e[x.subplot]).radialaxis, n = t.angularaxis);
        var d = r.c2l(k.r);
        s.rLabel = g.tickText(r, d, !0).text;
        var u = n.thetaunit === "degrees" ? m.rad2deg(k.theta) : k.theta;
        return s.thetaLabel = g.tickText(n, u, !0).text, s;
      };
    }, { "../../lib": 515, "../../plots/cartesian/axes": 566 }], 1015: [function(v, Q, $) {
      var m = v("../scatter/hover");
      function g(k, x, e, r) {
        var n = e.radialAxis, s = e.angularAxis;
        n._hovertitle = "r", s._hovertitle = "\u03B8";
        var t = {};
        t[x.subplot] = { _subplot: e };
        var d = x._module.formatLabels(k, x, t);
        r.rLabel = d.rLabel, r.thetaLabel = d.thetaLabel;
        var u = k.hi || x.hoverinfo, o = [];
        function h(i, p) {
          o.push(i._hovertitle + ": " + p);
        }
        if (!x.hovertemplate) {
          var l = u.split("+");
          l.indexOf("all") !== -1 && (l = ["r", "theta", "text"]), l.indexOf("r") !== -1 && h(n, r.rLabel), l.indexOf("theta") !== -1 && h(s, r.thetaLabel), l.indexOf("text") !== -1 && r.text && (o.push(r.text), delete r.text), r.extraText = o.join("<br>");
        }
      }
      Q.exports = { hoverPoints: function(k, x, e, r) {
        var n = m(k, x, e, r);
        if (n && n[0].index !== !1) {
          var s = n[0];
          if (s.index === void 0)
            return n;
          var t = k.subplot, d = s.cd[s.index], u = s.trace;
          if (t.isPtInside(d))
            return s.xLabelVal = void 0, s.yLabelVal = void 0, g(d, u, t, s), s.hovertemplate = u.hovertemplate, n;
        }
      }, makeHoverPointText: g };
    }, { "../scatter/hover": 947 }], 1016: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "scatterpolar", basePlotModule: v("../../plots/polar"), categories: ["polar", "symbols", "showLegend", "scatter-like"], attributes: v("./attributes"), supplyDefaults: v("./defaults").supplyDefaults, colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), plot: v("./plot"), style: v("../scatter/style").style, styleOnSelect: v("../scatter/style").styleOnSelect, hoverPoints: v("./hover").hoverPoints, selectPoints: v("../scatter/select"), meta: {} };
    }, { "../../plots/polar": 631, "../scatter/marker_colorbar": 954, "../scatter/select": 958, "../scatter/style": 960, "./attributes": 1011, "./calc": 1012, "./defaults": 1013, "./format_labels": 1014, "./hover": 1015, "./plot": 1017 }], 1017: [function(v, Q, $) {
      var m = v("../scatter/plot"), g = v("../../constants/numerical").BADNUM;
      Q.exports = function(k, x, e) {
        for (var r = x.layers.frontplot.select("g.scatterlayer"), n = x.xaxis, s = x.yaxis, t = { xaxis: n, yaxis: s, plot: x.framework, layerClipId: x._hasClipOnAxisFalse ? x.clipIds.forTraces : null }, d = x.radialAxis, u = x.angularAxis, o = 0; o < e.length; o++)
          for (var h = e[o], l = 0; l < h.length; l++) {
            l === 0 && (h[0].trace._xA = n, h[0].trace._yA = s);
            var i = h[l], p = i.r;
            if (p === g)
              i.x = i.y = g;
            else {
              var c = d.c2g(p), a = u.c2g(i.theta);
              i.x = c * Math.cos(a), i.y = c * Math.sin(a);
            }
          }
        m(k, t, e, r);
      };
    }, { "../../constants/numerical": 491, "../scatter/plot": 957 }], 1018: [function(v, Q, $) {
      var m = v("../scatterpolar/attributes"), g = v("../scattergl/attributes"), k = v("../../plots/template_attributes").texttemplateAttrs;
      Q.exports = { mode: m.mode, r: m.r, theta: m.theta, r0: m.r0, dr: m.dr, theta0: m.theta0, dtheta: m.dtheta, thetaunit: m.thetaunit, text: m.text, texttemplate: k({ editType: "plot" }, { keys: ["r", "theta", "text"] }), hovertext: m.hovertext, hovertemplate: m.hovertemplate, line: g.line, connectgaps: g.connectgaps, marker: g.marker, fill: g.fill, fillcolor: g.fillcolor, textposition: g.textposition, textfont: g.textfont, hoverinfo: m.hoverinfo, selected: m.selected, unselected: m.unselected };
    }, { "../../plots/template_attributes": 642, "../scattergl/attributes": 988, "../scatterpolar/attributes": 1011 }], 1019: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "scatterpolargl", basePlotModule: v("../../plots/polar"), categories: ["gl", "regl", "polar", "symbols", "showLegend", "scatter-like"], attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), hoverPoints: v("./hover").hoverPoints, selectPoints: v("../scattergl/select"), meta: {} };
    }, { "../../plots/polar": 631, "../scatter/marker_colorbar": 954, "../scattergl/select": 1001, "./attributes": 1018, "./calc": 1020, "./defaults": 1021, "./format_labels": 1022, "./hover": 1023 }], 1020: [function(v, Q, $) {
      var m = v("../scatter/colorscale_calc"), g = v("../scatter/calc").calcMarkerSize, k = v("../scattergl/convert"), x = v("../../plots/cartesian/axes"), e = v("../scattergl/constants").TOO_MANY_POINTS;
      Q.exports = function(r, n) {
        var s = r._fullLayout, t = n.subplot, d = s[t].radialaxis, u = s[t].angularaxis, o = n._r = d.makeCalcdata(n, "r"), h = n._theta = u.makeCalcdata(n, "theta"), l = n._length, i = {};
        l < o.length && (o = o.slice(0, l)), l < h.length && (h = h.slice(0, l)), i.r = o, i.theta = h, m(r, n);
        var p, c = i.opts = k.style(r, n);
        return l < e ? p = g(n, l) : c.marker && (p = 2 * (c.marker.sizeAvg || Math.max(c.marker.size, 3))), n._extremes.x = x.findExtremes(d, o, { ppad: p }), [{ x: !1, y: !1, t: i, trace: n }];
      };
    }, { "../../plots/cartesian/axes": 566, "../scatter/calc": 937, "../scatter/colorscale_calc": 939, "../scattergl/constants": 991, "../scattergl/convert": 992 }], 1021: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/subtypes"), k = v("../scatterpolar/defaults").handleRThetaDefaults, x = v("../scatter/marker_defaults"), e = v("../scatter/line_defaults"), r = v("../scatter/text_defaults"), n = v("../scatter/fillcolor_defaults"), s = v("../scatter/constants").PTS_LINESONLY, t = v("./attributes");
      Q.exports = function(d, u, o, h) {
        function l(p, c) {
          return m.coerce(d, u, t, p, c);
        }
        var i = k(d, u, h, l);
        i ? (l("thetaunit"), l("mode", i < s ? "lines+markers" : "lines"), l("text"), l("hovertext"), u.hoveron !== "fills" && l("hovertemplate"), g.hasLines(u) && (e(d, u, o, h, l), l("connectgaps")), g.hasMarkers(u) && x(d, u, o, h, l, { noAngleRef: !0, noStandOff: !0 }), g.hasText(u) && (l("texttemplate"), r(d, u, h, l)), l("fill"), u.fill !== "none" && n(d, u, o, l), m.coerceSelectionMarkerOpacity(u, l)) : u.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/constants": 940, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "../scatterpolar/defaults": 1013, "./attributes": 1018 }], 1022: [function(v, Q, $) {
      var m = v("../scatterpolar/format_labels");
      Q.exports = function(g, k, x) {
        var e = g.i;
        return "r" in g || (g.r = k._r[e]), "theta" in g || (g.theta = k._theta[e]), m(g, k, x);
      };
    }, { "../scatterpolar/format_labels": 1014 }], 1023: [function(v, Q, $) {
      var m = v("../scattergl/hover"), g = v("../scatterpolar/hover").makeHoverPointText;
      Q.exports = { hoverPoints: function(k, x, e, r) {
        var n = k.cd[0].t, s = n.r, t = n.theta, d = m.hoverPoints(k, x, e, r);
        if (d && d[0].index !== !1) {
          var u = d[0];
          if (u.index === void 0)
            return d;
          var o = k.subplot, h = u.cd[u.index], l = u.trace;
          if (h.r = s[u.index], h.theta = t[u.index], o.isPtInside(h))
            return u.xLabelVal = void 0, u.yLabelVal = void 0, g(h, l, o, u), d;
        }
      } };
    }, { "../scattergl/hover": 997, "../scatterpolar/hover": 1015 }], 1024: [function(v, Q, $) {
      arguments[4][905][0].apply($, arguments);
    }, { "./base_index": 1019, "./plot": 1025, dup: 905 }], 1025: [function(v, Q, $) {
      var m = v("@plotly/point-cluster"), g = v("fast-isnumeric"), k = v("../scattergl/plot"), x = v("../scattergl/scene_update"), e = v("../scattergl/convert"), r = v("../../lib"), n = v("../scattergl/constants").TOO_MANY_POINTS;
      Q.exports = function(s, t, d) {
        if (d.length) {
          var u = t.radialAxis, o = t.angularAxis, h = x(s, t);
          return d.forEach(function(l) {
            if (l && l[0] && l[0].trace) {
              var i, p = l[0], c = p.trace, a = p.t, y = c._length, f = a.r, _ = a.theta, b = a.opts, w = f.slice(), T = _.slice();
              for (i = 0; i < f.length; i++)
                t.isPtInside({ r: f[i], theta: _[i] }) || (w[i] = NaN, T[i] = NaN);
              var L = new Array(2 * y), A = Array(y), I = Array(y);
              for (i = 0; i < y; i++) {
                var P, S, E = w[i];
                if (g(E)) {
                  var R = u.c2g(E), z = o.c2g(T[i], c.thetaunit);
                  P = R * Math.cos(z), S = R * Math.sin(z);
                } else
                  P = S = NaN;
                A[i] = L[2 * i] = P, I[i] = L[2 * i + 1] = S;
              }
              a.tree = m(L), b.marker && y >= n && (b.marker.cluster = a.tree), b.marker && (b.markerSel.positions = b.markerUnsel.positions = b.marker.positions = L), b.line && L.length > 1 && r.extendFlat(b.line, e.linePositions(s, c, L)), b.text && (r.extendFlat(b.text, { positions: L }, e.textPosition(s, c, b.text, b.marker)), r.extendFlat(b.textSel, { positions: L }, e.textPosition(s, c, b.text, b.markerSel)), r.extendFlat(b.textUnsel, { positions: L }, e.textPosition(s, c, b.text, b.markerUnsel))), b.fill && !h.fill2d && (h.fill2d = !0), b.marker && !h.scatter2d && (h.scatter2d = !0), b.line && !h.line2d && (h.line2d = !0), b.text && !h.glText && (h.glText = !0), h.lineOptions.push(b.line), h.fillOptions.push(b.fill), h.markerOptions.push(b.marker), h.markerSelectedOptions.push(b.markerSel), h.markerUnselectedOptions.push(b.markerUnsel), h.textOptions.push(b.text), h.textSelectedOptions.push(b.textSel), h.textUnselectedOptions.push(b.textUnsel), h.selectBatch.push([]), h.unselectBatch.push([]), a.x = A, a.y = I, a.rawx = A, a.rawy = I, a.r = f, a.theta = _, a.positions = L, a._scene = h, a.index = h.count, h.count++;
            }
          }), k(s, t, d);
        }
      }, Q.exports.reglPrecompiled = {};
    }, { "../../lib": 515, "../scattergl/constants": 991, "../scattergl/convert": 992, "../scattergl/plot": 999, "../scattergl/scene_update": 1e3, "@plotly/point-cluster": 59, "fast-isnumeric": 190 }], 1026: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../../lib/extend").extendFlat, x = v("../scatter/attributes"), e = v("../../plots/attributes"), r = x.line;
      Q.exports = { mode: x.mode, real: { valType: "data_array", editType: "calc+clearAxisTypes" }, imag: { valType: "data_array", editType: "calc+clearAxisTypes" }, text: x.text, texttemplate: g({ editType: "plot" }, { keys: ["real", "imag", "text"] }), hovertext: x.hovertext, line: { color: r.color, width: r.width, dash: r.dash, backoff: r.backoff, shape: k({}, r.shape, { values: ["linear", "spline"] }), smoothing: r.smoothing, editType: "calc" }, connectgaps: x.connectgaps, marker: x.marker, cliponaxis: k({}, x.cliponaxis, { dflt: !1 }), textposition: x.textposition, textfont: x.textfont, fill: k({}, x.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: x.fillcolor, hoverinfo: k({}, e.hoverinfo, { flags: ["real", "imag", "text", "name"] }), hoveron: x.hoveron, hovertemplate: m(), selected: x.selected, unselected: x.unselected };
    }, { "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 1027: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../../constants/numerical").BADNUM, k = v("../scatter/colorscale_calc"), x = v("../scatter/arrays_to_calcdata"), e = v("../scatter/calc_selection"), r = v("../scatter/calc").calcMarkerSize;
      Q.exports = function(n, s) {
        for (var t = n._fullLayout, d = s.subplot, u = t[d].realaxis, o = t[d].imaginaryaxis, h = u.makeCalcdata(s, "real"), l = o.makeCalcdata(s, "imag"), i = s._length, p = new Array(i), c = 0; c < i; c++) {
          var a = h[c], y = l[c], f = p[c] = {};
          m(a) && m(y) ? (f.real = a, f.imag = y) : f.real = g;
        }
        return r(s, i), k(n, s), x(p, s), e(p, s), p;
      };
    }, { "../../constants/numerical": 491, "../scatter/arrays_to_calcdata": 935, "../scatter/calc": 937, "../scatter/calc_selection": 938, "../scatter/colorscale_calc": 939, "fast-isnumeric": 190 }], 1028: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/subtypes"), k = v("../scatter/marker_defaults"), x = v("../scatter/line_defaults"), e = v("../scatter/line_shape_defaults"), r = v("../scatter/text_defaults"), n = v("../scatter/fillcolor_defaults"), s = v("../scatter/constants").PTS_LINESONLY, t = v("./attributes");
      Q.exports = function(d, u, o, h) {
        function l(c, a) {
          return m.coerce(d, u, t, c, a);
        }
        var i = function(c, a, y, f) {
          var _, b = f("real"), w = f("imag");
          return b && w && (_ = Math.min(b.length, w.length)), a._length = _, _;
        }(0, u, 0, l);
        if (i) {
          l("mode", i < s ? "lines+markers" : "lines"), l("text"), l("hovertext"), u.hoveron !== "fills" && l("hovertemplate"), g.hasLines(u) && (x(d, u, o, h, l, { backoff: !0 }), e(d, u, l), l("connectgaps")), g.hasMarkers(u) && k(d, u, o, h, l, { gradient: !0 }), g.hasText(u) && (l("texttemplate"), r(d, u, h, l));
          var p = [];
          (g.hasMarkers(u) || g.hasText(u)) && (l("cliponaxis"), l("marker.maxdisplayed"), p.push("points")), l("fill"), u.fill !== "none" && (n(d, u, o, l), g.hasLines(u) || e(d, u, l)), u.fill !== "tonext" && u.fill !== "toself" || p.push("fills"), l("hoveron", p.join("+") || "points"), m.coerceSelectionMarkerOpacity(u, l);
        } else
          u.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/constants": 940, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/line_shape_defaults": 951, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 1026 }], 1029: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes");
      Q.exports = function(g, k, x) {
        var e = {}, r = x[k.subplot]._subplot;
        return e.realLabel = m.tickText(r.radialAxis, g.real, !0).text, e.imagLabel = m.tickText(r.angularAxis, g.imag, !0).text, e;
      };
    }, { "../../plots/cartesian/axes": 566 }], 1030: [function(v, Q, $) {
      var m = v("../scatter/hover");
      function g(k, x, e, r) {
        var n = e.radialAxis, s = e.angularAxis;
        n._hovertitle = "real", s._hovertitle = "imag";
        var t = {};
        t[x.subplot] = { _subplot: e };
        var d = x._module.formatLabels(k, x, t);
        r.realLabel = d.realLabel, r.imagLabel = d.imagLabel;
        var u = k.hi || x.hoverinfo, o = [];
        function h(i, p) {
          o.push(i._hovertitle + ": " + p);
        }
        if (!x.hovertemplate) {
          var l = u.split("+");
          l.indexOf("all") !== -1 && (l = ["real", "imag", "text"]), l.indexOf("real") !== -1 && h(n, r.realLabel), l.indexOf("imag") !== -1 && h(s, r.imagLabel), l.indexOf("text") !== -1 && r.text && (o.push(r.text), delete r.text), r.extraText = o.join("<br>");
        }
      }
      Q.exports = { hoverPoints: function(k, x, e, r) {
        var n = m(k, x, e, r);
        if (n && n[0].index !== !1) {
          var s = n[0];
          if (s.index === void 0)
            return n;
          var t = k.subplot, d = s.cd[s.index], u = s.trace;
          if (t.isPtInside(d))
            return s.xLabelVal = void 0, s.yLabelVal = void 0, g(d, u, t, s), s.hovertemplate = u.hovertemplate, n;
        }
      }, makeHoverPointText: g };
    }, { "../scatter/hover": 947 }], 1031: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "scattersmith", basePlotModule: v("../../plots/smith"), categories: ["smith", "symbols", "showLegend", "scatter-like"], attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), plot: v("./plot"), style: v("../scatter/style").style, styleOnSelect: v("../scatter/style").styleOnSelect, hoverPoints: v("./hover").hoverPoints, selectPoints: v("../scatter/select"), meta: {} };
    }, { "../../plots/smith": 638, "../scatter/marker_colorbar": 954, "../scatter/select": 958, "../scatter/style": 960, "./attributes": 1026, "./calc": 1027, "./defaults": 1028, "./format_labels": 1029, "./hover": 1030, "./plot": 1032 }], 1032: [function(v, Q, $) {
      var m = v("../scatter/plot"), g = v("../../constants/numerical").BADNUM, k = v("../../plots/smith/helpers").smith;
      Q.exports = function(x, e, r) {
        for (var n = e.layers.frontplot.select("g.scatterlayer"), s = e.xaxis, t = e.yaxis, d = { xaxis: s, yaxis: t, plot: e.framework, layerClipId: e._hasClipOnAxisFalse ? e.clipIds.forTraces : null }, u = 0; u < r.length; u++)
          for (var o = r[u], h = 0; h < o.length; h++) {
            h === 0 && (o[0].trace._xA = s, o[0].trace._yA = t);
            var l = o[h], i = l.real;
            if (i === g)
              l.x = l.y = g;
            else {
              var p = k([i, l.imag]);
              l.x = p[0], l.y = p[1];
            }
          }
        m(x, d, r, n);
      };
    }, { "../../constants/numerical": 491, "../../plots/smith/helpers": 637, "../scatter/plot": 957 }], 1033: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../scatter/attributes"), x = v("../../plots/attributes"), e = v("../../components/colorscale/attributes"), r = v("../../components/drawing/attributes").dash, n = v("../../lib/extend").extendFlat, s = k.marker, t = k.line, d = s.line;
      Q.exports = { a: { valType: "data_array", editType: "calc" }, b: { valType: "data_array", editType: "calc" }, c: { valType: "data_array", editType: "calc" }, sum: { valType: "number", dflt: 0, min: 0, editType: "calc" }, mode: n({}, k.mode, { dflt: "markers" }), text: n({}, k.text, {}), texttemplate: g({ editType: "plot" }, { keys: ["a", "b", "c", "text"] }), hovertext: n({}, k.hovertext, {}), line: { color: t.color, width: t.width, dash: r, backoff: t.backoff, shape: n({}, t.shape, { values: ["linear", "spline"] }), smoothing: t.smoothing, editType: "calc" }, connectgaps: k.connectgaps, cliponaxis: k.cliponaxis, fill: n({}, k.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: k.fillcolor, marker: n({ symbol: s.symbol, opacity: s.opacity, angle: s.angle, angleref: s.angleref, standoff: s.standoff, maxdisplayed: s.maxdisplayed, size: s.size, sizeref: s.sizeref, sizemin: s.sizemin, sizemode: s.sizemode, line: n({ width: d.width, editType: "calc" }, e("marker.line")), gradient: s.gradient, editType: "calc" }, e("marker")), textfont: k.textfont, textposition: k.textposition, selected: k.selected, unselected: k.unselected, hoverinfo: n({}, x.hoverinfo, { flags: ["a", "b", "c", "text", "name"] }), hoveron: k.hoveron, hovertemplate: m() };
    }, { "../../components/colorscale/attributes": 374, "../../components/drawing/attributes": 388, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/template_attributes": 642, "../scatter/attributes": 936 }], 1034: [function(v, Q, $) {
      var m = v("fast-isnumeric"), g = v("../scatter/colorscale_calc"), k = v("../scatter/arrays_to_calcdata"), x = v("../scatter/calc_selection"), e = v("../scatter/calc").calcMarkerSize, r = ["a", "b", "c"], n = { a: ["b", "c"], b: ["a", "c"], c: ["a", "b"] };
      Q.exports = function(s, t) {
        var d, u, o, h, l, i, p = s._fullLayout[t.subplot].sum, c = t.sum || p, a = { a: t.a, b: t.b, c: t.c };
        for (d = 0; d < r.length; d++)
          if (!a[o = r[d]]) {
            for (l = a[n[o][0]], i = a[n[o][1]], h = new Array(l.length), u = 0; u < l.length; u++)
              h[u] = c - l[u] - i[u];
            a[o] = h;
          }
        var y, f, _, b, w, T, L = t._length, A = new Array(L);
        for (d = 0; d < L; d++)
          y = a.a[d], f = a.b[d], _ = a.c[d], m(y) && m(f) && m(_) ? ((b = p / ((y = +y) + (f = +f) + (_ = +_))) !== 1 && (y *= b, f *= b, _ *= b), T = y, w = _ - f, A[d] = { x: w, y: T, a: y, b: f, c: _ }) : A[d] = { x: !1, y: !1 };
        return e(t, L), g(s, t), k(A, t), x(A, t), A;
      };
    }, { "../scatter/arrays_to_calcdata": 935, "../scatter/calc": 937, "../scatter/calc_selection": 938, "../scatter/colorscale_calc": 939, "fast-isnumeric": 190 }], 1035: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/constants"), k = v("../scatter/subtypes"), x = v("../scatter/marker_defaults"), e = v("../scatter/line_defaults"), r = v("../scatter/line_shape_defaults"), n = v("../scatter/text_defaults"), s = v("../scatter/fillcolor_defaults"), t = v("./attributes");
      Q.exports = function(d, u, o, h) {
        function l(f, _) {
          return m.coerce(d, u, t, f, _);
        }
        var i, p = l("a"), c = l("b"), a = l("c");
        if (p ? (i = p.length, c ? (i = Math.min(i, c.length), a && (i = Math.min(i, a.length))) : i = a ? Math.min(i, a.length) : 0) : c && a && (i = Math.min(c.length, a.length)), i) {
          u._length = i, l("sum"), l("text"), l("hovertext"), u.hoveron !== "fills" && l("hovertemplate"), l("mode", i < g.PTS_LINESONLY ? "lines+markers" : "lines"), k.hasLines(u) && (e(d, u, o, h, l, { backoff: !0 }), r(d, u, l), l("connectgaps")), k.hasMarkers(u) && x(d, u, o, h, l, { gradient: !0 }), k.hasText(u) && (l("texttemplate"), n(d, u, h, l));
          var y = [];
          (k.hasMarkers(u) || k.hasText(u)) && (l("cliponaxis"), l("marker.maxdisplayed"), y.push("points")), l("fill"), u.fill !== "none" && (s(d, u, o, l), k.hasLines(u) || r(d, u, l)), u.fill !== "tonext" && u.fill !== "toself" || y.push("fills"), l("hoveron", y.join("+") || "points"), m.coerceSelectionMarkerOpacity(u, l);
        } else
          u.visible = !1;
      };
    }, { "../../lib": 515, "../scatter/constants": 940, "../scatter/fillcolor_defaults": 944, "../scatter/line_defaults": 949, "../scatter/line_shape_defaults": 951, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scatter/text_defaults": 962, "./attributes": 1033 }], 1036: [function(v, Q, $) {
      Q.exports = function(m, g, k, x, e) {
        if (g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), x[e]) {
          var r = x[e];
          m.a = r.a, m.b = r.b, m.c = r.c;
        } else
          m.a = g.a, m.b = g.b, m.c = g.c;
        return m;
      };
    }, {}], 1037: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes");
      Q.exports = function(g, k, x) {
        var e = {}, r = x[k.subplot]._subplot;
        return e.aLabel = m.tickText(r.aaxis, g.a, !0).text, e.bLabel = m.tickText(r.baxis, g.b, !0).text, e.cLabel = m.tickText(r.caxis, g.c, !0).text, e;
      };
    }, { "../../plots/cartesian/axes": 566 }], 1038: [function(v, Q, $) {
      var m = v("../scatter/hover");
      Q.exports = function(g, k, x, e) {
        var r = m(g, k, x, e);
        if (r && r[0].index !== !1) {
          var n = r[0];
          if (n.index === void 0) {
            var s = 1 - n.y0 / g.ya._length, t = g.xa._length, d = t * s / 2, u = t - d;
            return n.x0 = Math.max(Math.min(n.x0, u), d), n.x1 = Math.max(Math.min(n.x1, u), d), r;
          }
          var o = n.cd[n.index], h = n.trace, l = n.subplot;
          n.a = o.a, n.b = o.b, n.c = o.c, n.xLabelVal = void 0, n.yLabelVal = void 0;
          var i = {};
          i[h.subplot] = { _subplot: l };
          var p = h._module.formatLabels(o, h, i);
          n.aLabel = p.aLabel, n.bLabel = p.bLabel, n.cLabel = p.cLabel;
          var c = o.hi || h.hoverinfo, a = [];
          if (!h.hovertemplate) {
            var y = c.split("+");
            y.indexOf("all") !== -1 && (y = ["a", "b", "c"]), y.indexOf("a") !== -1 && f(l.aaxis, n.aLabel), y.indexOf("b") !== -1 && f(l.baxis, n.bLabel), y.indexOf("c") !== -1 && f(l.caxis, n.cLabel);
          }
          return n.extraText = a.join("<br>"), n.hovertemplate = h.hovertemplate, r;
        }
        function f(_, b) {
          a.push(_._hovertitle + ": " + b);
        }
      };
    }, { "../scatter/hover": 947 }], 1039: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), formatLabels: v("./format_labels"), calc: v("./calc"), plot: v("./plot"), style: v("../scatter/style").style, styleOnSelect: v("../scatter/style").styleOnSelect, hoverPoints: v("./hover"), selectPoints: v("../scatter/select"), eventData: v("./event_data"), moduleType: "trace", name: "scatterternary", basePlotModule: v("../../plots/ternary"), categories: ["ternary", "symbols", "showLegend", "scatter-like"], meta: {} };
    }, { "../../plots/ternary": 643, "../scatter/marker_colorbar": 954, "../scatter/select": 958, "../scatter/style": 960, "./attributes": 1033, "./calc": 1034, "./defaults": 1035, "./event_data": 1036, "./format_labels": 1037, "./hover": 1038, "./plot": 1040 }], 1040: [function(v, Q, $) {
      var m = v("../scatter/plot");
      Q.exports = function(g, k, x) {
        var e = k.plotContainer;
        e.select(".scatterlayer").selectAll("*").remove();
        for (var r = k.xaxis, n = k.yaxis, s = { xaxis: r, yaxis: n, plot: e, layerClipId: k._hasClipOnAxisFalse ? k.clipIdRelative : null }, t = k.layers.frontplot.select("g.scatterlayer"), d = 0; d < x.length; d++) {
          var u = x[d];
          u.length && (u[0].trace._xA = r, u[0].trace._yA = n);
        }
        m(g, s, x, t);
      };
    }, { "../scatter/plot": 957 }], 1041: [function(v, Q, $) {
      var m = v("../scatter/attributes"), g = v("../../components/colorscale/attributes"), k = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, x = v("../../plots/template_attributes").hovertemplateAttrs, e = v("../scattergl/attributes"), r = v("../../plots/cartesian/constants").idRegex, n = v("../../plot_api/plot_template").templatedArray, s = v("../../lib/extend").extendFlat, t = m.marker, d = t.line, u = s(g("marker.line", { editTypeOverride: "calc" }), { width: s({}, d.width, { editType: "calc" }), editType: "calc" }), o = s(g("marker"), { symbol: t.symbol, angle: t.angle, size: s({}, t.size, { editType: "markerSize" }), sizeref: t.sizeref, sizemin: t.sizemin, sizemode: t.sizemode, opacity: t.opacity, colorbar: t.colorbar, line: u, editType: "calc" });
      function h(l) {
        return { valType: "info_array", freeLength: !0, editType: "calc", items: { valType: "subplotid", regex: r[l], editType: "plot" } };
      }
      o.color.editType = o.cmin.editType = o.cmax.editType = "style", Q.exports = { dimensions: n("dimension", { visible: { valType: "boolean", dflt: !0, editType: "calc" }, label: { valType: "string", editType: "calc" }, values: { valType: "data_array", editType: "calc+clearAxisTypes" }, axis: { type: { valType: "enumerated", values: ["linear", "log", "date", "category"], editType: "calc+clearAxisTypes" }, matches: { valType: "boolean", dflt: !1, editType: "calc" }, editType: "calc+clearAxisTypes" }, editType: "calc+clearAxisTypes" }), text: s({}, e.text, {}), hovertext: s({}, e.hovertext, {}), hovertemplate: x(), xhoverformat: k("x"), yhoverformat: k("y"), marker: o, xaxes: h("x"), yaxes: h("y"), diagonal: { visible: { valType: "boolean", dflt: !0, editType: "calc" }, editType: "calc" }, showupperhalf: { valType: "boolean", dflt: !0, editType: "calc" }, showlowerhalf: { valType: "boolean", dflt: !0, editType: "calc" }, selected: { marker: e.selected.marker, editType: "calc" }, unselected: { marker: e.unselected.marker, editType: "calc" }, opacity: e.opacity };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/plot_template": 555, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/cartesian/constants": 573, "../../plots/template_attributes": 642, "../scatter/attributes": 936, "../scattergl/attributes": 988 }], 1042: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../components/grid");
      Q.exports = { moduleType: "trace", name: "splom", categories: ["gl", "regl", "cartesian", "symbols", "showLegend", "scatter-like"], attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: v("../scatter/marker_colorbar"), calc: v("./calc"), plot: v("./plot"), hoverPoints: v("./hover").hoverPoints, selectPoints: v("./select"), editStyle: v("./edit_style"), meta: {} }, m.register(g);
    }, { "../../components/grid": 411, "../../registry": 647, "../scatter/marker_colorbar": 954, "./attributes": 1041, "./calc": 1044, "./defaults": 1045, "./edit_style": 1046, "./hover": 1048, "./plot": 1050, "./select": 1052 }], 1043: [function(v, Q, $) {
      var m = v("regl-line2d"), g = v("../../registry"), k = v("../../lib/prepare_regl"), x = v("../../plots/get_data").getModuleCalcData, e = v("../../plots/cartesian"), r = v("../../plots/cartesian/axis_ids").getFromId, n = v("../../plots/cartesian/axes").shouldShowZeroLine, s = {};
      function t(u, o, h) {
        for (var l = h.matrixOptions.data.length, i = o._visibleDims, p = h.viewOpts.ranges = new Array(l), c = 0; c < i.length; c++) {
          var a = i[c], y = p[c] = new Array(4), f = r(u, o._diag[a][0]);
          f && (y[0] = f.r2l(f.range[0]), y[2] = f.r2l(f.range[1]));
          var _ = r(u, o._diag[a][1]);
          _ && (y[1] = _.r2l(_.range[0]), y[3] = _.r2l(_.range[1]));
        }
        h.selectBatch.length || h.unselectBatch.length ? h.matrix.update({ ranges: p }, { ranges: p }) : h.matrix.update({ ranges: p });
      }
      function d(u) {
        var o = u._fullLayout, h = o._glcanvas.data()[0].regl, l = o._splomGrid;
        l || (l = o._splomGrid = m(h)), l.update(function(i) {
          var p, c = i._context.plotGlPixelRatio, a = i._fullLayout, y = a._size, f = [0, 0, a.width * c, a.height * c], _ = {};
          function b(W, Z, re, V, B, U) {
            re *= c, V *= c, B *= c, U *= c;
            var ee = Z[W + "color"], N = Z[W + "width"], K = String(ee + N);
            K in _ ? _[K].data.push(NaN, NaN, re, V, B, U) : _[K] = { data: [re, V, B, U], join: "rect", thickness: N * c, color: ee, viewport: f, range: f, overlay: !1 };
          }
          for (p in a._splomSubplots) {
            var w, T, L = a._plots[p], A = L.xaxis, I = L.yaxis, P = A._gridVals, S = I._gridVals, E = A._offset, R = A._length, z = I._length, j = y.b + I.domain[0] * y.h, H = -I._m, Y = -H * I.r2l(I.range[0], I.calendar);
            if (A.showgrid)
              for (p = 0; p < P.length; p++)
                w = E + A.l2p(P[p].x), b("grid", A, w, j, w, j + z);
            if (I.showgrid)
              for (p = 0; p < S.length; p++)
                T = j + Y + H * S[p].x, b("grid", I, E, T, E + R, T);
            n(i, A, I) && (w = E + A.l2p(0), b("zeroline", A, w, j, w, j + z)), n(i, I, A) && b("zeroline", I, E, T = j + Y + 0, E + R, T);
          }
          var J = [];
          for (p in _)
            J.push(_[p]);
          return J;
        }(u));
      }
      Q.exports = { name: "splom", attr: e.attr, attrRegex: e.attrRegex, layoutAttributes: e.layoutAttributes, supplyLayoutDefaults: e.supplyLayoutDefaults, drawFramework: e.drawFramework, plot: function(u) {
        var o = u._fullLayout, h = g.getModule("splom"), l = x(u.calcdata, h)[0];
        k(u, ["ANGLE_instanced_arrays", "OES_element_index_uint"], s) && (o._hasOnlyLargeSploms && d(u), h.plot(u, {}, l));
      }, drag: function(u) {
        var o = u.calcdata, h = u._fullLayout;
        h._hasOnlyLargeSploms && d(u);
        for (var l = 0; l < o.length; l++) {
          var i = o[l][0].trace, p = h._splomScenes[i.uid];
          i.type === "splom" && p && p.matrix && t(u, i, p);
        }
      }, updateGrid: d, clean: function(u, o, h, l) {
        var i, p = {};
        if (l._splomScenes) {
          for (i = 0; i < u.length; i++) {
            var c = u[i];
            c.type === "splom" && (p[c.uid] = 1);
          }
          for (i = 0; i < h.length; i++) {
            var a = h[i];
            if (!p[a.uid]) {
              var y = l._splomScenes[a.uid];
              y && y.destroy && y.destroy(), l._splomScenes[a.uid] = null, delete l._splomScenes[a.uid];
            }
          }
        }
        Object.keys(l._splomScenes || {}).length === 0 && delete l._splomScenes, l._splomGrid && !o._hasOnlyLargeSploms && l._hasOnlyLargeSploms && (l._splomGrid.destroy(), l._splomGrid = null, delete l._splomGrid), e.clean(u, o, h, l);
      }, updateFx: e.updateFx, toSVG: e.toSVG, reglPrecompiled: s };
    }, { "../../lib/prepare_regl": 528, "../../plots/cartesian": 578, "../../plots/cartesian/axes": 566, "../../plots/cartesian/axis_ids": 570, "../../plots/get_data": 602, "../../registry": 647, "regl-line2d": 281 }], 1044: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axis_ids"), k = v("../scatter/calc").calcMarkerSize, x = v("../scatter/calc").calcAxisExpansion, e = v("../scatter/colorscale_calc"), r = v("../scattergl/convert").markerSelection, n = v("../scattergl/convert").markerStyle, s = v("./scene_update"), t = v("../../constants/numerical").BADNUM, d = v("../scattergl/constants").TOO_MANY_POINTS;
      Q.exports = function(u, o) {
        var h, l, i, p, c, a, y = o.dimensions, f = o._length, _ = {}, b = _.cdata = [], w = _.data = [], T = o._visibleDims = [];
        function L(I, P) {
          for (var S = I.makeCalcdata({ v: P.values, vcalendar: o.calendar }, "v"), E = 0; E < S.length; E++)
            S[E] = S[E] === t ? NaN : S[E];
          b.push(S), w.push(I.type === "log" ? m.simpleMap(S, I.c2l) : S);
        }
        for (h = 0; h < y.length; h++)
          if ((i = y[h]).visible) {
            if (p = g.getFromId(u, o._diag[h][0]), c = g.getFromId(u, o._diag[h][1]), p && c && p.type !== c.type) {
              m.log("Skipping splom dimension " + h + " with conflicting axis types");
              continue;
            }
            p ? (L(p, i), c && c.type === "category" && (c._categories = p._categories.slice())) : L(c, i), T.push(h);
          }
        for (e(u, o), m.extendFlat(_, n(u, o)), a = b.length * f > d ? _.sizeAvg || Math.max(_.size, 3) : k(o, f), l = 0; l < T.length; l++)
          i = y[h = T[l]], p = g.getFromId(u, o._diag[h][0]) || {}, c = g.getFromId(u, o._diag[h][1]) || {}, x(u, o, p, c, b[l], b[l], a);
        var A = s(u, o);
        return A.matrix || (A.matrix = !0), A.matrixOptions = _, A.selectedOptions = r(u, o, o.selected), A.unselectedOptions = r(u, o, o.unselected), [{ x: !1, y: !1, t: {}, trace: o }];
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/axis_ids": 570, "../scatter/calc": 937, "../scatter/colorscale_calc": 939, "../scattergl/constants": 991, "../scattergl/convert": 992, "./scene_update": 1051 }], 1045: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/array_container_defaults"), k = v("./attributes"), x = v("../scatter/subtypes"), e = v("../scatter/marker_defaults"), r = v("../parcoords/merge_length"), n = v("../scattergl/helpers").isOpenSymbol;
      function s(t, d) {
        function u(h, l) {
          return m.coerce(t, d, k.dimensions, h, l);
        }
        u("label");
        var o = u("values");
        o && o.length ? u("visible") : d.visible = !1, u("axis.type"), u("axis.matches");
      }
      Q.exports = function(t, d, u, o) {
        function h(f, _) {
          return m.coerce(t, d, k, f, _);
        }
        var l = g(t, d, { name: "dimensions", handleItemDefaults: s }), i = h("diagonal.visible"), p = h("showupperhalf"), c = h("showlowerhalf");
        if (r(d, l, "values") && (i || p || c)) {
          h("text"), h("hovertext"), h("hovertemplate"), h("xhoverformat"), h("yhoverformat"), e(t, d, u, o, h, { noAngleRef: !0, noStandOff: !0 });
          var a = n(d.marker.symbol), y = x.isBubble(d);
          h("marker.line.width", a || y ? 1 : 0), function(f, _, b, w) {
            var T, L, A = _.dimensions, I = A.length, P = _.showupperhalf, S = _.showlowerhalf, E = _.diagonal.visible, R = new Array(I), z = new Array(I);
            for (T = 0; T < I; T++) {
              var j = T ? T + 1 : "";
              R[T] = "x" + j, z[T] = "y" + j;
            }
            var H = w("xaxes", R), Y = w("yaxes", z), J = _._diag = new Array(I);
            _._xaxes = {}, _._yaxes = {};
            var W = [], Z = [];
            function re(ie, le, oe, ve) {
              if (ie) {
                var ue = ie.charAt(0), ye = b._splomAxes[ue];
                if (_["_" + ue + "axes"][ie] = 1, ve.push(ie), !(ie in ye)) {
                  var Ae = ye[ie] = {};
                  oe && (Ae.label = oe.label || "", oe.visible && oe.axis && (oe.axis.type && (Ae.type = oe.axis.type), oe.axis.matches && (Ae.matches = le)));
                }
              }
            }
            var V = !E && !S, B = !E && !P;
            for (_._axesDim = {}, T = 0; T < I; T++) {
              var U = A[T], ee = T === 0, N = T === I - 1, K = ee && V || N && B ? void 0 : H[T], X = ee && B || N && V ? void 0 : Y[T];
              re(K, X, U, W), re(X, K, U, Z), J[T] = [K, X], _._axesDim[K] = T, _._axesDim[X] = T;
            }
            for (T = 0; T < W.length; T++)
              for (L = 0; L < Z.length; L++) {
                var te = W[T] + Z[L];
                T > L && P || T < L && S ? b._splomSubplots[te] = 1 : T !== L || !E && S && P || (b._splomSubplots[te] = 1);
              }
            (!S || !E && P && S) && (b._splomGridDflt.xside = "bottom", b._splomGridDflt.yside = "left");
          }(0, d, o, h), m.coerceSelectionMarkerOpacity(d, h);
        } else
          d.visible = !1;
      };
    }, { "../../lib": 515, "../../plots/array_container_defaults": 561, "../parcoords/merge_length": 907, "../scatter/marker_defaults": 955, "../scatter/subtypes": 961, "../scattergl/helpers": 996, "./attributes": 1041 }], 1046: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../scatter/colorscale_calc"), k = v("../scattergl/convert").markerStyle;
      Q.exports = function(x, e) {
        var r = e.trace, n = x._fullLayout._splomScenes[r.uid];
        if (n) {
          g(x, r), m.extendFlat(n.matrixOptions, k(x, r));
          var s = m.extendFlat({}, n.matrixOptions, n.viewOpts);
          n.matrix.update(s, null);
        }
      };
    }, { "../../lib": 515, "../scatter/colorscale_calc": 939, "../scattergl/convert": 992 }], 1047: [function(v, Q, $) {
      $.getDimIndex = function(m, g) {
        for (var k = g._id, x = { x: 0, y: 1 }[k.charAt(0)], e = m._visibleDims, r = 0; r < e.length; r++) {
          var n = e[r];
          if (m._diag[n][x] === k)
            return r;
        }
        return !1;
      };
    }, {}], 1048: [function(v, Q, $) {
      var m = v("./helpers"), g = v("../scattergl/hover").calcHover;
      Q.exports = { hoverPoints: function(k, x, e) {
        var r = k.cd[0].trace, n = k.scene.matrixOptions.cdata, s = k.xa, t = k.ya, d = s.c2p(x), u = t.c2p(e), o = k.distance, h = m.getDimIndex(r, s), l = m.getDimIndex(r, t);
        if (h === !1 || l === !1)
          return [k];
        for (var i, p, c = n[h], a = n[l], y = o, f = 0; f < c.length; f++) {
          var _ = c[f], b = a[f], w = s.c2p(_) - d, T = t.c2p(b) - u, L = Math.sqrt(w * w + T * T);
          L < y && (y = p = L, i = f);
        }
        return k.index = i, k.distance = y, k.dxy = p, i === void 0 ? [k] : [g(k, c, a, r)];
      } };
    }, { "../scattergl/hover": 997, "./helpers": 1047 }], 1049: [function(v, Q, $) {
      var m = v("./base_index");
      m.basePlotModule = v("./base_plot"), Q.exports = m;
    }, { "./base_index": 1042, "./base_plot": 1043 }], 1050: [function(v, Q, $) {
      var m = v("regl-splom"), g = v("../../lib"), k = v("../../plots/cartesian/axis_ids"), x = v("../../components/dragelement/helpers").selectMode;
      function e(r, n) {
        var s, t, d, u, o, h = r._fullLayout, l = h._size, i = n.trace, p = n.t, c = h._splomScenes[i.uid], a = c.matrixOptions, y = a.cdata, f = h._glcanvas.data()[0].regl, _ = h.dragmode;
        if (y.length !== 0) {
          a.lower = i.showupperhalf, a.upper = i.showlowerhalf, a.diagonal = i.diagonal.visible;
          var b = i._visibleDims, w = y.length, T = c.viewOpts = {};
          for (T.ranges = new Array(w), T.domains = new Array(w), o = 0; o < b.length; o++) {
            d = b[o];
            var L = T.ranges[o] = new Array(4), A = T.domains[o] = new Array(4);
            (s = k.getFromId(r, i._diag[d][0])) && (L[0] = s._rl[0], L[2] = s._rl[1], A[0] = s.domain[0], A[2] = s.domain[1]), (t = k.getFromId(r, i._diag[d][1])) && (L[1] = t._rl[0], L[3] = t._rl[1], A[1] = t.domain[0], A[3] = t.domain[1]);
          }
          var I = r._context.plotGlPixelRatio, P = l.l * I, S = l.b * I, E = l.w * I, R = l.h * I;
          T.viewport = [P, S, E + P, R + S], c.matrix === !0 && (c.matrix = m(f));
          var z = h.clickmode.indexOf("select") > -1, j = !0;
          if (x(_) || !!i.selectedpoints || z) {
            var H = i._length;
            if (i.selectedpoints) {
              c.selectBatch = i.selectedpoints;
              var Y = i.selectedpoints, J = {};
              for (d = 0; d < Y.length; d++)
                J[Y[d]] = !0;
              var W = [];
              for (d = 0; d < H; d++)
                J[d] || W.push(d);
              c.unselectBatch = W;
            }
            var Z = p.xpx = new Array(w), re = p.ypx = new Array(w);
            for (o = 0; o < b.length; o++) {
              if (d = b[o], s = k.getFromId(r, i._diag[d][0]))
                for (Z[o] = new Array(H), u = 0; u < H; u++)
                  Z[o][u] = s.c2p(y[o][u]);
              if (t = k.getFromId(r, i._diag[d][1]))
                for (re[o] = new Array(H), u = 0; u < H; u++)
                  re[o][u] = t.c2p(y[o][u]);
            }
            if (c.selectBatch.length || c.unselectBatch.length) {
              var V = g.extendFlat({}, a, c.unselectedOptions, T), B = g.extendFlat({}, a, c.selectedOptions, T);
              c.matrix.update(V, B), j = !1;
            }
          } else
            p.xpx = p.ypx = null;
          if (j) {
            var U = g.extendFlat({}, a, T);
            c.matrix.update(U, null);
          }
        }
      }
      Q.exports = function(r, n, s) {
        if (s.length)
          for (var t = 0; t < s.length; t++)
            e(r, s[t][0]);
      };
    }, { "../../components/dragelement/helpers": 385, "../../lib": 515, "../../plots/cartesian/axis_ids": 570, "regl-splom": 283 }], 1051: [function(v, Q, $) {
      var m = v("../../lib");
      Q.exports = function(g, k) {
        var x = g._fullLayout, e = k.uid, r = x._splomScenes;
        r || (r = x._splomScenes = {});
        var n = { dirty: !0, selectBatch: [], unselectBatch: [] }, s = r[k.uid];
        return s || ((s = r[e] = m.extendFlat({}, n, { matrix: !1, selectBatch: [], unselectBatch: [] })).draw = function() {
          s.matrix && s.matrix.draw && (s.selectBatch.length || s.unselectBatch.length ? s.matrix.draw(s.unselectBatch, s.selectBatch) : s.matrix.draw()), s.dirty = !1;
        }, s.destroy = function() {
          s.matrix && s.matrix.destroy && s.matrix.destroy(), s.matrixOptions = null, s.selectBatch = null, s.unselectBatch = null, s = null;
        }), s.dirty || m.extendFlat(s, n), s;
      };
    }, { "../../lib": 515 }], 1052: [function(v, Q, $) {
      var m = v("../../lib"), g = m.pushUnique, k = v("../scatter/subtypes"), x = v("./helpers");
      Q.exports = function(e, r) {
        var n = e.cd, s = n[0].trace, t = n[0].t, d = e.scene, u = d.matrixOptions.cdata, o = e.xaxis, h = e.yaxis, l = [];
        if (!d)
          return l;
        var i = !k.hasMarkers(s) && !k.hasText(s);
        if (s.visible !== !0 || i)
          return l;
        var p = x.getDimIndex(s, o), c = x.getDimIndex(s, h);
        if (p === !1 || c === !1)
          return l;
        var a = t.xpx[p], y = t.ypx[c], f = u[p], _ = u[c], b = (e.scene.selectBatch || []).slice(), w = [];
        if (r !== !1 && !r.degenerate)
          for (var T = 0; T < f.length; T++)
            r.contains([a[T], y[T]], null, T, e) ? (l.push({ pointNumber: T, x: f[T], y: _[T] }), g(b, T)) : b.indexOf(T) !== -1 ? g(b, T) : w.push(T);
        var L = d.matrixOptions;
        return b.length || w.length ? d.selectBatch.length || d.unselectBatch.length || d.matrix.update(d.unselectedOptions, m.extendFlat({}, L, d.selectedOptions, d.viewOpts)) : d.matrix.update(L, null), d.selectBatch = b, d.unselectBatch = w, l;
      };
    }, { "../../lib": 515, "../scatter/subtypes": 961, "./helpers": 1047 }], 1053: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, k = v("../../plots/template_attributes").hovertemplateAttrs, x = v("../mesh3d/attributes"), e = v("../../plots/attributes"), r = v("../../lib/extend").extendFlat, n = { x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, z: { valType: "data_array", editType: "calc+clearAxisTypes" }, u: { valType: "data_array", editType: "calc" }, v: { valType: "data_array", editType: "calc" }, w: { valType: "data_array", editType: "calc" }, starts: { x: { valType: "data_array", editType: "calc" }, y: { valType: "data_array", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, editType: "calc" }, maxdisplayed: { valType: "integer", min: 0, dflt: 1e3, editType: "calc" }, sizeref: { valType: "number", editType: "calc", min: 0, dflt: 1 }, text: { valType: "string", dflt: "", editType: "calc" }, hovertext: { valType: "string", dflt: "", editType: "calc" }, hovertemplate: k({ editType: "calc" }, { keys: ["tubex", "tubey", "tubez", "tubeu", "tubev", "tubew", "norm", "divergence"] }), uhoverformat: g("u", 1), vhoverformat: g("v", 1), whoverformat: g("w", 1), xhoverformat: g("x"), yhoverformat: g("y"), zhoverformat: g("z"), showlegend: r({}, e.showlegend, { dflt: !1 }) };
      r(n, m("", { colorAttr: "u/v/w norm", showScaleDflt: !0, editTypeOverride: "calc" })), ["opacity", "lightposition", "lighting"].forEach(function(s) {
        n[s] = x[s];
      }), n.hoverinfo = r({}, e.hoverinfo, { editType: "calc", flags: ["x", "y", "z", "u", "v", "w", "norm", "divergence", "text", "name"], dflt: "x+y+z+norm+text+name" }), n.transforms = void 0, Q.exports = n;
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../mesh3d/attributes": 876 }], 1054: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/calc");
      function k(r) {
        var n, s, t, d, u, o, h, l, i, p, c, a, y = r._x, f = r._y, _ = r._z, b = r._len, w = -1 / 0, T = 1 / 0, L = -1 / 0, A = 1 / 0, I = -1 / 0, P = 1 / 0, S = "";
        for (b && (h = y[0], i = f[0], c = _[0]), b > 1 && (l = y[b - 1], p = f[b - 1], a = _[b - 1]), n = 0; n < b; n++)
          w = Math.max(w, y[n]), T = Math.min(T, y[n]), L = Math.max(L, f[n]), A = Math.min(A, f[n]), I = Math.max(I, _[n]), P = Math.min(P, _[n]), d || y[n] === h || (d = !0, S += "x"), u || f[n] === i || (u = !0, S += "y"), o || _[n] === c || (o = !0, S += "z");
        d || (S += "x"), u || (S += "y"), o || (S += "z");
        var E = x(r._x), R = x(r._y), z = x(r._z);
        S = (S = (S = S.replace("x", (h > l ? "-" : "+") + "x")).replace("y", (i > p ? "-" : "+") + "y")).replace("z", (c > a ? "-" : "+") + "z");
        var j = function() {
          b = 0, E = [], R = [], z = [];
        };
        (!b || b < E.length * R.length * z.length) && j();
        var H = function(ue) {
          return ue === "x" ? y : ue === "y" ? f : _;
        }, Y = function(ue) {
          return ue === "x" ? E : ue === "y" ? R : z;
        }, J = function(ue) {
          return ue[b - 1] < ue[0] ? -1 : 1;
        }, W = H(S[1]), Z = H(S[3]), re = H(S[5]), V = Y(S[1]).length, B = Y(S[3]).length, U = Y(S[5]).length, ee = !1, N = function(ue, ye, Ae) {
          return V * (B * ue + ye) + Ae;
        }, K = J(H(S[1])), X = J(H(S[3])), te = J(H(S[5]));
        for (n = 0; n < U - 1; n++) {
          for (s = 0; s < B - 1; s++) {
            for (t = 0; t < V - 1; t++) {
              var ie = N(n, s, t), le = N(n, s, t + 1), oe = N(n, s + 1, t), ve = N(n + 1, s, t);
              if (W[ie] * K < W[le] * K && Z[ie] * X < Z[oe] * X && re[ie] * te < re[ve] * te || (ee = !0), ee)
                break;
            }
            if (ee)
              break;
          }
          if (ee)
            break;
        }
        return ee && (m.warn("Encountered arbitrary coordinates! Unable to input data grid."), j()), { xMin: T, yMin: A, zMin: P, xMax: w, yMax: L, zMax: I, Xs: E, Ys: R, Zs: z, len: b, fill: S };
      }
      function x(r) {
        return m.distinctVals(r).vals;
      }
      function e(r, n) {
        if (n === void 0 && (n = r.length), m.isTypedArray(r))
          return r.subarray(0, n);
        for (var s = [], t = 0; t < n; t++)
          s[t] = +r[t];
        return s;
      }
      Q.exports = { calc: function(r, n) {
        n._len = Math.min(n.u.length, n.v.length, n.w.length, n.x.length, n.y.length, n.z.length), n._u = e(n.u, n._len), n._v = e(n.v, n._len), n._w = e(n.w, n._len), n._x = e(n.x, n._len), n._y = e(n.y, n._len), n._z = e(n.z, n._len);
        var s = k(n);
        n._gridFill = s.fill, n._Xs = s.Xs, n._Ys = s.Ys, n._Zs = s.Zs, n._len = s.len;
        var t, d, u, o = 0;
        n.starts && (t = e(n.starts.x || []), d = e(n.starts.y || []), u = e(n.starts.z || []), o = Math.min(t.length, d.length, u.length)), n._startsX = t || [], n._startsY = d || [], n._startsZ = u || [];
        var h, l = 0, i = 1 / 0;
        for (h = 0; h < n._len; h++) {
          var p = n._u[h], c = n._v[h], a = n._w[h], y = Math.sqrt(p * p + c * c + a * a);
          l = Math.max(l, y), i = Math.min(i, y);
        }
        for (g(r, n, { vals: [i, l], containerStr: "", cLetter: "c" }), h = 0; h < o; h++) {
          var f = t[h];
          s.xMax = Math.max(s.xMax, f), s.xMin = Math.min(s.xMin, f);
          var _ = d[h];
          s.yMax = Math.max(s.yMax, _), s.yMin = Math.min(s.yMin, _);
          var b = u[h];
          s.zMax = Math.max(s.zMax, b), s.zMin = Math.min(s.zMin, b);
        }
        n._slen = o, n._normMax = l, n._xbnds = [s.xMin, s.xMax], n._ybnds = [s.yMin, s.yMax], n._zbnds = [s.zMin, s.zMax];
      }, filter: e, processGrid: k };
    }, { "../../components/colorscale/calc": 375, "../../lib": 515 }], 1055: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_streamtube3d, g = m.createTubeMesh, k = v("../../lib"), x = v("../../lib/gl_format_color").parseColorScale, e = v("../../components/colorscale").extractOpts, r = v("../../plots/gl3d/zip3"), n = { xaxis: 0, yaxis: 1, zaxis: 2 };
      function s(h, l) {
        this.scene = h, this.uid = l, this.mesh = null, this.data = null;
      }
      var t = s.prototype;
      function d(h) {
        var l = h.length;
        return l > 2 ? h.slice(1, l - 1) : l === 2 ? [(h[0] + h[1]) / 2] : h;
      }
      function u(h) {
        var l = h.length;
        return l === 1 ? [0.5, 0.5] : [h[1] - h[0], h[l - 1] - h[l - 2]];
      }
      function o(h, l) {
        var i = h.fullSceneLayout, p = h.dataScale, c = l._len, a = {};
        function y(V, B) {
          var U = i[B], ee = p[n[B]];
          return k.simpleMap(V, function(N) {
            return U.d2l(N) * ee;
          });
        }
        if (a.vectors = r(y(l._u, "xaxis"), y(l._v, "yaxis"), y(l._w, "zaxis"), c), !c)
          return { positions: [], cells: [] };
        var f = y(l._Xs, "xaxis"), _ = y(l._Ys, "yaxis"), b = y(l._Zs, "zaxis");
        if (a.meshgrid = [f, _, b], a.gridFill = l._gridFill, l._slen)
          a.startingPositions = r(y(l._startsX, "xaxis"), y(l._startsY, "yaxis"), y(l._startsZ, "zaxis"));
        else {
          for (var w = _[0], T = d(f), L = d(b), A = new Array(T.length * L.length), I = 0, P = 0; P < T.length; P++)
            for (var S = 0; S < L.length; S++)
              A[I++] = [T[P], w, L[S]];
          a.startingPositions = A;
        }
        a.colormap = x(l), a.tubeSize = l.sizeref, a.maxLength = l.maxdisplayed;
        var E = y(l._xbnds, "xaxis"), R = y(l._ybnds, "yaxis"), z = y(l._zbnds, "zaxis"), j = u(f), H = u(_), Y = u(b), J = [[E[0] - j[0], R[0] - H[0], z[0] - Y[0]], [E[1] + j[1], R[1] + H[1], z[1] + Y[1]]], W = m(a, J), Z = e(l);
        W.vertexIntensityBounds = [Z.min / l._normMax, Z.max / l._normMax];
        var re = l.lightposition;
        return W.lightPosition = [re.x, re.y, re.z], W.ambient = l.lighting.ambient, W.diffuse = l.lighting.diffuse, W.specular = l.lighting.specular, W.roughness = l.lighting.roughness, W.fresnel = l.lighting.fresnel, W.opacity = l.opacity, l._pad = W.tubeScale * l.sizeref * 2, W;
      }
      t.handlePick = function(h) {
        var l = this.scene.fullSceneLayout, i = this.scene.dataScale;
        function p(y, f) {
          var _ = l[f], b = i[n[f]];
          return _.l2c(y) / b;
        }
        if (h.object === this.mesh) {
          var c = h.data.position, a = h.data.velocity;
          return h.traceCoordinate = [p(c[0], "xaxis"), p(c[1], "yaxis"), p(c[2], "zaxis"), p(a[0], "xaxis"), p(a[1], "yaxis"), p(a[2], "zaxis"), h.data.intensity * this.data._normMax, h.data.divergence], h.textLabel = this.data.hovertext || this.data.text, !0;
        }
      }, t.update = function(h) {
        this.data = h;
        var l = o(this.scene, h);
        this.mesh.update(l);
      }, t.dispose = function() {
        this.scene.glplot.remove(this.mesh), this.mesh.dispose();
      }, Q.exports = function(h, l) {
        var i = h.glplot.gl, p = o(h, l), c = g(i, p), a = new s(h, l.uid);
        return a.mesh = c, a.data = l, c._trace = a, h.glplot.add(c), a;
      };
    }, { "../../../stackgl_modules": 1133, "../../components/colorscale": 379, "../../lib": 515, "../../lib/gl_format_color": 511, "../../plots/gl3d/zip3": 618 }], 1056: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/colorscale/defaults"), k = v("./attributes");
      Q.exports = function(x, e, r, n) {
        function s(i, p) {
          return m.coerce(x, e, k, i, p);
        }
        var t = s("u"), d = s("v"), u = s("w"), o = s("x"), h = s("y"), l = s("z");
        t && t.length && d && d.length && u && u.length && o && o.length && h && h.length && l && l.length ? (s("starts.x"), s("starts.y"), s("starts.z"), s("maxdisplayed"), s("sizeref"), s("lighting.ambient"), s("lighting.diffuse"), s("lighting.specular"), s("lighting.roughness"), s("lighting.fresnel"), s("lightposition.x"), s("lightposition.y"), s("lightposition.z"), g(x, e, n, s, { prefix: "", cLetter: "c" }), s("text"), s("hovertext"), s("hovertemplate"), s("uhoverformat"), s("vhoverformat"), s("whoverformat"), s("xhoverformat"), s("yhoverformat"), s("zhoverformat"), e._length = null) : e.visible = !1;
      };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "./attributes": 1053 }], 1057: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "streamtube", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "showLegend"], attributes: v("./attributes"), supplyDefaults: v("./defaults"), colorbar: { min: "cmin", max: "cmax" }, calc: v("./calc").calc, plot: v("./convert"), eventData: function(m, g) {
        return m.tubex = m.x, m.tubey = m.y, m.tubez = m.z, m.tubeu = g.traceCoordinate[3], m.tubev = g.traceCoordinate[4], m.tubew = g.traceCoordinate[5], m.norm = g.traceCoordinate[6], m.divergence = g.traceCoordinate[7], delete m.x, delete m.y, delete m.z, m;
      }, meta: {} };
    }, { "../../plots/gl3d": 607, "./attributes": 1053, "./calc": 1054, "./convert": 1055, "./defaults": 1056 }], 1058: [function(v, Q, $) {
      var m = v("../../plots/attributes"), g = v("../../plots/template_attributes").hovertemplateAttrs, k = v("../../plots/template_attributes").texttemplateAttrs, x = v("../../components/colorscale/attributes"), e = v("../../plots/domain").attributes, r = v("../pie/attributes"), n = v("./constants"), s = v("../../lib/extend").extendFlat;
      Q.exports = { labels: { valType: "data_array", editType: "calc" }, parents: { valType: "data_array", editType: "calc" }, values: { valType: "data_array", editType: "calc" }, branchvalues: { valType: "enumerated", values: ["remainder", "total"], dflt: "remainder", editType: "calc" }, count: { valType: "flaglist", flags: ["branches", "leaves"], dflt: "leaves", editType: "calc" }, level: { valType: "any", editType: "plot", anim: !0 }, maxdepth: { valType: "integer", editType: "plot", dflt: -1 }, marker: s({ colors: { valType: "data_array", editType: "calc" }, line: { color: s({}, r.marker.line.color, { dflt: null }), width: s({}, r.marker.line.width, { dflt: 1 }), editType: "calc" }, editType: "calc" }, x("marker", { colorAttr: "colors", anim: !1 })), leaf: { opacity: { valType: "number", editType: "style", min: 0, max: 1 }, editType: "plot" }, text: r.text, textinfo: { valType: "flaglist", flags: ["label", "text", "value", "current path", "percent root", "percent entry", "percent parent"], extras: ["none"], editType: "plot" }, texttemplate: k({ editType: "plot" }, { keys: n.eventDataKeys.concat(["label", "value"]) }), hovertext: r.hovertext, hoverinfo: s({}, m.hoverinfo, { flags: ["label", "text", "value", "name", "current path", "percent root", "percent entry", "percent parent"], dflt: "label+text+value+name" }), hovertemplate: g({}, { keys: n.eventDataKeys }), textfont: r.textfont, insidetextorientation: r.insidetextorientation, insidetextfont: r.insidetextfont, outsidetextfont: s({}, r.outsidetextfont, {}), rotation: { valType: "angle", dflt: 0, editType: "plot" }, sort: r.sort, root: { color: { valType: "color", editType: "calc", dflt: "rgba(0,0,0,0)" }, editType: "calc" }, domain: e({ name: "sunburst", trace: !0, editType: "calc" }) };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/domain": 593, "../../plots/template_attributes": 642, "../pie/attributes": 910, "./constants": 1061 }], 1059: [function(v, Q, $) {
      var m = v("../../plots/plots");
      $.name = "sunburst", $.plot = function(g, k, x, e) {
        m.plotBasePlot($.name, g, k, x, e);
      }, $.clean = function(g, k, x, e) {
        m.cleanBasePlot($.name, g, k, x, e);
      };
    }, { "../../plots/plots": 628 }], 1060: [function(v, Q, $) {
      var m = v("d3-hierarchy"), g = v("fast-isnumeric"), k = v("../../lib"), x = v("../../components/colorscale").makeColorScaleFuncFromTrace, e = v("../pie/calc").makePullColorFn, r = v("../pie/calc").generateExtendedColors, n = v("../../components/colorscale").calc, s = v("../../constants/numerical").ALMOST_EQUAL, t = {}, d = {}, u = {};
      $.calc = function(o, h) {
        var l, i, p, c, a, y, f = o._fullLayout, _ = h.ids, b = k.isArrayOrTypedArray(_), w = h.labels, T = h.parents, L = h.values, A = k.isArrayOrTypedArray(L), I = [], P = {}, S = {}, E = function(X) {
          return X || typeof X == "number";
        }, R = function(X) {
          return !A || g(L[X]) && L[X] >= 0;
        };
        b ? (l = Math.min(_.length, T.length), i = function(X) {
          return E(_[X]) && R(X);
        }, p = function(X) {
          return String(_[X]);
        }) : (l = Math.min(w.length, T.length), i = function(X) {
          return E(w[X]) && R(X);
        }, p = function(X) {
          return String(w[X]);
        }), A && (l = Math.min(l, L.length));
        for (var z = 0; z < l; z++)
          if (i(z)) {
            var j = p(z), H = E(T[z]) ? String(T[z]) : "", Y = { i: z, id: j, pid: H, label: E(w[z]) ? String(w[z]) : "" };
            A && (Y.v = +L[z]), I.push(Y), a = j, P[c = H] ? P[c].push(a) : P[c] = [a], S[a] = 1;
          }
        if (P[""]) {
          if (P[""].length > 1) {
            for (var J = k.randstr(), W = 0; W < I.length; W++)
              I[W].pid === "" && (I[W].pid = J);
            I.unshift({ hasMultipleRoots: !0, id: J, pid: "", label: "" });
          }
        } else {
          var Z, re = [];
          for (Z in P)
            S[Z] || re.push(Z);
          if (re.length !== 1)
            return k.warn(["Multiple implied roots, cannot build", h.type, "hierarchy of", h.name + ".", "These roots include:", re.join(", ")].join(" "));
          Z = re[0], I.unshift({ hasImpliedRoot: !0, id: Z, pid: "", label: Z });
        }
        try {
          y = m.stratify().id(function(X) {
            return X.id;
          }).parentId(function(X) {
            return X.pid;
          })(I);
        } catch (X) {
          return k.warn(["Failed to build", h.type, "hierarchy of", h.name + ".", "Error:", X.message].join(" "));
        }
        var V = m.hierarchy(y), B = !1;
        if (A)
          switch (h.branchvalues) {
            case "remainder":
              V.sum(function(X) {
                return X.data.v;
              });
              break;
            case "total":
              V.each(function(X) {
                var te = X.data.data, ie = te.v;
                if (X.children) {
                  var le = X.children.reduce(function(oe, ve) {
                    return oe + ve.data.data.v;
                  }, 0);
                  if ((te.hasImpliedRoot || te.hasMultipleRoots) && (ie = le), ie < le * s)
                    return B = !0, k.warn(["Total value for node", X.data.data.id, "of", h.name, "is smaller than the sum of its children.", `
parent value =`, ie, `
children sum =`, le].join(" "));
                }
                X.value = ie;
              });
          }
        else
          (function X(te, ie, le) {
            var oe = 0, ve = te.children;
            if (ve) {
              for (var ue = ve.length, ye = 0; ye < ue; ye++)
                oe += X(ve[ye], ie, le);
              le.branches && oe++;
            } else
              le.leaves && oe++;
            return te.value = te.data.data.value = oe, ie._values || (ie._values = []), ie._values[te.data.data.i] = oe, oe;
          })(V, h, { branches: h.count.indexOf("branches") !== -1, leaves: h.count.indexOf("leaves") !== -1 });
        if (!B) {
          var U, ee;
          h.sort && V.sort(function(X, te) {
            return te.value - X.value;
          });
          var N = h.marker.colors || [], K = !!N.length;
          return h._hasColorscale ? (K || (N = A ? h.values : h._values), n(o, h, { vals: N, containerStr: "marker", cLetter: "c" }), ee = x(h.marker)) : U = e(f["_" + h.type + "colormap"]), V.each(function(X) {
            var te = X.data.data;
            te.color = h._hasColorscale ? ee(N[te.i]) : U(N[te.i], te.id);
          }), I[0].hierarchy = V, I;
        }
      }, $._runCrossTraceCalc = function(o, h) {
        var l = h._fullLayout, i = h.calcdata, p = l[o + "colorway"], c = l["_" + o + "colormap"];
        l["extend" + o + "colors"] && (p = r(p, o === "icicle" ? u : o === "treemap" ? d : t));
        var a, y = 0;
        function f(w) {
          var T = w.data.data, L = T.id;
          T.color === !1 && (c[L] ? T.color = c[L] : w.parent ? w.parent.parent ? T.color = w.parent.data.data.color : (c[L] = T.color = p[y % p.length], y++) : T.color = a);
        }
        for (var _ = 0; _ < i.length; _++) {
          var b = i[_][0];
          b.trace.type === o && b.hierarchy && (a = b.trace.root.color, b.hierarchy.each(f));
        }
      }, $.crossTraceCalc = function(o) {
        return $._runCrossTraceCalc("sunburst", o);
      };
    }, { "../../components/colorscale": 379, "../../constants/numerical": 491, "../../lib": 515, "../pie/calc": 912, "d3-hierarchy": 115, "fast-isnumeric": 190 }], 1061: [function(v, Q, $) {
      Q.exports = { CLICK_TRANSITION_TIME: 750, CLICK_TRANSITION_EASING: "linear", eventDataKeys: ["currentPath", "root", "entry", "percentRoot", "percentEntry", "percentParent"] };
    }, {}], 1062: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../plots/domain").defaults, x = v("../bar/defaults").handleText, e = v("../../components/colorscale"), r = e.hasColorscale, n = e.handleDefaults;
      Q.exports = function(s, t, d, u) {
        function o(a, y) {
          return m.coerce(s, t, g, a, y);
        }
        var h = o("labels"), l = o("parents");
        if (h && h.length && l && l.length) {
          var i = o("values");
          i && i.length ? o("branchvalues") : o("count"), o("level"), o("maxdepth"), o("marker.line.width") && o("marker.line.color", u.paper_bgcolor), o("marker.colors");
          var p = t._hasColorscale = r(s, "marker", "colors") || (s.marker || {}).coloraxis;
          p && n(s, t, u, o, { prefix: "marker.", cLetter: "c" }), o("leaf.opacity", p ? 1 : 0.7);
          var c = o("text");
          o("texttemplate"), t.texttemplate || o("textinfo", Array.isArray(c) ? "text+label" : "label"), o("hovertext"), o("hovertemplate"), x(s, t, u, o, "auto", { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), o("insidetextorientation"), o("sort"), o("rotation"), o("root.color"), k(t, u, o), t._length = null;
        } else
          t.visible = !1;
      };
    }, { "../../components/colorscale": 379, "../../lib": 515, "../../plots/domain": 593, "../bar/defaults": 661, "./attributes": 1058 }], 1063: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../registry"), k = v("../../components/fx/helpers").appendArrayPointValue, x = v("../../components/fx"), e = v("../../lib"), r = v("../../lib/events"), n = v("./helpers"), s = v("../pie/helpers").formatPieValue;
      function t(d, u, o) {
        for (var h = d.data.data, l = { curveNumber: u.index, pointNumber: h.i, data: u._input, fullData: u }, i = 0; i < o.length; i++) {
          var p = o[i];
          p in d && (l[p] = d[p]);
        }
        return "parentString" in d && !n.isHierarchyRoot(d) && (l.parent = d.parentString), k(l, u, h.i), l;
      }
      Q.exports = function(d, u, o, h, l) {
        var i = h[0], p = i.trace, c = i.hierarchy, a = p.type === "sunburst", y = p.type === "treemap" || p.type === "icicle";
        "_hasHoverLabel" in p || (p._hasHoverLabel = !1), "_hasHoverEvent" in p || (p._hasHoverEvent = !1), d.on("mouseover", function(f) {
          var _ = o._fullLayout;
          if (!o._dragging && _.hovermode !== !1) {
            var b, w = o._fullData[p.index], T = f.data.data, L = T.i, A = n.isHierarchyRoot(f), I = n.getParent(c, f), P = n.getValue(f), S = function(K) {
              return e.castOption(w, L, K);
            }, E = S("hovertemplate"), R = x.castHoverinfo(w, _, L), z = _.separators;
            if (E || R && R !== "none" && R !== "skip") {
              var j, H;
              a && (j = i.cx + f.pxmid[0] * (1 - f.rInscribed), H = i.cy + f.pxmid[1] * (1 - f.rInscribed)), y && (j = f._hoverX, H = f._hoverY);
              var Y, J = {}, W = [], Z = [], re = function(K) {
                return W.indexOf(K) !== -1;
              };
              R && (W = R === "all" ? w._module.attributes.hoverinfo.flags : R.split("+")), J.label = T.label, re("label") && J.label && Z.push(J.label), T.hasOwnProperty("v") && (J.value = T.v, J.valueLabel = s(J.value, z), re("value") && Z.push(J.valueLabel)), J.currentPath = f.currentPath = n.getPath(f.data), re("current path") && !A && Z.push(J.currentPath);
              var V = [], B = function() {
                V.indexOf(Y) === -1 && (Z.push(Y), V.push(Y));
              };
              J.percentParent = f.percentParent = P / n.getValue(I), J.parent = f.parentString = n.getPtLabel(I), re("percent parent") && (Y = n.formatPercent(J.percentParent, z) + " of " + J.parent, B()), J.percentEntry = f.percentEntry = P / n.getValue(u), J.entry = f.entry = n.getPtLabel(u), !re("percent entry") || A || f.onPathbar || (Y = n.formatPercent(J.percentEntry, z) + " of " + J.entry, B()), J.percentRoot = f.percentRoot = P / n.getValue(c), J.root = f.root = n.getPtLabel(c), re("percent root") && !A && (Y = n.formatPercent(J.percentRoot, z) + " of " + J.root, B()), J.text = S("hovertext") || S("text"), re("text") && (Y = J.text, e.isValidTextValue(Y) && Z.push(Y)), b = [t(f, w, l.eventDataKeys)];
              var U = { trace: w, y: H, _x0: f._x0, _x1: f._x1, _y0: f._y0, _y1: f._y1, text: Z.join("<br>"), name: E || re("name") ? w.name : void 0, color: S("hoverlabel.bgcolor") || T.color, borderColor: S("hoverlabel.bordercolor"), fontFamily: S("hoverlabel.font.family"), fontSize: S("hoverlabel.font.size"), fontColor: S("hoverlabel.font.color"), nameLength: S("hoverlabel.namelength"), textAlign: S("hoverlabel.align"), hovertemplate: E, hovertemplateLabels: J, eventData: b };
              a && (U.x0 = j - f.rInscribed * f.rpx1, U.x1 = j + f.rInscribed * f.rpx1, U.idealAlign = f.pxmid[0] < 0 ? "left" : "right"), y && (U.x = j, U.idealAlign = j < 0 ? "left" : "right");
              var ee = [];
              x.loneHover(U, { container: _._hoverlayer.node(), outerContainer: _._paper.node(), gd: o, inOut_bbox: ee }), b[0].bbox = ee[0], p._hasHoverLabel = !0;
            }
            if (y) {
              var N = d.select("path.surface");
              l.styleOne(N, f, w, { hovered: !0 });
            }
            p._hasHoverEvent = !0, o.emit("plotly_hover", { points: b || [t(f, w, l.eventDataKeys)], event: m.event });
          }
        }), d.on("mouseout", function(f) {
          var _ = o._fullLayout, b = o._fullData[p.index], w = m.select(this).datum();
          if (p._hasHoverEvent && (f.originalEvent = m.event, o.emit("plotly_unhover", { points: [t(w, b, l.eventDataKeys)], event: m.event }), p._hasHoverEvent = !1), p._hasHoverLabel && (x.loneUnhover(_._hoverlayer.node()), p._hasHoverLabel = !1), y) {
            var T = d.select("path.surface");
            l.styleOne(T, w, b, { hovered: !1 });
          }
        }), d.on("click", function(f) {
          var _ = o._fullLayout, b = o._fullData[p.index], w = a && (n.isHierarchyRoot(f) || n.isLeaf(f)), T = n.getPtId(f), L = n.isEntry(f) ? n.findEntryWithChild(c, T) : n.findEntryWithLevel(c, T), A = n.getPtId(L), I = { points: [t(f, b, l.eventDataKeys)], event: m.event };
          w || (I.nextLevel = A);
          var P = r.triggerHandler(o, "plotly_" + p.type + "click", I);
          if (P !== !1 && _.hovermode && (o._hoverdata = [t(f, b, l.eventDataKeys)], x.click(o, m.event)), !w && P !== !1 && !o._dragging && !o._transitioning) {
            g.call("_storeDirectGUIEdit", b, _._tracePreGUI[b.uid], { level: b.level });
            var S = { data: [{ level: A }], traces: [p.index] }, E = { frame: { redraw: !1, duration: l.transitionTime }, transition: { duration: l.transitionTime, easing: l.transitionEasing }, mode: "immediate", fromcurrent: !0 };
            x.loneUnhover(_._hoverlayer.node()), g.call("animate", o, S, E);
          }
        });
      };
    }, { "../../components/fx": 407, "../../components/fx/helpers": 403, "../../lib": 515, "../../lib/events": 504, "../../registry": 647, "../pie/helpers": 915, "./helpers": 1064, "@plotly/d3": 58 }], 1064: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../../lib/setcursor"), x = v("../pie/helpers");
      function e(r) {
        return r.data.data.pid;
      }
      $.findEntryWithLevel = function(r, n) {
        var s;
        return n && r.eachAfter(function(t) {
          if ($.getPtId(t) === n)
            return s = t.copy();
        }), s || r;
      }, $.findEntryWithChild = function(r, n) {
        var s;
        return r.eachAfter(function(t) {
          for (var d = t.children || [], u = 0; u < d.length; u++) {
            var o = d[u];
            if ($.getPtId(o) === n)
              return s = t.copy();
          }
        }), s || r;
      }, $.isEntry = function(r) {
        return !r.parent;
      }, $.isLeaf = function(r) {
        return !r.children;
      }, $.getPtId = function(r) {
        return r.data.data.id;
      }, $.getPtLabel = function(r) {
        return r.data.data.label;
      }, $.getValue = function(r) {
        return r.value;
      }, $.isHierarchyRoot = function(r) {
        return e(r) === "";
      }, $.setSliceCursor = function(r, n, s) {
        var t = s.isTransitioning;
        if (!t) {
          var d = r.datum();
          t = s.hideOnRoot && $.isHierarchyRoot(d) || s.hideOnLeaves && $.isLeaf(d);
        }
        k(r, t ? null : "pointer");
      }, $.getInsideTextFontKey = function(r, n, s, t, d) {
        var u = (d || {}).onPathbar ? "pathbar.textfont" : "insidetextfont", o = s.data.data.i;
        return m.castOption(n, o, u + "." + r) || m.castOption(n, o, "textfont." + r) || t.size;
      }, $.getOutsideTextFontKey = function(r, n, s, t) {
        var d = s.data.data.i;
        return m.castOption(n, d, "outsidetextfont." + r) || m.castOption(n, d, "textfont." + r) || t.size;
      }, $.isOutsideText = function(r, n) {
        return !r._hasColorscale && $.isHierarchyRoot(n);
      }, $.determineTextFont = function(r, n, s, t) {
        return $.isOutsideText(r, n) ? function(d, u, o) {
          return { color: $.getOutsideTextFontKey("color", d, u, o), family: $.getOutsideTextFontKey("family", d, u, o), size: $.getOutsideTextFontKey("size", d, u, o) };
        }(r, n, s) : function(d, u, o, h) {
          var l = (h || {}).onPathbar, i = u.data.data, p = i.i, c = m.castOption(d, p, (l ? "pathbar.textfont" : "insidetextfont") + ".color");
          return !c && d._input.textfont && (c = m.castOption(d._input, p, "textfont.color")), { color: c || g.contrast(i.color), family: $.getInsideTextFontKey("family", d, u, o, h), size: $.getInsideTextFontKey("size", d, u, o, h) };
        }(r, n, s, t);
      }, $.hasTransition = function(r) {
        return !!(r && r.duration > 0);
      }, $.getMaxDepth = function(r) {
        return r.maxdepth >= 0 ? r.maxdepth : 1 / 0;
      }, $.isHeader = function(r, n) {
        return !($.isLeaf(r) || r.depth === n._maxDepth - 1);
      }, $.getParent = function(r, n) {
        return $.findEntryWithLevel(r, e(n));
      }, $.listPath = function(r, n) {
        var s = r.parent;
        if (!s)
          return [];
        var t = n ? [s.data[n]] : [s];
        return $.listPath(s, n).concat(t);
      }, $.getPath = function(r) {
        return $.listPath(r, "label").join("/") + "/";
      }, $.formatValue = x.formatPieValue, $.formatPercent = function(r, n) {
        var s = m.formatPercent(r, 0);
        return s === "0%" && (s = x.formatPiePercent(r, n)), s;
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../lib/setcursor": 536, "../pie/helpers": 915 }], 1065: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "sunburst", basePlotModule: v("./base_plot"), categories: [], animatable: !0, attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults"), supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc").calc, crossTraceCalc: v("./calc").crossTraceCalc, plot: v("./plot").plot, style: v("./style").style, colorbar: v("../scatter/marker_colorbar"), meta: {} };
    }, { "../scatter/marker_colorbar": 954, "./attributes": 1058, "./base_plot": 1059, "./calc": 1060, "./defaults": 1062, "./layout_attributes": 1066, "./layout_defaults": 1067, "./plot": 1068, "./style": 1069 }], 1066: [function(v, Q, $) {
      Q.exports = { sunburstcolorway: { valType: "colorlist", editType: "calc" }, extendsunburstcolors: { valType: "boolean", dflt: !0, editType: "calc" } };
    }, {}], 1067: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x) {
        function e(r, n) {
          return m.coerce(k, x, g, r, n);
        }
        e("sunburstcolorway", x.colorway), e("extendsunburstcolors");
      };
    }, { "../../lib": 515, "./layout_attributes": 1066 }], 1068: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-hierarchy"), k = v("d3-interpolate").interpolate, x = v("../../components/drawing"), e = v("../../lib"), r = v("../../lib/svg_text_utils"), n = v("../bar/uniform_text"), s = n.recordMinTextSize, t = n.clearMinTextSize, d = v("../pie/plot"), u = v("../pie/helpers").getRotationAngle, o = d.computeTransform, h = d.transformInsideText, l = v("./style").styleOne, i = v("../bar/style").resizeText, p = v("./fx"), c = v("./constants"), a = v("./helpers");
      function y(_, b, w, T) {
        var L = _._context.staticPlot, A = _._fullLayout, I = !A.uniformtext.mode && a.hasTransition(T), P = m.select(w).selectAll("g.slice"), S = b[0], E = S.trace, R = S.hierarchy, z = a.findEntryWithLevel(R, E.level), j = a.getMaxDepth(E), H = A._size, Y = E.domain, J = H.w * (Y.x[1] - Y.x[0]), W = H.h * (Y.y[1] - Y.y[0]), Z = 0.5 * Math.min(J, W), re = S.cx = H.l + H.w * (Y.x[1] + Y.x[0]) / 2, V = S.cy = H.t + H.h * (1 - Y.y[0]) - W / 2;
        if (!z)
          return P.remove();
        var B = null, U = {};
        I && P.each(function(se) {
          U[a.getPtId(se)] = { rpx0: se.rpx0, rpx1: se.rpx1, x0: se.x0, x1: se.x1, transform: se.transform }, !B && a.isEntry(se) && (B = se);
        });
        var ee = function(se) {
          return g.partition().size([2 * Math.PI, se.height + 1])(se);
        }(z).descendants(), N = z.height + 1, K = 0, X = j;
        S.hasMultipleRoots && a.isHierarchyRoot(z) && (ee = ee.slice(1), N -= 1, K = 1, X += 1), ee = ee.filter(function(se) {
          return se.y1 <= X;
        });
        var te = u(E.rotation);
        te && ee.forEach(function(se) {
          se.x0 += te, se.x1 += te;
        });
        var ie = Math.min(N, j), le = function(se) {
          return (se - K) / ie * Z;
        }, oe = function(se, de) {
          return [se * Math.cos(de), -se * Math.sin(de)];
        }, ve = function(se) {
          return e.pathAnnulus(se.rpx0, se.rpx1, se.x0, se.x1, re, V);
        }, ue = function(se) {
          return re + f(se)[0] * (se.transform.rCenter || 0) + (se.transform.x || 0);
        }, ye = function(se) {
          return V + f(se)[1] * (se.transform.rCenter || 0) + (se.transform.y || 0);
        };
        (P = P.data(ee, a.getPtId)).enter().append("g").classed("slice", !0), I ? P.exit().transition().each(function() {
          var se = m.select(this);
          se.select("path.surface").transition().attrTween("d", function(de) {
            var Te = function(Ee) {
              var Me, ze = a.getPtId(Ee), Ie = U[ze], Oe = U[a.getPtId(z)];
              if (Oe) {
                var Ze = (Ee.x1 > Oe.x1 ? 2 * Math.PI : 0) + te;
                Me = Ee.rpx1 < Oe.rpx1 ? { x0: Ee.x0, x1: Ee.x1, rpx0: 0, rpx1: 0 } : { x0: Ze, x1: Ze, rpx0: Ee.rpx0, rpx1: Ee.rpx1 };
              } else {
                var Fe, Pe = a.getPtId(Ee.parent);
                P.each(function(vt) {
                  if (a.getPtId(vt) === Pe)
                    return Fe = vt;
                });
                var De, Ge = Fe.children;
                Ge.forEach(function(vt, bt) {
                  if (a.getPtId(vt) === ze)
                    return De = bt;
                });
                var Qe = Ge.length, ot = k(Fe.x0, Fe.x1);
                Me = { rpx0: Z, rpx1: Z, x0: ot(De / Qe), x1: ot((De + 1) / Qe) };
              }
              return k(Ie, Me);
            }(de);
            return function(Ee) {
              return ve(Te(Ee));
            };
          }), se.select("g.slicetext").attr("opacity", 0);
        }).remove() : P.exit().remove(), P.order();
        var Ae = null;
        if (I && B) {
          var pe = a.getPtId(B);
          P.each(function(se) {
            Ae === null && a.getPtId(se) === pe && (Ae = se.x1);
          });
        }
        var ge = P;
        function we(se) {
          var de = se.parent, Te = U[a.getPtId(de)], Ee = {};
          if (Te) {
            var Me = de.children, ze = Me.indexOf(se), Ie = Me.length, Oe = k(Te.x0, Te.x1);
            Ee.x0 = Oe(ze / Ie), Ee.x1 = Oe(ze / Ie);
          } else
            Ee.x0 = Ee.x1 = 0;
          return Ee;
        }
        I && (ge = ge.transition().each("end", function() {
          var se = m.select(this);
          a.setSliceCursor(se, _, { hideOnRoot: !0, hideOnLeaves: !0, isTransitioning: !1 });
        })), ge.each(function(se) {
          var de = m.select(this), Te = e.ensureSingle(de, "path", "surface", function(Ze) {
            Ze.style("pointer-events", L ? "none" : "all");
          });
          se.rpx0 = le(se.y0), se.rpx1 = le(se.y1), se.xmid = (se.x0 + se.x1) / 2, se.pxmid = oe(se.rpx1, se.xmid), se.midangle = -(se.xmid - Math.PI / 2), se.startangle = -(se.x0 - Math.PI / 2), se.stopangle = -(se.x1 - Math.PI / 2), se.halfangle = 0.5 * Math.min(e.angleDelta(se.x0, se.x1) || Math.PI, Math.PI), se.ring = 1 - se.rpx0 / se.rpx1, se.rInscribed = function(Ze) {
            return Ze.rpx0 === 0 && e.isFullCircle([Ze.x0, Ze.x1]) ? 1 : Math.max(0, Math.min(1 / (1 + 1 / Math.sin(Ze.halfangle)), Ze.ring / 2));
          }(se), I ? Te.transition().attrTween("d", function(Ze) {
            var Fe = function(Pe) {
              var De, Ge = U[a.getPtId(Pe)], Qe = { x0: Pe.x0, x1: Pe.x1, rpx0: Pe.rpx0, rpx1: Pe.rpx1 };
              if (Ge)
                De = Ge;
              else if (B)
                if (Pe.parent)
                  if (Ae) {
                    var ot = (Pe.x1 > Ae ? 2 * Math.PI : 0) + te;
                    De = { x0: ot, x1: ot };
                  } else
                    De = { rpx0: Z, rpx1: Z }, e.extendFlat(De, we(Pe));
                else
                  De = { rpx0: 0, rpx1: 0 };
              else
                De = { x0: te, x1: te };
              return k(De, Qe);
            }(Ze);
            return function(Pe) {
              return ve(Fe(Pe));
            };
          }) : Te.attr("d", ve), de.call(p, z, _, b, { eventDataKeys: c.eventDataKeys, transitionTime: c.CLICK_TRANSITION_TIME, transitionEasing: c.CLICK_TRANSITION_EASING }).call(a.setSliceCursor, _, { hideOnRoot: !0, hideOnLeaves: !0, isTransitioning: _._transitioning }), Te.call(l, se, E);
          var Ee = e.ensureSingle(de, "g", "slicetext"), Me = e.ensureSingle(Ee, "text", "", function(Ze) {
            Ze.attr("data-notex", 1);
          }), ze = e.ensureUniformFontSize(_, a.determineTextFont(E, se, A.font));
          Me.text($.formatSliceLabel(se, z, E, b, A)).classed("slicetext", !0).attr("text-anchor", "middle").call(x.font, ze).call(r.convertToTspans, _);
          var Ie = x.bBox(Me.node());
          se.transform = h(Ie, se, S), se.transform.targetX = ue(se), se.transform.targetY = ye(se);
          var Oe = function(Ze, Fe) {
            var Pe = Ze.transform;
            return o(Pe, Fe), Pe.fontSize = ze.size, s(E.type, Pe, A), e.getTextTransform(Pe);
          };
          I ? Me.transition().attrTween("transform", function(Ze) {
            var Fe = function(Pe) {
              var De, Ge = U[a.getPtId(Pe)], Qe = Pe.transform;
              if (Ge)
                De = Ge;
              else if (De = { rpx1: Pe.rpx1, transform: { textPosAngle: Qe.textPosAngle, scale: 0, rotate: Qe.rotate, rCenter: Qe.rCenter, x: Qe.x, y: Qe.y } }, B)
                if (Pe.parent)
                  if (Ae) {
                    var ot = Pe.x1 > Ae ? 2 * Math.PI : 0;
                    De.x0 = De.x1 = ot;
                  } else
                    e.extendFlat(De, we(Pe));
                else
                  De.x0 = De.x1 = te;
              else
                De.x0 = De.x1 = te;
              var vt = k(De.transform.textPosAngle, Pe.transform.textPosAngle), bt = k(De.rpx1, Pe.rpx1), yt = k(De.x0, Pe.x0), tt = k(De.x1, Pe.x1), Ke = k(De.transform.scale, Qe.scale), mt = k(De.transform.rotate, Qe.rotate), Ft = Qe.rCenter === 0 ? 3 : De.transform.rCenter === 0 ? 1 / 3 : 1, Vt = k(De.transform.rCenter, Qe.rCenter);
              return function(Xt) {
                var Gt = bt(Xt), nr = yt(Xt), It = tt(Xt), Be = function(he) {
                  return Vt(Math.pow(he, Ft));
                }(Xt), He = { pxmid: oe(Gt, (nr + It) / 2), rpx1: Gt, transform: { textPosAngle: vt(Xt), rCenter: Be, x: Qe.x, y: Qe.y } };
                return s(E.type, Qe, A), { transform: { targetX: ue(He), targetY: ye(He), scale: Ke(Xt), rotate: mt(Xt), rCenter: Be } };
              };
            }(Ze);
            return function(Pe) {
              return Oe(Fe(Pe), Ie);
            };
          }) : Me.attr("transform", Oe(se, Ie));
        });
      }
      function f(_) {
        return b = _.rpx1, w = _.transform.textPosAngle, [b * Math.sin(w), -b * Math.cos(w)];
        var b, w;
      }
      $.plot = function(_, b, w, T) {
        var L, A, I = _._fullLayout, P = I._sunburstlayer, S = !w, E = !I.uniformtext.mode && a.hasTransition(w);
        t("sunburst", I), (L = P.selectAll("g.trace.sunburst").data(b, function(R) {
          return R[0].trace.uid;
        })).enter().append("g").classed("trace", !0).classed("sunburst", !0).attr("stroke-linejoin", "round"), L.order(), E ? (T && (A = T()), m.transition().duration(w.duration).ease(w.easing).each("end", function() {
          A && A();
        }).each("interrupt", function() {
          A && A();
        }).each(function() {
          P.selectAll("g.trace").each(function(R) {
            y(_, R, this, w);
          });
        })) : (L.each(function(R) {
          y(_, R, this, w);
        }), I.uniformtext.mode && i(_, I._sunburstlayer.selectAll(".trace"), "sunburst")), S && L.exit().remove();
      }, $.formatSliceLabel = function(_, b, w, T, L) {
        var A = w.texttemplate, I = w.textinfo;
        if (!(A || I && I !== "none"))
          return "";
        var P = L.separators, S = T[0], E = _.data.data, R = S.hierarchy, z = a.isHierarchyRoot(_), j = a.getParent(R, _), H = a.getValue(_);
        if (!A) {
          var Y, J = I.split("+"), W = function(X) {
            return J.indexOf(X) !== -1;
          }, Z = [];
          if (W("label") && E.label && Z.push(E.label), E.hasOwnProperty("v") && W("value") && Z.push(a.formatValue(E.v, P)), !z) {
            W("current path") && Z.push(a.getPath(_.data));
            var re = 0;
            W("percent parent") && re++, W("percent entry") && re++, W("percent root") && re++;
            var V = re > 1;
            if (re) {
              var B, U = function(X) {
                Y = a.formatPercent(B, P), V && (Y += " of " + X), Z.push(Y);
              };
              W("percent parent") && !z && (B = H / a.getValue(j), U("parent")), W("percent entry") && (B = H / a.getValue(b), U("entry")), W("percent root") && (B = H / a.getValue(R), U("root"));
            }
          }
          return W("text") && (Y = e.castOption(w, E.i, "text"), e.isValidTextValue(Y) && Z.push(Y)), Z.join("<br>");
        }
        var ee = e.castOption(w, E.i, "texttemplate");
        if (!ee)
          return "";
        var N = {};
        E.label && (N.label = E.label), E.hasOwnProperty("v") && (N.value = E.v, N.valueLabel = a.formatValue(E.v, P)), N.currentPath = a.getPath(_.data), z || (N.percentParent = H / a.getValue(j), N.percentParentLabel = a.formatPercent(N.percentParent, P), N.parent = a.getPtLabel(j)), N.percentEntry = H / a.getValue(b), N.percentEntryLabel = a.formatPercent(N.percentEntry, P), N.entry = a.getPtLabel(b), N.percentRoot = H / a.getValue(R), N.percentRootLabel = a.formatPercent(N.percentRoot, P), N.root = a.getPtLabel(R), E.hasOwnProperty("color") && (N.color = E.color);
        var K = e.castOption(w, E.i, "text");
        return (e.isValidTextValue(K) || K === "") && (N.text = K), N.customdata = e.castOption(w, E.i, "customdata"), e.texttemplateString(ee, N, L._d3locale, N, w._meta || {});
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../lib/svg_text_utils": 541, "../bar/style": 671, "../bar/uniform_text": 673, "../pie/helpers": 915, "../pie/plot": 919, "./constants": 1061, "./fx": 1063, "./helpers": 1064, "./style": 1069, "@plotly/d3": 58, "d3-hierarchy": 115, "d3-interpolate": 116 }], 1069: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../../lib"), x = v("../bar/uniform_text").resizeText;
      function e(r, n, s) {
        var t = n.data.data, d = !n.children, u = t.i, o = k.castOption(s, u, "marker.line.color") || g.defaultLine, h = k.castOption(s, u, "marker.line.width") || 0;
        r.style("stroke-width", h).call(g.fill, t.color).call(g.stroke, o).style("opacity", d ? s.leaf.opacity : null);
      }
      Q.exports = { style: function(r) {
        var n = r._fullLayout._sunburstlayer.selectAll(".trace");
        x(r, n, "sunburst"), n.each(function(s) {
          var t = m.select(this), d = s[0].trace;
          t.style("opacity", d.opacity), t.selectAll("path.surface").each(function(u) {
            m.select(this).call(e, u, d);
          });
        });
      }, styleOne: e };
    }, { "../../components/color": 367, "../../lib": 515, "../bar/uniform_text": 673, "@plotly/d3": 58 }], 1070: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../../components/colorscale/attributes"), k = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, x = v("../../plots/template_attributes").hovertemplateAttrs, e = v("../../plots/attributes"), r = v("../../lib/extend").extendFlat, n = v("../../plot_api/edit_types").overrideAll;
      function s(d) {
        return { show: { valType: "boolean", dflt: !1 }, start: { valType: "number", dflt: null, editType: "plot" }, end: { valType: "number", dflt: null, editType: "plot" }, size: { valType: "number", dflt: null, min: 0, editType: "plot" }, project: { x: { valType: "boolean", dflt: !1 }, y: { valType: "boolean", dflt: !1 }, z: { valType: "boolean", dflt: !1 } }, color: { valType: "color", dflt: m.defaultLine }, usecolormap: { valType: "boolean", dflt: !1 }, width: { valType: "number", min: 1, max: 16, dflt: 2 }, highlight: { valType: "boolean", dflt: !0 }, highlightcolor: { valType: "color", dflt: m.defaultLine }, highlightwidth: { valType: "number", min: 1, max: 16, dflt: 2 } };
      }
      var t = Q.exports = n(r({ z: { valType: "data_array" }, x: { valType: "data_array" }, y: { valType: "data_array" }, text: { valType: "string", dflt: "", arrayOk: !0 }, hovertext: { valType: "string", dflt: "", arrayOk: !0 }, hovertemplate: x(), xhoverformat: k("x"), yhoverformat: k("y"), zhoverformat: k("z"), connectgaps: { valType: "boolean", dflt: !1, editType: "calc" }, surfacecolor: { valType: "data_array" } }, g("", { colorAttr: "z or surfacecolor", showScaleDflt: !0, autoColorDflt: !1, editTypeOverride: "calc" }), { contours: { x: s(), y: s(), z: s() }, hidesurface: { valType: "boolean", dflt: !1 }, lightposition: { x: { valType: "number", min: -1e5, max: 1e5, dflt: 10 }, y: { valType: "number", min: -1e5, max: 1e5, dflt: 1e4 }, z: { valType: "number", min: -1e5, max: 1e5, dflt: 0 } }, lighting: { ambient: { valType: "number", min: 0, max: 1, dflt: 0.8 }, diffuse: { valType: "number", min: 0, max: 1, dflt: 0.8 }, specular: { valType: "number", min: 0, max: 2, dflt: 0.05 }, roughness: { valType: "number", min: 0, max: 1, dflt: 0.5 }, fresnel: { valType: "number", min: 0, max: 5, dflt: 0.2 } }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, opacityscale: { valType: "any", editType: "calc" }, _deprecated: { zauto: r({}, g.zauto, {}), zmin: r({}, g.zmin, {}), zmax: r({}, g.zmax, {}) }, hoverinfo: r({}, e.hoverinfo), showlegend: r({}, e.showlegend, { dflt: !1 }) }), "calc", "nested");
      t.x.editType = t.y.editType = t.z.editType = "calc+clearAxisTypes", t.transforms = void 0;
    }, { "../../components/color": 367, "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642 }], 1071: [function(v, Q, $) {
      var m = v("../../components/colorscale/calc");
      Q.exports = function(g, k) {
        k.surfacecolor ? m(g, k, { vals: k.surfacecolor, containerStr: "", cLetter: "c" }) : m(g, k, { vals: k.z, containerStr: "", cLetter: "c" });
      };
    }, { "../../components/colorscale/calc": 375 }], 1072: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_surface3d, g = v("../../../stackgl_modules").ndarray, k = v("../../../stackgl_modules").ndarray_linear_interpolate.d2, x = v("../heatmap/interp2d"), e = v("../heatmap/find_empties"), r = v("../../lib").isArrayOrTypedArray, n = v("../../lib/gl_format_color").parseColorScale, s = v("../../lib/str2rgbarray"), t = v("../../components/colorscale").extractOpts;
      function d(w, T, L) {
        this.scene = w, this.uid = L, this.surface = T, this.data = null, this.showContour = [!1, !1, !1], this.contourStart = [null, null, null], this.contourEnd = [null, null, null], this.contourSize = [0, 0, 0], this.minValues = [1 / 0, 1 / 0, 1 / 0], this.maxValues = [-1 / 0, -1 / 0, -1 / 0], this.dataScaleX = 1, this.dataScaleY = 1, this.refineData = !0, this.objectOffset = [0, 0, 0];
      }
      var u = d.prototype;
      u.getXat = function(w, T, L, A) {
        var I = r(this.data.x) ? r(this.data.x[0]) ? this.data.x[T][w] : this.data.x[w] : w;
        return L === void 0 ? I : A.d2l(I, 0, L);
      }, u.getYat = function(w, T, L, A) {
        var I = r(this.data.y) ? r(this.data.y[0]) ? this.data.y[T][w] : this.data.y[T] : T;
        return L === void 0 ? I : A.d2l(I, 0, L);
      }, u.getZat = function(w, T, L, A) {
        var I = this.data.z[T][w];
        return I === null && this.data.connectgaps && this.data._interpolatedZ && (I = this.data._interpolatedZ[T][w]), L === void 0 ? I : A.d2l(I, 0, L);
      }, u.handlePick = function(w) {
        if (w.object === this.surface) {
          var T = (w.data.index[0] - 1) / this.dataScaleX - 1, L = (w.data.index[1] - 1) / this.dataScaleY - 1, A = Math.max(Math.min(Math.round(T), this.data.z[0].length - 1), 0), I = Math.max(Math.min(Math.round(L), this.data._ylength - 1), 0);
          w.index = [A, I], w.traceCoordinate = [this.getXat(A, I), this.getYat(A, I), this.getZat(A, I)], w.dataCoordinate = [this.getXat(A, I, this.data.xcalendar, this.scene.fullSceneLayout.xaxis), this.getYat(A, I, this.data.ycalendar, this.scene.fullSceneLayout.yaxis), this.getZat(A, I, this.data.zcalendar, this.scene.fullSceneLayout.zaxis)];
          for (var P = 0; P < 3; P++) {
            var S = w.dataCoordinate[P];
            S != null && (w.dataCoordinate[P] *= this.scene.dataScale[P]);
          }
          var E = this.data.hovertext || this.data.text;
          return Array.isArray(E) && E[I] && E[I][A] !== void 0 ? w.textLabel = E[I][A] : w.textLabel = E || "", w.data.dataCoordinate = w.dataCoordinate.slice(), this.surface.highlight(w.data), this.scene.glplot.spikes.position = w.dataCoordinate, !0;
        }
      };
      var o = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999];
      function h(w, T) {
        if (w < T)
          return 0;
        for (var L = 0; Math.floor(w % T) === 0; )
          w /= T, L++;
        return L;
      }
      function l(w) {
        for (var T = [], L = 0; L < o.length; L++) {
          var A = o[L];
          T.push(h(w, A));
        }
        return T;
      }
      function i(w) {
        for (var T = l(w), L = w, A = 0; A < o.length; A++)
          if (T[A] > 0) {
            L = o[A];
            break;
          }
        return L;
      }
      function p(w, T) {
        if (!(w < 1 || T < 1)) {
          for (var L = l(w), A = l(T), I = 1, P = 0; P < o.length; P++)
            I *= Math.pow(o[P], Math.max(L[P], A[P]));
          return I;
        }
      }
      u.calcXnums = function(w) {
        var T, L = [];
        for (T = 1; T < w; T++) {
          var A = this.getXat(T - 1, 0), I = this.getXat(T, 0);
          L[T - 1] = I !== A && A != null && I != null ? Math.abs(I - A) : 0;
        }
        var P = 0;
        for (T = 1; T < w; T++)
          P += L[T - 1];
        for (T = 1; T < w; T++)
          L[T - 1] === 0 ? L[T - 1] = 1 : L[T - 1] = Math.round(P / L[T - 1]);
        return L;
      }, u.calcYnums = function(w) {
        var T, L = [];
        for (T = 1; T < w; T++) {
          var A = this.getYat(0, T - 1), I = this.getYat(0, T);
          L[T - 1] = I !== A && A != null && I != null ? Math.abs(I - A) : 0;
        }
        var P = 0;
        for (T = 1; T < w; T++)
          P += L[T - 1];
        for (T = 1; T < w; T++)
          L[T - 1] === 0 ? L[T - 1] = 1 : L[T - 1] = Math.round(P / L[T - 1]);
        return L;
      };
      var c = [1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260], a = c[9], y = c[13];
      function f(w, T, L) {
        var A = L[8] + L[2] * T[0] + L[5] * T[1];
        return w[0] = (L[6] + L[0] * T[0] + L[3] * T[1]) / A, w[1] = (L[7] + L[1] * T[0] + L[4] * T[1]) / A, w;
      }
      function _(w, T, L) {
        return function(A, I, P, S) {
          for (var E = [0, 0], R = A.shape[0], z = A.shape[1], j = 0; j < R; j++)
            for (var H = 0; H < z; H++)
              P(E, [j, H], S), A.set(j, H, k(I, E[0], E[1]));
        }(w, T, f, L), w;
      }
      function b(w, T) {
        for (var L = !1, A = 0; A < w.length; A++)
          if (T === w[A]) {
            L = !0;
            break;
          }
        L === !1 && w.push(T);
      }
      u.estimateScale = function(w, T) {
        for (var L = 1 + function(I) {
          if (I.length !== 0) {
            for (var P = 1, S = 0; S < I.length; S++)
              P = p(P, I[S]);
            return P;
          }
        }(T === 0 ? this.calcXnums(w) : this.calcYnums(w)); L < a; )
          L *= 2;
        for (; L > y; )
          L--, L /= i(L), ++L < a && (L = y);
        var A = Math.round(L / w);
        return A > 1 ? A : 1;
      }, u.refineCoords = function(w) {
        for (var T = this.dataScaleX, L = this.dataScaleY, A = w[0].shape[0], I = w[0].shape[1], P = 0 | Math.floor(w[0].shape[0] * T + 1), S = 0 | Math.floor(w[0].shape[1] * L + 1), E = 1 + A + 1, R = 1 + I + 1, z = g(new Float32Array(E * R), [E, R]), j = [1 / T, 0, 0, 0, 1 / L, 0, 0, 0, 1], H = 0; H < w.length; ++H) {
          this.surface.padField(z, w[H]);
          var Y = g(new Float32Array(P * S), [P, S]);
          _(Y, z, j), w[H] = Y;
        }
      }, u.setContourLevels = function() {
        var w, T, L, A = [[], [], []], I = [!1, !1, !1], P = !1;
        for (w = 0; w < 3; ++w)
          if (this.showContour[w] && (P = !0, this.contourSize[w] > 0 && this.contourStart[w] !== null && this.contourEnd[w] !== null && this.contourEnd[w] > this.contourStart[w]))
            for (I[w] = !0, T = this.contourStart[w]; T < this.contourEnd[w]; T += this.contourSize[w])
              L = T * this.scene.dataScale[w], b(A[w], L);
        if (P) {
          var S = [[], [], []];
          for (w = 0; w < 3; ++w)
            this.showContour[w] && (S[w] = I[w] ? A[w] : this.scene.contourLevels[w]);
          this.surface.update({ levels: S });
        }
      }, u.update = function(w) {
        var T, L, A, I, P = this.scene, S = P.fullSceneLayout, E = this.surface, R = n(w), z = P.dataScale, j = w.z[0].length, H = w._ylength, Y = P.contourLevels;
        this.data = w;
        var J = [];
        for (T = 0; T < 3; T++)
          for (J[T] = [], L = 0; L < j; L++)
            J[T][L] = [];
        for (L = 0; L < j; L++)
          for (A = 0; A < H; A++)
            J[0][L][A] = this.getXat(L, A, w.xcalendar, S.xaxis), J[1][L][A] = this.getYat(L, A, w.ycalendar, S.yaxis), J[2][L][A] = this.getZat(L, A, w.zcalendar, S.zaxis);
        if (w.connectgaps)
          for (w._emptypoints = e(J[2]), x(J[2], w._emptypoints), w._interpolatedZ = [], L = 0; L < j; L++)
            for (w._interpolatedZ[L] = [], A = 0; A < H; A++)
              w._interpolatedZ[L][A] = J[2][L][A];
        for (T = 0; T < 3; T++)
          for (L = 0; L < j; L++)
            for (A = 0; A < H; A++)
              (I = J[T][L][A]) == null ? J[T][L][A] = NaN : I = J[T][L][A] *= z[T];
        for (T = 0; T < 3; T++)
          for (L = 0; L < j; L++)
            for (A = 0; A < H; A++)
              (I = J[T][L][A]) != null && (this.minValues[T] > I && (this.minValues[T] = I), this.maxValues[T] < I && (this.maxValues[T] = I));
        for (T = 0; T < 3; T++)
          this.objectOffset[T] = 0.5 * (this.minValues[T] + this.maxValues[T]);
        for (T = 0; T < 3; T++)
          for (L = 0; L < j; L++)
            for (A = 0; A < H; A++)
              (I = J[T][L][A]) != null && (J[T][L][A] -= this.objectOffset[T]);
        var W = [g(new Float32Array(j * H), [j, H]), g(new Float32Array(j * H), [j, H]), g(new Float32Array(j * H), [j, H])];
        for (T = 0; T < 3; T++)
          for (L = 0; L < j; L++)
            for (A = 0; A < H; A++)
              W[T].set(L, A, J[T][L][A]);
        J = [];
        var Z = { colormap: R, levels: [[], [], []], showContour: [!0, !0, !0], showSurface: !w.hidesurface, contourProject: [[!1, !1, !1], [!1, !1, !1], [!1, !1, !1]], contourWidth: [1, 1, 1], contourColor: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], contourTint: [1, 1, 1], dynamicColor: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], dynamicWidth: [1, 1, 1], dynamicTint: [1, 1, 1], opacityscale: w.opacityscale, opacity: w.opacity }, re = t(w);
        if (Z.intensityBounds = [re.min, re.max], w.surfacecolor) {
          var V = g(new Float32Array(j * H), [j, H]);
          for (L = 0; L < j; L++)
            for (A = 0; A < H; A++)
              V.set(L, A, w.surfacecolor[A][L]);
          W.push(V);
        } else
          Z.intensityBounds[0] *= z[2], Z.intensityBounds[1] *= z[2];
        (y < W[0].shape[0] || y < W[0].shape[1]) && (this.refineData = !1), this.refineData === !0 && (this.dataScaleX = this.estimateScale(W[0].shape[0], 0), this.dataScaleY = this.estimateScale(W[0].shape[1], 1), this.dataScaleX === 1 && this.dataScaleY === 1 || this.refineCoords(W)), w.surfacecolor && (Z.intensity = W.pop());
        var B = [!0, !0, !0], U = ["x", "y", "z"];
        for (T = 0; T < 3; ++T) {
          var ee = w.contours[U[T]];
          B[T] = ee.highlight, Z.showContour[T] = ee.show || ee.highlight, Z.showContour[T] && (Z.contourProject[T] = [ee.project.x, ee.project.y, ee.project.z], ee.show ? (this.showContour[T] = !0, Z.levels[T] = Y[T], E.highlightColor[T] = Z.contourColor[T] = s(ee.color), ee.usecolormap ? E.highlightTint[T] = Z.contourTint[T] = 0 : E.highlightTint[T] = Z.contourTint[T] = 1, Z.contourWidth[T] = ee.width, this.contourStart[T] = ee.start, this.contourEnd[T] = ee.end, this.contourSize[T] = ee.size) : (this.showContour[T] = !1, this.contourStart[T] = null, this.contourEnd[T] = null, this.contourSize[T] = 0), ee.highlight && (Z.dynamicColor[T] = s(ee.highlightcolor), Z.dynamicWidth[T] = ee.highlightwidth));
        }
        (function(N) {
          var K = N[0].rgb, X = N[N.length - 1].rgb;
          return K[0] === X[0] && K[1] === X[1] && K[2] === X[2] && K[3] === X[3];
        })(R) && (Z.vertexColor = !0), Z.objectOffset = this.objectOffset, Z.coords = W, E.update(Z), E.visible = w.visible, E.enableDynamic = B, E.enableHighlight = B, E.snapToData = !0, "lighting" in w && (E.ambientLight = w.lighting.ambient, E.diffuseLight = w.lighting.diffuse, E.specularLight = w.lighting.specular, E.roughness = w.lighting.roughness, E.fresnel = w.lighting.fresnel), "lightposition" in w && (E.lightPosition = [w.lightposition.x, w.lightposition.y, w.lightposition.z]);
      }, u.dispose = function() {
        this.scene.glplot.remove(this.surface), this.surface.dispose();
      }, Q.exports = function(w, T) {
        var L = w.glplot.gl, A = m({ gl: L }), I = new d(w, A, T.uid);
        return A._trace = I, I.update(T), w.glplot.add(A), I;
      };
    }, { "../../../stackgl_modules": 1133, "../../components/colorscale": 379, "../../lib": 515, "../../lib/gl_format_color": 511, "../../lib/str2rgbarray": 540, "../heatmap/find_empties": 807, "../heatmap/interp2d": 810 }], 1073: [function(v, Q, $) {
      var m = v("../../registry"), g = v("../../lib"), k = v("../../components/colorscale/defaults"), x = v("./attributes");
      function e(n, s, t, d) {
        var u = d("opacityscale");
        u === "max" ? s.opacityscale = [[0, 0.1], [1, 1]] : u === "min" ? s.opacityscale = [[0, 1], [1, 0.1]] : u === "extremes" ? s.opacityscale = function(o, h) {
          for (var l = [], i = 0; i < 32; i++) {
            var p = i / 31, c = h + (1 - h) * (1 - Math.pow(Math.sin(o * p * Math.PI), 2));
            l.push([p, Math.max(0, Math.min(1, c))]);
          }
          return l;
        }(1, 0.1) : function(o) {
          var h = 0;
          if (!Array.isArray(o) || o.length < 2 || !o[0] || !o[o.length - 1] || +o[0][0] != 0 || +o[o.length - 1][0] != 1)
            return !1;
          for (var l = 0; l < o.length; l++) {
            var i = o[l];
            if (i.length !== 2 || +i[0] < h)
              return !1;
            h = +i[0];
          }
          return !0;
        }(u) || (s.opacityscale = void 0);
      }
      function r(n, s, t) {
        s in n && !(t in n) && (n[t] = n[s]);
      }
      Q.exports = { supplyDefaults: function(n, s, t, d) {
        var u, o;
        function h(b, w) {
          return g.coerce(n, s, x, b, w);
        }
        var l = h("x"), i = h("y"), p = h("z");
        if (!p || !p.length || l && l.length < 1 || i && i.length < 1)
          s.visible = !1;
        else {
          s._xlength = Array.isArray(l) && g.isArrayOrTypedArray(l[0]) ? p.length : p[0].length, s._ylength = p.length, m.getComponentMethod("calendars", "handleTraceDefaults")(n, s, ["x", "y", "z"], d), h("text"), h("hovertext"), h("hovertemplate"), h("xhoverformat"), h("yhoverformat"), h("zhoverformat"), ["lighting.ambient", "lighting.diffuse", "lighting.specular", "lighting.roughness", "lighting.fresnel", "lightposition.x", "lightposition.y", "lightposition.z", "hidesurface", "connectgaps", "opacity"].forEach(function(b) {
            h(b);
          });
          var c = h("surfacecolor"), a = ["x", "y", "z"];
          for (u = 0; u < 3; ++u) {
            var y = "contours." + a[u], f = h(y + ".show"), _ = h(y + ".highlight");
            if (f || _)
              for (o = 0; o < 3; ++o)
                h(y + ".project." + a[o]);
            f && (h(y + ".color"), h(y + ".width"), h(y + ".usecolormap")), _ && (h(y + ".highlightcolor"), h(y + ".highlightwidth")), h(y + ".start"), h(y + ".end"), h(y + ".size");
          }
          c || (r(n, "zmin", "cmin"), r(n, "zmax", "cmax"), r(n, "zauto", "cauto")), k(n, s, d, h, { prefix: "", cLetter: "c" }), e(n, s, d, h), s._length = null;
        }
      }, opacityscaleDefaults: e };
    }, { "../../components/colorscale/defaults": 377, "../../lib": 515, "../../registry": 647, "./attributes": 1070 }], 1074: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults").supplyDefaults, colorbar: { min: "cmin", max: "cmax" }, calc: v("./calc"), plot: v("./convert"), moduleType: "trace", name: "surface", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "2dMap", "showLegend"], meta: {} };
    }, { "../../plots/gl3d": 607, "./attributes": 1070, "./calc": 1071, "./convert": 1072, "./defaults": 1073 }], 1075: [function(v, Q, $) {
      var m = v("../../components/annotations/attributes"), g = v("../../lib/extend").extendFlat, k = v("../../plot_api/edit_types").overrideAll, x = v("../../plots/font_attributes"), e = v("../../plots/domain").attributes, r = v("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers;
      (Q.exports = k({ domain: e({ name: "table", trace: !0 }), columnwidth: { valType: "number", arrayOk: !0, dflt: null }, columnorder: { valType: "data_array" }, header: { values: { valType: "data_array", dflt: [] }, format: { valType: "data_array", dflt: [], description: r("cell value") }, prefix: { valType: "string", arrayOk: !0, dflt: null }, suffix: { valType: "string", arrayOk: !0, dflt: null }, height: { valType: "number", dflt: 28 }, align: g({}, m.align, { arrayOk: !0 }), line: { width: { valType: "number", arrayOk: !0, dflt: 1 }, color: { valType: "color", arrayOk: !0, dflt: "grey" } }, fill: { color: { valType: "color", arrayOk: !0, dflt: "white" } }, font: g({}, x({ arrayOk: !0 })) }, cells: { values: { valType: "data_array", dflt: [] }, format: { valType: "data_array", dflt: [], description: r("cell value") }, prefix: { valType: "string", arrayOk: !0, dflt: null }, suffix: { valType: "string", arrayOk: !0, dflt: null }, height: { valType: "number", dflt: 20 }, align: g({}, m.align, { arrayOk: !0 }), line: { width: { valType: "number", arrayOk: !0, dflt: 1 }, color: { valType: "color", arrayOk: !0, dflt: "grey" } }, fill: { color: { valType: "color", arrayOk: !0, dflt: "white" } }, font: g({}, x({ arrayOk: !0 })) } }, "calc", "from-root")).transforms = void 0;
    }, { "../../components/annotations/attributes": 350, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/domain": 593, "../../plots/font_attributes": 594 }], 1076: [function(v, Q, $) {
      var m = v("../../plots/get_data").getModuleCalcData, g = v("./plot");
      $.name = "table", $.plot = function(k) {
        var x = m(k.calcdata, "table")[0];
        x.length && g(k, x);
      }, $.clean = function(k, x, e, r) {
        var n = r._has && r._has("table"), s = x._has && x._has("table");
        n && !s && r._paperdiv.selectAll(".table").remove();
      };
    }, { "../../plots/get_data": 602, "./plot": 1083 }], 1077: [function(v, Q, $) {
      var m = v("../../lib/gup").wrap;
      Q.exports = function() {
        return m({});
      };
    }, { "../../lib/gup": 512 }], 1078: [function(v, Q, $) {
      Q.exports = { cellPad: 8, columnExtentOffset: 10, columnTitleOffset: 28, emptyHeaderHeight: 16, latexCheck: /^\$.*\$$/, goldenRatio: 1.618, lineBreaker: "<br>", maxDimensionCount: 60, overdrag: 45, releaseTransitionDuration: 120, releaseTransitionEase: "cubic-out", scrollbarCaptureWidth: 18, scrollbarHideDelay: 1e3, scrollbarHideDuration: 1e3, scrollbarOffset: 5, scrollbarWidth: 8, transitionDuration: 100, transitionEase: "cubic-out", uplift: 5, wrapSpacer: " ", wrapSplitCharacter: " ", cn: { table: "table", tableControlView: "table-control-view", scrollBackground: "scroll-background", yColumn: "y-column", columnBlock: "column-block", scrollAreaClip: "scroll-area-clip", scrollAreaClipRect: "scroll-area-clip-rect", columnBoundary: "column-boundary", columnBoundaryClippath: "column-boundary-clippath", columnBoundaryRect: "column-boundary-rect", columnCells: "column-cells", columnCell: "column-cell", cellRect: "cell-rect", cellText: "cell-text", cellTextHolder: "cell-text-holder", scrollbarKit: "scrollbar-kit", scrollbar: "scrollbar", scrollbarSlider: "scrollbar-slider", scrollbarGlyph: "scrollbar-glyph", scrollbarCaptureZone: "scrollbar-capture-zone" } };
    }, {}], 1079: [function(v, Q, $) {
      var m = v("./constants"), g = v("../../lib/extend").extendFlat, k = v("fast-isnumeric");
      function x(u) {
        if (Array.isArray(u)) {
          for (var o = 0, h = 0; h < u.length; h++)
            o = Math.max(o, x(u[h]));
          return o;
        }
        return u;
      }
      function e(u, o) {
        return u + o;
      }
      function r(u) {
        var o, h = u.slice(), l = 1 / 0, i = 0;
        for (o = 0; o < h.length; o++)
          Array.isArray(h[o]) || (h[o] = [h[o]]), l = Math.min(l, h[o].length), i = Math.max(i, h[o].length);
        if (l !== i)
          for (o = 0; o < h.length; o++) {
            var p = i - h[o].length;
            p && (h[o] = h[o].concat(n(p)));
          }
        return h;
      }
      function n(u) {
        for (var o = new Array(u), h = 0; h < u; h++)
          o[h] = "";
        return o;
      }
      function s(u) {
        return u.calcdata.columns.reduce(function(o, h) {
          return h.xIndex < u.xIndex ? o + h.columnWidth : o;
        }, 0);
      }
      function t(u, o) {
        return Object.keys(u).map(function(h) {
          return g({}, u[h], { auxiliaryBlocks: o });
        });
      }
      function d(u, o) {
        for (var h, l = {}, i = 0, p = 0, c = { firstRowIndex: null, lastRowIndex: null, rows: [] }, a = 0, y = 0, f = 0; f < u.length; f++)
          h = u[f], c.rows.push({ rowIndex: f, rowHeight: h }), ((p += h) >= o || f === u.length - 1) && (l[i] = c, c.key = y++, c.firstRowIndex = a, c.lastRowIndex = f, c = { firstRowIndex: null, lastRowIndex: null, rows: [] }, i += p, a = f + 1, p = 0);
        return l;
      }
      Q.exports = function(u, o) {
        var h = r(o.cells.values), l = function(z) {
          return z.slice(o.header.values.length, z.length);
        }, i = r(o.header.values);
        i.length && !i[0].length && (i[0] = [""], i = r(i));
        var p = i.concat(l(h).map(function() {
          return n((i[0] || [""]).length);
        })), c = o.domain, a = Math.floor(u._fullLayout._size.w * (c.x[1] - c.x[0])), y = Math.floor(u._fullLayout._size.h * (c.y[1] - c.y[0])), f = o.header.values.length ? p[0].map(function() {
          return o.header.height;
        }) : [m.emptyHeaderHeight], _ = h.length ? h[0].map(function() {
          return o.cells.height;
        }) : [], b = f.reduce(e, 0), w = d(_, y - b + m.uplift), T = t(d(f, b), []), L = t(w, T), A = {}, I = o._fullInput.columnorder.concat(l(h.map(function(z, j) {
          return j;
        }))), P = p.map(function(z, j) {
          var H = Array.isArray(o.columnwidth) ? o.columnwidth[Math.min(j, o.columnwidth.length - 1)] : o.columnwidth;
          return k(H) ? Number(H) : 1;
        }), S = P.reduce(e, 0);
        P = P.map(function(z) {
          return z / S * a;
        });
        var E = Math.max(x(o.header.line.width), x(o.cells.line.width)), R = { key: o.uid + u._context.staticPlot, translateX: c.x[0] * u._fullLayout._size.w, translateY: u._fullLayout._size.h * (1 - c.y[1]), size: u._fullLayout._size, width: a, maxLineWidth: E, height: y, columnOrder: I, groupHeight: y, rowBlocks: L, headerRowBlocks: T, scrollY: 0, cells: g({}, o.cells, { values: h }), headerCells: g({}, o.header, { values: p }), gdColumns: p.map(function(z) {
          return z[0];
        }), gdColumnsOriginalOrder: p.map(function(z) {
          return z[0];
        }), prevPages: [0, 0], scrollbarState: { scrollbarScrollInProgress: !1 }, columns: p.map(function(z, j) {
          var H = A[z];
          return A[z] = (H || 0) + 1, { key: z + "__" + A[z], label: z, specIndex: j, xIndex: I[j], xScale: s, x: void 0, calcdata: void 0, columnWidth: P[j] };
        }) };
        return R.columns.forEach(function(z) {
          z.calcdata = R, z.x = s(z);
        }), R;
      };
    }, { "../../lib/extend": 505, "./constants": 1078, "fast-isnumeric": 190 }], 1080: [function(v, Q, $) {
      var m = v("../../lib/extend").extendFlat;
      $.splitToPanels = function(g) {
        var k = [0, 0], x = m({}, g, { key: "header", type: "header", page: 0, prevPages: k, currentRepaint: [null, null], dragHandle: !0, values: g.calcdata.headerCells.values[g.specIndex], rowBlocks: g.calcdata.headerRowBlocks, calcdata: m({}, g.calcdata, { cells: g.calcdata.headerCells }) });
        return [m({}, g, { key: "cells1", type: "cells", page: 0, prevPages: k, currentRepaint: [null, null], dragHandle: !1, values: g.calcdata.cells.values[g.specIndex], rowBlocks: g.calcdata.rowBlocks }), m({}, g, { key: "cells2", type: "cells", page: 1, prevPages: k, currentRepaint: [null, null], dragHandle: !1, values: g.calcdata.cells.values[g.specIndex], rowBlocks: g.calcdata.rowBlocks }), x];
      }, $.splitToCells = function(g) {
        var k = function(x) {
          var e = x.rowBlocks[x.page], r = e ? e.rows[0].rowIndex : 0, n = e ? r + e.rows.length : 0;
          return [r, n];
        }(g);
        return (g.values || []).slice(k[0], k[1]).map(function(x, e) {
          return { keyWithinBlock: e + (typeof x == "string" && x.match(/[<$&> ]/) ? "_keybuster_" + Math.random() : ""), key: k[0] + e, column: g, calcdata: g.calcdata, page: g.page, rowBlocks: g.rowBlocks, value: x };
        });
      };
    }, { "../../lib/extend": 505 }], 1081: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../plots/domain").defaults;
      Q.exports = function(x, e, r, n) {
        function s(t, d) {
          return m.coerce(x, e, g, t, d);
        }
        k(e, n, s), s("columnwidth"), s("header.values"), s("header.format"), s("header.align"), s("header.prefix"), s("header.suffix"), s("header.height"), s("header.line.width"), s("header.line.color"), s("header.fill.color"), m.coerceFont(s, "header.font", m.extendFlat({}, n.font)), function(t, d) {
          for (var u = t.columnorder || [], o = t.header.values.length, h = u.slice(0, o), l = h.slice().sort(function(c, a) {
            return c - a;
          }), i = h.map(function(c) {
            return l.indexOf(c);
          }), p = i.length; p < o; p++)
            i.push(p);
          d("columnorder", i);
        }(e, s), s("cells.values"), s("cells.format"), s("cells.align"), s("cells.prefix"), s("cells.suffix"), s("cells.height"), s("cells.line.width"), s("cells.line.color"), s("cells.fill.color"), m.coerceFont(s, "cells.font", m.extendFlat({}, n.font)), e._length = null;
      };
    }, { "../../lib": 515, "../../plots/domain": 593, "./attributes": 1075 }], 1082: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("./calc"), plot: v("./plot"), moduleType: "trace", name: "table", basePlotModule: v("./base_plot"), categories: ["noOpacity"], meta: {} };
    }, { "./attributes": 1075, "./base_plot": 1076, "./calc": 1077, "./defaults": 1081, "./plot": 1083 }], 1083: [function(v, Q, $) {
      var m = v("./constants"), g = v("@plotly/d3"), k = v("../../lib").numberFormat, x = v("../../lib/gup"), e = v("../../components/drawing"), r = v("../../lib/svg_text_utils"), n = v("../../lib").raiseToTop, s = v("../../lib").strTranslate, t = v("../../lib").cancelTransition, d = v("./data_preparation_helper"), u = v("./data_split_helpers"), o = v("../../components/color");
      function h(W) {
        return Math.ceil(W.calcdata.maxLineWidth / 2);
      }
      function l(W, Z) {
        return "clip" + W._fullLayout._uid + "_scrollAreaBottomClip_" + Z.key;
      }
      function i(W, Z) {
        return "clip" + W._fullLayout._uid + "_columnBoundaryClippath_" + Z.calcdata.key + "_" + Z.specIndex;
      }
      function p(W) {
        return [].concat.apply([], W.map(function(Z) {
          return Z;
        })).map(function(Z) {
          return Z.__data__;
        });
      }
      function c(W, Z, re) {
        var V = W.selectAll("." + m.cn.scrollbarKit).data(x.repeat, x.keyFun);
        V.enter().append("g").classed(m.cn.scrollbarKit, !0).style("shape-rendering", "geometricPrecision"), V.each(function(K) {
          var X = K.scrollbarState;
          X.totalHeight = function(te) {
            var ie = te.rowBlocks;
            return j(ie, ie.length - 1) + (ie.length ? H(ie[ie.length - 1], 1 / 0) : 1);
          }(K), X.scrollableAreaHeight = K.groupHeight - L(K), X.currentlyVisibleHeight = Math.min(X.totalHeight, X.scrollableAreaHeight), X.ratio = X.currentlyVisibleHeight / X.totalHeight, X.barLength = Math.max(X.ratio * X.currentlyVisibleHeight, m.goldenRatio * m.scrollbarWidth), X.barWiggleRoom = X.currentlyVisibleHeight - X.barLength, X.wiggleRoom = Math.max(0, X.totalHeight - X.scrollableAreaHeight), X.topY = X.barWiggleRoom === 0 ? 0 : K.scrollY / X.wiggleRoom * X.barWiggleRoom, X.bottomY = X.topY + X.barLength, X.dragMultiplier = X.wiggleRoom / X.barWiggleRoom;
        }).attr("transform", function(K) {
          var X = K.width + m.scrollbarWidth / 2 + m.scrollbarOffset;
          return s(X, L(K));
        });
        var B = V.selectAll("." + m.cn.scrollbar).data(x.repeat, x.keyFun);
        B.enter().append("g").classed(m.cn.scrollbar, !0);
        var U = B.selectAll("." + m.cn.scrollbarSlider).data(x.repeat, x.keyFun);
        U.enter().append("g").classed(m.cn.scrollbarSlider, !0), U.attr("transform", function(K) {
          return s(0, K.scrollbarState.topY || 0);
        });
        var ee = U.selectAll("." + m.cn.scrollbarGlyph).data(x.repeat, x.keyFun);
        ee.enter().append("line").classed(m.cn.scrollbarGlyph, !0).attr("stroke", "black").attr("stroke-width", m.scrollbarWidth).attr("stroke-linecap", "round").attr("y1", m.scrollbarWidth / 2), ee.attr("y2", function(K) {
          return K.scrollbarState.barLength - m.scrollbarWidth / 2;
        }).attr("stroke-opacity", function(K) {
          return K.columnDragInProgress || !K.scrollbarState.barWiggleRoom || re ? 0 : 0.4;
        }), ee.transition().delay(0).duration(0), ee.transition().delay(m.scrollbarHideDelay).duration(m.scrollbarHideDuration).attr("stroke-opacity", 0);
        var N = B.selectAll("." + m.cn.scrollbarCaptureZone).data(x.repeat, x.keyFun);
        N.enter().append("line").classed(m.cn.scrollbarCaptureZone, !0).attr("stroke", "white").attr("stroke-opacity", 0.01).attr("stroke-width", m.scrollbarCaptureWidth).attr("stroke-linecap", "butt").attr("y1", 0).on("mousedown", function(K) {
          var X = g.event.y, te = this.getBoundingClientRect(), ie = K.scrollbarState, le = X - te.top, oe = g.scale.linear().domain([0, ie.scrollableAreaHeight]).range([0, ie.totalHeight]).clamp(!0);
          ie.topY <= le && le <= ie.bottomY || I(Z, W, null, oe(le - ie.barLength / 2))(K);
        }).call(g.behavior.drag().origin(function(K) {
          return g.event.stopPropagation(), K.scrollbarState.scrollbarScrollInProgress = !0, K;
        }).on("drag", I(Z, W)).on("dragend", function() {
        })), N.attr("y2", function(K) {
          return K.scrollbarState.scrollableAreaHeight;
        }), Z._context.staticPlot && (ee.remove(), N.remove());
      }
      function a(W, Z, re, V) {
        var B = function(ee) {
          var N = ee.selectAll("." + m.cn.columnCell).data(u.splitToCells, function(K) {
            return K.keyWithinBlock;
          });
          return N.enter().append("g").classed(m.cn.columnCell, !0), N.exit().remove(), N;
        }(function(ee) {
          var N = ee.selectAll("." + m.cn.columnCells).data(x.repeat, x.keyFun);
          return N.enter().append("g").classed(m.cn.columnCells, !0), N.exit().remove(), N;
        }(re));
        (function(ee) {
          ee.each(function(N, K) {
            var X = N.calcdata.cells.font, te = N.column.specIndex, ie = { size: _(X.size, te, K), color: _(X.color, te, K), family: _(X.family, te, K) };
            N.rowNumber = N.key, N.align = _(N.calcdata.cells.align, te, K), N.cellBorderWidth = _(N.calcdata.cells.line.width, te, K), N.font = ie;
          });
        })(B), function(ee) {
          ee.attr("width", function(N) {
            return N.column.columnWidth;
          }).attr("stroke-width", function(N) {
            return N.cellBorderWidth;
          }).each(function(N) {
            var K = g.select(this);
            o.stroke(K, _(N.calcdata.cells.line.color, N.column.specIndex, N.rowNumber)), o.fill(K, _(N.calcdata.cells.fill.color, N.column.specIndex, N.rowNumber));
          });
        }(function(ee) {
          var N = ee.selectAll("." + m.cn.cellRect).data(x.repeat, function(K) {
            return K.keyWithinBlock;
          });
          return N.enter().append("rect").classed(m.cn.cellRect, !0), N;
        }(B));
        var U = function(ee) {
          var N = ee.selectAll("." + m.cn.cellText).data(x.repeat, function(K) {
            return K.keyWithinBlock;
          });
          return N.enter().append("text").classed(m.cn.cellText, !0).style("cursor", function() {
            return "auto";
          }).on("mousedown", function() {
            g.event.stopPropagation();
          }), N;
        }(function(ee) {
          var N = ee.selectAll("." + m.cn.cellTextHolder).data(x.repeat, function(K) {
            return K.keyWithinBlock;
          });
          return N.enter().append("g").classed(m.cn.cellTextHolder, !0).style("shape-rendering", "geometricPrecision"), N;
        }(B));
        (function(ee) {
          ee.each(function(N) {
            e.font(g.select(this), N.font);
          });
        })(U), y(U, Z, V, W), z(B);
      }
      function y(W, Z, re, V) {
        W.text(function(B) {
          var U = B.column.specIndex, ee = B.rowNumber, N = B.value, K = typeof N == "string", X = K && N.match(/<br>/i), te = !K || X;
          B.mayHaveMarkup = K && N.match(/[<&>]/);
          var ie, le = typeof (ie = N) == "string" && ie.match(m.latexCheck);
          B.latex = le;
          var oe, ve, ue = le ? "" : _(B.calcdata.cells.prefix, U, ee) || "", ye = le ? "" : _(B.calcdata.cells.suffix, U, ee) || "", Ae = le ? null : _(B.calcdata.cells.format, U, ee) || null, pe = ue + (Ae ? k(Ae)(B.value) : B.value) + ye;
          if (B.wrappingNeeded = !B.wrapped && !te && !le && (oe = f(pe)), B.cellHeightMayIncrease = X || le || B.mayHaveMarkup || (oe === void 0 ? f(pe) : oe), B.needsConvertToTspans = B.mayHaveMarkup || B.wrappingNeeded || B.latex, B.wrappingNeeded) {
            var ge = (m.wrapSplitCharacter === " " ? pe.replace(/<a href=/gi, "<a_href=") : pe).split(m.wrapSplitCharacter), we = m.wrapSplitCharacter === " " ? ge.map(function(se) {
              return se.replace(/<a_href=/gi, "<a href=");
            }) : ge;
            B.fragments = we.map(function(se) {
              return { text: se, width: null };
            }), B.fragments.push({ fragment: m.wrapSpacer, width: null }), ve = we.join(m.lineBreaker) + m.lineBreaker + m.wrapSpacer;
          } else
            delete B.fragments, ve = pe;
          return ve;
        }).attr("dy", function(B) {
          return B.needsConvertToTspans ? 0 : "0.75em";
        }).each(function(B) {
          var U = g.select(this), ee = B.wrappingNeeded ? S : E;
          B.needsConvertToTspans ? r.convertToTspans(U, V, ee(re, this, Z, V, B)) : g.select(this.parentNode).attr("transform", function(N) {
            return s(R(N), m.cellPad);
          }).attr("text-anchor", function(N) {
            return { left: "start", center: "middle", right: "end" }[N.align];
          });
        });
      }
      function f(W) {
        return W.indexOf(m.wrapSplitCharacter) !== -1;
      }
      function _(W, Z, re) {
        if (Array.isArray(W)) {
          var V = W[Math.min(Z, W.length - 1)];
          return Array.isArray(V) ? V[Math.min(re, V.length - 1)] : V;
        }
        return W;
      }
      function b(W, Z, re) {
        W.transition().ease(m.releaseTransitionEase).duration(m.releaseTransitionDuration).attr("transform", s(Z.x, re));
      }
      function w(W) {
        return W.type === "cells";
      }
      function T(W) {
        return W.type === "header";
      }
      function L(W) {
        return (W.rowBlocks.length ? W.rowBlocks[0].auxiliaryBlocks : []).reduce(function(Z, re) {
          return Z + H(re, 1 / 0);
        }, 0);
      }
      function A(W, Z, re) {
        var V = p(Z)[0];
        if (V !== void 0) {
          var B = V.rowBlocks, U = V.calcdata, ee = j(B, B.length), N = V.calcdata.groupHeight - L(V), K = U.scrollY = Math.max(0, Math.min(ee - N, U.scrollY)), X = function(te, ie, le) {
            for (var oe = [], ve = 0, ue = 0; ue < te.length; ue++) {
              for (var ye = te[ue], Ae = ye.rows, pe = 0, ge = 0; ge < Ae.length; ge++)
                pe += Ae[ge].rowHeight;
              ye.allRowsHeight = pe, ie < ve + pe && ie + le > ve && oe.push(ue), ve += pe;
            }
            return oe;
          }(B, K, N);
          X.length === 1 && (X[0] === B.length - 1 ? X.unshift(X[0] - 1) : X.push(X[0] + 1)), X[0] % 2 && X.reverse(), Z.each(function(te, ie) {
            te.page = X[ie], te.scrollY = K;
          }), Z.attr("transform", function(te) {
            var ie = j(te.rowBlocks, te.page) - te.scrollY;
            return s(0, ie);
          }), W && (P(W, re, Z, X, V.prevPages, V, 0), P(W, re, Z, X, V.prevPages, V, 1), c(re, W));
        }
      }
      function I(W, Z, re, V) {
        return function(B) {
          var U = B.calcdata ? B.calcdata : B, ee = Z.filter(function(te) {
            return U.key === te.key;
          }), N = re || U.scrollbarState.dragMultiplier, K = U.scrollY;
          U.scrollY = V === void 0 ? U.scrollY + N * g.event.dy : V;
          var X = ee.selectAll("." + m.cn.yColumn).selectAll("." + m.cn.columnBlock).filter(w);
          return A(W, X, ee), U.scrollY === K;
        };
      }
      function P(W, Z, re, V, B, U, ee) {
        V[ee] !== B[ee] && (clearTimeout(U.currentRepaint[ee]), U.currentRepaint[ee] = setTimeout(function() {
          var N = re.filter(function(K, X) {
            return X === ee && V[X] !== B[X];
          });
          a(W, Z, N, re), B[ee] = V[ee];
        }));
      }
      function S(W, Z, re, V) {
        return function() {
          var B = g.select(Z.parentNode);
          B.each(function(U) {
            var ee = U.fragments;
            B.selectAll("tspan.line").each(function(ve, ue) {
              ee[ue].width = this.getComputedTextLength();
            });
            var N, K, X = ee[ee.length - 1].width, te = ee.slice(0, -1), ie = [], le = 0, oe = U.column.columnWidth - 2 * m.cellPad;
            for (U.value = ""; te.length; )
              le + (K = (N = te.shift()).width + X) > oe && (U.value += ie.join(m.wrapSpacer) + m.lineBreaker, ie = [], le = 0), ie.push(N.text), le += K;
            le && (U.value += ie.join(m.wrapSpacer)), U.wrapped = !0;
          }), B.selectAll("tspan.line").remove(), y(B.select("." + m.cn.cellText), re, W, V), g.select(Z.parentNode.parentNode).call(z);
        };
      }
      function E(W, Z, re, V, B) {
        return function() {
          if (!B.settledY) {
            var U = g.select(Z.parentNode), ee = J(B), N = B.key - ee.firstRowIndex, K = ee.rows[N].rowHeight, X = B.cellHeightMayIncrease ? Z.parentNode.getBoundingClientRect().height + 2 * m.cellPad : K, te = Math.max(X, K);
            te - ee.rows[N].rowHeight && (ee.rows[N].rowHeight = te, W.selectAll("." + m.cn.columnCell).call(z), A(null, W.filter(w), 0), c(re, V, !0)), U.attr("transform", function() {
              var ie = this.parentNode.getBoundingClientRect(), le = g.select(this.parentNode).select("." + m.cn.cellRect).node().getBoundingClientRect(), oe = this.transform.baseVal.consolidate(), ve = le.top - ie.top + (oe ? oe.matrix.f : m.cellPad);
              return s(R(B, g.select(this.parentNode).select("." + m.cn.cellTextHolder).node().getBoundingClientRect().width), ve);
            }), B.settledY = !0;
          }
        };
      }
      function R(W, Z) {
        switch (W.align) {
          case "left":
            return m.cellPad;
          case "right":
            return W.column.columnWidth - (Z || 0) - m.cellPad;
          case "center":
            return (W.column.columnWidth - (Z || 0)) / 2;
          default:
            return m.cellPad;
        }
      }
      function z(W) {
        W.attr("transform", function(Z) {
          var re = Z.rowBlocks[0].auxiliaryBlocks.reduce(function(B, U) {
            return B + H(U, 1 / 0);
          }, 0), V = H(J(Z), Z.key);
          return s(0, V + re);
        }).selectAll("." + m.cn.cellRect).attr("height", function(Z) {
          return (re = J(Z), V = Z.key, re.rows[V - re.firstRowIndex]).rowHeight;
          var re, V;
        });
      }
      function j(W, Z) {
        for (var re = 0, V = Z - 1; V >= 0; V--)
          re += Y(W[V]);
        return re;
      }
      function H(W, Z) {
        for (var re = 0, V = 0; V < W.rows.length && W.rows[V].rowIndex < Z; V++)
          re += W.rows[V].rowHeight;
        return re;
      }
      function Y(W) {
        var Z = W.allRowsHeight;
        if (Z !== void 0)
          return Z;
        for (var re = 0, V = 0; V < W.rows.length; V++)
          re += W.rows[V].rowHeight;
        return W.allRowsHeight = re, re;
      }
      function J(W) {
        return W.rowBlocks[W.page];
      }
      Q.exports = function(W, Z) {
        var re = !W._context.staticPlot, V = W._fullLayout._paper.selectAll("." + m.cn.table).data(Z.map(function(ye) {
          var Ae = x.unwrap(ye).trace;
          return d(W, Ae);
        }), x.keyFun);
        V.exit().remove(), V.enter().append("g").classed(m.cn.table, !0).attr("overflow", "visible").style("box-sizing", "content-box").style("position", "absolute").style("left", 0).style("overflow", "visible").style("shape-rendering", "crispEdges").style("pointer-events", "all"), V.attr("width", function(ye) {
          return ye.width + ye.size.l + ye.size.r;
        }).attr("height", function(ye) {
          return ye.height + ye.size.t + ye.size.b;
        }).attr("transform", function(ye) {
          return s(ye.translateX, ye.translateY);
        });
        var B = V.selectAll("." + m.cn.tableControlView).data(x.repeat, x.keyFun), U = B.enter().append("g").classed(m.cn.tableControlView, !0).style("box-sizing", "content-box");
        if (re) {
          var ee = "onwheel" in document ? "wheel" : "mousewheel";
          U.on("mousemove", function(ye) {
            B.filter(function(Ae) {
              return ye === Ae;
            }).call(c, W);
          }).on(ee, function(ye) {
            if (!ye.scrollbarState.wheeling) {
              ye.scrollbarState.wheeling = !0;
              var Ae = ye.scrollY + g.event.deltaY;
              I(W, B, null, Ae)(ye) || (g.event.stopPropagation(), g.event.preventDefault()), ye.scrollbarState.wheeling = !1;
            }
          }).call(c, W, !0);
        }
        B.attr("transform", function(ye) {
          return s(ye.size.l, ye.size.t);
        });
        var N = B.selectAll("." + m.cn.scrollBackground).data(x.repeat, x.keyFun);
        N.enter().append("rect").classed(m.cn.scrollBackground, !0).attr("fill", "none"), N.attr("width", function(ye) {
          return ye.width;
        }).attr("height", function(ye) {
          return ye.height;
        }), B.each(function(ye) {
          e.setClipUrl(g.select(this), l(W, ye), W);
        });
        var K = B.selectAll("." + m.cn.yColumn).data(function(ye) {
          return ye.columns;
        }, x.keyFun);
        K.enter().append("g").classed(m.cn.yColumn, !0), K.exit().remove(), K.attr("transform", function(ye) {
          return s(ye.x, 0);
        }), re && K.call(g.behavior.drag().origin(function(ye) {
          return b(g.select(this), ye, -m.uplift), n(this), ye.calcdata.columnDragInProgress = !0, c(B.filter(function(Ae) {
            return ye.calcdata.key === Ae.key;
          }), W), ye;
        }).on("drag", function(ye) {
          var Ae = g.select(this), pe = function(ge) {
            return (ye === ge ? g.event.x : ge.x) + ge.columnWidth / 2;
          };
          ye.x = Math.max(-m.overdrag, Math.min(ye.calcdata.width + m.overdrag - ye.columnWidth, g.event.x)), p(K).filter(function(ge) {
            return ge.calcdata.key === ye.calcdata.key;
          }).sort(function(ge, we) {
            return pe(ge) - pe(we);
          }).forEach(function(ge, we) {
            ge.xIndex = we, ge.x = ye === ge ? ge.x : ge.xScale(ge);
          }), K.filter(function(ge) {
            return ye !== ge;
          }).transition().ease(m.transitionEase).duration(m.transitionDuration).attr("transform", function(ge) {
            return s(ge.x, 0);
          }), Ae.call(t).attr("transform", s(ye.x, -m.uplift));
        }).on("dragend", function(ye) {
          var Ae = g.select(this), pe = ye.calcdata;
          ye.x = ye.xScale(ye), ye.calcdata.columnDragInProgress = !1, b(Ae, ye, 0), function(ge, we, se) {
            var de = we.gdColumnsOriginalOrder;
            we.gdColumns.sort(function(Te, Ee) {
              return se[de.indexOf(Te)] - se[de.indexOf(Ee)];
            }), we.columnorder = se, ge.emit("plotly_restyle");
          }(W, pe, pe.columns.map(function(ge) {
            return ge.xIndex;
          }));
        })), K.each(function(ye) {
          e.setClipUrl(g.select(this), i(W, ye), W);
        });
        var X = K.selectAll("." + m.cn.columnBlock).data(u.splitToPanels, x.keyFun);
        X.enter().append("g").classed(m.cn.columnBlock, !0).attr("id", function(ye) {
          return ye.key;
        }), X.style("cursor", function(ye) {
          return ye.dragHandle ? "ew-resize" : ye.calcdata.scrollbarState.barWiggleRoom ? "ns-resize" : "default";
        });
        var te = X.filter(T), ie = X.filter(w);
        re && ie.call(g.behavior.drag().origin(function(ye) {
          return g.event.stopPropagation(), ye;
        }).on("drag", I(W, B, -1)).on("dragend", function() {
        })), a(W, B, te, X), a(W, B, ie, X);
        var le = B.selectAll("." + m.cn.scrollAreaClip).data(x.repeat, x.keyFun);
        le.enter().append("clipPath").classed(m.cn.scrollAreaClip, !0).attr("id", function(ye) {
          return l(W, ye);
        });
        var oe = le.selectAll("." + m.cn.scrollAreaClipRect).data(x.repeat, x.keyFun);
        oe.enter().append("rect").classed(m.cn.scrollAreaClipRect, !0).attr("x", -m.overdrag).attr("y", -m.uplift).attr("fill", "none"), oe.attr("width", function(ye) {
          return ye.width + 2 * m.overdrag;
        }).attr("height", function(ye) {
          return ye.height + m.uplift;
        }), K.selectAll("." + m.cn.columnBoundary).data(x.repeat, x.keyFun).enter().append("g").classed(m.cn.columnBoundary, !0);
        var ve = K.selectAll("." + m.cn.columnBoundaryClippath).data(x.repeat, x.keyFun);
        ve.enter().append("clipPath").classed(m.cn.columnBoundaryClippath, !0), ve.attr("id", function(ye) {
          return i(W, ye);
        });
        var ue = ve.selectAll("." + m.cn.columnBoundaryRect).data(x.repeat, x.keyFun);
        ue.enter().append("rect").classed(m.cn.columnBoundaryRect, !0).attr("fill", "none"), ue.attr("width", function(ye) {
          return ye.columnWidth + 2 * h(ye);
        }).attr("height", function(ye) {
          return ye.calcdata.height + 2 * h(ye) + m.uplift;
        }).attr("x", function(ye) {
          return -h(ye);
        }).attr("y", function(ye) {
          return -h(ye);
        }), A(null, ie, B);
      };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../lib": 515, "../../lib/gup": 512, "../../lib/svg_text_utils": 541, "./constants": 1078, "./data_preparation_helper": 1079, "./data_split_helpers": 1080, "@plotly/d3": 58 }], 1084: [function(v, Q, $) {
      var m = v("../../plots/template_attributes").hovertemplateAttrs, g = v("../../plots/template_attributes").texttemplateAttrs, k = v("../../components/colorscale/attributes"), x = v("../../plots/domain").attributes, e = v("../pie/attributes"), r = v("../sunburst/attributes"), n = v("./constants"), s = v("../../lib/extend").extendFlat;
      Q.exports = { labels: r.labels, parents: r.parents, values: r.values, branchvalues: r.branchvalues, count: r.count, level: r.level, maxdepth: r.maxdepth, tiling: { packing: { valType: "enumerated", values: ["squarify", "binary", "dice", "slice", "slice-dice", "dice-slice"], dflt: "squarify", editType: "plot" }, squarifyratio: { valType: "number", min: 1, dflt: 1, editType: "plot" }, flip: { valType: "flaglist", flags: ["x", "y"], dflt: "", editType: "plot" }, pad: { valType: "number", min: 0, dflt: 3, editType: "plot" }, editType: "calc" }, marker: s({ pad: { t: { valType: "number", min: 0, editType: "plot" }, l: { valType: "number", min: 0, editType: "plot" }, r: { valType: "number", min: 0, editType: "plot" }, b: { valType: "number", min: 0, editType: "plot" }, editType: "calc" }, colors: r.marker.colors, depthfade: { valType: "enumerated", values: [!0, !1, "reversed"], editType: "style" }, line: r.marker.line, editType: "calc" }, k("marker", { colorAttr: "colors", anim: !1 })), pathbar: { visible: { valType: "boolean", dflt: !0, editType: "plot" }, side: { valType: "enumerated", values: ["top", "bottom"], dflt: "top", editType: "plot" }, edgeshape: { valType: "enumerated", values: [">", "<", "|", "/", "\\"], dflt: ">", editType: "plot" }, thickness: { valType: "number", min: 12, editType: "plot" }, textfont: s({}, e.textfont, {}), editType: "calc" }, text: e.text, textinfo: r.textinfo, texttemplate: g({ editType: "plot" }, { keys: n.eventDataKeys.concat(["label", "value"]) }), hovertext: e.hovertext, hoverinfo: r.hoverinfo, hovertemplate: m({}, { keys: n.eventDataKeys }), textfont: e.textfont, insidetextfont: e.insidetextfont, outsidetextfont: s({}, e.outsidetextfont, {}), textposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle left", "middle center", "middle right", "bottom left", "bottom center", "bottom right"], dflt: "top left", editType: "plot" }, sort: e.sort, root: r.root, domain: x({ name: "treemap", trace: !0, editType: "calc" }) };
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plots/domain": 593, "../../plots/template_attributes": 642, "../pie/attributes": 910, "../sunburst/attributes": 1058, "./constants": 1087 }], 1085: [function(v, Q, $) {
      var m = v("../../plots/plots");
      $.name = "treemap", $.plot = function(g, k, x, e) {
        m.plotBasePlot($.name, g, k, x, e);
      }, $.clean = function(g, k, x, e) {
        m.cleanBasePlot($.name, g, k, x, e);
      };
    }, { "../../plots/plots": 628 }], 1086: [function(v, Q, $) {
      var m = v("../sunburst/calc");
      $.calc = function(g, k) {
        return m.calc(g, k);
      }, $.crossTraceCalc = function(g) {
        return m._runCrossTraceCalc("treemap", g);
      };
    }, { "../sunburst/calc": 1060 }], 1087: [function(v, Q, $) {
      Q.exports = { CLICK_TRANSITION_TIME: 750, CLICK_TRANSITION_EASING: "poly", eventDataKeys: ["currentPath", "root", "entry", "percentRoot", "percentEntry", "percentParent"], gapWithPathbar: 1 };
    }, {}], 1088: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../../components/color"), x = v("../../plots/domain").defaults, e = v("../bar/defaults").handleText, r = v("../bar/constants").TEXTPAD, n = v("../../components/colorscale"), s = n.hasColorscale, t = n.handleDefaults;
      Q.exports = function(d, u, o, h) {
        function l(w, T) {
          return m.coerce(d, u, g, w, T);
        }
        var i = l("labels"), p = l("parents");
        if (i && i.length && p && p.length) {
          var c = l("values");
          c && c.length ? l("branchvalues") : l("count"), l("level"), l("maxdepth"), l("tiling.packing") === "squarify" && l("tiling.squarifyratio"), l("tiling.flip"), l("tiling.pad");
          var a = l("text");
          l("texttemplate"), u.texttemplate || l("textinfo", Array.isArray(a) ? "text+label" : "label"), l("hovertext"), l("hovertemplate");
          var y = l("pathbar.visible");
          e(d, u, h, l, "auto", { hasPathbar: y, moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), l("textposition");
          var f = u.textposition.indexOf("bottom") !== -1;
          l("marker.line.width") && l("marker.line.color", h.paper_bgcolor);
          var _ = l("marker.colors");
          (u._hasColorscale = s(d, "marker", "colors") || (d.marker || {}).coloraxis) ? t(d, u, h, l, { prefix: "marker.", cLetter: "c" }) : l("marker.depthfade", !(_ || []).length);
          var b = 2 * u.textfont.size;
          l("marker.pad.t", f ? b / 4 : b), l("marker.pad.l", b / 4), l("marker.pad.r", b / 4), l("marker.pad.b", f ? b : b / 4), u._hovered = { marker: { line: { width: 2, color: k.contrast(h.paper_bgcolor) } } }, y && (l("pathbar.thickness", u.pathbar.textfont.size + 2 * r), l("pathbar.side"), l("pathbar.edgeshape")), l("sort"), l("root.color"), x(u, h, l), u._length = null;
        } else
          u.visible = !1;
      };
    }, { "../../components/color": 367, "../../components/colorscale": 379, "../../lib": 515, "../../plots/domain": 593, "../bar/constants": 659, "../bar/defaults": 661, "./attributes": 1084 }], 1089: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../sunburst/helpers"), k = v("../bar/uniform_text").clearMinTextSize, x = v("../bar/style").resizeText, e = v("./plot_one");
      Q.exports = function(r, n, s, t, d) {
        var u, o, h = d.type, l = d.drawDescendants, i = r._fullLayout, p = i["_" + h + "layer"], c = !s;
        k(h, i), (u = p.selectAll("g.trace." + h).data(n, function(a) {
          return a[0].trace.uid;
        })).enter().append("g").classed("trace", !0).classed(h, !0), u.order(), !i.uniformtext.mode && g.hasTransition(s) ? (t && (o = t()), m.transition().duration(s.duration).ease(s.easing).each("end", function() {
          o && o();
        }).each("interrupt", function() {
          o && o();
        }).each(function() {
          p.selectAll("g.trace").each(function(a) {
            e(r, a, this, s, l);
          });
        })) : (u.each(function(a) {
          e(r, a, this, s, l);
        }), i.uniformtext.mode && x(r, p.selectAll(".trace"), h)), c && u.exit().remove();
      };
    }, { "../bar/style": 671, "../bar/uniform_text": 673, "../sunburst/helpers": 1064, "./plot_one": 1098, "@plotly/d3": 58 }], 1090: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../../lib/svg_text_utils"), e = v("./partition"), r = v("./style").styleOne, n = v("./constants"), s = v("../sunburst/helpers"), t = v("../sunburst/fx");
      Q.exports = function(d, u, o, h, l) {
        var i = l.barDifY, p = l.width, c = l.height, a = l.viewX, y = l.viewY, f = l.pathSlice, _ = l.toMoveInsideSlice, b = l.strTransform, w = l.hasTransition, T = l.handleSlicesExit, L = l.makeUpdateSliceInterpolator, A = l.makeUpdateTextInterpolator, I = {}, P = d._context.staticPlot, S = d._fullLayout, E = u[0], R = E.trace, z = E.hierarchy, j = p / R._entryDepth, H = s.listPath(o.data, "id"), Y = e(z.copy(), [p, c], { packing: "dice", pad: { inner: 0, top: 0, left: 0, right: 0, bottom: 0 } }).descendants();
        (Y = Y.filter(function(W) {
          var Z = H.indexOf(W.data.id);
          return Z !== -1 && (W.x0 = j * Z, W.x1 = j * (Z + 1), W.y0 = i, W.y1 = i + c, W.onPathbar = !0, !0);
        })).reverse(), (h = h.data(Y, s.getPtId)).enter().append("g").classed("pathbar", !0), T(h, !0, I, [p, c], f), h.order();
        var J = h;
        w && (J = J.transition().each("end", function() {
          var W = m.select(this);
          s.setSliceCursor(W, d, { hideOnRoot: !1, hideOnLeaves: !1, isTransitioning: !1 });
        })), J.each(function(W) {
          W._x0 = a(W.x0), W._x1 = a(W.x1), W._y0 = y(W.y0), W._y1 = y(W.y1), W._hoverX = a(W.x1 - Math.min(p, c) / 2), W._hoverY = y(W.y1 - c / 2);
          var Z = m.select(this), re = g.ensureSingle(Z, "path", "surface", function(ee) {
            ee.style("pointer-events", P ? "none" : "all");
          });
          w ? re.transition().attrTween("d", function(ee) {
            var N = L(ee, !0, I, [p, c]);
            return function(K) {
              return f(N(K));
            };
          }) : re.attr("d", f), Z.call(t, o, d, u, { styleOne: r, eventDataKeys: n.eventDataKeys, transitionTime: n.CLICK_TRANSITION_TIME, transitionEasing: n.CLICK_TRANSITION_EASING }).call(s.setSliceCursor, d, { hideOnRoot: !1, hideOnLeaves: !1, isTransitioning: d._transitioning }), re.call(r, W, R, { hovered: !1 }), W._text = (s.getPtLabel(W) || "").split("<br>").join(" ") || "";
          var V = g.ensureSingle(Z, "g", "slicetext"), B = g.ensureSingle(V, "text", "", function(ee) {
            ee.attr("data-notex", 1);
          }), U = g.ensureUniformFontSize(d, s.determineTextFont(R, W, S.font, { onPathbar: !0 }));
          B.text(W._text || " ").classed("slicetext", !0).attr("text-anchor", "start").call(k.font, U).call(x.convertToTspans, d), W.textBB = k.bBox(B.node()), W.transform = _(W, { fontSize: U.size, onPathbar: !0 }), W.transform.fontSize = U.size, w ? B.transition().attrTween("transform", function(ee) {
            var N = A(ee, !0, I, [p, c]);
            return function(K) {
              return b(N(K));
            };
          }) : B.attr("transform", b(W));
        });
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../lib/svg_text_utils": 541, "../sunburst/fx": 1063, "../sunburst/helpers": 1064, "./constants": 1087, "./partition": 1096, "./style": 1099, "@plotly/d3": 58 }], 1091: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../../lib/svg_text_utils"), e = v("./partition"), r = v("./style").styleOne, n = v("./constants"), s = v("../sunburst/helpers"), t = v("../sunburst/fx"), d = v("../sunburst/plot").formatSliceLabel;
      Q.exports = function(u, o, h, l, i) {
        var p = i.width, c = i.height, a = i.viewX, y = i.viewY, f = i.pathSlice, _ = i.toMoveInsideSlice, b = i.strTransform, w = i.hasTransition, T = i.handleSlicesExit, L = i.makeUpdateSliceInterpolator, A = i.makeUpdateTextInterpolator, I = i.prevEntry, P = u._context.staticPlot, S = u._fullLayout, E = o[0].trace, R = E.textposition.indexOf("left") !== -1, z = E.textposition.indexOf("right") !== -1, j = E.textposition.indexOf("bottom") !== -1, H = !j && !E.marker.pad.t || j && !E.marker.pad.b, Y = e(h, [p, c], { packing: E.tiling.packing, squarifyratio: E.tiling.squarifyratio, flipX: E.tiling.flip.indexOf("x") > -1, flipY: E.tiling.flip.indexOf("y") > -1, pad: { inner: E.tiling.pad, top: E.marker.pad.t, left: E.marker.pad.l, right: E.marker.pad.r, bottom: E.marker.pad.b } }).descendants(), J = 1 / 0, W = -1 / 0;
        Y.forEach(function(U) {
          var ee = U.depth;
          ee >= E._maxDepth ? (U.x0 = U.x1 = (U.x0 + U.x1) / 2, U.y0 = U.y1 = (U.y0 + U.y1) / 2) : (J = Math.min(J, ee), W = Math.max(W, ee));
        }), l = l.data(Y, s.getPtId), E._maxVisibleLayers = isFinite(W) ? W - J + 1 : 0, l.enter().append("g").classed("slice", !0), T(l, !1, {}, [p, c], f), l.order();
        var Z = null;
        if (w && I) {
          var re = s.getPtId(I);
          l.each(function(U) {
            Z === null && s.getPtId(U) === re && (Z = { x0: U.x0, x1: U.x1, y0: U.y0, y1: U.y1 });
          });
        }
        var V = function() {
          return Z || { x0: 0, x1: p, y0: 0, y1: c };
        }, B = l;
        return w && (B = B.transition().each("end", function() {
          var U = m.select(this);
          s.setSliceCursor(U, u, { hideOnRoot: !0, hideOnLeaves: !1, isTransitioning: !1 });
        })), B.each(function(U) {
          var ee = s.isHeader(U, E);
          U._x0 = a(U.x0), U._x1 = a(U.x1), U._y0 = y(U.y0), U._y1 = y(U.y1), U._hoverX = a(U.x1 - E.marker.pad.r), U._hoverY = y(j ? U.y1 - E.marker.pad.b / 2 : U.y0 + E.marker.pad.t / 2);
          var N = m.select(this), K = g.ensureSingle(N, "path", "surface", function(le) {
            le.style("pointer-events", P ? "none" : "all");
          });
          w ? K.transition().attrTween("d", function(le) {
            var oe = L(le, !1, V(), [p, c]);
            return function(ve) {
              return f(oe(ve));
            };
          }) : K.attr("d", f), N.call(t, h, u, o, { styleOne: r, eventDataKeys: n.eventDataKeys, transitionTime: n.CLICK_TRANSITION_TIME, transitionEasing: n.CLICK_TRANSITION_EASING }).call(s.setSliceCursor, u, { isTransitioning: u._transitioning }), K.call(r, U, E, { hovered: !1 }), U.x0 === U.x1 || U.y0 === U.y1 ? U._text = "" : U._text = ee ? H ? "" : s.getPtLabel(U) || "" : d(U, h, E, o, S) || "";
          var X = g.ensureSingle(N, "g", "slicetext"), te = g.ensureSingle(X, "text", "", function(le) {
            le.attr("data-notex", 1);
          }), ie = g.ensureUniformFontSize(u, s.determineTextFont(E, U, S.font));
          te.text(U._text || " ").classed("slicetext", !0).attr("text-anchor", z ? "end" : R || ee ? "start" : "middle").call(k.font, ie).call(x.convertToTspans, u), U.textBB = k.bBox(te.node()), U.transform = _(U, { fontSize: ie.size, isHeader: ee }), U.transform.fontSize = ie.size, w ? te.transition().attrTween("transform", function(le) {
            var oe = A(le, !1, V(), [p, c]);
            return function(ve) {
              return b(oe(ve));
            };
          }) : te.attr("transform", b(U));
        }), Z;
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../../lib/svg_text_utils": 541, "../sunburst/fx": 1063, "../sunburst/helpers": 1064, "../sunburst/plot": 1068, "./constants": 1087, "./partition": 1096, "./style": 1099, "@plotly/d3": 58 }], 1092: [function(v, Q, $) {
      Q.exports = function m(g, k, x) {
        var e;
        x.swapXY && (e = g.x0, g.x0 = g.y0, g.y0 = e, e = g.x1, g.x1 = g.y1, g.y1 = e), x.flipX && (e = g.x0, g.x0 = k[0] - g.x1, g.x1 = k[0] - e), x.flipY && (e = g.y0, g.y0 = k[1] - g.y1, g.y1 = k[1] - e);
        var r = g.children;
        if (r)
          for (var n = 0; n < r.length; n++)
            m(r[n], k, x);
      };
    }, {}], 1093: [function(v, Q, $) {
      Q.exports = { moduleType: "trace", name: "treemap", basePlotModule: v("./base_plot"), categories: [], animatable: !0, attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults"), supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc").calc, crossTraceCalc: v("./calc").crossTraceCalc, plot: v("./plot"), style: v("./style").style, colorbar: v("../scatter/marker_colorbar"), meta: {} };
    }, { "../scatter/marker_colorbar": 954, "./attributes": 1084, "./base_plot": 1085, "./calc": 1086, "./defaults": 1088, "./layout_attributes": 1094, "./layout_defaults": 1095, "./plot": 1097, "./style": 1099 }], 1094: [function(v, Q, $) {
      Q.exports = { treemapcolorway: { valType: "colorlist", editType: "calc" }, extendtreemapcolors: { valType: "boolean", dflt: !0, editType: "calc" } };
    }, {}], 1095: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x) {
        function e(r, n) {
          return m.coerce(k, x, g, r, n);
        }
        e("treemapcolorway", x.colorway), e("extendtreemapcolors");
      };
    }, { "../../lib": 515, "./layout_attributes": 1094 }], 1096: [function(v, Q, $) {
      var m = v("d3-hierarchy"), g = v("./flip_tree");
      Q.exports = function(k, x, e) {
        var r, n = e.flipX, s = e.flipY, t = e.packing === "dice-slice", d = e.pad[s ? "bottom" : "top"], u = e.pad[n ? "right" : "left"], o = e.pad[n ? "left" : "right"], h = e.pad[s ? "top" : "bottom"];
        t && (r = u, u = d, d = r, r = o, o = h, h = r);
        var l = m.treemap().tile(function(i, p) {
          switch (i) {
            case "squarify":
              return m.treemapSquarify.ratio(p);
            case "binary":
              return m.treemapBinary;
            case "dice":
              return m.treemapDice;
            case "slice":
              return m.treemapSlice;
            default:
              return m.treemapSliceDice;
          }
        }(e.packing, e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(u).paddingRight(o).paddingTop(d).paddingBottom(h).size(t ? [x[1], x[0]] : x)(k);
        return (t || n || s) && g(l, x, { swapXY: t, flipX: n, flipY: s }), l;
      };
    }, { "./flip_tree": 1092, "d3-hierarchy": 115 }], 1097: [function(v, Q, $) {
      var m = v("./draw"), g = v("./draw_descendants");
      Q.exports = function(k, x, e, r) {
        return m(k, x, e, r, { type: "treemap", drawDescendants: g });
      };
    }, { "./draw": 1089, "./draw_descendants": 1091 }], 1098: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("d3-interpolate").interpolate, k = v("../sunburst/helpers"), x = v("../../lib"), e = v("../bar/constants").TEXTPAD, r = v("../bar/plot").toMoveInsideBar, n = v("../bar/uniform_text").recordMinTextSize, s = v("./constants"), t = v("./draw_ancestors");
      function d(u) {
        return k.isHierarchyRoot(u) ? "" : k.getPtId(u);
      }
      Q.exports = function(u, o, h, l, i) {
        var p = u._fullLayout, c = o[0], a = c.trace, y = a.type === "icicle", f = c.hierarchy, _ = k.findEntryWithLevel(f, a.level), b = m.select(h), w = b.selectAll("g.pathbar"), T = b.selectAll("g.slice");
        if (!_)
          return w.remove(), void T.remove();
        var L = k.isHierarchyRoot(_), A = !p.uniformtext.mode && k.hasTransition(l), I = k.getMaxDepth(a), P = p._size, S = a.domain, E = P.w * (S.x[1] - S.x[0]), R = P.h * (S.y[1] - S.y[0]), z = E, j = a.pathbar.thickness, H = a.marker.line.width + s.gapWithPathbar, Y = a.pathbar.visible ? a.pathbar.side.indexOf("bottom") > -1 ? R + H : -(j + H) : 0, J = { x0: z, x1: z, y0: Y, y1: Y + j }, W = function(Me, ze, Ie) {
          var Oe = a.tiling.pad, Ze = function(Ge) {
            return Ge - Oe <= ze.x0;
          }, Fe = function(Ge) {
            return Ge + Oe >= ze.x1;
          }, Pe = function(Ge) {
            return Ge - Oe <= ze.y0;
          }, De = function(Ge) {
            return Ge + Oe >= ze.y1;
          };
          return Me.x0 === ze.x0 && Me.x1 === ze.x1 && Me.y0 === ze.y0 && Me.y1 === ze.y1 ? { x0: Me.x0, x1: Me.x1, y0: Me.y0, y1: Me.y1 } : { x0: Ze(Me.x0 - Oe) ? 0 : Fe(Me.x0 - Oe) ? Ie[0] : Me.x0, x1: Ze(Me.x1 + Oe) ? 0 : Fe(Me.x1 + Oe) ? Ie[0] : Me.x1, y0: Pe(Me.y0 - Oe) ? 0 : De(Me.y0 - Oe) ? Ie[1] : Me.y0, y1: Pe(Me.y1 + Oe) ? 0 : De(Me.y1 + Oe) ? Ie[1] : Me.y1 };
        }, Z = null, re = {}, V = {}, B = null, U = function(Me, ze) {
          return ze ? re[d(Me)] : V[d(Me)];
        }, ee = function(Me, ze, Ie, Oe) {
          if (ze)
            return re[d(f)] || J;
          var Ze = V[a.level] || Ie;
          return function(Fe) {
            return Fe.data.depth - _.data.depth < I;
          }(Me) ? W(Me, Ze, Oe) : {};
        };
        c.hasMultipleRoots && L && I++, a._maxDepth = I, a._backgroundColor = p.paper_bgcolor, a._entryDepth = _.data.depth, a._atRootLevel = L;
        var N = -E / 2 + P.l + P.w * (S.x[1] + S.x[0]) / 2, K = -R / 2 + P.t + P.h * (1 - (S.y[1] + S.y[0]) / 2), X = function(Me) {
          return N + Me;
        }, te = function(Me) {
          return K + Me;
        }, ie = te(0), le = X(0), oe = function(Me) {
          return le + Me;
        }, ve = function(Me) {
          return ie + Me;
        };
        function ue(Me, ze) {
          return Me + "," + ze;
        }
        var ye = oe(0), Ae = function(Me) {
          Me.x = Math.max(ye, Me.x);
        }, pe = a.pathbar.edgeshape, ge = function(Me, ze) {
          var Ie = Me.x0, Oe = Me.x1, Ze = Me.y0, Fe = Me.y1, Pe = Me.textBB, De = function(mt) {
            return a.textposition.indexOf(mt) !== -1;
          }, Ge = De("bottom"), Qe = De("top") || ze.isHeader && !Ge ? "start" : Ge ? "end" : "middle", ot = De("right"), vt = De("left") || ze.onPathbar ? -1 : ot ? 1 : 0, bt = a[y ? "tiling" : "marker"].pad;
          if (ze.isHeader) {
            if ((Ie += (y ? bt : bt.l) - e) >= (Oe -= (y ? bt : bt.r) - e)) {
              var yt = (Ie + Oe) / 2;
              Ie = yt, Oe = yt;
            }
            var tt;
            Ge ? Ze < (tt = Fe - (y ? bt : bt.b)) && tt < Fe && (Ze = tt) : Ze < (tt = Ze + (y ? bt : bt.t)) && tt < Fe && (Fe = tt);
          }
          var Ke = r(Ie, Oe, Ze, Fe, Pe, { isHorizontal: !1, constrained: !0, angle: 0, anchor: Qe, leftToRight: vt });
          return Ke.fontSize = ze.fontSize, Ke.targetX = X(Ke.targetX), Ke.targetY = te(Ke.targetY), isNaN(Ke.targetX) || isNaN(Ke.targetY) ? {} : (Ie !== Oe && Ze !== Fe && n(a.type, Ke, p), { scale: Ke.scale, rotate: Ke.rotate, textX: Ke.textX, textY: Ke.textY, anchorX: Ke.anchorX, anchorY: Ke.anchorY, targetX: Ke.targetX, targetY: Ke.targetY });
        }, we = function(Me, ze) {
          for (var Ie, Oe = 0, Ze = Me; !Ie && Oe < I; )
            Oe++, (Ze = Ze.parent) ? Ie = U(Ze, ze) : Oe = I;
          return Ie || {};
        }, se = function(Me, ze, Ie, Oe, Ze) {
          var Fe, Pe = U(Me, ze);
          if (Pe)
            Fe = Pe;
          else if (ze)
            Fe = J;
          else if (Z)
            if (Me.parent) {
              var De = B || Ie;
              De && !ze ? Fe = W(Me, De, Oe) : (Fe = {}, x.extendFlat(Fe, we(Me, ze)));
            } else
              Fe = x.extendFlat({}, Me), y && (Ze.orientation === "h" ? Ze.flipX ? Fe.x0 = Me.x1 : Fe.x1 = 0 : Ze.flipY ? Fe.y0 = Me.y1 : Fe.y1 = 0);
          else
            Fe = {};
          return g(Fe, { x0: Me.x0, x1: Me.x1, y0: Me.y0, y1: Me.y1 });
        }, de = function(Me, ze, Ie, Oe) {
          var Ze = U(Me, ze), Fe = {}, Pe = ee(Me, ze, Ie, Oe);
          x.extendFlat(Fe, { transform: ge({ x0: Pe.x0, x1: Pe.x1, y0: Pe.y0, y1: Pe.y1, textBB: Me.textBB, _text: Me._text }, { isHeader: k.isHeader(Me, a) }) }), Ze ? Fe = Ze : Me.parent && x.extendFlat(Fe, we(Me, ze));
          var De = Me.transform;
          return Me.x0 !== Me.x1 && Me.y0 !== Me.y1 && n(a.type, De, p), g(Fe, { transform: { scale: De.scale, rotate: De.rotate, textX: De.textX, textY: De.textY, anchorX: De.anchorX, anchorY: De.anchorY, targetX: De.targetX, targetY: De.targetY } });
        }, Te = function(Me, ze, Ie, Oe, Ze) {
          var Fe = Oe[0], Pe = Oe[1];
          A ? Me.exit().transition().each(function() {
            var De = m.select(this);
            De.select("path.surface").transition().attrTween("d", function(Ge) {
              var Qe = function(ot, vt, bt, yt) {
                var tt, Ke = U(ot, vt);
                if (vt)
                  tt = J;
                else {
                  var mt = U(_, vt);
                  tt = mt ? W(ot, mt, yt) : {};
                }
                return g(Ke, tt);
              }(Ge, ze, 0, [Fe, Pe]);
              return function(ot) {
                return Ze(Qe(ot));
              };
            }), De.select("g.slicetext").attr("opacity", 0);
          }).remove() : Me.exit().remove();
        }, Ee = function(Me) {
          var ze = Me.transform;
          return Me.x0 !== Me.x1 && Me.y0 !== Me.y1 && n(a.type, ze, p), x.getTextTransform({ textX: ze.textX, textY: ze.textY, anchorX: ze.anchorX, anchorY: ze.anchorY, targetX: ze.targetX, targetY: ze.targetY, scale: ze.scale, rotate: ze.rotate });
        };
        A && (w.each(function(Me) {
          re[d(Me)] = { x0: Me.x0, x1: Me.x1, y0: Me.y0, y1: Me.y1 }, Me.transform && (re[d(Me)].transform = { textX: Me.transform.textX, textY: Me.transform.textY, anchorX: Me.transform.anchorX, anchorY: Me.transform.anchorY, targetX: Me.transform.targetX, targetY: Me.transform.targetY, scale: Me.transform.scale, rotate: Me.transform.rotate });
        }), T.each(function(Me) {
          V[d(Me)] = { x0: Me.x0, x1: Me.x1, y0: Me.y0, y1: Me.y1 }, Me.transform && (V[d(Me)].transform = { textX: Me.transform.textX, textY: Me.transform.textY, anchorX: Me.transform.anchorX, anchorY: Me.transform.anchorY, targetX: Me.transform.targetX, targetY: Me.transform.targetY, scale: Me.transform.scale, rotate: Me.transform.rotate }), !Z && k.isEntry(Me) && (Z = Me);
        })), B = i(u, o, _, T, { width: E, height: R, viewX: X, viewY: te, pathSlice: function(Me) {
          var ze = X(Me.x0), Ie = X(Me.x1), Oe = te(Me.y0), Ze = te(Me.y1), Fe = Ie - ze, Pe = Ze - Oe;
          return !Fe || !Pe ? "" : "M" + ue(ze, Oe + 0) + "L" + ue(Ie - 0, Oe) + "L" + ue(Ie, Ze - 0) + "L" + ue(ze + 0, Ze) + "Z";
        }, toMoveInsideSlice: ge, prevEntry: Z, makeUpdateSliceInterpolator: se, makeUpdateTextInterpolator: de, handleSlicesExit: Te, hasTransition: A, strTransform: Ee }), a.pathbar.visible ? t(u, o, _, w, { barDifY: Y, width: z, height: j, viewX: oe, viewY: ve, pathSlice: function(Me) {
          var ze = oe(Math.max(Math.min(Me.x0, Me.x0), 0)), Ie = oe(Math.min(Math.max(Me.x1, Me.x1), z)), Oe = ve(Me.y0), Ze = ve(Me.y1), Fe = j / 2, Pe = {}, De = {};
          Pe.x = ze, De.x = Ie, Pe.y = De.y = (Oe + Ze) / 2;
          var Ge = { x: ze, y: Oe }, Qe = { x: Ie, y: Oe }, ot = { x: Ie, y: Ze }, vt = { x: ze, y: Ze };
          return pe === ">" ? (Ge.x -= Fe, Qe.x -= Fe, ot.x -= Fe, vt.x -= Fe) : pe === "/" ? (ot.x -= Fe, vt.x -= Fe, Pe.x -= Fe / 2, De.x -= Fe / 2) : pe === "\\" ? (Ge.x -= Fe, Qe.x -= Fe, Pe.x -= Fe / 2, De.x -= Fe / 2) : pe === "<" && (Pe.x -= Fe, De.x -= Fe), Ae(Ge), Ae(vt), Ae(Pe), Ae(Qe), Ae(ot), Ae(De), "M" + ue(Ge.x, Ge.y) + "L" + ue(Qe.x, Qe.y) + "L" + ue(De.x, De.y) + "L" + ue(ot.x, ot.y) + "L" + ue(vt.x, vt.y) + "L" + ue(Pe.x, Pe.y) + "Z";
        }, toMoveInsideSlice: ge, makeUpdateSliceInterpolator: se, makeUpdateTextInterpolator: de, handleSlicesExit: Te, hasTransition: A, strTransform: Ee }) : w.remove();
      };
    }, { "../../lib": 515, "../bar/constants": 659, "../bar/plot": 668, "../bar/uniform_text": 673, "../sunburst/helpers": 1064, "./constants": 1087, "./draw_ancestors": 1090, "@plotly/d3": 58, "d3-interpolate": 116 }], 1099: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../../lib"), x = v("../sunburst/helpers"), e = v("../bar/uniform_text").resizeText;
      function r(n, s, t, d) {
        var u, o, h = (d || {}).hovered, l = s.data.data, i = l.i, p = l.color, c = x.isHierarchyRoot(s), a = 1;
        if (h)
          u = t._hovered.marker.line.color, o = t._hovered.marker.line.width;
        else if (c && p === t.root.color)
          a = 100, u = "rgba(0,0,0,0)", o = 0;
        else if (u = k.castOption(t, i, "marker.line.color") || g.defaultLine, o = k.castOption(t, i, "marker.line.width") || 0, !t._hasColorscale && !s.onPathbar) {
          var y = t.marker.depthfade;
          if (y) {
            var f, _ = g.combine(g.addOpacity(t._backgroundColor, 0.75), p);
            if (y === !0) {
              var b = x.getMaxDepth(t);
              f = isFinite(b) ? x.isLeaf(s) ? 0 : t._maxVisibleLayers - (s.data.depth - t._entryDepth) : s.data.height + 1;
            } else
              f = s.data.depth - t._entryDepth, t._atRootLevel || f++;
            if (f > 0)
              for (var w = 0; w < f; w++) {
                var T = 0.5 * w / f;
                p = g.combine(g.addOpacity(_, T), p);
              }
          }
        }
        n.style("stroke-width", o).call(g.fill, p).call(g.stroke, u).style("opacity", a);
      }
      Q.exports = { style: function(n) {
        var s = n._fullLayout._treemaplayer.selectAll(".trace");
        e(n, s, "treemap"), s.each(function(t) {
          var d = m.select(this), u = t[0].trace;
          d.style("opacity", u.opacity), d.selectAll("path.surface").each(function(o) {
            m.select(this).call(r, o, u, { hovered: !1 });
          });
        });
      }, styleOne: r };
    }, { "../../components/color": 367, "../../lib": 515, "../bar/uniform_text": 673, "../sunburst/helpers": 1064, "@plotly/d3": 58 }], 1100: [function(v, Q, $) {
      var m = v("../box/attributes"), g = v("../../lib/extend").extendFlat, k = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat;
      Q.exports = { y: m.y, x: m.x, x0: m.x0, y0: m.y0, xhoverformat: k("x"), yhoverformat: k("y"), name: g({}, m.name, {}), orientation: g({}, m.orientation, {}), bandwidth: { valType: "number", min: 0, editType: "calc" }, scalegroup: { valType: "string", dflt: "", editType: "calc" }, scalemode: { valType: "enumerated", values: ["width", "count"], dflt: "width", editType: "calc" }, spanmode: { valType: "enumerated", values: ["soft", "hard", "manual"], dflt: "soft", editType: "calc" }, span: { valType: "info_array", items: [{ valType: "any", editType: "calc" }, { valType: "any", editType: "calc" }], editType: "calc" }, line: { color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, dflt: 2, editType: "style" }, editType: "plot" }, fillcolor: m.fillcolor, points: g({}, m.boxpoints, {}), jitter: g({}, m.jitter, {}), pointpos: g({}, m.pointpos, {}), width: g({}, m.width, {}), marker: m.marker, text: m.text, hovertext: m.hovertext, hovertemplate: m.hovertemplate, quartilemethod: m.quartilemethod, box: { visible: { valType: "boolean", dflt: !1, editType: "plot" }, width: { valType: "number", min: 0, max: 1, dflt: 0.25, editType: "plot" }, fillcolor: { valType: "color", editType: "style" }, line: { color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, editType: "style" }, editType: "style" }, editType: "plot" }, meanline: { visible: { valType: "boolean", dflt: !1, editType: "plot" }, color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, editType: "style" }, editType: "plot" }, side: { valType: "enumerated", values: ["both", "positive", "negative"], dflt: "both", editType: "calc" }, offsetgroup: m.offsetgroup, alignmentgroup: m.alignmentgroup, selected: m.selected, unselected: m.unselected, hoveron: { valType: "flaglist", flags: ["violins", "points", "kde"], dflt: "violins+points+kde", extras: ["all"], editType: "style" } };
    }, { "../../lib/extend": 505, "../../plots/cartesian/axis_format_attributes": 569, "../box/attributes": 682 }], 1101: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../plots/cartesian/axes"), k = v("../box/calc"), x = v("./helpers"), e = v("../../constants/numerical").BADNUM;
      function r(s, t, d) {
        var u = t.max - t.min;
        if (!u)
          return s.bandwidth ? s.bandwidth : 0;
        if (s.bandwidth)
          return Math.max(s.bandwidth, u / 1e4);
        var o = d.length, h = m.stdev(d, o - 1, t.mean);
        return Math.max(function(l, i, p) {
          return 1.059 * Math.min(i, p / 1.349) * Math.pow(l, -0.2);
        }(o, h, t.q3 - t.q1), u / 100);
      }
      function n(s, t, d, u) {
        var o, h = s.spanmode, l = s.span || [], i = [t.min, t.max], p = [t.min - 2 * u, t.max + 2 * u];
        function c(y) {
          var f = l[y], _ = d.type === "multicategory" ? d.r2c(f) : d.d2c(f, 0, s[t.valLetter + "calendar"]);
          return _ === e ? p[y] : _;
        }
        var a = { type: "linear", range: o = h === "soft" ? p : h === "hard" ? i : [c(0), c(1)] };
        return g.setConvert(a), a.cleanRange(), o;
      }
      Q.exports = function(s, t) {
        var d = k(s, t);
        if (d[0].t.empty)
          return d;
        for (var u = s._fullLayout, o = g.getFromId(s, t[t.orientation === "h" ? "xaxis" : "yaxis"]), h = 1 / 0, l = -1 / 0, i = 0, p = 0, c = 0; c < d.length; c++) {
          var a = d[c], y = a.pts.map(x.extractVal), f = a.bandwidth = r(t, a, y), _ = a.span = n(t, a, o, f);
          if (a.min === a.max && f === 0)
            _ = a.span = [a.min, a.max], a.density = [{ v: 1, t: _[0] }], a.bandwidth = f, i = Math.max(i, 1);
          else {
            var b = _[1] - _[0], w = Math.ceil(b / (f / 3)), T = b / w;
            if (!isFinite(T) || !isFinite(w))
              return m.error("Something went wrong with computing the violin span"), d[0].t.empty = !0, d;
            var L = x.makeKDE(a, t, y);
            a.density = new Array(w);
            for (var A = 0, I = _[0]; I < _[1] + T / 2; A++, I += T) {
              var P = L(I);
              a.density[A] = { v: P, t: I }, i = Math.max(i, P);
            }
          }
          p = Math.max(p, y.length), h = Math.min(h, _[0]), l = Math.max(l, _[1]);
        }
        var S = g.findExtremes(o, [h, l], { padded: !0 });
        if (t._extremes[o._id] = S, t.width)
          d[0].t.maxKDE = i;
        else {
          var E = u._violinScaleGroupStats, R = t.scalegroup, z = E[R];
          z ? (z.maxKDE = Math.max(z.maxKDE, i), z.maxCount = Math.max(z.maxCount, p)) : E[R] = { maxKDE: i, maxCount: p };
        }
        return d[0].t.labels.kde = m._(s, "kde:"), d;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/axes": 566, "../box/calc": 683, "./helpers": 1104 }], 1102: [function(v, Q, $) {
      var m = v("../box/cross_trace_calc").setPositionOffset, g = ["v", "h"];
      Q.exports = function(k, x) {
        for (var e = k.calcdata, r = x.xaxis, n = x.yaxis, s = 0; s < g.length; s++) {
          for (var t = g[s], d = t === "h" ? n : r, u = [], o = 0; o < e.length; o++) {
            var h = e[o], l = h[0].t, i = h[0].trace;
            i.visible !== !0 || i.type !== "violin" || l.empty || i.orientation !== t || i.xaxis !== r._id || i.yaxis !== n._id || u.push(o);
          }
          m("violin", k, u, d);
        }
      };
    }, { "../box/cross_trace_calc": 684 }], 1103: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../../components/color"), k = v("../box/defaults"), x = v("./attributes");
      Q.exports = function(e, r, n, s) {
        function t(b, w) {
          return m.coerce(e, r, x, b, w);
        }
        function d(b, w) {
          return m.coerce2(e, r, x, b, w);
        }
        if (k.handleSampleDefaults(e, r, t, s), r.visible !== !1) {
          t("bandwidth"), t("side"), t("width") || (t("scalegroup", r.name), t("scalemode"));
          var u, o = t("span");
          Array.isArray(o) && (u = "manual"), t("spanmode", u);
          var h = t("line.color", (e.marker || {}).color || n), l = t("line.width"), i = t("fillcolor", g.addOpacity(r.line.color, 0.5));
          k.handlePointsDefaults(e, r, t, { prefix: "" });
          var p = d("box.width"), c = d("box.fillcolor", i), a = d("box.line.color", h), y = d("box.line.width", l);
          t("box.visible", Boolean(p || c || a || y)) || (r.box = { visible: !1 });
          var f = d("meanline.color", h), _ = d("meanline.width", l);
          t("meanline.visible", Boolean(f || _)) || (r.meanline = { visible: !1 }), t("quartilemethod");
        }
      };
    }, { "../../components/color": 367, "../../lib": 515, "../box/defaults": 685, "./attributes": 1100 }], 1104: [function(v, Q, $) {
      var m = v("../../lib"), g = function(k) {
        return 1 / Math.sqrt(2 * Math.PI) * Math.exp(-0.5 * k * k);
      };
      $.makeKDE = function(k, x, e) {
        var r = e.length, n = g, s = k.bandwidth, t = 1 / (r * s);
        return function(d) {
          for (var u = 0, o = 0; o < r; o++)
            u += n((d - e[o]) / s);
          return t * u;
        };
      }, $.getPositionOnKdePath = function(k, x, e) {
        var r, n;
        x.orientation === "h" ? (r = "y", n = "x") : (r = "x", n = "y");
        var s = m.findPointOnPath(k.path, e, n, { pathLength: k.pathLength }), t = k.posCenterPx, d = s[r];
        return [d, x.side === "both" ? 2 * t - d : t];
      }, $.getKdeValue = function(k, x, e) {
        var r = k.pts.map($.extractVal);
        return $.makeKDE(k, x, r)(e) / k.posDensityScale;
      }, $.extractVal = function(k) {
        return k.v;
      };
    }, { "../../lib": 515 }], 1105: [function(v, Q, $) {
      var m = v("../../components/color"), g = v("../../lib"), k = v("../../plots/cartesian/axes"), x = v("../box/hover"), e = v("./helpers");
      Q.exports = function(r, n, s, t, d) {
        d || (d = {});
        var u, o, h = d.hoverLayer, l = r.cd, i = l[0].trace, p = i.hoveron, c = p.indexOf("violins") !== -1, a = p.indexOf("kde") !== -1, y = [];
        if (c || a) {
          var f = x.hoverOnBoxes(r, n, s, t);
          if (a && f.length > 0) {
            var _, b, w, T, L, A = r.xa, I = r.ya;
            i.orientation === "h" ? (L = n, _ = "y", w = I, b = "x", T = A) : (L = s, _ = "x", w = A, b = "y", T = I);
            var P = l[r.index];
            if (L >= P.span[0] && L <= P.span[1]) {
              var S = g.extendFlat({}, r), E = T.c2p(L, !0), R = e.getKdeValue(P, i, L), z = e.getPositionOnKdePath(P, i, E), j = w._offset, H = w._length;
              S[_ + "0"] = z[0], S[_ + "1"] = z[1], S[b + "0"] = S[b + "1"] = E, S[b + "Label"] = b + ": " + k.hoverLabelText(T, L, i[b + "hoverformat"]) + ", " + l[0].t.labels.kde + " " + R.toFixed(3);
              for (var Y = 0, J = 0; J < f.length; J++)
                if (f[J].attr === "med") {
                  Y = J;
                  break;
                }
              S.spikeDistance = f[Y].spikeDistance;
              var W = _ + "Spike";
              S[W] = f[Y][W], f[Y].spikeDistance = void 0, f[Y][W] = void 0, S.hovertemplate = !1, y.push(S), (o = {})[_ + "1"] = g.constrain(j + z[0], j, j + H), o[_ + "2"] = g.constrain(j + z[1], j, j + H), o[b + "1"] = o[b + "2"] = T._offset + E;
            }
          }
          c && (y = y.concat(f));
        }
        p.indexOf("points") !== -1 && (u = x.hoverOnPoints(r, n, s));
        var Z = h.selectAll(".violinline-" + i.uid).data(o ? [0] : []);
        return Z.enter().append("line").classed("violinline-" + i.uid, !0).attr("stroke-width", 1.5), Z.exit().remove(), Z.attr(o).call(m.stroke, r.color), t === "closest" ? u ? [u] : y : (u && y.push(u), y);
      };
    }, { "../../components/color": 367, "../../lib": 515, "../../plots/cartesian/axes": 566, "../box/hover": 687, "./helpers": 1104 }], 1106: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults"), crossTraceDefaults: v("../box/defaults").crossTraceDefaults, supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc"), crossTraceCalc: v("./cross_trace_calc"), plot: v("./plot"), style: v("./style"), styleOnSelect: v("../scatter/style").styleOnSelect, hoverPoints: v("./hover"), selectPoints: v("../box/select"), moduleType: "trace", name: "violin", basePlotModule: v("../../plots/cartesian"), categories: ["cartesian", "svg", "symbols", "oriented", "box-violin", "showLegend", "violinLayout", "zoomScale"], meta: {} };
    }, { "../../plots/cartesian": 578, "../box/defaults": 685, "../box/select": 692, "../scatter/style": 960, "./attributes": 1100, "./calc": 1101, "./cross_trace_calc": 1102, "./defaults": 1103, "./hover": 1105, "./layout_attributes": 1107, "./layout_defaults": 1108, "./plot": 1109, "./style": 1110 }], 1107: [function(v, Q, $) {
      var m = v("../box/layout_attributes"), g = v("../../lib").extendFlat;
      Q.exports = { violinmode: g({}, m.boxmode, {}), violingap: g({}, m.boxgap, {}), violingroupgap: g({}, m.boxgroupgap, {}) };
    }, { "../../lib": 515, "../box/layout_attributes": 689 }], 1108: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes"), k = v("../box/layout_defaults");
      Q.exports = function(x, e, r) {
        k._supply(x, e, r, function(n, s) {
          return m.coerce(x, e, g, n, s);
        }, "violin");
      };
    }, { "../../lib": 515, "../box/layout_defaults": 690, "./layout_attributes": 1107 }], 1109: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../box/plot"), e = v("../scatter/line_points"), r = v("./helpers");
      Q.exports = function(n, s, t, d) {
        var u = n._fullLayout, o = s.xaxis, h = s.yaxis;
        function l(i, p) {
          var c = e(i, { xaxis: o, yaxis: h, trace: p, connectGaps: !0, baseTolerance: 0.75, shape: "spline", simplify: !0, linearized: !0 });
          return k.smoothopen(c[0], 1);
        }
        g.makeTraceGroups(d, t, "trace violins").each(function(i) {
          var p = m.select(this), c = i[0], a = c.t, y = c.trace;
          if (y.visible !== !0 || a.empty)
            p.remove();
          else {
            var f = a.bPos, _ = a.bdPos, b = s[a.valLetter + "axis"], w = s[a.posLetter + "axis"], T = y.side === "both", L = T || y.side === "positive", A = T || y.side === "negative", I = p.selectAll("path.violin").data(g.identity);
            I.enter().append("path").style("vector-effect", "non-scaling-stroke").attr("class", "violin"), I.exit().remove(), I.each(function(Y) {
              var J, W, Z, re, V, B, U, ee, N = m.select(this), K = Y.density, X = K.length, te = w.c2l(Y.pos + f, !0), ie = w.l2p(te);
              if (y.width)
                J = a.maxKDE / _;
              else {
                var le = u._violinScaleGroupStats[y.scalegroup];
                J = y.scalemode === "count" ? le.maxKDE / _ * (le.maxCount / Y.pts.length) : le.maxKDE / _;
              }
              if (L) {
                for (U = new Array(X), V = 0; V < X; V++)
                  (ee = U[V] = {})[a.posLetter] = te + K[V].v / J, ee[a.valLetter] = b.c2l(K[V].t, !0);
                W = l(U, y);
              }
              if (A) {
                for (U = new Array(X), B = 0, V = X - 1; B < X; B++, V--)
                  (ee = U[B] = {})[a.posLetter] = te - K[V].v / J, ee[a.valLetter] = b.c2l(K[V].t, !0);
                Z = l(U, y);
              }
              if (T)
                re = W + "L" + Z.substr(1) + "Z";
              else {
                var oe = [ie, b.c2p(K[0].t)], ve = [ie, b.c2p(K[X - 1].t)];
                y.orientation === "h" && (oe.reverse(), ve.reverse()), re = L ? "M" + oe + "L" + W.substr(1) + "L" + ve : "M" + ve + "L" + Z.substr(1) + "L" + oe;
              }
              N.attr("d", re), Y.posCenterPx = ie, Y.posDensityScale = J * _, Y.path = N.node(), Y.pathLength = Y.path.getTotalLength() / (T ? 2 : 1);
            });
            var P, S, E, R = y.box, z = R.width, j = (R.line || {}).width;
            T ? (P = _ * z, S = 0) : L ? (P = [0, _ * z / 2], S = j * { x: 1, y: -1 }[a.posLetter]) : (P = [_ * z / 2, 0], S = j * { x: -1, y: 1 }[a.posLetter]), x.plotBoxAndWhiskers(p, { pos: w, val: b }, y, { bPos: f, bdPos: P, bPosPxOffset: S }), x.plotBoxMean(p, { pos: w, val: b }, y, { bPos: f, bdPos: P, bPosPxOffset: S }), !y.box.visible && y.meanline.visible && (E = g.identity);
            var H = p.selectAll("path.meanline").data(E || []);
            H.enter().append("path").attr("class", "meanline").style("fill", "none").style("vector-effect", "non-scaling-stroke"), H.exit().remove(), H.each(function(Y) {
              var J = b.c2p(Y.mean, !0), W = r.getPositionOnKdePath(Y, y, J);
              m.select(this).attr("d", y.orientation === "h" ? "M" + J + "," + W[0] + "V" + W[1] : "M" + W[0] + "," + J + "H" + W[1]);
            }), x.plotPoints(p, { x: o, y: h }, y, a);
          }
        });
      };
    }, { "../../components/drawing": 389, "../../lib": 515, "../box/plot": 691, "../scatter/line_points": 950, "./helpers": 1104, "@plotly/d3": 58 }], 1110: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/color"), k = v("../scatter/style").stylePoints;
      Q.exports = function(x) {
        var e = m.select(x).selectAll("g.trace.violins");
        e.style("opacity", function(r) {
          return r[0].trace.opacity;
        }), e.each(function(r) {
          var n = r[0].trace, s = m.select(this), t = n.box || {}, d = t.line || {}, u = n.meanline || {}, o = u.width;
          s.selectAll("path.violin").style("stroke-width", n.line.width + "px").call(g.stroke, n.line.color).call(g.fill, n.fillcolor), s.selectAll("path.box").style("stroke-width", d.width + "px").call(g.stroke, d.color).call(g.fill, t.fillcolor);
          var h = { "stroke-width": o + "px", "stroke-dasharray": 2 * o + "px," + o + "px" };
          s.selectAll("path.mean").style(h).call(g.stroke, u.color), s.selectAll("path.meanline").style(h).call(g.stroke, u.color), k(s, n, x);
        });
      };
    }, { "../../components/color": 367, "../scatter/style": 960, "@plotly/d3": 58 }], 1111: [function(v, Q, $) {
      var m = v("../../components/colorscale/attributes"), g = v("../isosurface/attributes"), k = v("../surface/attributes"), x = v("../../plots/attributes"), e = v("../../lib/extend").extendFlat, r = v("../../plot_api/edit_types").overrideAll, n = Q.exports = r(e({ x: g.x, y: g.y, z: g.z, value: g.value, isomin: g.isomin, isomax: g.isomax, surface: g.surface, spaceframe: { show: { valType: "boolean", dflt: !1 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, slices: g.slices, caps: g.caps, text: g.text, hovertext: g.hovertext, xhoverformat: g.xhoverformat, yhoverformat: g.yhoverformat, zhoverformat: g.zhoverformat, valuehoverformat: g.valuehoverformat, hovertemplate: g.hovertemplate }, m("", { colorAttr: "`value`", showScaleDflt: !0, editTypeOverride: "calc" }), { colorbar: g.colorbar, opacity: g.opacity, opacityscale: k.opacityscale, lightposition: g.lightposition, lighting: g.lighting, flatshading: g.flatshading, contour: g.contour, hoverinfo: e({}, x.hoverinfo), showlegend: e({}, x.showlegend, { dflt: !1 }) }), "calc", "nested");
      n.x.editType = n.y.editType = n.z.editType = n.value.editType = "calc+clearAxisTypes", n.transforms = void 0;
    }, { "../../components/colorscale/attributes": 374, "../../lib/extend": 505, "../../plot_api/edit_types": 548, "../../plots/attributes": 562, "../isosurface/attributes": 871, "../surface/attributes": 1070 }], 1112: [function(v, Q, $) {
      var m = v("../../../stackgl_modules").gl_mesh3d, g = v("../../lib/gl_format_color").parseColorScale, k = v("../../lib/str2rgbarray"), x = v("../../components/colorscale").extractOpts, e = v("../../plots/gl3d/zip3"), r = v("../isosurface/convert").findNearestOnAxis, n = v("../isosurface/convert").generateIsoMeshes;
      function s(d, u, o) {
        this.scene = d, this.uid = o, this.mesh = u, this.name = "", this.data = null, this.showContour = !1;
      }
      var t = s.prototype;
      t.handlePick = function(d) {
        if (d.object === this.mesh) {
          var u = d.data.index, o = this.data._meshX[u], h = this.data._meshY[u], l = this.data._meshZ[u], i = this.data._Ys.length, p = this.data._Zs.length, c = r(o, this.data._Xs).id, a = r(h, this.data._Ys).id, y = r(l, this.data._Zs).id, f = d.index = y + p * a + p * i * c;
          d.traceCoordinate = [this.data._meshX[f], this.data._meshY[f], this.data._meshZ[f], this.data._value[f]];
          var _ = this.data.hovertext || this.data.text;
          return Array.isArray(_) && _[f] !== void 0 ? d.textLabel = _[f] : _ && (d.textLabel = _), !0;
        }
      }, t.update = function(d) {
        var u = this.scene, o = u.fullSceneLayout;
        function h(p, c, a, y) {
          return c.map(function(f) {
            return p.d2l(f, 0, y) * a;
          });
        }
        this.data = n(d);
        var l = { positions: e(h(o.xaxis, d._meshX, u.dataScale[0], d.xcalendar), h(o.yaxis, d._meshY, u.dataScale[1], d.ycalendar), h(o.zaxis, d._meshZ, u.dataScale[2], d.zcalendar)), cells: e(d._meshI, d._meshJ, d._meshK), lightPosition: [d.lightposition.x, d.lightposition.y, d.lightposition.z], ambient: d.lighting.ambient, diffuse: d.lighting.diffuse, specular: d.lighting.specular, roughness: d.lighting.roughness, fresnel: d.lighting.fresnel, vertexNormalsEpsilon: d.lighting.vertexnormalsepsilon, faceNormalsEpsilon: d.lighting.facenormalsepsilon, opacity: d.opacity, opacityscale: d.opacityscale, contourEnable: d.contour.show, contourColor: k(d.contour.color).slice(0, 3), contourWidth: d.contour.width, useFacetNormals: d.flatshading }, i = x(d);
        l.vertexIntensity = d._meshIntensity, l.vertexIntensityBounds = [i.min, i.max], l.colormap = g(d), this.mesh.update(l);
      }, t.dispose = function() {
        this.scene.glplot.remove(this.mesh), this.mesh.dispose();
      }, Q.exports = function(d, u) {
        var o = d.glplot.gl, h = m({ gl: o }), l = new s(d, h, u.uid);
        return h._trace = l, l.update(u), d.glplot.add(h), l;
      };
    }, { "../../../stackgl_modules": 1133, "../../components/colorscale": 379, "../../lib/gl_format_color": 511, "../../lib/str2rgbarray": 540, "../../plots/gl3d/zip3": 618, "../isosurface/convert": 873 }], 1113: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./attributes"), k = v("../isosurface/defaults").supplyIsoDefaults, x = v("../surface/defaults").opacityscaleDefaults;
      Q.exports = function(e, r, n, s) {
        function t(d, u) {
          return m.coerce(e, r, g, d, u);
        }
        k(e, r, n, s, t), x(e, r, s, t);
      };
    }, { "../../lib": 515, "../isosurface/defaults": 874, "../surface/defaults": 1073, "./attributes": 1111 }], 1114: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), supplyDefaults: v("./defaults"), calc: v("../isosurface/calc"), colorbar: { min: "cmin", max: "cmax" }, plot: v("./convert"), moduleType: "trace", name: "volume", basePlotModule: v("../../plots/gl3d"), categories: ["gl3d", "showLegend"], meta: {} };
    }, { "../../plots/gl3d": 607, "../isosurface/calc": 872, "./attributes": 1111, "./convert": 1112, "./defaults": 1113 }], 1115: [function(v, Q, $) {
      var m = v("../bar/attributes"), g = v("../scatter/attributes").line, k = v("../../plots/attributes"), x = v("../../plots/cartesian/axis_format_attributes").axisHoverFormat, e = v("../../plots/template_attributes").hovertemplateAttrs, r = v("../../plots/template_attributes").texttemplateAttrs, n = v("./constants"), s = v("../../lib/extend").extendFlat, t = v("../../components/color");
      function d(u) {
        return { marker: { color: s({}, m.marker.color, { arrayOk: !1, editType: "style" }), line: { color: s({}, m.marker.line.color, { arrayOk: !1, editType: "style" }), width: s({}, m.marker.line.width, { arrayOk: !1, editType: "style" }), editType: "style" }, editType: "style" }, editType: "style" };
      }
      Q.exports = { measure: { valType: "data_array", dflt: [], editType: "calc" }, base: { valType: "number", dflt: null, arrayOk: !1, editType: "calc" }, x: m.x, x0: m.x0, dx: m.dx, y: m.y, y0: m.y0, dy: m.dy, xperiod: m.xperiod, yperiod: m.yperiod, xperiod0: m.xperiod0, yperiod0: m.yperiod0, xperiodalignment: m.xperiodalignment, yperiodalignment: m.yperiodalignment, xhoverformat: x("x"), yhoverformat: x("y"), hovertext: m.hovertext, hovertemplate: e({}, { keys: n.eventDataKeys }), hoverinfo: s({}, k.hoverinfo, { flags: ["name", "x", "y", "text", "initial", "delta", "final"] }), textinfo: { valType: "flaglist", flags: ["label", "text", "initial", "delta", "final"], extras: ["none"], editType: "plot", arrayOk: !1 }, texttemplate: r({ editType: "plot" }, { keys: n.eventDataKeys.concat(["label"]) }), text: m.text, textposition: m.textposition, insidetextanchor: m.insidetextanchor, textangle: m.textangle, textfont: m.textfont, insidetextfont: m.insidetextfont, outsidetextfont: m.outsidetextfont, constraintext: m.constraintext, cliponaxis: m.cliponaxis, orientation: m.orientation, offset: m.offset, width: m.width, increasing: d(), decreasing: d(), totals: d(), connector: { line: { color: s({}, g.color, { dflt: t.defaultLine }), width: s({}, g.width, { editType: "plot" }), dash: g.dash, editType: "plot" }, mode: { valType: "enumerated", values: ["spanning", "between"], dflt: "between", editType: "plot" }, visible: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, offsetgroup: m.offsetgroup, alignmentgroup: m.alignmentgroup };
    }, { "../../components/color": 367, "../../lib/extend": 505, "../../plots/attributes": 562, "../../plots/cartesian/axis_format_attributes": 569, "../../plots/template_attributes": 642, "../bar/attributes": 657, "../scatter/attributes": 936, "./constants": 1117 }], 1116: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes"), g = v("../../plots/cartesian/align_period"), k = v("../../lib").mergeArray, x = v("../scatter/calc_selection"), e = v("../../constants/numerical").BADNUM;
      function r(s) {
        return s === "a" || s === "absolute";
      }
      function n(s) {
        return s === "t" || s === "total";
      }
      Q.exports = function(s, t) {
        var d, u, o, h, l, i, p = m.getFromId(s, t.xaxis || "x"), c = m.getFromId(s, t.yaxis || "y");
        t.orientation === "h" ? (d = p.makeCalcdata(t, "x"), o = c.makeCalcdata(t, "y"), h = g(t, c, "y", o), l = !!t.yperiodalignment, i = "y") : (d = c.makeCalcdata(t, "y"), o = p.makeCalcdata(t, "x"), h = g(t, p, "x", o), l = !!t.xperiodalignment, i = "x"), u = h.vals;
        for (var a, y = Math.min(u.length, d.length), f = new Array(y), _ = 0, b = !1, w = 0; w < y; w++) {
          var T = d[w] || 0, L = !1;
          (d[w] !== e || n(t.measure[w]) || r(t.measure[w])) && w + 1 < y && (d[w + 1] !== e || n(t.measure[w + 1]) || r(t.measure[w + 1])) && (L = !0);
          var A = f[w] = { i: w, p: u[w], s: T, rawS: T, cNext: L };
          r(t.measure[w]) ? (_ = A.s, A.isSum = !0, A.dir = "totals", A.s = _) : n(t.measure[w]) ? (A.isSum = !0, A.dir = "totals", A.s = _) : (A.isSum = !1, A.dir = A.rawS < 0 ? "decreasing" : "increasing", a = A.s, A.s = _ + a, _ += a), A.dir === "totals" && (b = !0), l && (f[w].orig_p = o[w], f[w][i + "End"] = h.ends[w], f[w][i + "Start"] = h.starts[w]), t.ids && (A.id = String(t.ids[w])), A.v = (t.base || 0) + _;
        }
        return f.length && (f[0].hasTotals = b), k(t.text, f, "tx"), k(t.hovertext, f, "htx"), x(f, t), f;
      };
    }, { "../../constants/numerical": 491, "../../lib": 515, "../../plots/cartesian/align_period": 563, "../../plots/cartesian/axes": 566, "../scatter/calc_selection": 938 }], 1117: [function(v, Q, $) {
      Q.exports = { eventDataKeys: ["initial", "delta", "final"] };
    }, {}], 1118: [function(v, Q, $) {
      var m = v("../bar/cross_trace_calc").setGroupPositions;
      Q.exports = function(g, k) {
        var x, e, r = g._fullLayout, n = g._fullData, s = g.calcdata, t = k.xaxis, d = k.yaxis, u = [], o = [], h = [];
        for (e = 0; e < n.length; e++) {
          var l = n[e];
          l.visible === !0 && l.xaxis === t._id && l.yaxis === d._id && l.type === "waterfall" && (x = s[e], l.orientation === "h" ? h.push(x) : o.push(x), u.push(x));
        }
        var i = { mode: r.waterfallmode, norm: r.waterfallnorm, gap: r.waterfallgap, groupgap: r.waterfallgroupgap };
        for (m(g, t, d, o, i), m(g, d, t, h, i), e = 0; e < u.length; e++) {
          x = u[e];
          for (var p = 0; p < x.length; p++) {
            var c = x[p];
            c.isSum === !1 && (c.s0 += p === 0 ? 0 : x[p - 1].s), p + 1 < x.length && (x[p].nextP0 = x[p + 1].p0, x[p].nextS0 = x[p + 1].s0);
          }
        }
      };
    }, { "../bar/cross_trace_calc": 660 }], 1119: [function(v, Q, $) {
      var m = v("../../lib"), g = v("../bar/defaults").handleGroupingDefaults, k = v("../bar/defaults").handleText, x = v("../scatter/xy_defaults"), e = v("../scatter/period_defaults"), r = v("./attributes"), n = v("../../components/color"), s = v("../../constants/delta.js"), t = s.INCREASING.COLOR, d = s.DECREASING.COLOR;
      function u(o, h, l) {
        o(h + ".marker.color", l), o(h + ".marker.line.color", n.defaultLine), o(h + ".marker.line.width");
      }
      Q.exports = { supplyDefaults: function(o, h, l, i) {
        function p(a, y) {
          return m.coerce(o, h, r, a, y);
        }
        if (x(o, h, i, p)) {
          e(o, h, i, p), p("xhoverformat"), p("yhoverformat"), p("measure"), p("orientation", h.x && !h.y ? "h" : "v"), p("base"), p("offset"), p("width"), p("text"), p("hovertext"), p("hovertemplate");
          var c = p("textposition");
          k(o, h, i, p, c, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), h.textposition !== "none" && (p("texttemplate"), h.texttemplate || p("textinfo")), u(p, "increasing", t), u(p, "decreasing", d), u(p, "totals", "#4499FF"), p("connector.visible") && (p("connector.mode"), p("connector.line.width") && (p("connector.line.color"), p("connector.line.dash")));
        } else
          h.visible = !1;
      }, crossTraceDefaults: function(o, h) {
        var l, i;
        function p(a) {
          return m.coerce(i._input, i, r, a);
        }
        if (h.waterfallmode === "group")
          for (var c = 0; c < o.length; c++)
            l = (i = o[c])._input, g(l, i, h, p);
      } };
    }, { "../../components/color": 367, "../../constants/delta.js": 485, "../../lib": 515, "../bar/defaults": 661, "../scatter/period_defaults": 956, "../scatter/xy_defaults": 963, "./attributes": 1115 }], 1120: [function(v, Q, $) {
      Q.exports = function(m, g) {
        return m.x = "xVal" in g ? g.xVal : g.x, m.y = "yVal" in g ? g.yVal : g.y, "initial" in g && (m.initial = g.initial), "delta" in g && (m.delta = g.delta), "final" in g && (m.final = g.final), g.xa && (m.xaxis = g.xa), g.ya && (m.yaxis = g.ya), m;
      };
    }, {}], 1121: [function(v, Q, $) {
      var m = v("../../plots/cartesian/axes").hoverLabelText, g = v("../../components/color").opacity, k = v("../bar/hover").hoverOnBars, x = v("../../constants/delta.js"), e = x.INCREASING.SYMBOL, r = x.DECREASING.SYMBOL;
      Q.exports = function(n, s, t, d, u) {
        var o = k(n, s, t, d, u);
        if (o) {
          var h = o.cd, l = h[0].trace, i = l.orientation === "h", p = i ? "x" : "y", c = i ? n.xa : n.ya, a = h[o.index], y = a.isSum ? a.b + a.s : a.rawS;
          if (!a.isSum) {
            o.initial = a.b + a.s - y, o.delta = y, o.final = o.initial + o.delta;
            var f = A(Math.abs(o.delta));
            o.deltaLabel = y < 0 ? "(" + f + ")" : f, o.finalLabel = A(o.final), o.initialLabel = A(o.initial);
          }
          var _ = a.hi || l.hoverinfo, b = [];
          if (_ && _ !== "none" && _ !== "skip") {
            var w = _ === "all", T = _.split("+"), L = function(I) {
              return w || T.indexOf(I) !== -1;
            };
            a.isSum || (!L("final") || L(i ? "x" : "y") || b.push(o.finalLabel), L("delta") && (y < 0 ? b.push(o.deltaLabel + " " + r) : b.push(o.deltaLabel + " " + e)), L("initial") && b.push("Initial: " + o.initialLabel));
          }
          return b.length && (o.extraText = b.join("<br>")), o.color = function(I, P) {
            var S = I[P.dir].marker, E = S.color, R = S.line.color, z = S.line.width;
            if (g(E))
              return E;
            if (g(R) && z)
              return R;
          }(l, a), [o];
        }
        function A(I) {
          return m(c, I, l[p + "hoverformat"]);
        }
      };
    }, { "../../components/color": 367, "../../constants/delta.js": 485, "../../plots/cartesian/axes": 566, "../bar/hover": 664 }], 1122: [function(v, Q, $) {
      Q.exports = { attributes: v("./attributes"), layoutAttributes: v("./layout_attributes"), supplyDefaults: v("./defaults").supplyDefaults, crossTraceDefaults: v("./defaults").crossTraceDefaults, supplyLayoutDefaults: v("./layout_defaults"), calc: v("./calc"), crossTraceCalc: v("./cross_trace_calc"), plot: v("./plot"), style: v("./style").style, hoverPoints: v("./hover"), eventData: v("./event_data"), selectPoints: v("../bar/select"), moduleType: "trace", name: "waterfall", basePlotModule: v("../../plots/cartesian"), categories: ["bar-like", "cartesian", "svg", "oriented", "showLegend", "zoomScale"], meta: {} };
    }, { "../../plots/cartesian": 578, "../bar/select": 669, "./attributes": 1115, "./calc": 1116, "./cross_trace_calc": 1118, "./defaults": 1119, "./event_data": 1120, "./hover": 1121, "./layout_attributes": 1123, "./layout_defaults": 1124, "./plot": 1125, "./style": 1126 }], 1123: [function(v, Q, $) {
      Q.exports = { waterfallmode: { valType: "enumerated", values: ["group", "overlay"], dflt: "group", editType: "calc" }, waterfallgap: { valType: "number", min: 0, max: 1, editType: "calc" }, waterfallgroupgap: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" } };
    }, {}], 1124: [function(v, Q, $) {
      var m = v("../../lib"), g = v("./layout_attributes");
      Q.exports = function(k, x, e) {
        var r = !1;
        function n(d, u) {
          return m.coerce(k, x, g, d, u);
        }
        for (var s = 0; s < e.length; s++) {
          var t = e[s];
          if (t.visible && t.type === "waterfall") {
            r = !0;
            break;
          }
        }
        r && (n("waterfallmode"), n("waterfallgap", 0.2), n("waterfallgroupgap"));
      };
    }, { "../../lib": 515, "./layout_attributes": 1123 }], 1125: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../lib"), k = v("../../components/drawing"), x = v("../../constants/numerical").BADNUM, e = v("../bar/plot"), r = v("../bar/uniform_text").clearMinTextSize;
      Q.exports = function(n, s, t, d) {
        var u = n._fullLayout;
        r("waterfall", u), e.plot(n, s, t, d, { mode: u.waterfallmode, norm: u.waterfallmode, gap: u.waterfallgap, groupgap: u.waterfallgroupgap }), function(o, h, l, i) {
          var p = h.xaxis, c = h.yaxis;
          g.makeTraceGroups(i, l, "trace bars").each(function(a) {
            var y = m.select(this), f = a[0].trace, _ = g.ensureSingle(y, "g", "lines");
            if (f.connector && f.connector.visible) {
              var b = f.orientation === "h", w = f.connector.mode, T = _.selectAll("g.line").data(g.identity);
              T.enter().append("g").classed("line", !0), T.exit().remove();
              var L = T.size();
              T.each(function(A, I) {
                if (I === L - 1 || A.cNext) {
                  var P = function(z, j, H, Y) {
                    var J = [], W = [], Z = Y ? j : H, re = Y ? H : j;
                    return J[0] = Z.c2p(z.s0, !0), W[0] = re.c2p(z.p0, !0), J[1] = Z.c2p(z.s1, !0), W[1] = re.c2p(z.p1, !0), J[2] = Z.c2p(z.nextS0, !0), W[2] = re.c2p(z.nextP0, !0), Y ? [J, W] : [W, J];
                  }(A, p, c, b), S = P[0], E = P[1], R = "";
                  S[0] !== x && E[0] !== x && S[1] !== x && E[1] !== x && (w === "spanning" && !A.isSum && I > 0 && (R += b ? "M" + S[0] + "," + E[1] + "V" + E[0] : "M" + S[1] + "," + E[0] + "H" + S[0]), w !== "between" && (A.isSum || I < L - 1) && (R += b ? "M" + S[1] + "," + E[0] + "V" + E[1] : "M" + S[0] + "," + E[1] + "H" + S[1]), S[2] !== x && E[2] !== x && (R += b ? "M" + S[1] + "," + E[1] + "V" + E[2] : "M" + S[1] + "," + E[1] + "H" + S[2])), R === "" && (R = "M0,0Z"), g.ensureSingle(m.select(this), "path").attr("d", R).call(k.setClipUrl, h.layerClipId, o);
                }
              });
            } else
              _.remove();
          });
        }(n, s, t, d);
      };
    }, { "../../components/drawing": 389, "../../constants/numerical": 491, "../../lib": 515, "../bar/plot": 668, "../bar/uniform_text": 673, "@plotly/d3": 58 }], 1126: [function(v, Q, $) {
      var m = v("@plotly/d3"), g = v("../../components/drawing"), k = v("../../components/color"), x = v("../../constants/interactions").DESELECTDIM, e = v("../bar/style"), r = v("../bar/uniform_text").resizeText, n = e.styleTextPoints;
      Q.exports = { style: function(s, t, d) {
        var u = d || m.select(s).selectAll("g.waterfalllayer").selectAll("g.trace");
        r(s, u, "waterfall"), u.style("opacity", function(o) {
          return o[0].trace.opacity;
        }), u.each(function(o) {
          var h = m.select(this), l = o[0].trace;
          h.selectAll(".point > path").each(function(i) {
            if (!i.isBlank) {
              var p = l[i.dir].marker;
              m.select(this).call(k.fill, p.color).call(k.stroke, p.line.color).call(g.dashLine, p.line.dash, p.line.width).style("opacity", l.selectedpoints && !i.selected ? x : 1);
            }
          }), n(h, l, s), h.selectAll(".lines").each(function() {
            var i = l.connector.line;
            g.lineGroupStyle(m.select(this).selectAll("path"), i.width, i.color, i.dash);
          });
        });
      } };
    }, { "../../components/color": 367, "../../components/drawing": 389, "../../constants/interactions": 490, "../bar/style": 671, "../bar/uniform_text": 673, "@plotly/d3": 58 }], 1127: [function(v, Q, $) {
      var m = v("../plots/cartesian/axes"), g = v("../lib"), k = v("../plot_api/plot_schema"), x = v("./helpers").pointsAccessorFunction, e = v("../constants/numerical").BADNUM;
      $.moduleType = "transform", $.name = "aggregate";
      var r = $.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, groups: { valType: "string", strict: !0, noBlank: !0, arrayOk: !0, dflt: "x", editType: "calc" }, aggregations: { _isLinkedToArray: "aggregation", target: { valType: "string", editType: "calc" }, func: { valType: "enumerated", values: ["count", "sum", "avg", "median", "mode", "rms", "stddev", "min", "max", "first", "last", "change", "range"], dflt: "first", editType: "calc" }, funcmode: { valType: "enumerated", values: ["sample", "population"], dflt: "sample", editType: "calc" }, enabled: { valType: "boolean", dflt: !0, editType: "calc" }, editType: "calc" }, editType: "calc" }, n = r.aggregations;
      function s(o, h, l, i) {
        if (i.enabled) {
          for (var p = i.target, c = g.nestedProperty(h, p), a = c.get(), y = function(b, w) {
            var T = b.func, L = w.d2c, A = w.c2d;
            switch (T) {
              case "count":
                return t;
              case "first":
                return d;
              case "last":
                return u;
              case "sum":
                return function(I, P) {
                  for (var S = 0, E = 0; E < P.length; E++) {
                    var R = L(I[P[E]]);
                    R !== e && (S += R);
                  }
                  return A(S);
                };
              case "avg":
                return function(I, P) {
                  for (var S = 0, E = 0, R = 0; R < P.length; R++) {
                    var z = L(I[P[R]]);
                    z !== e && (S += z, E++);
                  }
                  return E ? A(S / E) : e;
                };
              case "min":
                return function(I, P) {
                  for (var S = 1 / 0, E = 0; E < P.length; E++) {
                    var R = L(I[P[E]]);
                    R !== e && (S = Math.min(S, R));
                  }
                  return S === 1 / 0 ? e : A(S);
                };
              case "max":
                return function(I, P) {
                  for (var S = -1 / 0, E = 0; E < P.length; E++) {
                    var R = L(I[P[E]]);
                    R !== e && (S = Math.max(S, R));
                  }
                  return S === -1 / 0 ? e : A(S);
                };
              case "range":
                return function(I, P) {
                  for (var S = 1 / 0, E = -1 / 0, R = 0; R < P.length; R++) {
                    var z = L(I[P[R]]);
                    z !== e && (S = Math.min(S, z), E = Math.max(E, z));
                  }
                  return E === -1 / 0 || S === 1 / 0 ? e : A(E - S);
                };
              case "change":
                return function(I, P) {
                  var S = L(I[P[0]]), E = L(I[P[P.length - 1]]);
                  return S === e || E === e ? e : A(E - S);
                };
              case "median":
                return function(I, P) {
                  for (var S = [], E = 0; E < P.length; E++) {
                    var R = L(I[P[E]]);
                    R !== e && S.push(R);
                  }
                  if (!S.length)
                    return e;
                  S.sort(g.sorterAsc);
                  var z = (S.length - 1) / 2;
                  return A((S[Math.floor(z)] + S[Math.ceil(z)]) / 2);
                };
              case "mode":
                return function(I, P) {
                  for (var S = {}, E = 0, R = e, z = 0; z < P.length; z++) {
                    var j = L(I[P[z]]);
                    if (j !== e) {
                      var H = S[j] = (S[j] || 0) + 1;
                      H > E && (E = H, R = j);
                    }
                  }
                  return E ? A(R) : e;
                };
              case "rms":
                return function(I, P) {
                  for (var S = 0, E = 0, R = 0; R < P.length; R++) {
                    var z = L(I[P[R]]);
                    z !== e && (S += z * z, E++);
                  }
                  return E ? A(Math.sqrt(S / E)) : e;
                };
              case "stddev":
                return function(I, P) {
                  var S, E = 0, R = 0, z = 1, j = e;
                  for (S = 0; S < P.length && j === e; S++)
                    j = L(I[P[S]]);
                  if (j === e)
                    return e;
                  for (; S < P.length; S++) {
                    var H = L(I[P[S]]);
                    if (H !== e) {
                      var Y = H - j;
                      E += Y, R += Y * Y, z++;
                    }
                  }
                  var J = b.funcmode === "sample" ? z - 1 : z;
                  return J ? Math.sqrt((R - E * E / z) / J) : 0;
                };
            }
          }(i, m.getDataConversions(o, h, p, a)), f = new Array(l.length), _ = 0; _ < l.length; _++)
            f[_] = y(a, l[_]);
          c.set(f), i.func === "count" && g.pushUnique(h._arrayAttrs, p);
        }
      }
      function t(o, h) {
        return h.length;
      }
      function d(o, h) {
        return o[h[0]];
      }
      function u(o, h) {
        return o[h[h.length - 1]];
      }
      $.supplyDefaults = function(o, h) {
        var l, i = {};
        function p(A, I) {
          return g.coerce(o, i, r, A, I);
        }
        if (!p("enabled"))
          return i;
        var c = k.findArrayAttributes(h), a = {};
        for (l = 0; l < c.length; l++)
          a[c[l]] = 1;
        var y = p("groups");
        if (!Array.isArray(y)) {
          if (!a[y])
            return i.enabled = !1, i;
          a[y] = 0;
        }
        var f, _ = o.aggregations || [], b = i.aggregations = new Array(_.length);
        function w(A, I) {
          return g.coerce(_[l], f, n, A, I);
        }
        for (l = 0; l < _.length; l++) {
          f = { _index: l };
          var T = w("target"), L = w("func");
          w("enabled") && T && (a[T] || L === "count" && a[T] === void 0) ? (L === "stddev" && w("funcmode"), a[T] = 0, b[l] = f) : b[l] = { enabled: !1, _index: l };
        }
        for (l = 0; l < c.length; l++)
          a[c[l]] && b.push({ target: c[l], func: n.func.dflt, enabled: !0, _index: -1 });
        return i;
      }, $.calcTransform = function(o, h, l) {
        if (l.enabled) {
          var i = l.groups, p = g.getTargetArray(h, { target: i });
          if (p) {
            var c, a, y, f, _ = {}, b = {}, w = [], T = x(h.transforms, l), L = p.length;
            for (h._length && (L = Math.min(L, h._length)), c = 0; c < L; c++)
              (y = _[a = p[c]]) === void 0 ? (_[a] = w.length, f = [c], w.push(f), b[_[a]] = T(c)) : (w[y].push(c), b[_[a]] = (b[_[a]] || []).concat(T(c)));
            l._indexToPoints = b;
            var A = l.aggregations;
            for (c = 0; c < A.length; c++)
              s(o, h, w, A[c]);
            typeof i == "string" && s(o, h, w, { target: i, func: "first", enabled: !0 }), h._length = w.length;
          }
        }
      };
    }, { "../constants/numerical": 491, "../lib": 515, "../plot_api/plot_schema": 554, "../plots/cartesian/axes": 566, "./helpers": 1130 }], 1128: [function(v, Q, $) {
      var m = v("../lib"), g = v("../registry"), k = v("../plots/cartesian/axes"), x = v("./helpers").pointsAccessorFunction, e = v("../constants/filter_ops"), r = e.COMPARISON_OPS, n = e.INTERVAL_OPS, s = e.SET_OPS;
      $.moduleType = "transform", $.name = "filter", $.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, target: { valType: "string", strict: !0, noBlank: !0, arrayOk: !0, dflt: "x", editType: "calc" }, operation: { valType: "enumerated", values: [].concat(r).concat(n).concat(s), dflt: "=", editType: "calc" }, value: { valType: "any", dflt: 0, editType: "calc" }, preservegaps: { valType: "boolean", dflt: !1, editType: "calc" }, editType: "calc" }, $.supplyDefaults = function(t) {
        var d = {};
        function u(l, i) {
          return m.coerce(t, d, $.attributes, l, i);
        }
        if (u("enabled")) {
          var o = u("target");
          if (m.isArrayOrTypedArray(o) && o.length === 0)
            return d.enabled = !1, d;
          u("preservegaps"), u("operation"), u("value");
          var h = g.getComponentMethod("calendars", "handleDefaults");
          h(t, d, "valuecalendar", null), h(t, d, "targetcalendar", null);
        }
        return d;
      }, $.calcTransform = function(t, d, u) {
        if (u.enabled) {
          var o = m.getTargetArray(d, u);
          if (o) {
            var h = u.target, l = o.length;
            d._length && (l = Math.min(l, d._length));
            var i = u.targetcalendar, p = d._arrayAttrs, c = u.preservegaps;
            if (typeof h == "string") {
              var a = m.nestedProperty(d, h + "calendar").get();
              a && (i = a);
            }
            var y, f, _ = function(P, S, E) {
              var R = P.operation, z = P.value, j = Array.isArray(z);
              function H(Z) {
                return Z.indexOf(R) !== -1;
              }
              var Y, J = function(Z) {
                return S(Z, 0, P.valuecalendar);
              }, W = function(Z) {
                return S(Z, 0, E);
              };
              switch (H(r) ? Y = J(j ? z[0] : z) : H(n) ? Y = j ? [J(z[0]), J(z[1])] : [J(z), J(z)] : H(s) && (Y = j ? z.map(J) : [J(z)]), R) {
                case "=":
                  return function(Z) {
                    return W(Z) === Y;
                  };
                case "!=":
                  return function(Z) {
                    return W(Z) !== Y;
                  };
                case "<":
                  return function(Z) {
                    return W(Z) < Y;
                  };
                case "<=":
                  return function(Z) {
                    return W(Z) <= Y;
                  };
                case ">":
                  return function(Z) {
                    return W(Z) > Y;
                  };
                case ">=":
                  return function(Z) {
                    return W(Z) >= Y;
                  };
                case "[]":
                  return function(Z) {
                    var re = W(Z);
                    return re >= Y[0] && re <= Y[1];
                  };
                case "()":
                  return function(Z) {
                    var re = W(Z);
                    return re > Y[0] && re < Y[1];
                  };
                case "[)":
                  return function(Z) {
                    var re = W(Z);
                    return re >= Y[0] && re < Y[1];
                  };
                case "(]":
                  return function(Z) {
                    var re = W(Z);
                    return re > Y[0] && re <= Y[1];
                  };
                case "][":
                  return function(Z) {
                    var re = W(Z);
                    return re <= Y[0] || re >= Y[1];
                  };
                case ")(":
                  return function(Z) {
                    var re = W(Z);
                    return re < Y[0] || re > Y[1];
                  };
                case "](":
                  return function(Z) {
                    var re = W(Z);
                    return re <= Y[0] || re > Y[1];
                  };
                case ")[":
                  return function(Z) {
                    var re = W(Z);
                    return re < Y[0] || re >= Y[1];
                  };
                case "{}":
                  return function(Z) {
                    return Y.indexOf(W(Z)) !== -1;
                  };
                case "}{":
                  return function(Z) {
                    return Y.indexOf(W(Z)) === -1;
                  };
              }
            }(u, k.getDataToCoordFunc(t, d, h, o), i), b = {}, w = {}, T = 0;
            c ? (y = function(P) {
              b[P.astr] = m.extendDeep([], P.get()), P.set(new Array(l));
            }, f = function(P, S) {
              var E = b[P.astr][S];
              P.get()[S] = E;
            }) : (y = function(P) {
              b[P.astr] = m.extendDeep([], P.get()), P.set([]);
            }, f = function(P, S) {
              var E = b[P.astr][S];
              P.get().push(E);
            }), I(y);
            for (var L = x(d.transforms, u), A = 0; A < l; A++)
              _(o[A]) ? (I(f, A), w[T++] = L(A)) : c && T++;
            u._indexToPoints = w, d._length = T;
          }
        }
        function I(P, S) {
          for (var E = 0; E < p.length; E++)
            P(m.nestedProperty(d, p[E]), S);
        }
      };
    }, { "../constants/filter_ops": 487, "../lib": 515, "../plots/cartesian/axes": 566, "../registry": 647, "./helpers": 1130 }], 1129: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plot_api/plot_schema"), k = v("../plots/plots"), x = v("./helpers").pointsAccessorFunction;
      function e(r, n) {
        var s, t, d, u, o, h, l, i, p, c, a = n.transform, y = n.transformIndex, f = r.transforms[y].groups, _ = x(r.transforms, a);
        if (!m.isArrayOrTypedArray(f) || f.length === 0)
          return [r];
        var b = m.filterUnique(f), w = new Array(b.length), T = f.length, L = g.findArrayAttributes(r), A = a.styles || [], I = {};
        for (s = 0; s < A.length; s++)
          I[A[s].target] = A[s].value;
        a.styles && (c = m.keyedContainer(a, "styles", "target", "value.name"));
        var P = {}, S = {};
        for (s = 0; s < b.length; s++) {
          P[h = b[s]] = s, S[h] = 0, (l = w[s] = m.extendDeepNoArrays({}, r))._group = h, l.transforms[y]._indexToPoints = {};
          var E = null;
          for (c && (E = c.get(h)), l.name = E || E === "" ? E : m.templateString(a.nameformat, { trace: r.name, group: h }), i = l.transforms, l.transforms = [], t = 0; t < i.length; t++)
            l.transforms[t] = m.extendDeepNoArrays({}, i[t]);
          for (t = 0; t < L.length; t++)
            m.nestedProperty(l, L[t]).set([]);
        }
        for (d = 0; d < L.length; d++) {
          for (u = L[d], t = 0, p = []; t < b.length; t++)
            p[t] = m.nestedProperty(w[t], u).get();
          for (o = m.nestedProperty(r, u).get(), t = 0; t < T; t++)
            p[P[f[t]]].push(o[t]);
        }
        for (t = 0; t < T; t++)
          (l = w[P[f[t]]]).transforms[y]._indexToPoints[S[f[t]]] = _(t), S[f[t]]++;
        for (s = 0; s < b.length; s++)
          h = b[s], l = w[s], k.clearExpandedTraceDefaultColors(l), l = m.extendDeepNoArrays(l, I[h] || {});
        return w;
      }
      $.moduleType = "transform", $.name = "groupby", $.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, groups: { valType: "data_array", dflt: [], editType: "calc" }, nameformat: { valType: "string", editType: "calc" }, styles: { _isLinkedToArray: "style", target: { valType: "string", editType: "calc" }, value: { valType: "any", dflt: {}, editType: "calc", _compareAsJSON: !0 }, editType: "calc" }, editType: "calc" }, $.supplyDefaults = function(r, n, s) {
        var t, d = {};
        function u(p, c) {
          return m.coerce(r, d, $.attributes, p, c);
        }
        if (!u("enabled"))
          return d;
        u("groups"), u("nameformat", s._dataLength > 1 ? "%{group} (%{trace})" : "%{group}");
        var o = r.styles, h = d.styles = [];
        if (o)
          for (t = 0; t < o.length; t++) {
            var l = h[t] = {};
            m.coerce(o[t], h[t], $.attributes.styles, "target");
            var i = m.coerce(o[t], h[t], $.attributes.styles, "value");
            m.isPlainObject(i) ? l.value = m.extendDeep({}, i) : i && delete l.value;
          }
        return d;
      }, $.transform = function(r, n) {
        var s, t, d, u = [];
        for (t = 0; t < r.length; t++)
          for (s = e(r[t], n), d = 0; d < s.length; d++)
            u.push(s[d]);
        return u;
      };
    }, { "../lib": 515, "../plot_api/plot_schema": 554, "../plots/plots": 628, "./helpers": 1130 }], 1130: [function(v, Q, $) {
      $.pointsAccessorFunction = function(m, g) {
        for (var k, x, e = 0; e < m.length && (k = m[e]) !== g; e++)
          k._indexToPoints && k.enabled !== !1 && (x = k._indexToPoints);
        return x ? function(r) {
          return x[r];
        } : function(r) {
          return [r];
        };
      };
    }, {}], 1131: [function(v, Q, $) {
      var m = v("../lib"), g = v("../plots/cartesian/axes"), k = v("./helpers").pointsAccessorFunction, x = v("../constants/numerical").BADNUM;
      $.moduleType = "transform", $.name = "sort", $.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, target: { valType: "string", strict: !0, noBlank: !0, arrayOk: !0, dflt: "x", editType: "calc" }, order: { valType: "enumerated", values: ["ascending", "descending"], dflt: "ascending", editType: "calc" }, editType: "calc" }, $.supplyDefaults = function(e) {
        var r = {};
        function n(s, t) {
          return m.coerce(e, r, $.attributes, s, t);
        }
        return n("enabled") && (n("target"), n("order")), r;
      }, $.calcTransform = function(e, r, n) {
        if (n.enabled) {
          var s = m.getTargetArray(r, n);
          if (s) {
            var t = n.target, d = s.length;
            r._length && (d = Math.min(d, r._length));
            var u, o, h = r._arrayAttrs, l = function(f, _, b, w) {
              var T, L = new Array(w), A = new Array(w);
              for (T = 0; T < w; T++)
                L[T] = { v: _[T], i: T };
              for (L.sort(function(I, P) {
                switch (I.order) {
                  case "ascending":
                    return function(S, E) {
                      var R = P(S.v), z = P(E.v);
                      return R === x ? 1 : z === x ? -1 : R - z;
                    };
                  case "descending":
                    return function(S, E) {
                      var R = P(S.v), z = P(E.v);
                      return R === x ? 1 : z === x ? -1 : z - R;
                    };
                }
              }(f, b)), T = 0; T < w; T++)
                A[T] = L[T].i;
              return A;
            }(n, s, g.getDataToCoordFunc(e, r, t, s), d), i = k(r.transforms, n), p = {};
            for (u = 0; u < h.length; u++) {
              var c = m.nestedProperty(r, h[u]), a = c.get(), y = new Array(d);
              for (o = 0; o < d; o++)
                y[o] = a[l[o]];
              c.set(y);
            }
            for (o = 0; o < d; o++)
              p[o] = i(l[o]);
            n._indexToPoints = p, r._length = d;
          }
        }
      };
    }, { "../constants/numerical": 491, "../lib": 515, "../plots/cartesian/axes": 566, "./helpers": 1130 }], 1132: [function(v, Q, $) {
      $.version = "2.16.2";
    }, {}], 1133: [function(v, Q, $) {
      (function(m) {
        (function() {
          (function(g) {
            typeof $ == "object" && Q !== void 0 ? Q.exports = g() : (typeof window < "u" ? window : m !== void 0 ? m : typeof self < "u" ? self : this).stackgl = g();
          })(function() {
            return function g(k, x, e) {
              function r(t, d) {
                if (!x[t]) {
                  if (!k[t]) {
                    var u = typeof v == "function" && v;
                    if (!d && u)
                      return u(t, !0);
                    if (n)
                      return n(t, !0);
                    var o = new Error("Cannot find module '" + t + "'");
                    throw o.code = "MODULE_NOT_FOUND", o;
                  }
                  var h = x[t] = { exports: {} };
                  k[t][0].call(h.exports, function(l) {
                    return r(k[t][1][l] || l);
                  }, h, h.exports, g, k, x, e);
                }
                return x[t].exports;
              }
              for (var n = typeof v == "function" && v, s = 0; s < e.length; s++)
                r(e[s]);
              return r;
            }({ 1: [function(g, k, x) {
              x.byteLength = function(h) {
                var l = u(h), i = l[0], p = l[1];
                return 3 * (i + p) / 4 - p;
              }, x.toByteArray = function(h) {
                var l, i, p = u(h), c = p[0], a = p[1], y = new n(function(b, w, T) {
                  return 3 * (w + T) / 4 - T;
                }(0, c, a)), f = 0, _ = a > 0 ? c - 4 : c;
                for (i = 0; i < _; i += 4)
                  l = r[h.charCodeAt(i)] << 18 | r[h.charCodeAt(i + 1)] << 12 | r[h.charCodeAt(i + 2)] << 6 | r[h.charCodeAt(i + 3)], y[f++] = l >> 16 & 255, y[f++] = l >> 8 & 255, y[f++] = 255 & l;
                return a === 2 && (l = r[h.charCodeAt(i)] << 2 | r[h.charCodeAt(i + 1)] >> 4, y[f++] = 255 & l), a === 1 && (l = r[h.charCodeAt(i)] << 10 | r[h.charCodeAt(i + 1)] << 4 | r[h.charCodeAt(i + 2)] >> 2, y[f++] = l >> 8 & 255, y[f++] = 255 & l), y;
              }, x.fromByteArray = function(h) {
                for (var l, i = h.length, p = i % 3, c = [], a = 0, y = i - p; a < y; a += 16383)
                  c.push(o(h, a, a + 16383 > y ? y : a + 16383));
                return p === 1 ? (l = h[i - 1], c.push(e[l >> 2] + e[l << 4 & 63] + "==")) : p === 2 && (l = (h[i - 2] << 8) + h[i - 1], c.push(e[l >> 10] + e[l >> 4 & 63] + e[l << 2 & 63] + "=")), c.join("");
              };
              for (var e = [], r = [], n = typeof Uint8Array < "u" ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = 0, d = s.length; t < d; ++t)
                e[t] = s[t], r[s.charCodeAt(t)] = t;
              function u(h) {
                var l = h.length;
                if (l % 4 > 0)
                  throw new Error("Invalid string. Length must be a multiple of 4");
                var i = h.indexOf("=");
                return i === -1 && (i = l), [i, i === l ? 0 : 4 - i % 4];
              }
              function o(h, l, i) {
                for (var p, c, a = [], y = l; y < i; y += 3)
                  p = (h[y] << 16 & 16711680) + (h[y + 1] << 8 & 65280) + (255 & h[y + 2]), a.push(e[(c = p) >> 18 & 63] + e[c >> 12 & 63] + e[c >> 6 & 63] + e[63 & c]);
                return a.join("");
              }
              r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63;
            }, {}], 2: [function(g, k, x) {
            }, {}], 3: [function(g, k, x) {
              (function(e) {
                (function() {
                  var r = g("base64-js"), n = g("ieee754");
                  x.Buffer = t, x.SlowBuffer = function(N) {
                    return +N != N && (N = 0), t.alloc(+N);
                  }, x.INSPECT_MAX_BYTES = 50;
                  function s(N) {
                    if (N > 2147483647)
                      throw new RangeError('The value "' + N + '" is invalid for option "size"');
                    var K = new Uint8Array(N);
                    return K.__proto__ = t.prototype, K;
                  }
                  function t(N, K, X) {
                    if (typeof N == "number") {
                      if (typeof K == "string")
                        throw new TypeError('The "string" argument must be of type string. Received type number');
                      return o(N);
                    }
                    return d(N, K, X);
                  }
                  function d(N, K, X) {
                    if (typeof N == "string")
                      return function(le, oe) {
                        if (typeof oe == "string" && oe !== "" || (oe = "utf8"), !t.isEncoding(oe))
                          throw new TypeError("Unknown encoding: " + oe);
                        var ve = 0 | i(le, oe), ue = s(ve), ye = ue.write(le, oe);
                        return ye !== ve && (ue = ue.slice(0, ye)), ue;
                      }(N, K);
                    if (ArrayBuffer.isView(N))
                      return h(N);
                    if (N == null)
                      throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof N);
                    if (U(N, ArrayBuffer) || N && U(N.buffer, ArrayBuffer))
                      return function(le, oe, ve) {
                        if (oe < 0 || le.byteLength < oe)
                          throw new RangeError('"offset" is outside of buffer bounds');
                        if (le.byteLength < oe + (ve || 0))
                          throw new RangeError('"length" is outside of buffer bounds');
                        var ue;
                        return ue = oe === void 0 && ve === void 0 ? new Uint8Array(le) : ve === void 0 ? new Uint8Array(le, oe) : new Uint8Array(le, oe, ve), ue.__proto__ = t.prototype, ue;
                      }(N, K, X);
                    if (typeof N == "number")
                      throw new TypeError('The "value" argument must not be of type number. Received type number');
                    var te = N.valueOf && N.valueOf();
                    if (te != null && te !== N)
                      return t.from(te, K, X);
                    var ie = function(le) {
                      if (t.isBuffer(le)) {
                        var oe = 0 | l(le.length), ve = s(oe);
                        return ve.length === 0 || le.copy(ve, 0, 0, oe), ve;
                      }
                      if (le.length !== void 0)
                        return typeof le.length != "number" || ee(le.length) ? s(0) : h(le);
                      if (le.type === "Buffer" && Array.isArray(le.data))
                        return h(le.data);
                    }(N);
                    if (ie)
                      return ie;
                    if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof N[Symbol.toPrimitive] == "function")
                      return t.from(N[Symbol.toPrimitive]("string"), K, X);
                    throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof N);
                  }
                  function u(N) {
                    if (typeof N != "number")
                      throw new TypeError('"size" argument must be of type number');
                    if (N < 0)
                      throw new RangeError('The value "' + N + '" is invalid for option "size"');
                  }
                  function o(N) {
                    return u(N), s(N < 0 ? 0 : 0 | l(N));
                  }
                  function h(N) {
                    for (var K = N.length < 0 ? 0 : 0 | l(N.length), X = s(K), te = 0; te < K; te += 1)
                      X[te] = 255 & N[te];
                    return X;
                  }
                  function l(N) {
                    if (N >= 2147483647)
                      throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647 .toString(16) + " bytes");
                    return 0 | N;
                  }
                  function i(N, K) {
                    if (t.isBuffer(N))
                      return N.length;
                    if (ArrayBuffer.isView(N) || U(N, ArrayBuffer))
                      return N.byteLength;
                    if (typeof N != "string")
                      throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof N);
                    var X = N.length, te = arguments.length > 2 && arguments[2] === !0;
                    if (!te && X === 0)
                      return 0;
                    for (var ie = !1; ; )
                      switch (K) {
                        case "ascii":
                        case "latin1":
                        case "binary":
                          return X;
                        case "utf8":
                        case "utf-8":
                          return re(N).length;
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                          return 2 * X;
                        case "hex":
                          return X >>> 1;
                        case "base64":
                          return V(N).length;
                        default:
                          if (ie)
                            return te ? -1 : re(N).length;
                          K = ("" + K).toLowerCase(), ie = !0;
                      }
                  }
                  function p(N, K, X) {
                    var te = !1;
                    if ((K === void 0 || K < 0) && (K = 0), K > this.length || ((X === void 0 || X > this.length) && (X = this.length), X <= 0) || (X >>>= 0) <= (K >>>= 0))
                      return "";
                    for (N || (N = "utf8"); ; )
                      switch (N) {
                        case "hex":
                          return E(this, K, X);
                        case "utf8":
                        case "utf-8":
                          return I(this, K, X);
                        case "ascii":
                          return P(this, K, X);
                        case "latin1":
                        case "binary":
                          return S(this, K, X);
                        case "base64":
                          return A(this, K, X);
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                          return R(this, K, X);
                        default:
                          if (te)
                            throw new TypeError("Unknown encoding: " + N);
                          N = (N + "").toLowerCase(), te = !0;
                      }
                  }
                  function c(N, K, X) {
                    var te = N[K];
                    N[K] = N[X], N[X] = te;
                  }
                  function a(N, K, X, te, ie) {
                    if (N.length === 0)
                      return -1;
                    if (typeof X == "string" ? (te = X, X = 0) : X > 2147483647 ? X = 2147483647 : X < -2147483648 && (X = -2147483648), ee(X = +X) && (X = ie ? 0 : N.length - 1), X < 0 && (X = N.length + X), X >= N.length) {
                      if (ie)
                        return -1;
                      X = N.length - 1;
                    } else if (X < 0) {
                      if (!ie)
                        return -1;
                      X = 0;
                    }
                    if (typeof K == "string" && (K = t.from(K, te)), t.isBuffer(K))
                      return K.length === 0 ? -1 : y(N, K, X, te, ie);
                    if (typeof K == "number")
                      return K &= 255, typeof Uint8Array.prototype.indexOf == "function" ? ie ? Uint8Array.prototype.indexOf.call(N, K, X) : Uint8Array.prototype.lastIndexOf.call(N, K, X) : y(N, [K], X, te, ie);
                    throw new TypeError("val must be string, number or Buffer");
                  }
                  function y(N, K, X, te, ie) {
                    var le, oe = 1, ve = N.length, ue = K.length;
                    if (te !== void 0 && ((te = String(te).toLowerCase()) === "ucs2" || te === "ucs-2" || te === "utf16le" || te === "utf-16le")) {
                      if (N.length < 2 || K.length < 2)
                        return -1;
                      oe = 2, ve /= 2, ue /= 2, X /= 2;
                    }
                    function ye(we, se) {
                      return oe === 1 ? we[se] : we.readUInt16BE(se * oe);
                    }
                    if (ie) {
                      var Ae = -1;
                      for (le = X; le < ve; le++)
                        if (ye(N, le) === ye(K, Ae === -1 ? 0 : le - Ae)) {
                          if (Ae === -1 && (Ae = le), le - Ae + 1 === ue)
                            return Ae * oe;
                        } else
                          Ae !== -1 && (le -= le - Ae), Ae = -1;
                    } else
                      for (X + ue > ve && (X = ve - ue), le = X; le >= 0; le--) {
                        for (var pe = !0, ge = 0; ge < ue; ge++)
                          if (ye(N, le + ge) !== ye(K, ge)) {
                            pe = !1;
                            break;
                          }
                        if (pe)
                          return le;
                      }
                    return -1;
                  }
                  function f(N, K, X, te) {
                    X = Number(X) || 0;
                    var ie = N.length - X;
                    te ? (te = Number(te)) > ie && (te = ie) : te = ie;
                    var le = K.length;
                    te > le / 2 && (te = le / 2);
                    for (var oe = 0; oe < te; ++oe) {
                      var ve = parseInt(K.substr(2 * oe, 2), 16);
                      if (ee(ve))
                        return oe;
                      N[X + oe] = ve;
                    }
                    return oe;
                  }
                  function _(N, K, X, te) {
                    return B(re(K, N.length - X), N, X, te);
                  }
                  function b(N, K, X, te) {
                    return B(function(ie) {
                      for (var le = [], oe = 0; oe < ie.length; ++oe)
                        le.push(255 & ie.charCodeAt(oe));
                      return le;
                    }(K), N, X, te);
                  }
                  function w(N, K, X, te) {
                    return b(N, K, X, te);
                  }
                  function T(N, K, X, te) {
                    return B(V(K), N, X, te);
                  }
                  function L(N, K, X, te) {
                    return B(function(ie, le) {
                      for (var oe, ve, ue, ye = [], Ae = 0; Ae < ie.length && !((le -= 2) < 0); ++Ae)
                        oe = ie.charCodeAt(Ae), ve = oe >> 8, ue = oe % 256, ye.push(ue), ye.push(ve);
                      return ye;
                    }(K, N.length - X), N, X, te);
                  }
                  function A(N, K, X) {
                    return K === 0 && X === N.length ? r.fromByteArray(N) : r.fromByteArray(N.slice(K, X));
                  }
                  function I(N, K, X) {
                    X = Math.min(N.length, X);
                    for (var te = [], ie = K; ie < X; ) {
                      var le, oe, ve, ue, ye = N[ie], Ae = null, pe = ye > 239 ? 4 : ye > 223 ? 3 : ye > 191 ? 2 : 1;
                      if (ie + pe <= X)
                        switch (pe) {
                          case 1:
                            ye < 128 && (Ae = ye);
                            break;
                          case 2:
                            (192 & (le = N[ie + 1])) == 128 && (ue = (31 & ye) << 6 | 63 & le) > 127 && (Ae = ue);
                            break;
                          case 3:
                            le = N[ie + 1], oe = N[ie + 2], (192 & le) == 128 && (192 & oe) == 128 && (ue = (15 & ye) << 12 | (63 & le) << 6 | 63 & oe) > 2047 && (ue < 55296 || ue > 57343) && (Ae = ue);
                            break;
                          case 4:
                            le = N[ie + 1], oe = N[ie + 2], ve = N[ie + 3], (192 & le) == 128 && (192 & oe) == 128 && (192 & ve) == 128 && (ue = (15 & ye) << 18 | (63 & le) << 12 | (63 & oe) << 6 | 63 & ve) > 65535 && ue < 1114112 && (Ae = ue);
                        }
                      Ae === null ? (Ae = 65533, pe = 1) : Ae > 65535 && (Ae -= 65536, te.push(Ae >>> 10 & 1023 | 55296), Ae = 56320 | 1023 & Ae), te.push(Ae), ie += pe;
                    }
                    return function(ge) {
                      var we = ge.length;
                      if (we <= 4096)
                        return String.fromCharCode.apply(String, ge);
                      for (var se = "", de = 0; de < we; )
                        se += String.fromCharCode.apply(String, ge.slice(de, de += 4096));
                      return se;
                    }(te);
                  }
                  x.kMaxLength = 2147483647, t.TYPED_ARRAY_SUPPORT = function() {
                    try {
                      var N = new Uint8Array(1);
                      return N.__proto__ = { __proto__: Uint8Array.prototype, foo: function() {
                        return 42;
                      } }, N.foo() === 42;
                    } catch {
                      return !1;
                    }
                  }(), t.TYPED_ARRAY_SUPPORT || typeof console > "u" || typeof console.error != "function" || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(t.prototype, "parent", { enumerable: !0, get: function() {
                    if (t.isBuffer(this))
                      return this.buffer;
                  } }), Object.defineProperty(t.prototype, "offset", { enumerable: !0, get: function() {
                    if (t.isBuffer(this))
                      return this.byteOffset;
                  } }), typeof Symbol < "u" && Symbol.species != null && t[Symbol.species] === t && Object.defineProperty(t, Symbol.species, { value: null, configurable: !0, enumerable: !1, writable: !1 }), t.poolSize = 8192, t.from = function(N, K, X) {
                    return d(N, K, X);
                  }, t.prototype.__proto__ = Uint8Array.prototype, t.__proto__ = Uint8Array, t.alloc = function(N, K, X) {
                    return function(te, ie, le) {
                      return u(te), te <= 0 ? s(te) : ie !== void 0 ? typeof le == "string" ? s(te).fill(ie, le) : s(te).fill(ie) : s(te);
                    }(N, K, X);
                  }, t.allocUnsafe = function(N) {
                    return o(N);
                  }, t.allocUnsafeSlow = function(N) {
                    return o(N);
                  }, t.isBuffer = function(N) {
                    return N != null && N._isBuffer === !0 && N !== t.prototype;
                  }, t.compare = function(N, K) {
                    if (U(N, Uint8Array) && (N = t.from(N, N.offset, N.byteLength)), U(K, Uint8Array) && (K = t.from(K, K.offset, K.byteLength)), !t.isBuffer(N) || !t.isBuffer(K))
                      throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
                    if (N === K)
                      return 0;
                    for (var X = N.length, te = K.length, ie = 0, le = Math.min(X, te); ie < le; ++ie)
                      if (N[ie] !== K[ie]) {
                        X = N[ie], te = K[ie];
                        break;
                      }
                    return X < te ? -1 : te < X ? 1 : 0;
                  }, t.isEncoding = function(N) {
                    switch (String(N).toLowerCase()) {
                      case "hex":
                      case "utf8":
                      case "utf-8":
                      case "ascii":
                      case "latin1":
                      case "binary":
                      case "base64":
                      case "ucs2":
                      case "ucs-2":
                      case "utf16le":
                      case "utf-16le":
                        return !0;
                      default:
                        return !1;
                    }
                  }, t.concat = function(N, K) {
                    if (!Array.isArray(N))
                      throw new TypeError('"list" argument must be an Array of Buffers');
                    if (N.length === 0)
                      return t.alloc(0);
                    var X;
                    if (K === void 0)
                      for (K = 0, X = 0; X < N.length; ++X)
                        K += N[X].length;
                    var te = t.allocUnsafe(K), ie = 0;
                    for (X = 0; X < N.length; ++X) {
                      var le = N[X];
                      if (U(le, Uint8Array) && (le = t.from(le)), !t.isBuffer(le))
                        throw new TypeError('"list" argument must be an Array of Buffers');
                      le.copy(te, ie), ie += le.length;
                    }
                    return te;
                  }, t.byteLength = i, t.prototype._isBuffer = !0, t.prototype.swap16 = function() {
                    var N = this.length;
                    if (N % 2 != 0)
                      throw new RangeError("Buffer size must be a multiple of 16-bits");
                    for (var K = 0; K < N; K += 2)
                      c(this, K, K + 1);
                    return this;
                  }, t.prototype.swap32 = function() {
                    var N = this.length;
                    if (N % 4 != 0)
                      throw new RangeError("Buffer size must be a multiple of 32-bits");
                    for (var K = 0; K < N; K += 4)
                      c(this, K, K + 3), c(this, K + 1, K + 2);
                    return this;
                  }, t.prototype.swap64 = function() {
                    var N = this.length;
                    if (N % 8 != 0)
                      throw new RangeError("Buffer size must be a multiple of 64-bits");
                    for (var K = 0; K < N; K += 8)
                      c(this, K, K + 7), c(this, K + 1, K + 6), c(this, K + 2, K + 5), c(this, K + 3, K + 4);
                    return this;
                  }, t.prototype.toString = function() {
                    var N = this.length;
                    return N === 0 ? "" : arguments.length === 0 ? I(this, 0, N) : p.apply(this, arguments);
                  }, t.prototype.toLocaleString = t.prototype.toString, t.prototype.equals = function(N) {
                    if (!t.isBuffer(N))
                      throw new TypeError("Argument must be a Buffer");
                    return this === N || t.compare(this, N) === 0;
                  }, t.prototype.inspect = function() {
                    var N = "", K = x.INSPECT_MAX_BYTES;
                    return N = this.toString("hex", 0, K).replace(/(.{2})/g, "$1 ").trim(), this.length > K && (N += " ... "), "<Buffer " + N + ">";
                  }, t.prototype.compare = function(N, K, X, te, ie) {
                    if (U(N, Uint8Array) && (N = t.from(N, N.offset, N.byteLength)), !t.isBuffer(N))
                      throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof N);
                    if (K === void 0 && (K = 0), X === void 0 && (X = N ? N.length : 0), te === void 0 && (te = 0), ie === void 0 && (ie = this.length), K < 0 || X > N.length || te < 0 || ie > this.length)
                      throw new RangeError("out of range index");
                    if (te >= ie && K >= X)
                      return 0;
                    if (te >= ie)
                      return -1;
                    if (K >= X)
                      return 1;
                    if (this === N)
                      return 0;
                    for (var le = (ie >>>= 0) - (te >>>= 0), oe = (X >>>= 0) - (K >>>= 0), ve = Math.min(le, oe), ue = this.slice(te, ie), ye = N.slice(K, X), Ae = 0; Ae < ve; ++Ae)
                      if (ue[Ae] !== ye[Ae]) {
                        le = ue[Ae], oe = ye[Ae];
                        break;
                      }
                    return le < oe ? -1 : oe < le ? 1 : 0;
                  }, t.prototype.includes = function(N, K, X) {
                    return this.indexOf(N, K, X) !== -1;
                  }, t.prototype.indexOf = function(N, K, X) {
                    return a(this, N, K, X, !0);
                  }, t.prototype.lastIndexOf = function(N, K, X) {
                    return a(this, N, K, X, !1);
                  }, t.prototype.write = function(N, K, X, te) {
                    if (K === void 0)
                      te = "utf8", X = this.length, K = 0;
                    else if (X === void 0 && typeof K == "string")
                      te = K, X = this.length, K = 0;
                    else {
                      if (!isFinite(K))
                        throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
                      K >>>= 0, isFinite(X) ? (X >>>= 0, te === void 0 && (te = "utf8")) : (te = X, X = void 0);
                    }
                    var ie = this.length - K;
                    if ((X === void 0 || X > ie) && (X = ie), N.length > 0 && (X < 0 || K < 0) || K > this.length)
                      throw new RangeError("Attempt to write outside buffer bounds");
                    te || (te = "utf8");
                    for (var le = !1; ; )
                      switch (te) {
                        case "hex":
                          return f(this, N, K, X);
                        case "utf8":
                        case "utf-8":
                          return _(this, N, K, X);
                        case "ascii":
                          return b(this, N, K, X);
                        case "latin1":
                        case "binary":
                          return w(this, N, K, X);
                        case "base64":
                          return T(this, N, K, X);
                        case "ucs2":
                        case "ucs-2":
                        case "utf16le":
                        case "utf-16le":
                          return L(this, N, K, X);
                        default:
                          if (le)
                            throw new TypeError("Unknown encoding: " + te);
                          te = ("" + te).toLowerCase(), le = !0;
                      }
                  }, t.prototype.toJSON = function() {
                    return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
                  };
                  function P(N, K, X) {
                    var te = "";
                    X = Math.min(N.length, X);
                    for (var ie = K; ie < X; ++ie)
                      te += String.fromCharCode(127 & N[ie]);
                    return te;
                  }
                  function S(N, K, X) {
                    var te = "";
                    X = Math.min(N.length, X);
                    for (var ie = K; ie < X; ++ie)
                      te += String.fromCharCode(N[ie]);
                    return te;
                  }
                  function E(N, K, X) {
                    var te = N.length;
                    (!K || K < 0) && (K = 0), (!X || X < 0 || X > te) && (X = te);
                    for (var ie = "", le = K; le < X; ++le)
                      ie += Z(N[le]);
                    return ie;
                  }
                  function R(N, K, X) {
                    for (var te = N.slice(K, X), ie = "", le = 0; le < te.length; le += 2)
                      ie += String.fromCharCode(te[le] + 256 * te[le + 1]);
                    return ie;
                  }
                  function z(N, K, X) {
                    if (N % 1 != 0 || N < 0)
                      throw new RangeError("offset is not uint");
                    if (N + K > X)
                      throw new RangeError("Trying to access beyond buffer length");
                  }
                  function j(N, K, X, te, ie, le) {
                    if (!t.isBuffer(N))
                      throw new TypeError('"buffer" argument must be a Buffer instance');
                    if (K > ie || K < le)
                      throw new RangeError('"value" argument is out of bounds');
                    if (X + te > N.length)
                      throw new RangeError("Index out of range");
                  }
                  function H(N, K, X, te, ie, le) {
                    if (X + te > N.length)
                      throw new RangeError("Index out of range");
                    if (X < 0)
                      throw new RangeError("Index out of range");
                  }
                  function Y(N, K, X, te, ie) {
                    return K = +K, X >>>= 0, ie || H(N, 0, X, 4), n.write(N, K, X, te, 23, 4), X + 4;
                  }
                  function J(N, K, X, te, ie) {
                    return K = +K, X >>>= 0, ie || H(N, 0, X, 8), n.write(N, K, X, te, 52, 8), X + 8;
                  }
                  t.prototype.slice = function(N, K) {
                    var X = this.length;
                    (N = ~~N) < 0 ? (N += X) < 0 && (N = 0) : N > X && (N = X), (K = K === void 0 ? X : ~~K) < 0 ? (K += X) < 0 && (K = 0) : K > X && (K = X), K < N && (K = N);
                    var te = this.subarray(N, K);
                    return te.__proto__ = t.prototype, te;
                  }, t.prototype.readUIntLE = function(N, K, X) {
                    N >>>= 0, K >>>= 0, X || z(N, K, this.length);
                    for (var te = this[N], ie = 1, le = 0; ++le < K && (ie *= 256); )
                      te += this[N + le] * ie;
                    return te;
                  }, t.prototype.readUIntBE = function(N, K, X) {
                    N >>>= 0, K >>>= 0, X || z(N, K, this.length);
                    for (var te = this[N + --K], ie = 1; K > 0 && (ie *= 256); )
                      te += this[N + --K] * ie;
                    return te;
                  }, t.prototype.readUInt8 = function(N, K) {
                    return N >>>= 0, K || z(N, 1, this.length), this[N];
                  }, t.prototype.readUInt16LE = function(N, K) {
                    return N >>>= 0, K || z(N, 2, this.length), this[N] | this[N + 1] << 8;
                  }, t.prototype.readUInt16BE = function(N, K) {
                    return N >>>= 0, K || z(N, 2, this.length), this[N] << 8 | this[N + 1];
                  }, t.prototype.readUInt32LE = function(N, K) {
                    return N >>>= 0, K || z(N, 4, this.length), (this[N] | this[N + 1] << 8 | this[N + 2] << 16) + 16777216 * this[N + 3];
                  }, t.prototype.readUInt32BE = function(N, K) {
                    return N >>>= 0, K || z(N, 4, this.length), 16777216 * this[N] + (this[N + 1] << 16 | this[N + 2] << 8 | this[N + 3]);
                  }, t.prototype.readIntLE = function(N, K, X) {
                    N >>>= 0, K >>>= 0, X || z(N, K, this.length);
                    for (var te = this[N], ie = 1, le = 0; ++le < K && (ie *= 256); )
                      te += this[N + le] * ie;
                    return te >= (ie *= 128) && (te -= Math.pow(2, 8 * K)), te;
                  }, t.prototype.readIntBE = function(N, K, X) {
                    N >>>= 0, K >>>= 0, X || z(N, K, this.length);
                    for (var te = K, ie = 1, le = this[N + --te]; te > 0 && (ie *= 256); )
                      le += this[N + --te] * ie;
                    return le >= (ie *= 128) && (le -= Math.pow(2, 8 * K)), le;
                  }, t.prototype.readInt8 = function(N, K) {
                    return N >>>= 0, K || z(N, 1, this.length), 128 & this[N] ? -1 * (255 - this[N] + 1) : this[N];
                  }, t.prototype.readInt16LE = function(N, K) {
                    N >>>= 0, K || z(N, 2, this.length);
                    var X = this[N] | this[N + 1] << 8;
                    return 32768 & X ? 4294901760 | X : X;
                  }, t.prototype.readInt16BE = function(N, K) {
                    N >>>= 0, K || z(N, 2, this.length);
                    var X = this[N + 1] | this[N] << 8;
                    return 32768 & X ? 4294901760 | X : X;
                  }, t.prototype.readInt32LE = function(N, K) {
                    return N >>>= 0, K || z(N, 4, this.length), this[N] | this[N + 1] << 8 | this[N + 2] << 16 | this[N + 3] << 24;
                  }, t.prototype.readInt32BE = function(N, K) {
                    return N >>>= 0, K || z(N, 4, this.length), this[N] << 24 | this[N + 1] << 16 | this[N + 2] << 8 | this[N + 3];
                  }, t.prototype.readFloatLE = function(N, K) {
                    return N >>>= 0, K || z(N, 4, this.length), n.read(this, N, !0, 23, 4);
                  }, t.prototype.readFloatBE = function(N, K) {
                    return N >>>= 0, K || z(N, 4, this.length), n.read(this, N, !1, 23, 4);
                  }, t.prototype.readDoubleLE = function(N, K) {
                    return N >>>= 0, K || z(N, 8, this.length), n.read(this, N, !0, 52, 8);
                  }, t.prototype.readDoubleBE = function(N, K) {
                    return N >>>= 0, K || z(N, 8, this.length), n.read(this, N, !1, 52, 8);
                  }, t.prototype.writeUIntLE = function(N, K, X, te) {
                    N = +N, K >>>= 0, X >>>= 0, te || j(this, N, K, X, Math.pow(2, 8 * X) - 1, 0);
                    var ie = 1, le = 0;
                    for (this[K] = 255 & N; ++le < X && (ie *= 256); )
                      this[K + le] = N / ie & 255;
                    return K + X;
                  }, t.prototype.writeUIntBE = function(N, K, X, te) {
                    N = +N, K >>>= 0, X >>>= 0, te || j(this, N, K, X, Math.pow(2, 8 * X) - 1, 0);
                    var ie = X - 1, le = 1;
                    for (this[K + ie] = 255 & N; --ie >= 0 && (le *= 256); )
                      this[K + ie] = N / le & 255;
                    return K + X;
                  }, t.prototype.writeUInt8 = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 1, 255, 0), this[K] = 255 & N, K + 1;
                  }, t.prototype.writeUInt16LE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 2, 65535, 0), this[K] = 255 & N, this[K + 1] = N >>> 8, K + 2;
                  }, t.prototype.writeUInt16BE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 2, 65535, 0), this[K] = N >>> 8, this[K + 1] = 255 & N, K + 2;
                  }, t.prototype.writeUInt32LE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 4, 4294967295, 0), this[K + 3] = N >>> 24, this[K + 2] = N >>> 16, this[K + 1] = N >>> 8, this[K] = 255 & N, K + 4;
                  }, t.prototype.writeUInt32BE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 4, 4294967295, 0), this[K] = N >>> 24, this[K + 1] = N >>> 16, this[K + 2] = N >>> 8, this[K + 3] = 255 & N, K + 4;
                  }, t.prototype.writeIntLE = function(N, K, X, te) {
                    if (N = +N, K >>>= 0, !te) {
                      var ie = Math.pow(2, 8 * X - 1);
                      j(this, N, K, X, ie - 1, -ie);
                    }
                    var le = 0, oe = 1, ve = 0;
                    for (this[K] = 255 & N; ++le < X && (oe *= 256); )
                      N < 0 && ve === 0 && this[K + le - 1] !== 0 && (ve = 1), this[K + le] = (N / oe >> 0) - ve & 255;
                    return K + X;
                  }, t.prototype.writeIntBE = function(N, K, X, te) {
                    if (N = +N, K >>>= 0, !te) {
                      var ie = Math.pow(2, 8 * X - 1);
                      j(this, N, K, X, ie - 1, -ie);
                    }
                    var le = X - 1, oe = 1, ve = 0;
                    for (this[K + le] = 255 & N; --le >= 0 && (oe *= 256); )
                      N < 0 && ve === 0 && this[K + le + 1] !== 0 && (ve = 1), this[K + le] = (N / oe >> 0) - ve & 255;
                    return K + X;
                  }, t.prototype.writeInt8 = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 1, 127, -128), N < 0 && (N = 255 + N + 1), this[K] = 255 & N, K + 1;
                  }, t.prototype.writeInt16LE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 2, 32767, -32768), this[K] = 255 & N, this[K + 1] = N >>> 8, K + 2;
                  }, t.prototype.writeInt16BE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 2, 32767, -32768), this[K] = N >>> 8, this[K + 1] = 255 & N, K + 2;
                  }, t.prototype.writeInt32LE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 4, 2147483647, -2147483648), this[K] = 255 & N, this[K + 1] = N >>> 8, this[K + 2] = N >>> 16, this[K + 3] = N >>> 24, K + 4;
                  }, t.prototype.writeInt32BE = function(N, K, X) {
                    return N = +N, K >>>= 0, X || j(this, N, K, 4, 2147483647, -2147483648), N < 0 && (N = 4294967295 + N + 1), this[K] = N >>> 24, this[K + 1] = N >>> 16, this[K + 2] = N >>> 8, this[K + 3] = 255 & N, K + 4;
                  }, t.prototype.writeFloatLE = function(N, K, X) {
                    return Y(this, N, K, !0, X);
                  }, t.prototype.writeFloatBE = function(N, K, X) {
                    return Y(this, N, K, !1, X);
                  }, t.prototype.writeDoubleLE = function(N, K, X) {
                    return J(this, N, K, !0, X);
                  }, t.prototype.writeDoubleBE = function(N, K, X) {
                    return J(this, N, K, !1, X);
                  }, t.prototype.copy = function(N, K, X, te) {
                    if (!t.isBuffer(N))
                      throw new TypeError("argument should be a Buffer");
                    if (X || (X = 0), te || te === 0 || (te = this.length), K >= N.length && (K = N.length), K || (K = 0), te > 0 && te < X && (te = X), te === X || N.length === 0 || this.length === 0)
                      return 0;
                    if (K < 0)
                      throw new RangeError("targetStart out of bounds");
                    if (X < 0 || X >= this.length)
                      throw new RangeError("Index out of range");
                    if (te < 0)
                      throw new RangeError("sourceEnd out of bounds");
                    te > this.length && (te = this.length), N.length - K < te - X && (te = N.length - K + X);
                    var ie = te - X;
                    if (this === N && typeof Uint8Array.prototype.copyWithin == "function")
                      this.copyWithin(K, X, te);
                    else if (this === N && X < K && K < te)
                      for (var le = ie - 1; le >= 0; --le)
                        N[le + K] = this[le + X];
                    else
                      Uint8Array.prototype.set.call(N, this.subarray(X, te), K);
                    return ie;
                  }, t.prototype.fill = function(N, K, X, te) {
                    if (typeof N == "string") {
                      if (typeof K == "string" ? (te = K, K = 0, X = this.length) : typeof X == "string" && (te = X, X = this.length), te !== void 0 && typeof te != "string")
                        throw new TypeError("encoding must be a string");
                      if (typeof te == "string" && !t.isEncoding(te))
                        throw new TypeError("Unknown encoding: " + te);
                      if (N.length === 1) {
                        var ie = N.charCodeAt(0);
                        (te === "utf8" && ie < 128 || te === "latin1") && (N = ie);
                      }
                    } else
                      typeof N == "number" && (N &= 255);
                    if (K < 0 || this.length < K || this.length < X)
                      throw new RangeError("Out of range index");
                    if (X <= K)
                      return this;
                    var le;
                    if (K >>>= 0, X = X === void 0 ? this.length : X >>> 0, N || (N = 0), typeof N == "number")
                      for (le = K; le < X; ++le)
                        this[le] = N;
                    else {
                      var oe = t.isBuffer(N) ? N : t.from(N, te), ve = oe.length;
                      if (ve === 0)
                        throw new TypeError('The value "' + N + '" is invalid for argument "value"');
                      for (le = 0; le < X - K; ++le)
                        this[le + K] = oe[le % ve];
                    }
                    return this;
                  };
                  var W = /[^+/0-9A-Za-z-_]/g;
                  function Z(N) {
                    return N < 16 ? "0" + N.toString(16) : N.toString(16);
                  }
                  function re(N, K) {
                    var X;
                    K = K || 1 / 0;
                    for (var te = N.length, ie = null, le = [], oe = 0; oe < te; ++oe) {
                      if ((X = N.charCodeAt(oe)) > 55295 && X < 57344) {
                        if (!ie) {
                          if (X > 56319) {
                            (K -= 3) > -1 && le.push(239, 191, 189);
                            continue;
                          }
                          if (oe + 1 === te) {
                            (K -= 3) > -1 && le.push(239, 191, 189);
                            continue;
                          }
                          ie = X;
                          continue;
                        }
                        if (X < 56320) {
                          (K -= 3) > -1 && le.push(239, 191, 189), ie = X;
                          continue;
                        }
                        X = 65536 + (ie - 55296 << 10 | X - 56320);
                      } else
                        ie && (K -= 3) > -1 && le.push(239, 191, 189);
                      if (ie = null, X < 128) {
                        if ((K -= 1) < 0)
                          break;
                        le.push(X);
                      } else if (X < 2048) {
                        if ((K -= 2) < 0)
                          break;
                        le.push(X >> 6 | 192, 63 & X | 128);
                      } else if (X < 65536) {
                        if ((K -= 3) < 0)
                          break;
                        le.push(X >> 12 | 224, X >> 6 & 63 | 128, 63 & X | 128);
                      } else {
                        if (!(X < 1114112))
                          throw new Error("Invalid code point");
                        if ((K -= 4) < 0)
                          break;
                        le.push(X >> 18 | 240, X >> 12 & 63 | 128, X >> 6 & 63 | 128, 63 & X | 128);
                      }
                    }
                    return le;
                  }
                  function V(N) {
                    return r.toByteArray(function(K) {
                      if ((K = (K = K.split("=")[0]).trim().replace(W, "")).length < 2)
                        return "";
                      for (; K.length % 4 != 0; )
                        K += "=";
                      return K;
                    }(N));
                  }
                  function B(N, K, X, te) {
                    for (var ie = 0; ie < te && !(ie + X >= K.length || ie >= N.length); ++ie)
                      K[ie + X] = N[ie];
                    return ie;
                  }
                  function U(N, K) {
                    return N instanceof K || N != null && N.constructor != null && N.constructor.name != null && N.constructor.name === K.name;
                  }
                  function ee(N) {
                    return N != N;
                  }
                }).call(this);
              }).call(this, g("buffer").Buffer);
            }, { "base64-js": 1, buffer: 3, ieee754: 4 }], 4: [function(g, k, x) {
              x.read = function(e, r, n, s, t) {
                var d, u, o = 8 * t - s - 1, h = (1 << o) - 1, l = h >> 1, i = -7, p = n ? t - 1 : 0, c = n ? -1 : 1, a = e[r + p];
                for (p += c, d = a & (1 << -i) - 1, a >>= -i, i += o; i > 0; d = 256 * d + e[r + p], p += c, i -= 8)
                  ;
                for (u = d & (1 << -i) - 1, d >>= -i, i += s; i > 0; u = 256 * u + e[r + p], p += c, i -= 8)
                  ;
                if (d === 0)
                  d = 1 - l;
                else {
                  if (d === h)
                    return u ? NaN : 1 / 0 * (a ? -1 : 1);
                  u += Math.pow(2, s), d -= l;
                }
                return (a ? -1 : 1) * u * Math.pow(2, d - s);
              }, x.write = function(e, r, n, s, t, d) {
                var u, o, h, l = 8 * d - t - 1, i = (1 << l) - 1, p = i >> 1, c = t === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, a = s ? 0 : d - 1, y = s ? 1 : -1, f = r < 0 || r === 0 && 1 / r < 0 ? 1 : 0;
                for (r = Math.abs(r), isNaN(r) || r === 1 / 0 ? (o = isNaN(r) ? 1 : 0, u = i) : (u = Math.floor(Math.log(r) / Math.LN2), r * (h = Math.pow(2, -u)) < 1 && (u--, h *= 2), (r += u + p >= 1 ? c / h : c * Math.pow(2, 1 - p)) * h >= 2 && (u++, h /= 2), u + p >= i ? (o = 0, u = i) : u + p >= 1 ? (o = (r * h - 1) * Math.pow(2, t), u += p) : (o = r * Math.pow(2, p - 1) * Math.pow(2, t), u = 0)); t >= 8; e[n + a] = 255 & o, a += y, o /= 256, t -= 8)
                  ;
                for (u = u << t | o, l += t; l > 0; e[n + a] = 255 & u, a += y, u /= 256, l -= 8)
                  ;
                e[n + a - y] |= 128 * f;
              };
            }, {}], 5: [function(g, k, x) {
              var e, r, n = k.exports = {};
              function s() {
                throw new Error("setTimeout has not been defined");
              }
              function t() {
                throw new Error("clearTimeout has not been defined");
              }
              function d(y) {
                if (e === setTimeout)
                  return setTimeout(y, 0);
                if ((e === s || !e) && setTimeout)
                  return e = setTimeout, setTimeout(y, 0);
                try {
                  return e(y, 0);
                } catch {
                  try {
                    return e.call(null, y, 0);
                  } catch {
                    return e.call(this, y, 0);
                  }
                }
              }
              (function() {
                try {
                  e = typeof setTimeout == "function" ? setTimeout : s;
                } catch {
                  e = s;
                }
                try {
                  r = typeof clearTimeout == "function" ? clearTimeout : t;
                } catch {
                  r = t;
                }
              })();
              var u, o = [], h = !1, l = -1;
              function i() {
                h && u && (h = !1, u.length ? o = u.concat(o) : l = -1, o.length && p());
              }
              function p() {
                if (!h) {
                  var y = d(i);
                  h = !0;
                  for (var f = o.length; f; ) {
                    for (u = o, o = []; ++l < f; )
                      u && u[l].run();
                    l = -1, f = o.length;
                  }
                  u = null, h = !1, function(_) {
                    if (r === clearTimeout)
                      return clearTimeout(_);
                    if ((r === t || !r) && clearTimeout)
                      return r = clearTimeout, clearTimeout(_);
                    try {
                      r(_);
                    } catch {
                      try {
                        return r.call(null, _);
                      } catch {
                        return r.call(this, _);
                      }
                    }
                  }(y);
                }
              }
              function c(y, f) {
                this.fun = y, this.array = f;
              }
              function a() {
              }
              n.nextTick = function(y) {
                var f = new Array(arguments.length - 1);
                if (arguments.length > 1)
                  for (var _ = 1; _ < arguments.length; _++)
                    f[_ - 1] = arguments[_];
                o.push(new c(y, f)), o.length !== 1 || h || d(p);
              }, c.prototype.run = function() {
                this.fun.apply(null, this.array);
              }, n.title = "browser", n.browser = !0, n.env = {}, n.argv = [], n.version = "", n.versions = {}, n.on = a, n.addListener = a, n.once = a, n.off = a, n.removeListener = a, n.removeAllListeners = a, n.emit = a, n.prependListener = a, n.prependOnceListener = a, n.listeners = function(y) {
                return [];
              }, n.binding = function(y) {
                throw new Error("process.binding is not supported");
              }, n.cwd = function() {
                return "/";
              }, n.chdir = function(y) {
                throw new Error("process.chdir is not supported");
              }, n.umask = function() {
                return 0;
              };
            }, {}], 6: [function(g, k, x) {
              k.exports = { alpha_shape: g("alpha-shape"), convex_hull: g("convex-hull"), delaunay_triangulate: g("delaunay-triangulate"), gl_cone3d: g("gl-cone3d"), gl_error3d: g("gl-error3d"), gl_heatmap2d: g("gl-heatmap2d"), gl_line3d: g("gl-line3d"), gl_mesh3d: g("gl-mesh3d"), gl_plot2d: g("gl-plot2d"), gl_plot3d: g("gl-plot3d"), gl_pointcloud2d: g("gl-pointcloud2d"), gl_scatter3d: g("gl-scatter3d"), gl_select_box: g("gl-select-box"), gl_spikes2d: g("gl-spikes2d"), gl_streamtube3d: g("gl-streamtube3d"), gl_surface3d: g("gl-surface3d"), ndarray: g("ndarray"), ndarray_linear_interpolate: g("ndarray-linear-interpolate") };
            }, { "alpha-shape": 12, "convex-hull": 58, "delaunay-triangulate": 63, "gl-cone3d": 79, "gl-error3d": 84, "gl-heatmap2d": 88, "gl-line3d": 91, "gl-mesh3d": 112, "gl-plot2d": 118, "gl-plot3d": 121, "gl-pointcloud2d": 123, "gl-scatter3d": 128, "gl-select-box": 130, "gl-spikes2d": 139, "gl-streamtube3d": 143, "gl-surface3d": 145, ndarray: 259, "ndarray-linear-interpolate": 253 }], 7: [function(g, k, x) {
              k.exports = function(d) {
                var u = (d = d || {}).eye || [0, 0, 1], o = d.center || [0, 0, 0], h = d.up || [0, 1, 0], l = d.distanceLimits || [0, 1 / 0], i = d.mode || "turntable", p = e(), c = r(), a = n();
                return p.setDistanceLimits(l[0], l[1]), p.lookAt(0, u, o, h), c.setDistanceLimits(l[0], l[1]), c.lookAt(0, u, o, h), a.setDistanceLimits(l[0], l[1]), a.lookAt(0, u, o, h), new s({ turntable: p, orbit: c, matrix: a }, i);
              };
              var e = g("turntable-camera-controller"), r = g("orbit-camera-controller"), n = g("matrix-camera-controller");
              function s(d, u) {
                this._controllerNames = Object.keys(d), this._controllerList = this._controllerNames.map(function(o) {
                  return d[o];
                }), this._mode = u, this._active = d[u], this._active || (this._mode = "turntable", this._active = d.turntable), this.modes = this._controllerNames, this.computedMatrix = this._active.computedMatrix, this.computedEye = this._active.computedEye, this.computedUp = this._active.computedUp, this.computedCenter = this._active.computedCenter, this.computedRadius = this._active.computedRadius;
              }
              var t = s.prototype;
              t.flush = function(d) {
                for (var u = this._controllerList, o = 0; o < u.length; ++o)
                  u[o].flush(d);
              }, t.idle = function(d) {
                for (var u = this._controllerList, o = 0; o < u.length; ++o)
                  u[o].idle(d);
              }, t.lookAt = function(d, u, o, h) {
                for (var l = this._controllerList, i = 0; i < l.length; ++i)
                  l[i].lookAt(d, u, o, h);
              }, t.rotate = function(d, u, o, h) {
                for (var l = this._controllerList, i = 0; i < l.length; ++i)
                  l[i].rotate(d, u, o, h);
              }, t.pan = function(d, u, o, h) {
                for (var l = this._controllerList, i = 0; i < l.length; ++i)
                  l[i].pan(d, u, o, h);
              }, t.translate = function(d, u, o, h) {
                for (var l = this._controllerList, i = 0; i < l.length; ++i)
                  l[i].translate(d, u, o, h);
              }, t.setMatrix = function(d, u) {
                for (var o = this._controllerList, h = 0; h < o.length; ++h)
                  o[h].setMatrix(d, u);
              }, t.setDistanceLimits = function(d, u) {
                for (var o = this._controllerList, h = 0; h < o.length; ++h)
                  o[h].setDistanceLimits(d, u);
              }, t.setDistance = function(d, u) {
                for (var o = this._controllerList, h = 0; h < o.length; ++h)
                  o[h].setDistance(d, u);
              }, t.recalcMatrix = function(d) {
                this._active.recalcMatrix(d);
              }, t.getDistance = function(d) {
                return this._active.getDistance(d);
              }, t.getDistanceLimits = function(d) {
                return this._active.getDistanceLimits(d);
              }, t.lastT = function() {
                return this._active.lastT();
              }, t.setMode = function(d) {
                if (d !== this._mode) {
                  var u = this._controllerNames.indexOf(d);
                  if (!(u < 0)) {
                    var o = this._active, h = this._controllerList[u], l = Math.max(o.lastT(), h.lastT());
                    o.recalcMatrix(l), h.setMatrix(l, o.computedMatrix), this._active = h, this._mode = d, this.computedMatrix = this._active.computedMatrix, this.computedEye = this._active.computedEye, this.computedUp = this._active.computedUp, this.computedCenter = this._active.computedCenter, this.computedRadius = this._active.computedRadius;
                  }
                }
              }, t.getMode = function() {
                return this._mode;
              };
            }, { "matrix-camera-controller": 245, "orbit-camera-controller": 263, "turntable-camera-controller": 305 }], 8: [function(g, k, x) {
              var e = typeof WeakMap > "u" ? g("weak-map") : WeakMap, r = g("gl-buffer"), n = g("gl-vao"), s = new e();
              k.exports = function(t) {
                var d = s.get(t), u = d && (d._triangleBuffer.handle || d._triangleBuffer.buffer);
                if (!u || !t.isBuffer(u)) {
                  var o = r(t, new Float32Array([-1, -1, -1, 4, 4, -1]));
                  (d = n(t, [{ buffer: o, type: t.FLOAT, size: 2 }]))._triangleBuffer = o, s.set(t, d);
                }
                d.bind(), t.drawArrays(t.TRIANGLES, 0, 3), d.unbind();
              };
            }, { "gl-buffer": 78, "gl-vao": 150, "weak-map": 313 }], 9: [function(g, k, x) {
              var e = g("pad-left");
              k.exports = function(r, n, s) {
                n = typeof n == "number" ? n : 1, s = s || ": ";
                var t = r.split(/\r?\n/), d = String(t.length + n - 1).length;
                return t.map(function(u, o) {
                  var h = o + n, l = String(h).length;
                  return e(h, d - l) + s + u;
                }).join(`
`);
              };
            }, { "pad-left": 264 }], 10: [function(g, k, x) {
              k.exports = function(n) {
                var s = n.length;
                if (s === 0)
                  return [];
                if (s === 1)
                  return [0];
                for (var t = n[0].length, d = [n[0]], u = [0], o = 1; o < s; ++o)
                  if (d.push(n[o]), r(d, t)) {
                    if (u.push(o), u.length === t + 1)
                      return u;
                  } else
                    d.pop();
                return u;
              };
              var e = g("robust-orientation");
              function r(n, s) {
                for (var t = new Array(s + 1), d = 0; d < n.length; ++d)
                  t[d] = n[d];
                for (d = 0; d <= n.length; ++d) {
                  for (var u = n.length; u <= s; ++u) {
                    for (var o = new Array(s), h = 0; h < s; ++h)
                      o[h] = Math.pow(u + 1 - d, h);
                    t[u] = o;
                  }
                  if (e.apply(void 0, t))
                    return !0;
                }
                return !1;
              }
            }, { "robust-orientation": 284 }], 11: [function(g, k, x) {
              k.exports = function(n, s) {
                return e(s).filter(function(t) {
                  for (var d = new Array(t.length), u = 0; u < t.length; ++u)
                    d[u] = s[t[u]];
                  return r(d) * n < 1;
                });
              };
              var e = g("delaunay-triangulate"), r = g("circumradius");
            }, { circumradius: 49, "delaunay-triangulate": 63 }], 12: [function(g, k, x) {
              k.exports = function(n, s) {
                return r(e(n, s));
              };
              var e = g("alpha-complex"), r = g("simplicial-complex-boundary");
            }, { "alpha-complex": 11, "simplicial-complex-boundary": 290 }], 13: [function(g, k, x) {
              k.exports = function(e) {
                return atob(e);
              };
            }, {}], 14: [function(g, k, x) {
              k.exports = function(n, s) {
                for (var t = s.length, d = new Array(t + 1), u = 0; u < t; ++u) {
                  for (var o = new Array(t + 1), h = 0; h <= t; ++h)
                    o[h] = n[h][u];
                  d[u] = o;
                }
                for (d[t] = new Array(t + 1), u = 0; u <= t; ++u)
                  d[t][u] = 1;
                var l = new Array(t + 1);
                for (u = 0; u < t; ++u)
                  l[u] = s[u];
                l[t] = 1;
                var i = e(d, l), p = r(i[t + 1]);
                p === 0 && (p = 1);
                var c = new Array(t + 1);
                for (u = 0; u <= t; ++u)
                  c[u] = r(i[u]) / p;
                return c;
              };
              var e = g("robust-linear-solve");
              function r(n) {
                for (var s = 0, t = 0; t < n.length; ++t)
                  s += n[t];
                return s;
              }
            }, { "robust-linear-solve": 283 }], 15: [function(g, k, x) {
              var e = g("./lib/rationalize");
              k.exports = function(r, n) {
                return e(r[0].mul(n[1]).add(n[0].mul(r[1])), r[1].mul(n[1]));
              };
            }, { "./lib/rationalize": 25 }], 16: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0].mul(r[1]).cmp(r[0].mul(e[1]));
              };
            }, {}], 17: [function(g, k, x) {
              var e = g("./lib/rationalize");
              k.exports = function(r, n) {
                return e(r[0].mul(n[1]), r[1].mul(n[0]));
              };
            }, { "./lib/rationalize": 25 }], 18: [function(g, k, x) {
              var e = g("./is-rat"), r = g("./lib/is-bn"), n = g("./lib/num-to-bn"), s = g("./lib/str-to-bn"), t = g("./lib/rationalize"), d = g("./div");
              k.exports = function u(o, h) {
                if (e(o))
                  return h ? d(o, u(h)) : [o[0].clone(), o[1].clone()];
                var l, i, p = 0;
                if (r(o))
                  l = o.clone();
                else if (typeof o == "string")
                  l = s(o);
                else {
                  if (o === 0)
                    return [n(0), n(1)];
                  if (o === Math.floor(o))
                    l = n(o);
                  else {
                    for (; o !== Math.floor(o); )
                      o *= Math.pow(2, 256), p -= 256;
                    l = n(o);
                  }
                }
                if (e(h))
                  l.mul(h[1]), i = h[0].clone();
                else if (r(h))
                  i = h.clone();
                else if (typeof h == "string")
                  i = s(h);
                else if (h)
                  if (h === Math.floor(h))
                    i = n(h);
                  else {
                    for (; h !== Math.floor(h); )
                      h *= Math.pow(2, 256), p += 256;
                    i = n(h);
                  }
                else
                  i = n(1);
                return p > 0 ? l = l.ushln(p) : p < 0 && (i = i.ushln(-p)), t(l, i);
              };
            }, { "./div": 17, "./is-rat": 19, "./lib/is-bn": 23, "./lib/num-to-bn": 24, "./lib/rationalize": 25, "./lib/str-to-bn": 26 }], 19: [function(g, k, x) {
              var e = g("./lib/is-bn");
              k.exports = function(r) {
                return Array.isArray(r) && r.length === 2 && e(r[0]) && e(r[1]);
              };
            }, { "./lib/is-bn": 23 }], 20: [function(g, k, x) {
              var e = g("bn.js");
              k.exports = function(r) {
                return r.cmp(new e(0));
              };
            }, { "bn.js": 33 }], 21: [function(g, k, x) {
              var e = g("./bn-sign");
              k.exports = function(r) {
                var n = r.length, s = r.words, t = 0;
                if (n === 1)
                  t = s[0];
                else if (n === 2)
                  t = s[0] + 67108864 * s[1];
                else
                  for (var d = 0; d < n; d++) {
                    var u = s[d];
                    t += u * Math.pow(67108864, d);
                  }
                return e(r) * t;
              };
            }, { "./bn-sign": 20 }], 22: [function(g, k, x) {
              var e = g("double-bits"), r = g("bit-twiddle").countTrailingZeros;
              k.exports = function(n) {
                var s = r(e.lo(n));
                if (s < 32)
                  return s;
                var t = r(e.hi(n));
                return t > 20 ? 52 : t + 32;
              };
            }, { "bit-twiddle": 32, "double-bits": 64 }], 23: [function(g, k, x) {
              g("bn.js"), k.exports = function(e) {
                return e && typeof e == "object" && Boolean(e.words);
              };
            }, { "bn.js": 33 }], 24: [function(g, k, x) {
              var e = g("bn.js"), r = g("double-bits");
              k.exports = function(n) {
                var s = r.exponent(n);
                return s < 52 ? new e(n) : new e(n * Math.pow(2, 52 - s)).ushln(s - 52);
              };
            }, { "bn.js": 33, "double-bits": 64 }], 25: [function(g, k, x) {
              var e = g("./num-to-bn"), r = g("./bn-sign");
              k.exports = function(n, s) {
                var t = r(n), d = r(s);
                if (t === 0)
                  return [e(0), e(1)];
                if (d === 0)
                  return [e(0), e(0)];
                d < 0 && (n = n.neg(), s = s.neg());
                var u = n.gcd(s);
                return u.cmpn(1) ? [n.div(u), s.div(u)] : [n, s];
              };
            }, { "./bn-sign": 20, "./num-to-bn": 24 }], 26: [function(g, k, x) {
              var e = g("bn.js");
              k.exports = function(r) {
                return new e(r);
              };
            }, { "bn.js": 33 }], 27: [function(g, k, x) {
              var e = g("./lib/rationalize");
              k.exports = function(r, n) {
                return e(r[0].mul(n[0]), r[1].mul(n[1]));
              };
            }, { "./lib/rationalize": 25 }], 28: [function(g, k, x) {
              var e = g("./lib/bn-sign");
              k.exports = function(r) {
                return e(r[0]) * e(r[1]);
              };
            }, { "./lib/bn-sign": 20 }], 29: [function(g, k, x) {
              var e = g("./lib/rationalize");
              k.exports = function(r, n) {
                return e(r[0].mul(n[1]).sub(r[1].mul(n[0])), r[1].mul(n[1]));
              };
            }, { "./lib/rationalize": 25 }], 30: [function(g, k, x) {
              var e = g("./lib/bn-to-num"), r = g("./lib/ctz");
              k.exports = function(n) {
                var s = n[0], t = n[1];
                if (s.cmpn(0) === 0)
                  return 0;
                var d = s.abs().divmod(t.abs()), u = d.div, o = e(u), h = d.mod, l = s.negative !== t.negative ? -1 : 1;
                if (h.cmpn(0) === 0)
                  return l * o;
                if (o) {
                  var i = r(o) + 4, p = e(h.ushln(i).divRound(t));
                  return l * (o + p * Math.pow(2, -i));
                }
                var c = t.bitLength() - h.bitLength() + 53;
                return p = e(h.ushln(c).divRound(t)), c < 1023 ? l * p * Math.pow(2, -c) : (p *= Math.pow(2, -1023), l * p * Math.pow(2, 1023 - c));
              };
            }, { "./lib/bn-to-num": 21, "./lib/ctz": 22 }], 31: [function(g, k, x) {
              function e(u, o, h, l, i) {
                for (var p = i + 1; l <= i; ) {
                  var c = l + i >>> 1, a = u[c];
                  (h !== void 0 ? h(a, o) : a - o) >= 0 ? (p = c, i = c - 1) : l = c + 1;
                }
                return p;
              }
              function r(u, o, h, l, i) {
                for (var p = i + 1; l <= i; ) {
                  var c = l + i >>> 1, a = u[c];
                  (h !== void 0 ? h(a, o) : a - o) > 0 ? (p = c, i = c - 1) : l = c + 1;
                }
                return p;
              }
              function n(u, o, h, l, i) {
                for (var p = l - 1; l <= i; ) {
                  var c = l + i >>> 1, a = u[c];
                  (h !== void 0 ? h(a, o) : a - o) < 0 ? (p = c, l = c + 1) : i = c - 1;
                }
                return p;
              }
              function s(u, o, h, l, i) {
                for (var p = l - 1; l <= i; ) {
                  var c = l + i >>> 1, a = u[c];
                  (h !== void 0 ? h(a, o) : a - o) <= 0 ? (p = c, l = c + 1) : i = c - 1;
                }
                return p;
              }
              function t(u, o, h, l, i) {
                for (; l <= i; ) {
                  var p = l + i >>> 1, c = u[p], a = h !== void 0 ? h(c, o) : c - o;
                  if (a === 0)
                    return p;
                  a <= 0 ? l = p + 1 : i = p - 1;
                }
                return -1;
              }
              function d(u, o, h, l, i, p) {
                return typeof h == "function" ? p(u, o, h, l === void 0 ? 0 : 0 | l, i === void 0 ? u.length - 1 : 0 | i) : p(u, o, void 0, h === void 0 ? 0 : 0 | h, l === void 0 ? u.length - 1 : 0 | l);
              }
              k.exports = { ge: function(u, o, h, l, i) {
                return d(u, o, h, l, i, e);
              }, gt: function(u, o, h, l, i) {
                return d(u, o, h, l, i, r);
              }, lt: function(u, o, h, l, i) {
                return d(u, o, h, l, i, n);
              }, le: function(u, o, h, l, i) {
                return d(u, o, h, l, i, s);
              }, eq: function(u, o, h, l, i) {
                return d(u, o, h, l, i, t);
              } };
            }, {}], 32: [function(g, k, x) {
              function e(n) {
                var s = 32;
                return (n &= -n) && s--, 65535 & n && (s -= 16), 16711935 & n && (s -= 8), 252645135 & n && (s -= 4), 858993459 & n && (s -= 2), 1431655765 & n && (s -= 1), s;
              }
              x.INT_BITS = 32, x.INT_MAX = 2147483647, x.INT_MIN = -1 << 31, x.sign = function(n) {
                return (n > 0) - (n < 0);
              }, x.abs = function(n) {
                var s = n >> 31;
                return (n ^ s) - s;
              }, x.min = function(n, s) {
                return s ^ (n ^ s) & -(n < s);
              }, x.max = function(n, s) {
                return n ^ (n ^ s) & -(n < s);
              }, x.isPow2 = function(n) {
                return !(n & n - 1 || !n);
              }, x.log2 = function(n) {
                var s, t;
                return s = (n > 65535) << 4, s |= t = ((n >>>= s) > 255) << 3, s |= t = ((n >>>= t) > 15) << 2, (s |= t = ((n >>>= t) > 3) << 1) | (n >>>= t) >> 1;
              }, x.log10 = function(n) {
                return n >= 1e9 ? 9 : n >= 1e8 ? 8 : n >= 1e7 ? 7 : n >= 1e6 ? 6 : n >= 1e5 ? 5 : n >= 1e4 ? 4 : n >= 1e3 ? 3 : n >= 100 ? 2 : n >= 10 ? 1 : 0;
              }, x.popCount = function(n) {
                return 16843009 * ((n = (858993459 & (n -= n >>> 1 & 1431655765)) + (n >>> 2 & 858993459)) + (n >>> 4) & 252645135) >>> 24;
              }, x.countTrailingZeros = e, x.nextPow2 = function(n) {
                return n += n === 0, --n, n |= n >>> 1, n |= n >>> 2, n |= n >>> 4, n |= n >>> 8, (n |= n >>> 16) + 1;
              }, x.prevPow2 = function(n) {
                return n |= n >>> 1, n |= n >>> 2, n |= n >>> 4, n |= n >>> 8, (n |= n >>> 16) - (n >>> 1);
              }, x.parity = function(n) {
                return n ^= n >>> 16, n ^= n >>> 8, n ^= n >>> 4, 27030 >>> (n &= 15) & 1;
              };
              var r = new Array(256);
              (function(n) {
                for (var s = 0; s < 256; ++s) {
                  var t = s, d = s, u = 7;
                  for (t >>>= 1; t; t >>>= 1)
                    d <<= 1, d |= 1 & t, --u;
                  n[s] = d << u & 255;
                }
              })(r), x.reverse = function(n) {
                return r[255 & n] << 24 | r[n >>> 8 & 255] << 16 | r[n >>> 16 & 255] << 8 | r[n >>> 24 & 255];
              }, x.interleave2 = function(n, s) {
                return (n = 1431655765 & ((n = 858993459 & ((n = 252645135 & ((n = 16711935 & ((n &= 65535) | n << 8)) | n << 4)) | n << 2)) | n << 1)) | (s = 1431655765 & ((s = 858993459 & ((s = 252645135 & ((s = 16711935 & ((s &= 65535) | s << 8)) | s << 4)) | s << 2)) | s << 1)) << 1;
              }, x.deinterleave2 = function(n, s) {
                return (n = 65535 & ((n = 16711935 & ((n = 252645135 & ((n = 858993459 & ((n = n >>> s & 1431655765) | n >>> 1)) | n >>> 2)) | n >>> 4)) | n >>> 16)) << 16 >> 16;
              }, x.interleave3 = function(n, s, t) {
                return n = 1227133513 & ((n = 3272356035 & ((n = 251719695 & ((n = 4278190335 & ((n &= 1023) | n << 16)) | n << 8)) | n << 4)) | n << 2), (n |= (s = 1227133513 & ((s = 3272356035 & ((s = 251719695 & ((s = 4278190335 & ((s &= 1023) | s << 16)) | s << 8)) | s << 4)) | s << 2)) << 1) | (t = 1227133513 & ((t = 3272356035 & ((t = 251719695 & ((t = 4278190335 & ((t &= 1023) | t << 16)) | t << 8)) | t << 4)) | t << 2)) << 2;
              }, x.deinterleave3 = function(n, s) {
                return (n = 1023 & ((n = 4278190335 & ((n = 251719695 & ((n = 3272356035 & ((n = n >>> s & 1227133513) | n >>> 2)) | n >>> 4)) | n >>> 8)) | n >>> 16)) << 22 >> 22;
              }, x.nextCombination = function(n) {
                var s = n | n - 1;
                return s + 1 | (~s & -~s) - 1 >>> e(n) + 1;
              };
            }, {}], 33: [function(g, k, x) {
              (function(e, r) {
                function n(S, E) {
                  if (!S)
                    throw new Error(E || "Assertion failed");
                }
                function s(S, E) {
                  S.super_ = E;
                  var R = function() {
                  };
                  R.prototype = E.prototype, S.prototype = new R(), S.prototype.constructor = S;
                }
                function t(S, E, R) {
                  if (t.isBN(S))
                    return S;
                  this.negative = 0, this.words = null, this.length = 0, this.red = null, S !== null && (E !== "le" && E !== "be" || (R = E, E = 10), this._init(S || 0, E || 10, R || "be"));
                }
                var d;
                typeof e == "object" ? e.exports = t : r.BN = t, t.BN = t, t.wordSize = 26;
                try {
                  d = typeof window < "u" && window.Buffer !== void 0 ? window.Buffer : g("buffer").Buffer;
                } catch {
                }
                function u(S, E) {
                  var R = S.charCodeAt(E);
                  return R >= 65 && R <= 70 ? R - 55 : R >= 97 && R <= 102 ? R - 87 : R - 48 & 15;
                }
                function o(S, E, R) {
                  var z = u(S, R);
                  return R - 1 >= E && (z |= u(S, R - 1) << 4), z;
                }
                function h(S, E, R, z) {
                  for (var j = 0, H = Math.min(S.length, R), Y = E; Y < H; Y++) {
                    var J = S.charCodeAt(Y) - 48;
                    j *= z, j += J >= 49 ? J - 49 + 10 : J >= 17 ? J - 17 + 10 : J;
                  }
                  return j;
                }
                t.isBN = function(S) {
                  return S instanceof t || S !== null && typeof S == "object" && S.constructor.wordSize === t.wordSize && Array.isArray(S.words);
                }, t.max = function(S, E) {
                  return S.cmp(E) > 0 ? S : E;
                }, t.min = function(S, E) {
                  return S.cmp(E) < 0 ? S : E;
                }, t.prototype._init = function(S, E, R) {
                  if (typeof S == "number")
                    return this._initNumber(S, E, R);
                  if (typeof S == "object")
                    return this._initArray(S, E, R);
                  E === "hex" && (E = 16), n(E === (0 | E) && E >= 2 && E <= 36);
                  var z = 0;
                  (S = S.toString().replace(/\s+/g, ""))[0] === "-" && (z++, this.negative = 1), z < S.length && (E === 16 ? this._parseHex(S, z, R) : (this._parseBase(S, E, z), R === "le" && this._initArray(this.toArray(), E, R)));
                }, t.prototype._initNumber = function(S, E, R) {
                  S < 0 && (this.negative = 1, S = -S), S < 67108864 ? (this.words = [67108863 & S], this.length = 1) : S < 4503599627370496 ? (this.words = [67108863 & S, S / 67108864 & 67108863], this.length = 2) : (n(S < 9007199254740992), this.words = [67108863 & S, S / 67108864 & 67108863, 1], this.length = 3), R === "le" && this._initArray(this.toArray(), E, R);
                }, t.prototype._initArray = function(S, E, R) {
                  if (n(typeof S.length == "number"), S.length <= 0)
                    return this.words = [0], this.length = 1, this;
                  this.length = Math.ceil(S.length / 3), this.words = new Array(this.length);
                  for (var z = 0; z < this.length; z++)
                    this.words[z] = 0;
                  var j, H, Y = 0;
                  if (R === "be")
                    for (z = S.length - 1, j = 0; z >= 0; z -= 3)
                      H = S[z] | S[z - 1] << 8 | S[z - 2] << 16, this.words[j] |= H << Y & 67108863, this.words[j + 1] = H >>> 26 - Y & 67108863, (Y += 24) >= 26 && (Y -= 26, j++);
                  else if (R === "le")
                    for (z = 0, j = 0; z < S.length; z += 3)
                      H = S[z] | S[z + 1] << 8 | S[z + 2] << 16, this.words[j] |= H << Y & 67108863, this.words[j + 1] = H >>> 26 - Y & 67108863, (Y += 24) >= 26 && (Y -= 26, j++);
                  return this.strip();
                }, t.prototype._parseHex = function(S, E, R) {
                  this.length = Math.ceil((S.length - E) / 6), this.words = new Array(this.length);
                  for (var z = 0; z < this.length; z++)
                    this.words[z] = 0;
                  var j, H = 0, Y = 0;
                  if (R === "be")
                    for (z = S.length - 1; z >= E; z -= 2)
                      j = o(S, E, z) << H, this.words[Y] |= 67108863 & j, H >= 18 ? (H -= 18, Y += 1, this.words[Y] |= j >>> 26) : H += 8;
                  else
                    for (z = (S.length - E) % 2 == 0 ? E + 1 : E; z < S.length; z += 2)
                      j = o(S, E, z) << H, this.words[Y] |= 67108863 & j, H >= 18 ? (H -= 18, Y += 1, this.words[Y] |= j >>> 26) : H += 8;
                  this.strip();
                }, t.prototype._parseBase = function(S, E, R) {
                  this.words = [0], this.length = 1;
                  for (var z = 0, j = 1; j <= 67108863; j *= E)
                    z++;
                  z--, j = j / E | 0;
                  for (var H = S.length - R, Y = H % z, J = Math.min(H, H - Y) + R, W = 0, Z = R; Z < J; Z += z)
                    W = h(S, Z, Z + z, E), this.imuln(j), this.words[0] + W < 67108864 ? this.words[0] += W : this._iaddn(W);
                  if (Y !== 0) {
                    var re = 1;
                    for (W = h(S, Z, S.length, E), Z = 0; Z < Y; Z++)
                      re *= E;
                    this.imuln(re), this.words[0] + W < 67108864 ? this.words[0] += W : this._iaddn(W);
                  }
                  this.strip();
                }, t.prototype.copy = function(S) {
                  S.words = new Array(this.length);
                  for (var E = 0; E < this.length; E++)
                    S.words[E] = this.words[E];
                  S.length = this.length, S.negative = this.negative, S.red = this.red;
                }, t.prototype.clone = function() {
                  var S = new t(null);
                  return this.copy(S), S;
                }, t.prototype._expand = function(S) {
                  for (; this.length < S; )
                    this.words[this.length++] = 0;
                  return this;
                }, t.prototype.strip = function() {
                  for (; this.length > 1 && this.words[this.length - 1] === 0; )
                    this.length--;
                  return this._normSign();
                }, t.prototype._normSign = function() {
                  return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this;
                }, t.prototype.inspect = function() {
                  return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">";
                };
                var l = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"], i = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], p = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];
                function c(S, E, R) {
                  R.negative = E.negative ^ S.negative;
                  var z = S.length + E.length | 0;
                  R.length = z, z = z - 1 | 0;
                  var j = 0 | S.words[0], H = 0 | E.words[0], Y = j * H, J = 67108863 & Y, W = Y / 67108864 | 0;
                  R.words[0] = J;
                  for (var Z = 1; Z < z; Z++) {
                    for (var re = W >>> 26, V = 67108863 & W, B = Math.min(Z, E.length - 1), U = Math.max(0, Z - S.length + 1); U <= B; U++) {
                      var ee = Z - U | 0;
                      re += (Y = (j = 0 | S.words[ee]) * (H = 0 | E.words[U]) + V) / 67108864 | 0, V = 67108863 & Y;
                    }
                    R.words[Z] = 0 | V, W = 0 | re;
                  }
                  return W !== 0 ? R.words[Z] = 0 | W : R.length--, R.strip();
                }
                t.prototype.toString = function(S, E) {
                  var R;
                  if (E = 0 | E || 1, (S = S || 10) === 16 || S === "hex") {
                    R = "";
                    for (var z = 0, j = 0, H = 0; H < this.length; H++) {
                      var Y = this.words[H], J = (16777215 & (Y << z | j)).toString(16);
                      R = (j = Y >>> 24 - z & 16777215) !== 0 || H !== this.length - 1 ? l[6 - J.length] + J + R : J + R, (z += 2) >= 26 && (z -= 26, H--);
                    }
                    for (j !== 0 && (R = j.toString(16) + R); R.length % E != 0; )
                      R = "0" + R;
                    return this.negative !== 0 && (R = "-" + R), R;
                  }
                  if (S === (0 | S) && S >= 2 && S <= 36) {
                    var W = i[S], Z = p[S];
                    R = "";
                    var re = this.clone();
                    for (re.negative = 0; !re.isZero(); ) {
                      var V = re.modn(Z).toString(S);
                      R = (re = re.idivn(Z)).isZero() ? V + R : l[W - V.length] + V + R;
                    }
                    for (this.isZero() && (R = "0" + R); R.length % E != 0; )
                      R = "0" + R;
                    return this.negative !== 0 && (R = "-" + R), R;
                  }
                  n(!1, "Base should be between 2 and 36");
                }, t.prototype.toNumber = function() {
                  var S = this.words[0];
                  return this.length === 2 ? S += 67108864 * this.words[1] : this.length === 3 && this.words[2] === 1 ? S += 4503599627370496 + 67108864 * this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"), this.negative !== 0 ? -S : S;
                }, t.prototype.toJSON = function() {
                  return this.toString(16);
                }, t.prototype.toBuffer = function(S, E) {
                  return n(d !== void 0), this.toArrayLike(d, S, E);
                }, t.prototype.toArray = function(S, E) {
                  return this.toArrayLike(Array, S, E);
                }, t.prototype.toArrayLike = function(S, E, R) {
                  var z = this.byteLength(), j = R || Math.max(1, z);
                  n(z <= j, "byte array longer than desired length"), n(j > 0, "Requested array length <= 0"), this.strip();
                  var H, Y, J = E === "le", W = new S(j), Z = this.clone();
                  if (J) {
                    for (Y = 0; !Z.isZero(); Y++)
                      H = Z.andln(255), Z.iushrn(8), W[Y] = H;
                    for (; Y < j; Y++)
                      W[Y] = 0;
                  } else {
                    for (Y = 0; Y < j - z; Y++)
                      W[Y] = 0;
                    for (Y = 0; !Z.isZero(); Y++)
                      H = Z.andln(255), Z.iushrn(8), W[j - Y - 1] = H;
                  }
                  return W;
                }, Math.clz32 ? t.prototype._countBits = function(S) {
                  return 32 - Math.clz32(S);
                } : t.prototype._countBits = function(S) {
                  var E = S, R = 0;
                  return E >= 4096 && (R += 13, E >>>= 13), E >= 64 && (R += 7, E >>>= 7), E >= 8 && (R += 4, E >>>= 4), E >= 2 && (R += 2, E >>>= 2), R + E;
                }, t.prototype._zeroBits = function(S) {
                  if (S === 0)
                    return 26;
                  var E = S, R = 0;
                  return (8191 & E) == 0 && (R += 13, E >>>= 13), (127 & E) == 0 && (R += 7, E >>>= 7), (15 & E) == 0 && (R += 4, E >>>= 4), (3 & E) == 0 && (R += 2, E >>>= 2), (1 & E) == 0 && R++, R;
                }, t.prototype.bitLength = function() {
                  var S = this.words[this.length - 1], E = this._countBits(S);
                  return 26 * (this.length - 1) + E;
                }, t.prototype.zeroBits = function() {
                  if (this.isZero())
                    return 0;
                  for (var S = 0, E = 0; E < this.length; E++) {
                    var R = this._zeroBits(this.words[E]);
                    if (S += R, R !== 26)
                      break;
                  }
                  return S;
                }, t.prototype.byteLength = function() {
                  return Math.ceil(this.bitLength() / 8);
                }, t.prototype.toTwos = function(S) {
                  return this.negative !== 0 ? this.abs().inotn(S).iaddn(1) : this.clone();
                }, t.prototype.fromTwos = function(S) {
                  return this.testn(S - 1) ? this.notn(S).iaddn(1).ineg() : this.clone();
                }, t.prototype.isNeg = function() {
                  return this.negative !== 0;
                }, t.prototype.neg = function() {
                  return this.clone().ineg();
                }, t.prototype.ineg = function() {
                  return this.isZero() || (this.negative ^= 1), this;
                }, t.prototype.iuor = function(S) {
                  for (; this.length < S.length; )
                    this.words[this.length++] = 0;
                  for (var E = 0; E < S.length; E++)
                    this.words[E] = this.words[E] | S.words[E];
                  return this.strip();
                }, t.prototype.ior = function(S) {
                  return n((this.negative | S.negative) == 0), this.iuor(S);
                }, t.prototype.or = function(S) {
                  return this.length > S.length ? this.clone().ior(S) : S.clone().ior(this);
                }, t.prototype.uor = function(S) {
                  return this.length > S.length ? this.clone().iuor(S) : S.clone().iuor(this);
                }, t.prototype.iuand = function(S) {
                  var E;
                  E = this.length > S.length ? S : this;
                  for (var R = 0; R < E.length; R++)
                    this.words[R] = this.words[R] & S.words[R];
                  return this.length = E.length, this.strip();
                }, t.prototype.iand = function(S) {
                  return n((this.negative | S.negative) == 0), this.iuand(S);
                }, t.prototype.and = function(S) {
                  return this.length > S.length ? this.clone().iand(S) : S.clone().iand(this);
                }, t.prototype.uand = function(S) {
                  return this.length > S.length ? this.clone().iuand(S) : S.clone().iuand(this);
                }, t.prototype.iuxor = function(S) {
                  var E, R;
                  this.length > S.length ? (E = this, R = S) : (E = S, R = this);
                  for (var z = 0; z < R.length; z++)
                    this.words[z] = E.words[z] ^ R.words[z];
                  if (this !== E)
                    for (; z < E.length; z++)
                      this.words[z] = E.words[z];
                  return this.length = E.length, this.strip();
                }, t.prototype.ixor = function(S) {
                  return n((this.negative | S.negative) == 0), this.iuxor(S);
                }, t.prototype.xor = function(S) {
                  return this.length > S.length ? this.clone().ixor(S) : S.clone().ixor(this);
                }, t.prototype.uxor = function(S) {
                  return this.length > S.length ? this.clone().iuxor(S) : S.clone().iuxor(this);
                }, t.prototype.inotn = function(S) {
                  n(typeof S == "number" && S >= 0);
                  var E = 0 | Math.ceil(S / 26), R = S % 26;
                  this._expand(E), R > 0 && E--;
                  for (var z = 0; z < E; z++)
                    this.words[z] = 67108863 & ~this.words[z];
                  return R > 0 && (this.words[z] = ~this.words[z] & 67108863 >> 26 - R), this.strip();
                }, t.prototype.notn = function(S) {
                  return this.clone().inotn(S);
                }, t.prototype.setn = function(S, E) {
                  n(typeof S == "number" && S >= 0);
                  var R = S / 26 | 0, z = S % 26;
                  return this._expand(R + 1), this.words[R] = E ? this.words[R] | 1 << z : this.words[R] & ~(1 << z), this.strip();
                }, t.prototype.iadd = function(S) {
                  var E, R, z;
                  if (this.negative !== 0 && S.negative === 0)
                    return this.negative = 0, E = this.isub(S), this.negative ^= 1, this._normSign();
                  if (this.negative === 0 && S.negative !== 0)
                    return S.negative = 0, E = this.isub(S), S.negative = 1, E._normSign();
                  this.length > S.length ? (R = this, z = S) : (R = S, z = this);
                  for (var j = 0, H = 0; H < z.length; H++)
                    E = (0 | R.words[H]) + (0 | z.words[H]) + j, this.words[H] = 67108863 & E, j = E >>> 26;
                  for (; j !== 0 && H < R.length; H++)
                    E = (0 | R.words[H]) + j, this.words[H] = 67108863 & E, j = E >>> 26;
                  if (this.length = R.length, j !== 0)
                    this.words[this.length] = j, this.length++;
                  else if (R !== this)
                    for (; H < R.length; H++)
                      this.words[H] = R.words[H];
                  return this;
                }, t.prototype.add = function(S) {
                  var E;
                  return S.negative !== 0 && this.negative === 0 ? (S.negative = 0, E = this.sub(S), S.negative ^= 1, E) : S.negative === 0 && this.negative !== 0 ? (this.negative = 0, E = S.sub(this), this.negative = 1, E) : this.length > S.length ? this.clone().iadd(S) : S.clone().iadd(this);
                }, t.prototype.isub = function(S) {
                  if (S.negative !== 0) {
                    S.negative = 0;
                    var E = this.iadd(S);
                    return S.negative = 1, E._normSign();
                  }
                  if (this.negative !== 0)
                    return this.negative = 0, this.iadd(S), this.negative = 1, this._normSign();
                  var R, z, j = this.cmp(S);
                  if (j === 0)
                    return this.negative = 0, this.length = 1, this.words[0] = 0, this;
                  j > 0 ? (R = this, z = S) : (R = S, z = this);
                  for (var H = 0, Y = 0; Y < z.length; Y++)
                    H = (E = (0 | R.words[Y]) - (0 | z.words[Y]) + H) >> 26, this.words[Y] = 67108863 & E;
                  for (; H !== 0 && Y < R.length; Y++)
                    H = (E = (0 | R.words[Y]) + H) >> 26, this.words[Y] = 67108863 & E;
                  if (H === 0 && Y < R.length && R !== this)
                    for (; Y < R.length; Y++)
                      this.words[Y] = R.words[Y];
                  return this.length = Math.max(this.length, Y), R !== this && (this.negative = 1), this.strip();
                }, t.prototype.sub = function(S) {
                  return this.clone().isub(S);
                };
                var a = function(S, E, R) {
                  var z, j, H, Y = S.words, J = E.words, W = R.words, Z = 0, re = 0 | Y[0], V = 8191 & re, B = re >>> 13, U = 0 | Y[1], ee = 8191 & U, N = U >>> 13, K = 0 | Y[2], X = 8191 & K, te = K >>> 13, ie = 0 | Y[3], le = 8191 & ie, oe = ie >>> 13, ve = 0 | Y[4], ue = 8191 & ve, ye = ve >>> 13, Ae = 0 | Y[5], pe = 8191 & Ae, ge = Ae >>> 13, we = 0 | Y[6], se = 8191 & we, de = we >>> 13, Te = 0 | Y[7], Ee = 8191 & Te, Me = Te >>> 13, ze = 0 | Y[8], Ie = 8191 & ze, Oe = ze >>> 13, Ze = 0 | Y[9], Fe = 8191 & Ze, Pe = Ze >>> 13, De = 0 | J[0], Ge = 8191 & De, Qe = De >>> 13, ot = 0 | J[1], vt = 8191 & ot, bt = ot >>> 13, yt = 0 | J[2], tt = 8191 & yt, Ke = yt >>> 13, mt = 0 | J[3], Ft = 8191 & mt, Vt = mt >>> 13, Xt = 0 | J[4], Gt = 8191 & Xt, nr = Xt >>> 13, It = 0 | J[5], Be = 8191 & It, He = It >>> 13, he = 0 | J[6], be = 8191 & he, Re = he >>> 13, Ue = 0 | J[7], Xe = 8191 & Ue, qe = Ue >>> 13, st = 0 | J[8], it = 8191 & st, Tt = st >>> 13, Pt = 0 | J[9], rt = 8191 & Pt, ut = Pt >>> 13;
                  R.negative = S.negative ^ E.negative, R.length = 19;
                  var Bt = (Z + (z = Math.imul(V, Ge)) | 0) + ((8191 & (j = (j = Math.imul(V, Qe)) + Math.imul(B, Ge) | 0)) << 13) | 0;
                  Z = ((H = Math.imul(B, Qe)) + (j >>> 13) | 0) + (Bt >>> 26) | 0, Bt &= 67108863, z = Math.imul(ee, Ge), j = (j = Math.imul(ee, Qe)) + Math.imul(N, Ge) | 0, H = Math.imul(N, Qe);
                  var wt = (Z + (z = z + Math.imul(V, vt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, bt) | 0) + Math.imul(B, vt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, bt) | 0) + (j >>> 13) | 0) + (wt >>> 26) | 0, wt &= 67108863, z = Math.imul(X, Ge), j = (j = Math.imul(X, Qe)) + Math.imul(te, Ge) | 0, H = Math.imul(te, Qe), z = z + Math.imul(ee, vt) | 0, j = (j = j + Math.imul(ee, bt) | 0) + Math.imul(N, vt) | 0, H = H + Math.imul(N, bt) | 0;
                  var Lt = (Z + (z = z + Math.imul(V, tt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, Ke) | 0) + Math.imul(B, tt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, Ke) | 0) + (j >>> 13) | 0) + (Lt >>> 26) | 0, Lt &= 67108863, z = Math.imul(le, Ge), j = (j = Math.imul(le, Qe)) + Math.imul(oe, Ge) | 0, H = Math.imul(oe, Qe), z = z + Math.imul(X, vt) | 0, j = (j = j + Math.imul(X, bt) | 0) + Math.imul(te, vt) | 0, H = H + Math.imul(te, bt) | 0, z = z + Math.imul(ee, tt) | 0, j = (j = j + Math.imul(ee, Ke) | 0) + Math.imul(N, tt) | 0, H = H + Math.imul(N, Ke) | 0;
                  var Se = (Z + (z = z + Math.imul(V, Ft) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, Vt) | 0) + Math.imul(B, Ft) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, Vt) | 0) + (j >>> 13) | 0) + (Se >>> 26) | 0, Se &= 67108863, z = Math.imul(ue, Ge), j = (j = Math.imul(ue, Qe)) + Math.imul(ye, Ge) | 0, H = Math.imul(ye, Qe), z = z + Math.imul(le, vt) | 0, j = (j = j + Math.imul(le, bt) | 0) + Math.imul(oe, vt) | 0, H = H + Math.imul(oe, bt) | 0, z = z + Math.imul(X, tt) | 0, j = (j = j + Math.imul(X, Ke) | 0) + Math.imul(te, tt) | 0, H = H + Math.imul(te, Ke) | 0, z = z + Math.imul(ee, Ft) | 0, j = (j = j + Math.imul(ee, Vt) | 0) + Math.imul(N, Ft) | 0, H = H + Math.imul(N, Vt) | 0;
                  var We = (Z + (z = z + Math.imul(V, Gt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, nr) | 0) + Math.imul(B, Gt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, nr) | 0) + (j >>> 13) | 0) + (We >>> 26) | 0, We &= 67108863, z = Math.imul(pe, Ge), j = (j = Math.imul(pe, Qe)) + Math.imul(ge, Ge) | 0, H = Math.imul(ge, Qe), z = z + Math.imul(ue, vt) | 0, j = (j = j + Math.imul(ue, bt) | 0) + Math.imul(ye, vt) | 0, H = H + Math.imul(ye, bt) | 0, z = z + Math.imul(le, tt) | 0, j = (j = j + Math.imul(le, Ke) | 0) + Math.imul(oe, tt) | 0, H = H + Math.imul(oe, Ke) | 0, z = z + Math.imul(X, Ft) | 0, j = (j = j + Math.imul(X, Vt) | 0) + Math.imul(te, Ft) | 0, H = H + Math.imul(te, Vt) | 0, z = z + Math.imul(ee, Gt) | 0, j = (j = j + Math.imul(ee, nr) | 0) + Math.imul(N, Gt) | 0, H = H + Math.imul(N, nr) | 0;
                  var nt = (Z + (z = z + Math.imul(V, Be) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, He) | 0) + Math.imul(B, Be) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, He) | 0) + (j >>> 13) | 0) + (nt >>> 26) | 0, nt &= 67108863, z = Math.imul(se, Ge), j = (j = Math.imul(se, Qe)) + Math.imul(de, Ge) | 0, H = Math.imul(de, Qe), z = z + Math.imul(pe, vt) | 0, j = (j = j + Math.imul(pe, bt) | 0) + Math.imul(ge, vt) | 0, H = H + Math.imul(ge, bt) | 0, z = z + Math.imul(ue, tt) | 0, j = (j = j + Math.imul(ue, Ke) | 0) + Math.imul(ye, tt) | 0, H = H + Math.imul(ye, Ke) | 0, z = z + Math.imul(le, Ft) | 0, j = (j = j + Math.imul(le, Vt) | 0) + Math.imul(oe, Ft) | 0, H = H + Math.imul(oe, Vt) | 0, z = z + Math.imul(X, Gt) | 0, j = (j = j + Math.imul(X, nr) | 0) + Math.imul(te, Gt) | 0, H = H + Math.imul(te, nr) | 0, z = z + Math.imul(ee, Be) | 0, j = (j = j + Math.imul(ee, He) | 0) + Math.imul(N, Be) | 0, H = H + Math.imul(N, He) | 0;
                  var ft = (Z + (z = z + Math.imul(V, be) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, Re) | 0) + Math.imul(B, be) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, Re) | 0) + (j >>> 13) | 0) + (ft >>> 26) | 0, ft &= 67108863, z = Math.imul(Ee, Ge), j = (j = Math.imul(Ee, Qe)) + Math.imul(Me, Ge) | 0, H = Math.imul(Me, Qe), z = z + Math.imul(se, vt) | 0, j = (j = j + Math.imul(se, bt) | 0) + Math.imul(de, vt) | 0, H = H + Math.imul(de, bt) | 0, z = z + Math.imul(pe, tt) | 0, j = (j = j + Math.imul(pe, Ke) | 0) + Math.imul(ge, tt) | 0, H = H + Math.imul(ge, Ke) | 0, z = z + Math.imul(ue, Ft) | 0, j = (j = j + Math.imul(ue, Vt) | 0) + Math.imul(ye, Ft) | 0, H = H + Math.imul(ye, Vt) | 0, z = z + Math.imul(le, Gt) | 0, j = (j = j + Math.imul(le, nr) | 0) + Math.imul(oe, Gt) | 0, H = H + Math.imul(oe, nr) | 0, z = z + Math.imul(X, Be) | 0, j = (j = j + Math.imul(X, He) | 0) + Math.imul(te, Be) | 0, H = H + Math.imul(te, He) | 0, z = z + Math.imul(ee, be) | 0, j = (j = j + Math.imul(ee, Re) | 0) + Math.imul(N, be) | 0, H = H + Math.imul(N, Re) | 0;
                  var Mt = (Z + (z = z + Math.imul(V, Xe) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, qe) | 0) + Math.imul(B, Xe) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, qe) | 0) + (j >>> 13) | 0) + (Mt >>> 26) | 0, Mt &= 67108863, z = Math.imul(Ie, Ge), j = (j = Math.imul(Ie, Qe)) + Math.imul(Oe, Ge) | 0, H = Math.imul(Oe, Qe), z = z + Math.imul(Ee, vt) | 0, j = (j = j + Math.imul(Ee, bt) | 0) + Math.imul(Me, vt) | 0, H = H + Math.imul(Me, bt) | 0, z = z + Math.imul(se, tt) | 0, j = (j = j + Math.imul(se, Ke) | 0) + Math.imul(de, tt) | 0, H = H + Math.imul(de, Ke) | 0, z = z + Math.imul(pe, Ft) | 0, j = (j = j + Math.imul(pe, Vt) | 0) + Math.imul(ge, Ft) | 0, H = H + Math.imul(ge, Vt) | 0, z = z + Math.imul(ue, Gt) | 0, j = (j = j + Math.imul(ue, nr) | 0) + Math.imul(ye, Gt) | 0, H = H + Math.imul(ye, nr) | 0, z = z + Math.imul(le, Be) | 0, j = (j = j + Math.imul(le, He) | 0) + Math.imul(oe, Be) | 0, H = H + Math.imul(oe, He) | 0, z = z + Math.imul(X, be) | 0, j = (j = j + Math.imul(X, Re) | 0) + Math.imul(te, be) | 0, H = H + Math.imul(te, Re) | 0, z = z + Math.imul(ee, Xe) | 0, j = (j = j + Math.imul(ee, qe) | 0) + Math.imul(N, Xe) | 0, H = H + Math.imul(N, qe) | 0;
                  var Nt = (Z + (z = z + Math.imul(V, it) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, Tt) | 0) + Math.imul(B, it) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, Tt) | 0) + (j >>> 13) | 0) + (Nt >>> 26) | 0, Nt &= 67108863, z = Math.imul(Fe, Ge), j = (j = Math.imul(Fe, Qe)) + Math.imul(Pe, Ge) | 0, H = Math.imul(Pe, Qe), z = z + Math.imul(Ie, vt) | 0, j = (j = j + Math.imul(Ie, bt) | 0) + Math.imul(Oe, vt) | 0, H = H + Math.imul(Oe, bt) | 0, z = z + Math.imul(Ee, tt) | 0, j = (j = j + Math.imul(Ee, Ke) | 0) + Math.imul(Me, tt) | 0, H = H + Math.imul(Me, Ke) | 0, z = z + Math.imul(se, Ft) | 0, j = (j = j + Math.imul(se, Vt) | 0) + Math.imul(de, Ft) | 0, H = H + Math.imul(de, Vt) | 0, z = z + Math.imul(pe, Gt) | 0, j = (j = j + Math.imul(pe, nr) | 0) + Math.imul(ge, Gt) | 0, H = H + Math.imul(ge, nr) | 0, z = z + Math.imul(ue, Be) | 0, j = (j = j + Math.imul(ue, He) | 0) + Math.imul(ye, Be) | 0, H = H + Math.imul(ye, He) | 0, z = z + Math.imul(le, be) | 0, j = (j = j + Math.imul(le, Re) | 0) + Math.imul(oe, be) | 0, H = H + Math.imul(oe, Re) | 0, z = z + Math.imul(X, Xe) | 0, j = (j = j + Math.imul(X, qe) | 0) + Math.imul(te, Xe) | 0, H = H + Math.imul(te, qe) | 0, z = z + Math.imul(ee, it) | 0, j = (j = j + Math.imul(ee, Tt) | 0) + Math.imul(N, it) | 0, H = H + Math.imul(N, Tt) | 0;
                  var Zt = (Z + (z = z + Math.imul(V, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(V, ut) | 0) + Math.imul(B, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(B, ut) | 0) + (j >>> 13) | 0) + (Zt >>> 26) | 0, Zt &= 67108863, z = Math.imul(Fe, vt), j = (j = Math.imul(Fe, bt)) + Math.imul(Pe, vt) | 0, H = Math.imul(Pe, bt), z = z + Math.imul(Ie, tt) | 0, j = (j = j + Math.imul(Ie, Ke) | 0) + Math.imul(Oe, tt) | 0, H = H + Math.imul(Oe, Ke) | 0, z = z + Math.imul(Ee, Ft) | 0, j = (j = j + Math.imul(Ee, Vt) | 0) + Math.imul(Me, Ft) | 0, H = H + Math.imul(Me, Vt) | 0, z = z + Math.imul(se, Gt) | 0, j = (j = j + Math.imul(se, nr) | 0) + Math.imul(de, Gt) | 0, H = H + Math.imul(de, nr) | 0, z = z + Math.imul(pe, Be) | 0, j = (j = j + Math.imul(pe, He) | 0) + Math.imul(ge, Be) | 0, H = H + Math.imul(ge, He) | 0, z = z + Math.imul(ue, be) | 0, j = (j = j + Math.imul(ue, Re) | 0) + Math.imul(ye, be) | 0, H = H + Math.imul(ye, Re) | 0, z = z + Math.imul(le, Xe) | 0, j = (j = j + Math.imul(le, qe) | 0) + Math.imul(oe, Xe) | 0, H = H + Math.imul(oe, qe) | 0, z = z + Math.imul(X, it) | 0, j = (j = j + Math.imul(X, Tt) | 0) + Math.imul(te, it) | 0, H = H + Math.imul(te, Tt) | 0;
                  var Ut = (Z + (z = z + Math.imul(ee, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(ee, ut) | 0) + Math.imul(N, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(N, ut) | 0) + (j >>> 13) | 0) + (Ut >>> 26) | 0, Ut &= 67108863, z = Math.imul(Fe, tt), j = (j = Math.imul(Fe, Ke)) + Math.imul(Pe, tt) | 0, H = Math.imul(Pe, Ke), z = z + Math.imul(Ie, Ft) | 0, j = (j = j + Math.imul(Ie, Vt) | 0) + Math.imul(Oe, Ft) | 0, H = H + Math.imul(Oe, Vt) | 0, z = z + Math.imul(Ee, Gt) | 0, j = (j = j + Math.imul(Ee, nr) | 0) + Math.imul(Me, Gt) | 0, H = H + Math.imul(Me, nr) | 0, z = z + Math.imul(se, Be) | 0, j = (j = j + Math.imul(se, He) | 0) + Math.imul(de, Be) | 0, H = H + Math.imul(de, He) | 0, z = z + Math.imul(pe, be) | 0, j = (j = j + Math.imul(pe, Re) | 0) + Math.imul(ge, be) | 0, H = H + Math.imul(ge, Re) | 0, z = z + Math.imul(ue, Xe) | 0, j = (j = j + Math.imul(ue, qe) | 0) + Math.imul(ye, Xe) | 0, H = H + Math.imul(ye, qe) | 0, z = z + Math.imul(le, it) | 0, j = (j = j + Math.imul(le, Tt) | 0) + Math.imul(oe, it) | 0, H = H + Math.imul(oe, Tt) | 0;
                  var fr = (Z + (z = z + Math.imul(X, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(X, ut) | 0) + Math.imul(te, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(te, ut) | 0) + (j >>> 13) | 0) + (fr >>> 26) | 0, fr &= 67108863, z = Math.imul(Fe, Ft), j = (j = Math.imul(Fe, Vt)) + Math.imul(Pe, Ft) | 0, H = Math.imul(Pe, Vt), z = z + Math.imul(Ie, Gt) | 0, j = (j = j + Math.imul(Ie, nr) | 0) + Math.imul(Oe, Gt) | 0, H = H + Math.imul(Oe, nr) | 0, z = z + Math.imul(Ee, Be) | 0, j = (j = j + Math.imul(Ee, He) | 0) + Math.imul(Me, Be) | 0, H = H + Math.imul(Me, He) | 0, z = z + Math.imul(se, be) | 0, j = (j = j + Math.imul(se, Re) | 0) + Math.imul(de, be) | 0, H = H + Math.imul(de, Re) | 0, z = z + Math.imul(pe, Xe) | 0, j = (j = j + Math.imul(pe, qe) | 0) + Math.imul(ge, Xe) | 0, H = H + Math.imul(ge, qe) | 0, z = z + Math.imul(ue, it) | 0, j = (j = j + Math.imul(ue, Tt) | 0) + Math.imul(ye, it) | 0, H = H + Math.imul(ye, Tt) | 0;
                  var Tr = (Z + (z = z + Math.imul(le, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(le, ut) | 0) + Math.imul(oe, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(oe, ut) | 0) + (j >>> 13) | 0) + (Tr >>> 26) | 0, Tr &= 67108863, z = Math.imul(Fe, Gt), j = (j = Math.imul(Fe, nr)) + Math.imul(Pe, Gt) | 0, H = Math.imul(Pe, nr), z = z + Math.imul(Ie, Be) | 0, j = (j = j + Math.imul(Ie, He) | 0) + Math.imul(Oe, Be) | 0, H = H + Math.imul(Oe, He) | 0, z = z + Math.imul(Ee, be) | 0, j = (j = j + Math.imul(Ee, Re) | 0) + Math.imul(Me, be) | 0, H = H + Math.imul(Me, Re) | 0, z = z + Math.imul(se, Xe) | 0, j = (j = j + Math.imul(se, qe) | 0) + Math.imul(de, Xe) | 0, H = H + Math.imul(de, qe) | 0, z = z + Math.imul(pe, it) | 0, j = (j = j + Math.imul(pe, Tt) | 0) + Math.imul(ge, it) | 0, H = H + Math.imul(ge, Tt) | 0;
                  var ur = (Z + (z = z + Math.imul(ue, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(ue, ut) | 0) + Math.imul(ye, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(ye, ut) | 0) + (j >>> 13) | 0) + (ur >>> 26) | 0, ur &= 67108863, z = Math.imul(Fe, Be), j = (j = Math.imul(Fe, He)) + Math.imul(Pe, Be) | 0, H = Math.imul(Pe, He), z = z + Math.imul(Ie, be) | 0, j = (j = j + Math.imul(Ie, Re) | 0) + Math.imul(Oe, be) | 0, H = H + Math.imul(Oe, Re) | 0, z = z + Math.imul(Ee, Xe) | 0, j = (j = j + Math.imul(Ee, qe) | 0) + Math.imul(Me, Xe) | 0, H = H + Math.imul(Me, qe) | 0, z = z + Math.imul(se, it) | 0, j = (j = j + Math.imul(se, Tt) | 0) + Math.imul(de, it) | 0, H = H + Math.imul(de, Tt) | 0;
                  var Kt = (Z + (z = z + Math.imul(pe, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(pe, ut) | 0) + Math.imul(ge, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(ge, ut) | 0) + (j >>> 13) | 0) + (Kt >>> 26) | 0, Kt &= 67108863, z = Math.imul(Fe, be), j = (j = Math.imul(Fe, Re)) + Math.imul(Pe, be) | 0, H = Math.imul(Pe, Re), z = z + Math.imul(Ie, Xe) | 0, j = (j = j + Math.imul(Ie, qe) | 0) + Math.imul(Oe, Xe) | 0, H = H + Math.imul(Oe, qe) | 0, z = z + Math.imul(Ee, it) | 0, j = (j = j + Math.imul(Ee, Tt) | 0) + Math.imul(Me, it) | 0, H = H + Math.imul(Me, Tt) | 0;
                  var $t = (Z + (z = z + Math.imul(se, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(se, ut) | 0) + Math.imul(de, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(de, ut) | 0) + (j >>> 13) | 0) + ($t >>> 26) | 0, $t &= 67108863, z = Math.imul(Fe, Xe), j = (j = Math.imul(Fe, qe)) + Math.imul(Pe, Xe) | 0, H = Math.imul(Pe, qe), z = z + Math.imul(Ie, it) | 0, j = (j = j + Math.imul(Ie, Tt) | 0) + Math.imul(Oe, it) | 0, H = H + Math.imul(Oe, Tt) | 0;
                  var er = (Z + (z = z + Math.imul(Ee, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(Ee, ut) | 0) + Math.imul(Me, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(Me, ut) | 0) + (j >>> 13) | 0) + (er >>> 26) | 0, er &= 67108863, z = Math.imul(Fe, it), j = (j = Math.imul(Fe, Tt)) + Math.imul(Pe, it) | 0, H = Math.imul(Pe, Tt);
                  var cr = (Z + (z = z + Math.imul(Ie, rt) | 0) | 0) + ((8191 & (j = (j = j + Math.imul(Ie, ut) | 0) + Math.imul(Oe, rt) | 0)) << 13) | 0;
                  Z = ((H = H + Math.imul(Oe, ut) | 0) + (j >>> 13) | 0) + (cr >>> 26) | 0, cr &= 67108863;
                  var gr = (Z + (z = Math.imul(Fe, rt)) | 0) + ((8191 & (j = (j = Math.imul(Fe, ut)) + Math.imul(Pe, rt) | 0)) << 13) | 0;
                  return Z = ((H = Math.imul(Pe, ut)) + (j >>> 13) | 0) + (gr >>> 26) | 0, gr &= 67108863, W[0] = Bt, W[1] = wt, W[2] = Lt, W[3] = Se, W[4] = We, W[5] = nt, W[6] = ft, W[7] = Mt, W[8] = Nt, W[9] = Zt, W[10] = Ut, W[11] = fr, W[12] = Tr, W[13] = ur, W[14] = Kt, W[15] = $t, W[16] = er, W[17] = cr, W[18] = gr, Z !== 0 && (W[19] = Z, R.length++), R;
                };
                function y(S, E, R) {
                  return new f().mulp(S, E, R);
                }
                function f(S, E) {
                  this.x = S, this.y = E;
                }
                Math.imul || (a = c), t.prototype.mulTo = function(S, E) {
                  var R = this.length + S.length;
                  return this.length === 10 && S.length === 10 ? a(this, S, E) : R < 63 ? c(this, S, E) : R < 1024 ? function(z, j, H) {
                    H.negative = j.negative ^ z.negative, H.length = z.length + j.length;
                    for (var Y = 0, J = 0, W = 0; W < H.length - 1; W++) {
                      var Z = J;
                      J = 0;
                      for (var re = 67108863 & Y, V = Math.min(W, j.length - 1), B = Math.max(0, W - z.length + 1); B <= V; B++) {
                        var U = W - B, ee = (0 | z.words[U]) * (0 | j.words[B]), N = 67108863 & ee;
                        re = 67108863 & (N = N + re | 0), J += (Z = (Z = Z + (ee / 67108864 | 0) | 0) + (N >>> 26) | 0) >>> 26, Z &= 67108863;
                      }
                      H.words[W] = re, Y = Z, Z = J;
                    }
                    return Y !== 0 ? H.words[W] = Y : H.length--, H.strip();
                  }(this, S, E) : y(this, S, E);
                }, f.prototype.makeRBT = function(S) {
                  for (var E = new Array(S), R = t.prototype._countBits(S) - 1, z = 0; z < S; z++)
                    E[z] = this.revBin(z, R, S);
                  return E;
                }, f.prototype.revBin = function(S, E, R) {
                  if (S === 0 || S === R - 1)
                    return S;
                  for (var z = 0, j = 0; j < E; j++)
                    z |= (1 & S) << E - j - 1, S >>= 1;
                  return z;
                }, f.prototype.permute = function(S, E, R, z, j, H) {
                  for (var Y = 0; Y < H; Y++)
                    z[Y] = E[S[Y]], j[Y] = R[S[Y]];
                }, f.prototype.transform = function(S, E, R, z, j, H) {
                  this.permute(H, S, E, R, z, j);
                  for (var Y = 1; Y < j; Y <<= 1)
                    for (var J = Y << 1, W = Math.cos(2 * Math.PI / J), Z = Math.sin(2 * Math.PI / J), re = 0; re < j; re += J)
                      for (var V = W, B = Z, U = 0; U < Y; U++) {
                        var ee = R[re + U], N = z[re + U], K = R[re + U + Y], X = z[re + U + Y], te = V * K - B * X;
                        X = V * X + B * K, K = te, R[re + U] = ee + K, z[re + U] = N + X, R[re + U + Y] = ee - K, z[re + U + Y] = N - X, U !== J && (te = W * V - Z * B, B = W * B + Z * V, V = te);
                      }
                }, f.prototype.guessLen13b = function(S, E) {
                  var R = 1 | Math.max(E, S), z = 1 & R, j = 0;
                  for (R = R / 2 | 0; R; R >>>= 1)
                    j++;
                  return 1 << j + 1 + z;
                }, f.prototype.conjugate = function(S, E, R) {
                  if (!(R <= 1))
                    for (var z = 0; z < R / 2; z++) {
                      var j = S[z];
                      S[z] = S[R - z - 1], S[R - z - 1] = j, j = E[z], E[z] = -E[R - z - 1], E[R - z - 1] = -j;
                    }
                }, f.prototype.normalize13b = function(S, E) {
                  for (var R = 0, z = 0; z < E / 2; z++) {
                    var j = 8192 * Math.round(S[2 * z + 1] / E) + Math.round(S[2 * z] / E) + R;
                    S[z] = 67108863 & j, R = j < 67108864 ? 0 : j / 67108864 | 0;
                  }
                  return S;
                }, f.prototype.convert13b = function(S, E, R, z) {
                  for (var j = 0, H = 0; H < E; H++)
                    j += 0 | S[H], R[2 * H] = 8191 & j, j >>>= 13, R[2 * H + 1] = 8191 & j, j >>>= 13;
                  for (H = 2 * E; H < z; ++H)
                    R[H] = 0;
                  n(j === 0), n((-8192 & j) == 0);
                }, f.prototype.stub = function(S) {
                  for (var E = new Array(S), R = 0; R < S; R++)
                    E[R] = 0;
                  return E;
                }, f.prototype.mulp = function(S, E, R) {
                  var z = 2 * this.guessLen13b(S.length, E.length), j = this.makeRBT(z), H = this.stub(z), Y = new Array(z), J = new Array(z), W = new Array(z), Z = new Array(z), re = new Array(z), V = new Array(z), B = R.words;
                  B.length = z, this.convert13b(S.words, S.length, Y, z), this.convert13b(E.words, E.length, Z, z), this.transform(Y, H, J, W, z, j), this.transform(Z, H, re, V, z, j);
                  for (var U = 0; U < z; U++) {
                    var ee = J[U] * re[U] - W[U] * V[U];
                    W[U] = J[U] * V[U] + W[U] * re[U], J[U] = ee;
                  }
                  return this.conjugate(J, W, z), this.transform(J, W, B, H, z, j), this.conjugate(B, H, z), this.normalize13b(B, z), R.negative = S.negative ^ E.negative, R.length = S.length + E.length, R.strip();
                }, t.prototype.mul = function(S) {
                  var E = new t(null);
                  return E.words = new Array(this.length + S.length), this.mulTo(S, E);
                }, t.prototype.mulf = function(S) {
                  var E = new t(null);
                  return E.words = new Array(this.length + S.length), y(this, S, E);
                }, t.prototype.imul = function(S) {
                  return this.clone().mulTo(S, this);
                }, t.prototype.imuln = function(S) {
                  n(typeof S == "number"), n(S < 67108864);
                  for (var E = 0, R = 0; R < this.length; R++) {
                    var z = (0 | this.words[R]) * S, j = (67108863 & z) + (67108863 & E);
                    E >>= 26, E += z / 67108864 | 0, E += j >>> 26, this.words[R] = 67108863 & j;
                  }
                  return E !== 0 && (this.words[R] = E, this.length++), this;
                }, t.prototype.muln = function(S) {
                  return this.clone().imuln(S);
                }, t.prototype.sqr = function() {
                  return this.mul(this);
                }, t.prototype.isqr = function() {
                  return this.imul(this.clone());
                }, t.prototype.pow = function(S) {
                  var E = function(H) {
                    for (var Y = new Array(H.bitLength()), J = 0; J < Y.length; J++) {
                      var W = J / 26 | 0, Z = J % 26;
                      Y[J] = (H.words[W] & 1 << Z) >>> Z;
                    }
                    return Y;
                  }(S);
                  if (E.length === 0)
                    return new t(1);
                  for (var R = this, z = 0; z < E.length && E[z] === 0; z++, R = R.sqr())
                    ;
                  if (++z < E.length)
                    for (var j = R.sqr(); z < E.length; z++, j = j.sqr())
                      E[z] !== 0 && (R = R.mul(j));
                  return R;
                }, t.prototype.iushln = function(S) {
                  n(typeof S == "number" && S >= 0);
                  var E, R = S % 26, z = (S - R) / 26, j = 67108863 >>> 26 - R << 26 - R;
                  if (R !== 0) {
                    var H = 0;
                    for (E = 0; E < this.length; E++) {
                      var Y = this.words[E] & j, J = (0 | this.words[E]) - Y << R;
                      this.words[E] = J | H, H = Y >>> 26 - R;
                    }
                    H && (this.words[E] = H, this.length++);
                  }
                  if (z !== 0) {
                    for (E = this.length - 1; E >= 0; E--)
                      this.words[E + z] = this.words[E];
                    for (E = 0; E < z; E++)
                      this.words[E] = 0;
                    this.length += z;
                  }
                  return this.strip();
                }, t.prototype.ishln = function(S) {
                  return n(this.negative === 0), this.iushln(S);
                }, t.prototype.iushrn = function(S, E, R) {
                  var z;
                  n(typeof S == "number" && S >= 0), z = E ? (E - E % 26) / 26 : 0;
                  var j = S % 26, H = Math.min((S - j) / 26, this.length), Y = 67108863 ^ 67108863 >>> j << j, J = R;
                  if (z -= H, z = Math.max(0, z), J) {
                    for (var W = 0; W < H; W++)
                      J.words[W] = this.words[W];
                    J.length = H;
                  }
                  if (H !== 0)
                    if (this.length > H)
                      for (this.length -= H, W = 0; W < this.length; W++)
                        this.words[W] = this.words[W + H];
                    else
                      this.words[0] = 0, this.length = 1;
                  var Z = 0;
                  for (W = this.length - 1; W >= 0 && (Z !== 0 || W >= z); W--) {
                    var re = 0 | this.words[W];
                    this.words[W] = Z << 26 - j | re >>> j, Z = re & Y;
                  }
                  return J && Z !== 0 && (J.words[J.length++] = Z), this.length === 0 && (this.words[0] = 0, this.length = 1), this.strip();
                }, t.prototype.ishrn = function(S, E, R) {
                  return n(this.negative === 0), this.iushrn(S, E, R);
                }, t.prototype.shln = function(S) {
                  return this.clone().ishln(S);
                }, t.prototype.ushln = function(S) {
                  return this.clone().iushln(S);
                }, t.prototype.shrn = function(S) {
                  return this.clone().ishrn(S);
                }, t.prototype.ushrn = function(S) {
                  return this.clone().iushrn(S);
                }, t.prototype.testn = function(S) {
                  n(typeof S == "number" && S >= 0);
                  var E = S % 26, R = (S - E) / 26, z = 1 << E;
                  return !(this.length <= R) && !!(this.words[R] & z);
                }, t.prototype.imaskn = function(S) {
                  n(typeof S == "number" && S >= 0);
                  var E = S % 26, R = (S - E) / 26;
                  if (n(this.negative === 0, "imaskn works only with positive numbers"), this.length <= R)
                    return this;
                  if (E !== 0 && R++, this.length = Math.min(R, this.length), E !== 0) {
                    var z = 67108863 ^ 67108863 >>> E << E;
                    this.words[this.length - 1] &= z;
                  }
                  return this.strip();
                }, t.prototype.maskn = function(S) {
                  return this.clone().imaskn(S);
                }, t.prototype.iaddn = function(S) {
                  return n(typeof S == "number"), n(S < 67108864), S < 0 ? this.isubn(-S) : this.negative !== 0 ? this.length === 1 && (0 | this.words[0]) < S ? (this.words[0] = S - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(S), this.negative = 1, this) : this._iaddn(S);
                }, t.prototype._iaddn = function(S) {
                  this.words[0] += S;
                  for (var E = 0; E < this.length && this.words[E] >= 67108864; E++)
                    this.words[E] -= 67108864, E === this.length - 1 ? this.words[E + 1] = 1 : this.words[E + 1]++;
                  return this.length = Math.max(this.length, E + 1), this;
                }, t.prototype.isubn = function(S) {
                  if (n(typeof S == "number"), n(S < 67108864), S < 0)
                    return this.iaddn(-S);
                  if (this.negative !== 0)
                    return this.negative = 0, this.iaddn(S), this.negative = 1, this;
                  if (this.words[0] -= S, this.length === 1 && this.words[0] < 0)
                    this.words[0] = -this.words[0], this.negative = 1;
                  else
                    for (var E = 0; E < this.length && this.words[E] < 0; E++)
                      this.words[E] += 67108864, this.words[E + 1] -= 1;
                  return this.strip();
                }, t.prototype.addn = function(S) {
                  return this.clone().iaddn(S);
                }, t.prototype.subn = function(S) {
                  return this.clone().isubn(S);
                }, t.prototype.iabs = function() {
                  return this.negative = 0, this;
                }, t.prototype.abs = function() {
                  return this.clone().iabs();
                }, t.prototype._ishlnsubmul = function(S, E, R) {
                  var z, j, H = S.length + R;
                  this._expand(H);
                  var Y = 0;
                  for (z = 0; z < S.length; z++) {
                    j = (0 | this.words[z + R]) + Y;
                    var J = (0 | S.words[z]) * E;
                    Y = ((j -= 67108863 & J) >> 26) - (J / 67108864 | 0), this.words[z + R] = 67108863 & j;
                  }
                  for (; z < this.length - R; z++)
                    Y = (j = (0 | this.words[z + R]) + Y) >> 26, this.words[z + R] = 67108863 & j;
                  if (Y === 0)
                    return this.strip();
                  for (n(Y === -1), Y = 0, z = 0; z < this.length; z++)
                    Y = (j = -(0 | this.words[z]) + Y) >> 26, this.words[z] = 67108863 & j;
                  return this.negative = 1, this.strip();
                }, t.prototype._wordDiv = function(S, E) {
                  var R = (this.length, S.length), z = this.clone(), j = S, H = 0 | j.words[j.length - 1];
                  (R = 26 - this._countBits(H)) !== 0 && (j = j.ushln(R), z.iushln(R), H = 0 | j.words[j.length - 1]);
                  var Y, J = z.length - j.length;
                  if (E !== "mod") {
                    (Y = new t(null)).length = J + 1, Y.words = new Array(Y.length);
                    for (var W = 0; W < Y.length; W++)
                      Y.words[W] = 0;
                  }
                  var Z = z.clone()._ishlnsubmul(j, 1, J);
                  Z.negative === 0 && (z = Z, Y && (Y.words[J] = 1));
                  for (var re = J - 1; re >= 0; re--) {
                    var V = 67108864 * (0 | z.words[j.length + re]) + (0 | z.words[j.length + re - 1]);
                    for (V = Math.min(V / H | 0, 67108863), z._ishlnsubmul(j, V, re); z.negative !== 0; )
                      V--, z.negative = 0, z._ishlnsubmul(j, 1, re), z.isZero() || (z.negative ^= 1);
                    Y && (Y.words[re] = V);
                  }
                  return Y && Y.strip(), z.strip(), E !== "div" && R !== 0 && z.iushrn(R), { div: Y || null, mod: z };
                }, t.prototype.divmod = function(S, E, R) {
                  return n(!S.isZero()), this.isZero() ? { div: new t(0), mod: new t(0) } : this.negative !== 0 && S.negative === 0 ? (H = this.neg().divmod(S, E), E !== "mod" && (z = H.div.neg()), E !== "div" && (j = H.mod.neg(), R && j.negative !== 0 && j.iadd(S)), { div: z, mod: j }) : this.negative === 0 && S.negative !== 0 ? (H = this.divmod(S.neg(), E), E !== "mod" && (z = H.div.neg()), { div: z, mod: H.mod }) : (this.negative & S.negative) != 0 ? (H = this.neg().divmod(S.neg(), E), E !== "div" && (j = H.mod.neg(), R && j.negative !== 0 && j.isub(S)), { div: H.div, mod: j }) : S.length > this.length || this.cmp(S) < 0 ? { div: new t(0), mod: this } : S.length === 1 ? E === "div" ? { div: this.divn(S.words[0]), mod: null } : E === "mod" ? { div: null, mod: new t(this.modn(S.words[0])) } : { div: this.divn(S.words[0]), mod: new t(this.modn(S.words[0])) } : this._wordDiv(S, E);
                  var z, j, H;
                }, t.prototype.div = function(S) {
                  return this.divmod(S, "div", !1).div;
                }, t.prototype.mod = function(S) {
                  return this.divmod(S, "mod", !1).mod;
                }, t.prototype.umod = function(S) {
                  return this.divmod(S, "mod", !0).mod;
                }, t.prototype.divRound = function(S) {
                  var E = this.divmod(S);
                  if (E.mod.isZero())
                    return E.div;
                  var R = E.div.negative !== 0 ? E.mod.isub(S) : E.mod, z = S.ushrn(1), j = S.andln(1), H = R.cmp(z);
                  return H < 0 || j === 1 && H === 0 ? E.div : E.div.negative !== 0 ? E.div.isubn(1) : E.div.iaddn(1);
                }, t.prototype.modn = function(S) {
                  n(S <= 67108863);
                  for (var E = (1 << 26) % S, R = 0, z = this.length - 1; z >= 0; z--)
                    R = (E * R + (0 | this.words[z])) % S;
                  return R;
                }, t.prototype.idivn = function(S) {
                  n(S <= 67108863);
                  for (var E = 0, R = this.length - 1; R >= 0; R--) {
                    var z = (0 | this.words[R]) + 67108864 * E;
                    this.words[R] = z / S | 0, E = z % S;
                  }
                  return this.strip();
                }, t.prototype.divn = function(S) {
                  return this.clone().idivn(S);
                }, t.prototype.egcd = function(S) {
                  n(S.negative === 0), n(!S.isZero());
                  var E = this, R = S.clone();
                  E = E.negative !== 0 ? E.umod(S) : E.clone();
                  for (var z = new t(1), j = new t(0), H = new t(0), Y = new t(1), J = 0; E.isEven() && R.isEven(); )
                    E.iushrn(1), R.iushrn(1), ++J;
                  for (var W = R.clone(), Z = E.clone(); !E.isZero(); ) {
                    for (var re = 0, V = 1; (E.words[0] & V) == 0 && re < 26; ++re, V <<= 1)
                      ;
                    if (re > 0)
                      for (E.iushrn(re); re-- > 0; )
                        (z.isOdd() || j.isOdd()) && (z.iadd(W), j.isub(Z)), z.iushrn(1), j.iushrn(1);
                    for (var B = 0, U = 1; (R.words[0] & U) == 0 && B < 26; ++B, U <<= 1)
                      ;
                    if (B > 0)
                      for (R.iushrn(B); B-- > 0; )
                        (H.isOdd() || Y.isOdd()) && (H.iadd(W), Y.isub(Z)), H.iushrn(1), Y.iushrn(1);
                    E.cmp(R) >= 0 ? (E.isub(R), z.isub(H), j.isub(Y)) : (R.isub(E), H.isub(z), Y.isub(j));
                  }
                  return { a: H, b: Y, gcd: R.iushln(J) };
                }, t.prototype._invmp = function(S) {
                  n(S.negative === 0), n(!S.isZero());
                  var E = this, R = S.clone();
                  E = E.negative !== 0 ? E.umod(S) : E.clone();
                  for (var z, j = new t(1), H = new t(0), Y = R.clone(); E.cmpn(1) > 0 && R.cmpn(1) > 0; ) {
                    for (var J = 0, W = 1; (E.words[0] & W) == 0 && J < 26; ++J, W <<= 1)
                      ;
                    if (J > 0)
                      for (E.iushrn(J); J-- > 0; )
                        j.isOdd() && j.iadd(Y), j.iushrn(1);
                    for (var Z = 0, re = 1; (R.words[0] & re) == 0 && Z < 26; ++Z, re <<= 1)
                      ;
                    if (Z > 0)
                      for (R.iushrn(Z); Z-- > 0; )
                        H.isOdd() && H.iadd(Y), H.iushrn(1);
                    E.cmp(R) >= 0 ? (E.isub(R), j.isub(H)) : (R.isub(E), H.isub(j));
                  }
                  return (z = E.cmpn(1) === 0 ? j : H).cmpn(0) < 0 && z.iadd(S), z;
                }, t.prototype.gcd = function(S) {
                  if (this.isZero())
                    return S.abs();
                  if (S.isZero())
                    return this.abs();
                  var E = this.clone(), R = S.clone();
                  E.negative = 0, R.negative = 0;
                  for (var z = 0; E.isEven() && R.isEven(); z++)
                    E.iushrn(1), R.iushrn(1);
                  for (; ; ) {
                    for (; E.isEven(); )
                      E.iushrn(1);
                    for (; R.isEven(); )
                      R.iushrn(1);
                    var j = E.cmp(R);
                    if (j < 0) {
                      var H = E;
                      E = R, R = H;
                    } else if (j === 0 || R.cmpn(1) === 0)
                      break;
                    E.isub(R);
                  }
                  return R.iushln(z);
                }, t.prototype.invm = function(S) {
                  return this.egcd(S).a.umod(S);
                }, t.prototype.isEven = function() {
                  return (1 & this.words[0]) == 0;
                }, t.prototype.isOdd = function() {
                  return (1 & this.words[0]) == 1;
                }, t.prototype.andln = function(S) {
                  return this.words[0] & S;
                }, t.prototype.bincn = function(S) {
                  n(typeof S == "number");
                  var E = S % 26, R = (S - E) / 26, z = 1 << E;
                  if (this.length <= R)
                    return this._expand(R + 1), this.words[R] |= z, this;
                  for (var j = z, H = R; j !== 0 && H < this.length; H++) {
                    var Y = 0 | this.words[H];
                    j = (Y += j) >>> 26, Y &= 67108863, this.words[H] = Y;
                  }
                  return j !== 0 && (this.words[H] = j, this.length++), this;
                }, t.prototype.isZero = function() {
                  return this.length === 1 && this.words[0] === 0;
                }, t.prototype.cmpn = function(S) {
                  var E, R = S < 0;
                  if (this.negative !== 0 && !R)
                    return -1;
                  if (this.negative === 0 && R)
                    return 1;
                  if (this.strip(), this.length > 1)
                    E = 1;
                  else {
                    R && (S = -S), n(S <= 67108863, "Number is too big");
                    var z = 0 | this.words[0];
                    E = z === S ? 0 : z < S ? -1 : 1;
                  }
                  return this.negative !== 0 ? 0 | -E : E;
                }, t.prototype.cmp = function(S) {
                  if (this.negative !== 0 && S.negative === 0)
                    return -1;
                  if (this.negative === 0 && S.negative !== 0)
                    return 1;
                  var E = this.ucmp(S);
                  return this.negative !== 0 ? 0 | -E : E;
                }, t.prototype.ucmp = function(S) {
                  if (this.length > S.length)
                    return 1;
                  if (this.length < S.length)
                    return -1;
                  for (var E = 0, R = this.length - 1; R >= 0; R--) {
                    var z = 0 | this.words[R], j = 0 | S.words[R];
                    if (z !== j) {
                      z < j ? E = -1 : z > j && (E = 1);
                      break;
                    }
                  }
                  return E;
                }, t.prototype.gtn = function(S) {
                  return this.cmpn(S) === 1;
                }, t.prototype.gt = function(S) {
                  return this.cmp(S) === 1;
                }, t.prototype.gten = function(S) {
                  return this.cmpn(S) >= 0;
                }, t.prototype.gte = function(S) {
                  return this.cmp(S) >= 0;
                }, t.prototype.ltn = function(S) {
                  return this.cmpn(S) === -1;
                }, t.prototype.lt = function(S) {
                  return this.cmp(S) === -1;
                }, t.prototype.lten = function(S) {
                  return this.cmpn(S) <= 0;
                }, t.prototype.lte = function(S) {
                  return this.cmp(S) <= 0;
                }, t.prototype.eqn = function(S) {
                  return this.cmpn(S) === 0;
                }, t.prototype.eq = function(S) {
                  return this.cmp(S) === 0;
                }, t.red = function(S) {
                  return new I(S);
                }, t.prototype.toRed = function(S) {
                  return n(!this.red, "Already a number in reduction context"), n(this.negative === 0, "red works only with positives"), S.convertTo(this)._forceRed(S);
                }, t.prototype.fromRed = function() {
                  return n(this.red, "fromRed works only with numbers in reduction context"), this.red.convertFrom(this);
                }, t.prototype._forceRed = function(S) {
                  return this.red = S, this;
                }, t.prototype.forceRed = function(S) {
                  return n(!this.red, "Already a number in reduction context"), this._forceRed(S);
                }, t.prototype.redAdd = function(S) {
                  return n(this.red, "redAdd works only with red numbers"), this.red.add(this, S);
                }, t.prototype.redIAdd = function(S) {
                  return n(this.red, "redIAdd works only with red numbers"), this.red.iadd(this, S);
                }, t.prototype.redSub = function(S) {
                  return n(this.red, "redSub works only with red numbers"), this.red.sub(this, S);
                }, t.prototype.redISub = function(S) {
                  return n(this.red, "redISub works only with red numbers"), this.red.isub(this, S);
                }, t.prototype.redShl = function(S) {
                  return n(this.red, "redShl works only with red numbers"), this.red.shl(this, S);
                }, t.prototype.redMul = function(S) {
                  return n(this.red, "redMul works only with red numbers"), this.red._verify2(this, S), this.red.mul(this, S);
                }, t.prototype.redIMul = function(S) {
                  return n(this.red, "redMul works only with red numbers"), this.red._verify2(this, S), this.red.imul(this, S);
                }, t.prototype.redSqr = function() {
                  return n(this.red, "redSqr works only with red numbers"), this.red._verify1(this), this.red.sqr(this);
                }, t.prototype.redISqr = function() {
                  return n(this.red, "redISqr works only with red numbers"), this.red._verify1(this), this.red.isqr(this);
                }, t.prototype.redSqrt = function() {
                  return n(this.red, "redSqrt works only with red numbers"), this.red._verify1(this), this.red.sqrt(this);
                }, t.prototype.redInvm = function() {
                  return n(this.red, "redInvm works only with red numbers"), this.red._verify1(this), this.red.invm(this);
                }, t.prototype.redNeg = function() {
                  return n(this.red, "redNeg works only with red numbers"), this.red._verify1(this), this.red.neg(this);
                }, t.prototype.redPow = function(S) {
                  return n(this.red && !S.red, "redPow(normalNum)"), this.red._verify1(this), this.red.pow(this, S);
                };
                var _ = { k256: null, p224: null, p192: null, p25519: null };
                function b(S, E) {
                  this.name = S, this.p = new t(E, 16), this.n = this.p.bitLength(), this.k = new t(1).iushln(this.n).isub(this.p), this.tmp = this._tmp();
                }
                function w() {
                  b.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");
                }
                function T() {
                  b.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");
                }
                function L() {
                  b.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");
                }
                function A() {
                  b.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");
                }
                function I(S) {
                  if (typeof S == "string") {
                    var E = t._prime(S);
                    this.m = E.p, this.prime = E;
                  } else
                    n(S.gtn(1), "modulus must be greater than 1"), this.m = S, this.prime = null;
                }
                function P(S) {
                  I.call(this, S), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new t(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv);
                }
                b.prototype._tmp = function() {
                  var S = new t(null);
                  return S.words = new Array(Math.ceil(this.n / 13)), S;
                }, b.prototype.ireduce = function(S) {
                  var E, R = S;
                  do
                    this.split(R, this.tmp), E = (R = (R = this.imulK(R)).iadd(this.tmp)).bitLength();
                  while (E > this.n);
                  var z = E < this.n ? -1 : R.ucmp(this.p);
                  return z === 0 ? (R.words[0] = 0, R.length = 1) : z > 0 ? R.isub(this.p) : R.strip !== void 0 ? R.strip() : R._strip(), R;
                }, b.prototype.split = function(S, E) {
                  S.iushrn(this.n, 0, E);
                }, b.prototype.imulK = function(S) {
                  return S.imul(this.k);
                }, s(w, b), w.prototype.split = function(S, E) {
                  for (var R = Math.min(S.length, 9), z = 0; z < R; z++)
                    E.words[z] = S.words[z];
                  if (E.length = R, S.length <= 9)
                    return S.words[0] = 0, void (S.length = 1);
                  var j = S.words[9];
                  for (E.words[E.length++] = 4194303 & j, z = 10; z < S.length; z++) {
                    var H = 0 | S.words[z];
                    S.words[z - 10] = (4194303 & H) << 4 | j >>> 22, j = H;
                  }
                  j >>>= 22, S.words[z - 10] = j, j === 0 && S.length > 10 ? S.length -= 10 : S.length -= 9;
                }, w.prototype.imulK = function(S) {
                  S.words[S.length] = 0, S.words[S.length + 1] = 0, S.length += 2;
                  for (var E = 0, R = 0; R < S.length; R++) {
                    var z = 0 | S.words[R];
                    E += 977 * z, S.words[R] = 67108863 & E, E = 64 * z + (E / 67108864 | 0);
                  }
                  return S.words[S.length - 1] === 0 && (S.length--, S.words[S.length - 1] === 0 && S.length--), S;
                }, s(T, b), s(L, b), s(A, b), A.prototype.imulK = function(S) {
                  for (var E = 0, R = 0; R < S.length; R++) {
                    var z = 19 * (0 | S.words[R]) + E, j = 67108863 & z;
                    z >>>= 26, S.words[R] = j, E = z;
                  }
                  return E !== 0 && (S.words[S.length++] = E), S;
                }, t._prime = function(S) {
                  if (_[S])
                    return _[S];
                  var E;
                  if (S === "k256")
                    E = new w();
                  else if (S === "p224")
                    E = new T();
                  else if (S === "p192")
                    E = new L();
                  else {
                    if (S !== "p25519")
                      throw new Error("Unknown prime " + S);
                    E = new A();
                  }
                  return _[S] = E, E;
                }, I.prototype._verify1 = function(S) {
                  n(S.negative === 0, "red works only with positives"), n(S.red, "red works only with red numbers");
                }, I.prototype._verify2 = function(S, E) {
                  n((S.negative | E.negative) == 0, "red works only with positives"), n(S.red && S.red === E.red, "red works only with red numbers");
                }, I.prototype.imod = function(S) {
                  return this.prime ? this.prime.ireduce(S)._forceRed(this) : S.umod(this.m)._forceRed(this);
                }, I.prototype.neg = function(S) {
                  return S.isZero() ? S.clone() : this.m.sub(S)._forceRed(this);
                }, I.prototype.add = function(S, E) {
                  this._verify2(S, E);
                  var R = S.add(E);
                  return R.cmp(this.m) >= 0 && R.isub(this.m), R._forceRed(this);
                }, I.prototype.iadd = function(S, E) {
                  this._verify2(S, E);
                  var R = S.iadd(E);
                  return R.cmp(this.m) >= 0 && R.isub(this.m), R;
                }, I.prototype.sub = function(S, E) {
                  this._verify2(S, E);
                  var R = S.sub(E);
                  return R.cmpn(0) < 0 && R.iadd(this.m), R._forceRed(this);
                }, I.prototype.isub = function(S, E) {
                  this._verify2(S, E);
                  var R = S.isub(E);
                  return R.cmpn(0) < 0 && R.iadd(this.m), R;
                }, I.prototype.shl = function(S, E) {
                  return this._verify1(S), this.imod(S.ushln(E));
                }, I.prototype.imul = function(S, E) {
                  return this._verify2(S, E), this.imod(S.imul(E));
                }, I.prototype.mul = function(S, E) {
                  return this._verify2(S, E), this.imod(S.mul(E));
                }, I.prototype.isqr = function(S) {
                  return this.imul(S, S.clone());
                }, I.prototype.sqr = function(S) {
                  return this.mul(S, S);
                }, I.prototype.sqrt = function(S) {
                  if (S.isZero())
                    return S.clone();
                  var E = this.m.andln(3);
                  if (n(E % 2 == 1), E === 3) {
                    var R = this.m.add(new t(1)).iushrn(2);
                    return this.pow(S, R);
                  }
                  for (var z = this.m.subn(1), j = 0; !z.isZero() && z.andln(1) === 0; )
                    j++, z.iushrn(1);
                  n(!z.isZero());
                  var H = new t(1).toRed(this), Y = H.redNeg(), J = this.m.subn(1).iushrn(1), W = this.m.bitLength();
                  for (W = new t(2 * W * W).toRed(this); this.pow(W, J).cmp(Y) !== 0; )
                    W.redIAdd(Y);
                  for (var Z = this.pow(W, z), re = this.pow(S, z.addn(1).iushrn(1)), V = this.pow(S, z), B = j; V.cmp(H) !== 0; ) {
                    for (var U = V, ee = 0; U.cmp(H) !== 0; ee++)
                      U = U.redSqr();
                    n(ee < B);
                    var N = this.pow(Z, new t(1).iushln(B - ee - 1));
                    re = re.redMul(N), Z = N.redSqr(), V = V.redMul(Z), B = ee;
                  }
                  return re;
                }, I.prototype.invm = function(S) {
                  var E = S._invmp(this.m);
                  return E.negative !== 0 ? (E.negative = 0, this.imod(E).redNeg()) : this.imod(E);
                }, I.prototype.pow = function(S, E) {
                  if (E.isZero())
                    return new t(1).toRed(this);
                  if (E.cmpn(1) === 0)
                    return S.clone();
                  var R = new Array(16);
                  R[0] = new t(1).toRed(this), R[1] = S;
                  for (var z = 2; z < R.length; z++)
                    R[z] = this.mul(R[z - 1], S);
                  var j = R[0], H = 0, Y = 0, J = E.bitLength() % 26;
                  for (J === 0 && (J = 26), z = E.length - 1; z >= 0; z--) {
                    for (var W = E.words[z], Z = J - 1; Z >= 0; Z--) {
                      var re = W >> Z & 1;
                      j !== R[0] && (j = this.sqr(j)), re !== 0 || H !== 0 ? (H <<= 1, H |= re, (++Y === 4 || z === 0 && Z === 0) && (j = this.mul(j, R[H]), Y = 0, H = 0)) : Y = 0;
                    }
                    J = 26;
                  }
                  return j;
                }, I.prototype.convertTo = function(S) {
                  var E = S.umod(this.m);
                  return E === S ? E.clone() : E;
                }, I.prototype.convertFrom = function(S) {
                  var E = S.clone();
                  return E.red = null, E;
                }, t.mont = function(S) {
                  return new P(S);
                }, s(P, I), P.prototype.convertTo = function(S) {
                  return this.imod(S.ushln(this.shift));
                }, P.prototype.convertFrom = function(S) {
                  var E = this.imod(S.mul(this.rinv));
                  return E.red = null, E;
                }, P.prototype.imul = function(S, E) {
                  if (S.isZero() || E.isZero())
                    return S.words[0] = 0, S.length = 1, S;
                  var R = S.imul(E), z = R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), j = R.isub(z).iushrn(this.shift), H = j;
                  return j.cmp(this.m) >= 0 ? H = j.isub(this.m) : j.cmpn(0) < 0 && (H = j.iadd(this.m)), H._forceRed(this);
                }, P.prototype.mul = function(S, E) {
                  if (S.isZero() || E.isZero())
                    return new t(0)._forceRed(this);
                  var R = S.mul(E), z = R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), j = R.isub(z).iushrn(this.shift), H = j;
                  return j.cmp(this.m) >= 0 ? H = j.isub(this.m) : j.cmpn(0) < 0 && (H = j.iadd(this.m)), H._forceRed(this);
                }, P.prototype.invm = function(S) {
                  return this.imod(S._invmp(this.m).mul(this.r2))._forceRed(this);
                };
              })(k === void 0 || k, this);
            }, { buffer: 2 }], 34: [function(g, k, x) {
              k.exports = function(e) {
                var r, n, s, t = e.length, d = 0;
                for (r = 0; r < t; ++r)
                  d += e[r].length;
                var u = new Array(d), o = 0;
                for (r = 0; r < t; ++r) {
                  var h = e[r], l = h.length;
                  for (n = 0; n < l; ++n) {
                    var i = u[o++] = new Array(l - 1), p = 0;
                    for (s = 0; s < l; ++s)
                      s !== n && (i[p++] = h[s]);
                    if (1 & n) {
                      var c = i[1];
                      i[1] = i[0], i[0] = c;
                    }
                  }
                }
                return u;
              };
            }, {}], 35: [function(g, k, x) {
              k.exports = function(i, p, c) {
                switch (arguments.length) {
                  case 1:
                    return h(i);
                  case 2:
                    return typeof p == "function" ? u(i, i, p, !0) : l(i, p);
                  case 3:
                    return u(i, p, c, !1);
                  default:
                    throw new Error("box-intersect: Invalid arguments");
                }
              };
              var e, r = g("typedarray-pool"), n = g("./lib/sweep"), s = g("./lib/intersect");
              function t(i, p) {
                for (var c = 0; c < i; ++c)
                  if (!(p[c] <= p[c + i]))
                    return !0;
                return !1;
              }
              function d(i, p, c, a) {
                for (var y = 0, f = 0, _ = 0, b = i.length; _ < b; ++_) {
                  var w = i[_];
                  if (!t(p, w)) {
                    for (var T = 0; T < 2 * p; ++T)
                      c[y++] = w[T];
                    a[f++] = _;
                  }
                }
                return f;
              }
              function u(i, p, c, a) {
                var y = i.length, f = p.length;
                if (!(y <= 0 || f <= 0)) {
                  var _ = i[0].length >>> 1;
                  if (!(_ <= 0)) {
                    var b, w = r.mallocDouble(2 * _ * y), T = r.mallocInt32(y);
                    if ((y = d(i, _, w, T)) > 0) {
                      if (_ === 1 && a)
                        n.init(y), b = n.sweepComplete(_, c, 0, y, w, T, 0, y, w, T);
                      else {
                        var L = r.mallocDouble(2 * _ * f), A = r.mallocInt32(f);
                        (f = d(p, _, L, A)) > 0 && (n.init(y + f), b = _ === 1 ? n.sweepBipartite(_, c, 0, y, w, T, 0, f, L, A) : s(_, c, a, y, w, T, f, L, A), r.free(L), r.free(A));
                      }
                      r.free(w), r.free(T);
                    }
                    return b;
                  }
                }
              }
              function o(i, p) {
                e.push([i, p]);
              }
              function h(i) {
                return e = [], u(i, i, o, !0), e;
              }
              function l(i, p) {
                return e = [], u(i, p, o, !1), e;
              }
            }, { "./lib/intersect": 37, "./lib/sweep": 41, "typedarray-pool": 308 }], 36: [function(g, k, x) {
              function e(r) {
                return r ? function(n, s, t, d, u, o, h, l, i, p, c) {
                  return u - d > i - l ? function(a, y, f, _, b, w, T, L, A, I, P) {
                    for (var S = 2 * a, E = _, R = S * _; E < b; ++E, R += S) {
                      var z = w[y + R], j = w[y + R + a], H = T[E];
                      e:
                        for (var Y = L, J = S * L; Y < A; ++Y, J += S) {
                          var W = I[y + J], Z = I[y + J + a], re = P[Y];
                          if (!(Z < z || j < W)) {
                            for (var V = y + 1; V < a; ++V) {
                              var B = w[V + R], U = w[V + a + R], ee = I[V + J], N = I[V + a + J];
                              if (U < ee || N < B)
                                continue e;
                            }
                            var K = f(H, re);
                            if (K !== void 0)
                              return K;
                          }
                        }
                    }
                  }(n, s, t, d, u, o, h, l, i, p, c) : function(a, y, f, _, b, w, T, L, A, I, P) {
                    for (var S = 2 * a, E = L, R = S * L; E < A; ++E, R += S) {
                      var z = I[y + R], j = I[y + R + a], H = P[E];
                      e:
                        for (var Y = _, J = S * _; Y < b; ++Y, J += S) {
                          var W = w[y + J], Z = w[y + J + a], re = T[Y];
                          if (!(j < W || Z < z)) {
                            for (var V = y + 1; V < a; ++V) {
                              var B = w[V + J], U = w[V + a + J], ee = I[V + R], N = I[V + a + R];
                              if (U < ee || N < B)
                                continue e;
                            }
                            var K = f(re, H);
                            if (K !== void 0)
                              return K;
                          }
                        }
                    }
                  }(n, s, t, d, u, o, h, l, i, p, c);
                } : function(n, s, t, d, u, o, h, l, i, p, c, a) {
                  return o - u > p - i ? d ? function(y, f, _, b, w, T, L, A, I, P, S) {
                    for (var E = 2 * y, R = b, z = E * b; R < w; ++R, z += E) {
                      var j = T[f + z], H = T[f + z + y], Y = L[R];
                      e:
                        for (var J = A, W = E * A; J < I; ++J, W += E) {
                          var Z = P[f + W], re = S[J];
                          if (!(Z <= j || H < Z)) {
                            for (var V = f + 1; V < y; ++V) {
                              var B = T[V + z], U = T[V + y + z], ee = P[V + W], N = P[V + y + W];
                              if (U < ee || N < B)
                                continue e;
                            }
                            var K = _(re, Y);
                            if (K !== void 0)
                              return K;
                          }
                        }
                    }
                  }(n, s, t, u, o, h, l, i, p, c, a) : function(y, f, _, b, w, T, L, A, I, P, S) {
                    for (var E = 2 * y, R = b, z = E * b; R < w; ++R, z += E) {
                      var j = T[f + z], H = T[f + z + y], Y = L[R];
                      e:
                        for (var J = A, W = E * A; J < I; ++J, W += E) {
                          var Z = P[f + W], re = S[J];
                          if (!(Z < j || H < Z)) {
                            for (var V = f + 1; V < y; ++V) {
                              var B = T[V + z], U = T[V + y + z], ee = P[V + W], N = P[V + y + W];
                              if (U < ee || N < B)
                                continue e;
                            }
                            var K = _(Y, re);
                            if (K !== void 0)
                              return K;
                          }
                        }
                    }
                  }(n, s, t, u, o, h, l, i, p, c, a) : d ? function(y, f, _, b, w, T, L, A, I, P, S) {
                    for (var E = 2 * y, R = A, z = E * A; R < I; ++R, z += E) {
                      var j = P[f + z], H = S[R];
                      e:
                        for (var Y = b, J = E * b; Y < w; ++Y, J += E) {
                          var W = T[f + J], Z = T[f + J + y], re = L[Y];
                          if (!(j <= W || Z < j)) {
                            for (var V = f + 1; V < y; ++V) {
                              var B = T[V + J], U = T[V + y + J], ee = P[V + z], N = P[V + y + z];
                              if (U < ee || N < B)
                                continue e;
                            }
                            var K = _(H, re);
                            if (K !== void 0)
                              return K;
                          }
                        }
                    }
                  }(n, s, t, u, o, h, l, i, p, c, a) : function(y, f, _, b, w, T, L, A, I, P, S) {
                    for (var E = 2 * y, R = A, z = E * A; R < I; ++R, z += E) {
                      var j = P[f + z], H = S[R];
                      e:
                        for (var Y = b, J = E * b; Y < w; ++Y, J += E) {
                          var W = T[f + J], Z = T[f + J + y], re = L[Y];
                          if (!(j < W || Z < j)) {
                            for (var V = f + 1; V < y; ++V) {
                              var B = T[V + J], U = T[V + y + J], ee = P[V + z], N = P[V + y + z];
                              if (U < ee || N < B)
                                continue e;
                            }
                            var K = _(re, H);
                            if (K !== void 0)
                              return K;
                          }
                        }
                    }
                  }(n, s, t, u, o, h, l, i, p, c, a);
                };
              }
              x.partial = e(!1), x.full = e(!0);
            }, {}], 37: [function(g, k, x) {
              k.exports = function(T, L, A, I, P, S, E, R, z) {
                (function(Te, Ee) {
                  var Me = 8 * r.log2(Ee + 1) * (Te + 1) | 0, ze = r.nextPow2(6 * Me);
                  y.length < ze && (e.free(y), y = e.mallocInt32(ze));
                  var Ie = r.nextPow2(2 * Me);
                  f.length < Ie && (e.free(f), f = e.mallocDouble(Ie));
                })(T, I + E);
                var j, H = 0, Y = 2 * T;
                for (_(H++, 0, 0, I, 0, E, A ? 16 : 0, -1 / 0, 1 / 0), A || _(H++, 0, 0, E, 0, I, 1, -1 / 0, 1 / 0); H > 0; ) {
                  var J = 6 * (H -= 1), W = y[J], Z = y[J + 1], re = y[J + 2], V = y[J + 3], B = y[J + 4], U = y[J + 5], ee = 2 * H, N = f[ee], K = f[ee + 1], X = 1 & U, te = !!(16 & U), ie = P, le = S, oe = R, ve = z;
                  if (X && (ie = R, le = z, oe = P, ve = S), !(2 & U && (re = i(T, W, Z, re, ie, le, K), Z >= re) || 4 & U && (Z = p(T, W, Z, re, ie, le, N)) >= re)) {
                    var ue = re - Z, ye = B - V;
                    if (te) {
                      if (T * ue * (ue + ye) < 1 << 22) {
                        if ((j = d.scanComplete(T, W, L, Z, re, ie, le, V, B, oe, ve)) !== void 0)
                          return j;
                        continue;
                      }
                    } else {
                      if (T * Math.min(ue, ye) < 128) {
                        if ((j = s(T, W, L, X, Z, re, ie, le, V, B, oe, ve)) !== void 0)
                          return j;
                        continue;
                      }
                      if (T * ue * ye < 1 << 22) {
                        if ((j = d.scanBipartite(T, W, L, X, Z, re, ie, le, V, B, oe, ve)) !== void 0)
                          return j;
                        continue;
                      }
                    }
                    var Ae = h(T, W, Z, re, ie, le, N, K);
                    if (Z < Ae)
                      if (T * (Ae - Z) < 128) {
                        if ((j = t(T, W + 1, L, Z, Ae, ie, le, V, B, oe, ve)) !== void 0)
                          return j;
                      } else if (W === T - 2) {
                        if ((j = X ? d.sweepBipartite(T, L, V, B, oe, ve, Z, Ae, ie, le) : d.sweepBipartite(T, L, Z, Ae, ie, le, V, B, oe, ve)) !== void 0)
                          return j;
                      } else
                        _(H++, W + 1, Z, Ae, V, B, X, -1 / 0, 1 / 0), _(H++, W + 1, V, B, Z, Ae, 1 ^ X, -1 / 0, 1 / 0);
                    if (Ae < re) {
                      var pe = u(T, W, V, B, oe, ve), ge = oe[Y * pe + W], we = l(T, W, pe, B, oe, ve, ge);
                      if (we < B && _(H++, W, Ae, re, we, B, (4 | X) + (te ? 16 : 0), ge, K), V < pe && _(H++, W, Ae, re, V, pe, (2 | X) + (te ? 16 : 0), N, ge), pe + 1 === we) {
                        if ((j = te ? w(T, W, L, Ae, re, ie, le, pe, oe, ve[pe]) : b(T, W, L, X, Ae, re, ie, le, pe, oe, ve[pe])) !== void 0)
                          return j;
                      } else if (pe < we) {
                        var se;
                        if (te) {
                          if (se = c(T, W, Ae, re, ie, le, ge), Ae < se) {
                            var de = l(T, W, Ae, se, ie, le, ge);
                            if (W === T - 2) {
                              if (Ae < de && (j = d.sweepComplete(T, L, Ae, de, ie, le, pe, we, oe, ve)) !== void 0 || de < se && (j = d.sweepBipartite(T, L, de, se, ie, le, pe, we, oe, ve)) !== void 0)
                                return j;
                            } else
                              Ae < de && _(H++, W + 1, Ae, de, pe, we, 16, -1 / 0, 1 / 0), de < se && (_(H++, W + 1, de, se, pe, we, 0, -1 / 0, 1 / 0), _(H++, W + 1, pe, we, de, se, 1, -1 / 0, 1 / 0));
                          }
                        } else
                          se = X ? a(T, W, Ae, re, ie, le, ge) : c(T, W, Ae, re, ie, le, ge), Ae < se && (W === T - 2 ? j = X ? d.sweepBipartite(T, L, pe, we, oe, ve, Ae, se, ie, le) : d.sweepBipartite(T, L, Ae, se, ie, le, pe, we, oe, ve) : (_(H++, W + 1, Ae, se, pe, we, X, -1 / 0, 1 / 0), _(H++, W + 1, pe, we, Ae, se, 1 ^ X, -1 / 0, 1 / 0)));
                      }
                    }
                  }
                }
              };
              var e = g("typedarray-pool"), r = g("bit-twiddle"), n = g("./brute"), s = n.partial, t = n.full, d = g("./sweep"), u = g("./median"), o = g("./partition"), h = o("!(lo>=p0)&&!(p1>=hi)"), l = o("lo===p0"), i = o("lo<p0"), p = o("hi<=p0"), c = o("lo<=p0&&p0<=hi"), a = o("lo<p0&&p0<=hi"), y = e.mallocInt32(1024), f = e.mallocDouble(1024);
              function _(T, L, A, I, P, S, E, R, z) {
                var j = 6 * T;
                y[j] = L, y[j + 1] = A, y[j + 2] = I, y[j + 3] = P, y[j + 4] = S, y[j + 5] = E;
                var H = 2 * T;
                f[H] = R, f[H + 1] = z;
              }
              function b(T, L, A, I, P, S, E, R, z, j, H) {
                var Y = 2 * T, J = z * Y, W = j[J + L];
                e:
                  for (var Z = P, re = P * Y; Z < S; ++Z, re += Y) {
                    var V = E[re + L], B = E[re + L + T];
                    if (!(W < V || B < W) && (!I || W !== V)) {
                      for (var U, ee = R[Z], N = L + 1; N < T; ++N) {
                        V = E[re + N], B = E[re + N + T];
                        var K = j[J + N], X = j[J + N + T];
                        if (B < K || X < V)
                          continue e;
                      }
                      if ((U = I ? A(H, ee) : A(ee, H)) !== void 0)
                        return U;
                    }
                  }
              }
              function w(T, L, A, I, P, S, E, R, z, j) {
                var H = 2 * T, Y = R * H, J = z[Y + L];
                e:
                  for (var W = I, Z = I * H; W < P; ++W, Z += H) {
                    var re = E[W];
                    if (re !== j) {
                      var V = S[Z + L], B = S[Z + L + T];
                      if (!(J < V || B < J)) {
                        for (var U = L + 1; U < T; ++U) {
                          V = S[Z + U], B = S[Z + U + T];
                          var ee = z[Y + U], N = z[Y + U + T];
                          if (B < ee || N < V)
                            continue e;
                        }
                        var K = A(re, j);
                        if (K !== void 0)
                          return K;
                      }
                    }
                  }
              }
            }, { "./brute": 36, "./median": 38, "./partition": 39, "./sweep": 41, "bit-twiddle": 32, "typedarray-pool": 308 }], 38: [function(g, k, x) {
              k.exports = function(n, s, t, d, u, o) {
                if (d <= t + 1)
                  return t;
                for (var h = t, l = d, i = d + t >>> 1, p = 2 * n, c = i, a = u[p * i + s]; h < l; ) {
                  if (l - h < 8) {
                    r(n, s, h, l, u, o), a = u[p * i + s];
                    break;
                  }
                  var y = l - h, f = Math.random() * y + h | 0, _ = u[p * f + s], b = Math.random() * y + h | 0, w = u[p * b + s], T = Math.random() * y + h | 0, L = u[p * T + s];
                  _ <= w ? L >= w ? (c = b, a = w) : _ >= L ? (c = f, a = _) : (c = T, a = L) : w >= L ? (c = b, a = w) : L >= _ ? (c = f, a = _) : (c = T, a = L);
                  for (var A = p * (l - 1), I = p * c, P = 0; P < p; ++P, ++A, ++I) {
                    var S = u[A];
                    u[A] = u[I], u[I] = S;
                  }
                  var E = o[l - 1];
                  for (o[l - 1] = o[c], o[c] = E, c = e(n, s, h, l - 1, u, o, a), A = p * (l - 1), I = p * c, P = 0; P < p; ++P, ++A, ++I)
                    S = u[A], u[A] = u[I], u[I] = S;
                  if (E = o[l - 1], o[l - 1] = o[c], o[c] = E, i < c) {
                    for (l = c - 1; h < l && u[p * (l - 1) + s] === a; )
                      l -= 1;
                    l += 1;
                  } else {
                    if (!(c < i))
                      break;
                    for (h = c + 1; h < l && u[p * h + s] === a; )
                      h += 1;
                  }
                }
                return e(n, s, t, i, u, o, u[p * i + s]);
              };
              var e = g("./partition")("lo<p0");
              function r(n, s, t, d, u, o) {
                for (var h = 2 * n, l = h * (t + 1) + s, i = t + 1; i < d; ++i, l += h)
                  for (var p = u[l], c = i, a = h * (i - 1); c > t && u[a + s] > p; --c, a -= h) {
                    for (var y = a, f = a + h, _ = 0; _ < h; ++_, ++y, ++f) {
                      var b = u[y];
                      u[y] = u[f], u[f] = b;
                    }
                    var w = o[c];
                    o[c] = o[c - 1], o[c - 1] = w;
                  }
              }
            }, { "./partition": 39 }], 39: [function(g, k, x) {
              k.exports = function(r) {
                return e[r];
              };
              var e = { "lo===p0": function(r, n, s, t, d, u, o) {
                for (var h = 2 * r, l = h * s, i = l, p = s, c = n, a = s; t > a; ++a, l += h)
                  if (d[l + c] === o)
                    if (p === a)
                      p += 1, i += h;
                    else {
                      for (var y = 0; h > y; ++y) {
                        var f = d[l + y];
                        d[l + y] = d[i], d[i++] = f;
                      }
                      var _ = u[a];
                      u[a] = u[p], u[p++] = _;
                    }
                return p;
              }, "lo<p0": function(r, n, s, t, d, u, o) {
                for (var h = 2 * r, l = h * s, i = l, p = s, c = n, a = s; t > a; ++a, l += h)
                  if (d[l + c] < o)
                    if (p === a)
                      p += 1, i += h;
                    else {
                      for (var y = 0; h > y; ++y) {
                        var f = d[l + y];
                        d[l + y] = d[i], d[i++] = f;
                      }
                      var _ = u[a];
                      u[a] = u[p], u[p++] = _;
                    }
                return p;
              }, "lo<=p0": function(r, n, s, t, d, u, o) {
                for (var h = 2 * r, l = h * s, i = l, p = s, c = r + n, a = s; t > a; ++a, l += h)
                  if (d[l + c] <= o)
                    if (p === a)
                      p += 1, i += h;
                    else {
                      for (var y = 0; h > y; ++y) {
                        var f = d[l + y];
                        d[l + y] = d[i], d[i++] = f;
                      }
                      var _ = u[a];
                      u[a] = u[p], u[p++] = _;
                    }
                return p;
              }, "hi<=p0": function(r, n, s, t, d, u, o) {
                for (var h = 2 * r, l = h * s, i = l, p = s, c = r + n, a = s; t > a; ++a, l += h)
                  if (d[l + c] <= o)
                    if (p === a)
                      p += 1, i += h;
                    else {
                      for (var y = 0; h > y; ++y) {
                        var f = d[l + y];
                        d[l + y] = d[i], d[i++] = f;
                      }
                      var _ = u[a];
                      u[a] = u[p], u[p++] = _;
                    }
                return p;
              }, "lo<p0&&p0<=hi": function(r, n, s, t, d, u, o) {
                for (var h = 2 * r, l = h * s, i = l, p = s, c = n, a = r + n, y = s; t > y; ++y, l += h) {
                  var f = d[l + c], _ = d[l + a];
                  if (f < o && o <= _)
                    if (p === y)
                      p += 1, i += h;
                    else {
                      for (var b = 0; h > b; ++b) {
                        var w = d[l + b];
                        d[l + b] = d[i], d[i++] = w;
                      }
                      var T = u[y];
                      u[y] = u[p], u[p++] = T;
                    }
                }
                return p;
              }, "lo<=p0&&p0<=hi": function(r, n, s, t, d, u, o) {
                for (var h = 2 * r, l = h * s, i = l, p = s, c = n, a = r + n, y = s; t > y; ++y, l += h) {
                  var f = d[l + c], _ = d[l + a];
                  if (f <= o && o <= _)
                    if (p === y)
                      p += 1, i += h;
                    else {
                      for (var b = 0; h > b; ++b) {
                        var w = d[l + b];
                        d[l + b] = d[i], d[i++] = w;
                      }
                      var T = u[y];
                      u[y] = u[p], u[p++] = T;
                    }
                }
                return p;
              }, "!(lo>=p0)&&!(p1>=hi)": function(r, n, s, t, d, u, o, h) {
                for (var l = 2 * r, i = l * s, p = i, c = s, a = n, y = r + n, f = s; t > f; ++f, i += l) {
                  var _ = d[i + a], b = d[i + y];
                  if (!(_ >= o || h >= b))
                    if (c === f)
                      c += 1, p += l;
                    else {
                      for (var w = 0; l > w; ++w) {
                        var T = d[i + w];
                        d[i + w] = d[p], d[p++] = T;
                      }
                      var L = u[f];
                      u[f] = u[c], u[c++] = L;
                    }
                }
                return c;
              } };
            }, {}], 40: [function(g, k, x) {
              k.exports = function(o, h) {
                h <= 128 ? e(0, h - 1, o) : function l(i, p, c) {
                  var a = (p - i + 1) / 6 | 0, y = i + a, f = p - a, _ = i + p >> 1, b = _ - a, w = _ + a, T = y, L = b, A = _, I = w, P = f, S = i + 1, E = p - 1, R = 0;
                  d(T, L, c) && (R = T, T = L, L = R), d(I, P, c) && (R = I, I = P, P = R), d(T, A, c) && (R = T, T = A, A = R), d(L, A, c) && (R = L, L = A, A = R), d(T, I, c) && (R = T, T = I, I = R), d(A, I, c) && (R = A, A = I, I = R), d(L, P, c) && (R = L, L = P, P = R), d(L, A, c) && (R = L, L = A, A = R), d(I, P, c) && (R = I, I = P, P = R);
                  for (var z = c[2 * L], j = c[2 * L + 1], H = c[2 * I], Y = c[2 * I + 1], J = 2 * T, W = 2 * A, Z = 2 * P, re = 2 * y, V = 2 * _, B = 2 * f, U = 0; U < 2; ++U) {
                    var ee = c[J + U], N = c[W + U], K = c[Z + U];
                    c[re + U] = ee, c[V + U] = N, c[B + U] = K;
                  }
                  n(b, i, c), n(w, p, c);
                  for (var X = S; X <= E; ++X)
                    if (u(X, z, j, c))
                      X !== S && r(X, S, c), ++S;
                    else if (!u(X, H, Y, c))
                      for (; ; ) {
                        if (u(E, H, Y, c)) {
                          u(E, z, j, c) ? (s(X, S, E, c), ++S, --E) : (r(X, E, c), --E);
                          break;
                        }
                        if (--E < X)
                          break;
                      }
                  t(i, S - 1, z, j, c), t(p, E + 1, H, Y, c), S - 2 - i <= 32 ? e(i, S - 2, c) : l(i, S - 2, c), p - (E + 2) <= 32 ? e(E + 2, p, c) : l(E + 2, p, c), E - S <= 32 ? e(S, E, c) : l(S, E, c);
                }(0, h - 1, o);
              };
              function e(o, h, l) {
                for (var i = 2 * (o + 1), p = o + 1; p <= h; ++p) {
                  for (var c = l[i++], a = l[i++], y = p, f = i - 2; y-- > o; ) {
                    var _ = l[f - 2], b = l[f - 1];
                    if (_ < c || _ === c && b < a)
                      break;
                    l[f] = _, l[f + 1] = b, f -= 2;
                  }
                  l[f] = c, l[f + 1] = a;
                }
              }
              function r(o, h, l) {
                h *= 2;
                var i = l[o *= 2], p = l[o + 1];
                l[o] = l[h], l[o + 1] = l[h + 1], l[h] = i, l[h + 1] = p;
              }
              function n(o, h, l) {
                h *= 2, l[o *= 2] = l[h], l[o + 1] = l[h + 1];
              }
              function s(o, h, l, i) {
                h *= 2, l *= 2;
                var p = i[o *= 2], c = i[o + 1];
                i[o] = i[h], i[o + 1] = i[h + 1], i[h] = i[l], i[h + 1] = i[l + 1], i[l] = p, i[l + 1] = c;
              }
              function t(o, h, l, i, p) {
                h *= 2, p[o *= 2] = p[h], p[h] = l, p[o + 1] = p[h + 1], p[h + 1] = i;
              }
              function d(o, h, l) {
                h *= 2;
                var i = l[o *= 2], p = l[h];
                return !(i < p) && (i !== p || l[o + 1] > l[h + 1]);
              }
              function u(o, h, l, i) {
                var p = i[o *= 2];
                return p < h || p === h && i[o + 1] < l;
              }
            }, {}], 41: [function(g, k, x) {
              k.exports = { init: function(c) {
                var a = r.nextPow2(c);
                s.length < a && (e.free(s), s = e.mallocInt32(a)), t.length < a && (e.free(t), t = e.mallocInt32(a)), d.length < a && (e.free(d), d = e.mallocInt32(a)), u.length < a && (e.free(u), u = e.mallocInt32(a)), o.length < a && (e.free(o), o = e.mallocInt32(a)), h.length < a && (e.free(h), h = e.mallocInt32(a));
                var y = 8 * a;
                l.length < y && (e.free(l), l = e.mallocDouble(y));
              }, sweepBipartite: function(c, a, y, f, _, b, w, T, L, A) {
                for (var I = 0, P = 2 * c, S = c - 1, E = P - 1, R = y; R < f; ++R) {
                  var z = b[R], j = P * R;
                  l[I++] = _[j + S], l[I++] = -(z + 1), l[I++] = _[j + E], l[I++] = z;
                }
                for (R = w; R < T; ++R) {
                  z = A[R] + (1 << 28);
                  var H = P * R;
                  l[I++] = L[H + S], l[I++] = -z, l[I++] = L[H + E], l[I++] = z;
                }
                var Y = I >>> 1;
                n(l, Y);
                var J = 0, W = 0;
                for (R = 0; R < Y; ++R) {
                  var Z = 0 | l[2 * R + 1];
                  if (Z >= 1 << 28)
                    i(d, u, W--, Z = Z - (1 << 28) | 0);
                  else if (Z >= 0)
                    i(s, t, J--, Z);
                  else if (Z <= -(1 << 28)) {
                    Z = -Z - (1 << 28) | 0;
                    for (var re = 0; re < J; ++re)
                      if ((V = a(s[re], Z)) !== void 0)
                        return V;
                    p(d, u, W++, Z);
                  } else {
                    for (Z = -Z - 1 | 0, re = 0; re < W; ++re) {
                      var V;
                      if ((V = a(Z, d[re])) !== void 0)
                        return V;
                    }
                    p(s, t, J++, Z);
                  }
                }
              }, sweepComplete: function(c, a, y, f, _, b, w, T, L, A) {
                for (var I = 0, P = 2 * c, S = c - 1, E = P - 1, R = y; R < f; ++R) {
                  var z = b[R] + 1 << 1, j = P * R;
                  l[I++] = _[j + S], l[I++] = -z, l[I++] = _[j + E], l[I++] = z;
                }
                for (R = w; R < T; ++R) {
                  z = A[R] + 1 << 1;
                  var H = P * R;
                  l[I++] = L[H + S], l[I++] = 1 | -z, l[I++] = L[H + E], l[I++] = 1 | z;
                }
                var Y = I >>> 1;
                n(l, Y);
                var J = 0, W = 0, Z = 0;
                for (R = 0; R < Y; ++R) {
                  var re = 0 | l[2 * R + 1], V = 1 & re;
                  if (R < Y - 1 && re >> 1 == l[2 * R + 3] >> 1 && (V = 2, R += 1), re < 0) {
                    for (var B = -(re >> 1) - 1, U = 0; U < Z; ++U)
                      if ((ee = a(o[U], B)) !== void 0)
                        return ee;
                    if (V !== 0) {
                      for (U = 0; U < J; ++U)
                        if ((ee = a(s[U], B)) !== void 0)
                          return ee;
                    }
                    if (V !== 1)
                      for (U = 0; U < W; ++U) {
                        var ee;
                        if ((ee = a(d[U], B)) !== void 0)
                          return ee;
                      }
                    V === 0 ? p(s, t, J++, B) : V === 1 ? p(d, u, W++, B) : V === 2 && p(o, h, Z++, B);
                  } else
                    B = (re >> 1) - 1, V === 0 ? i(s, t, J--, B) : V === 1 ? i(d, u, W--, B) : V === 2 && i(o, h, Z--, B);
                }
              }, scanBipartite: function(c, a, y, f, _, b, w, T, L, A, I, P) {
                var S = 0, E = 2 * c, R = a, z = a + c, j = 1, H = 1;
                f ? H = 1 << 28 : j = 1 << 28;
                for (var Y = _; Y < b; ++Y) {
                  var J = Y + j, W = E * Y;
                  l[S++] = w[W + R], l[S++] = -J, l[S++] = w[W + z], l[S++] = J;
                }
                for (Y = L; Y < A; ++Y) {
                  J = Y + H;
                  var Z = E * Y;
                  l[S++] = I[Z + R], l[S++] = -J;
                }
                var re = S >>> 1;
                n(l, re);
                var V = 0;
                for (Y = 0; Y < re; ++Y) {
                  var B = 0 | l[2 * Y + 1];
                  if (B < 0) {
                    var U = !1;
                    if ((J = -B) >= 1 << 28 ? (U = !f, J -= 1 << 28) : (U = !!f, J -= 1), U)
                      p(s, t, V++, J);
                    else {
                      var ee = P[J], N = E * J, K = I[N + a + 1], X = I[N + a + 1 + c];
                      e:
                        for (var te = 0; te < V; ++te) {
                          var ie = s[te], le = E * ie;
                          if (!(X < w[le + a + 1] || w[le + a + 1 + c] < K)) {
                            for (var oe = a + 2; oe < c; ++oe)
                              if (I[N + oe + c] < w[le + oe] || w[le + oe + c] < I[N + oe])
                                continue e;
                            var ve, ue = T[ie];
                            if ((ve = f ? y(ee, ue) : y(ue, ee)) !== void 0)
                              return ve;
                          }
                        }
                    }
                  } else
                    i(s, t, V--, B - j);
                }
              }, scanComplete: function(c, a, y, f, _, b, w, T, L, A, I) {
                for (var P = 0, S = 2 * c, E = a, R = a + c, z = f; z < _; ++z) {
                  var j = z + 268435456, H = S * z;
                  l[P++] = b[H + E], l[P++] = -j, l[P++] = b[H + R], l[P++] = j;
                }
                for (z = T; z < L; ++z) {
                  j = z + 1;
                  var Y = S * z;
                  l[P++] = A[Y + E], l[P++] = -j;
                }
                var J = P >>> 1;
                n(l, J);
                var W = 0;
                for (z = 0; z < J; ++z) {
                  var Z = 0 | l[2 * z + 1];
                  if (Z < 0)
                    if ((j = -Z) >= 1 << 28)
                      s[W++] = j - (1 << 28);
                    else {
                      var re = I[j -= 1], V = S * j, B = A[V + a + 1], U = A[V + a + 1 + c];
                      e:
                        for (var ee = 0; ee < W; ++ee) {
                          var N = s[ee], K = w[N];
                          if (K === re)
                            break;
                          var X = S * N;
                          if (!(U < b[X + a + 1] || b[X + a + 1 + c] < B)) {
                            for (var te = a + 2; te < c; ++te)
                              if (A[V + te + c] < b[X + te] || b[X + te + c] < A[V + te])
                                continue e;
                            var ie = y(K, re);
                            if (ie !== void 0)
                              return ie;
                          }
                        }
                    }
                  else {
                    for (j = Z - (1 << 28), ee = W - 1; ee >= 0; --ee)
                      if (s[ee] === j) {
                        for (te = ee + 1; te < W; ++te)
                          s[te - 1] = s[te];
                        break;
                      }
                    --W;
                  }
                }
              } };
              var e = g("typedarray-pool"), r = g("bit-twiddle"), n = g("./sort"), s = e.mallocInt32(1024), t = e.mallocInt32(1024), d = e.mallocInt32(1024), u = e.mallocInt32(1024), o = e.mallocInt32(1024), h = e.mallocInt32(1024), l = e.mallocDouble(8192);
              function i(c, a, y, f) {
                var _ = a[f], b = c[y - 1];
                c[_] = b, a[b] = _;
              }
              function p(c, a, y, f) {
                c[y] = f, a[f] = y;
              }
            }, { "./sort": 40, "bit-twiddle": 32, "typedarray-pool": 308 }], 42: [function(g, k, x) {
              var e = g("./lib/monotone"), r = g("./lib/triangulation"), n = g("./lib/delaunay"), s = g("./lib/filter");
              function t(o) {
                return [Math.min(o[0], o[1]), Math.max(o[0], o[1])];
              }
              function d(o, h) {
                return o[0] - h[0] || o[1] - h[1];
              }
              function u(o, h, l) {
                return h in o ? o[h] : l;
              }
              k.exports = function(o, h, l) {
                Array.isArray(h) ? (l = l || {}, h = h || []) : (l = h || {}, h = []);
                var i = !!u(l, "delaunay", !0), p = !!u(l, "interior", !0), c = !!u(l, "exterior", !0), a = !!u(l, "infinity", !1);
                if (!p && !c || o.length === 0)
                  return [];
                var y = e(o, h);
                if (i || p !== c || a) {
                  for (var f = r(o.length, function(w) {
                    return w.map(t).sort(d);
                  }(h)), _ = 0; _ < y.length; ++_) {
                    var b = y[_];
                    f.addTriangle(b[0], b[1], b[2]);
                  }
                  return i && n(o, f), c ? p ? a ? s(f, 0, a) : f.cells() : s(f, 1, a) : s(f, -1);
                }
                return y;
              };
            }, { "./lib/delaunay": 43, "./lib/filter": 44, "./lib/monotone": 45, "./lib/triangulation": 46 }], 43: [function(g, k, x) {
              var e = g("robust-in-sphere")[4];
              g("binary-search-bounds");
              function r(n, s, t, d, u, o) {
                var h = s.opposite(d, u);
                if (!(h < 0)) {
                  if (u < d) {
                    var l = d;
                    d = u, u = l, l = o, o = h, h = l;
                  }
                  s.isConstraint(d, u) || e(n[d], n[u], n[o], n[h]) < 0 && t.push(d, u);
                }
              }
              k.exports = function(n, s) {
                for (var t = [], d = n.length, u = s.stars, o = 0; o < d; ++o)
                  for (var h = u[o], l = 1; l < h.length; l += 2)
                    if (!((a = h[l]) < o) && !s.isConstraint(o, a)) {
                      for (var i = h[l - 1], p = -1, c = 1; c < h.length; c += 2)
                        if (h[c - 1] === a) {
                          p = h[c];
                          break;
                        }
                      p < 0 || e(n[o], n[a], n[i], n[p]) < 0 && t.push(o, a);
                    }
                for (; t.length > 0; ) {
                  for (var a = t.pop(), y = (o = t.pop(), i = -1, p = -1, h = u[o], 1); y < h.length; y += 2) {
                    var f = h[y - 1], _ = h[y];
                    f === a ? p = _ : _ === a && (i = f);
                  }
                  i < 0 || p < 0 || e(n[o], n[a], n[i], n[p]) >= 0 || (s.flip(o, a), r(n, s, t, i, o, p), r(n, s, t, o, p, i), r(n, s, t, p, a, i), r(n, s, t, a, i, p));
                }
              };
            }, { "binary-search-bounds": 31, "robust-in-sphere": 282 }], 44: [function(g, k, x) {
              var e, r = g("binary-search-bounds");
              function n(t, d, u, o, h, l, i) {
                this.cells = t, this.neighbor = d, this.flags = o, this.constraint = u, this.active = h, this.next = l, this.boundary = i;
              }
              function s(t, d) {
                return t[0] - d[0] || t[1] - d[1] || t[2] - d[2];
              }
              k.exports = function(t, d, u) {
                var o = function(L, A) {
                  for (var I = L.cells(), P = I.length, S = 0; S < P; ++S) {
                    var E = (V = I[S])[0], R = V[1], z = V[2];
                    R < z ? R < E && (V[0] = R, V[1] = z, V[2] = E) : z < E && (V[0] = z, V[1] = E, V[2] = R);
                  }
                  I.sort(s);
                  var j = new Array(P);
                  for (S = 0; S < j.length; ++S)
                    j[S] = 0;
                  var H = [], Y = [], J = new Array(3 * P), W = new Array(3 * P), Z = null;
                  A && (Z = []);
                  var re = new n(I, J, W, j, H, Y, Z);
                  for (S = 0; S < P; ++S)
                    for (var V = I[S], B = 0; B < 3; ++B) {
                      E = V[B], R = V[(B + 1) % 3];
                      var U = J[3 * S + B] = re.locate(R, E, L.opposite(R, E)), ee = W[3 * S + B] = L.isConstraint(E, R);
                      U < 0 && (ee ? Y.push(S) : (H.push(S), j[S] = 1), A && Z.push([R, E, -1]));
                    }
                  return re;
                }(t, u);
                if (d === 0)
                  return u ? o.cells.concat(o.boundary) : o.cells;
                for (var h = 1, l = o.active, i = o.next, p = o.flags, c = o.cells, a = o.constraint, y = o.neighbor; l.length > 0 || i.length > 0; ) {
                  for (; l.length > 0; ) {
                    var f = l.pop();
                    if (p[f] !== -h) {
                      p[f] = h, c[f];
                      for (var _ = 0; _ < 3; ++_) {
                        var b = y[3 * f + _];
                        b >= 0 && p[b] === 0 && (a[3 * f + _] ? i.push(b) : (l.push(b), p[b] = h));
                      }
                    }
                  }
                  var w = i;
                  i = l, l = w, i.length = 0, h = -h;
                }
                var T = function(L, A, I) {
                  for (var P = 0, S = 0; S < L.length; ++S)
                    A[S] === I && (L[P++] = L[S]);
                  return L.length = P, L;
                }(c, p, d);
                return u ? T.concat(o.boundary) : T;
              }, n.prototype.locate = (e = [0, 0, 0], function(t, d, u) {
                var o = t, h = d, l = u;
                return d < u ? d < t && (o = d, h = u, l = t) : u < t && (o = u, h = t, l = d), o < 0 ? -1 : (e[0] = o, e[1] = h, e[2] = l, r.eq(this.cells, e, s));
              });
            }, { "binary-search-bounds": 31 }], 45: [function(g, k, x) {
              var e = g("binary-search-bounds"), r = g("robust-orientation")[3];
              function n(i, p, c, a, y) {
                this.a = i, this.b = p, this.idx = c, this.lowerIds = a, this.upperIds = y;
              }
              function s(i, p, c, a) {
                this.a = i, this.b = p, this.type = c, this.idx = a;
              }
              function t(i, p) {
                var c = i.a[0] - p.a[0] || i.a[1] - p.a[1] || i.type - p.type;
                return c || (i.type !== 0 && (c = r(i.a, i.b, p.b)) ? c : i.idx - p.idx);
              }
              function d(i, p) {
                return r(i.a, i.b, p);
              }
              function u(i, p, c, a, y) {
                for (var f = e.lt(p, a, d), _ = e.gt(p, a, d), b = f; b < _; ++b) {
                  for (var w = p[b], T = w.lowerIds, L = T.length; L > 1 && r(c[T[L - 2]], c[T[L - 1]], a) > 0; )
                    i.push([T[L - 1], T[L - 2], y]), L -= 1;
                  T.length = L, T.push(y);
                  var A = w.upperIds;
                  for (L = A.length; L > 1 && r(c[A[L - 2]], c[A[L - 1]], a) < 0; )
                    i.push([A[L - 2], A[L - 1], y]), L -= 1;
                  A.length = L, A.push(y);
                }
              }
              function o(i, p) {
                var c;
                return (c = i.a[0] < p.a[0] ? r(i.a, i.b, p.a) : r(p.b, p.a, i.a)) ? c : (c = p.b[0] < i.b[0] ? r(i.a, i.b, p.b) : r(p.b, p.a, i.b)) || i.idx - p.idx;
              }
              function h(i, p, c) {
                var a = e.le(i, c, o), y = i[a], f = y.upperIds, _ = f[f.length - 1];
                y.upperIds = [_], i.splice(a + 1, 0, new n(c.a, c.b, c.idx, [_], f));
              }
              function l(i, p, c) {
                var a = c.a;
                c.a = c.b, c.b = a;
                var y = e.eq(i, c, o), f = i[y];
                i[y - 1].upperIds = f.upperIds, i.splice(y, 1);
              }
              k.exports = function(i, p) {
                for (var c = i.length, a = p.length, y = [], f = 0; f < c; ++f)
                  y.push(new s(i[f], null, 0, f));
                for (f = 0; f < a; ++f) {
                  var _ = p[f], b = i[_[0]], w = i[_[1]];
                  b[0] < w[0] ? y.push(new s(b, w, 2, f), new s(w, b, 1, f)) : b[0] > w[0] && y.push(new s(w, b, 2, f), new s(b, w, 1, f));
                }
                y.sort(t);
                for (var T = y[0].a[0] - (1 + Math.abs(y[0].a[0])) * Math.pow(2, -52), L = [new n([T, 1], [T, 0], -1, [], [])], A = [], I = (f = 0, y.length); f < I; ++f) {
                  var P = y[f], S = P.type;
                  S === 0 ? u(A, L, i, P.a, P.idx) : S === 2 ? h(L, i, P) : l(L, i, P);
                }
                return A;
              };
            }, { "binary-search-bounds": 31, "robust-orientation": 284 }], 46: [function(g, k, x) {
              var e = g("binary-search-bounds");
              function r(t, d) {
                this.stars = t, this.edges = d;
              }
              k.exports = function(t, d) {
                for (var u = new Array(t), o = 0; o < t; ++o)
                  u[o] = [];
                return new r(u, d);
              };
              var n = r.prototype;
              function s(t, d, u) {
                for (var o = 1, h = t.length; o < h; o += 2)
                  if (t[o - 1] === d && t[o] === u)
                    return t[o - 1] = t[h - 2], t[o] = t[h - 1], void (t.length = h - 2);
              }
              n.isConstraint = function() {
                var t = [0, 0];
                function d(u, o) {
                  return u[0] - o[0] || u[1] - o[1];
                }
                return function(u, o) {
                  return t[0] = Math.min(u, o), t[1] = Math.max(u, o), e.eq(this.edges, t, d) >= 0;
                };
              }(), n.removeTriangle = function(t, d, u) {
                var o = this.stars;
                s(o[t], d, u), s(o[d], u, t), s(o[u], t, d);
              }, n.addTriangle = function(t, d, u) {
                var o = this.stars;
                o[t].push(d, u), o[d].push(u, t), o[u].push(t, d);
              }, n.opposite = function(t, d) {
                for (var u = this.stars[d], o = 1, h = u.length; o < h; o += 2)
                  if (u[o] === t)
                    return u[o - 1];
                return -1;
              }, n.flip = function(t, d) {
                var u = this.opposite(t, d), o = this.opposite(d, t);
                this.removeTriangle(t, d, u), this.removeTriangle(d, t, o), this.addTriangle(t, o, u), this.addTriangle(d, u, o);
              }, n.edges = function() {
                for (var t = this.stars, d = [], u = 0, o = t.length; u < o; ++u)
                  for (var h = t[u], l = 0, i = h.length; l < i; l += 2)
                    d.push([h[l], h[l + 1]]);
                return d;
              }, n.cells = function() {
                for (var t = this.stars, d = [], u = 0, o = t.length; u < o; ++u)
                  for (var h = t[u], l = 0, i = h.length; l < i; l += 2) {
                    var p = h[l], c = h[l + 1];
                    u < Math.min(p, c) && d.push([u, p, c]);
                  }
                return d;
              };
            }, { "binary-search-bounds": 31 }], 47: [function(g, k, x) {
              k.exports = function(e) {
                for (var r = 1, n = 1; n < e.length; ++n)
                  for (var s = 0; s < n; ++s)
                    if (e[n] < e[s])
                      r = -r;
                    else if (e[s] === e[n])
                      return 0;
                return r;
              };
            }, {}], 48: [function(g, k, x) {
              var e = g("dup"), r = g("robust-linear-solve");
              function n(d, u) {
                for (var o = 0, h = d.length, l = 0; l < h; ++l)
                  o += d[l] * u[l];
                return o;
              }
              function s(d) {
                var u = d.length;
                if (u === 0)
                  return [];
                d[0].length;
                var o = e([d.length + 1, d.length + 1], 1), h = e([d.length + 1], 1);
                o[u][u] = 0;
                for (var l = 0; l < u; ++l) {
                  for (var i = 0; i <= l; ++i)
                    o[i][l] = o[l][i] = 2 * n(d[l], d[i]);
                  h[l] = n(d[l], d[l]);
                }
                var p = r(o, h), c = 0, a = p[u + 1];
                for (l = 0; l < a.length; ++l)
                  c += a[l];
                var y = new Array(u);
                for (l = 0; l < u; ++l) {
                  a = p[l];
                  var f = 0;
                  for (i = 0; i < a.length; ++i)
                    f += a[i];
                  y[l] = f / c;
                }
                return y;
              }
              function t(d) {
                if (d.length === 0)
                  return [];
                for (var u = d[0].length, o = e([u]), h = s(d), l = 0; l < d.length; ++l)
                  for (var i = 0; i < u; ++i)
                    o[i] += d[l][i] * h[l];
                return o;
              }
              t.barycenetric = s, k.exports = t;
            }, { dup: 65, "robust-linear-solve": 283 }], 49: [function(g, k, x) {
              k.exports = function(r) {
                for (var n = e(r), s = 0, t = 0; t < r.length; ++t)
                  for (var d = r[t], u = 0; u < n.length; ++u)
                    s += Math.pow(d[u] - n[u], 2);
                return Math.sqrt(s / r.length);
              };
              var e = g("circumcenter");
            }, { circumcenter: 48 }], 50: [function(g, k, x) {
              k.exports = function(_, b, w) {
                var T;
                if (w) {
                  T = b;
                  for (var L = new Array(b.length), A = 0; A < b.length; ++A) {
                    var I = b[A];
                    L[A] = [I[0], I[1], w[A]];
                  }
                  b = L;
                }
                for (var P = function(S, E, R) {
                  var z = p(S, [], i(S));
                  return y(E, z, R), !!z;
                }(_, b, !!w); f(_, b, !!w); )
                  P = !0;
                if (w && P)
                  for (T.length = 0, w.length = 0, A = 0; A < b.length; ++A)
                    I = b[A], T.push([I[0], I[1]]), w.push(I[2]);
                return P;
              };
              var e = g("union-find"), r = g("box-intersect"), n = g("robust-segment-intersect"), s = g("big-rat"), t = g("big-rat/cmp"), d = g("big-rat/to-float"), u = g("rat-vec"), o = g("nextafter"), h = g("./lib/rat-seg-intersect");
              function l(_) {
                var b = d(_);
                return [o(b, -1 / 0), o(b, 1 / 0)];
              }
              function i(_) {
                for (var b = new Array(_.length), w = 0; w < _.length; ++w) {
                  var T = _[w];
                  b[w] = [o(T[0], -1 / 0), o(T[1], -1 / 0), o(T[0], 1 / 0), o(T[1], 1 / 0)];
                }
                return b;
              }
              function p(_, b, w) {
                for (var T = b.length, L = new e(T), A = [], I = 0; I < b.length; ++I) {
                  var P = b[I], S = l(P[0]), E = l(P[1]);
                  A.push([o(S[0], -1 / 0), o(E[0], -1 / 0), o(S[1], 1 / 0), o(E[1], 1 / 0)]);
                }
                r(A, function(Y, J) {
                  L.link(Y, J);
                });
                var R = !0, z = new Array(T);
                for (I = 0; I < T; ++I)
                  (H = L.find(I)) !== I && (R = !1, _[H] = [Math.min(_[I][0], _[H][0]), Math.min(_[I][1], _[H][1])]);
                if (R)
                  return null;
                var j = 0;
                for (I = 0; I < T; ++I) {
                  var H;
                  (H = L.find(I)) === I ? (z[I] = j, _[j++] = _[I]) : z[I] = -1;
                }
                for (_.length = j, I = 0; I < T; ++I)
                  z[I] < 0 && (z[I] = z[L.find(I)]);
                return z;
              }
              function c(_, b) {
                return _[0] - b[0] || _[1] - b[1];
              }
              function a(_, b) {
                var w = _[0] - b[0] || _[1] - b[1];
                return w || (_[2] < b[2] ? -1 : _[2] > b[2] ? 1 : 0);
              }
              function y(_, b, w) {
                if (_.length !== 0) {
                  if (b)
                    for (var T = 0; T < _.length; ++T) {
                      var L = b[(I = _[T])[0]], A = b[I[1]];
                      I[0] = Math.min(L, A), I[1] = Math.max(L, A);
                    }
                  else
                    for (T = 0; T < _.length; ++T) {
                      var I;
                      L = (I = _[T])[0], A = I[1], I[0] = Math.min(L, A), I[1] = Math.max(L, A);
                    }
                  w ? _.sort(a) : _.sort(c);
                  var P = 1;
                  for (T = 1; T < _.length; ++T) {
                    var S = _[T - 1], E = _[T];
                    (E[0] !== S[0] || E[1] !== S[1] || w && E[2] !== S[2]) && (_[P++] = E);
                  }
                  _.length = P;
                }
              }
              function f(_, b, w) {
                var T = function(S, E) {
                  for (var R = new Array(E.length), z = 0; z < E.length; ++z) {
                    var j = E[z], H = S[j[0]], Y = S[j[1]];
                    R[z] = [o(Math.min(H[0], Y[0]), -1 / 0), o(Math.min(H[1], Y[1]), -1 / 0), o(Math.max(H[0], Y[0]), 1 / 0), o(Math.max(H[1], Y[1]), 1 / 0)];
                  }
                  return R;
                }(_, b), L = function(S, E, R) {
                  var z = [];
                  return r(R, function(j, H) {
                    var Y = E[j], J = E[H];
                    if (Y[0] !== J[0] && Y[0] !== J[1] && Y[1] !== J[0] && Y[1] !== J[1]) {
                      var W = S[Y[0]], Z = S[Y[1]], re = S[J[0]], V = S[J[1]];
                      n(W, Z, re, V) && z.push([j, H]);
                    }
                  }), z;
                }(_, b, T), A = i(_), I = function(S, E, R, z) {
                  var j = [];
                  return r(R, z, function(H, Y) {
                    var J = E[H];
                    if (J[0] !== Y && J[1] !== Y) {
                      var W = S[Y], Z = S[J[0]], re = S[J[1]];
                      n(Z, re, W, W) && j.push([H, Y]);
                    }
                  }), j;
                }(_, b, T, A), P = p(_, function(S, E, R, z, j) {
                  var H, Y, J = S.map(function(ye) {
                    return [s(ye[0]), s(ye[1])];
                  });
                  for (H = 0; H < R.length; ++H) {
                    var W = R[H];
                    Y = W[0];
                    var Z = W[1], re = E[Y], V = E[Z], B = h(u(S[re[0]]), u(S[re[1]]), u(S[V[0]]), u(S[V[1]]));
                    if (B) {
                      var U = S.length;
                      S.push([d(B[0]), d(B[1])]), J.push(B), z.push([Y, U], [Z, U]);
                    }
                  }
                  for (z.sort(function(ye, Ae) {
                    if (ye[0] !== Ae[0])
                      return ye[0] - Ae[0];
                    var pe = J[ye[1]], ge = J[Ae[1]];
                    return t(pe[0], ge[0]) || t(pe[1], ge[1]);
                  }), H = z.length - 1; H >= 0; --H) {
                    var ee = E[Y = (ve = z[H])[0]], N = ee[0], K = ee[1], X = S[N], te = S[K];
                    if ((X[0] - te[0] || X[1] - te[1]) < 0) {
                      var ie = N;
                      N = K, K = ie;
                    }
                    ee[0] = N;
                    var le, oe = ee[1] = ve[1];
                    for (j && (le = ee[2]); H > 0 && z[H - 1][0] === Y; ) {
                      var ve, ue = (ve = z[--H])[1];
                      j ? E.push([oe, ue, le]) : E.push([oe, ue]), oe = ue;
                    }
                    j ? E.push([oe, K, le]) : E.push([oe, K]);
                  }
                  return J;
                }(_, b, L, I, w));
                return y(b, P, w), !!P || L.length > 0 || I.length > 0;
              }
            }, { "./lib/rat-seg-intersect": 51, "big-rat": 18, "big-rat/cmp": 16, "big-rat/to-float": 30, "box-intersect": 35, nextafter: 260, "rat-vec": 273, "robust-segment-intersect": 287, "union-find": 309 }], 51: [function(g, k, x) {
              k.exports = function(h, l, i, p) {
                var c = t(l, h), a = t(p, i), y = o(c, a);
                if (s(y) === 0)
                  return null;
                var f = t(h, i), _ = o(a, f), b = r(_, y), w = u(c, b);
                return d(h, w);
              };
              var e = g("big-rat/mul"), r = g("big-rat/div"), n = g("big-rat/sub"), s = g("big-rat/sign"), t = g("rat-vec/sub"), d = g("rat-vec/add"), u = g("rat-vec/muls");
              function o(h, l) {
                return n(e(h[0], l[1]), e(h[1], l[0]));
              }
            }, { "big-rat/div": 17, "big-rat/mul": 27, "big-rat/sign": 28, "big-rat/sub": 29, "rat-vec/add": 272, "rat-vec/muls": 274, "rat-vec/sub": 275 }], 52: [function(g, k, x) {
              k.exports = { jet: [{ index: 0, rgb: [0, 0, 131] }, { index: 0.125, rgb: [0, 60, 170] }, { index: 0.375, rgb: [5, 255, 255] }, { index: 0.625, rgb: [255, 255, 0] }, { index: 0.875, rgb: [250, 0, 0] }, { index: 1, rgb: [128, 0, 0] }], hsv: [{ index: 0, rgb: [255, 0, 0] }, { index: 0.169, rgb: [253, 255, 2] }, { index: 0.173, rgb: [247, 255, 2] }, { index: 0.337, rgb: [0, 252, 4] }, { index: 0.341, rgb: [0, 252, 10] }, { index: 0.506, rgb: [1, 249, 255] }, { index: 0.671, rgb: [2, 0, 253] }, { index: 0.675, rgb: [8, 0, 253] }, { index: 0.839, rgb: [255, 0, 251] }, { index: 0.843, rgb: [255, 0, 245] }, { index: 1, rgb: [255, 0, 6] }], hot: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.3, rgb: [230, 0, 0] }, { index: 0.6, rgb: [255, 210, 0] }, { index: 1, rgb: [255, 255, 255] }], spring: [{ index: 0, rgb: [255, 0, 255] }, { index: 1, rgb: [255, 255, 0] }], summer: [{ index: 0, rgb: [0, 128, 102] }, { index: 1, rgb: [255, 255, 102] }], autumn: [{ index: 0, rgb: [255, 0, 0] }, { index: 1, rgb: [255, 255, 0] }], winter: [{ index: 0, rgb: [0, 0, 255] }, { index: 1, rgb: [0, 255, 128] }], bone: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.376, rgb: [84, 84, 116] }, { index: 0.753, rgb: [169, 200, 200] }, { index: 1, rgb: [255, 255, 255] }], copper: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.804, rgb: [255, 160, 102] }, { index: 1, rgb: [255, 199, 127] }], greys: [{ index: 0, rgb: [0, 0, 0] }, { index: 1, rgb: [255, 255, 255] }], yignbu: [{ index: 0, rgb: [8, 29, 88] }, { index: 0.125, rgb: [37, 52, 148] }, { index: 0.25, rgb: [34, 94, 168] }, { index: 0.375, rgb: [29, 145, 192] }, { index: 0.5, rgb: [65, 182, 196] }, { index: 0.625, rgb: [127, 205, 187] }, { index: 0.75, rgb: [199, 233, 180] }, { index: 0.875, rgb: [237, 248, 217] }, { index: 1, rgb: [255, 255, 217] }], greens: [{ index: 0, rgb: [0, 68, 27] }, { index: 0.125, rgb: [0, 109, 44] }, { index: 0.25, rgb: [35, 139, 69] }, { index: 0.375, rgb: [65, 171, 93] }, { index: 0.5, rgb: [116, 196, 118] }, { index: 0.625, rgb: [161, 217, 155] }, { index: 0.75, rgb: [199, 233, 192] }, { index: 0.875, rgb: [229, 245, 224] }, { index: 1, rgb: [247, 252, 245] }], yiorrd: [{ index: 0, rgb: [128, 0, 38] }, { index: 0.125, rgb: [189, 0, 38] }, { index: 0.25, rgb: [227, 26, 28] }, { index: 0.375, rgb: [252, 78, 42] }, { index: 0.5, rgb: [253, 141, 60] }, { index: 0.625, rgb: [254, 178, 76] }, { index: 0.75, rgb: [254, 217, 118] }, { index: 0.875, rgb: [255, 237, 160] }, { index: 1, rgb: [255, 255, 204] }], bluered: [{ index: 0, rgb: [0, 0, 255] }, { index: 1, rgb: [255, 0, 0] }], rdbu: [{ index: 0, rgb: [5, 10, 172] }, { index: 0.35, rgb: [106, 137, 247] }, { index: 0.5, rgb: [190, 190, 190] }, { index: 0.6, rgb: [220, 170, 132] }, { index: 0.7, rgb: [230, 145, 90] }, { index: 1, rgb: [178, 10, 28] }], picnic: [{ index: 0, rgb: [0, 0, 255] }, { index: 0.1, rgb: [51, 153, 255] }, { index: 0.2, rgb: [102, 204, 255] }, { index: 0.3, rgb: [153, 204, 255] }, { index: 0.4, rgb: [204, 204, 255] }, { index: 0.5, rgb: [255, 255, 255] }, { index: 0.6, rgb: [255, 204, 255] }, { index: 0.7, rgb: [255, 153, 255] }, { index: 0.8, rgb: [255, 102, 204] }, { index: 0.9, rgb: [255, 102, 102] }, { index: 1, rgb: [255, 0, 0] }], rainbow: [{ index: 0, rgb: [150, 0, 90] }, { index: 0.125, rgb: [0, 0, 200] }, { index: 0.25, rgb: [0, 25, 255] }, { index: 0.375, rgb: [0, 152, 255] }, { index: 0.5, rgb: [44, 255, 150] }, { index: 0.625, rgb: [151, 255, 0] }, { index: 0.75, rgb: [255, 234, 0] }, { index: 0.875, rgb: [255, 111, 0] }, { index: 1, rgb: [255, 0, 0] }], portland: [{ index: 0, rgb: [12, 51, 131] }, { index: 0.25, rgb: [10, 136, 186] }, { index: 0.5, rgb: [242, 211, 56] }, { index: 0.75, rgb: [242, 143, 56] }, { index: 1, rgb: [217, 30, 30] }], blackbody: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.2, rgb: [230, 0, 0] }, { index: 0.4, rgb: [230, 210, 0] }, { index: 0.7, rgb: [255, 255, 255] }, { index: 1, rgb: [160, 200, 255] }], earth: [{ index: 0, rgb: [0, 0, 130] }, { index: 0.1, rgb: [0, 180, 180] }, { index: 0.2, rgb: [40, 210, 40] }, { index: 0.4, rgb: [230, 230, 50] }, { index: 0.6, rgb: [120, 70, 20] }, { index: 1, rgb: [255, 255, 255] }], electric: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.15, rgb: [30, 0, 100] }, { index: 0.4, rgb: [120, 0, 100] }, { index: 0.6, rgb: [160, 90, 0] }, { index: 0.8, rgb: [230, 200, 0] }, { index: 1, rgb: [255, 250, 220] }], alpha: [{ index: 0, rgb: [255, 255, 255, 0] }, { index: 1, rgb: [255, 255, 255, 1] }], viridis: [{ index: 0, rgb: [68, 1, 84] }, { index: 0.13, rgb: [71, 44, 122] }, { index: 0.25, rgb: [59, 81, 139] }, { index: 0.38, rgb: [44, 113, 142] }, { index: 0.5, rgb: [33, 144, 141] }, { index: 0.63, rgb: [39, 173, 129] }, { index: 0.75, rgb: [92, 200, 99] }, { index: 0.88, rgb: [170, 220, 50] }, { index: 1, rgb: [253, 231, 37] }], inferno: [{ index: 0, rgb: [0, 0, 4] }, { index: 0.13, rgb: [31, 12, 72] }, { index: 0.25, rgb: [85, 15, 109] }, { index: 0.38, rgb: [136, 34, 106] }, { index: 0.5, rgb: [186, 54, 85] }, { index: 0.63, rgb: [227, 89, 51] }, { index: 0.75, rgb: [249, 140, 10] }, { index: 0.88, rgb: [249, 201, 50] }, { index: 1, rgb: [252, 255, 164] }], magma: [{ index: 0, rgb: [0, 0, 4] }, { index: 0.13, rgb: [28, 16, 68] }, { index: 0.25, rgb: [79, 18, 123] }, { index: 0.38, rgb: [129, 37, 129] }, { index: 0.5, rgb: [181, 54, 122] }, { index: 0.63, rgb: [229, 80, 100] }, { index: 0.75, rgb: [251, 135, 97] }, { index: 0.88, rgb: [254, 194, 135] }, { index: 1, rgb: [252, 253, 191] }], plasma: [{ index: 0, rgb: [13, 8, 135] }, { index: 0.13, rgb: [75, 3, 161] }, { index: 0.25, rgb: [125, 3, 168] }, { index: 0.38, rgb: [168, 34, 150] }, { index: 0.5, rgb: [203, 70, 121] }, { index: 0.63, rgb: [229, 107, 93] }, { index: 0.75, rgb: [248, 148, 65] }, { index: 0.88, rgb: [253, 195, 40] }, { index: 1, rgb: [240, 249, 33] }], warm: [{ index: 0, rgb: [125, 0, 179] }, { index: 0.13, rgb: [172, 0, 187] }, { index: 0.25, rgb: [219, 0, 170] }, { index: 0.38, rgb: [255, 0, 130] }, { index: 0.5, rgb: [255, 63, 74] }, { index: 0.63, rgb: [255, 123, 0] }, { index: 0.75, rgb: [234, 176, 0] }, { index: 0.88, rgb: [190, 228, 0] }, { index: 1, rgb: [147, 255, 0] }], cool: [{ index: 0, rgb: [125, 0, 179] }, { index: 0.13, rgb: [116, 0, 218] }, { index: 0.25, rgb: [98, 74, 237] }, { index: 0.38, rgb: [68, 146, 231] }, { index: 0.5, rgb: [0, 204, 197] }, { index: 0.63, rgb: [0, 247, 146] }, { index: 0.75, rgb: [0, 255, 88] }, { index: 0.88, rgb: [40, 255, 8] }, { index: 1, rgb: [147, 255, 0] }], "rainbow-soft": [{ index: 0, rgb: [125, 0, 179] }, { index: 0.1, rgb: [199, 0, 180] }, { index: 0.2, rgb: [255, 0, 121] }, { index: 0.3, rgb: [255, 108, 0] }, { index: 0.4, rgb: [222, 194, 0] }, { index: 0.5, rgb: [150, 255, 0] }, { index: 0.6, rgb: [0, 255, 55] }, { index: 0.7, rgb: [0, 246, 150] }, { index: 0.8, rgb: [50, 167, 222] }, { index: 0.9, rgb: [103, 51, 235] }, { index: 1, rgb: [124, 0, 186] }], bathymetry: [{ index: 0, rgb: [40, 26, 44] }, { index: 0.13, rgb: [59, 49, 90] }, { index: 0.25, rgb: [64, 76, 139] }, { index: 0.38, rgb: [63, 110, 151] }, { index: 0.5, rgb: [72, 142, 158] }, { index: 0.63, rgb: [85, 174, 163] }, { index: 0.75, rgb: [120, 206, 163] }, { index: 0.88, rgb: [187, 230, 172] }, { index: 1, rgb: [253, 254, 204] }], cdom: [{ index: 0, rgb: [47, 15, 62] }, { index: 0.13, rgb: [87, 23, 86] }, { index: 0.25, rgb: [130, 28, 99] }, { index: 0.38, rgb: [171, 41, 96] }, { index: 0.5, rgb: [206, 67, 86] }, { index: 0.63, rgb: [230, 106, 84] }, { index: 0.75, rgb: [242, 149, 103] }, { index: 0.88, rgb: [249, 193, 135] }, { index: 1, rgb: [254, 237, 176] }], chlorophyll: [{ index: 0, rgb: [18, 36, 20] }, { index: 0.13, rgb: [25, 63, 41] }, { index: 0.25, rgb: [24, 91, 59] }, { index: 0.38, rgb: [13, 119, 72] }, { index: 0.5, rgb: [18, 148, 80] }, { index: 0.63, rgb: [80, 173, 89] }, { index: 0.75, rgb: [132, 196, 122] }, { index: 0.88, rgb: [175, 221, 162] }, { index: 1, rgb: [215, 249, 208] }], density: [{ index: 0, rgb: [54, 14, 36] }, { index: 0.13, rgb: [89, 23, 80] }, { index: 0.25, rgb: [110, 45, 132] }, { index: 0.38, rgb: [120, 77, 178] }, { index: 0.5, rgb: [120, 113, 213] }, { index: 0.63, rgb: [115, 151, 228] }, { index: 0.75, rgb: [134, 185, 227] }, { index: 0.88, rgb: [177, 214, 227] }, { index: 1, rgb: [230, 241, 241] }], "freesurface-blue": [{ index: 0, rgb: [30, 4, 110] }, { index: 0.13, rgb: [47, 14, 176] }, { index: 0.25, rgb: [41, 45, 236] }, { index: 0.38, rgb: [25, 99, 212] }, { index: 0.5, rgb: [68, 131, 200] }, { index: 0.63, rgb: [114, 156, 197] }, { index: 0.75, rgb: [157, 181, 203] }, { index: 0.88, rgb: [200, 208, 216] }, { index: 1, rgb: [241, 237, 236] }], "freesurface-red": [{ index: 0, rgb: [60, 9, 18] }, { index: 0.13, rgb: [100, 17, 27] }, { index: 0.25, rgb: [142, 20, 29] }, { index: 0.38, rgb: [177, 43, 27] }, { index: 0.5, rgb: [192, 87, 63] }, { index: 0.63, rgb: [205, 125, 105] }, { index: 0.75, rgb: [216, 162, 148] }, { index: 0.88, rgb: [227, 199, 193] }, { index: 1, rgb: [241, 237, 236] }], oxygen: [{ index: 0, rgb: [64, 5, 5] }, { index: 0.13, rgb: [106, 6, 15] }, { index: 0.25, rgb: [144, 26, 7] }, { index: 0.38, rgb: [168, 64, 3] }, { index: 0.5, rgb: [188, 100, 4] }, { index: 0.63, rgb: [206, 136, 11] }, { index: 0.75, rgb: [220, 174, 25] }, { index: 0.88, rgb: [231, 215, 44] }, { index: 1, rgb: [248, 254, 105] }], par: [{ index: 0, rgb: [51, 20, 24] }, { index: 0.13, rgb: [90, 32, 35] }, { index: 0.25, rgb: [129, 44, 34] }, { index: 0.38, rgb: [159, 68, 25] }, { index: 0.5, rgb: [182, 99, 19] }, { index: 0.63, rgb: [199, 134, 22] }, { index: 0.75, rgb: [212, 171, 35] }, { index: 0.88, rgb: [221, 210, 54] }, { index: 1, rgb: [225, 253, 75] }], phase: [{ index: 0, rgb: [145, 105, 18] }, { index: 0.13, rgb: [184, 71, 38] }, { index: 0.25, rgb: [186, 58, 115] }, { index: 0.38, rgb: [160, 71, 185] }, { index: 0.5, rgb: [110, 97, 218] }, { index: 0.63, rgb: [50, 123, 164] }, { index: 0.75, rgb: [31, 131, 110] }, { index: 0.88, rgb: [77, 129, 34] }, { index: 1, rgb: [145, 105, 18] }], salinity: [{ index: 0, rgb: [42, 24, 108] }, { index: 0.13, rgb: [33, 50, 162] }, { index: 0.25, rgb: [15, 90, 145] }, { index: 0.38, rgb: [40, 118, 137] }, { index: 0.5, rgb: [59, 146, 135] }, { index: 0.63, rgb: [79, 175, 126] }, { index: 0.75, rgb: [120, 203, 104] }, { index: 0.88, rgb: [193, 221, 100] }, { index: 1, rgb: [253, 239, 154] }], temperature: [{ index: 0, rgb: [4, 35, 51] }, { index: 0.13, rgb: [23, 51, 122] }, { index: 0.25, rgb: [85, 59, 157] }, { index: 0.38, rgb: [129, 79, 143] }, { index: 0.5, rgb: [175, 95, 130] }, { index: 0.63, rgb: [222, 112, 101] }, { index: 0.75, rgb: [249, 146, 66] }, { index: 0.88, rgb: [249, 196, 65] }, { index: 1, rgb: [232, 250, 91] }], turbidity: [{ index: 0, rgb: [34, 31, 27] }, { index: 0.13, rgb: [65, 50, 41] }, { index: 0.25, rgb: [98, 69, 52] }, { index: 0.38, rgb: [131, 89, 57] }, { index: 0.5, rgb: [161, 112, 59] }, { index: 0.63, rgb: [185, 140, 66] }, { index: 0.75, rgb: [202, 174, 88] }, { index: 0.88, rgb: [216, 209, 126] }, { index: 1, rgb: [233, 246, 171] }], "velocity-blue": [{ index: 0, rgb: [17, 32, 64] }, { index: 0.13, rgb: [35, 52, 116] }, { index: 0.25, rgb: [29, 81, 156] }, { index: 0.38, rgb: [31, 113, 162] }, { index: 0.5, rgb: [50, 144, 169] }, { index: 0.63, rgb: [87, 173, 176] }, { index: 0.75, rgb: [149, 196, 189] }, { index: 0.88, rgb: [203, 221, 211] }, { index: 1, rgb: [254, 251, 230] }], "velocity-green": [{ index: 0, rgb: [23, 35, 19] }, { index: 0.13, rgb: [24, 64, 38] }, { index: 0.25, rgb: [11, 95, 45] }, { index: 0.38, rgb: [39, 123, 35] }, { index: 0.5, rgb: [95, 146, 12] }, { index: 0.63, rgb: [152, 165, 18] }, { index: 0.75, rgb: [201, 186, 69] }, { index: 0.88, rgb: [233, 216, 137] }, { index: 1, rgb: [255, 253, 205] }], cubehelix: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.07, rgb: [22, 5, 59] }, { index: 0.13, rgb: [60, 4, 105] }, { index: 0.2, rgb: [109, 1, 135] }, { index: 0.27, rgb: [161, 0, 147] }, { index: 0.33, rgb: [210, 2, 142] }, { index: 0.4, rgb: [251, 11, 123] }, { index: 0.47, rgb: [255, 29, 97] }, { index: 0.53, rgb: [255, 54, 69] }, { index: 0.6, rgb: [255, 85, 46] }, { index: 0.67, rgb: [255, 120, 34] }, { index: 0.73, rgb: [255, 157, 37] }, { index: 0.8, rgb: [241, 191, 57] }, { index: 0.87, rgb: [224, 220, 93] }, { index: 0.93, rgb: [218, 241, 142] }, { index: 1, rgb: [227, 253, 198] }] };
            }, {}], 53: [function(g, k, x) {
              var e = g("./colorScale"), r = g("lerp");
              function n(d) {
                return [d[0] / 255, d[1] / 255, d[2] / 255, d[3]];
              }
              function s(d) {
                for (var u, o = "#", h = 0; h < 3; ++h)
                  o += ("00" + (u = (u = d[h]).toString(16))).substr(u.length);
                return o;
              }
              function t(d) {
                return "rgba(" + d.join(",") + ")";
              }
              k.exports = function(d) {
                var u, o, h, l, i, p, c, a, y, f;
                if (d || (d = {}), a = (d.nshades || 72) - 1, c = d.format || "hex", (p = d.colormap) || (p = "jet"), typeof p == "string") {
                  if (p = p.toLowerCase(), !e[p])
                    throw Error(p + " not a supported colorscale");
                  i = e[p];
                } else {
                  if (!Array.isArray(p))
                    throw Error("unsupported colormap option", p);
                  i = p.slice();
                }
                if (i.length > a + 1)
                  throw new Error(p + " map requires nshades to be at least size " + i.length);
                y = Array.isArray(d.alpha) ? d.alpha.length !== 2 ? [1, 1] : d.alpha.slice() : typeof d.alpha == "number" ? [d.alpha, d.alpha] : [1, 1], u = i.map(function(L) {
                  return Math.round(L.index * a);
                }), y[0] = Math.min(Math.max(y[0], 0), 1), y[1] = Math.min(Math.max(y[1], 0), 1);
                var _ = i.map(function(L, A) {
                  var I = i[A].index, P = i[A].rgb.slice();
                  return P.length === 4 && P[3] >= 0 && P[3] <= 1 || (P[3] = y[0] + (y[1] - y[0]) * I), P;
                }), b = [];
                for (f = 0; f < u.length - 1; ++f) {
                  l = u[f + 1] - u[f], o = _[f], h = _[f + 1];
                  for (var w = 0; w < l; w++) {
                    var T = w / l;
                    b.push([Math.round(r(o[0], h[0], T)), Math.round(r(o[1], h[1], T)), Math.round(r(o[2], h[2], T)), r(o[3], h[3], T)]);
                  }
                }
                return b.push(i[i.length - 1].rgb.concat(y[1])), c === "hex" ? b = b.map(s) : c === "rgbaString" ? b = b.map(t) : c === "float" && (b = b.map(n)), b;
              };
            }, { "./colorScale": 52, lerp: 240 }], 54: [function(g, k, x) {
              k.exports = function(u, o, h, l) {
                var i = e(o, h, l);
                if (i === 0) {
                  var p = r(e(u, o, h)), c = r(e(u, o, l));
                  if (p === c) {
                    if (p === 0) {
                      var a = d(u, o, h), y = d(u, o, l);
                      return a === y ? 0 : a ? 1 : -1;
                    }
                    return 0;
                  }
                  return c === 0 ? p > 0 || d(u, o, l) ? -1 : 1 : p === 0 ? c > 0 || d(u, o, h) ? 1 : -1 : r(c - p);
                }
                var f = e(u, o, h);
                return f > 0 ? i > 0 && e(u, o, l) > 0 ? 1 : -1 : f < 0 ? i > 0 || e(u, o, l) > 0 ? 1 : -1 : e(u, o, l) > 0 || d(u, o, h) ? 1 : -1;
              };
              var e = g("robust-orientation"), r = g("signum"), n = g("two-sum"), s = g("robust-product"), t = g("robust-sum");
              function d(u, o, h) {
                var l = n(u[0], -o[0]), i = n(u[1], -o[1]), p = n(h[0], -o[0]), c = n(h[1], -o[1]), a = t(s(l, p), s(i, c));
                return a[a.length - 1] >= 0;
              }
            }, { "robust-orientation": 284, "robust-product": 285, "robust-sum": 289, signum: 55, "two-sum": 307 }], 55: [function(g, k, x) {
              k.exports = function(e) {
                return e < 0 ? -1 : e > 0 ? 1 : 0;
              };
            }, {}], 56: [function(g, k, x) {
              k.exports = function(n, s) {
                var t = n.length, d = n.length - s.length;
                if (d)
                  return d;
                switch (t) {
                  case 0:
                    return 0;
                  case 1:
                    return n[0] - s[0];
                  case 2:
                    return n[0] + n[1] - s[0] - s[1] || e(n[0], n[1]) - e(s[0], s[1]);
                  case 3:
                    var u = n[0] + n[1], o = s[0] + s[1];
                    if (d = u + n[2] - (o + s[2]))
                      return d;
                    var h = e(n[0], n[1]), l = e(s[0], s[1]);
                    return e(h, n[2]) - e(l, s[2]) || e(h + n[2], u) - e(l + s[2], o);
                  case 4:
                    var i = n[0], p = n[1], c = n[2], a = n[3], y = s[0], f = s[1], _ = s[2], b = s[3];
                    return i + p + c + a - (y + f + _ + b) || e(i, p, c, a) - e(y, f, _, b, y) || e(i + p, i + c, i + a, p + c, p + a, c + a) - e(y + f, y + _, y + b, f + _, f + b, _ + b) || e(i + p + c, i + p + a, i + c + a, p + c + a) - e(y + f + _, y + f + b, y + _ + b, f + _ + b);
                  default:
                    for (var w = n.slice().sort(r), T = s.slice().sort(r), L = 0; L < t; ++L)
                      if (d = w[L] - T[L])
                        return d;
                    return 0;
                }
              };
              var e = Math.min;
              function r(n, s) {
                return n - s;
              }
            }, {}], 57: [function(g, k, x) {
              var e = g("compare-cell"), r = g("cell-orientation");
              k.exports = function(n, s) {
                return e(n, s) || r(n) - r(s);
              };
            }, { "cell-orientation": 47, "compare-cell": 56 }], 58: [function(g, k, x) {
              var e = g("./lib/ch1d"), r = g("./lib/ch2d"), n = g("./lib/chnd");
              k.exports = function(s) {
                var t = s.length;
                if (t === 0)
                  return [];
                if (t === 1)
                  return [[0]];
                var d = s[0].length;
                return d === 0 ? [] : d === 1 ? e(s) : d === 2 ? r(s) : n(s, d);
              };
            }, { "./lib/ch1d": 59, "./lib/ch2d": 60, "./lib/chnd": 61 }], 59: [function(g, k, x) {
              k.exports = function(e) {
                for (var r = 0, n = 0, s = 1; s < e.length; ++s)
                  e[s][0] < e[r][0] && (r = s), e[s][0] > e[n][0] && (n = s);
                return r < n ? [[r], [n]] : r > n ? [[n], [r]] : [[r]];
              };
            }, {}], 60: [function(g, k, x) {
              k.exports = function(r) {
                var n = e(r), s = n.length;
                if (s <= 2)
                  return [];
                for (var t = new Array(s), d = n[s - 1], u = 0; u < s; ++u) {
                  var o = n[u];
                  t[u] = [d, o], d = o;
                }
                return t;
              };
              var e = g("monotone-convex-hull-2d");
            }, { "monotone-convex-hull-2d": 246 }], 61: [function(g, k, x) {
              k.exports = function(n, s) {
                try {
                  return e(n, !0);
                } catch {
                  var t = r(n);
                  if (t.length <= s)
                    return [];
                  var d = function(o, h) {
                    for (var l = o.length, i = new Array(l), p = 0; p < h.length; ++p)
                      i[p] = o[h[p]];
                    var c = h.length;
                    for (p = 0; p < l; ++p)
                      h.indexOf(p) < 0 && (i[c++] = o[p]);
                    return i;
                  }(n, t);
                  return function(o, h) {
                    for (var l = o.length, i = h.length, p = 0; p < l; ++p)
                      for (var c = o[p], a = 0; a < c.length; ++a) {
                        var y = c[a];
                        if (y < i)
                          c[a] = h[y];
                        else {
                          y -= i;
                          for (var f = 0; f < i; ++f)
                            y >= h[f] && (y += 1);
                          c[a] = y;
                        }
                      }
                    return o;
                  }(e(d, !0), t);
                }
              };
              var e = g("incremental-convex-hull"), r = g("affine-hull");
            }, { "affine-hull": 10, "incremental-convex-hull": 233 }], 62: [function(g, k, x) {
              k.exports = function(e, r, n, s, t, d) {
                var u = t - 1, o = t * t, h = u * u, l = (1 + 2 * t) * h, i = t * h, p = o * (3 - 2 * t), c = o * u;
                if (e.length) {
                  d || (d = new Array(e.length));
                  for (var a = e.length - 1; a >= 0; --a)
                    d[a] = l * e[a] + i * r[a] + p * n[a] + c * s[a];
                  return d;
                }
                return l * e + i * r + p * n + c * s;
              }, k.exports.derivative = function(e, r, n, s, t, d) {
                var u = 6 * t * t - 6 * t, o = 3 * t * t - 4 * t + 1, h = -6 * t * t + 6 * t, l = 3 * t * t - 2 * t;
                if (e.length) {
                  d || (d = new Array(e.length));
                  for (var i = e.length - 1; i >= 0; --i)
                    d[i] = u * e[i] + o * r[i] + h * n[i] + l * s[i];
                  return d;
                }
                return u * e + o * r + h * n[i] + l * s;
              };
            }, {}], 63: [function(g, k, x) {
              var e = g("incremental-convex-hull"), r = g("uniq");
              function n(t, d) {
                this.point = t, this.index = d;
              }
              function s(t, d) {
                for (var u = t.point, o = d.point, h = u.length, l = 0; l < h; ++l) {
                  var i = o[l] - u[l];
                  if (i)
                    return i;
                }
                return 0;
              }
              k.exports = function(t, d) {
                var u = t.length;
                if (u === 0)
                  return [];
                var o = t[0].length;
                if (o < 1)
                  return [];
                if (o === 1)
                  return function(I, P, S) {
                    if (I === 1)
                      return S ? [[-1, 0]] : [];
                    var E = P.map(function(Y, J) {
                      return [Y[0], J];
                    });
                    E.sort(function(Y, J) {
                      return Y[0] - J[0];
                    });
                    for (var R = new Array(I - 1), z = 1; z < I; ++z) {
                      var j = E[z - 1], H = E[z];
                      R[z - 1] = [j[1], H[1]];
                    }
                    return S && R.push([-1, R[0][1]], [R[I - 1][1], -1]), R;
                  }(u, t, d);
                for (var h = new Array(u), l = 1, i = 0; i < u; ++i) {
                  for (var p = t[i], c = new Array(o + 1), a = 0, y = 0; y < o; ++y) {
                    var f = p[y];
                    c[y] = f, a += f * f;
                  }
                  c[o] = a, h[i] = new n(c, i), l = Math.max(a, l);
                }
                r(h, s), u = h.length;
                var _ = new Array(u + o + 1), b = new Array(u + o + 1), w = (o + 1) * (o + 1) * l, T = new Array(o + 1);
                for (i = 0; i <= o; ++i)
                  T[i] = 0;
                for (T[o] = w, _[0] = T.slice(), b[0] = -1, i = 0; i <= o; ++i)
                  (c = T.slice())[i] = 1, _[i + 1] = c, b[i + 1] = -1;
                for (i = 0; i < u; ++i) {
                  var L = h[i];
                  _[i + o + 1] = L.point, b[i + o + 1] = L.index;
                }
                var A = e(_, !1);
                if (A = d ? A.filter(function(I) {
                  for (var P = 0, S = 0; S <= o; ++S) {
                    var E = b[I[S]];
                    if (E < 0 && ++P >= 2)
                      return !1;
                    I[S] = E;
                  }
                  return !0;
                }) : A.filter(function(I) {
                  for (var P = 0; P <= o; ++P) {
                    var S = b[I[P]];
                    if (S < 0)
                      return !1;
                    I[P] = S;
                  }
                  return !0;
                }), 1 & o)
                  for (i = 0; i < A.length; ++i)
                    c = (L = A[i])[0], L[0] = L[1], L[1] = c;
                return A;
              };
            }, { "incremental-convex-hull": 233, uniq: 310 }], 64: [function(g, k, x) {
              (function(e) {
                (function() {
                  var r = !1;
                  if (typeof Float64Array < "u") {
                    var n = new Float64Array(1), s = new Uint32Array(n.buffer);
                    n[0] = 1, r = !0, s[1] === 1072693248 ? (k.exports = function(d) {
                      return n[0] = d, [s[0], s[1]];
                    }, k.exports.pack = function(d, u) {
                      return s[0] = d, s[1] = u, n[0];
                    }, k.exports.lo = function(d) {
                      return n[0] = d, s[0];
                    }, k.exports.hi = function(d) {
                      return n[0] = d, s[1];
                    }) : s[0] === 1072693248 ? (k.exports = function(d) {
                      return n[0] = d, [s[1], s[0]];
                    }, k.exports.pack = function(d, u) {
                      return s[1] = d, s[0] = u, n[0];
                    }, k.exports.lo = function(d) {
                      return n[0] = d, s[1];
                    }, k.exports.hi = function(d) {
                      return n[0] = d, s[0];
                    }) : r = !1;
                  }
                  if (!r) {
                    var t = new e(8);
                    k.exports = function(d) {
                      return t.writeDoubleLE(d, 0, !0), [t.readUInt32LE(0, !0), t.readUInt32LE(4, !0)];
                    }, k.exports.pack = function(d, u) {
                      return t.writeUInt32LE(d, 0, !0), t.writeUInt32LE(u, 4, !0), t.readDoubleLE(0, !0);
                    }, k.exports.lo = function(d) {
                      return t.writeDoubleLE(d, 0, !0), t.readUInt32LE(0, !0);
                    }, k.exports.hi = function(d) {
                      return t.writeDoubleLE(d, 0, !0), t.readUInt32LE(4, !0);
                    };
                  }
                  k.exports.sign = function(d) {
                    return k.exports.hi(d) >>> 31;
                  }, k.exports.exponent = function(d) {
                    return (k.exports.hi(d) << 1 >>> 21) - 1023;
                  }, k.exports.fraction = function(d) {
                    var u = k.exports.lo(d), o = k.exports.hi(d), h = 1048575 & o;
                    return 2146435072 & o && (h += 1 << 20), [u, h];
                  }, k.exports.denormalized = function(d) {
                    return !(2146435072 & k.exports.hi(d));
                  };
                }).call(this);
              }).call(this, g("buffer").Buffer);
            }, { buffer: 3 }], 65: [function(g, k, x) {
              k.exports = function(e, r) {
                switch (r === void 0 && (r = 0), typeof e) {
                  case "number":
                    if (e > 0)
                      return function(n, s) {
                        var t, d;
                        for (t = new Array(n), d = 0; d < n; ++d)
                          t[d] = s;
                        return t;
                      }(0 | e, r);
                    break;
                  case "object":
                    if (typeof e.length == "number")
                      return function n(s, t, d) {
                        var u = 0 | s[d];
                        if (u <= 0)
                          return [];
                        var o, h = new Array(u);
                        if (d === s.length - 1)
                          for (o = 0; o < u; ++o)
                            h[o] = t;
                        else
                          for (o = 0; o < u; ++o)
                            h[o] = n(s, t, d + 1);
                        return h;
                      }(e, r, 0);
                }
                return [];
              };
            }, {}], 66: [function(g, k, x) {
              k.exports = function(r, n) {
                var s = r.length;
                if (typeof n != "number") {
                  n = 0;
                  for (var t = 0; t < s; ++t) {
                    var d = r[t];
                    n = Math.max(n, d[0], d[1]);
                  }
                  n = 1 + (0 | n);
                }
                n |= 0;
                var u = new Array(n);
                for (t = 0; t < n; ++t)
                  u[t] = [];
                for (t = 0; t < s; ++t)
                  d = r[t], u[d[0]].push(d[1]), u[d[1]].push(d[0]);
                for (var o = 0; o < n; ++o)
                  e(u[o], function(h, l) {
                    return h - l;
                  });
                return u;
              };
              var e = g("uniq");
            }, { uniq: 310 }], 67: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r || 0, t = n || 1;
                return [[e[12] + e[0], e[13] + e[1], e[14] + e[2], e[15] + e[3]], [e[12] - e[0], e[13] - e[1], e[14] - e[2], e[15] - e[3]], [e[12] + e[4], e[13] + e[5], e[14] + e[6], e[15] + e[7]], [e[12] - e[4], e[13] - e[5], e[14] - e[6], e[15] - e[7]], [s * e[12] + e[8], s * e[13] + e[9], s * e[14] + e[10], s * e[15] + e[11]], [t * e[12] - e[8], t * e[13] - e[9], t * e[14] - e[10], t * e[15] - e[11]]];
              };
            }, {}], 68: [function(g, k, x) {
              k.exports = function(u, o, h) {
                switch (arguments.length) {
                  case 0:
                    return new s([0], [0], 0);
                  case 1:
                    return typeof u == "number" ? new s(l = d(u), l, 0) : new s(u, d(u.length), 0);
                  case 2:
                    if (typeof o == "number") {
                      var l = d(u.length);
                      return new s(u, l, +o);
                    }
                    h = 0;
                  case 3:
                    if (u.length !== o.length)
                      throw new Error("state and velocity lengths must match");
                    return new s(u, o, h);
                }
              };
              var e = g("cubic-hermite"), r = g("binary-search-bounds");
              function n(u, o, h) {
                return Math.min(o, Math.max(u, h));
              }
              function s(u, o, h) {
                this.dimension = u.length, this.bounds = [new Array(this.dimension), new Array(this.dimension)];
                for (var l = 0; l < this.dimension; ++l)
                  this.bounds[0][l] = -1 / 0, this.bounds[1][l] = 1 / 0;
                this._state = u.slice().reverse(), this._velocity = o.slice().reverse(), this._time = [h], this._scratch = [u.slice(), u.slice(), u.slice(), u.slice(), u.slice()];
              }
              var t = s.prototype;
              function d(u) {
                for (var o = new Array(u), h = 0; h < u; ++h)
                  o[h] = 0;
                return o;
              }
              t.flush = function(u) {
                var o = r.gt(this._time, u) - 1;
                o <= 0 || (this._time.splice(0, o), this._state.splice(0, o * this.dimension), this._velocity.splice(0, o * this.dimension));
              }, t.curve = function(u) {
                var o = this._time, h = o.length, l = r.le(o, u), i = this._scratch[0], p = this._state, c = this._velocity, a = this.dimension, y = this.bounds;
                if (l < 0)
                  for (var f = a - 1, _ = 0; _ < a; ++_, --f)
                    i[_] = p[f];
                else if (l >= h - 1) {
                  f = p.length - 1;
                  var b = u - o[h - 1];
                  for (_ = 0; _ < a; ++_, --f)
                    i[_] = p[f] + b * c[f];
                } else {
                  f = a * (l + 1) - 1;
                  var w = o[l], T = o[l + 1] - w || 1, L = this._scratch[1], A = this._scratch[2], I = this._scratch[3], P = this._scratch[4], S = !0;
                  for (_ = 0; _ < a; ++_, --f)
                    L[_] = p[f], I[_] = c[f] * T, A[_] = p[f + a], P[_] = c[f + a] * T, S = S && L[_] === A[_] && I[_] === P[_] && I[_] === 0;
                  if (S)
                    for (_ = 0; _ < a; ++_)
                      i[_] = L[_];
                  else
                    e(L, I, A, P, (u - w) / T, i);
                }
                var E = y[0], R = y[1];
                for (_ = 0; _ < a; ++_)
                  i[_] = n(E[_], R[_], i[_]);
                return i;
              }, t.dcurve = function(u) {
                var o = this._time, h = o.length, l = r.le(o, u), i = this._scratch[0], p = this._state, c = this._velocity, a = this.dimension;
                if (l >= h - 1)
                  for (var y = p.length - 1, f = (o[h - 1], 0); f < a; ++f, --y)
                    i[f] = c[y];
                else {
                  y = a * (l + 1) - 1;
                  var _ = o[l], b = o[l + 1] - _ || 1, w = this._scratch[1], T = this._scratch[2], L = this._scratch[3], A = this._scratch[4], I = !0;
                  for (f = 0; f < a; ++f, --y)
                    w[f] = p[y], L[f] = c[y] * b, T[f] = p[y + a], A[f] = c[y + a] * b, I = I && w[f] === T[f] && L[f] === A[f] && L[f] === 0;
                  if (I)
                    for (f = 0; f < a; ++f)
                      i[f] = 0;
                  else
                    for (e.derivative(w, L, T, A, (u - _) / b, i), f = 0; f < a; ++f)
                      i[f] /= b;
                }
                return i;
              }, t.lastT = function() {
                var u = this._time;
                return u[u.length - 1];
              }, t.stable = function() {
                for (var u = this._velocity, o = u.length, h = this.dimension - 1; h >= 0; --h)
                  if (u[--o])
                    return !1;
                return !0;
              }, t.jump = function(u) {
                var o = this.lastT(), h = this.dimension;
                if (!(u < o || arguments.length !== h + 1)) {
                  var l = this._state, i = this._velocity, p = l.length - this.dimension, c = this.bounds, a = c[0], y = c[1];
                  this._time.push(o, u);
                  for (var f = 0; f < 2; ++f)
                    for (var _ = 0; _ < h; ++_)
                      l.push(l[p++]), i.push(0);
                  for (this._time.push(u), _ = h; _ > 0; --_)
                    l.push(n(a[_ - 1], y[_ - 1], arguments[_])), i.push(0);
                }
              }, t.push = function(u) {
                var o = this.lastT(), h = this.dimension;
                if (!(u < o || arguments.length !== h + 1)) {
                  var l = this._state, i = this._velocity, p = l.length - this.dimension, c = u - o, a = this.bounds, y = a[0], f = a[1], _ = c > 1e-6 ? 1 / c : 0;
                  this._time.push(u);
                  for (var b = h; b > 0; --b) {
                    var w = n(y[b - 1], f[b - 1], arguments[b]);
                    l.push(w), i.push((w - l[p++]) * _);
                  }
                }
              }, t.set = function(u) {
                var o = this.dimension;
                if (!(u < this.lastT() || arguments.length !== o + 1)) {
                  var h = this._state, l = this._velocity, i = this.bounds, p = i[0], c = i[1];
                  this._time.push(u);
                  for (var a = o; a > 0; --a)
                    h.push(n(p[a - 1], c[a - 1], arguments[a])), l.push(0);
                }
              }, t.move = function(u) {
                var o = this.lastT(), h = this.dimension;
                if (!(u <= o || arguments.length !== h + 1)) {
                  var l = this._state, i = this._velocity, p = l.length - this.dimension, c = this.bounds, a = c[0], y = c[1], f = u - o, _ = f > 1e-6 ? 1 / f : 0;
                  this._time.push(u);
                  for (var b = h; b > 0; --b) {
                    var w = arguments[b];
                    l.push(n(a[b - 1], y[b - 1], l[p++] + w)), i.push(w * _);
                  }
                }
              }, t.idle = function(u) {
                var o = this.lastT();
                if (!(u < o)) {
                  var h = this.dimension, l = this._state, i = this._velocity, p = l.length - h, c = this.bounds, a = c[0], y = c[1], f = u - o;
                  this._time.push(u);
                  for (var _ = h - 1; _ >= 0; --_)
                    l.push(n(a[_], y[_], l[p] + f * i[p])), i.push(0), p += 1;
                }
              };
            }, { "binary-search-bounds": 31, "cubic-hermite": 62 }], 69: [function(g, k, x) {
              k.exports = function(a) {
                return new t(a || c, null);
              };
              function e(a, y, f, _, b, w) {
                this._color = a, this.key = y, this.value = f, this.left = _, this.right = b, this._count = w;
              }
              function r(a) {
                return new e(a._color, a.key, a.value, a.left, a.right, a._count);
              }
              function n(a, y) {
                return new e(a, y.key, y.value, y.left, y.right, y._count);
              }
              function s(a) {
                a._count = 1 + (a.left ? a.left._count : 0) + (a.right ? a.right._count : 0);
              }
              function t(a, y) {
                this._compare = a, this.root = y;
              }
              var d = t.prototype;
              function u(a, y) {
                var f;
                return y.left && (f = u(a, y.left)) ? f : (f = a(y.key, y.value)) || (y.right ? u(a, y.right) : void 0);
              }
              function o(a, y, f, _) {
                if (y(a, _.key) <= 0) {
                  var b;
                  if (_.left && (b = o(a, y, f, _.left)) || (b = f(_.key, _.value)))
                    return b;
                }
                if (_.right)
                  return o(a, y, f, _.right);
              }
              function h(a, y, f, _, b) {
                var w, T = f(a, b.key), L = f(y, b.key);
                if (T <= 0 && (b.left && (w = h(a, y, f, _, b.left)) || L > 0 && (w = _(b.key, b.value))))
                  return w;
                if (L > 0 && b.right)
                  return h(a, y, f, _, b.right);
              }
              function l(a, y) {
                this.tree = a, this._stack = y;
              }
              Object.defineProperty(d, "keys", { get: function() {
                var a = [];
                return this.forEach(function(y, f) {
                  a.push(y);
                }), a;
              } }), Object.defineProperty(d, "values", { get: function() {
                var a = [];
                return this.forEach(function(y, f) {
                  a.push(f);
                }), a;
              } }), Object.defineProperty(d, "length", { get: function() {
                return this.root ? this.root._count : 0;
              } }), d.insert = function(a, y) {
                for (var f = this._compare, _ = this.root, b = [], w = []; _; ) {
                  var T = f(a, _.key);
                  b.push(_), w.push(T), _ = T <= 0 ? _.left : _.right;
                }
                b.push(new e(0, a, y, null, null, 1));
                for (var L = b.length - 2; L >= 0; --L)
                  _ = b[L], w[L] <= 0 ? b[L] = new e(_._color, _.key, _.value, b[L + 1], _.right, _._count + 1) : b[L] = new e(_._color, _.key, _.value, _.left, b[L + 1], _._count + 1);
                for (L = b.length - 1; L > 1; --L) {
                  var A = b[L - 1];
                  if (_ = b[L], A._color === 1 || _._color === 1)
                    break;
                  var I = b[L - 2];
                  if (I.left === A)
                    if (A.left === _) {
                      if (!(P = I.right) || P._color !== 0) {
                        I._color = 0, I.left = A.right, A._color = 1, A.right = I, b[L - 2] = A, b[L - 1] = _, s(I), s(A), L >= 3 && ((S = b[L - 3]).left === I ? S.left = A : S.right = A);
                        break;
                      }
                      A._color = 1, I.right = n(1, P), I._color = 0, L -= 1;
                    } else {
                      if (!(P = I.right) || P._color !== 0) {
                        A.right = _.left, I._color = 0, I.left = _.right, _._color = 1, _.left = A, _.right = I, b[L - 2] = _, b[L - 1] = A, s(I), s(A), s(_), L >= 3 && ((S = b[L - 3]).left === I ? S.left = _ : S.right = _);
                        break;
                      }
                      A._color = 1, I.right = n(1, P), I._color = 0, L -= 1;
                    }
                  else if (A.right === _) {
                    if (!(P = I.left) || P._color !== 0) {
                      I._color = 0, I.right = A.left, A._color = 1, A.left = I, b[L - 2] = A, b[L - 1] = _, s(I), s(A), L >= 3 && ((S = b[L - 3]).right === I ? S.right = A : S.left = A);
                      break;
                    }
                    A._color = 1, I.left = n(1, P), I._color = 0, L -= 1;
                  } else {
                    var P;
                    if (!(P = I.left) || P._color !== 0) {
                      var S;
                      A.left = _.right, I._color = 0, I.right = _.left, _._color = 1, _.right = A, _.left = I, b[L - 2] = _, b[L - 1] = A, s(I), s(A), s(_), L >= 3 && ((S = b[L - 3]).right === I ? S.right = _ : S.left = _);
                      break;
                    }
                    A._color = 1, I.left = n(1, P), I._color = 0, L -= 1;
                  }
                }
                return b[0]._color = 1, new t(f, b[0]);
              }, d.forEach = function(a, y, f) {
                if (this.root)
                  switch (arguments.length) {
                    case 1:
                      return u(a, this.root);
                    case 2:
                      return o(y, this._compare, a, this.root);
                    case 3:
                      return this._compare(y, f) >= 0 ? void 0 : h(y, f, this._compare, a, this.root);
                  }
              }, Object.defineProperty(d, "begin", { get: function() {
                for (var a = [], y = this.root; y; )
                  a.push(y), y = y.left;
                return new l(this, a);
              } }), Object.defineProperty(d, "end", { get: function() {
                for (var a = [], y = this.root; y; )
                  a.push(y), y = y.right;
                return new l(this, a);
              } }), d.at = function(a) {
                if (a < 0)
                  return new l(this, []);
                for (var y = this.root, f = []; ; ) {
                  if (f.push(y), y.left) {
                    if (a < y.left._count) {
                      y = y.left;
                      continue;
                    }
                    a -= y.left._count;
                  }
                  if (!a)
                    return new l(this, f);
                  if (a -= 1, !y.right || a >= y.right._count)
                    break;
                  y = y.right;
                }
                return new l(this, []);
              }, d.ge = function(a) {
                for (var y = this._compare, f = this.root, _ = [], b = 0; f; ) {
                  var w = y(a, f.key);
                  _.push(f), w <= 0 && (b = _.length), f = w <= 0 ? f.left : f.right;
                }
                return _.length = b, new l(this, _);
              }, d.gt = function(a) {
                for (var y = this._compare, f = this.root, _ = [], b = 0; f; ) {
                  var w = y(a, f.key);
                  _.push(f), w < 0 && (b = _.length), f = w < 0 ? f.left : f.right;
                }
                return _.length = b, new l(this, _);
              }, d.lt = function(a) {
                for (var y = this._compare, f = this.root, _ = [], b = 0; f; ) {
                  var w = y(a, f.key);
                  _.push(f), w > 0 && (b = _.length), f = w <= 0 ? f.left : f.right;
                }
                return _.length = b, new l(this, _);
              }, d.le = function(a) {
                for (var y = this._compare, f = this.root, _ = [], b = 0; f; ) {
                  var w = y(a, f.key);
                  _.push(f), w >= 0 && (b = _.length), f = w < 0 ? f.left : f.right;
                }
                return _.length = b, new l(this, _);
              }, d.find = function(a) {
                for (var y = this._compare, f = this.root, _ = []; f; ) {
                  var b = y(a, f.key);
                  if (_.push(f), b === 0)
                    return new l(this, _);
                  f = b <= 0 ? f.left : f.right;
                }
                return new l(this, []);
              }, d.remove = function(a) {
                var y = this.find(a);
                return y ? y.remove() : this;
              }, d.get = function(a) {
                for (var y = this._compare, f = this.root; f; ) {
                  var _ = y(a, f.key);
                  if (_ === 0)
                    return f.value;
                  f = _ <= 0 ? f.left : f.right;
                }
              };
              var i = l.prototype;
              function p(a, y) {
                a.key = y.key, a.value = y.value, a.left = y.left, a.right = y.right, a._color = y._color, a._count = y._count;
              }
              function c(a, y) {
                return a < y ? -1 : a > y ? 1 : 0;
              }
              Object.defineProperty(i, "valid", { get: function() {
                return this._stack.length > 0;
              } }), Object.defineProperty(i, "node", { get: function() {
                return this._stack.length > 0 ? this._stack[this._stack.length - 1] : null;
              }, enumerable: !0 }), i.clone = function() {
                return new l(this.tree, this._stack.slice());
              }, i.remove = function() {
                var a = this._stack;
                if (a.length === 0)
                  return this.tree;
                var y = new Array(a.length), f = a[a.length - 1];
                y[y.length - 1] = new e(f._color, f.key, f.value, f.left, f.right, f._count);
                for (var _ = a.length - 2; _ >= 0; --_)
                  (f = a[_]).left === a[_ + 1] ? y[_] = new e(f._color, f.key, f.value, y[_ + 1], f.right, f._count) : y[_] = new e(f._color, f.key, f.value, f.left, y[_ + 1], f._count);
                if ((f = y[y.length - 1]).left && f.right) {
                  var b = y.length;
                  for (f = f.left; f.right; )
                    y.push(f), f = f.right;
                  var w = y[b - 1];
                  for (y.push(new e(f._color, w.key, w.value, f.left, f.right, f._count)), y[b - 1].key = f.key, y[b - 1].value = f.value, _ = y.length - 2; _ >= b; --_)
                    f = y[_], y[_] = new e(f._color, f.key, f.value, f.left, y[_ + 1], f._count);
                  y[b - 1].left = y[b];
                }
                if ((f = y[y.length - 1])._color === 0) {
                  var T = y[y.length - 2];
                  for (T.left === f ? T.left = null : T.right === f && (T.right = null), y.pop(), _ = 0; _ < y.length; ++_)
                    y[_]._count--;
                  return new t(this.tree._compare, y[0]);
                }
                if (f.left || f.right) {
                  for (f.left ? p(f, f.left) : f.right && p(f, f.right), f._color = 1, _ = 0; _ < y.length - 1; ++_)
                    y[_]._count--;
                  return new t(this.tree._compare, y[0]);
                }
                if (y.length === 1)
                  return new t(this.tree._compare, null);
                for (_ = 0; _ < y.length; ++_)
                  y[_]._count--;
                var L = y[y.length - 2];
                return function(A) {
                  for (var I, P, S, E, R = A.length - 1; R >= 0; --R) {
                    if (I = A[R], R === 0)
                      return void (I._color = 1);
                    if ((P = A[R - 1]).left === I) {
                      if ((S = P.right).right && S.right._color === 0)
                        return E = (S = P.right = r(S)).right = r(S.right), P.right = S.left, S.left = P, S.right = E, S._color = P._color, I._color = 1, P._color = 1, E._color = 1, s(P), s(S), R > 1 && ((z = A[R - 2]).left === P ? z.left = S : z.right = S), void (A[R - 1] = S);
                      if (S.left && S.left._color === 0)
                        return E = (S = P.right = r(S)).left = r(S.left), P.right = E.left, S.left = E.right, E.left = P, E.right = S, E._color = P._color, P._color = 1, S._color = 1, I._color = 1, s(P), s(S), s(E), R > 1 && ((z = A[R - 2]).left === P ? z.left = E : z.right = E), void (A[R - 1] = E);
                      if (S._color === 1) {
                        if (P._color === 0)
                          return P._color = 1, void (P.right = n(0, S));
                        P.right = n(0, S);
                        continue;
                      }
                      S = r(S), P.right = S.left, S.left = P, S._color = P._color, P._color = 0, s(P), s(S), R > 1 && ((z = A[R - 2]).left === P ? z.left = S : z.right = S), A[R - 1] = S, A[R] = P, R + 1 < A.length ? A[R + 1] = I : A.push(I), R += 2;
                    } else {
                      if ((S = P.left).left && S.left._color === 0)
                        return E = (S = P.left = r(S)).left = r(S.left), P.left = S.right, S.right = P, S.left = E, S._color = P._color, I._color = 1, P._color = 1, E._color = 1, s(P), s(S), R > 1 && ((z = A[R - 2]).right === P ? z.right = S : z.left = S), void (A[R - 1] = S);
                      if (S.right && S.right._color === 0)
                        return E = (S = P.left = r(S)).right = r(S.right), P.left = E.right, S.right = E.left, E.right = P, E.left = S, E._color = P._color, P._color = 1, S._color = 1, I._color = 1, s(P), s(S), s(E), R > 1 && ((z = A[R - 2]).right === P ? z.right = E : z.left = E), void (A[R - 1] = E);
                      if (S._color === 1) {
                        if (P._color === 0)
                          return P._color = 1, void (P.left = n(0, S));
                        P.left = n(0, S);
                        continue;
                      }
                      var z;
                      S = r(S), P.left = S.right, S.right = P, S._color = P._color, P._color = 0, s(P), s(S), R > 1 && ((z = A[R - 2]).right === P ? z.right = S : z.left = S), A[R - 1] = S, A[R] = P, R + 1 < A.length ? A[R + 1] = I : A.push(I), R += 2;
                    }
                  }
                }(y), L.left === f ? L.left = null : L.right = null, new t(this.tree._compare, y[0]);
              }, Object.defineProperty(i, "key", { get: function() {
                if (this._stack.length > 0)
                  return this._stack[this._stack.length - 1].key;
              }, enumerable: !0 }), Object.defineProperty(i, "value", { get: function() {
                if (this._stack.length > 0)
                  return this._stack[this._stack.length - 1].value;
              }, enumerable: !0 }), Object.defineProperty(i, "index", { get: function() {
                var a = 0, y = this._stack;
                if (y.length === 0) {
                  var f = this.tree.root;
                  return f ? f._count : 0;
                }
                y[y.length - 1].left && (a = y[y.length - 1].left._count);
                for (var _ = y.length - 2; _ >= 0; --_)
                  y[_ + 1] === y[_].right && (++a, y[_].left && (a += y[_].left._count));
                return a;
              }, enumerable: !0 }), i.next = function() {
                var a = this._stack;
                if (a.length !== 0) {
                  var y = a[a.length - 1];
                  if (y.right)
                    for (y = y.right; y; )
                      a.push(y), y = y.left;
                  else
                    for (a.pop(); a.length > 0 && a[a.length - 1].right === y; )
                      y = a[a.length - 1], a.pop();
                }
              }, Object.defineProperty(i, "hasNext", { get: function() {
                var a = this._stack;
                if (a.length === 0)
                  return !1;
                if (a[a.length - 1].right)
                  return !0;
                for (var y = a.length - 1; y > 0; --y)
                  if (a[y - 1].left === a[y])
                    return !0;
                return !1;
              } }), i.update = function(a) {
                var y = this._stack;
                if (y.length === 0)
                  throw new Error("Can't update empty node!");
                var f = new Array(y.length), _ = y[y.length - 1];
                f[f.length - 1] = new e(_._color, _.key, a, _.left, _.right, _._count);
                for (var b = y.length - 2; b >= 0; --b)
                  (_ = y[b]).left === y[b + 1] ? f[b] = new e(_._color, _.key, _.value, f[b + 1], _.right, _._count) : f[b] = new e(_._color, _.key, _.value, _.left, f[b + 1], _._count);
                return new t(this.tree._compare, f[0]);
              }, i.prev = function() {
                var a = this._stack;
                if (a.length !== 0) {
                  var y = a[a.length - 1];
                  if (y.left)
                    for (y = y.left; y; )
                      a.push(y), y = y.right;
                  else
                    for (a.pop(); a.length > 0 && a[a.length - 1].left === y; )
                      y = a[a.length - 1], a.pop();
                }
              }, Object.defineProperty(i, "hasPrev", { get: function() {
                var a = this._stack;
                if (a.length === 0)
                  return !1;
                if (a[a.length - 1].left)
                  return !0;
                for (var y = a.length - 1; y > 0; --y)
                  if (a[y - 1].right === a[y])
                    return !0;
                return !1;
              } });
            }, {}], 70: [function(g, k, x) {
              k.exports = function(b, w) {
                var T = new o(b);
                return T.update(w), T;
              };
              var e = g("./lib/text.js"), r = g("./lib/lines.js"), n = g("./lib/background.js"), s = g("./lib/cube.js"), t = g("./lib/ticks.js"), d = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
              function u(b, w) {
                return b[0] = w[0], b[1] = w[1], b[2] = w[2], b;
              }
              function o(b) {
                this.gl = b, this.pixelRatio = 1, this.bounds = [[-10, -10, -10], [10, 10, 10]], this.ticks = [[], [], []], this.autoTicks = !0, this.tickSpacing = [1, 1, 1], this.tickEnable = [!0, !0, !0], this.tickFont = ["sans-serif", "sans-serif", "sans-serif"], this.tickSize = [12, 12, 12], this.tickAngle = [0, 0, 0], this.tickAlign = ["auto", "auto", "auto"], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickPad = [10, 10, 10], this.lastCubeProps = { cubeEdges: [0, 0, 0], axis: [0, 0, 0] }, this.labels = ["x", "y", "z"], this.labelEnable = [!0, !0, !0], this.labelFont = "sans-serif", this.labelSize = [20, 20, 20], this.labelAngle = [0, 0, 0], this.labelAlign = ["auto", "auto", "auto"], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labelPad = [10, 10, 10], this.lineEnable = [!0, !0, !0], this.lineMirror = [!1, !1, !1], this.lineWidth = [1, 1, 1], this.lineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.lineTickEnable = [!0, !0, !0], this.lineTickMirror = [!1, !1, !1], this.lineTickLength = [0, 0, 0], this.lineTickWidth = [1, 1, 1], this.lineTickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.gridEnable = [!0, !0, !0], this.gridWidth = [1, 1, 1], this.gridColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroEnable = [!0, !0, !0], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroLineWidth = [2, 2, 2], this.backgroundEnable = [!1, !1, !1], this.backgroundColor = [[0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5]], this._firstInit = !0, this._text = null, this._lines = null, this._background = n(b);
              }
              var h = o.prototype;
              function l() {
                this.primalOffset = [0, 0, 0], this.primalMinor = [0, 0, 0], this.mirrorOffset = [0, 0, 0], this.mirrorMinor = [0, 0, 0];
              }
              h.update = function(b) {
                function w(Y, J, W) {
                  if (W in b) {
                    var Z, re = b[W], V = this[W];
                    (Y ? Array.isArray(re) && Array.isArray(re[0]) : Array.isArray(re)) ? this[W] = Z = [J(re[0]), J(re[1]), J(re[2])] : this[W] = Z = [J(re), J(re), J(re)];
                    for (var B = 0; B < 3; ++B)
                      if (Z[B] !== V[B])
                        return !0;
                  }
                  return !1;
                }
                b = b || {};
                var T, L = w.bind(this, !1, Number), A = w.bind(this, !1, Boolean), I = w.bind(this, !1, String), P = w.bind(this, !0, function(Y) {
                  if (Array.isArray(Y)) {
                    if (Y.length === 3)
                      return [+Y[0], +Y[1], +Y[2], 1];
                    if (Y.length === 4)
                      return [+Y[0], +Y[1], +Y[2], +Y[3]];
                  }
                  return [0, 0, 0, 1];
                }), S = !1, E = !1;
                if ("bounds" in b)
                  for (var R = b.bounds, z = 0; z < 2; ++z)
                    for (var j = 0; j < 3; ++j)
                      R[z][j] !== this.bounds[z][j] && (E = !0), this.bounds[z][j] = R[z][j];
                if ("ticks" in b)
                  for (T = b.ticks, S = !0, this.autoTicks = !1, z = 0; z < 3; ++z)
                    this.tickSpacing[z] = 0;
                else
                  L("tickSpacing") && (this.autoTicks = !0, E = !0);
                if (this._firstInit && ("ticks" in b || "tickSpacing" in b || (this.autoTicks = !0), E = !0, S = !0, this._firstInit = !1), E && this.autoTicks && (T = t.create(this.bounds, this.tickSpacing), S = !0), S) {
                  for (z = 0; z < 3; ++z)
                    T[z].sort(function(Y, J) {
                      return Y.x - J.x;
                    });
                  t.equal(T, this.ticks) ? S = !1 : this.ticks = T;
                }
                A("tickEnable"), I("tickFont") && (S = !0), L("tickSize"), L("tickAngle"), L("tickPad"), P("tickColor");
                var H = I("labels");
                I("labelFont") && (H = !0), A("labelEnable"), L("labelSize"), L("labelPad"), P("labelColor"), A("lineEnable"), A("lineMirror"), L("lineWidth"), P("lineColor"), A("lineTickEnable"), A("lineTickMirror"), L("lineTickLength"), L("lineTickWidth"), P("lineTickColor"), A("gridEnable"), L("gridWidth"), P("gridColor"), A("zeroEnable"), P("zeroLineColor"), L("zeroLineWidth"), A("backgroundEnable"), P("backgroundColor"), this._text ? this._text && (H || S) && this._text.update(this.bounds, this.labels, this.labelFont, this.ticks, this.tickFont) : this._text = e(this.gl, this.bounds, this.labels, this.labelFont, this.ticks, this.tickFont), this._lines && S && (this._lines.dispose(), this._lines = null), this._lines || (this._lines = r(this.gl, this.bounds, this.ticks));
              };
              var i = [new l(), new l(), new l()];
              function p(b, w, T, L, A) {
                for (var I = b.primalOffset, P = b.primalMinor, S = b.mirrorOffset, E = b.mirrorMinor, R = L[w], z = 0; z < 3; ++z)
                  if (w !== z) {
                    var j = I, H = S, Y = P, J = E;
                    R & 1 << z && (j = S, H = I, Y = E, J = P), j[z] = T[0][z], H[z] = T[1][z], A[z] > 0 ? (Y[z] = -1, J[z] = 0) : (Y[z] = 0, J[z] = 1);
                  }
              }
              var c = [0, 0, 0], a = { model: d, view: d, projection: d, _ortho: !1 };
              h.isOpaque = function() {
                return !0;
              }, h.isTransparent = function() {
                return !1;
              }, h.drawTransparent = function(b) {
              };
              var y = [0, 0, 0], f = [0, 0, 0], _ = [0, 0, 0];
              h.draw = function(b) {
                b = b || a;
                for (var w = this.gl, T = b.model || d, L = b.view || d, A = b.projection || d, I = this.bounds, P = b._ortho || !1, S = s(T, L, A, I, P), E = S.cubeEdges, R = S.axis, z = L[12], j = L[13], H = L[14], Y = L[15], J = (P ? 2 : 1) * this.pixelRatio * (A[3] * z + A[7] * j + A[11] * H + A[15] * Y) / w.drawingBufferHeight, W = 0; W < 3; ++W)
                  this.lastCubeProps.cubeEdges[W] = E[W], this.lastCubeProps.axis[W] = R[W];
                var Z = i;
                for (W = 0; W < 3; ++W)
                  p(i[W], W, this.bounds, E, R);
                w = this.gl;
                var re, V = c;
                for (W = 0; W < 3; ++W)
                  this.backgroundEnable[W] ? V[W] = R[W] : V[W] = 0;
                for (this._background.draw(T, L, A, I, V, this.backgroundColor), this._lines.bind(T, L, A, this), W = 0; W < 3; ++W) {
                  var B = [0, 0, 0];
                  R[W] > 0 ? B[W] = I[1][W] : B[W] = I[0][W];
                  for (var U = 0; U < 2; ++U) {
                    var ee = (W + 1 + U) % 3, N = (W + 1 + (1 ^ U)) % 3;
                    this.gridEnable[ee] && this._lines.drawGrid(ee, N, this.bounds, B, this.gridColor[ee], this.gridWidth[ee] * this.pixelRatio);
                  }
                  for (U = 0; U < 2; ++U)
                    ee = (W + 1 + U) % 3, N = (W + 1 + (1 ^ U)) % 3, this.zeroEnable[N] && Math.min(I[0][N], I[1][N]) <= 0 && Math.max(I[0][N], I[1][N]) >= 0 && this._lines.drawZero(ee, N, this.bounds, B, this.zeroLineColor[N], this.zeroLineWidth[N] * this.pixelRatio);
                }
                for (W = 0; W < 3; ++W) {
                  this.lineEnable[W] && this._lines.drawAxisLine(W, this.bounds, Z[W].primalOffset, this.lineColor[W], this.lineWidth[W] * this.pixelRatio), this.lineMirror[W] && this._lines.drawAxisLine(W, this.bounds, Z[W].mirrorOffset, this.lineColor[W], this.lineWidth[W] * this.pixelRatio);
                  var K = u(y, Z[W].primalMinor), X = u(f, Z[W].mirrorMinor), te = this.lineTickLength;
                  for (U = 0; U < 3; ++U) {
                    var ie = J / T[5 * U];
                    K[U] *= te[U] * ie, X[U] *= te[U] * ie;
                  }
                  this.lineTickEnable[W] && this._lines.drawAxisTicks(W, Z[W].primalOffset, K, this.lineTickColor[W], this.lineTickWidth[W] * this.pixelRatio), this.lineTickMirror[W] && this._lines.drawAxisTicks(W, Z[W].mirrorOffset, X, this.lineTickColor[W], this.lineTickWidth[W] * this.pixelRatio);
                }
                this._lines.unbind(), this._text.bind(T, L, A, this.pixelRatio);
                var le, oe;
                function ve(we) {
                  (oe = [0, 0, 0])[we] = 1;
                }
                function ue(we, se, de) {
                  var Te = (we + 1) % 3, Ee = (we + 2) % 3, Me = se[Te], ze = se[Ee], Ie = de[Te], Oe = de[Ee];
                  Me > 0 && Oe > 0 || Me > 0 && Oe < 0 || Me < 0 && Oe > 0 || Me < 0 && Oe < 0 ? ve(Te) : (ze > 0 && Ie > 0 || ze > 0 && Ie < 0 || ze < 0 && Ie > 0 || ze < 0 && Ie < 0) && ve(Ee);
                }
                for (W = 0; W < 3; ++W) {
                  var ye = Z[W].primalMinor, Ae = Z[W].mirrorMinor, pe = u(_, Z[W].primalOffset);
                  for (U = 0; U < 3; ++U)
                    this.lineTickEnable[W] && (pe[U] += J * ye[U] * Math.max(this.lineTickLength[U], 0) / T[5 * U]);
                  var ge = [0, 0, 0];
                  if (ge[W] = 1, this.tickEnable[W]) {
                    for (this.tickAngle[W] === -3600 ? (this.tickAngle[W] = 0, this.tickAlign[W] = "auto") : this.tickAlign[W] = -1, le = 1, (re = [this.tickAlign[W], 0.5, le])[0] === "auto" ? re[0] = 0 : re[0] = parseInt("" + re[0]), oe = [0, 0, 0], ue(W, ye, Ae), U = 0; U < 3; ++U)
                      pe[U] += J * ye[U] * this.tickPad[U] / T[5 * U];
                    this._text.drawTicks(W, this.tickSize[W], this.tickAngle[W], pe, this.tickColor[W], ge, oe, re);
                  }
                  if (this.labelEnable[W]) {
                    for (le = 0, oe = [0, 0, 0], this.labels[W].length > 4 && (ve(W), le = 1), (re = [this.labelAlign[W], 0.5, le])[0] === "auto" ? re[0] = 0 : re[0] = parseInt("" + re[0]), U = 0; U < 3; ++U)
                      pe[U] += J * ye[U] * this.labelPad[U] / T[5 * U];
                    pe[W] += 0.5 * (I[0][W] + I[1][W]), this._text.drawLabel(W, this.labelSize[W], this.labelAngle[W], pe, this.labelColor[W], [0, 0, 0], oe, re);
                  }
                }
                this._text.unbind();
              }, h.dispose = function() {
                this._text.dispose(), this._lines.dispose(), this._background.dispose(), this._lines = null, this._text = null, this._background = null, this.gl = null;
              };
            }, { "./lib/background.js": 71, "./lib/cube.js": 72, "./lib/lines.js": 73, "./lib/text.js": 75, "./lib/ticks.js": 76 }], 71: [function(g, k, x) {
              k.exports = function(d) {
                for (var u = [], o = [], h = 0, l = 0; l < 3; ++l)
                  for (var i = (l + 1) % 3, p = (l + 2) % 3, c = [0, 0, 0], a = [0, 0, 0], y = -1; y <= 1; y += 2) {
                    o.push(h, h + 2, h + 1, h + 1, h + 2, h + 3), c[l] = y, a[l] = y;
                    for (var f = -1; f <= 1; f += 2) {
                      c[i] = f;
                      for (var _ = -1; _ <= 1; _ += 2)
                        c[p] = _, u.push(c[0], c[1], c[2], a[0], a[1], a[2]), h += 1;
                    }
                    var b = i;
                    i = p, p = b;
                  }
                var w = e(d, new Float32Array(u)), T = e(d, new Uint16Array(o), d.ELEMENT_ARRAY_BUFFER), L = r(d, [{ buffer: w, type: d.FLOAT, size: 3, offset: 0, stride: 24 }, { buffer: w, type: d.FLOAT, size: 3, offset: 12, stride: 24 }], T), A = n(d);
                return A.attributes.position.location = 0, A.attributes.normal.location = 1, new s(d, w, L, A);
              };
              var e = g("gl-buffer"), r = g("gl-vao"), n = g("./shaders").bg;
              function s(d, u, o, h) {
                this.gl = d, this.buffer = u, this.vao = o, this.shader = h;
              }
              var t = s.prototype;
              t.draw = function(d, u, o, h, l, i) {
                for (var p = !1, c = 0; c < 3; ++c)
                  p = p || l[c];
                if (p) {
                  var a = this.gl;
                  a.enable(a.POLYGON_OFFSET_FILL), a.polygonOffset(1, 2), this.shader.bind(), this.shader.uniforms = { model: d, view: u, projection: o, bounds: h, enable: l, colors: i }, this.vao.bind(), this.vao.draw(this.gl.TRIANGLES, 36), this.vao.unbind(), a.disable(a.POLYGON_OFFSET_FILL);
                }
              }, t.dispose = function() {
                this.vao.dispose(), this.buffer.dispose(), this.shader.dispose();
              };
            }, { "./shaders": 74, "gl-buffer": 78, "gl-vao": 150 }], 72: [function(g, k, x) {
              k.exports = function(f, _, b, w, T) {
                r(t, _, f), r(t, b, t);
                for (var L = 0, A = 0; A < 2; ++A) {
                  o[2] = w[A][2];
                  for (var I = 0; I < 2; ++I) {
                    o[1] = w[I][1];
                    for (var P = 0; P < 2; ++P)
                      o[0] = w[P][0], l(d[L], o, t), L += 1;
                  }
                }
                var S = -1;
                for (A = 0; A < 8; ++A) {
                  for (var E = d[A][3], R = 0; R < 3; ++R)
                    u[A][R] = d[A][R] / E;
                  T && (u[A][2] *= -1), E < 0 && (S < 0 || u[A][2] < u[S][2]) && (S = A);
                }
                if (S < 0) {
                  S = 0;
                  for (var z = 0; z < 3; ++z) {
                    for (var j = (z + 2) % 3, H = (z + 1) % 3, Y = -1, J = -1, W = 0; W < 2; ++W) {
                      var Z = (V = W << z) + (W << j) + (1 - W << H), re = V + (1 - W << j) + (W << H);
                      s(u[V], u[Z], u[re], h) < 0 || (W ? Y = 1 : J = 1);
                    }
                    if (Y < 0 || J < 0)
                      J > Y && (S |= 1 << z);
                    else {
                      for (W = 0; W < 2; ++W) {
                        Z = (V = W << z) + (W << j) + (1 - W << H), re = V + (1 - W << j) + (W << H);
                        var V, B = p([d[V], d[Z], d[re], d[V + (1 << j) + (1 << H)]]);
                        W ? Y = B : J = B;
                      }
                      J > Y && (S |= 1 << z);
                    }
                  }
                }
                var U = 7 ^ S, ee = -1;
                for (A = 0; A < 8; ++A)
                  A !== S && A !== U && (ee < 0 || u[ee][1] > u[A][1]) && (ee = A);
                var N = -1;
                for (A = 0; A < 3; ++A)
                  (X = ee ^ 1 << A) !== S && X !== U && (N < 0 && (N = X), (H = u[X])[0] < u[N][0] && (N = X));
                var K = -1;
                for (A = 0; A < 3; ++A) {
                  var X;
                  (X = ee ^ 1 << A) !== S && X !== U && X !== N && (K < 0 && (K = X), (H = u[X])[0] > u[K][0] && (K = X));
                }
                var te = c;
                te[0] = te[1] = te[2] = 0, te[e.log2(N ^ ee)] = ee & N, te[e.log2(ee ^ K)] = ee & K;
                var ie = 7 ^ K;
                ie === S || ie === U ? (ie = 7 ^ N, te[e.log2(K ^ ie)] = ie & K) : te[e.log2(N ^ ie)] = ie & N;
                var le = a, oe = S;
                for (z = 0; z < 3; ++z)
                  le[z] = oe & 1 << z ? -1 : 1;
                return y;
              };
              var e = g("bit-twiddle"), r = g("gl-mat4/multiply"), n = g("split-polygon"), s = g("robust-orientation"), t = new Array(16), d = new Array(8), u = new Array(8), o = new Array(3), h = [0, 0, 0];
              function l(f, _, b) {
                for (var w = 0; w < 4; ++w) {
                  f[w] = b[12 + w];
                  for (var T = 0; T < 3; ++T)
                    f[w] += _[T] * b[4 * T + w];
                }
              }
              (function() {
                for (var f = 0; f < 8; ++f)
                  d[f] = [1, 1, 1, 1], u[f] = [1, 1, 1];
              })();
              var i = [[0, 0, 1, 0, 0], [0, 0, -1, 1, 0], [0, -1, 0, 1, 0], [0, 1, 0, 1, 0], [-1, 0, 0, 1, 0], [1, 0, 0, 1, 0]];
              function p(f) {
                for (var _ = 0; _ < i.length; ++_)
                  if ((f = n.positive(f, i[_])).length < 3)
                    return 0;
                var b = f[0], w = b[0] / b[3], T = b[1] / b[3], L = 0;
                for (_ = 1; _ + 1 < f.length; ++_) {
                  var A = f[_], I = f[_ + 1], P = A[0] / A[3] - w, S = A[1] / A[3] - T, E = I[0] / I[3] - w, R = I[1] / I[3] - T;
                  L += Math.abs(P * R - S * E);
                }
                return L;
              }
              var c = [1, 1, 1], a = [0, 0, 0], y = { cubeEdges: c, axis: a };
            }, { "bit-twiddle": 32, "gl-mat4/multiply": 100, "robust-orientation": 284, "split-polygon": 300 }], 73: [function(g, k, x) {
              k.exports = function(c, a, y) {
                var f = [], _ = [0, 0, 0], b = [0, 0, 0], w = [0, 0, 0], T = [0, 0, 0];
                f.push(0, 0, 1, 0, 1, 1, 0, 0, -1, 0, 0, -1, 0, 1, 1, 0, 1, -1);
                for (var L = 0; L < 3; ++L) {
                  for (var A = f.length / 3 | 0, I = 0; I < y[L].length; ++I) {
                    var P = +y[L][I].x;
                    f.push(P, 0, 1, P, 1, 1, P, 0, -1, P, 0, -1, P, 1, 1, P, 1, -1);
                  }
                  var S = f.length / 3 | 0;
                  _[L] = A, b[L] = S - A, A = f.length / 3 | 0;
                  for (var E = 0; E < y[L].length; ++E)
                    P = +y[L][E].x, f.push(P, 0, 1, P, 1, 1, P, 0, -1, P, 0, -1, P, 1, 1, P, 1, -1);
                  S = f.length / 3 | 0, w[L] = A, T[L] = S - A;
                }
                var R = e(c, new Float32Array(f)), z = r(c, [{ buffer: R, type: c.FLOAT, size: 3, stride: 0, offset: 0 }]), j = n(c);
                return j.attributes.position.location = 0, new i(c, R, z, j, b, _, T, w);
              };
              var e = g("gl-buffer"), r = g("gl-vao"), n = g("./shaders").line, s = [0, 0, 0], t = [0, 0, 0], d = [0, 0, 0], u = [0, 0, 0], o = [1, 1];
              function h(c) {
                return c[0] = c[1] = c[2] = 0, c;
              }
              function l(c, a) {
                return c[0] = a[0], c[1] = a[1], c[2] = a[2], c;
              }
              function i(c, a, y, f, _, b, w, T) {
                this.gl = c, this.vertBuffer = a, this.vao = y, this.shader = f, this.tickCount = _, this.tickOffset = b, this.gridCount = w, this.gridOffset = T;
              }
              var p = i.prototype;
              p.bind = function(c, a, y) {
                this.shader.bind(), this.shader.uniforms.model = c, this.shader.uniforms.view = a, this.shader.uniforms.projection = y, o[0] = this.gl.drawingBufferWidth, o[1] = this.gl.drawingBufferHeight, this.shader.uniforms.screenShape = o, this.vao.bind();
              }, p.unbind = function() {
                this.vao.unbind();
              }, p.drawAxisLine = function(c, a, y, f, _) {
                var b = h(t);
                this.shader.uniforms.majorAxis = t, b[c] = a[1][c] - a[0][c], this.shader.uniforms.minorAxis = b;
                var w, T = l(u, y);
                T[c] += a[0][c], this.shader.uniforms.offset = T, this.shader.uniforms.lineWidth = _, this.shader.uniforms.color = f, (w = h(d))[(c + 2) % 3] = 1, this.shader.uniforms.screenAxis = w, this.vao.draw(this.gl.TRIANGLES, 6), (w = h(d))[(c + 1) % 3] = 1, this.shader.uniforms.screenAxis = w, this.vao.draw(this.gl.TRIANGLES, 6);
              }, p.drawAxisTicks = function(c, a, y, f, _) {
                if (this.tickCount[c]) {
                  var b = h(s);
                  b[c] = 1, this.shader.uniforms.majorAxis = b, this.shader.uniforms.offset = a, this.shader.uniforms.minorAxis = y, this.shader.uniforms.color = f, this.shader.uniforms.lineWidth = _;
                  var w = h(d);
                  w[c] = 1, this.shader.uniforms.screenAxis = w, this.vao.draw(this.gl.TRIANGLES, this.tickCount[c], this.tickOffset[c]);
                }
              }, p.drawGrid = function(c, a, y, f, _, b) {
                if (this.gridCount[c]) {
                  var w = h(t);
                  w[a] = y[1][a] - y[0][a], this.shader.uniforms.minorAxis = w;
                  var T = l(u, f);
                  T[a] += y[0][a], this.shader.uniforms.offset = T;
                  var L = h(s);
                  L[c] = 1, this.shader.uniforms.majorAxis = L;
                  var A = h(d);
                  A[c] = 1, this.shader.uniforms.screenAxis = A, this.shader.uniforms.lineWidth = b, this.shader.uniforms.color = _, this.vao.draw(this.gl.TRIANGLES, this.gridCount[c], this.gridOffset[c]);
                }
              }, p.drawZero = function(c, a, y, f, _, b) {
                var w = h(t);
                this.shader.uniforms.majorAxis = w, w[c] = y[1][c] - y[0][c], this.shader.uniforms.minorAxis = w;
                var T = l(u, f);
                T[c] += y[0][c], this.shader.uniforms.offset = T;
                var L = h(d);
                L[a] = 1, this.shader.uniforms.screenAxis = L, this.shader.uniforms.lineWidth = b, this.shader.uniforms.color = _, this.vao.draw(this.gl.TRIANGLES, 6);
              }, p.dispose = function() {
                this.vao.dispose(), this.vertBuffer.dispose(), this.shader.dispose();
              };
            }, { "./shaders": 74, "gl-buffer": 78, "gl-vao": 150 }], 74: [function(g, k, x) {
              var e = g("glslify"), r = g("gl-shader"), n = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;

vec3 project(vec3 p) {
  vec4 pp = projection * view * model * vec4(p, 1.0);
  return pp.xyz / max(pp.w, 0.0001);
}

void main() {
  vec3 major = position.x * majorAxis;
  vec3 minor = position.y * minorAxis;

  vec3 vPosition = major + minor + offset;
  vec3 pPosition = project(vPosition);
  vec3 offset = project(vPosition + screenAxis * position.z);

  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;

  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]), s = e([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);
              x.line = function(h) {
                return r(h, n, s, null, [{ name: "position", type: "vec3" }]);
              };
              var t = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;

vec3 project(vec3 p) {
  vec4 pp = projection * view * model * vec4(p, 1.0);
  return pp.xyz / max(pp.w, 0.0001);
}

float computeViewAngle(vec3 a, vec3 b) {
  vec3 A = project(a);
  vec3 B = project(b);

  return atan(
    (B.y - A.y) * resolution.y,
    (B.x - A.x) * resolution.x
  );
}

const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;

int option = int(floor(alignOpt.x + 0.001));
float hv_ratio =       alignOpt.y;
bool enableAlign =    (alignOpt.z != 0.0);

float mod_angle(float a) {
  return mod(a, PI);
}

float positive_angle(float a) {
  return mod_angle((a < 0.0) ?
    a + TWO_PI :
    a
  );
}

float look_upwards(float a) {
  float b = positive_angle(a);
  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?
    b - PI :
    b;
}

float look_horizontal_or_vertical(float a, float ratio) {
  // ratio controls the ratio between being horizontal to (vertical + horizontal)
  // if ratio is set to 0.5 then it is 50%, 50%.
  // when using a higher ratio e.g. 0.75 the result would
  // likely be more horizontal than vertical.

  float b = positive_angle(a);

  return
    (b < (      ratio) * HALF_PI) ? 0.0 :
    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :
    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :
    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :
                                    0.0;
}

float roundTo(float a, float b) {
  return float(b * floor((a + 0.5 * b) / b));
}

float look_round_n_directions(float a, int n) {
  float b = positive_angle(a);
  float div = TWO_PI / float(n);
  float c = roundTo(b, div);
  return look_upwards(c);
}

float applyAlignOption(float rawAngle, float delta) {
  return
    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions
    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical
    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis
    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards
    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal
                    rawAngle;                // otherwise return back raw input angle
}

bool isAxisTitle = (axis.x == 0.0) &&
                   (axis.y == 0.0) &&
                   (axis.z == 0.0);

void main() {
  //Compute world offset
  float axisDistance = position.z;
  vec3 dataPosition = axisDistance * axis + offset;

  float beta = angle; // i.e. user defined attributes for each tick

  float axisAngle;
  float clipAngle;
  float flip;

  if (enableAlign) {
    axisAngle = (isAxisTitle) ? HALF_PI :
                      computeViewAngle(dataPosition, dataPosition + axis);
    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);

    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;
    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;

    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),
                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;

    beta += applyAlignOption(clipAngle, flip * PI);
  }

  //Compute plane offset
  vec2 planeCoord = position.xy * pixelScale;

  mat2 planeXform = scale * mat2(
     cos(beta), sin(beta),
    -sin(beta), cos(beta)
  );

  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;

  //Compute clip position
  vec3 clipPosition = project(dataPosition);

  //Apply text offset in clip coordinates
  clipPosition += vec3(viewOffset, 0.0);

  //Done
  gl_Position = vec4(clipPosition, 1.0);
}`]), d = e([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);
              x.text = function(h) {
                return r(h, t, d, null, [{ name: "position", type: "vec3" }]);
              };
              var u = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec3 normal;

uniform mat4 model, view, projection;
uniform vec3 enable;
uniform vec3 bounds[2];

varying vec3 colorChannel;

void main() {

  vec3 signAxis = sign(bounds[1] - bounds[0]);

  vec3 realNormal = signAxis * normal;

  if(dot(realNormal, enable) > 0.0) {
    vec3 minRange = min(bounds[0], bounds[1]);
    vec3 maxRange = max(bounds[0], bounds[1]);
    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));
    gl_Position = projection * view * model * vec4(nPosition, 1.0);
  } else {
    gl_Position = vec4(0,0,0,0);
  }

  colorChannel = abs(realNormal);
}`]), o = e([`precision highp float;
#define GLSLIFY 1

uniform vec4 colors[3];

varying vec3 colorChannel;

void main() {
  gl_FragColor = colorChannel.x * colors[0] +
                 colorChannel.y * colors[1] +
                 colorChannel.z * colors[2];
}`]);
              x.bg = function(h) {
                return r(h, u, o, null, [{ name: "position", type: "vec3" }, { name: "normal", type: "vec3" }]);
              };
            }, { "gl-shader": 132, glslify: 231 }], 75: [function(g, k, x) {
              (function(e) {
                (function() {
                  k.exports = function(i, p, c, a, y, f) {
                    var _ = r(i), b = n(i, [{ buffer: _, size: 3 }]), w = t(i);
                    w.attributes.position.location = 0;
                    var T = new o(i, w, _, b);
                    return T.update(p, c, a, y, f), T;
                  };
                  var r = g("gl-buffer"), n = g("gl-vao"), s = g("vectorize-text"), t = g("./shaders").text, d = window || e.global || {}, u = d.__TEXT_CACHE || {};
                  d.__TEXT_CACHE = {};
                  function o(i, p, c, a) {
                    this.gl = i, this.shader = p, this.buffer = c, this.vao = a, this.tickOffset = this.tickCount = this.labelOffset = this.labelCount = null;
                  }
                  var h = o.prototype, l = [0, 0];
                  h.bind = function(i, p, c, a) {
                    this.vao.bind(), this.shader.bind();
                    var y = this.shader.uniforms;
                    y.model = i, y.view = p, y.projection = c, y.pixelScale = a, l[0] = this.gl.drawingBufferWidth, l[1] = this.gl.drawingBufferHeight, this.shader.uniforms.resolution = l;
                  }, h.unbind = function() {
                    this.vao.unbind();
                  }, h.update = function(i, p, c, a, y) {
                    var f = [];
                    function _(S, E, R, z, j, H) {
                      var Y = u[R];
                      Y || (Y = u[R] = {});
                      var J = Y[E];
                      J || (J = Y[E] = function(K, X) {
                        try {
                          return s(K, X);
                        } catch (te) {
                          return console.warn('error vectorizing text:"' + K + '" error:', te), { cells: [], positions: [] };
                        }
                      }(E, { triangles: !0, font: R, textAlign: "center", textBaseline: "middle", lineSpacing: j, styletags: H }));
                      for (var W = (z || 12) / 12, Z = J.positions, re = J.cells, V = 0, B = re.length; V < B; ++V)
                        for (var U = re[V], ee = 2; ee >= 0; --ee) {
                          var N = Z[U[ee]];
                          f.push(W * N[0], -W * N[1], S);
                        }
                    }
                    for (var b = [0, 0, 0], w = [0, 0, 0], T = [0, 0, 0], L = [0, 0, 0], A = { breaklines: !0, bolds: !0, italics: !0, subscripts: !0, superscripts: !0 }, I = 0; I < 3; ++I) {
                      T[I] = f.length / 3 | 0, _(0.5 * (i[0][I] + i[1][I]), p[I], c[I], 12, 1.25, A), L[I] = (f.length / 3 | 0) - T[I], b[I] = f.length / 3 | 0;
                      for (var P = 0; P < a[I].length; ++P)
                        a[I][P].text && _(a[I][P].x, a[I][P].text, a[I][P].font || y, a[I][P].fontSize || 12, 1.25, A);
                      w[I] = (f.length / 3 | 0) - b[I];
                    }
                    this.buffer.update(f), this.tickOffset = b, this.tickCount = w, this.labelOffset = T, this.labelCount = L;
                  }, h.drawTicks = function(i, p, c, a, y, f, _, b) {
                    this.tickCount[i] && (this.shader.uniforms.axis = f, this.shader.uniforms.color = y, this.shader.uniforms.angle = c, this.shader.uniforms.scale = p, this.shader.uniforms.offset = a, this.shader.uniforms.alignDir = _, this.shader.uniforms.alignOpt = b, this.vao.draw(this.gl.TRIANGLES, this.tickCount[i], this.tickOffset[i]));
                  }, h.drawLabel = function(i, p, c, a, y, f, _, b) {
                    this.labelCount[i] && (this.shader.uniforms.axis = f, this.shader.uniforms.color = y, this.shader.uniforms.angle = c, this.shader.uniforms.scale = p, this.shader.uniforms.offset = a, this.shader.uniforms.alignDir = _, this.shader.uniforms.alignOpt = b, this.vao.draw(this.gl.TRIANGLES, this.labelCount[i], this.labelOffset[i]));
                  }, h.dispose = function() {
                    this.shader.dispose(), this.vao.dispose(), this.buffer.dispose();
                  };
                }).call(this);
              }).call(this, g("_process"));
            }, { "./shaders": 74, _process: 5, "gl-buffer": 78, "gl-vao": 150, "vectorize-text": 311 }], 76: [function(g, k, x) {
              function e(r, n) {
                var s = r + "", t = s.indexOf("."), d = 0;
                t >= 0 && (d = s.length - t - 1);
                var u = Math.pow(10, d), o = Math.round(r * n * u), h = o + "";
                if (h.indexOf("e") >= 0)
                  return h;
                var l = o / u, i = o % u;
                o < 0 ? (l = 0 | -Math.ceil(l), i = 0 | -i) : (l = 0 | Math.floor(l), i |= 0);
                var p = "" + l;
                if (o < 0 && (p = "-" + p), d) {
                  for (var c = "" + i; c.length < d; )
                    c = "0" + c;
                  return p + "." + c;
                }
                return p;
              }
              x.create = function(r, n) {
                for (var s = [], t = 0; t < 3; ++t) {
                  for (var d = [], u = (r[0][t], r[1][t], 0); u * n[t] <= r[1][t]; ++u)
                    d.push({ x: u * n[t], text: e(n[t], u) });
                  for (u = -1; u * n[t] >= r[0][t]; --u)
                    d.push({ x: u * n[t], text: e(n[t], u) });
                  s.push(d);
                }
                return s;
              }, x.equal = function(r, n) {
                for (var s = 0; s < 3; ++s) {
                  if (r[s].length !== n[s].length)
                    return !1;
                  for (var t = 0; t < r[s].length; ++t) {
                    var d = r[s][t], u = n[s][t];
                    if (d.x !== u.x || d.text !== u.text || d.font !== u.font || d.fontColor !== u.fontColor || d.fontSize !== u.fontSize || d.dx !== u.dx || d.dy !== u.dy)
                      return !1;
                  }
                }
                return !0;
              };
            }, {}], 77: [function(g, k, x) {
              k.exports = function(y, f, _, b, w) {
                var T = f.model || u, L = f.view || u, A = f.projection || u, I = f._ortho || !1, P = y.bounds, S = (w = w || n(T, L, A, P, I)).axis;
                s(o, L, T), s(o, A, o);
                for (var E = c, R = 0; R < 3; ++R)
                  E[R].lo = 1 / 0, E[R].hi = -1 / 0, E[R].pixelsPerDataUnit = 1 / 0;
                var z = e(t(o, o));
                t(o, o);
                for (var j = 0; j < 3; ++j) {
                  var H = (j + 1) % 3, Y = (j + 2) % 3, J = a;
                  e:
                    for (R = 0; R < 2; ++R) {
                      var W = [];
                      if (S[j] < 0 != !!R) {
                        J[j] = P[R][j];
                        for (var Z = 0; Z < 2; ++Z) {
                          J[H] = P[Z ^ R][H];
                          for (var re = 0; re < 2; ++re)
                            J[Y] = P[re ^ Z ^ R][Y], W.push(J.slice());
                        }
                        var V = I ? 5 : 4;
                        for (Z = V; Z === V; ++Z) {
                          if (W.length === 0)
                            continue e;
                          W = r.positive(W, z[Z]);
                        }
                        for (Z = 0; Z < W.length; ++Z) {
                          Y = W[Z];
                          var B = p(a, o, Y, _, b);
                          for (re = 0; re < 3; ++re)
                            E[re].lo = Math.min(E[re].lo, Y[re]), E[re].hi = Math.max(E[re].hi, Y[re]), re !== j && (E[re].pixelsPerDataUnit = Math.min(E[re].pixelsPerDataUnit, Math.abs(B[re])));
                        }
                      }
                    }
                }
                return E;
              };
              var e = g("extract-frustum-planes"), r = g("split-polygon"), n = g("./lib/cube.js"), s = g("gl-mat4/multiply"), t = g("gl-mat4/transpose"), d = g("gl-vec4/transformMat4"), u = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), o = new Float32Array(16);
              function h(y, f, _) {
                this.lo = y, this.hi = f, this.pixelsPerDataUnit = _;
              }
              var l = [0, 0, 0, 1], i = [0, 0, 0, 1];
              function p(y, f, _, b, w) {
                for (var T = 0; T < 3; ++T) {
                  for (var L = l, A = i, I = 0; I < 3; ++I)
                    A[I] = L[I] = _[I];
                  A[3] = L[3] = 1, A[T] += 1, d(A, A, f), A[3] < 0 && (y[T] = 1 / 0), L[T] -= 1, d(L, L, f), L[3] < 0 && (y[T] = 1 / 0);
                  var P = (L[0] / L[3] - A[0] / A[3]) * b, S = (L[1] / L[3] - A[1] / A[3]) * w;
                  y[T] = 0.25 * Math.sqrt(P * P + S * S);
                }
                return y;
              }
              var c = [new h(1 / 0, -1 / 0, 1 / 0), new h(1 / 0, -1 / 0, 1 / 0), new h(1 / 0, -1 / 0, 1 / 0)], a = [0, 0, 0];
            }, { "./lib/cube.js": 72, "extract-frustum-planes": 67, "gl-mat4/multiply": 100, "gl-mat4/transpose": 109, "gl-vec4/transformMat4": 221, "split-polygon": 300 }], 78: [function(g, k, x) {
              var e = g("typedarray-pool"), r = g("ndarray-ops"), n = g("ndarray"), s = ["uint8", "uint8_clamped", "uint16", "uint32", "int8", "int16", "int32", "float32"];
              function t(h, l, i, p, c) {
                this.gl = h, this.type = l, this.handle = i, this.length = p, this.usage = c;
              }
              var d = t.prototype;
              function u(h, l, i, p, c, a) {
                var y = c.length * c.BYTES_PER_ELEMENT;
                if (a < 0)
                  return h.bufferData(l, c, p), y;
                if (y + a > i)
                  throw new Error("gl-buffer: If resizing buffer, must not specify offset");
                return h.bufferSubData(l, a, c), i;
              }
              function o(h, l) {
                for (var i = e.malloc(h.length, l), p = h.length, c = 0; c < p; ++c)
                  i[c] = h[c];
                return i;
              }
              d.bind = function() {
                this.gl.bindBuffer(this.type, this.handle);
              }, d.unbind = function() {
                this.gl.bindBuffer(this.type, null);
              }, d.dispose = function() {
                this.gl.deleteBuffer(this.handle);
              }, d.update = function(h, l) {
                if (typeof l != "number" && (l = -1), this.bind(), typeof h == "object" && h.shape !== void 0) {
                  var i = h.dtype;
                  if (s.indexOf(i) < 0 && (i = "float32"), this.type === this.gl.ELEMENT_ARRAY_BUFFER && (i = gl.getExtension("OES_element_index_uint") && i !== "uint16" ? "uint32" : "uint16"), i === h.dtype && function(y, f) {
                    for (var _ = 1, b = f.length - 1; b >= 0; --b) {
                      if (f[b] !== _)
                        return !1;
                      _ *= y[b];
                    }
                    return !0;
                  }(h.shape, h.stride))
                    h.offset === 0 && h.data.length === h.shape[0] ? this.length = u(this.gl, this.type, this.length, this.usage, h.data, l) : this.length = u(this.gl, this.type, this.length, this.usage, h.data.subarray(h.offset, h.shape[0]), l);
                  else {
                    var p = e.malloc(h.size, i), c = n(p, h.shape);
                    r.assign(c, h), this.length = u(this.gl, this.type, this.length, this.usage, l < 0 ? p : p.subarray(0, h.size), l), e.free(p);
                  }
                } else if (Array.isArray(h)) {
                  var a;
                  a = this.type === this.gl.ELEMENT_ARRAY_BUFFER ? o(h, "uint16") : o(h, "float32"), this.length = u(this.gl, this.type, this.length, this.usage, l < 0 ? a : a.subarray(0, h.length), l), e.free(a);
                } else if (typeof h == "object" && typeof h.length == "number")
                  this.length = u(this.gl, this.type, this.length, this.usage, h, l);
                else {
                  if (typeof h != "number" && h !== void 0)
                    throw new Error("gl-buffer: Invalid data type");
                  if (l >= 0)
                    throw new Error("gl-buffer: Cannot specify offset when resizing buffer");
                  (h |= 0) <= 0 && (h = 1), this.gl.bufferData(this.type, 0 | h, this.usage), this.length = h;
                }
              }, k.exports = function(h, l, i, p) {
                if (i = i || h.ARRAY_BUFFER, p = p || h.DYNAMIC_DRAW, i !== h.ARRAY_BUFFER && i !== h.ELEMENT_ARRAY_BUFFER)
                  throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");
                if (p !== h.DYNAMIC_DRAW && p !== h.STATIC_DRAW && p !== h.STREAM_DRAW)
                  throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");
                var c = h.createBuffer(), a = new t(h, i, c, 0, p);
                return a.update(l), a;
              };
            }, { ndarray: 259, "ndarray-ops": 254, "typedarray-pool": 308 }], 79: [function(g, k, x) {
              var e = g("gl-vec3");
              k.exports = function(n, s) {
                var t = n.positions, d = n.vectors, u = { positions: [], vertexIntensity: [], vertexIntensityBounds: n.vertexIntensityBounds, vectors: [], cells: [], coneOffset: n.coneOffset, colormap: n.colormap };
                if (n.positions.length === 0)
                  return s && (s[0] = [0, 0, 0], s[1] = [0, 0, 0]), u;
                for (var o = 0, h = 1 / 0, l = -1 / 0, i = 1 / 0, p = -1 / 0, c = 1 / 0, a = -1 / 0, y = null, f = null, _ = [], b = 1 / 0, w = !1, T = 0; T < t.length; T++) {
                  var L = t[T];
                  h = Math.min(L[0], h), l = Math.max(L[0], l), i = Math.min(L[1], i), p = Math.max(L[1], p), c = Math.min(L[2], c), a = Math.max(L[2], a);
                  var A = d[T];
                  if (e.length(A) > o && (o = e.length(A)), T) {
                    var I = 2 * e.distance(y, L) / (e.length(f) + e.length(A));
                    I ? (b = Math.min(b, I), w = !1) : w = !0;
                  }
                  w || (y = L, f = A), _.push(A);
                }
                var P = [h, i, c], S = [l, p, a];
                s && (s[0] = P, s[1] = S), o === 0 && (o = 1);
                var E = 1 / o;
                isFinite(b) || (b = 1), u.vectorScale = b;
                var R = n.coneSize || 0.5;
                n.absoluteConeSize && (R = n.absoluteConeSize * E), u.coneScale = R, T = 0;
                for (var z = 0; T < t.length; T++)
                  for (var j = (L = t[T])[0], H = L[1], Y = L[2], J = _[T], W = e.length(J) * E, Z = 0; Z < 8; Z++) {
                    u.positions.push([j, H, Y, z++]), u.positions.push([j, H, Y, z++]), u.positions.push([j, H, Y, z++]), u.positions.push([j, H, Y, z++]), u.positions.push([j, H, Y, z++]), u.positions.push([j, H, Y, z++]), u.vectors.push(J), u.vectors.push(J), u.vectors.push(J), u.vectors.push(J), u.vectors.push(J), u.vectors.push(J), u.vertexIntensity.push(W, W, W), u.vertexIntensity.push(W, W, W);
                    var re = u.positions.length;
                    u.cells.push([re - 6, re - 5, re - 4], [re - 3, re - 2, re - 1]);
                  }
                return u;
              };
              var r = g("./lib/shaders");
              k.exports.createMesh = g("./create_mesh"), k.exports.createConeMesh = function(n, s) {
                return k.exports.createMesh(n, s, { shaders: r, traceType: "cone" });
              };
            }, { "./create_mesh": 80, "./lib/shaders": 81, "gl-vec3": 169 }], 80: [function(g, k, x) {
              var e = g("gl-shader"), r = g("gl-buffer"), n = g("gl-vao"), s = g("gl-texture2d"), t = g("gl-mat4/multiply"), d = g("gl-mat4/invert"), u = g("ndarray"), o = g("colormap"), h = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
              function l(a, y, f, _, b, w, T, L, A, I, P) {
                this.gl = a, this.pixelRatio = 1, this.cells = [], this.positions = [], this.intensity = [], this.texture = y, this.dirty = !0, this.triShader = f, this.pickShader = _, this.trianglePositions = b, this.triangleVectors = w, this.triangleColors = L, this.triangleUVs = A, this.triangleIds = T, this.triangleVAO = I, this.triangleCount = 0, this.pickId = 1, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.lightPosition = [1e5, 1e5, 0], this.ambientLight = 0.8, this.diffuseLight = 0.8, this.specularLight = 2, this.roughness = 0.5, this.fresnel = 1.5, this.opacity = 1, this.traceType = P, this.tubeScale = 1, this.coneScale = 2, this.vectorScale = 1, this.coneOffset = 0.25, this._model = h, this._view = h, this._projection = h, this._resolution = [1, 1];
              }
              var i = l.prototype;
              function p(a, y) {
                var f = e(a, y.meshShader.vertex, y.meshShader.fragment, null, y.meshShader.attributes);
                return f.attributes.position.location = 0, f.attributes.color.location = 2, f.attributes.uv.location = 3, f.attributes.vector.location = 4, f;
              }
              function c(a, y) {
                var f = e(a, y.pickShader.vertex, y.pickShader.fragment, null, y.pickShader.attributes);
                return f.attributes.position.location = 0, f.attributes.id.location = 1, f.attributes.vector.location = 4, f;
              }
              i.isOpaque = function() {
                return this.opacity >= 1;
              }, i.isTransparent = function() {
                return this.opacity < 1;
              }, i.pickSlots = 1, i.setPickBase = function(a) {
                this.pickId = a;
              }, i.update = function(a) {
                a = a || {};
                var y = this.gl;
                this.dirty = !0, "lightPosition" in a && (this.lightPosition = a.lightPosition), "opacity" in a && (this.opacity = a.opacity), "ambient" in a && (this.ambientLight = a.ambient), "diffuse" in a && (this.diffuseLight = a.diffuse), "specular" in a && (this.specularLight = a.specular), "roughness" in a && (this.roughness = a.roughness), "fresnel" in a && (this.fresnel = a.fresnel), a.tubeScale !== void 0 && (this.tubeScale = a.tubeScale), a.vectorScale !== void 0 && (this.vectorScale = a.vectorScale), a.coneScale !== void 0 && (this.coneScale = a.coneScale), a.coneOffset !== void 0 && (this.coneOffset = a.coneOffset), a.colormap && (this.texture.shape = [256, 256], this.texture.minFilter = y.LINEAR_MIPMAP_LINEAR, this.texture.magFilter = y.LINEAR, this.texture.setPixels(function(ee) {
                  for (var N = o({ colormap: ee, nshades: 256, format: "rgba" }), K = new Uint8Array(1024), X = 0; X < 256; ++X) {
                    for (var te = N[X], ie = 0; ie < 3; ++ie)
                      K[4 * X + ie] = te[ie];
                    K[4 * X + 3] = 255 * te[3];
                  }
                  return u(K, [256, 256, 4], [4, 0, 1]);
                }(a.colormap)), this.texture.generateMipmap());
                var f = a.cells, _ = a.positions, b = a.vectors;
                if (_ && f && b) {
                  var w = [], T = [], L = [], A = [], I = [];
                  this.cells = f, this.positions = _, this.vectors = b;
                  var P = a.meshColor || [1, 1, 1, 1], S = a.vertexIntensity, E = 1 / 0, R = -1 / 0;
                  if (S)
                    if (a.vertexIntensityBounds)
                      E = +a.vertexIntensityBounds[0], R = +a.vertexIntensityBounds[1];
                    else
                      for (var z = 0; z < S.length; ++z) {
                        var j = S[z];
                        E = Math.min(E, j), R = Math.max(R, j);
                      }
                  else
                    for (z = 0; z < _.length; ++z)
                      j = _[z][2], E = Math.min(E, j), R = Math.max(R, j);
                  for (this.intensity = S || function(ee) {
                    for (var N = ee.length, K = new Array(N), X = 0; X < N; ++X)
                      K[X] = ee[X][2];
                    return K;
                  }(_), this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], z = 0; z < _.length; ++z)
                    for (var H = _[z], Y = 0; Y < 3; ++Y)
                      !isNaN(H[Y]) && isFinite(H[Y]) && (this.bounds[0][Y] = Math.min(this.bounds[0][Y], H[Y]), this.bounds[1][Y] = Math.max(this.bounds[1][Y], H[Y]));
                  var J = 0;
                  e:
                    for (z = 0; z < f.length; ++z) {
                      var W = f[z];
                      switch (W.length) {
                        case 3:
                          for (Y = 0; Y < 3; ++Y) {
                            H = _[re = W[Y]];
                            for (var Z = 0; Z < 3; ++Z)
                              if (isNaN(H[Z]) || !isFinite(H[Z]))
                                continue e;
                          }
                          for (Y = 0; Y < 3; ++Y) {
                            var re;
                            H = _[re = W[2 - Y]], w.push(H[0], H[1], H[2], H[3]);
                            var V = b[re];
                            T.push(V[0], V[1], V[2], V[3] || 0);
                            var B, U = P;
                            U.length === 3 ? L.push(U[0], U[1], U[2], 1) : L.push(U[0], U[1], U[2], U[3]), B = S ? [(S[re] - E) / (R - E), 0] : [(H[2] - E) / (R - E), 0], A.push(B[0], B[1]), I.push(z);
                          }
                          J += 1;
                      }
                    }
                  this.triangleCount = J, this.trianglePositions.update(w), this.triangleVectors.update(T), this.triangleColors.update(L), this.triangleUVs.update(A), this.triangleIds.update(new Uint32Array(I));
                }
              }, i.drawTransparent = i.draw = function(a) {
                a = a || {};
                for (var y = this.gl, f = a.model || h, _ = a.view || h, b = a.projection || h, w = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], T = 0; T < 3; ++T)
                  w[0][T] = Math.max(w[0][T], this.clipBounds[0][T]), w[1][T] = Math.min(w[1][T], this.clipBounds[1][T]);
                var L = { model: f, view: _, projection: b, inverseModel: h.slice(), clipBounds: w, kambient: this.ambientLight, kdiffuse: this.diffuseLight, kspecular: this.specularLight, roughness: this.roughness, fresnel: this.fresnel, eyePosition: [0, 0, 0], lightPosition: [0, 0, 0], opacity: this.opacity, tubeScale: this.tubeScale, vectorScale: this.vectorScale, coneScale: this.coneScale, coneOffset: this.coneOffset, texture: 0 };
                L.inverseModel = d(L.inverseModel, L.model), y.disable(y.CULL_FACE), this.texture.bind(0);
                var A = new Array(16);
                for (t(A, L.view, L.model), t(A, L.projection, A), d(A, A), T = 0; T < 3; ++T)
                  L.eyePosition[T] = A[12 + T] / A[15];
                var I = A[15];
                for (T = 0; T < 3; ++T)
                  I += this.lightPosition[T] * A[4 * T + 3];
                for (T = 0; T < 3; ++T) {
                  for (var P = A[12 + T], S = 0; S < 3; ++S)
                    P += A[4 * S + T] * this.lightPosition[S];
                  L.lightPosition[T] = P / I;
                }
                if (this.triangleCount > 0) {
                  var E = this.triShader;
                  E.bind(), E.uniforms = L, this.triangleVAO.bind(), y.drawArrays(y.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind();
                }
              }, i.drawPick = function(a) {
                a = a || {};
                for (var y = this.gl, f = a.model || h, _ = a.view || h, b = a.projection || h, w = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], T = 0; T < 3; ++T)
                  w[0][T] = Math.max(w[0][T], this.clipBounds[0][T]), w[1][T] = Math.min(w[1][T], this.clipBounds[1][T]);
                this._model = [].slice.call(f), this._view = [].slice.call(_), this._projection = [].slice.call(b), this._resolution = [y.drawingBufferWidth, y.drawingBufferHeight];
                var L = { model: f, view: _, projection: b, clipBounds: w, tubeScale: this.tubeScale, vectorScale: this.vectorScale, coneScale: this.coneScale, coneOffset: this.coneOffset, pickId: this.pickId / 255 }, A = this.pickShader;
                A.bind(), A.uniforms = L, this.triangleCount > 0 && (this.triangleVAO.bind(), y.drawArrays(y.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind());
              }, i.pick = function(a) {
                if (!a || a.id !== this.pickId)
                  return null;
                var y = a.value[0] + 256 * a.value[1] + 65536 * a.value[2], f = this.cells[y], _ = this.positions[f[1]].slice(0, 3), b = { position: _, dataCoordinate: _, index: Math.floor(f[1] / 48) };
                return this.traceType === "cone" ? b.index = Math.floor(f[1] / 48) : this.traceType === "streamtube" && (b.intensity = this.intensity[f[1]], b.velocity = this.vectors[f[1]].slice(0, 3), b.divergence = this.vectors[f[1]][3], b.index = y), b;
              }, i.dispose = function() {
                this.texture.dispose(), this.triShader.dispose(), this.pickShader.dispose(), this.triangleVAO.dispose(), this.trianglePositions.dispose(), this.triangleVectors.dispose(), this.triangleColors.dispose(), this.triangleUVs.dispose(), this.triangleIds.dispose();
              }, k.exports = function(a, y, f) {
                var _ = f.shaders;
                arguments.length === 1 && (a = (y = a).gl);
                var b = p(a, _), w = c(a, _), T = s(a, u(new Uint8Array([255, 255, 255, 255]), [1, 1, 4]));
                T.generateMipmap(), T.minFilter = a.LINEAR_MIPMAP_LINEAR, T.magFilter = a.LINEAR;
                var L = r(a), A = r(a), I = r(a), P = r(a), S = r(a), E = n(a, [{ buffer: L, type: a.FLOAT, size: 4 }, { buffer: S, type: a.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: I, type: a.FLOAT, size: 4 }, { buffer: P, type: a.FLOAT, size: 2 }, { buffer: A, type: a.FLOAT, size: 4 }]), R = new l(a, T, b, w, L, A, S, I, P, E, f.traceType || "cone");
                return R.update(y), R;
              };
            }, { colormap: 53, "gl-buffer": 78, "gl-mat4/invert": 98, "gl-mat4/multiply": 100, "gl-shader": 132, "gl-texture2d": 146, "gl-vao": 150, ndarray: 259 }], 81: [function(g, k, x) {
              var e = g("glslify"), r = e([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
//   segment + 0 top vertex
//   segment + 1 perimeter vertex a+1
//   segment + 2 perimeter vertex a
//   segment + 3 center base vertex
//   segment + 4 perimeter vertex a
//   segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {

  const float segmentCount = 8.0;

  float index = rawIndex - floor(rawIndex /
    (segmentCount * 6.0)) *
    (segmentCount * 6.0);

  float segment = floor(0.001 + index/6.0);
  float segmentIndex = index - (segment*6.0);

  normal = -normalize(d);

  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
    return mix(vec3(0.0), -d, coneOffset);
  }

  float nextAngle = (
    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
  ) ? 1.0 : 0.0;
  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);

  vec3 v1 = mix(d, vec3(0.0), coneOffset);
  vec3 v2 = v1 - d;

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d)*0.25;
  vec3 y = v * sin(angle) * length(d)*0.25;
  vec3 v3 = v2 + x + y;
  if (segmentIndex < 3.0) {
    vec3 tx = u * sin(angle);
    vec3 ty = v * -cos(angle);
    vec3 tangent = tx + ty;
    normal = normalize(cross(v3 - v1, tangent));
  }

  if (segmentIndex == 0.0) {
    return mix(d, vec3(0.0), coneOffset);
  }
  return v3;
}

attribute vec3 vector;
attribute vec4 color, position;
attribute vec2 uv;

uniform float vectorScale, coneScale, coneOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  // Scale the vector magnitude to stay constant with
  // model & view changes.
  vec3 normal;
  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);
  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * conePosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  // vec4 m_position  = model * vec4(conePosition, 1.0);
  vec4 t_position  = view * conePosition;
  gl_Position      = projection * t_position;

  f_color          = color;
  f_data           = conePosition.xyz;
  f_position       = position.xyz;
  f_uv             = uv;
}
`]), n = e([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * opacity;
}
`]), s = e([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
//   segment + 0 top vertex
//   segment + 1 perimeter vertex a+1
//   segment + 2 perimeter vertex a
//   segment + 3 center base vertex
//   segment + 4 perimeter vertex a
//   segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {

  const float segmentCount = 8.0;

  float index = rawIndex - floor(rawIndex /
    (segmentCount * 6.0)) *
    (segmentCount * 6.0);

  float segment = floor(0.001 + index/6.0);
  float segmentIndex = index - (segment*6.0);

  normal = -normalize(d);

  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
    return mix(vec3(0.0), -d, coneOffset);
  }

  float nextAngle = (
    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
  ) ? 1.0 : 0.0;
  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);

  vec3 v1 = mix(d, vec3(0.0), coneOffset);
  vec3 v2 = v1 - d;

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d)*0.25;
  vec3 y = v * sin(angle) * length(d)*0.25;
  vec3 v3 = v2 + x + y;
  if (segmentIndex < 3.0) {
    vec3 tx = u * sin(angle);
    vec3 ty = v * -cos(angle);
    vec3 tangent = tx + ty;
    normal = normalize(cross(v3 - v1, tangent));
  }

  if (segmentIndex == 0.0) {
    return mix(d, vec3(0.0), coneOffset);
  }
  return v3;
}

attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform float vectorScale, coneScale, coneOffset;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  vec3 normal;
  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);
  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
  gl_Position = projection * view * conePosition;
  f_id        = id;
  f_position  = position.xyz;
}
`]), t = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]);
              x.meshShader = { vertex: r, fragment: n, attributes: [{ name: "position", type: "vec4" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }, { name: "vector", type: "vec3" }] }, x.pickShader = { vertex: s, fragment: t, attributes: [{ name: "position", type: "vec4" }, { name: "id", type: "vec4" }, { name: "vector", type: "vec3" }] };
            }, { glslify: 231 }], 82: [function(g, k, x) {
              k.exports = { 0: "NONE", 1: "ONE", 2: "LINE_LOOP", 3: "LINE_STRIP", 4: "TRIANGLES", 5: "TRIANGLE_STRIP", 6: "TRIANGLE_FAN", 256: "DEPTH_BUFFER_BIT", 512: "NEVER", 513: "LESS", 514: "EQUAL", 515: "LEQUAL", 516: "GREATER", 517: "NOTEQUAL", 518: "GEQUAL", 519: "ALWAYS", 768: "SRC_COLOR", 769: "ONE_MINUS_SRC_COLOR", 770: "SRC_ALPHA", 771: "ONE_MINUS_SRC_ALPHA", 772: "DST_ALPHA", 773: "ONE_MINUS_DST_ALPHA", 774: "DST_COLOR", 775: "ONE_MINUS_DST_COLOR", 776: "SRC_ALPHA_SATURATE", 1024: "STENCIL_BUFFER_BIT", 1028: "FRONT", 1029: "BACK", 1032: "FRONT_AND_BACK", 1280: "INVALID_ENUM", 1281: "INVALID_VALUE", 1282: "INVALID_OPERATION", 1285: "OUT_OF_MEMORY", 1286: "INVALID_FRAMEBUFFER_OPERATION", 2304: "CW", 2305: "CCW", 2849: "LINE_WIDTH", 2884: "CULL_FACE", 2885: "CULL_FACE_MODE", 2886: "FRONT_FACE", 2928: "DEPTH_RANGE", 2929: "DEPTH_TEST", 2930: "DEPTH_WRITEMASK", 2931: "DEPTH_CLEAR_VALUE", 2932: "DEPTH_FUNC", 2960: "STENCIL_TEST", 2961: "STENCIL_CLEAR_VALUE", 2962: "STENCIL_FUNC", 2963: "STENCIL_VALUE_MASK", 2964: "STENCIL_FAIL", 2965: "STENCIL_PASS_DEPTH_FAIL", 2966: "STENCIL_PASS_DEPTH_PASS", 2967: "STENCIL_REF", 2968: "STENCIL_WRITEMASK", 2978: "VIEWPORT", 3024: "DITHER", 3042: "BLEND", 3088: "SCISSOR_BOX", 3089: "SCISSOR_TEST", 3106: "COLOR_CLEAR_VALUE", 3107: "COLOR_WRITEMASK", 3317: "UNPACK_ALIGNMENT", 3333: "PACK_ALIGNMENT", 3379: "MAX_TEXTURE_SIZE", 3386: "MAX_VIEWPORT_DIMS", 3408: "SUBPIXEL_BITS", 3410: "RED_BITS", 3411: "GREEN_BITS", 3412: "BLUE_BITS", 3413: "ALPHA_BITS", 3414: "DEPTH_BITS", 3415: "STENCIL_BITS", 3553: "TEXTURE_2D", 4352: "DONT_CARE", 4353: "FASTEST", 4354: "NICEST", 5120: "BYTE", 5121: "UNSIGNED_BYTE", 5122: "SHORT", 5123: "UNSIGNED_SHORT", 5124: "INT", 5125: "UNSIGNED_INT", 5126: "FLOAT", 5386: "INVERT", 5890: "TEXTURE", 6401: "STENCIL_INDEX", 6402: "DEPTH_COMPONENT", 6406: "ALPHA", 6407: "RGB", 6408: "RGBA", 6409: "LUMINANCE", 6410: "LUMINANCE_ALPHA", 7680: "KEEP", 7681: "REPLACE", 7682: "INCR", 7683: "DECR", 7936: "VENDOR", 7937: "RENDERER", 7938: "VERSION", 9728: "NEAREST", 9729: "LINEAR", 9984: "NEAREST_MIPMAP_NEAREST", 9985: "LINEAR_MIPMAP_NEAREST", 9986: "NEAREST_MIPMAP_LINEAR", 9987: "LINEAR_MIPMAP_LINEAR", 10240: "TEXTURE_MAG_FILTER", 10241: "TEXTURE_MIN_FILTER", 10242: "TEXTURE_WRAP_S", 10243: "TEXTURE_WRAP_T", 10497: "REPEAT", 10752: "POLYGON_OFFSET_UNITS", 16384: "COLOR_BUFFER_BIT", 32769: "CONSTANT_COLOR", 32770: "ONE_MINUS_CONSTANT_COLOR", 32771: "CONSTANT_ALPHA", 32772: "ONE_MINUS_CONSTANT_ALPHA", 32773: "BLEND_COLOR", 32774: "FUNC_ADD", 32777: "BLEND_EQUATION_RGB", 32778: "FUNC_SUBTRACT", 32779: "FUNC_REVERSE_SUBTRACT", 32819: "UNSIGNED_SHORT_4_4_4_4", 32820: "UNSIGNED_SHORT_5_5_5_1", 32823: "POLYGON_OFFSET_FILL", 32824: "POLYGON_OFFSET_FACTOR", 32854: "RGBA4", 32855: "RGB5_A1", 32873: "TEXTURE_BINDING_2D", 32926: "SAMPLE_ALPHA_TO_COVERAGE", 32928: "SAMPLE_COVERAGE", 32936: "SAMPLE_BUFFERS", 32937: "SAMPLES", 32938: "SAMPLE_COVERAGE_VALUE", 32939: "SAMPLE_COVERAGE_INVERT", 32968: "BLEND_DST_RGB", 32969: "BLEND_SRC_RGB", 32970: "BLEND_DST_ALPHA", 32971: "BLEND_SRC_ALPHA", 33071: "CLAMP_TO_EDGE", 33170: "GENERATE_MIPMAP_HINT", 33189: "DEPTH_COMPONENT16", 33306: "DEPTH_STENCIL_ATTACHMENT", 33635: "UNSIGNED_SHORT_5_6_5", 33648: "MIRRORED_REPEAT", 33901: "ALIASED_POINT_SIZE_RANGE", 33902: "ALIASED_LINE_WIDTH_RANGE", 33984: "TEXTURE0", 33985: "TEXTURE1", 33986: "TEXTURE2", 33987: "TEXTURE3", 33988: "TEXTURE4", 33989: "TEXTURE5", 33990: "TEXTURE6", 33991: "TEXTURE7", 33992: "TEXTURE8", 33993: "TEXTURE9", 33994: "TEXTURE10", 33995: "TEXTURE11", 33996: "TEXTURE12", 33997: "TEXTURE13", 33998: "TEXTURE14", 33999: "TEXTURE15", 34e3: "TEXTURE16", 34001: "TEXTURE17", 34002: "TEXTURE18", 34003: "TEXTURE19", 34004: "TEXTURE20", 34005: "TEXTURE21", 34006: "TEXTURE22", 34007: "TEXTURE23", 34008: "TEXTURE24", 34009: "TEXTURE25", 34010: "TEXTURE26", 34011: "TEXTURE27", 34012: "TEXTURE28", 34013: "TEXTURE29", 34014: "TEXTURE30", 34015: "TEXTURE31", 34016: "ACTIVE_TEXTURE", 34024: "MAX_RENDERBUFFER_SIZE", 34041: "DEPTH_STENCIL", 34055: "INCR_WRAP", 34056: "DECR_WRAP", 34067: "TEXTURE_CUBE_MAP", 34068: "TEXTURE_BINDING_CUBE_MAP", 34069: "TEXTURE_CUBE_MAP_POSITIVE_X", 34070: "TEXTURE_CUBE_MAP_NEGATIVE_X", 34071: "TEXTURE_CUBE_MAP_POSITIVE_Y", 34072: "TEXTURE_CUBE_MAP_NEGATIVE_Y", 34073: "TEXTURE_CUBE_MAP_POSITIVE_Z", 34074: "TEXTURE_CUBE_MAP_NEGATIVE_Z", 34076: "MAX_CUBE_MAP_TEXTURE_SIZE", 34338: "VERTEX_ATTRIB_ARRAY_ENABLED", 34339: "VERTEX_ATTRIB_ARRAY_SIZE", 34340: "VERTEX_ATTRIB_ARRAY_STRIDE", 34341: "VERTEX_ATTRIB_ARRAY_TYPE", 34342: "CURRENT_VERTEX_ATTRIB", 34373: "VERTEX_ATTRIB_ARRAY_POINTER", 34466: "NUM_COMPRESSED_TEXTURE_FORMATS", 34467: "COMPRESSED_TEXTURE_FORMATS", 34660: "BUFFER_SIZE", 34661: "BUFFER_USAGE", 34816: "STENCIL_BACK_FUNC", 34817: "STENCIL_BACK_FAIL", 34818: "STENCIL_BACK_PASS_DEPTH_FAIL", 34819: "STENCIL_BACK_PASS_DEPTH_PASS", 34877: "BLEND_EQUATION_ALPHA", 34921: "MAX_VERTEX_ATTRIBS", 34922: "VERTEX_ATTRIB_ARRAY_NORMALIZED", 34930: "MAX_TEXTURE_IMAGE_UNITS", 34962: "ARRAY_BUFFER", 34963: "ELEMENT_ARRAY_BUFFER", 34964: "ARRAY_BUFFER_BINDING", 34965: "ELEMENT_ARRAY_BUFFER_BINDING", 34975: "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", 35040: "STREAM_DRAW", 35044: "STATIC_DRAW", 35048: "DYNAMIC_DRAW", 35632: "FRAGMENT_SHADER", 35633: "VERTEX_SHADER", 35660: "MAX_VERTEX_TEXTURE_IMAGE_UNITS", 35661: "MAX_COMBINED_TEXTURE_IMAGE_UNITS", 35663: "SHADER_TYPE", 35664: "FLOAT_VEC2", 35665: "FLOAT_VEC3", 35666: "FLOAT_VEC4", 35667: "INT_VEC2", 35668: "INT_VEC3", 35669: "INT_VEC4", 35670: "BOOL", 35671: "BOOL_VEC2", 35672: "BOOL_VEC3", 35673: "BOOL_VEC4", 35674: "FLOAT_MAT2", 35675: "FLOAT_MAT3", 35676: "FLOAT_MAT4", 35678: "SAMPLER_2D", 35680: "SAMPLER_CUBE", 35712: "DELETE_STATUS", 35713: "COMPILE_STATUS", 35714: "LINK_STATUS", 35715: "VALIDATE_STATUS", 35716: "INFO_LOG_LENGTH", 35717: "ATTACHED_SHADERS", 35718: "ACTIVE_UNIFORMS", 35719: "ACTIVE_UNIFORM_MAX_LENGTH", 35720: "SHADER_SOURCE_LENGTH", 35721: "ACTIVE_ATTRIBUTES", 35722: "ACTIVE_ATTRIBUTE_MAX_LENGTH", 35724: "SHADING_LANGUAGE_VERSION", 35725: "CURRENT_PROGRAM", 36003: "STENCIL_BACK_REF", 36004: "STENCIL_BACK_VALUE_MASK", 36005: "STENCIL_BACK_WRITEMASK", 36006: "FRAMEBUFFER_BINDING", 36007: "RENDERBUFFER_BINDING", 36048: "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", 36049: "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", 36050: "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", 36051: "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", 36053: "FRAMEBUFFER_COMPLETE", 36054: "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", 36055: "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", 36057: "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", 36061: "FRAMEBUFFER_UNSUPPORTED", 36064: "COLOR_ATTACHMENT0", 36096: "DEPTH_ATTACHMENT", 36128: "STENCIL_ATTACHMENT", 36160: "FRAMEBUFFER", 36161: "RENDERBUFFER", 36162: "RENDERBUFFER_WIDTH", 36163: "RENDERBUFFER_HEIGHT", 36164: "RENDERBUFFER_INTERNAL_FORMAT", 36168: "STENCIL_INDEX8", 36176: "RENDERBUFFER_RED_SIZE", 36177: "RENDERBUFFER_GREEN_SIZE", 36178: "RENDERBUFFER_BLUE_SIZE", 36179: "RENDERBUFFER_ALPHA_SIZE", 36180: "RENDERBUFFER_DEPTH_SIZE", 36181: "RENDERBUFFER_STENCIL_SIZE", 36194: "RGB565", 36336: "LOW_FLOAT", 36337: "MEDIUM_FLOAT", 36338: "HIGH_FLOAT", 36339: "LOW_INT", 36340: "MEDIUM_INT", 36341: "HIGH_INT", 36346: "SHADER_COMPILER", 36347: "MAX_VERTEX_UNIFORM_VECTORS", 36348: "MAX_VARYING_VECTORS", 36349: "MAX_FRAGMENT_UNIFORM_VECTORS", 37440: "UNPACK_FLIP_Y_WEBGL", 37441: "UNPACK_PREMULTIPLY_ALPHA_WEBGL", 37442: "CONTEXT_LOST_WEBGL", 37443: "UNPACK_COLORSPACE_CONVERSION_WEBGL", 37444: "BROWSER_DEFAULT_WEBGL" };
            }, {}], 83: [function(g, k, x) {
              var e = g("./1.0/numbers");
              k.exports = function(r) {
                return e[r];
              };
            }, { "./1.0/numbers": 82 }], 84: [function(g, k, x) {
              k.exports = function(l) {
                var i = l.gl, p = e(i), c = r(i, [{ buffer: p, type: i.FLOAT, size: 3, offset: 0, stride: 40 }, { buffer: p, type: i.FLOAT, size: 4, offset: 12, stride: 40 }, { buffer: p, type: i.FLOAT, size: 3, offset: 28, stride: 40 }]), a = n(i);
                a.attributes.position.location = 0, a.attributes.color.location = 1, a.attributes.offset.location = 2;
                var y = new t(i, p, c, a);
                return y.update(l), y;
              };
              var e = g("gl-buffer"), r = g("gl-vao"), n = g("./shaders/index"), s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
              function t(l, i, p, c) {
                this.gl = l, this.shader = c, this.buffer = i, this.vao = p, this.pixelRatio = 1, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.lineWidth = [1, 1, 1], this.capSize = [10, 10, 10], this.lineCount = [0, 0, 0], this.lineOffset = [0, 0, 0], this.opacity = 1, this.hasAlpha = !1;
              }
              var d = t.prototype;
              function u(l, i) {
                for (var p = 0; p < 3; ++p)
                  l[0][p] = Math.min(l[0][p], i[p]), l[1][p] = Math.max(l[1][p], i[p]);
              }
              d.isOpaque = function() {
                return !this.hasAlpha;
              }, d.isTransparent = function() {
                return this.hasAlpha;
              }, d.drawTransparent = d.draw = function(l) {
                var i = this.gl, p = this.shader.uniforms;
                this.shader.bind();
                var c = p.view = l.view || s, a = p.projection = l.projection || s;
                p.model = l.model || s, p.clipBounds = this.clipBounds, p.opacity = this.opacity;
                var y = c[12], f = c[13], _ = c[14], b = c[15], w = (l._ortho ? 2 : 1) * this.pixelRatio * (a[3] * y + a[7] * f + a[11] * _ + a[15] * b) / i.drawingBufferHeight;
                this.vao.bind();
                for (var T = 0; T < 3; ++T)
                  i.lineWidth(this.lineWidth[T] * this.pixelRatio), p.capSize = this.capSize[T] * w, this.lineCount[T] && i.drawArrays(i.LINES, this.lineOffset[T], this.lineCount[T]);
                this.vao.unbind();
              };
              var o = function() {
                for (var l = new Array(3), i = 0; i < 3; ++i) {
                  for (var p = [], c = 1; c <= 2; ++c)
                    for (var a = -1; a <= 1; a += 2) {
                      var y = [0, 0, 0];
                      y[(c + i) % 3] = a, p.push(y);
                    }
                  l[i] = p;
                }
                return l;
              }();
              function h(l, i, p, c) {
                for (var a = o[c], y = 0; y < a.length; ++y) {
                  var f = a[y];
                  l.push(i[0], i[1], i[2], p[0], p[1], p[2], p[3], f[0], f[1], f[2]);
                }
                return a.length;
              }
              d.update = function(l) {
                "lineWidth" in (l = l || {}) && (this.lineWidth = l.lineWidth, Array.isArray(this.lineWidth) || (this.lineWidth = [this.lineWidth, this.lineWidth, this.lineWidth])), "capSize" in l && (this.capSize = l.capSize, Array.isArray(this.capSize) || (this.capSize = [this.capSize, this.capSize, this.capSize])), this.hasAlpha = !1, "opacity" in l && (this.opacity = +l.opacity, this.opacity < 1 && (this.hasAlpha = !0));
                var i = l.color || [[0, 0, 0], [0, 0, 0], [0, 0, 0]], p = l.position, c = l.error;
                if (Array.isArray(i[0]) || (i = [i, i, i]), p && c) {
                  var a = [], y = p.length, f = 0;
                  this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.lineCount = [0, 0, 0];
                  for (var _ = 0; _ < 3; ++_) {
                    this.lineOffset[_] = f;
                    e:
                      for (var b = 0; b < y; ++b) {
                        for (var w = p[b], T = 0; T < 3; ++T)
                          if (isNaN(w[T]) || !isFinite(w[T]))
                            continue e;
                        var L = c[b], A = i[_];
                        if (Array.isArray(A[0]) && (A = i[b]), A.length === 3 ? A = [A[0], A[1], A[2], 1] : A.length === 4 && (A = [A[0], A[1], A[2], A[3]], !this.hasAlpha && A[3] < 1 && (this.hasAlpha = !0)), !isNaN(L[0][_]) && !isNaN(L[1][_])) {
                          var I;
                          L[0][_] < 0 && ((I = w.slice())[_] += L[0][_], a.push(w[0], w[1], w[2], A[0], A[1], A[2], A[3], 0, 0, 0, I[0], I[1], I[2], A[0], A[1], A[2], A[3], 0, 0, 0), u(this.bounds, I), f += 2 + h(a, I, A, _)), L[1][_] > 0 && ((I = w.slice())[_] += L[1][_], a.push(w[0], w[1], w[2], A[0], A[1], A[2], A[3], 0, 0, 0, I[0], I[1], I[2], A[0], A[1], A[2], A[3], 0, 0, 0), u(this.bounds, I), f += 2 + h(a, I, A, _));
                        }
                      }
                    this.lineCount[_] = f - this.lineOffset[_];
                  }
                  this.buffer.update(a);
                }
              }, d.dispose = function() {
                this.shader.dispose(), this.buffer.dispose(), this.vao.dispose();
              };
            }, { "./shaders/index": 85, "gl-buffer": 78, "gl-vao": 150 }], 85: [function(g, k, x) {
              var e = g("glslify"), r = g("gl-shader"), n = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, offset;
attribute vec4 color;
uniform mat4 model, view, projection;
uniform float capSize;
varying vec4 fragColor;
varying vec3 fragPosition;

void main() {
  vec4 worldPosition  = model * vec4(position, 1.0);
  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);
  gl_Position         = projection * view * worldPosition;
  fragColor           = color;
  fragPosition        = position;
}`]), s = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float opacity;
varying vec3 fragPosition;
varying vec4 fragColor;

void main() {
  if (
    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||
    fragColor.a * opacity == 0.
  ) discard;

  gl_FragColor = opacity * fragColor;
}`]);
              k.exports = function(t) {
                return r(t, n, s, null, [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "offset", type: "vec3" }]);
              };
            }, { "gl-shader": 132, glslify: 231 }], 86: [function(g, k, x) {
              var e = g("gl-texture2d");
              k.exports = function(y, f, _, b) {
                r || (r = y.FRAMEBUFFER_UNSUPPORTED, n = y.FRAMEBUFFER_INCOMPLETE_ATTACHMENT, s = y.FRAMEBUFFER_INCOMPLETE_DIMENSIONS, t = y.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);
                var w = y.getExtension("WEBGL_draw_buffers");
                if (!d && w && function(E, R) {
                  var z = E.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL);
                  d = new Array(z + 1);
                  for (var j = 0; j <= z; ++j) {
                    for (var H = new Array(z), Y = 0; Y < j; ++Y)
                      H[Y] = E.COLOR_ATTACHMENT0 + Y;
                    for (Y = j; Y < z; ++Y)
                      H[Y] = E.NONE;
                    d[j] = H;
                  }
                }(y, w), Array.isArray(f) && (b = _, _ = 0 | f[1], f = 0 | f[0]), typeof f != "number")
                  throw new Error("gl-fbo: Missing shape parameter");
                var T = y.getParameter(y.MAX_RENDERBUFFER_SIZE);
                if (f < 0 || f > T || _ < 0 || _ > T)
                  throw new Error("gl-fbo: Parameters are too large for FBO");
                var L = 1;
                if ("color" in (b = b || {})) {
                  if ((L = Math.max(0 | b.color, 0)) < 0)
                    throw new Error("gl-fbo: Must specify a nonnegative number of colors");
                  if (L > 1) {
                    if (!w)
                      throw new Error("gl-fbo: Multiple draw buffer extension not supported");
                    if (L > y.getParameter(w.MAX_COLOR_ATTACHMENTS_WEBGL))
                      throw new Error("gl-fbo: Context does not support " + L + " draw buffers");
                  }
                }
                var A = y.UNSIGNED_BYTE, I = y.getExtension("OES_texture_float");
                if (b.float && L > 0) {
                  if (!I)
                    throw new Error("gl-fbo: Context does not support floating point textures");
                  A = y.FLOAT;
                } else
                  b.preferFloat && L > 0 && I && (A = y.FLOAT);
                var P = !0;
                "depth" in b && (P = !!b.depth);
                var S = !1;
                return "stencil" in b && (S = !!b.stencil), new p(y, f, _, A, L, P, S, w);
              };
              var r, n, s, t, d = null;
              function u(y) {
                return [y.getParameter(y.FRAMEBUFFER_BINDING), y.getParameter(y.RENDERBUFFER_BINDING), y.getParameter(y.TEXTURE_BINDING_2D)];
              }
              function o(y, f) {
                y.bindFramebuffer(y.FRAMEBUFFER, f[0]), y.bindRenderbuffer(y.RENDERBUFFER, f[1]), y.bindTexture(y.TEXTURE_2D, f[2]);
              }
              function h(y) {
                switch (y) {
                  case r:
                    throw new Error("gl-fbo: Framebuffer unsupported");
                  case n:
                    throw new Error("gl-fbo: Framebuffer incomplete attachment");
                  case s:
                    throw new Error("gl-fbo: Framebuffer incomplete dimensions");
                  case t:
                    throw new Error("gl-fbo: Framebuffer incomplete missing attachment");
                  default:
                    throw new Error("gl-fbo: Framebuffer failed for unspecified reason");
                }
              }
              function l(y, f, _, b, w, T) {
                if (!b)
                  return null;
                var L = e(y, f, _, w, b);
                return L.magFilter = y.NEAREST, L.minFilter = y.NEAREST, L.mipSamples = 1, L.bind(), y.framebufferTexture2D(y.FRAMEBUFFER, T, y.TEXTURE_2D, L.handle, 0), L;
              }
              function i(y, f, _, b, w) {
                var T = y.createRenderbuffer();
                return y.bindRenderbuffer(y.RENDERBUFFER, T), y.renderbufferStorage(y.RENDERBUFFER, b, f, _), y.framebufferRenderbuffer(y.FRAMEBUFFER, w, y.RENDERBUFFER, T), T;
              }
              function p(y, f, _, b, w, T, L, A) {
                this.gl = y, this._shape = [0 | f, 0 | _], this._destroyed = !1, this._ext = A, this.color = new Array(w);
                for (var I = 0; I < w; ++I)
                  this.color[I] = null;
                this._color_rb = null, this.depth = null, this._depth_rb = null, this._colorType = b, this._useDepth = T, this._useStencil = L;
                var P = this, S = [0 | f, 0 | _];
                Object.defineProperties(S, { 0: { get: function() {
                  return P._shape[0];
                }, set: function(E) {
                  return P.width = E;
                } }, 1: { get: function() {
                  return P._shape[1];
                }, set: function(E) {
                  return P.height = E;
                } } }), this._shapeVector = S, function(E) {
                  var R = u(E.gl), z = E.gl, j = E.handle = z.createFramebuffer(), H = E._shape[0], Y = E._shape[1], J = E.color.length, W = E._ext, Z = E._useStencil, re = E._useDepth, V = E._colorType;
                  z.bindFramebuffer(z.FRAMEBUFFER, j);
                  for (var B = 0; B < J; ++B)
                    E.color[B] = l(z, H, Y, V, z.RGBA, z.COLOR_ATTACHMENT0 + B);
                  J === 0 ? (E._color_rb = i(z, H, Y, z.RGBA4, z.COLOR_ATTACHMENT0), W && W.drawBuffersWEBGL(d[0])) : J > 1 && W.drawBuffersWEBGL(d[J]);
                  var U = z.getExtension("WEBGL_depth_texture");
                  U ? Z ? E.depth = l(z, H, Y, U.UNSIGNED_INT_24_8_WEBGL, z.DEPTH_STENCIL, z.DEPTH_STENCIL_ATTACHMENT) : re && (E.depth = l(z, H, Y, z.UNSIGNED_SHORT, z.DEPTH_COMPONENT, z.DEPTH_ATTACHMENT)) : re && Z ? E._depth_rb = i(z, H, Y, z.DEPTH_STENCIL, z.DEPTH_STENCIL_ATTACHMENT) : re ? E._depth_rb = i(z, H, Y, z.DEPTH_COMPONENT16, z.DEPTH_ATTACHMENT) : Z && (E._depth_rb = i(z, H, Y, z.STENCIL_INDEX, z.STENCIL_ATTACHMENT));
                  var ee = z.checkFramebufferStatus(z.FRAMEBUFFER);
                  if (ee !== z.FRAMEBUFFER_COMPLETE) {
                    for (E._destroyed = !0, z.bindFramebuffer(z.FRAMEBUFFER, null), z.deleteFramebuffer(E.handle), E.handle = null, E.depth && (E.depth.dispose(), E.depth = null), E._depth_rb && (z.deleteRenderbuffer(E._depth_rb), E._depth_rb = null), B = 0; B < E.color.length; ++B)
                      E.color[B].dispose(), E.color[B] = null;
                    E._color_rb && (z.deleteRenderbuffer(E._color_rb), E._color_rb = null), o(z, R), h(ee);
                  }
                  o(z, R);
                }(this);
              }
              var c = p.prototype;
              function a(y, f, _) {
                if (y._destroyed)
                  throw new Error("gl-fbo: Can't resize destroyed FBO");
                if (y._shape[0] !== f || y._shape[1] !== _) {
                  var b = y.gl, w = b.getParameter(b.MAX_RENDERBUFFER_SIZE);
                  if (f < 0 || f > w || _ < 0 || _ > w)
                    throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");
                  y._shape[0] = f, y._shape[1] = _;
                  for (var T = u(b), L = 0; L < y.color.length; ++L)
                    y.color[L].shape = y._shape;
                  y._color_rb && (b.bindRenderbuffer(b.RENDERBUFFER, y._color_rb), b.renderbufferStorage(b.RENDERBUFFER, b.RGBA4, y._shape[0], y._shape[1])), y.depth && (y.depth.shape = y._shape), y._depth_rb && (b.bindRenderbuffer(b.RENDERBUFFER, y._depth_rb), y._useDepth && y._useStencil ? b.renderbufferStorage(b.RENDERBUFFER, b.DEPTH_STENCIL, y._shape[0], y._shape[1]) : y._useDepth ? b.renderbufferStorage(b.RENDERBUFFER, b.DEPTH_COMPONENT16, y._shape[0], y._shape[1]) : y._useStencil && b.renderbufferStorage(b.RENDERBUFFER, b.STENCIL_INDEX, y._shape[0], y._shape[1])), b.bindFramebuffer(b.FRAMEBUFFER, y.handle);
                  var A = b.checkFramebufferStatus(b.FRAMEBUFFER);
                  A !== b.FRAMEBUFFER_COMPLETE && (y.dispose(), o(b, T), h(A)), o(b, T);
                }
              }
              Object.defineProperties(c, { shape: { get: function() {
                return this._destroyed ? [0, 0] : this._shapeVector;
              }, set: function(y) {
                if (Array.isArray(y) || (y = [0 | y, 0 | y]), y.length !== 2)
                  throw new Error("gl-fbo: Shape vector must be length 2");
                var f = 0 | y[0], _ = 0 | y[1];
                return a(this, f, _), [f, _];
              }, enumerable: !1 }, width: { get: function() {
                return this._destroyed ? 0 : this._shape[0];
              }, set: function(y) {
                return a(this, y |= 0, this._shape[1]), y;
              }, enumerable: !1 }, height: { get: function() {
                return this._destroyed ? 0 : this._shape[1];
              }, set: function(y) {
                return y |= 0, a(this, this._shape[0], y), y;
              }, enumerable: !1 } }), c.bind = function() {
                if (!this._destroyed) {
                  var y = this.gl;
                  y.bindFramebuffer(y.FRAMEBUFFER, this.handle), y.viewport(0, 0, this._shape[0], this._shape[1]);
                }
              }, c.dispose = function() {
                if (!this._destroyed) {
                  this._destroyed = !0;
                  var y = this.gl;
                  y.deleteFramebuffer(this.handle), this.handle = null, this.depth && (this.depth.dispose(), this.depth = null), this._depth_rb && (y.deleteRenderbuffer(this._depth_rb), this._depth_rb = null);
                  for (var f = 0; f < this.color.length; ++f)
                    this.color[f].dispose(), this.color[f] = null;
                  this._color_rb && (y.deleteRenderbuffer(this._color_rb), this._color_rb = null);
                }
              };
            }, { "gl-texture2d": 146 }], 87: [function(g, k, x) {
              var e = g("sprintf-js").sprintf, r = g("gl-constants/lookup"), n = g("glsl-shader-name"), s = g("add-line-numbers");
              k.exports = function(t, d, u) {
                var o = n(d) || "of unknown name (see npm glsl-shader-name)", h = "unknown type";
                u !== void 0 && (h = u === r.FRAGMENT_SHADER ? "fragment" : "vertex");
                for (var l = e(`Error compiling %s shader %s:
`, h, o), i = e("%s%s", l, t), p = t.split(`
`), c = {}, a = 0; a < p.length; a++) {
                  var y = p[a];
                  if (y !== "" && y !== "\0") {
                    var f = parseInt(y.split(":")[2]);
                    if (isNaN(f))
                      throw new Error(e("Could not parse error: %s", y));
                    c[f] = y;
                  }
                }
                var _ = s(d).split(`
`);
                for (a = 0; a < _.length; a++)
                  if (c[a + 3] || c[a + 2] || c[a + 1]) {
                    var b = _[a];
                    if (l += b + `
`, c[a + 1]) {
                      var w = c[a + 1];
                      w = w.substr(w.split(":", 3).join(":").length + 1).trim(), l += e(`^^^ %s

`, w);
                    }
                  }
                return { long: l.trim(), short: i.trim() };
              };
            }, { "add-line-numbers": 9, "gl-constants/lookup": 83, "glsl-shader-name": 223, "sprintf-js": 301 }], 88: [function(g, k, x) {
              k.exports = function(i, p) {
                var c = i.gl, a = s(c, d.vertex, d.fragment), y = s(c, d.pickVertex, d.pickFragment), f = t(c), _ = t(c), b = t(c), w = t(c), T = new u(i, a, y, f, _, b, w);
                return T.update(p), i.addObject(T), T;
              };
              var e = g("binary-search-bounds"), r = g("iota-array"), n = g("typedarray-pool"), s = g("gl-shader"), t = g("gl-buffer"), d = g("./lib/shaders");
              function u(i, p, c, a, y, f, _) {
                this.plot = i, this.shader = p, this.pickShader = c, this.positionBuffer = a, this.weightBuffer = y, this.colorBuffer = f, this.idBuffer = _, this.xData = [], this.yData = [], this.shape = [0, 0], this.bounds = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.pickOffset = 0;
              }
              var o, h = u.prototype, l = [0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1];
              h.draw = (o = [1, 0, 0, 0, 1, 0, 0, 0, 1], function() {
                var i = this.plot, p = this.shader, c = this.bounds, a = this.numVertices;
                if (!(a <= 0)) {
                  var y = i.gl, f = i.dataBox, _ = c[2] - c[0], b = c[3] - c[1], w = f[2] - f[0], T = f[3] - f[1];
                  o[0] = 2 * _ / w, o[4] = 2 * b / T, o[6] = 2 * (c[0] - f[0]) / w - 1, o[7] = 2 * (c[1] - f[1]) / T - 1, p.bind();
                  var L = p.uniforms;
                  L.viewTransform = o, L.shape = this.shape;
                  var A = p.attributes;
                  this.positionBuffer.bind(), A.position.pointer(), this.weightBuffer.bind(), A.weight.pointer(y.UNSIGNED_BYTE, !1), this.colorBuffer.bind(), A.color.pointer(y.UNSIGNED_BYTE, !0), y.drawArrays(y.TRIANGLES, 0, a);
                }
              }), h.drawPick = function() {
                var i = [1, 0, 0, 0, 1, 0, 0, 0, 1], p = [0, 0, 0, 0];
                return function(c) {
                  var a = this.plot, y = this.pickShader, f = this.bounds, _ = this.numVertices;
                  if (!(_ <= 0)) {
                    var b = a.gl, w = a.dataBox, T = f[2] - f[0], L = f[3] - f[1], A = w[2] - w[0], I = w[3] - w[1];
                    i[0] = 2 * T / A, i[4] = 2 * L / I, i[6] = 2 * (f[0] - w[0]) / A - 1, i[7] = 2 * (f[1] - w[1]) / I - 1;
                    for (var P = 0; P < 4; ++P)
                      p[P] = c >> 8 * P & 255;
                    this.pickOffset = c, y.bind();
                    var S = y.uniforms;
                    S.viewTransform = i, S.pickOffset = p, S.shape = this.shape;
                    var E = y.attributes;
                    return this.positionBuffer.bind(), E.position.pointer(), this.weightBuffer.bind(), E.weight.pointer(b.UNSIGNED_BYTE, !1), this.idBuffer.bind(), E.pickId.pointer(b.UNSIGNED_BYTE, !1), b.drawArrays(b.TRIANGLES, 0, _), c + this.shape[0] * this.shape[1];
                  }
                };
              }(), h.pick = function(i, p, c) {
                var a = this.pickOffset, y = this.shape[0] * this.shape[1];
                if (c < a || c >= a + y)
                  return null;
                var f = c - a, _ = this.xData, b = this.yData;
                return { object: this, pointId: f, dataCoord: [_[f % this.shape[0]], b[f / this.shape[0] | 0]] };
              }, h.update = function(i) {
                var p = (i = i || {}).shape || [0, 0], c = i.x || r(p[0]), a = i.y || r(p[1]), y = i.z || new Float32Array(p[0] * p[1]), f = i.zsmooth !== !1;
                this.xData = c, this.yData = a;
                var _, b, w, T, L = i.colorLevels || [0], A = i.colorValues || [0, 0, 0, 1], I = L.length, P = this.bounds;
                f ? (_ = P[0] = c[0], b = P[1] = a[0], w = P[2] = c[c.length - 1], T = P[3] = a[a.length - 1]) : (_ = P[0] = c[0] + (c[1] - c[0]) / 2, b = P[1] = a[0] + (a[1] - a[0]) / 2, w = P[2] = c[c.length - 1] + (c[c.length - 1] - c[c.length - 2]) / 2, T = P[3] = a[a.length - 1] + (a[a.length - 1] - a[a.length - 2]) / 2);
                var S = 1 / (w - _), E = 1 / (T - b), R = p[0], z = p[1];
                this.shape = [R, z];
                var j = (f ? (R - 1) * (z - 1) : R * z) * (l.length >>> 1);
                this.numVertices = j;
                for (var H = n.mallocUint8(4 * j), Y = n.mallocFloat32(2 * j), J = n.mallocUint8(2 * j), W = n.mallocUint32(j), Z = 0, re = f ? R - 1 : R, V = f ? z - 1 : z, B = 0; B < V; ++B) {
                  var U, ee;
                  f ? (U = E * (a[B] - b), ee = E * (a[B + 1] - b)) : (U = B < z - 1 ? E * (a[B] - (a[B + 1] - a[B]) / 2 - b) : E * (a[B] - (a[B] - a[B - 1]) / 2 - b), ee = B < z - 1 ? E * (a[B] + (a[B + 1] - a[B]) / 2 - b) : E * (a[B] + (a[B] - a[B - 1]) / 2 - b));
                  for (var N = 0; N < re; ++N) {
                    var K, X;
                    f ? (K = S * (c[N] - _), X = S * (c[N + 1] - _)) : (K = N < R - 1 ? S * (c[N] - (c[N + 1] - c[N]) / 2 - _) : S * (c[N] - (c[N] - c[N - 1]) / 2 - _), X = N < R - 1 ? S * (c[N] + (c[N + 1] - c[N]) / 2 - _) : S * (c[N] + (c[N] - c[N - 1]) / 2 - _));
                    for (var te = 0; te < l.length; te += 2) {
                      var ie, le, oe, ve, ue = l[te], ye = l[te + 1], Ae = y[f ? (B + ye) * R + (N + ue) : B * R + N], pe = e.le(L, Ae);
                      if (pe < 0)
                        ie = A[0], le = A[1], oe = A[2], ve = A[3];
                      else if (pe === I - 1)
                        ie = A[4 * I - 4], le = A[4 * I - 3], oe = A[4 * I - 2], ve = A[4 * I - 1];
                      else {
                        var ge = (Ae - L[pe]) / (L[pe + 1] - L[pe]), we = 1 - ge, se = 4 * pe, de = 4 * (pe + 1);
                        ie = we * A[se] + ge * A[de], le = we * A[se + 1] + ge * A[de + 1], oe = we * A[se + 2] + ge * A[de + 2], ve = we * A[se + 3] + ge * A[de + 3];
                      }
                      H[4 * Z] = 255 * ie, H[4 * Z + 1] = 255 * le, H[4 * Z + 2] = 255 * oe, H[4 * Z + 3] = 255 * ve, Y[2 * Z] = 0.5 * K + 0.5 * X, Y[2 * Z + 1] = 0.5 * U + 0.5 * ee, J[2 * Z] = ue, J[2 * Z + 1] = ye, W[Z] = B * R + N, Z += 1;
                    }
                  }
                }
                this.positionBuffer.update(Y), this.weightBuffer.update(J), this.colorBuffer.update(H), this.idBuffer.update(W), n.free(Y), n.free(H), n.free(J), n.free(W);
              }, h.dispose = function() {
                this.shader.dispose(), this.pickShader.dispose(), this.positionBuffer.dispose(), this.weightBuffer.dispose(), this.colorBuffer.dispose(), this.idBuffer.dispose(), this.plot.removeObject(this);
              };
            }, { "./lib/shaders": 89, "binary-search-bounds": 31, "gl-buffer": 78, "gl-shader": 132, "iota-array": 235, "typedarray-pool": 308 }], 89: [function(g, k, x) {
              var e = g("glslify");
              k.exports = { fragment: e([`precision lowp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);
}
`]), vertex: e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;
attribute vec4 color;
attribute vec2 weight;

uniform vec2 shape;
uniform mat3 viewTransform;

varying vec4 fragColor;

void main() {
  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
  fragColor = color;
  gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]), pickFragment: e([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragId;
varying vec2 vWeight;

uniform vec2 shape;
uniform vec4 pickOffset;

void main() {
  vec2 d = step(.5, vWeight);
  vec4 id = fragId + pickOffset;
  id.x += d.x + d.y*shape.x;

  id.y += floor(id.x / 256.0);
  id.x -= floor(id.x / 256.0) * 256.0;

  id.z += floor(id.y / 256.0);
  id.y -= floor(id.y / 256.0) * 256.0;

  id.w += floor(id.z / 256.0);
  id.z -= floor(id.z / 256.0) * 256.0;

  gl_FragColor = id/255.;
}
`]), pickVertex: e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;
attribute vec4 pickId;
attribute vec2 weight;

uniform vec2 shape;
uniform mat3 viewTransform;

varying vec4 fragId;
varying vec2 vWeight;

void main() {
  vWeight = weight;

  fragId = pickId;

  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
  gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]) };
            }, { glslify: 231 }], 90: [function(g, k, x) {
              var e = g("glslify"), r = g("gl-shader"), n = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;

uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;

varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;

vec4 project(vec3 p) {
  return projection * view * model * vec4(p, 1.0);
}

void main() {
  vec4 startPoint = project(position);
  vec4 endPoint   = project(nextPosition);

  vec2 A = startPoint.xy / startPoint.w;
  vec2 B =   endPoint.xy /   endPoint.w;

  float clipAngle = atan(
    (B.y - A.y) * screenShape.y,
    (B.x - A.x) * screenShape.x
  );

  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
    sin(clipAngle),
    -cos(clipAngle)
  ) / screenShape;

  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);

  worldPosition = position;
  pixelArcLength = arcLength;
  fragColor = color;
}
`]), s = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3      clipBounds[2];
uniform sampler2D dashTexture;
uniform float     dashScale;
uniform float     opacity;

varying vec3    worldPosition;
varying float   pixelArcLength;
varying vec4    fragColor;

void main() {
  if (
    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||
    fragColor.a * opacity == 0.
  ) discard;

  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;
  if(dashWeight < 0.5) {
    discard;
  }
  gl_FragColor = fragColor * opacity;
}
`]), t = e([`precision highp float;
#define GLSLIFY 1

#define FLOAT_MAX  1.70141184e38
#define FLOAT_MIN  1.17549435e-38

// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl
vec4 packFloat(float v) {
  float av = abs(v);

  //Handle special cases
  if(av < FLOAT_MIN) {
    return vec4(0.0, 0.0, 0.0, 0.0);
  } else if(v > FLOAT_MAX) {
    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;
  } else if(v < -FLOAT_MAX) {
    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;
  }

  vec4 c = vec4(0,0,0,0);

  //Compute exponent and mantissa
  float e = floor(log2(av));
  float m = av * pow(2.0, -e) - 1.0;

  //Unpack mantissa
  c[1] = floor(128.0 * m);
  m -= c[1] / 128.0;
  c[2] = floor(32768.0 * m);
  m -= c[2] / 32768.0;
  c[3] = floor(8388608.0 * m);

  //Unpack exponent
  float ebias = e + 127.0;
  c[0] = floor(ebias / 2.0);
  ebias -= c[0] * 2.0;
  c[1] += floor(ebias) * 128.0;

  //Unpack sign bit
  c[0] += 128.0 * step(0.0, -v);

  //Scale back to range
  return c / 255.0;
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform float pickId;
uniform vec3 clipBounds[2];

varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;

  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);
}`]), d = [{ name: "position", type: "vec3" }, { name: "nextPosition", type: "vec3" }, { name: "arcLength", type: "float" }, { name: "lineWidth", type: "float" }, { name: "color", type: "vec4" }];
              x.createShader = function(u) {
                return r(u, n, s, null, d);
              }, x.createPickShader = function(u) {
                return r(u, n, t, null, d);
              };
            }, { "gl-shader": 132, glslify: 231 }], 91: [function(g, k, x) {
              k.exports = function(_) {
                var b = _.gl || _.scene && _.scene.gl, w = h(b);
                w.attributes.position.location = 0, w.attributes.nextPosition.location = 1, w.attributes.arcLength.location = 2, w.attributes.lineWidth.location = 3, w.attributes.color.location = 4;
                var T = l(b);
                T.attributes.position.location = 0, T.attributes.nextPosition.location = 1, T.attributes.arcLength.location = 2, T.attributes.lineWidth.location = 3, T.attributes.color.location = 4;
                for (var L = e(b), A = r(b, [{ buffer: L, size: 3, offset: 0, stride: 48 }, { buffer: L, size: 3, offset: 12, stride: 48 }, { buffer: L, size: 1, offset: 24, stride: 48 }, { buffer: L, size: 1, offset: 28, stride: 48 }, { buffer: L, size: 4, offset: 32, stride: 48 }]), I = u(new Array(1024), [256, 1, 4]), P = 0; P < 1024; ++P)
                  I.data[P] = 255;
                var S = n(b, I);
                S.wrap = b.REPEAT;
                var E = new y(b, w, T, L, A, S);
                return E.update(_), E;
              };
              var e = g("gl-buffer"), r = g("gl-vao"), n = g("gl-texture2d"), s = new Uint8Array(4), t = new Float32Array(s.buffer), d = g("binary-search-bounds"), u = g("ndarray"), o = g("./lib/shaders"), h = o.createShader, l = o.createPickShader, i = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
              function p(_, b) {
                for (var w = 0, T = 0; T < 3; ++T) {
                  var L = _[T] - b[T];
                  w += L * L;
                }
                return Math.sqrt(w);
              }
              function c(_) {
                for (var b = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], w = 0; w < 3; ++w)
                  b[0][w] = Math.max(_[0][w], b[0][w]), b[1][w] = Math.min(_[1][w], b[1][w]);
                return b;
              }
              function a(_, b, w, T) {
                this.arcLength = _, this.position = b, this.index = w, this.dataCoordinate = T;
              }
              function y(_, b, w, T, L, A) {
                this.gl = _, this.shader = b, this.pickShader = w, this.buffer = T, this.vao = L, this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.points = [], this.arcLength = [], this.vertexCount = 0, this.bounds = [[0, 0, 0], [0, 0, 0]], this.pickId = 0, this.lineWidth = 1, this.texture = A, this.dashScale = 1, this.opacity = 1, this.hasAlpha = !1, this.dirty = !0, this.pixelRatio = 1;
              }
              var f = y.prototype;
              f.isTransparent = function() {
                return this.hasAlpha;
              }, f.isOpaque = function() {
                return !this.hasAlpha;
              }, f.pickSlots = 1, f.setPickBase = function(_) {
                this.pickId = _;
              }, f.drawTransparent = f.draw = function(_) {
                if (this.vertexCount) {
                  var b = this.gl, w = this.shader, T = this.vao;
                  w.bind(), w.uniforms = { model: _.model || i, view: _.view || i, projection: _.projection || i, clipBounds: c(this.clipBounds), dashTexture: this.texture.bind(), dashScale: this.dashScale / this.arcLength[this.arcLength.length - 1], opacity: this.opacity, screenShape: [b.drawingBufferWidth, b.drawingBufferHeight], pixelRatio: this.pixelRatio }, T.bind(), T.draw(b.TRIANGLE_STRIP, this.vertexCount), T.unbind();
                }
              }, f.drawPick = function(_) {
                if (this.vertexCount) {
                  var b = this.gl, w = this.pickShader, T = this.vao;
                  w.bind(), w.uniforms = { model: _.model || i, view: _.view || i, projection: _.projection || i, pickId: this.pickId, clipBounds: c(this.clipBounds), screenShape: [b.drawingBufferWidth, b.drawingBufferHeight], pixelRatio: this.pixelRatio }, T.bind(), T.draw(b.TRIANGLE_STRIP, this.vertexCount), T.unbind();
                }
              }, f.update = function(_) {
                var b, w;
                this.dirty = !0;
                var T = !!_.connectGaps;
                "dashScale" in _ && (this.dashScale = _.dashScale), this.hasAlpha = !1, "opacity" in _ && (this.opacity = +_.opacity, this.opacity < 1 && (this.hasAlpha = !0));
                var L = [], A = [], I = [], P = 0, S = 0, E = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], R = _.position || _.positions;
                if (R) {
                  var z = _.color || _.colors || [0, 0, 0, 1], j = _.lineWidth || 1, H = !1;
                  e:
                    for (b = 1; b < R.length; ++b) {
                      var Y, J, W, Z = R[b - 1], re = R[b];
                      for (A.push(P), I.push(Z.slice()), w = 0; w < 3; ++w) {
                        if (isNaN(Z[w]) || isNaN(re[w]) || !isFinite(Z[w]) || !isFinite(re[w])) {
                          if (!T && L.length > 0) {
                            for (var V = 0; V < 24; ++V)
                              L.push(L[L.length - 12]);
                            S += 2, H = !0;
                          }
                          continue e;
                        }
                        E[0][w] = Math.min(E[0][w], Z[w], re[w]), E[1][w] = Math.max(E[1][w], Z[w], re[w]);
                      }
                      Array.isArray(z[0]) ? (Y = z.length > b - 1 ? z[b - 1] : z.length > 0 ? z[z.length - 1] : [0, 0, 0, 1], J = z.length > b ? z[b] : z.length > 0 ? z[z.length - 1] : [0, 0, 0, 1]) : Y = J = z, Y.length === 3 && (Y = [Y[0], Y[1], Y[2], 1]), J.length === 3 && (J = [J[0], J[1], J[2], 1]), !this.hasAlpha && Y[3] < 1 && (this.hasAlpha = !0), W = Array.isArray(j) ? j.length > b - 1 ? j[b - 1] : j.length > 0 ? j[j.length - 1] : [0, 0, 0, 1] : j;
                      var B = P;
                      if (P += p(Z, re), H) {
                        for (w = 0; w < 2; ++w)
                          L.push(Z[0], Z[1], Z[2], re[0], re[1], re[2], B, W, Y[0], Y[1], Y[2], Y[3]);
                        S += 2, H = !1;
                      }
                      L.push(Z[0], Z[1], Z[2], re[0], re[1], re[2], B, W, Y[0], Y[1], Y[2], Y[3], Z[0], Z[1], Z[2], re[0], re[1], re[2], B, -W, Y[0], Y[1], Y[2], Y[3], re[0], re[1], re[2], Z[0], Z[1], Z[2], P, -W, J[0], J[1], J[2], J[3], re[0], re[1], re[2], Z[0], Z[1], Z[2], P, W, J[0], J[1], J[2], J[3]), S += 4;
                    }
                }
                if (this.buffer.update(L), A.push(P), I.push(R[R.length - 1].slice()), this.bounds = E, this.vertexCount = S, this.points = I, this.arcLength = A, "dashes" in _) {
                  var U = _.dashes.slice();
                  for (U.unshift(0), b = 1; b < U.length; ++b)
                    U[b] = U[b - 1] + U[b];
                  var ee = u(new Array(1024), [256, 1, 4]);
                  for (b = 0; b < 256; ++b) {
                    for (w = 0; w < 4; ++w)
                      ee.set(b, 0, w, 0);
                    1 & d.le(U, U[U.length - 1] * b / 255) ? ee.set(b, 0, 0, 0) : ee.set(b, 0, 0, 255);
                  }
                  this.texture.setPixels(ee);
                }
              }, f.dispose = function() {
                this.shader.dispose(), this.vao.dispose(), this.buffer.dispose();
              }, f.pick = function(_) {
                if (!_ || _.id !== this.pickId)
                  return null;
                var b = function(R, z, j, H) {
                  return s[0] = H, s[1] = j, s[2] = z, s[3] = R, t[0];
                }(_.value[0], _.value[1], _.value[2], 0), w = d.le(this.arcLength, b);
                if (w < 0)
                  return null;
                if (w === this.arcLength.length - 1)
                  return new a(this.arcLength[this.arcLength.length - 1], this.points[this.points.length - 1].slice(), w);
                for (var T = this.points[w], L = this.points[Math.min(w + 1, this.points.length - 1)], A = (b - this.arcLength[w]) / (this.arcLength[w + 1] - this.arcLength[w]), I = 1 - A, P = [0, 0, 0], S = 0; S < 3; ++S)
                  P[S] = I * T[S] + A * L[S];
                var E = Math.min(A < 0.5 ? w : w + 1, this.points.length - 1);
                return new a(b, P, E, this.points[E]);
              };
            }, { "./lib/shaders": 90, "binary-search-bounds": 31, "gl-buffer": 78, "gl-texture2d": 146, "gl-vao": 150, ndarray: 259 }], 92: [function(g, k, x) {
              k.exports = function(e) {
                var r = new Float32Array(16);
                return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
              };
            }, {}], 93: [function(g, k, x) {
              k.exports = function() {
                var e = new Float32Array(16);
                return e[0] = 1, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = 1, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = 1, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, e;
              };
            }, {}], 94: [function(g, k, x) {
              k.exports = function(e) {
                var r = e[0], n = e[1], s = e[2], t = e[3], d = e[4], u = e[5], o = e[6], h = e[7], l = e[8], i = e[9], p = e[10], c = e[11], a = e[12], y = e[13], f = e[14], _ = e[15];
                return (r * u - n * d) * (p * _ - c * f) - (r * o - s * d) * (i * _ - c * y) + (r * h - t * d) * (i * f - p * y) + (n * o - s * u) * (l * _ - c * a) - (n * h - t * u) * (l * f - p * a) + (s * h - t * o) * (l * y - i * a);
              };
            }, {}], 95: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0], s = r[1], t = r[2], d = r[3], u = n + n, o = s + s, h = t + t, l = n * u, i = s * u, p = s * o, c = t * u, a = t * o, y = t * h, f = d * u, _ = d * o, b = d * h;
                return e[0] = 1 - p - y, e[1] = i + b, e[2] = c - _, e[3] = 0, e[4] = i - b, e[5] = 1 - l - y, e[6] = a + f, e[7] = 0, e[8] = c + _, e[9] = a - f, e[10] = 1 - l - p, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, e;
              };
            }, {}], 96: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = r[3], o = s + s, h = t + t, l = d + d, i = s * o, p = s * h, c = s * l, a = t * h, y = t * l, f = d * l, _ = u * o, b = u * h, w = u * l;
                return e[0] = 1 - (a + f), e[1] = p + w, e[2] = c - b, e[3] = 0, e[4] = p - w, e[5] = 1 - (i + f), e[6] = y + _, e[7] = 0, e[8] = c + b, e[9] = y - _, e[10] = 1 - (i + a), e[11] = 0, e[12] = n[0], e[13] = n[1], e[14] = n[2], e[15] = 1, e;
              };
            }, {}], 97: [function(g, k, x) {
              k.exports = function(e) {
                return e[0] = 1, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = 1, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = 1, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, e;
              };
            }, {}], 98: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0], s = r[1], t = r[2], d = r[3], u = r[4], o = r[5], h = r[6], l = r[7], i = r[8], p = r[9], c = r[10], a = r[11], y = r[12], f = r[13], _ = r[14], b = r[15], w = n * o - s * u, T = n * h - t * u, L = n * l - d * u, A = s * h - t * o, I = s * l - d * o, P = t * l - d * h, S = i * f - p * y, E = i * _ - c * y, R = i * b - a * y, z = p * _ - c * f, j = p * b - a * f, H = c * b - a * _, Y = w * H - T * j + L * z + A * R - I * E + P * S;
                return Y ? (Y = 1 / Y, e[0] = (o * H - h * j + l * z) * Y, e[1] = (t * j - s * H - d * z) * Y, e[2] = (f * P - _ * I + b * A) * Y, e[3] = (c * I - p * P - a * A) * Y, e[4] = (h * R - u * H - l * E) * Y, e[5] = (n * H - t * R + d * E) * Y, e[6] = (_ * L - y * P - b * T) * Y, e[7] = (i * P - c * L + a * T) * Y, e[8] = (u * j - o * R + l * S) * Y, e[9] = (s * R - n * j - d * S) * Y, e[10] = (y * I - f * L + b * w) * Y, e[11] = (p * L - i * I - a * w) * Y, e[12] = (o * E - u * z - h * S) * Y, e[13] = (n * z - s * E + t * S) * Y, e[14] = (f * T - y * A - _ * w) * Y, e[15] = (i * A - p * T + c * w) * Y, e) : null;
              };
            }, {}], 99: [function(g, k, x) {
              var e = g("./identity");
              k.exports = function(r, n, s, t) {
                var d, u, o, h, l, i, p, c, a, y, f = n[0], _ = n[1], b = n[2], w = t[0], T = t[1], L = t[2], A = s[0], I = s[1], P = s[2];
                return Math.abs(f - A) < 1e-6 && Math.abs(_ - I) < 1e-6 && Math.abs(b - P) < 1e-6 ? e(r) : (p = f - A, c = _ - I, a = b - P, y = 1 / Math.sqrt(p * p + c * c + a * a), d = T * (a *= y) - L * (c *= y), u = L * (p *= y) - w * a, o = w * c - T * p, (y = Math.sqrt(d * d + u * u + o * o)) ? (d *= y = 1 / y, u *= y, o *= y) : (d = 0, u = 0, o = 0), h = c * o - a * u, l = a * d - p * o, i = p * u - c * d, (y = Math.sqrt(h * h + l * l + i * i)) ? (h *= y = 1 / y, l *= y, i *= y) : (h = 0, l = 0, i = 0), r[0] = d, r[1] = h, r[2] = p, r[3] = 0, r[4] = u, r[5] = l, r[6] = c, r[7] = 0, r[8] = o, r[9] = i, r[10] = a, r[11] = 0, r[12] = -(d * f + u * _ + o * b), r[13] = -(h * f + l * _ + i * b), r[14] = -(p * f + c * _ + a * b), r[15] = 1, r);
              };
            }, { "./identity": 97 }], 100: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = r[3], o = r[4], h = r[5], l = r[6], i = r[7], p = r[8], c = r[9], a = r[10], y = r[11], f = r[12], _ = r[13], b = r[14], w = r[15], T = n[0], L = n[1], A = n[2], I = n[3];
                return e[0] = T * s + L * o + A * p + I * f, e[1] = T * t + L * h + A * c + I * _, e[2] = T * d + L * l + A * a + I * b, e[3] = T * u + L * i + A * y + I * w, T = n[4], L = n[5], A = n[6], I = n[7], e[4] = T * s + L * o + A * p + I * f, e[5] = T * t + L * h + A * c + I * _, e[6] = T * d + L * l + A * a + I * b, e[7] = T * u + L * i + A * y + I * w, T = n[8], L = n[9], A = n[10], I = n[11], e[8] = T * s + L * o + A * p + I * f, e[9] = T * t + L * h + A * c + I * _, e[10] = T * d + L * l + A * a + I * b, e[11] = T * u + L * i + A * y + I * w, T = n[12], L = n[13], A = n[14], I = n[15], e[12] = T * s + L * o + A * p + I * f, e[13] = T * t + L * h + A * c + I * _, e[14] = T * d + L * l + A * a + I * b, e[15] = T * u + L * i + A * y + I * w, e;
              };
            }, {}], 101: [function(g, k, x) {
              k.exports = function(e, r, n, s, t, d, u) {
                var o = 1 / (r - n), h = 1 / (s - t), l = 1 / (d - u);
                return e[0] = -2 * o, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = -2 * h, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = 2 * l, e[11] = 0, e[12] = (r + n) * o, e[13] = (t + s) * h, e[14] = (u + d) * l, e[15] = 1, e;
              };
            }, {}], 102: [function(g, k, x) {
              k.exports = function(e, r, n, s, t) {
                var d = 1 / Math.tan(r / 2), u = 1 / (s - t);
                return e[0] = d / n, e[1] = 0, e[2] = 0, e[3] = 0, e[4] = 0, e[5] = d, e[6] = 0, e[7] = 0, e[8] = 0, e[9] = 0, e[10] = (t + s) * u, e[11] = -1, e[12] = 0, e[13] = 0, e[14] = 2 * t * s * u, e[15] = 0, e;
              };
            }, {}], 103: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t, d, u, o, h, l, i, p, c, a, y, f, _, b, w, T, L, A, I, P, S, E, R, z, j = s[0], H = s[1], Y = s[2], J = Math.sqrt(j * j + H * H + Y * Y);
                return Math.abs(J) < 1e-6 ? null : (j *= J = 1 / J, H *= J, Y *= J, t = Math.sin(n), d = Math.cos(n), u = 1 - d, o = r[0], h = r[1], l = r[2], i = r[3], p = r[4], c = r[5], a = r[6], y = r[7], f = r[8], _ = r[9], b = r[10], w = r[11], T = j * j * u + d, L = H * j * u + Y * t, A = Y * j * u - H * t, I = j * H * u - Y * t, P = H * H * u + d, S = Y * H * u + j * t, E = j * Y * u + H * t, R = H * Y * u - j * t, z = Y * Y * u + d, e[0] = o * T + p * L + f * A, e[1] = h * T + c * L + _ * A, e[2] = l * T + a * L + b * A, e[3] = i * T + y * L + w * A, e[4] = o * I + p * P + f * S, e[5] = h * I + c * P + _ * S, e[6] = l * I + a * P + b * S, e[7] = i * I + y * P + w * S, e[8] = o * E + p * R + f * z, e[9] = h * E + c * R + _ * z, e[10] = l * E + a * R + b * z, e[11] = i * E + y * R + w * z, r !== e && (e[12] = r[12], e[13] = r[13], e[14] = r[14], e[15] = r[15]), e);
              };
            }, {}], 104: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = Math.sin(n), t = Math.cos(n), d = r[4], u = r[5], o = r[6], h = r[7], l = r[8], i = r[9], p = r[10], c = r[11];
                return r !== e && (e[0] = r[0], e[1] = r[1], e[2] = r[2], e[3] = r[3], e[12] = r[12], e[13] = r[13], e[14] = r[14], e[15] = r[15]), e[4] = d * t + l * s, e[5] = u * t + i * s, e[6] = o * t + p * s, e[7] = h * t + c * s, e[8] = l * t - d * s, e[9] = i * t - u * s, e[10] = p * t - o * s, e[11] = c * t - h * s, e;
              };
            }, {}], 105: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = Math.sin(n), t = Math.cos(n), d = r[0], u = r[1], o = r[2], h = r[3], l = r[8], i = r[9], p = r[10], c = r[11];
                return r !== e && (e[4] = r[4], e[5] = r[5], e[6] = r[6], e[7] = r[7], e[12] = r[12], e[13] = r[13], e[14] = r[14], e[15] = r[15]), e[0] = d * t - l * s, e[1] = u * t - i * s, e[2] = o * t - p * s, e[3] = h * t - c * s, e[8] = d * s + l * t, e[9] = u * s + i * t, e[10] = o * s + p * t, e[11] = h * s + c * t, e;
              };
            }, {}], 106: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = Math.sin(n), t = Math.cos(n), d = r[0], u = r[1], o = r[2], h = r[3], l = r[4], i = r[5], p = r[6], c = r[7];
                return r !== e && (e[8] = r[8], e[9] = r[9], e[10] = r[10], e[11] = r[11], e[12] = r[12], e[13] = r[13], e[14] = r[14], e[15] = r[15]), e[0] = d * t + l * s, e[1] = u * t + i * s, e[2] = o * t + p * s, e[3] = h * t + c * s, e[4] = l * t - d * s, e[5] = i * t - u * s, e[6] = p * t - o * s, e[7] = c * t - h * s, e;
              };
            }, {}], 107: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = n[0], t = n[1], d = n[2];
                return e[0] = r[0] * s, e[1] = r[1] * s, e[2] = r[2] * s, e[3] = r[3] * s, e[4] = r[4] * t, e[5] = r[5] * t, e[6] = r[6] * t, e[7] = r[7] * t, e[8] = r[8] * d, e[9] = r[9] * d, e[10] = r[10] * d, e[11] = r[11] * d, e[12] = r[12], e[13] = r[13], e[14] = r[14], e[15] = r[15], e;
              };
            }, {}], 108: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s, t, d, u, o, h, l, i, p, c, a, y, f = n[0], _ = n[1], b = n[2];
                return r === e ? (e[12] = r[0] * f + r[4] * _ + r[8] * b + r[12], e[13] = r[1] * f + r[5] * _ + r[9] * b + r[13], e[14] = r[2] * f + r[6] * _ + r[10] * b + r[14], e[15] = r[3] * f + r[7] * _ + r[11] * b + r[15]) : (s = r[0], t = r[1], d = r[2], u = r[3], o = r[4], h = r[5], l = r[6], i = r[7], p = r[8], c = r[9], a = r[10], y = r[11], e[0] = s, e[1] = t, e[2] = d, e[3] = u, e[4] = o, e[5] = h, e[6] = l, e[7] = i, e[8] = p, e[9] = c, e[10] = a, e[11] = y, e[12] = s * f + o * _ + p * b + r[12], e[13] = t * f + h * _ + c * b + r[13], e[14] = d * f + l * _ + a * b + r[14], e[15] = u * f + i * _ + y * b + r[15]), e;
              };
            }, {}], 109: [function(g, k, x) {
              k.exports = function(e, r) {
                if (e === r) {
                  var n = r[1], s = r[2], t = r[3], d = r[6], u = r[7], o = r[11];
                  e[1] = r[4], e[2] = r[8], e[3] = r[12], e[4] = n, e[6] = r[9], e[7] = r[13], e[8] = s, e[9] = d, e[11] = r[14], e[12] = t, e[13] = u, e[14] = o;
                } else
                  e[0] = r[0], e[1] = r[4], e[2] = r[8], e[3] = r[12], e[4] = r[1], e[5] = r[5], e[6] = r[9], e[7] = r[13], e[8] = r[2], e[9] = r[6], e[10] = r[10], e[11] = r[14], e[12] = r[3], e[13] = r[7], e[14] = r[11], e[15] = r[15];
                return e;
              };
            }, {}], 110: [function(g, k, x) {
              var e = g("barycentric"), r = g("polytope-closest-point/lib/closest_point_2d.js");
              function n(d, u) {
                for (var o = [0, 0, 0, 0], h = 0; h < 4; ++h)
                  for (var l = 0; l < 4; ++l)
                    o[l] += d[4 * h + l] * u[h];
                return o;
              }
              function s(d, u, o, h, l) {
                for (var i = n(h, n(o, n(u, [d[0], d[1], d[2], 1]))), p = 0; p < 3; ++p)
                  i[p] /= i[3];
                return [0.5 * l[0] * (1 + i[0]), 0.5 * l[1] * (1 - i[1])];
              }
              function t(d, u) {
                for (var o = [0, 0, 0], h = 0; h < d.length; ++h)
                  for (var l = d[h], i = u[h], p = 0; p < 3; ++p)
                    o[p] += i * l[p];
                return o;
              }
              k.exports = function(d, u, o, h, l, i) {
                if (d.length === 1)
                  return [0, d[0].slice()];
                for (var p = new Array(d.length), c = 0; c < d.length; ++c)
                  p[c] = s(d[c], o, h, l, i);
                var a = 0, y = 1 / 0;
                for (c = 0; c < p.length; ++c) {
                  for (var f = 0, _ = 0; _ < 2; ++_)
                    f += Math.pow(p[c][_] - u[_], 2);
                  f < y && (y = f, a = c);
                }
                var b = function(T, L) {
                  if (T.length === 2) {
                    for (var A = 0, I = 0, P = 0; P < 2; ++P)
                      A += Math.pow(L[P] - T[0][P], 2), I += Math.pow(L[P] - T[1][P], 2);
                    return A = Math.sqrt(A), I = Math.sqrt(I), A + I < 1e-6 ? [1, 0] : [I / (A + I), A / (I + A)];
                  }
                  if (T.length === 3) {
                    var S = [0, 0];
                    return r(T[0], T[1], T[2], L, S), e(T, S);
                  }
                  return [];
                }(p, u), w = 0;
                for (c = 0; c < 3; ++c) {
                  if (b[c] < -1e-3 || b[c] > 1.0001)
                    return null;
                  w += b[c];
                }
                return Math.abs(w - 1) > 1e-3 ? null : [a, t(d, b), b];
              };
            }, { barycentric: 14, "polytope-closest-point/lib/closest_point_2d.js": 270 }], 111: [function(g, k, x) {
              var e = g("glslify"), r = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, normal;
attribute vec4 color;
attribute vec2 uv;

uniform mat4 model
           , view
           , projection
           , inverseModel;
uniform vec3 eyePosition
           , lightPosition;

varying vec3 f_normal
           , f_lightDirection
           , f_eyeDirection
           , f_data;
varying vec4 f_color;
varying vec2 f_uv;

vec4 project(vec3 p) {
  return projection * view * model * vec4(p, 1.0);
}

void main() {
  gl_Position      = project(position);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * vec4(position , 1.0);
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  f_color          = color;
  f_data           = position;
  f_uv             = uv;
}
`]), n = e([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness
            , fresnel
            , kambient
            , kdiffuse
            , kspecular;
uniform sampler2D texture;

varying vec3 f_normal
           , f_lightDirection
           , f_eyeDirection
           , f_data;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (f_color.a == 0.0 ||
    outOfRange(clipBounds[0], clipBounds[1], f_data)
  ) discard;

  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d

  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * f_color.a;
}
`]), s = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;

uniform mat4 model, view, projection;

varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;

void main() {
  gl_Position = projection * view * model * vec4(position, 1.0);
  f_color = color;
  f_data  = position;
  f_uv    = uv;
}`]), t = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform sampler2D texture;
uniform float opacity;

varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;

  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]), d = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
attribute float pointSize;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);
  } else {
    gl_Position = projection * view * model * vec4(position, 1.0);
  }
  gl_PointSize = pointSize;
  f_color = color;
  f_uv = uv;
}`]), u = e([`precision highp float;
#define GLSLIFY 1

uniform sampler2D texture;
uniform float opacity;

varying vec4 f_color;
varying vec2 f_uv;

void main() {
  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);
  if(dot(pointR, pointR) > 0.25) {
    discard;
  }
  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]), o = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec4 id;

uniform mat4 model, view, projection;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  gl_Position = projection * view * model * vec4(position, 1.0);
  f_id        = id;
  f_position  = position;
}`]), h = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]), l = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3  position;
attribute float pointSize;
attribute vec4  id;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
  } else {
    gl_Position  = projection * view * model * vec4(position, 1.0);
    gl_PointSize = pointSize;
  }
  f_id         = id;
  f_position   = position;
}`]), i = e([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;

void main() {
  gl_Position = projection * view * model * vec4(position, 1.0);
}`]), p = e([`precision highp float;
#define GLSLIFY 1

uniform vec3 contourColor;

void main() {
  gl_FragColor = vec4(contourColor, 1.0);
}
`]);
              x.meshShader = { vertex: r, fragment: n, attributes: [{ name: "position", type: "vec3" }, { name: "normal", type: "vec3" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }] }, x.wireShader = { vertex: s, fragment: t, attributes: [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }] }, x.pointShader = { vertex: d, fragment: u, attributes: [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }, { name: "pointSize", type: "float" }] }, x.pickShader = { vertex: o, fragment: h, attributes: [{ name: "position", type: "vec3" }, { name: "id", type: "vec4" }] }, x.pointPickShader = { vertex: l, fragment: h, attributes: [{ name: "position", type: "vec3" }, { name: "pointSize", type: "float" }, { name: "id", type: "vec4" }] }, x.contourShader = { vertex: i, fragment: p, attributes: [{ name: "position", type: "vec3" }] };
            }, { glslify: 231 }], 112: [function(g, k, x) {
              var e = g("gl-shader"), r = g("gl-buffer"), n = g("gl-vao"), s = g("gl-texture2d"), t = g("normals"), d = g("gl-mat4/multiply"), u = g("gl-mat4/invert"), o = g("ndarray"), h = g("colormap"), l = g("simplicial-complex-contour"), i = g("typedarray-pool"), p = g("./lib/shaders"), c = g("./lib/closest-point"), a = p.meshShader, y = p.wireShader, f = p.pointShader, _ = p.pickShader, b = p.pointPickShader, w = p.contourShader, T = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
              function L(H, Y, J, W, Z, re, V, B, U, ee, N, K, X, te, ie, le, oe, ve, ue, ye, Ae, pe, ge, we, se, de, Te) {
                this.gl = H, this.pixelRatio = 1, this.cells = [], this.positions = [], this.intensity = [], this.texture = Y, this.dirty = !0, this.triShader = J, this.lineShader = W, this.pointShader = Z, this.pickShader = re, this.pointPickShader = V, this.contourShader = B, this.trianglePositions = U, this.triangleColors = N, this.triangleNormals = X, this.triangleUVs = K, this.triangleIds = ee, this.triangleVAO = te, this.triangleCount = 0, this.lineWidth = 1, this.edgePositions = ie, this.edgeColors = oe, this.edgeUVs = ve, this.edgeIds = le, this.edgeVAO = ue, this.edgeCount = 0, this.pointPositions = ye, this.pointColors = pe, this.pointUVs = ge, this.pointSizes = we, this.pointIds = Ae, this.pointVAO = se, this.pointCount = 0, this.contourLineWidth = 1, this.contourPositions = de, this.contourVAO = Te, this.contourCount = 0, this.contourColor = [0, 0, 0], this.contourEnable = !0, this.pickVertex = !0, this.pickId = 1, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.lightPosition = [1e5, 1e5, 0], this.ambientLight = 0.8, this.diffuseLight = 0.8, this.specularLight = 2, this.roughness = 0.5, this.fresnel = 1.5, this.opacity = 1, this.hasAlpha = !1, this.opacityscale = !1, this._model = T, this._view = T, this._projection = T, this._resolution = [1, 1];
              }
              var A = L.prototype;
              function I(H, Y) {
                if (!Y || !Y.length)
                  return 1;
                for (var J = 0; J < Y.length; ++J) {
                  if (Y.length < 2)
                    return 1;
                  if (Y[J][0] === H)
                    return Y[J][1];
                  if (Y[J][0] > H && J > 0) {
                    var W = (Y[J][0] - H) / (Y[J][0] - Y[J - 1][0]);
                    return Y[J][1] * (1 - W) + W * Y[J - 1][1];
                  }
                }
                return 1;
              }
              function P(H) {
                var Y = e(H, a.vertex, a.fragment);
                return Y.attributes.position.location = 0, Y.attributes.color.location = 2, Y.attributes.uv.location = 3, Y.attributes.normal.location = 4, Y;
              }
              function S(H) {
                var Y = e(H, y.vertex, y.fragment);
                return Y.attributes.position.location = 0, Y.attributes.color.location = 2, Y.attributes.uv.location = 3, Y;
              }
              function E(H) {
                var Y = e(H, f.vertex, f.fragment);
                return Y.attributes.position.location = 0, Y.attributes.color.location = 2, Y.attributes.uv.location = 3, Y.attributes.pointSize.location = 4, Y;
              }
              function R(H) {
                var Y = e(H, _.vertex, _.fragment);
                return Y.attributes.position.location = 0, Y.attributes.id.location = 1, Y;
              }
              function z(H) {
                var Y = e(H, b.vertex, b.fragment);
                return Y.attributes.position.location = 0, Y.attributes.id.location = 1, Y.attributes.pointSize.location = 4, Y;
              }
              function j(H) {
                var Y = e(H, w.vertex, w.fragment);
                return Y.attributes.position.location = 0, Y;
              }
              A.isOpaque = function() {
                return !this.hasAlpha;
              }, A.isTransparent = function() {
                return this.hasAlpha;
              }, A.pickSlots = 1, A.setPickBase = function(H) {
                this.pickId = H;
              }, A.highlight = function(H) {
                if (H && this.contourEnable) {
                  for (var Y = l(this.cells, this.intensity, H.intensity), J = Y.cells, W = Y.vertexIds, Z = Y.vertexWeights, re = J.length, V = i.mallocFloat32(6 * re), B = 0, U = 0; U < re; ++U)
                    for (var ee = J[U], N = 0; N < 2; ++N) {
                      var K = ee[0];
                      ee.length === 2 && (K = ee[N]);
                      for (var X = W[K][0], te = W[K][1], ie = Z[K], le = 1 - ie, oe = this.positions[X], ve = this.positions[te], ue = 0; ue < 3; ++ue)
                        V[B++] = ie * oe[ue] + le * ve[ue];
                    }
                  this.contourCount = B / 3 | 0, this.contourPositions.update(V.subarray(0, B)), i.free(V);
                } else
                  this.contourCount = 0;
              }, A.update = function(H) {
                H = H || {};
                var Y = this.gl;
                this.dirty = !0, "contourEnable" in H && (this.contourEnable = H.contourEnable), "contourColor" in H && (this.contourColor = H.contourColor), "lineWidth" in H && (this.lineWidth = H.lineWidth), "lightPosition" in H && (this.lightPosition = H.lightPosition), this.hasAlpha = !1, "opacity" in H && (this.opacity = H.opacity, this.opacity < 1 && (this.hasAlpha = !0)), "opacityscale" in H && (this.opacityscale = H.opacityscale, this.hasAlpha = !0), "ambient" in H && (this.ambientLight = H.ambient), "diffuse" in H && (this.diffuseLight = H.diffuse), "specular" in H && (this.specularLight = H.specular), "roughness" in H && (this.roughness = H.roughness), "fresnel" in H && (this.fresnel = H.fresnel), H.texture ? (this.texture.dispose(), this.texture = s(Y, H.texture)) : H.colormap && (this.texture.shape = [256, 256], this.texture.minFilter = Y.LINEAR_MIPMAP_LINEAR, this.texture.magFilter = Y.LINEAR, this.texture.setPixels(function(Vt, Xt) {
                  for (var Gt = h({ colormap: Vt, nshades: 256, format: "rgba" }), nr = new Uint8Array(1024), It = 0; It < 256; ++It) {
                    for (var Be = Gt[It], He = 0; He < 3; ++He)
                      nr[4 * It + He] = Be[He];
                    nr[4 * It + 3] = Xt ? 255 * I(It / 255, Xt) : 255 * Be[3];
                  }
                  return o(nr, [256, 256, 4], [4, 0, 1]);
                }(H.colormap, this.opacityscale)), this.texture.generateMipmap());
                var J = H.cells, W = H.positions;
                if (W && J) {
                  var Z = [], re = [], V = [], B = [], U = [], ee = [], N = [], K = [], X = [], te = [], ie = [], le = [], oe = [], ve = [];
                  this.cells = J, this.positions = W;
                  var ue = H.vertexNormals, ye = H.cellNormals, Ae = H.vertexNormalsEpsilon === void 0 ? 1e-6 : H.vertexNormalsEpsilon, pe = H.faceNormalsEpsilon === void 0 ? 1e-6 : H.faceNormalsEpsilon;
                  H.useFacetNormals && !ye && (ye = t.faceNormals(J, W, pe)), ye || ue || (ue = t.vertexNormals(J, W, Ae));
                  var ge = H.vertexColors, we = H.cellColors, se = H.meshColor || [1, 1, 1, 1], de = H.vertexUVs, Te = H.vertexIntensity, Ee = H.cellUVs, Me = H.cellIntensity, ze = 1 / 0, Ie = -1 / 0;
                  if (!de && !Ee)
                    if (Te)
                      if (H.vertexIntensityBounds)
                        ze = +H.vertexIntensityBounds[0], Ie = +H.vertexIntensityBounds[1];
                      else
                        for (var Oe = 0; Oe < Te.length; ++Oe) {
                          var Ze = Te[Oe];
                          ze = Math.min(ze, Ze), Ie = Math.max(Ie, Ze);
                        }
                    else if (Me)
                      if (H.cellIntensityBounds)
                        ze = +H.cellIntensityBounds[0], Ie = +H.cellIntensityBounds[1];
                      else
                        for (Oe = 0; Oe < Me.length; ++Oe)
                          Ze = Me[Oe], ze = Math.min(ze, Ze), Ie = Math.max(Ie, Ze);
                    else
                      for (Oe = 0; Oe < W.length; ++Oe)
                        Ze = W[Oe][2], ze = Math.min(ze, Ze), Ie = Math.max(Ie, Ze);
                  this.intensity = Te || Me || function(Vt) {
                    for (var Xt = Vt.length, Gt = new Array(Xt), nr = 0; nr < Xt; ++nr)
                      Gt[nr] = Vt[nr][2];
                    return Gt;
                  }(W), this.pickVertex = !(Me || we);
                  var Fe = H.pointSizes, Pe = H.pointSize || 1;
                  for (this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], Oe = 0; Oe < W.length; ++Oe)
                    for (var De = W[Oe], Ge = 0; Ge < 3; ++Ge)
                      !isNaN(De[Ge]) && isFinite(De[Ge]) && (this.bounds[0][Ge] = Math.min(this.bounds[0][Ge], De[Ge]), this.bounds[1][Ge] = Math.max(this.bounds[1][Ge], De[Ge]));
                  var Qe = 0, ot = 0, vt = 0;
                  e:
                    for (Oe = 0; Oe < J.length; ++Oe) {
                      var bt = J[Oe];
                      switch (bt.length) {
                        case 1:
                          for (De = W[tt = bt[0]], Ge = 0; Ge < 3; ++Ge)
                            if (isNaN(De[Ge]) || !isFinite(De[Ge]))
                              continue e;
                          te.push(De[0], De[1], De[2]), Ke = ge ? ge[tt] : we ? we[Oe] : se, this.opacityscale && Te ? re.push(Ke[0], Ke[1], Ke[2], this.opacity * I((Te[tt] - ze) / (Ie - ze), this.opacityscale)) : Ke.length === 3 ? ie.push(Ke[0], Ke[1], Ke[2], this.opacity) : (ie.push(Ke[0], Ke[1], Ke[2], Ke[3] * this.opacity), Ke[3] < 1 && (this.hasAlpha = !0)), mt = de ? de[tt] : Te ? [(Te[tt] - ze) / (Ie - ze), 0] : Ee ? Ee[Oe] : Me ? [(Me[Oe] - ze) / (Ie - ze), 0] : [(De[2] - ze) / (Ie - ze), 0], le.push(mt[0], mt[1]), Fe ? oe.push(Fe[tt]) : oe.push(Pe), ve.push(Oe), vt += 1;
                          break;
                        case 2:
                          for (Ge = 0; Ge < 2; ++Ge) {
                            De = W[tt = bt[Ge]];
                            for (var yt = 0; yt < 3; ++yt)
                              if (isNaN(De[yt]) || !isFinite(De[yt]))
                                continue e;
                          }
                          for (Ge = 0; Ge < 2; ++Ge)
                            De = W[tt = bt[Ge]], ee.push(De[0], De[1], De[2]), Ke = ge ? ge[tt] : we ? we[Oe] : se, this.opacityscale && Te ? re.push(Ke[0], Ke[1], Ke[2], this.opacity * I((Te[tt] - ze) / (Ie - ze), this.opacityscale)) : Ke.length === 3 ? N.push(Ke[0], Ke[1], Ke[2], this.opacity) : (N.push(Ke[0], Ke[1], Ke[2], Ke[3] * this.opacity), Ke[3] < 1 && (this.hasAlpha = !0)), mt = de ? de[tt] : Te ? [(Te[tt] - ze) / (Ie - ze), 0] : Ee ? Ee[Oe] : Me ? [(Me[Oe] - ze) / (Ie - ze), 0] : [(De[2] - ze) / (Ie - ze), 0], K.push(mt[0], mt[1]), X.push(Oe);
                          ot += 1;
                          break;
                        case 3:
                          for (Ge = 0; Ge < 3; ++Ge)
                            for (De = W[tt = bt[Ge]], yt = 0; yt < 3; ++yt)
                              if (isNaN(De[yt]) || !isFinite(De[yt]))
                                continue e;
                          for (Ge = 0; Ge < 3; ++Ge) {
                            var tt, Ke, mt, Ft;
                            De = W[tt = bt[2 - Ge]], Z.push(De[0], De[1], De[2]), (Ke = ge ? ge[tt] : we ? we[Oe] : se) ? this.opacityscale && Te ? re.push(Ke[0], Ke[1], Ke[2], this.opacity * I((Te[tt] - ze) / (Ie - ze), this.opacityscale)) : Ke.length === 3 ? re.push(Ke[0], Ke[1], Ke[2], this.opacity) : (re.push(Ke[0], Ke[1], Ke[2], Ke[3] * this.opacity), Ke[3] < 1 && (this.hasAlpha = !0)) : re.push(0.5, 0.5, 0.5, 1), mt = de ? de[tt] : Te ? [(Te[tt] - ze) / (Ie - ze), 0] : Ee ? Ee[Oe] : Me ? [(Me[Oe] - ze) / (Ie - ze), 0] : [(De[2] - ze) / (Ie - ze), 0], B.push(mt[0], mt[1]), Ft = ue ? ue[tt] : ye[Oe], V.push(Ft[0], Ft[1], Ft[2]), U.push(Oe);
                          }
                          Qe += 1;
                      }
                    }
                  this.pointCount = vt, this.edgeCount = ot, this.triangleCount = Qe, this.pointPositions.update(te), this.pointColors.update(ie), this.pointUVs.update(le), this.pointSizes.update(oe), this.pointIds.update(new Uint32Array(ve)), this.edgePositions.update(ee), this.edgeColors.update(N), this.edgeUVs.update(K), this.edgeIds.update(new Uint32Array(X)), this.trianglePositions.update(Z), this.triangleColors.update(re), this.triangleUVs.update(B), this.triangleNormals.update(V), this.triangleIds.update(new Uint32Array(U));
                }
              }, A.drawTransparent = A.draw = function(H) {
                H = H || {};
                for (var Y = this.gl, J = H.model || T, W = H.view || T, Z = H.projection || T, re = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], V = 0; V < 3; ++V)
                  re[0][V] = Math.max(re[0][V], this.clipBounds[0][V]), re[1][V] = Math.min(re[1][V], this.clipBounds[1][V]);
                var B = { model: J, view: W, projection: Z, inverseModel: T.slice(), clipBounds: re, kambient: this.ambientLight, kdiffuse: this.diffuseLight, kspecular: this.specularLight, roughness: this.roughness, fresnel: this.fresnel, eyePosition: [0, 0, 0], lightPosition: [0, 0, 0], contourColor: this.contourColor, texture: 0 };
                B.inverseModel = u(B.inverseModel, B.model), Y.disable(Y.CULL_FACE), this.texture.bind(0);
                var U = new Array(16);
                for (d(U, B.view, B.model), d(U, B.projection, U), u(U, U), V = 0; V < 3; ++V)
                  B.eyePosition[V] = U[12 + V] / U[15];
                var ee, N = U[15];
                for (V = 0; V < 3; ++V)
                  N += this.lightPosition[V] * U[4 * V + 3];
                for (V = 0; V < 3; ++V) {
                  for (var K = U[12 + V], X = 0; X < 3; ++X)
                    K += U[4 * X + V] * this.lightPosition[X];
                  B.lightPosition[V] = K / N;
                }
                this.triangleCount > 0 && ((ee = this.triShader).bind(), ee.uniforms = B, this.triangleVAO.bind(), Y.drawArrays(Y.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind()), this.edgeCount > 0 && this.lineWidth > 0 && ((ee = this.lineShader).bind(), ee.uniforms = B, this.edgeVAO.bind(), Y.lineWidth(this.lineWidth * this.pixelRatio), Y.drawArrays(Y.LINES, 0, 2 * this.edgeCount), this.edgeVAO.unbind()), this.pointCount > 0 && ((ee = this.pointShader).bind(), ee.uniforms = B, this.pointVAO.bind(), Y.drawArrays(Y.POINTS, 0, this.pointCount), this.pointVAO.unbind()), this.contourEnable && this.contourCount > 0 && this.contourLineWidth > 0 && ((ee = this.contourShader).bind(), ee.uniforms = B, this.contourVAO.bind(), Y.drawArrays(Y.LINES, 0, this.contourCount), this.contourVAO.unbind());
              }, A.drawPick = function(H) {
                H = H || {};
                for (var Y = this.gl, J = H.model || T, W = H.view || T, Z = H.projection || T, re = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], V = 0; V < 3; ++V)
                  re[0][V] = Math.max(re[0][V], this.clipBounds[0][V]), re[1][V] = Math.min(re[1][V], this.clipBounds[1][V]);
                this._model = [].slice.call(J), this._view = [].slice.call(W), this._projection = [].slice.call(Z), this._resolution = [Y.drawingBufferWidth, Y.drawingBufferHeight];
                var B, U = { model: J, view: W, projection: Z, clipBounds: re, pickId: this.pickId / 255 };
                (B = this.pickShader).bind(), B.uniforms = U, this.triangleCount > 0 && (this.triangleVAO.bind(), Y.drawArrays(Y.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind()), this.edgeCount > 0 && (this.edgeVAO.bind(), Y.lineWidth(this.lineWidth * this.pixelRatio), Y.drawArrays(Y.LINES, 0, 2 * this.edgeCount), this.edgeVAO.unbind()), this.pointCount > 0 && ((B = this.pointPickShader).bind(), B.uniforms = U, this.pointVAO.bind(), Y.drawArrays(Y.POINTS, 0, this.pointCount), this.pointVAO.unbind());
              }, A.pick = function(H) {
                if (!H || H.id !== this.pickId)
                  return null;
                for (var Y = H.value[0] + 256 * H.value[1] + 65536 * H.value[2], J = this.cells[Y], W = this.positions, Z = new Array(J.length), re = 0; re < J.length; ++re)
                  Z[re] = W[J[re]];
                var V = H.coord[0], B = H.coord[1];
                if (!this.pickVertex) {
                  var U = this.positions[J[0]], ee = this.positions[J[1]], N = this.positions[J[2]], K = [(U[0] + ee[0] + N[0]) / 3, (U[1] + ee[1] + N[1]) / 3, (U[2] + ee[2] + N[2]) / 3];
                  return { _cellCenter: !0, position: [V, B], index: Y, cell: J, cellId: Y, intensity: this.intensity[Y], dataCoordinate: K };
                }
                var X = c(Z, [V * this.pixelRatio, this._resolution[1] - B * this.pixelRatio], this._model, this._view, this._projection, this._resolution);
                if (!X)
                  return null;
                var te = X[2], ie = 0;
                for (re = 0; re < J.length; ++re)
                  ie += te[re] * this.intensity[J[re]];
                return { position: X[1], index: J[X[0]], cell: J, cellId: Y, intensity: ie, dataCoordinate: this.positions[J[X[0]]] };
              }, A.dispose = function() {
                this.texture.dispose(), this.triShader.dispose(), this.lineShader.dispose(), this.pointShader.dispose(), this.pickShader.dispose(), this.pointPickShader.dispose(), this.triangleVAO.dispose(), this.trianglePositions.dispose(), this.triangleColors.dispose(), this.triangleUVs.dispose(), this.triangleNormals.dispose(), this.triangleIds.dispose(), this.edgeVAO.dispose(), this.edgePositions.dispose(), this.edgeColors.dispose(), this.edgeUVs.dispose(), this.edgeIds.dispose(), this.pointVAO.dispose(), this.pointPositions.dispose(), this.pointColors.dispose(), this.pointUVs.dispose(), this.pointSizes.dispose(), this.pointIds.dispose(), this.contourVAO.dispose(), this.contourPositions.dispose(), this.contourShader.dispose();
              }, k.exports = function(H, Y) {
                arguments.length === 1 && (H = (Y = H).gl);
                var J = H.getExtension("OES_standard_derivatives") || H.getExtension("MOZ_OES_standard_derivatives") || H.getExtension("WEBKIT_OES_standard_derivatives");
                if (!J)
                  throw new Error("derivatives not supported");
                var W = P(H), Z = S(H), re = E(H), V = R(H), B = z(H), U = j(H), ee = s(H, o(new Uint8Array([255, 255, 255, 255]), [1, 1, 4]));
                ee.generateMipmap(), ee.minFilter = H.LINEAR_MIPMAP_LINEAR, ee.magFilter = H.LINEAR;
                var N = r(H), K = r(H), X = r(H), te = r(H), ie = r(H), le = n(H, [{ buffer: N, type: H.FLOAT, size: 3 }, { buffer: ie, type: H.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: K, type: H.FLOAT, size: 4 }, { buffer: X, type: H.FLOAT, size: 2 }, { buffer: te, type: H.FLOAT, size: 3 }]), oe = r(H), ve = r(H), ue = r(H), ye = r(H), Ae = n(H, [{ buffer: oe, type: H.FLOAT, size: 3 }, { buffer: ye, type: H.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: ve, type: H.FLOAT, size: 4 }, { buffer: ue, type: H.FLOAT, size: 2 }]), pe = r(H), ge = r(H), we = r(H), se = r(H), de = r(H), Te = n(H, [{ buffer: pe, type: H.FLOAT, size: 3 }, { buffer: de, type: H.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: ge, type: H.FLOAT, size: 4 }, { buffer: we, type: H.FLOAT, size: 2 }, { buffer: se, type: H.FLOAT, size: 1 }]), Ee = r(H), Me = n(H, [{ buffer: Ee, type: H.FLOAT, size: 3 }]), ze = new L(H, ee, W, Z, re, V, B, U, N, ie, K, X, te, le, oe, ye, ve, ue, Ae, pe, de, ge, we, se, Te, Ee, Me);
                return ze.update(Y), ze;
              };
            }, { "./lib/closest-point": 110, "./lib/shaders": 111, colormap: 53, "gl-buffer": 78, "gl-mat4/invert": 98, "gl-mat4/multiply": 100, "gl-shader": 132, "gl-texture2d": 146, "gl-vao": 150, ndarray: 259, normals: 261, "simplicial-complex-contour": 291, "typedarray-pool": 308 }], 113: [function(g, k, x) {
              k.exports = function(o) {
                var h = o.gl, l = e(h, [0, 0, 0, 1, 1, 0, 1, 1]), i = r(h, n.boxVert, n.lineFrag);
                return new s(o, l, i);
              };
              var e = g("gl-buffer"), r = g("gl-shader"), n = g("./shaders");
              function s(o, h, l) {
                this.plot = o, this.vbo = h, this.shader = l;
              }
              var t, d, u = s.prototype;
              u.bind = function() {
                var o = this.shader;
                this.vbo.bind(), this.shader.bind(), o.attributes.coord.pointer(), o.uniforms.screenBox = this.plot.screenBox;
              }, u.drawBox = (t = [0, 0], d = [0, 0], function(o, h, l, i, p) {
                var c = this.plot, a = this.shader, y = c.gl;
                t[0] = o, t[1] = h, d[0] = l, d[1] = i, a.uniforms.lo = t, a.uniforms.hi = d, a.uniforms.color = p, y.drawArrays(y.TRIANGLE_STRIP, 0, 4);
              }), u.dispose = function() {
                this.vbo.dispose(), this.shader.dispose();
              };
            }, { "./shaders": 116, "gl-buffer": 78, "gl-shader": 132 }], 114: [function(g, k, x) {
              k.exports = function(c) {
                var a = c.gl, y = e(a), f = r(a, s.gridVert, s.gridFrag), _ = r(a, s.tickVert, s.gridFrag);
                return new t(c, y, f, _);
              };
              var e = g("gl-buffer"), r = g("gl-shader"), n = g("binary-search-bounds"), s = g("./shaders");
              function t(c, a, y, f) {
                this.plot = c, this.vbo = a, this.shader = y, this.tickShader = f, this.ticks = [[], []];
              }
              function d(c, a) {
                return c - a;
              }
              var u, o, h, l, i, p = t.prototype;
              p.draw = (u = [0, 0], o = [0, 0], h = [0, 0], function() {
                for (var c = this.plot, a = this.vbo, y = this.shader, f = this.ticks, _ = c.gl, b = c._tickBounds, w = c.dataBox, T = c.viewBox, L = c.gridLineWidth, A = c.gridLineColor, I = c.gridLineEnable, P = c.pixelRatio, S = 0; S < 2; ++S) {
                  var E = b[S], R = b[S + 2] - E, z = 0.5 * (w[S + 2] + w[S]), j = w[S + 2] - w[S];
                  o[S] = 2 * R / j, u[S] = 2 * (E - z) / j;
                }
                y.bind(), a.bind(), y.attributes.dataCoord.pointer(), y.uniforms.dataShift = u, y.uniforms.dataScale = o;
                var H = 0;
                for (S = 0; S < 2; ++S) {
                  h[0] = h[1] = 0, h[S] = 1, y.uniforms.dataAxis = h, y.uniforms.lineWidth = L[S] / (T[S + 2] - T[S]) * P, y.uniforms.color = A[S];
                  var Y = 6 * f[S].length;
                  I[S] && Y && _.drawArrays(_.TRIANGLES, H, Y), H += Y;
                }
              }), p.drawTickMarks = function() {
                var c = [0, 0], a = [0, 0], y = [1, 0], f = [0, 1], _ = [0, 0], b = [0, 0];
                return function() {
                  for (var w = this.plot, T = this.vbo, L = this.tickShader, A = this.ticks, I = w.gl, P = w._tickBounds, S = w.dataBox, E = w.viewBox, R = w.pixelRatio, z = w.screenBox, j = z[2] - z[0], H = z[3] - z[1], Y = E[2] - E[0], J = E[3] - E[1], W = 0; W < 2; ++W) {
                    var Z = P[W], re = P[W + 2] - Z, V = 0.5 * (S[W + 2] + S[W]), B = S[W + 2] - S[W];
                    a[W] = 2 * re / B, c[W] = 2 * (Z - V) / B;
                  }
                  a[0] *= Y / j, c[0] *= Y / j, a[1] *= J / H, c[1] *= J / H, L.bind(), T.bind(), L.attributes.dataCoord.pointer();
                  var U = L.uniforms;
                  U.dataShift = c, U.dataScale = a;
                  var ee = w.tickMarkLength, N = w.tickMarkWidth, K = w.tickMarkColor, X = 6 * A[0].length, te = Math.min(n.ge(A[0], (S[0] - P[0]) / (P[2] - P[0]), d), A[0].length), ie = Math.min(n.gt(A[0], (S[2] - P[0]) / (P[2] - P[0]), d), A[0].length), le = 0 + 6 * te, oe = 6 * Math.max(0, ie - te), ve = Math.min(n.ge(A[1], (S[1] - P[1]) / (P[3] - P[1]), d), A[1].length), ue = Math.min(n.gt(A[1], (S[3] - P[1]) / (P[3] - P[1]), d), A[1].length), ye = X + 6 * ve, Ae = 6 * Math.max(0, ue - ve);
                  _[0] = 2 * (E[0] - ee[1]) / j - 1, _[1] = (E[3] + E[1]) / H - 1, b[0] = ee[1] * R / j, b[1] = N[1] * R / H, Ae && (U.color = K[1], U.tickScale = b, U.dataAxis = f, U.screenOffset = _, I.drawArrays(I.TRIANGLES, ye, Ae)), _[0] = (E[2] + E[0]) / j - 1, _[1] = 2 * (E[1] - ee[0]) / H - 1, b[0] = N[0] * R / j, b[1] = ee[0] * R / H, oe && (U.color = K[0], U.tickScale = b, U.dataAxis = y, U.screenOffset = _, I.drawArrays(I.TRIANGLES, le, oe)), _[0] = 2 * (E[2] + ee[3]) / j - 1, _[1] = (E[3] + E[1]) / H - 1, b[0] = ee[3] * R / j, b[1] = N[3] * R / H, Ae && (U.color = K[3], U.tickScale = b, U.dataAxis = f, U.screenOffset = _, I.drawArrays(I.TRIANGLES, ye, Ae)), _[0] = (E[2] + E[0]) / j - 1, _[1] = 2 * (E[3] + ee[2]) / H - 1, b[0] = N[2] * R / j, b[1] = ee[2] * R / H, oe && (U.color = K[2], U.tickScale = b, U.dataAxis = y, U.screenOffset = _, I.drawArrays(I.TRIANGLES, le, oe));
                };
              }(), p.update = (l = [1, 1, -1, -1, 1, -1], i = [1, -1, 1, 1, -1, -1], function(c) {
                for (var a = c.ticks, y = c.bounds, f = new Float32Array(18 * (a[0].length + a[1].length)), _ = (this.plot.zeroLineEnable, 0), b = [[], []], w = 0; w < 2; ++w)
                  for (var T = b[w], L = a[w], A = y[w], I = y[w + 2], P = 0; P < L.length; ++P) {
                    var S = (L[P].x - A) / (I - A);
                    T.push(S);
                    for (var E = 0; E < 6; ++E)
                      f[_++] = S, f[_++] = l[E], f[_++] = i[E];
                  }
                this.ticks = b, this.vbo.update(f);
              }), p.dispose = function() {
                this.vbo.dispose(), this.shader.dispose(), this.tickShader.dispose();
              };
            }, { "./shaders": 116, "binary-search-bounds": 31, "gl-buffer": 78, "gl-shader": 132 }], 115: [function(g, k, x) {
              k.exports = function(o) {
                var h = o.gl, l = e(h, [-1, -1, -1, 1, 1, -1, 1, 1]), i = r(h, n.lineVert, n.lineFrag);
                return new s(o, l, i);
              };
              var e = g("gl-buffer"), r = g("gl-shader"), n = g("./shaders");
              function s(o, h, l) {
                this.plot = o, this.vbo = h, this.shader = l;
              }
              var t, d, u = s.prototype;
              u.bind = function() {
                var o = this.shader;
                this.vbo.bind(), this.shader.bind(), o.attributes.coord.pointer(), o.uniforms.screenBox = this.plot.screenBox;
              }, u.drawLine = (t = [0, 0], d = [0, 0], function(o, h, l, i, p, c) {
                var a = this.plot, y = this.shader, f = a.gl;
                t[0] = o, t[1] = h, d[0] = l, d[1] = i, y.uniforms.start = t, y.uniforms.end = d, y.uniforms.width = p * a.pixelRatio, y.uniforms.color = c, f.drawArrays(f.TRIANGLE_STRIP, 0, 4);
              }), u.dispose = function() {
                this.vbo.dispose(), this.shader.dispose();
              };
            }, { "./shaders": 116, "gl-buffer": 78, "gl-shader": 132 }], 116: [function(g, k, x) {
              var e = g("glslify"), r = e([`precision lowp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
  gl_FragColor = vec4(color.xyz * color.w, color.w);
}
`]);
              k.exports = { lineVert: e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 coord;

uniform vec4 screenBox;
uniform vec2 start, end;
uniform float width;

vec2 perp(vec2 v) {
  return vec2(v.y, -v.x);
}

vec2 screen(vec2 v) {
  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}

void main() {
  vec2 delta = normalize(perp(start - end));
  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));
  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);
}
`]), lineFrag: r, textVert: e([`#define GLSLIFY 1
attribute vec3 textCoordinate;

uniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;
uniform float angle;

void main() {
  float dataOffset  = textCoordinate.z;
  vec2 glyphOffset  = textCoordinate.xy;
  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +
    glyphMatrix * glyphOffset * textScale + screenOffset;
  gl_Position = vec4(screenCoordinate, 0, 1);
}
`]), textFrag: r, gridVert: e([`precision mediump float;
#define GLSLIFY 1

attribute vec3 dataCoord;

uniform vec2 dataAxis, dataShift, dataScale;
uniform float lineWidth;

void main() {
  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;
  gl_Position = vec4(pos, 0, 1);
}
`]), gridFrag: r, boxVert: e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 coord;

uniform vec4 screenBox;
uniform vec2 lo, hi;

vec2 screen(vec2 v) {
  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}

void main() {
  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);
}
`]), tickVert: e([`precision mediump float;
#define GLSLIFY 1

attribute vec3 dataCoord;

uniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;

void main() {
  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);
}
`]) };
            }, { glslify: 231 }], 117: [function(g, k, x) {
              k.exports = function(a) {
                var y = a.gl, f = e(y), _ = r(y, t.textVert, t.textFrag);
                return new d(a, f, _);
              };
              var e = g("gl-buffer"), r = g("gl-shader"), n = g("text-cache"), s = g("binary-search-bounds"), t = g("./shaders");
              function d(a, y, f) {
                this.plot = a, this.vbo = y, this.shader = f, this.tickOffset = [[], []], this.tickX = [[], []], this.labelOffset = [0, 0], this.labelCount = [0, 0];
              }
              var u, o, h, l, i, p, c = d.prototype;
              c.drawTicks = (u = [0, 0], o = [0, 0], h = [0, 0], function(a) {
                var y = this.plot, f = this.shader, _ = this.tickX[a], b = this.tickOffset[a], w = y.gl, T = y.viewBox, L = y.dataBox, A = y.screenBox, I = y.pixelRatio, P = y.tickEnable, S = y.tickPad, E = y.tickColor, R = y.tickAngle, z = y.labelEnable, j = y.labelPad, H = y.labelColor, Y = y.labelAngle, J = this.labelOffset[a], W = this.labelCount[a], Z = s.lt(_, L[a]), re = s.le(_, L[a + 2]);
                u[0] = u[1] = 0, u[a] = 1, o[a] = (T[2 + a] + T[a]) / (A[2 + a] - A[a]) - 1;
                var V = 2 / A[2 + (1 ^ a)] - A[1 ^ a];
                o[1 ^ a] = V * T[1 ^ a] - 1, P[a] && (o[1 ^ a] -= V * I * S[a], Z < re && b[re] > b[Z] && (f.uniforms.dataAxis = u, f.uniforms.screenOffset = o, f.uniforms.color = E[a], f.uniforms.angle = R[a], w.drawArrays(w.TRIANGLES, b[Z], b[re] - b[Z]))), z[a] && W && (o[1 ^ a] -= V * I * j[a], f.uniforms.dataAxis = h, f.uniforms.screenOffset = o, f.uniforms.color = H[a], f.uniforms.angle = Y[a], w.drawArrays(w.TRIANGLES, J, W)), o[1 ^ a] = V * T[2 + (1 ^ a)] - 1, P[a + 2] && (o[1 ^ a] += V * I * S[a + 2], Z < re && b[re] > b[Z] && (f.uniforms.dataAxis = u, f.uniforms.screenOffset = o, f.uniforms.color = E[a + 2], f.uniforms.angle = R[a + 2], w.drawArrays(w.TRIANGLES, b[Z], b[re] - b[Z]))), z[a + 2] && W && (o[1 ^ a] += V * I * j[a + 2], f.uniforms.dataAxis = h, f.uniforms.screenOffset = o, f.uniforms.color = H[a + 2], f.uniforms.angle = Y[a + 2], w.drawArrays(w.TRIANGLES, J, W));
              }), c.drawTitle = function() {
                var a = [0, 0], y = [0, 0];
                return function() {
                  var f = this.plot, _ = this.shader, b = f.gl, w = f.screenBox, T = f.titleCenter, L = f.titleAngle, A = f.titleColor, I = f.pixelRatio;
                  if (this.titleCount) {
                    for (var P = 0; P < 2; ++P)
                      y[P] = 2 * (T[P] * I - w[P]) / (w[2 + P] - w[P]) - 1;
                    _.bind(), _.uniforms.dataAxis = a, _.uniforms.screenOffset = y, _.uniforms.angle = L, _.uniforms.color = A, b.drawArrays(b.TRIANGLES, this.titleOffset, this.titleCount);
                  }
                };
              }(), c.bind = (l = [0, 0], i = [0, 0], p = [0, 0], function() {
                var a = this.plot, y = this.shader, f = a._tickBounds, _ = a.dataBox, b = a.screenBox, w = a.viewBox;
                y.bind();
                for (var T = 0; T < 2; ++T) {
                  var L = f[T], A = f[T + 2] - L, I = 0.5 * (_[T + 2] + _[T]), P = _[T + 2] - _[T], S = w[T], E = w[T + 2] - S, R = b[T], z = b[T + 2] - R;
                  i[T] = 2 * A / P * E / z, l[T] = 2 * (L - I) / P * E / z;
                }
                p[1] = 2 * a.pixelRatio / (b[3] - b[1]), p[0] = p[1] * (b[3] - b[1]) / (b[2] - b[0]), y.uniforms.dataScale = i, y.uniforms.dataShift = l, y.uniforms.textScale = p, this.vbo.bind(), y.attributes.textCoordinate.pointer();
              }), c.update = function(a) {
                var y, f, _, b, w, T = [], L = a.ticks, A = a.bounds;
                for (w = 0; w < 2; ++w) {
                  var I = [Math.floor(T.length / 3)], P = [-1 / 0], S = L[w];
                  for (y = 0; y < S.length; ++y) {
                    var E = S[y], R = E.x, z = E.text, j = E.font || "sans-serif";
                    b = E.fontSize || 12;
                    for (var H = 1 / (A[w + 2] - A[w]), Y = A[w], J = z.split(`
`), W = 0; W < J.length; W++)
                      for (_ = n(j, J[W]).data, f = 0; f < _.length; f += 2)
                        T.push(_[f] * b, -_[f + 1] * b - W * b * 1.2, (R - Y) * H);
                    I.push(Math.floor(T.length / 3)), P.push(R);
                  }
                  this.tickOffset[w] = I, this.tickX[w] = P;
                }
                for (w = 0; w < 2; ++w) {
                  for (this.labelOffset[w] = Math.floor(T.length / 3), _ = n(a.labelFont[w], a.labels[w], { textAlign: "center" }).data, b = a.labelSize[w], y = 0; y < _.length; y += 2)
                    T.push(_[y] * b, -_[y + 1] * b, 0);
                  this.labelCount[w] = Math.floor(T.length / 3) - this.labelOffset[w];
                }
                for (this.titleOffset = Math.floor(T.length / 3), _ = n(a.titleFont, a.title).data, b = a.titleSize, y = 0; y < _.length; y += 2)
                  T.push(_[y] * b, -_[y + 1] * b, 0);
                this.titleCount = Math.floor(T.length / 3) - this.titleOffset, this.vbo.update(T);
              }, c.dispose = function() {
                this.vbo.dispose(), this.shader.dispose();
              };
            }, { "./shaders": 116, "binary-search-bounds": 31, "gl-buffer": 78, "gl-shader": 132, "text-cache": 303 }], 118: [function(g, k, x) {
              k.exports = function(l) {
                var i = l.gl, p = e(i, [i.drawingBufferWidth, i.drawingBufferHeight]), c = new d(i, p);
                return c.grid = r(c), c.text = n(c), c.line = s(c), c.box = t(c), c.update(l), c;
              };
              var e = g("gl-select-static"), r = g("./lib/grid"), n = g("./lib/text"), s = g("./lib/line"), t = g("./lib/box");
              function d(l, i) {
                this.gl = l, this.pickBuffer = i, this.screenBox = [0, 0, l.drawingBufferWidth, l.drawingBufferHeight], this.viewBox = [0, 0, 0, 0], this.dataBox = [-10, -10, 10, 10], this.gridLineEnable = [!0, !0], this.gridLineWidth = [1, 1], this.gridLineColor = [[0, 0, 0, 1], [0, 0, 0, 1]], this.pixelRatio = 1, this.tickMarkLength = [0, 0, 0, 0], this.tickMarkWidth = [0, 0, 0, 0], this.tickMarkColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickPad = [15, 15, 15, 15], this.tickAngle = [0, 0, 0, 0], this.tickEnable = [!0, !0, !0, !0], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labelPad = [15, 15, 15, 15], this.labelAngle = [0, Math.PI / 2, 0, 3 * Math.PI / 2], this.labelEnable = [!0, !0, !0, !0], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.titleCenter = [0, 0], this.titleEnable = !0, this.titleAngle = 0, this.titleColor = [0, 0, 0, 1], this.borderColor = [0, 0, 0, 0], this.backgroundColor = [0, 0, 0, 0], this.zeroLineEnable = [!0, !0], this.zeroLineWidth = [4, 4], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1]], this.borderLineEnable = [!0, !0, !0, !0], this.borderLineWidth = [2, 2, 2, 2], this.borderLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.grid = null, this.text = null, this.line = null, this.box = null, this.objects = [], this.overlays = [], this._tickBounds = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.static = !1, this.dirty = !1, this.pickDirty = !1, this.pickDelay = 120, this.pickRadius = 10, this._pickTimeout = null, this._drawPick = this.drawPick.bind(this), this._depthCounter = 0;
              }
              var u = d.prototype;
              function o(l) {
                for (var i = l.slice(), p = 0; p < i.length; ++p)
                  i[p] = i[p].slice();
                return i;
              }
              function h(l, i) {
                return l.x - i.x;
              }
              u.setDirty = function() {
                this.dirty = this.pickDirty = !0;
              }, u.setOverlayDirty = function() {
                this.dirty = !0;
              }, u.nextDepthValue = function() {
                return this._depthCounter++ / 65536;
              }, u.draw = function() {
                var l = this.gl, i = this.screenBox, p = this.viewBox, c = this.dataBox, a = this.pixelRatio, y = this.grid, f = this.line, _ = this.text, b = this.objects;
                if (this._depthCounter = 0, this.pickDirty && (this._pickTimeout && clearTimeout(this._pickTimeout), this.pickDirty = !1, this._pickTimeout = setTimeout(this._drawPick, this.pickDelay)), this.dirty) {
                  if (this.dirty = !1, l.bindFramebuffer(l.FRAMEBUFFER, null), l.enable(l.SCISSOR_TEST), l.disable(l.DEPTH_TEST), l.depthFunc(l.LESS), l.depthMask(!1), l.enable(l.BLEND), l.blendEquation(l.FUNC_ADD, l.FUNC_ADD), l.blendFunc(l.ONE, l.ONE_MINUS_SRC_ALPHA), this.borderColor) {
                    l.scissor(i[0], i[1], i[2] - i[0], i[3] - i[1]);
                    var w = this.borderColor;
                    l.clearColor(w[0] * w[3], w[1] * w[3], w[2] * w[3], w[3]), l.clear(l.COLOR_BUFFER_BIT | l.DEPTH_BUFFER_BIT);
                  }
                  l.scissor(p[0], p[1], p[2] - p[0], p[3] - p[1]), l.viewport(p[0], p[1], p[2] - p[0], p[3] - p[1]);
                  var T = this.backgroundColor;
                  l.clearColor(T[0] * T[3], T[1] * T[3], T[2] * T[3], T[3]), l.clear(l.COLOR_BUFFER_BIT), y.draw();
                  var L = this.zeroLineEnable, A = this.zeroLineColor, I = this.zeroLineWidth;
                  if (L[0] || L[1]) {
                    f.bind();
                    for (var P = 0; P < 2; ++P)
                      if (L[P] && c[P] <= 0 && c[P + 2] >= 0) {
                        var S = i[P] - c[P] * (i[P + 2] - i[P]) / (c[P + 2] - c[P]);
                        P === 0 ? f.drawLine(S, i[1], S, i[3], I[P], A[P]) : f.drawLine(i[0], S, i[2], S, I[P], A[P]);
                      }
                  }
                  for (P = 0; P < b.length; ++P)
                    b[P].draw();
                  l.viewport(i[0], i[1], i[2] - i[0], i[3] - i[1]), l.scissor(i[0], i[1], i[2] - i[0], i[3] - i[1]), this.grid.drawTickMarks(), f.bind();
                  var E = this.borderLineEnable, R = this.borderLineWidth, z = this.borderLineColor;
                  for (E[1] && f.drawLine(p[0], p[1] - 0.5 * R[1] * a, p[0], p[3] + 0.5 * R[3] * a, R[1], z[1]), E[0] && f.drawLine(p[0] - 0.5 * R[0] * a, p[1], p[2] + 0.5 * R[2] * a, p[1], R[0], z[0]), E[3] && f.drawLine(p[2], p[1] - 0.5 * R[1] * a, p[2], p[3] + 0.5 * R[3] * a, R[3], z[3]), E[2] && f.drawLine(p[0] - 0.5 * R[0] * a, p[3], p[2] + 0.5 * R[2] * a, p[3], R[2], z[2]), _.bind(), P = 0; P < 2; ++P)
                    _.drawTicks(P);
                  this.titleEnable && _.drawTitle();
                  var j = this.overlays;
                  for (P = 0; P < j.length; ++P)
                    j[P].draw();
                  l.disable(l.SCISSOR_TEST), l.disable(l.BLEND), l.depthMask(!0);
                }
              }, u.drawPick = function() {
                if (!this.static) {
                  var l = this.pickBuffer;
                  this.gl, this._pickTimeout = null, l.begin();
                  for (var i = 1, p = this.objects, c = 0; c < p.length; ++c)
                    i = p[c].drawPick(i);
                  l.end();
                }
              }, u.pick = function(l, i) {
                if (!this.static) {
                  var p = this.pixelRatio, c = this.pickPixelRatio, a = this.viewBox, y = 0 | Math.round((l - a[0] / p) * c), f = 0 | Math.round((i - a[1] / p) * c), _ = this.pickBuffer.query(y, f, this.pickRadius);
                  if (!_)
                    return null;
                  for (var b = _.id + (_.value[0] << 8) + (_.value[1] << 16) + (_.value[2] << 24), w = this.objects, T = 0; T < w.length; ++T) {
                    var L = w[T].pick(y, f, b);
                    if (L)
                      return L;
                  }
                  return null;
                }
              }, u.setScreenBox = function(l) {
                var i = this.screenBox, p = this.pixelRatio;
                i[0] = 0 | Math.round(l[0] * p), i[1] = 0 | Math.round(l[1] * p), i[2] = 0 | Math.round(l[2] * p), i[3] = 0 | Math.round(l[3] * p), this.setDirty();
              }, u.setDataBox = function(l) {
                var i = this.dataBox;
                (i[0] !== l[0] || i[1] !== l[1] || i[2] !== l[2] || i[3] !== l[3]) && (i[0] = l[0], i[1] = l[1], i[2] = l[2], i[3] = l[3], this.setDirty());
              }, u.setViewBox = function(l) {
                var i = this.pixelRatio, p = this.viewBox;
                p[0] = 0 | Math.round(l[0] * i), p[1] = 0 | Math.round(l[1] * i), p[2] = 0 | Math.round(l[2] * i), p[3] = 0 | Math.round(l[3] * i);
                var c = this.pickPixelRatio;
                this.pickBuffer.shape = [0 | Math.round((l[2] - l[0]) * c), 0 | Math.round((l[3] - l[1]) * c)], this.setDirty();
              }, u.update = function(l) {
                l = l || {};
                var i = this.gl;
                this.pixelRatio = l.pixelRatio || 1;
                var p = this.pixelRatio;
                this.pickPixelRatio = Math.max(p, 1), this.setScreenBox(l.screenBox || [0, 0, i.drawingBufferWidth / p, i.drawingBufferHeight / p]), this.screenBox, this.setViewBox(l.viewBox || [0.125 * (this.screenBox[2] - this.screenBox[0]) / p, 0.125 * (this.screenBox[3] - this.screenBox[1]) / p, 0.875 * (this.screenBox[2] - this.screenBox[0]) / p, 0.875 * (this.screenBox[3] - this.screenBox[1]) / p]);
                var c = this.viewBox, a = (c[2] - c[0]) / (c[3] - c[1]);
                this.setDataBox(l.dataBox || [-10, -10 / a, 10, 10 / a]), this.borderColor = l.borderColor !== !1 && (l.borderColor || [0, 0, 0, 0]).slice(), this.backgroundColor = (l.backgroundColor || [0, 0, 0, 0]).slice(), this.gridLineEnable = (l.gridLineEnable || [!0, !0]).slice(), this.gridLineWidth = (l.gridLineWidth || [1, 1]).slice(), this.gridLineColor = o(l.gridLineColor || [[0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1]]), this.zeroLineEnable = (l.zeroLineEnable || [!0, !0]).slice(), this.zeroLineWidth = (l.zeroLineWidth || [4, 4]).slice(), this.zeroLineColor = o(l.zeroLineColor || [[0, 0, 0, 1], [0, 0, 0, 1]]), this.tickMarkLength = (l.tickMarkLength || [0, 0, 0, 0]).slice(), this.tickMarkWidth = (l.tickMarkWidth || [0, 0, 0, 0]).slice(), this.tickMarkColor = o(l.tickMarkColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]), this.titleCenter = (l.titleCenter || [0.5 * (c[0] + c[2]) / p, (c[3] + 120) / p]).slice(), this.titleEnable = !("titleEnable" in l) || !!l.titleEnable, this.titleAngle = l.titleAngle || 0, this.titleColor = (l.titleColor || [0, 0, 0, 1]).slice(), this.labelPad = (l.labelPad || [15, 15, 15, 15]).slice(), this.labelAngle = (l.labelAngle || [0, Math.PI / 2, 0, 3 * Math.PI / 2]).slice(), this.labelEnable = (l.labelEnable || [!0, !0, !0, !0]).slice(), this.labelColor = o(l.labelColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]), this.tickPad = (l.tickPad || [15, 15, 15, 15]).slice(), this.tickAngle = (l.tickAngle || [0, 0, 0, 0]).slice(), this.tickEnable = (l.tickEnable || [!0, !0, !0, !0]).slice(), this.tickColor = o(l.tickColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]), this.borderLineEnable = (l.borderLineEnable || [!0, !0, !0, !0]).slice(), this.borderLineWidth = (l.borderLineWidth || [2, 2, 2, 2]).slice(), this.borderLineColor = o(l.borderLineColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]);
                var y = l.ticks || [[], []], f = this._tickBounds;
                f[0] = f[1] = 1 / 0, f[2] = f[3] = -1 / 0;
                for (var _ = 0; _ < 2; ++_) {
                  var b = y[_].slice(0);
                  b.length !== 0 && (b.sort(h), f[_] = Math.min(f[_], b[0].x), f[_ + 2] = Math.max(f[_ + 2], b[b.length - 1].x));
                }
                this.grid.update({ bounds: f, ticks: y }), this.text.update({ bounds: f, ticks: y, labels: l.labels || ["x", "y"], labelSize: l.labelSize || [12, 12], labelFont: l.labelFont || ["sans-serif", "sans-serif"], title: l.title || "", titleSize: l.titleSize || 18, titleFont: l.titleFont || "sans-serif" }), this.static = !!l.static, this.setDirty();
              }, u.dispose = function() {
                this.box.dispose(), this.grid.dispose(), this.text.dispose(), this.line.dispose();
                for (var l = this.objects.length - 1; l >= 0; --l)
                  this.objects[l].dispose();
                for (this.objects.length = 0, l = this.overlays.length - 1; l >= 0; --l)
                  this.overlays[l].dispose();
                this.overlays.length = 0, this.gl = null;
              }, u.addObject = function(l) {
                this.objects.indexOf(l) < 0 && (this.objects.push(l), this.setDirty());
              }, u.removeObject = function(l) {
                for (var i = this.objects, p = 0; p < i.length; ++p)
                  if (i[p] === l) {
                    i.splice(p, 1), this.setDirty();
                    break;
                  }
              }, u.addOverlay = function(l) {
                this.overlays.indexOf(l) < 0 && (this.overlays.push(l), this.setOverlayDirty());
              }, u.removeOverlay = function(l) {
                for (var i = this.overlays, p = 0; p < i.length; ++p)
                  if (i[p] === l) {
                    i.splice(p, 1), this.setOverlayDirty();
                    break;
                  }
              };
            }, { "./lib/box": 113, "./lib/grid": 114, "./lib/line": 115, "./lib/text": 117, "gl-select-static": 131 }], 119: [function(g, k, x) {
              k.exports = function(u, o) {
                u = u || document.body, o = o || {};
                var h = [0.01, 1 / 0];
                "distanceLimits" in o && (h[0] = o.distanceLimits[0], h[1] = o.distanceLimits[1]), "zoomMin" in o && (h[0] = o.zoomMin), "zoomMax" in o && (h[1] = o.zoomMax);
                var l = r({ center: o.center || [0, 0, 0], up: o.up || [0, 1, 0], eye: o.eye || [0, 0, 10], mode: o.mode || "orbit", distanceLimits: h }), i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], p = 0, c = u.clientWidth, a = u.clientHeight, y = { keyBindingMode: "rotate", enableWheel: !0, view: l, element: u, delay: o.delay || 16, rotateSpeed: o.rotateSpeed || 1, zoomSpeed: o.zoomSpeed || 1, translateSpeed: o.translateSpeed || 1, flipX: !!o.flipX, flipY: !!o.flipY, modes: l.modes, _ortho: o._ortho || o.projection && o.projection.type === "orthographic" || !1, tick: function() {
                  var f = e(), _ = this.delay, b = f - 2 * _;
                  l.idle(f - _), l.recalcMatrix(b), l.flush(f - (100 + 2 * _));
                  for (var w = !0, T = l.computedMatrix, L = 0; L < 16; ++L)
                    w = w && i[L] === T[L], i[L] = T[L];
                  var A = u.clientWidth === c && u.clientHeight === a;
                  return c = u.clientWidth, a = u.clientHeight, w ? !A : (p = Math.exp(l.computedRadius[0]), !0);
                }, lookAt: function(f, _, b) {
                  l.lookAt(l.lastT(), f, _, b);
                }, rotate: function(f, _, b) {
                  l.rotate(l.lastT(), f, _, b);
                }, pan: function(f, _, b) {
                  l.pan(l.lastT(), f, _, b);
                }, translate: function(f, _, b) {
                  l.translate(l.lastT(), f, _, b);
                } };
                return Object.defineProperties(y, { matrix: { get: function() {
                  return l.computedMatrix;
                }, set: function(f) {
                  return l.setMatrix(l.lastT(), f), l.computedMatrix;
                }, enumerable: !0 }, mode: { get: function() {
                  return l.getMode();
                }, set: function(f) {
                  var _ = l.computedUp.slice(), b = l.computedEye.slice(), w = l.computedCenter.slice();
                  if (l.setMode(f), f === "turntable") {
                    var T = e();
                    l._active.lookAt(T, b, w, _), l._active.lookAt(T + 500, b, w, [0, 0, 1]), l._active.flush(T);
                  }
                  return l.getMode();
                }, enumerable: !0 }, center: { get: function() {
                  return l.computedCenter;
                }, set: function(f) {
                  return l.lookAt(l.lastT(), null, f), l.computedCenter;
                }, enumerable: !0 }, eye: { get: function() {
                  return l.computedEye;
                }, set: function(f) {
                  return l.lookAt(l.lastT(), f), l.computedEye;
                }, enumerable: !0 }, up: { get: function() {
                  return l.computedUp;
                }, set: function(f) {
                  return l.lookAt(l.lastT(), null, null, f), l.computedUp;
                }, enumerable: !0 }, distance: { get: function() {
                  return p;
                }, set: function(f) {
                  return l.setDistance(l.lastT(), f), f;
                }, enumerable: !0 }, distanceLimits: { get: function() {
                  return l.getDistanceLimits(h);
                }, set: function(f) {
                  return l.setDistanceLimits(f), f;
                }, enumerable: !0 } }), u.addEventListener("contextmenu", function(f) {
                  return f.preventDefault(), !1;
                }), y._lastX = -1, y._lastY = -1, y._lastMods = { shift: !1, control: !1, alt: !1, meta: !1 }, y.enableMouseListeners = function() {
                  function f(_, b, w, T) {
                    var L = y.keyBindingMode;
                    if (L !== !1) {
                      var A = L === "rotate", I = L === "pan", P = L === "zoom", S = !!T.control, E = !!T.alt, R = !!T.shift, z = !!(1 & _), j = !!(2 & _), H = !!(4 & _), Y = 1 / u.clientHeight, J = Y * (b - y._lastX), W = Y * (w - y._lastY), Z = y.flipX ? 1 : -1, re = y.flipY ? 1 : -1, V = Math.PI * y.rotateSpeed, B = e();
                      if (y._lastX !== -1 && y._lastY !== -1 && ((A && z && !S && !E && !R || z && !S && !E && R) && l.rotate(B, Z * V * J, -re * V * W, 0), (I && z && !S && !E && !R || j || z && S && !E && !R) && l.pan(B, -y.translateSpeed * J * p, y.translateSpeed * W * p, 0), P && z && !S && !E && !R || H || z && !S && E && !R)) {
                        var U = -y.zoomSpeed * W / window.innerHeight * (B - l.lastT()) * 100;
                        l.pan(B, 0, 0, p * (Math.exp(U) - 1));
                      }
                      return y._lastX = b, y._lastY = w, y._lastMods = T, !0;
                    }
                  }
                  y.mouseListener = n(u, f), u.addEventListener("touchstart", function(_) {
                    var b = t(_.changedTouches[0], u);
                    f(0, b[0], b[1], y._lastMods), f(1, b[0], b[1], y._lastMods);
                  }, !!d && { passive: !0 }), u.addEventListener("touchmove", function(_) {
                    var b = t(_.changedTouches[0], u);
                    f(1, b[0], b[1], y._lastMods), _.preventDefault();
                  }, !!d && { passive: !1 }), u.addEventListener("touchend", function(_) {
                    f(0, y._lastX, y._lastY, y._lastMods);
                  }, !!d && { passive: !0 }), y.wheelListener = s(u, function(_, b) {
                    if (y.keyBindingMode !== !1 && y.enableWheel) {
                      var w = y.flipX ? 1 : -1, T = y.flipY ? 1 : -1, L = e();
                      if (Math.abs(_) > Math.abs(b))
                        l.rotate(L, 0, 0, -_ * w * Math.PI * y.rotateSpeed / window.innerWidth);
                      else if (!y._ortho) {
                        var A = -y.zoomSpeed * T * b / window.innerHeight * (L - l.lastT()) / 20;
                        l.pan(L, 0, 0, p * (Math.exp(A) - 1));
                      }
                    }
                  }, !0);
                }, y.enableMouseListeners(), y;
              };
              var e = g("right-now"), r = g("3d-view"), n = g("mouse-change"), s = g("mouse-wheel"), t = g("mouse-event-offset"), d = g("has-passive-events");
            }, { "3d-view": 7, "has-passive-events": 232, "mouse-change": 247, "mouse-event-offset": 248, "mouse-wheel": 250, "right-now": 278 }], 120: [function(g, k, x) {
              var e = g("glslify"), r = g("gl-shader"), n = e([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
  uv = position;
  gl_Position = vec4(position, 0, 1);
}`]), s = e([`precision mediump float;
#define GLSLIFY 1

uniform sampler2D accumBuffer;
varying vec2 uv;

void main() {
  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));
  gl_FragColor = min(vec4(1,1,1,1), accum);
}`]);
              k.exports = function(t) {
                return r(t, n, s, null, [{ name: "position", type: "vec2" }]);
              };
            }, { "gl-shader": 132, glslify: 231 }], 121: [function(g, k, x) {
              var e = g("./camera.js"), r = g("gl-axes3d"), n = g("gl-axes3d/properties"), s = g("gl-spikes3d"), t = g("gl-select-static"), d = g("gl-fbo"), u = g("a-big-triangle"), o = g("mouse-change"), h = g("gl-mat4/perspective"), l = g("gl-mat4/ortho"), i = g("./lib/shader"), p = g("is-mobile")({ tablet: !0, featureDetect: !0 });
              function c() {
                this.mouse = [-1, -1], this.screen = null, this.distance = 1 / 0, this.index = null, this.dataCoordinate = null, this.dataPosition = null, this.object = null, this.data = null;
              }
              function a(f) {
                var _ = Math.round(Math.log(Math.abs(f)) / Math.log(10));
                if (_ < 0) {
                  var b = Math.round(Math.pow(10, -_));
                  return Math.ceil(f * b) / b;
                }
                return _ > 0 ? (b = Math.round(Math.pow(10, _)), Math.ceil(f / b) * b) : Math.ceil(f);
              }
              function y(f) {
                return typeof f != "boolean" || f;
              }
              k.exports = { createScene: function(f) {
                (f = f || {}).camera = f.camera || {};
                var _ = f.canvas;
                _ || (_ = document.createElement("canvas"), f.container ? f.container.appendChild(_) : document.body.appendChild(_));
                var b = f.gl;
                if (b || (f.glOptions && (p = !!f.glOptions.preserveDrawingBuffer), b = function(ue, ye) {
                  var Ae = null;
                  try {
                    (Ae = ue.getContext("webgl", ye)) || (Ae = ue.getContext("experimental-webgl", ye));
                  } catch {
                    return null;
                  }
                  return Ae;
                }(_, f.glOptions || { premultipliedAlpha: !0, antialias: !0, preserveDrawingBuffer: p })), !b)
                  throw new Error("webgl not supported");
                var w = f.bounds || [[-10, -10, -10], [10, 10, 10]], T = new c(), L = d(b, b.drawingBufferWidth, b.drawingBufferHeight, { preferFloat: !p }), A = i(b), I = f.cameraObject && f.cameraObject._ortho === !0 || f.camera.projection && f.camera.projection.type === "orthographic" || !1, P = { eye: f.camera.eye || [2, 0, 0], center: f.camera.center || [0, 0, 0], up: f.camera.up || [0, 1, 0], zoomMin: f.camera.zoomMax || 0.1, zoomMax: f.camera.zoomMin || 100, mode: f.camera.mode || "turntable", _ortho: I }, S = f.axes || {}, E = r(b, S);
                E.enable = !S.disable;
                var R = f.spikes || {}, z = s(b, R), j = [], H = [], Y = [], J = [], W = !0, Z = !0, re = new Array(16), V = new Array(16), B = { view: null, projection: re, model: V, _ortho: !1 }, U = (Z = !0, [b.drawingBufferWidth, b.drawingBufferHeight]), ee = f.cameraObject || e(_, P), N = { gl: b, contextLost: !1, pixelRatio: f.pixelRatio || 1, canvas: _, selection: T, camera: ee, axes: E, axesPixels: null, spikes: z, bounds: w, objects: j, shape: U, aspect: f.aspectRatio || [1, 1, 1], pickRadius: f.pickRadius || 10, zNear: f.zNear || 0.01, zFar: f.zFar || 1e3, fovy: f.fovy || Math.PI / 4, clearColor: f.clearColor || [0, 0, 0, 0], autoResize: y(f.autoResize), autoBounds: y(f.autoBounds), autoScale: !!f.autoScale, autoCenter: y(f.autoCenter), clipToBounds: y(f.clipToBounds), snapToData: !!f.snapToData, onselect: f.onselect || null, onrender: f.onrender || null, onclick: f.onclick || null, cameraParams: B, oncontextloss: null, mouseListener: null, _stopped: !1, getAspectratio: function() {
                  return { x: this.aspect[0], y: this.aspect[1], z: this.aspect[2] };
                }, setAspectratio: function(ue) {
                  this.aspect[0] = ue.x, this.aspect[1] = ue.y, this.aspect[2] = ue.z, Z = !0;
                }, setBounds: function(ue, ye) {
                  this.bounds[0][ue] = ye.min, this.bounds[1][ue] = ye.max;
                }, setClearColor: function(ue) {
                  this.clearColor = ue;
                }, clearRGBA: function() {
                  this.gl.clearColor(this.clearColor[0], this.clearColor[1], this.clearColor[2], this.clearColor[3]), this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);
                } }, K = [b.drawingBufferWidth / N.pixelRatio | 0, b.drawingBufferHeight / N.pixelRatio | 0];
                function X() {
                  if (!N._stopped && N.autoResize) {
                    var ue = _.parentNode, ye = 1, Ae = 1;
                    ue && ue !== document.body ? (ye = ue.clientWidth, Ae = ue.clientHeight) : (ye = window.innerWidth, Ae = window.innerHeight);
                    var pe = 0 | Math.ceil(ye * N.pixelRatio), ge = 0 | Math.ceil(Ae * N.pixelRatio);
                    if (pe !== _.width || ge !== _.height) {
                      _.width = pe, _.height = ge;
                      var we = _.style;
                      we.position = we.position || "absolute", we.left = "0px", we.top = "0px", we.width = ye + "px", we.height = Ae + "px", W = !0;
                    }
                  }
                }
                N.autoResize && X();
                function te() {
                  for (var ue = j.length, ye = J.length, Ae = 0; Ae < ye; ++Ae)
                    Y[Ae] = 0;
                  e:
                    for (Ae = 0; Ae < ue; ++Ae) {
                      var pe = j[Ae], ge = pe.pickSlots;
                      if (ge) {
                        for (var we = 0; we < ye; ++we)
                          if (Y[we] + ge < 255) {
                            H[Ae] = we, pe.setPickBase(Y[we] + 1), Y[we] += ge;
                            continue e;
                          }
                        var se = t(b, U);
                        H[Ae] = ye, J.push(se), Y.push(ge), pe.setPickBase(1), ye += 1;
                      } else
                        H[Ae] = -1;
                    }
                  for (; ye > 0 && Y[ye - 1] === 0; )
                    Y.pop(), J.pop().dispose();
                }
                function ie() {
                  if (N.contextLost)
                    return !0;
                  b.isContextLost() && (N.contextLost = !0, N.mouseListener.enabled = !1, N.selection.object = null, N.oncontextloss && N.oncontextloss());
                }
                window.addEventListener("resize", X), N.update = function(ue) {
                  N._stopped || (W = !0, Z = !0);
                }, N.add = function(ue) {
                  N._stopped || (ue.axes = E, j.push(ue), H.push(-1), W = !0, Z = !0, te());
                }, N.remove = function(ue) {
                  if (!N._stopped) {
                    var ye = j.indexOf(ue);
                    ye < 0 || (j.splice(ye, 1), H.pop(), W = !0, Z = !0, te());
                  }
                }, N.dispose = function() {
                  if (!N._stopped && (N._stopped = !0, window.removeEventListener("resize", X), _.removeEventListener("webglcontextlost", ie), N.mouseListener.enabled = !1, !N.contextLost)) {
                    E.dispose(), z.dispose();
                    for (var ue = 0; ue < j.length; ++ue)
                      j[ue].dispose();
                    for (L.dispose(), ue = 0; ue < J.length; ++ue)
                      J[ue].dispose();
                    A.dispose(), b = null, E = null, z = null, j = [];
                  }
                }, N._mouseRotating = !1, N._prevButtons = 0, N.enableMouseListeners = function() {
                  N.mouseListener = o(_, function(ue, ye, Ae) {
                    if (!N._stopped) {
                      var pe = J.length, ge = j.length, we = T.object;
                      T.distance = 1 / 0, T.mouse[0] = ye, T.mouse[1] = Ae, T.object = null, T.screen = null, T.dataCoordinate = T.dataPosition = null;
                      var se = !1;
                      if (ue && N._prevButtons)
                        N._mouseRotating = !0;
                      else {
                        N._mouseRotating && (Z = !0), N._mouseRotating = !1;
                        for (var de = 0; de < pe; ++de) {
                          var Te = J[de].query(ye, K[1] - Ae - 1, N.pickRadius);
                          if (Te) {
                            if (Te.distance > T.distance)
                              continue;
                            for (var Ee = 0; Ee < ge; ++Ee) {
                              var Me = j[Ee];
                              if (H[Ee] === de) {
                                var ze = Me.pick(Te);
                                ze && (T.buttons = ue, T.screen = Te.coord, T.distance = Te.distance, T.object = Me, T.index = ze.distance, T.dataPosition = ze.position, T.dataCoordinate = ze.dataCoordinate, T.data = ze, se = !0);
                              }
                            }
                          }
                        }
                      }
                      we && we !== T.object && (we.highlight && we.highlight(null), W = !0), T.object && (T.object.highlight && T.object.highlight(T.data), W = !0), (se = se || T.object !== we) && N.onselect && N.onselect(T), 1 & ue && !(1 & N._prevButtons) && N.onclick && N.onclick(T), N._prevButtons = ue;
                    }
                  });
                }, _.addEventListener("webglcontextlost", ie);
                var le = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], oe = [le[0].slice(), le[1].slice()];
                function ve() {
                  if (!ie()) {
                    X();
                    var ue = N.camera.tick();
                    B.view = N.camera.matrix, W = W || ue, Z = Z || ue, E.pixelRatio = N.pixelRatio, z.pixelRatio = N.pixelRatio;
                    var ye = j.length, Ae = le[0], pe = le[1];
                    Ae[0] = Ae[1] = Ae[2] = 1 / 0, pe[0] = pe[1] = pe[2] = -1 / 0;
                    for (var ge = 0; ge < ye; ++ge) {
                      (Pe = j[ge]).pixelRatio = N.pixelRatio, Pe.axes = N.axes, W = W || !!Pe.dirty, Z = Z || !!Pe.dirty;
                      var we = Pe.bounds;
                      if (we)
                        for (var se = we[0], de = we[1], Te = 0; Te < 3; ++Te)
                          Ae[Te] = Math.min(Ae[Te], se[Te]), pe[Te] = Math.max(pe[Te], de[Te]);
                    }
                    var Ee = N.bounds;
                    if (N.autoBounds)
                      for (Te = 0; Te < 3; ++Te) {
                        if (pe[Te] < Ae[Te])
                          Ae[Te] = -1, pe[Te] = 1;
                        else {
                          Ae[Te] === pe[Te] && (Ae[Te] -= 1, pe[Te] += 1);
                          var Me = 0.05 * (pe[Te] - Ae[Te]);
                          Ae[Te] = Ae[Te] - Me, pe[Te] = pe[Te] + Me;
                        }
                        Ee[0][Te] = Ae[Te], Ee[1][Te] = pe[Te];
                      }
                    var ze = !1;
                    for (Te = 0; Te < 3; ++Te)
                      ze = ze || oe[0][Te] !== Ee[0][Te] || oe[1][Te] !== Ee[1][Te], oe[0][Te] = Ee[0][Te], oe[1][Te] = Ee[1][Te];
                    if (Z = Z || ze, W = W || ze) {
                      if (ze) {
                        var Ie = [0, 0, 0];
                        for (ge = 0; ge < 3; ++ge)
                          Ie[ge] = a((Ee[1][ge] - Ee[0][ge]) / 10);
                        E.autoTicks ? E.update({ bounds: Ee, tickSpacing: Ie }) : E.update({ bounds: Ee });
                      }
                      var Oe = b.drawingBufferWidth, Ze = b.drawingBufferHeight;
                      for (U[0] = Oe, U[1] = Ze, K[0] = 0 | Math.max(Oe / N.pixelRatio, 1), K[1] = 0 | Math.max(Ze / N.pixelRatio, 1), function(De, Ge) {
                        var Qe = De.bounds, ot = De.cameraParams, vt = ot.projection, bt = ot.model, yt = De.gl.drawingBufferWidth, tt = De.gl.drawingBufferHeight, Ke = De.zNear, mt = De.zFar, Ft = De.fovy, Vt = yt / tt;
                        Ge ? (l(vt, -Vt, Vt, -1, 1, Ke, mt), ot._ortho = !0) : (h(vt, Ft, Vt, Ke, mt), ot._ortho = !1);
                        for (var Xt = 0; Xt < 16; ++Xt)
                          bt[Xt] = 0;
                        bt[15] = 1;
                        var Gt = 0;
                        for (Xt = 0; Xt < 3; ++Xt)
                          Gt = Math.max(Gt, Qe[1][Xt] - Qe[0][Xt]);
                        for (Xt = 0; Xt < 3; ++Xt)
                          De.autoScale ? bt[5 * Xt] = De.aspect[Xt] / (Qe[1][Xt] - Qe[0][Xt]) : bt[5 * Xt] = 1 / Gt, De.autoCenter && (bt[12 + Xt] = 0.5 * -bt[5 * Xt] * (Qe[0][Xt] + Qe[1][Xt]));
                      }(N, I), ge = 0; ge < ye; ++ge)
                        (Pe = j[ge]).axesBounds = Ee, N.clipToBounds && (Pe.clipBounds = Ee);
                      T.object && (N.snapToData ? z.position = T.dataCoordinate : z.position = T.dataPosition, z.bounds = Ee), Z && (Z = !1, function() {
                        if (!ie()) {
                          b.colorMask(!0, !0, !0, !0), b.depthMask(!0), b.disable(b.BLEND), b.enable(b.DEPTH_TEST), b.depthFunc(b.LEQUAL);
                          for (var De = j.length, Ge = J.length, Qe = 0; Qe < Ge; ++Qe) {
                            var ot = J[Qe];
                            ot.shape = K, ot.begin();
                            for (var vt = 0; vt < De; ++vt)
                              if (H[vt] === Qe) {
                                var bt = j[vt];
                                bt.drawPick && (bt.pixelRatio = 1, bt.drawPick(B));
                              }
                            ot.end();
                          }
                        }
                      }()), N.axesPixels = n(N.axes, B, Oe, Ze), N.onrender && N.onrender(), b.bindFramebuffer(b.FRAMEBUFFER, null), b.viewport(0, 0, Oe, Ze), N.clearRGBA(), b.depthMask(!0), b.colorMask(!0, !0, !0, !0), b.enable(b.DEPTH_TEST), b.depthFunc(b.LEQUAL), b.disable(b.BLEND), b.disable(b.CULL_FACE);
                      var Fe = !1;
                      for (E.enable && (Fe = Fe || E.isTransparent(), E.draw(B)), z.axes = E, T.object && z.draw(B), b.disable(b.CULL_FACE), ge = 0; ge < ye; ++ge)
                        (Pe = j[ge]).axes = E, Pe.pixelRatio = N.pixelRatio, Pe.isOpaque && Pe.isOpaque() && Pe.draw(B), Pe.isTransparent && Pe.isTransparent() && (Fe = !0);
                      if (Fe) {
                        for (L.shape = U, L.bind(), b.clear(b.DEPTH_BUFFER_BIT), b.colorMask(!1, !1, !1, !1), b.depthMask(!0), b.depthFunc(b.LESS), E.enable && E.isTransparent() && E.drawTransparent(B), ge = 0; ge < ye; ++ge)
                          (Pe = j[ge]).isOpaque && Pe.isOpaque() && Pe.draw(B);
                        for (b.enable(b.BLEND), b.blendEquation(b.FUNC_ADD), b.blendFunc(b.ONE, b.ONE_MINUS_SRC_ALPHA), b.colorMask(!0, !0, !0, !0), b.depthMask(!1), b.clearColor(0, 0, 0, 0), b.clear(b.COLOR_BUFFER_BIT), E.isTransparent() && E.drawTransparent(B), ge = 0; ge < ye; ++ge) {
                          var Pe;
                          (Pe = j[ge]).isTransparent && Pe.isTransparent() && Pe.drawTransparent(B);
                        }
                        b.bindFramebuffer(b.FRAMEBUFFER, null), b.blendFunc(b.ONE, b.ONE_MINUS_SRC_ALPHA), b.disable(b.DEPTH_TEST), A.bind(), L.color[0].bind(0), A.uniforms.accumBuffer = 0, u(b), b.disable(b.BLEND);
                      }
                      for (W = !1, ge = 0; ge < ye; ++ge)
                        j[ge].dirty = !1;
                    }
                  }
                }
                return N.enableMouseListeners(), function ue() {
                  N._stopped || N.contextLost || (ve(), requestAnimationFrame(ue));
                }(), N.redraw = function() {
                  N._stopped || (W = !0, ve());
                }, N;
              }, createCamera: e };
            }, { "./camera.js": 119, "./lib/shader": 120, "a-big-triangle": 8, "gl-axes3d": 70, "gl-axes3d/properties": 77, "gl-fbo": 86, "gl-mat4/ortho": 101, "gl-mat4/perspective": 102, "gl-select-static": 131, "gl-spikes3d": 141, "is-mobile": 238, "mouse-change": 247 }], 122: [function(g, k, x) {
              var e = g("glslify");
              x.pointVertex = e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;

uniform mat3 matrix;
uniform float pointSize;
uniform float pointCloud;

highp float rand(vec2 co) {
  highp float a = 12.9898;
  highp float b = 78.233;
  highp float c = 43758.5453;
  highp float d = dot(co.xy, vec2(a, b));
  highp float e = mod(d, 3.14);
  return fract(sin(e) * c);
}

void main() {
  vec3 hgPosition = matrix * vec3(position, 1);
  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);
    // if we don't jitter the point size a bit, overall point cloud
    // saturation 'jumps' on zooming, which is disturbing and confusing
  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);
  if(pointCloud != 0.0) { // pointCloud is truthy
    // get the same square surface as circle would be
    gl_PointSize *= 0.886;
  }
}`]), x.pointFragment = e([`precision mediump float;
#define GLSLIFY 1

uniform vec4 color, borderColor;
uniform float centerFraction;
uniform float pointCloud;

void main() {
  float radius;
  vec4 baseColor;
  if(pointCloud != 0.0) { // pointCloud is truthy
    if(centerFraction == 1.0) {
      gl_FragColor = color;
    } else {
      gl_FragColor = mix(borderColor, color, centerFraction);
    }
  } else {
    radius = length(2.0 * gl_PointCoord.xy - 1.0);
    if(radius > 1.0) {
      discard;
    }
    baseColor = mix(borderColor, color, step(radius, centerFraction));
    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);
  }
}
`]), x.pickVertex = e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;
attribute vec4 pickId;

uniform mat3 matrix;
uniform float pointSize;
uniform vec4 pickOffset;

varying vec4 fragId;

void main() {
  vec3 hgPosition = matrix * vec3(position, 1);
  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);
  gl_PointSize = pointSize;

  vec4 id = pickId + pickOffset;
  id.y += floor(id.x / 256.0);
  id.x -= floor(id.x / 256.0) * 256.0;

  id.z += floor(id.y / 256.0);
  id.y -= floor(id.y / 256.0) * 256.0;

  id.w += floor(id.z / 256.0);
  id.z -= floor(id.z / 256.0) * 256.0;

  fragId = id;
}
`]), x.pickFragment = e([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragId;

void main() {
  float radius = length(2.0 * gl_PointCoord.xy - 1.0);
  if(radius > 1.0) {
    discard;
  }
  gl_FragColor = fragId / 255.0;
}
`]);
            }, { glslify: 231 }], 123: [function(g, k, x) {
              var e = g("gl-shader"), r = g("gl-buffer"), n = g("typedarray-pool"), s = g("./lib/shader");
              function t(h, l, i, p, c) {
                this.plot = h, this.offsetBuffer = l, this.pickBuffer = i, this.shader = p, this.pickShader = c, this.sizeMin = 0.5, this.sizeMinCap = 2, this.sizeMax = 20, this.areaRatio = 1, this.pointCount = 0, this.color = [1, 0, 0, 1], this.borderColor = [0, 0, 0, 1], this.blend = !1, this.pickOffset = 0, this.points = null;
              }
              k.exports = function(h, l) {
                var i = h.gl, p = r(i), c = r(i), a = e(i, s.pointVertex, s.pointFragment), y = e(i, s.pickVertex, s.pickFragment), f = new t(h, p, c, a, y);
                return f.update(l), h.addObject(f), f;
              };
              var d, u, o = t.prototype;
              o.dispose = function() {
                this.shader.dispose(), this.pickShader.dispose(), this.offsetBuffer.dispose(), this.pickBuffer.dispose(), this.plot.removeObject(this);
              }, o.update = function(h) {
                var l;
                function i(b, w) {
                  return b in h ? h[b] : w;
                }
                h = h || {}, this.sizeMin = i("sizeMin", 0.5), this.sizeMax = i("sizeMax", 20), this.color = i("color", [1, 0, 0, 1]).slice(), this.areaRatio = i("areaRatio", 1), this.borderColor = i("borderColor", [0, 0, 0, 1]).slice(), this.blend = i("blend", !1);
                var p = h.positions.length >>> 1, c = h.positions instanceof Float32Array, a = h.idToIndex instanceof Int32Array && h.idToIndex.length >= p, y = h.positions, f = c ? y : n.mallocFloat32(y.length), _ = a ? h.idToIndex : n.mallocInt32(p);
                if (c || f.set(y), !a)
                  for (f.set(y), l = 0; l < p; l++)
                    _[l] = l;
                this.points = y, this.offsetBuffer.update(f), this.pickBuffer.update(_), c || n.free(f), a || n.free(_), this.pointCount = p, this.pickOffset = 0;
              }, o.unifiedDraw = (d = [1, 0, 0, 0, 1, 0, 0, 0, 1], u = [0, 0, 0, 0], function(h) {
                var l = h !== void 0, i = l ? this.pickShader : this.shader, p = this.plot.gl, c = this.plot.dataBox;
                if (this.pointCount === 0)
                  return h;
                var a = c[2] - c[0], y = c[3] - c[1], f = function(T, L) {
                  var A, I = 0, P = T.length >>> 1;
                  for (A = 0; A < P; A++) {
                    var S = T[2 * A], E = T[2 * A + 1];
                    S >= L[0] && S <= L[2] && E >= L[1] && E <= L[3] && I++;
                  }
                  return I;
                }(this.points, c), _ = this.plot.pickPixelRatio * Math.max(Math.min(this.sizeMinCap, this.sizeMin), Math.min(this.sizeMax, this.sizeMax / Math.pow(f, 0.33333)));
                d[0] = 2 / a, d[4] = 2 / y, d[6] = -2 * c[0] / a - 1, d[7] = -2 * c[1] / y - 1, this.offsetBuffer.bind(), i.bind(), i.attributes.position.pointer(), i.uniforms.matrix = d, i.uniforms.color = this.color, i.uniforms.borderColor = this.borderColor, i.uniforms.pointCloud = _ < 5, i.uniforms.pointSize = _, i.uniforms.centerFraction = Math.min(1, Math.max(0, Math.sqrt(1 - this.areaRatio))), l && (u[0] = 255 & h, u[1] = h >> 8 & 255, u[2] = h >> 16 & 255, u[3] = h >> 24 & 255, this.pickBuffer.bind(), i.attributes.pickId.pointer(p.UNSIGNED_BYTE), i.uniforms.pickOffset = u, this.pickOffset = h);
                var b = p.getParameter(p.BLEND), w = p.getParameter(p.DITHER);
                return b && !this.blend && p.disable(p.BLEND), w && p.disable(p.DITHER), p.drawArrays(p.POINTS, 0, this.pointCount), b && !this.blend && p.enable(p.BLEND), w && p.enable(p.DITHER), h + this.pointCount;
              }), o.draw = o.unifiedDraw, o.drawPick = o.unifiedDraw, o.pick = function(h, l, i) {
                var p = this.pickOffset, c = this.pointCount;
                if (i < p || i >= p + c)
                  return null;
                var a = i - p, y = this.points;
                return { object: this, pointId: a, dataCoord: [y[2 * a], y[2 * a + 1]] };
              };
            }, { "./lib/shader": 122, "gl-buffer": 78, "gl-shader": 132, "typedarray-pool": 308 }], 124: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t, d, u, o, h, l = r[0], i = r[1], p = r[2], c = r[3], a = n[0], y = n[1], f = n[2], _ = n[3];
                return (d = l * a + i * y + p * f + c * _) < 0 && (d = -d, a = -a, y = -y, f = -f, _ = -_), 1 - d > 1e-6 ? (t = Math.acos(d), u = Math.sin(t), o = Math.sin((1 - s) * t) / u, h = Math.sin(s * t) / u) : (o = 1 - s, h = s), e[0] = o * l + h * a, e[1] = o * i + h * y, e[2] = o * p + h * f, e[3] = o * c + h * _, e;
              };
            }, {}], 125: [function(g, k, x) {
              k.exports = function(e) {
                return e || e === 0 ? e.toString() : "";
              };
            }, {}], 126: [function(g, k, x) {
              var e = g("vectorize-text");
              k.exports = function(n, s, t) {
                var d = r[s];
                if (d || (d = r[s] = {}), n in d)
                  return d[n];
                var u = { textAlign: "center", textBaseline: "middle", lineHeight: 1, font: s, lineSpacing: 1.25, styletags: { breaklines: !0, bolds: !0, italics: !0, subscripts: !0, superscripts: !0 }, triangles: !0 }, o = e(n, u);
                u.triangles = !1;
                var h, l, i = e(n, u);
                if (t && t !== 1) {
                  for (h = 0; h < o.positions.length; ++h)
                    for (l = 0; l < o.positions[h].length; ++l)
                      o.positions[h][l] /= t;
                  for (h = 0; h < i.positions.length; ++h)
                    for (l = 0; l < i.positions[h].length; ++l)
                      i.positions[h][l] /= t;
                }
                var p = [[1 / 0, 1 / 0], [-1 / 0, -1 / 0]], c = i.positions.length;
                for (h = 0; h < c; ++h) {
                  var a = i.positions[h];
                  for (l = 0; l < 2; ++l)
                    p[0][l] = Math.min(p[0][l], a[l]), p[1][l] = Math.max(p[1][l], a[l]);
                }
                return d[n] = [o, i, p];
              };
              var r = {};
            }, { "vectorize-text": 311 }], 127: [function(g, k, x) {
              var e = g("gl-shader"), r = g("glslify"), n = r([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform vec4 highlightId;
uniform float highlightScale;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = 1.0;
    if(distance(highlightId, id) < 0.0001) {
      scale = highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1);
    vec4 viewPosition = view * worldPosition;
    viewPosition = viewPosition / viewPosition.w;
    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]), s = r([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float highlightScale, pixelRatio;
uniform vec4 highlightId;

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = pixelRatio;
    if(distance(highlightId.bgr, id.bgr) < 0.001) {
      scale *= highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1.0);
    vec4 viewPosition = view * worldPosition;
    vec4 clipPosition = projection * viewPosition;
    clipPosition /= clipPosition.w;

    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]), t = r([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform float highlightScale;
uniform vec4 highlightId;
uniform vec3 axes[2];
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float scale, pixelRatio;

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float lscale = pixelRatio * scale;
    if(distance(highlightId, id) < 0.0001) {
      lscale *= highlightScale;
    }

    vec4 clipCenter   = projection * view * model * vec4(position, 1);
    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;
    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = dataPosition;
  }
}
`]), d = r([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 fragClipBounds[2];
uniform float opacity;

varying vec4 interpColor;
varying vec3 dataCoordinate;

void main() {
  if (
    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||
    interpColor.a * opacity == 0.
  ) discard;
  gl_FragColor = interpColor * opacity;
}
`]), u = r([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 fragClipBounds[2];
uniform float pickGroup;

varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;

  gl_FragColor = vec4(pickGroup, pickId.bgr);
}`]), o = [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "glyph", type: "vec2" }, { name: "id", type: "vec4" }], h = { vertex: n, fragment: d, attributes: o }, l = { vertex: s, fragment: d, attributes: o }, i = { vertex: t, fragment: d, attributes: o }, p = { vertex: n, fragment: u, attributes: o }, c = { vertex: s, fragment: u, attributes: o }, a = { vertex: t, fragment: u, attributes: o };
              function y(f, _) {
                var b = e(f, _), w = b.attributes;
                return w.position.location = 0, w.color.location = 1, w.glyph.location = 2, w.id.location = 3, b;
              }
              x.createPerspective = function(f) {
                return y(f, h);
              }, x.createOrtho = function(f) {
                return y(f, l);
              }, x.createProject = function(f) {
                return y(f, i);
              }, x.createPickPerspective = function(f) {
                return y(f, p);
              }, x.createPickOrtho = function(f) {
                return y(f, c);
              }, x.createPickProject = function(f) {
                return y(f, a);
              };
            }, { "gl-shader": 132, glslify: 231 }], 128: [function(g, k, x) {
              var e = g("is-string-blank"), r = g("gl-buffer"), n = g("gl-vao"), s = g("typedarray-pool"), t = g("gl-mat4/multiply"), d = g("./lib/shaders"), u = g("./lib/glyphs"), o = g("./lib/get-simple-string"), h = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
              function l(Y, J) {
                var W = Y[0], Z = Y[1], re = Y[2], V = Y[3];
                return Y[0] = J[0] * W + J[4] * Z + J[8] * re + J[12] * V, Y[1] = J[1] * W + J[5] * Z + J[9] * re + J[13] * V, Y[2] = J[2] * W + J[6] * Z + J[10] * re + J[14] * V, Y[3] = J[3] * W + J[7] * Z + J[11] * re + J[15] * V, Y;
              }
              function i(Y, J, W, Z) {
                return l(Z, Z), l(Z, Z), l(Z, Z);
              }
              function p(Y, J) {
                this.index = Y, this.dataCoordinate = this.position = J;
              }
              function c(Y) {
                return Y === !0 || Y > 1 ? 1 : Y;
              }
              function a(Y, J, W, Z, re, V, B, U, ee, N, K, X) {
                this.gl = Y, this.pixelRatio = 1, this.shader = J, this.orthoShader = W, this.projectShader = Z, this.pointBuffer = re, this.colorBuffer = V, this.glyphBuffer = B, this.idBuffer = U, this.vao = ee, this.vertexCount = 0, this.lineVertexCount = 0, this.opacity = 1, this.hasAlpha = !1, this.lineWidth = 0, this.projectScale = [2 / 3, 2 / 3, 2 / 3], this.projectOpacity = [1, 1, 1], this.projectHasAlpha = !1, this.pickId = 0, this.pickPerspectiveShader = N, this.pickOrthoShader = K, this.pickProjectShader = X, this.points = [], this._selectResult = new p(0, [0, 0, 0]), this.useOrtho = !0, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.axesProject = [!0, !0, !0], this.axesBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.highlightId = [1, 1, 1, 1], this.highlightScale = 2, this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.dirty = !0;
              }
              k.exports = function(Y) {
                var J = Y.gl, W = d.createPerspective(J), Z = d.createOrtho(J), re = d.createProject(J), V = d.createPickPerspective(J), B = d.createPickOrtho(J), U = d.createPickProject(J), ee = r(J), N = r(J), K = r(J), X = r(J), te = n(J, [{ buffer: ee, size: 3, type: J.FLOAT }, { buffer: N, size: 4, type: J.FLOAT }, { buffer: K, size: 2, type: J.FLOAT }, { buffer: X, size: 4, type: J.UNSIGNED_BYTE, normalized: !0 }]), ie = new a(J, W, Z, re, ee, N, K, X, te, V, B, U);
                return ie.update(Y), ie;
              };
              var y = a.prototype;
              y.pickSlots = 1, y.setPickBase = function(Y) {
                this.pickId = Y;
              }, y.isTransparent = function() {
                if (this.hasAlpha)
                  return !0;
                for (var Y = 0; Y < 3; ++Y)
                  if (this.axesProject[Y] && this.projectHasAlpha)
                    return !0;
                return !1;
              }, y.isOpaque = function() {
                if (!this.hasAlpha)
                  return !0;
                for (var Y = 0; Y < 3; ++Y)
                  if (this.axesProject[Y] && !this.projectHasAlpha)
                    return !0;
                return !1;
              };
              var f = [0, 0], _ = [0, 0, 0], b = [0, 0, 0], w = [0, 0, 0, 1], T = [0, 0, 0, 1], L = h.slice(), A = [0, 0, 0], I = [[0, 0, 0], [0, 0, 0]];
              function P(Y) {
                return Y[0] = Y[1] = Y[2] = 0, Y;
              }
              function S(Y, J) {
                return Y[0] = J[0], Y[1] = J[1], Y[2] = J[2], Y[3] = 1, Y;
              }
              function E(Y, J, W, Z) {
                return Y[0] = J[0], Y[1] = J[1], Y[2] = J[2], Y[W] = Z, Y;
              }
              function R(Y, J, W, Z) {
                var re, V = J.axesProject, B = J.gl, U = Y.uniforms, ee = W.model || h, N = W.view || h, K = W.projection || h, X = J.axesBounds, te = function(Ee) {
                  for (var Me = I, ze = 0; ze < 2; ++ze)
                    for (var Ie = 0; Ie < 3; ++Ie)
                      Me[ze][Ie] = Math.max(Math.min(Ee[ze][Ie], 1e8), -1e8);
                  return Me;
                }(J.clipBounds);
                re = J.axes && J.axes.lastCubeProps ? J.axes.lastCubeProps.axis : [1, 1, 1], f[0] = 2 / B.drawingBufferWidth, f[1] = 2 / B.drawingBufferHeight, Y.bind(), U.view = N, U.projection = K, U.screenSize = f, U.highlightId = J.highlightId, U.highlightScale = J.highlightScale, U.clipBounds = te, U.pickGroup = J.pickId / 255, U.pixelRatio = Z;
                for (var ie = 0; ie < 3; ++ie)
                  if (V[ie]) {
                    U.scale = J.projectScale[ie], U.opacity = J.projectOpacity[ie];
                    for (var le = L, oe = 0; oe < 16; ++oe)
                      le[oe] = 0;
                    for (oe = 0; oe < 4; ++oe)
                      le[5 * oe] = 1;
                    le[5 * ie] = 0, re[ie] < 0 ? le[12 + ie] = X[0][ie] : le[12 + ie] = X[1][ie], t(le, ee, le), U.model = le;
                    var ve = (ie + 1) % 3, ue = (ie + 2) % 3, ye = P(_), Ae = P(b);
                    ye[ve] = 1, Ae[ue] = 1;
                    var pe = i(0, 0, 0, S(w, ye)), ge = i(0, 0, 0, S(T, Ae));
                    if (Math.abs(pe[1]) > Math.abs(ge[1])) {
                      var we = pe;
                      pe = ge, ge = we, we = ye, ye = Ae, Ae = we;
                      var se = ve;
                      ve = ue, ue = se;
                    }
                    pe[0] < 0 && (ye[ve] = -1), ge[1] > 0 && (Ae[ue] = -1);
                    var de = 0, Te = 0;
                    for (oe = 0; oe < 4; ++oe)
                      de += Math.pow(ee[4 * ve + oe], 2), Te += Math.pow(ee[4 * ue + oe], 2);
                    ye[ve] /= Math.sqrt(de), Ae[ue] /= Math.sqrt(Te), U.axes[0] = ye, U.axes[1] = Ae, U.fragClipBounds[0] = E(A, te[0], ie, -1e8), U.fragClipBounds[1] = E(A, te[1], ie, 1e8), J.vao.bind(), J.vao.draw(B.TRIANGLES, J.vertexCount), J.lineWidth > 0 && (B.lineWidth(J.lineWidth * Z), J.vao.draw(B.LINES, J.lineVertexCount, J.vertexCount)), J.vao.unbind();
                  }
              }
              var z = [[-1e8, -1e8, -1e8], [1e8, 1e8, 1e8]];
              function j(Y, J, W, Z, re, V, B) {
                var U = W.gl;
                if ((V === W.projectHasAlpha || B) && R(J, W, Z, re), V === W.hasAlpha || B) {
                  Y.bind();
                  var ee = Y.uniforms;
                  ee.model = Z.model || h, ee.view = Z.view || h, ee.projection = Z.projection || h, f[0] = 2 / U.drawingBufferWidth, f[1] = 2 / U.drawingBufferHeight, ee.screenSize = f, ee.highlightId = W.highlightId, ee.highlightScale = W.highlightScale, ee.fragClipBounds = z, ee.clipBounds = W.axes.bounds, ee.opacity = W.opacity, ee.pickGroup = W.pickId / 255, ee.pixelRatio = re, W.vao.bind(), W.vao.draw(U.TRIANGLES, W.vertexCount), W.lineWidth > 0 && (U.lineWidth(W.lineWidth * re), W.vao.draw(U.LINES, W.lineVertexCount, W.vertexCount)), W.vao.unbind();
                }
              }
              function H(Y, J, W, Z) {
                var re;
                re = Array.isArray(Y) ? J < Y.length ? Y[J] : void 0 : Y, re = o(re);
                var V = !0;
                e(re) && (re = "\u25BC", V = !1);
                var B = u(re, W, Z);
                return { mesh: B[0], lines: B[1], bounds: B[2], visible: V };
              }
              y.draw = function(Y) {
                j(this.useOrtho ? this.orthoShader : this.shader, this.projectShader, this, Y, this.pixelRatio, !1, !1);
              }, y.drawTransparent = function(Y) {
                j(this.useOrtho ? this.orthoShader : this.shader, this.projectShader, this, Y, this.pixelRatio, !0, !1);
              }, y.drawPick = function(Y) {
                j(this.useOrtho ? this.pickOrthoShader : this.pickPerspectiveShader, this.pickProjectShader, this, Y, 1, !0, !0);
              }, y.pick = function(Y) {
                if (!Y || Y.id !== this.pickId)
                  return null;
                var J = Y.value[2] + (Y.value[1] << 8) + (Y.value[0] << 16);
                if (J >= this.pointCount || J < 0)
                  return null;
                var W = this.points[J], Z = this._selectResult;
                Z.index = J;
                for (var re = 0; re < 3; ++re)
                  Z.position[re] = Z.dataCoordinate[re] = W[re];
                return Z;
              }, y.highlight = function(Y) {
                if (Y) {
                  var J = Y.index, W = 255 & J, Z = J >> 8 & 255, re = J >> 16 & 255;
                  this.highlightId = [W / 255, Z / 255, re / 255, 0];
                } else
                  this.highlightId = [1, 1, 1, 1];
              }, y.update = function(Y) {
                if ("perspective" in (Y = Y || {}) && (this.useOrtho = !Y.perspective), "orthographic" in Y && (this.useOrtho = !!Y.orthographic), "lineWidth" in Y && (this.lineWidth = Y.lineWidth), "project" in Y)
                  if (Array.isArray(Y.project))
                    this.axesProject = Y.project;
                  else {
                    var J = !!Y.project;
                    this.axesProject = [J, J, J];
                  }
                if ("projectScale" in Y)
                  if (Array.isArray(Y.projectScale))
                    this.projectScale = Y.projectScale.slice();
                  else {
                    var W = +Y.projectScale;
                    this.projectScale = [W, W, W];
                  }
                if (this.projectHasAlpha = !1, "projectOpacity" in Y) {
                  Array.isArray(Y.projectOpacity) ? this.projectOpacity = Y.projectOpacity.slice() : (W = +Y.projectOpacity, this.projectOpacity = [W, W, W]);
                  for (var Z = 0; Z < 3; ++Z)
                    this.projectOpacity[Z] = c(this.projectOpacity[Z]), this.projectOpacity[Z] < 1 && (this.projectHasAlpha = !0);
                }
                this.hasAlpha = !1, "opacity" in Y && (this.opacity = c(Y.opacity), this.opacity < 1 && (this.hasAlpha = !0)), this.dirty = !0;
                var re, V, B = Y.position, U = Y.font || "normal", ee = Y.alignment || [0, 0];
                if (ee.length === 2)
                  re = ee[0], V = ee[1];
                else
                  for (re = [], V = [], Z = 0; Z < ee.length; ++Z)
                    re[Z] = ee[Z][0], V[Z] = ee[Z][1];
                var N = [1 / 0, 1 / 0, 1 / 0], K = [-1 / 0, -1 / 0, -1 / 0], X = Y.glyph, te = Y.color, ie = Y.size, le = Y.angle, oe = Y.lineColor, ve = -1, ue = 0, ye = 0, Ae = 0;
                if (B.length) {
                  Ae = B.length;
                  e:
                    for (Z = 0; Z < Ae; ++Z) {
                      for (var pe = B[Z], ge = 0; ge < 3; ++ge)
                        if (isNaN(pe[ge]) || !isFinite(pe[ge]))
                          continue e;
                      var we = (Qe = H(X, Z, U, this.pixelRatio)).mesh, se = Qe.lines, de = Qe.bounds;
                      ue += 3 * we.cells.length, ye += 2 * se.edges.length;
                    }
                }
                var Te = ue + ye, Ee = s.mallocFloat(3 * Te), Me = s.mallocFloat(4 * Te), ze = s.mallocFloat(2 * Te), Ie = s.mallocUint32(Te);
                if (Te > 0) {
                  var Oe = 0, Ze = ue, Fe = [0, 0, 0, 1], Pe = [0, 0, 0, 1], De = Array.isArray(te) && Array.isArray(te[0]), Ge = Array.isArray(oe) && Array.isArray(oe[0]);
                  e:
                    for (Z = 0; Z < Ae; ++Z) {
                      for (ve += 1, pe = B[Z], ge = 0; ge < 3; ++ge) {
                        if (isNaN(pe[ge]) || !isFinite(pe[ge]))
                          continue e;
                        K[ge] = Math.max(K[ge], pe[ge]), N[ge] = Math.min(N[ge], pe[ge]);
                      }
                      we = (Qe = H(X, Z, U, this.pixelRatio)).mesh, se = Qe.lines, de = Qe.bounds;
                      var Qe, ot = Qe.visible;
                      if (ot)
                        if (Array.isArray(te)) {
                          if ((vt = De ? Z < te.length ? te[Z] : [0, 0, 0, 0] : te).length === 3) {
                            for (ge = 0; ge < 3; ++ge)
                              Fe[ge] = vt[ge];
                            Fe[3] = 1;
                          } else if (vt.length === 4) {
                            for (ge = 0; ge < 4; ++ge)
                              Fe[ge] = vt[ge];
                            !this.hasAlpha && vt[3] < 1 && (this.hasAlpha = !0);
                          }
                        } else
                          Fe[0] = Fe[1] = Fe[2] = 0, Fe[3] = 1;
                      else
                        Fe = [1, 1, 1, 0];
                      if (ot)
                        if (Array.isArray(oe)) {
                          var vt;
                          if ((vt = Ge ? Z < oe.length ? oe[Z] : [0, 0, 0, 0] : oe).length === 3) {
                            for (ge = 0; ge < 3; ++ge)
                              Pe[ge] = vt[ge];
                            Pe[ge] = 1;
                          } else if (vt.length === 4) {
                            for (ge = 0; ge < 4; ++ge)
                              Pe[ge] = vt[ge];
                            !this.hasAlpha && vt[3] < 1 && (this.hasAlpha = !0);
                          }
                        } else
                          Pe[0] = Pe[1] = Pe[2] = 0, Pe[3] = 1;
                      else
                        Pe = [1, 1, 1, 0];
                      var bt = 0.5;
                      ot ? Array.isArray(ie) ? bt = Z < ie.length ? +ie[Z] : 12 : ie ? bt = +ie : this.useOrtho && (bt = 12) : bt = 0;
                      var yt = 0;
                      Array.isArray(le) ? yt = Z < le.length ? +le[Z] : 0 : le && (yt = +le);
                      var tt = Math.cos(yt), Ke = Math.sin(yt);
                      for (pe = B[Z], ge = 0; ge < 3; ++ge)
                        K[ge] = Math.max(K[ge], pe[ge]), N[ge] = Math.min(N[ge], pe[ge]);
                      var mt = re, Ft = V;
                      mt = 0, Array.isArray(re) ? mt = Z < re.length ? re[Z] : 0 : re && (mt = re), Ft = 0, Array.isArray(V) ? Ft = Z < V.length ? V[Z] : 0 : V && (Ft = V);
                      var Vt = [mt *= mt > 0 ? 1 - de[0][0] : mt < 0 ? 1 + de[1][0] : 1, Ft *= Ft > 0 ? 1 - de[0][1] : Ft < 0 ? 1 + de[1][1] : 1], Xt = we.cells || [], Gt = we.positions || [];
                      for (ge = 0; ge < Xt.length; ++ge)
                        for (var nr = Xt[ge], It = 0; It < 3; ++It) {
                          for (var Be = 0; Be < 3; ++Be)
                            Ee[3 * Oe + Be] = pe[Be];
                          for (Be = 0; Be < 4; ++Be)
                            Me[4 * Oe + Be] = Fe[Be];
                          Ie[Oe] = ve;
                          var He = Gt[nr[It]];
                          ze[2 * Oe] = bt * (tt * He[0] - Ke * He[1] + Vt[0]), ze[2 * Oe + 1] = bt * (Ke * He[0] + tt * He[1] + Vt[1]), Oe += 1;
                        }
                      for (Xt = se.edges, Gt = se.positions, ge = 0; ge < Xt.length; ++ge)
                        for (nr = Xt[ge], It = 0; It < 2; ++It) {
                          for (Be = 0; Be < 3; ++Be)
                            Ee[3 * Ze + Be] = pe[Be];
                          for (Be = 0; Be < 4; ++Be)
                            Me[4 * Ze + Be] = Pe[Be];
                          Ie[Ze] = ve, He = Gt[nr[It]], ze[2 * Ze] = bt * (tt * He[0] - Ke * He[1] + Vt[0]), ze[2 * Ze + 1] = bt * (Ke * He[0] + tt * He[1] + Vt[1]), Ze += 1;
                        }
                    }
                }
                this.bounds = [N, K], this.points = B, this.pointCount = B.length, this.vertexCount = ue, this.lineVertexCount = ye, this.pointBuffer.update(Ee), this.colorBuffer.update(Me), this.glyphBuffer.update(ze), this.idBuffer.update(Ie), s.free(Ee), s.free(Me), s.free(ze), s.free(Ie);
              }, y.dispose = function() {
                this.shader.dispose(), this.orthoShader.dispose(), this.pickPerspectiveShader.dispose(), this.pickOrthoShader.dispose(), this.vao.dispose(), this.pointBuffer.dispose(), this.colorBuffer.dispose(), this.glyphBuffer.dispose(), this.idBuffer.dispose();
              };
            }, { "./lib/get-simple-string": 125, "./lib/glyphs": 126, "./lib/shaders": 127, "gl-buffer": 78, "gl-mat4/multiply": 100, "gl-vao": 150, "is-string-blank": 239, "typedarray-pool": 308 }], 129: [function(g, k, x) {
              var e = g("glslify");
              x.boxVertex = e([`precision mediump float;
#define GLSLIFY 1

attribute vec2 vertex;

uniform vec2 cornerA, cornerB;

void main() {
  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);
}
`]), x.boxFragment = e([`precision mediump float;
#define GLSLIFY 1

uniform vec4 color;

void main() {
  gl_FragColor = color;
}
`]);
            }, { glslify: 231 }], 130: [function(g, k, x) {
              var e = g("gl-shader"), r = g("gl-buffer"), n = g("./lib/shaders");
              function s(d, u, o) {
                this.plot = d, this.boxBuffer = u, this.boxShader = o, this.enabled = !0, this.selectBox = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.borderColor = [0, 0, 0, 1], this.innerFill = !1, this.innerColor = [0, 0, 0, 0.25], this.outerFill = !0, this.outerColor = [0, 0, 0, 0.5], this.borderWidth = 10;
              }
              k.exports = function(d, u) {
                var o = d.gl, h = r(o, [0, 0, 0, 1, 1, 0, 1, 1]), l = e(o, n.boxVertex, n.boxFragment), i = new s(d, h, l);
                return i.update(u), d.addOverlay(i), i;
              };
              var t = s.prototype;
              t.draw = function() {
                if (this.enabled) {
                  var d = this.plot, u = this.selectBox, o = this.borderWidth, h = (this.innerFill, this.innerColor), l = (this.outerFill, this.outerColor), i = this.borderColor, p = d.box, c = d.screenBox, a = d.dataBox, y = d.viewBox, f = d.pixelRatio, _ = (u[0] - a[0]) * (y[2] - y[0]) / (a[2] - a[0]) + y[0], b = (u[1] - a[1]) * (y[3] - y[1]) / (a[3] - a[1]) + y[1], w = (u[2] - a[0]) * (y[2] - y[0]) / (a[2] - a[0]) + y[0], T = (u[3] - a[1]) * (y[3] - y[1]) / (a[3] - a[1]) + y[1];
                  if (_ = Math.max(_, y[0]), b = Math.max(b, y[1]), w = Math.min(w, y[2]), T = Math.min(T, y[3]), !(w < _ || T < b)) {
                    p.bind();
                    var L = c[2] - c[0], A = c[3] - c[1];
                    if (this.outerFill && (p.drawBox(0, 0, L, b, l), p.drawBox(0, b, _, T, l), p.drawBox(0, T, L, A, l), p.drawBox(w, b, L, T, l)), this.innerFill && p.drawBox(_, b, w, T, h), o > 0) {
                      var I = o * f;
                      p.drawBox(_ - I, b - I, w + I, b + I, i), p.drawBox(_ - I, T - I, w + I, T + I, i), p.drawBox(_ - I, b - I, _ + I, T + I, i), p.drawBox(w - I, b - I, w + I, T + I, i);
                    }
                  }
                }
              }, t.update = function(d) {
                d = d || {}, this.innerFill = !!d.innerFill, this.outerFill = !!d.outerFill, this.innerColor = (d.innerColor || [0, 0, 0, 0.5]).slice(), this.outerColor = (d.outerColor || [0, 0, 0, 0.5]).slice(), this.borderColor = (d.borderColor || [0, 0, 0, 1]).slice(), this.borderWidth = d.borderWidth || 0, this.selectBox = (d.selectBox || this.selectBox).slice();
              }, t.dispose = function() {
                this.boxBuffer.dispose(), this.boxShader.dispose(), this.plot.removeOverlay(this);
              };
            }, { "./lib/shaders": 129, "gl-buffer": 78, "gl-shader": 132 }], 131: [function(g, k, x) {
              k.exports = function(o, h) {
                var l = h[0], i = h[1], p = e(o, l, i, {}), c = r.mallocUint8(l * i * 4);
                return new d(o, p, c);
              };
              var e = g("gl-fbo"), r = g("typedarray-pool"), n = g("ndarray"), s = g("bit-twiddle").nextPow2;
              function t(o, h, l, i, p) {
                this.coord = [o, h], this.id = l, this.value = i, this.distance = p;
              }
              function d(o, h, l) {
                this.gl = o, this.fbo = h, this.buffer = l, this._readTimeout = null;
                var i = this;
                this._readCallback = function() {
                  i.gl && (h.bind(), o.readPixels(0, 0, h.shape[0], h.shape[1], o.RGBA, o.UNSIGNED_BYTE, i.buffer), i._readTimeout = null);
                };
              }
              var u = d.prototype;
              Object.defineProperty(u, "shape", { get: function() {
                return this.gl ? this.fbo.shape.slice() : [0, 0];
              }, set: function(o) {
                if (this.gl) {
                  this.fbo.shape = o;
                  var h = this.fbo.shape[0], l = this.fbo.shape[1];
                  if (l * h * 4 > this.buffer.length) {
                    r.free(this.buffer);
                    for (var i = this.buffer = r.mallocUint8(s(l * h * 4)), p = 0; p < l * h * 4; ++p)
                      i[p] = 255;
                  }
                  return o;
                }
              } }), u.begin = function() {
                var o = this.gl;
                this.shape, o && (this.fbo.bind(), o.clearColor(1, 1, 1, 1), o.clear(o.COLOR_BUFFER_BIT | o.DEPTH_BUFFER_BIT));
              }, u.end = function() {
                var o = this.gl;
                o && (o.bindFramebuffer(o.FRAMEBUFFER, null), this._readTimeout || clearTimeout(this._readTimeout), this._readTimeout = setTimeout(this._readCallback, 1));
              }, u.query = function(o, h, l) {
                if (!this.gl)
                  return null;
                var i = this.fbo.shape.slice();
                o |= 0, h |= 0, typeof l != "number" && (l = 1);
                var p = 0 | Math.min(Math.max(o - l, 0), i[0]), c = 0 | Math.min(Math.max(o + l, 0), i[0]), a = 0 | Math.min(Math.max(h - l, 0), i[1]), y = 0 | Math.min(Math.max(h + l, 0), i[1]);
                if (c <= p || y <= a)
                  return null;
                var f = [c - p, y - a], _ = n(this.buffer, [f[0], f[1], 4], [4, 4 * i[0], 1], 4 * (p + i[0] * a)), b = function(L, A, I) {
                  for (var P = 1e8, S = -1, E = -1, R = L.shape[0], z = L.shape[1], j = 0; j < R; j++)
                    for (var H = 0; H < z; H++) {
                      var Y = L.get(j, H, 0), J = L.get(j, H, 1), W = L.get(j, H, 2), Z = L.get(j, H, 3);
                      if (Y < 255 || J < 255 || W < 255 || Z < 255) {
                        var re = A - j, V = I - H, B = re * re + V * V;
                        B < P && (P = B, S = j, E = H);
                      }
                    }
                  return [S, E, P];
                }(_.hi(f[0], f[1], 1), l, l), w = b[0], T = b[1];
                return w < 0 || Math.pow(this.radius, 2) < b[2] ? null : new t(w + p | 0, T + a | 0, _.get(w, T, 0), [_.get(w, T, 1), _.get(w, T, 2), _.get(w, T, 3)], Math.sqrt(b[2]));
              }, u.dispose = function() {
                this.gl && (this.fbo.dispose(), r.free(this.buffer), this.gl = null, this._readTimeout && clearTimeout(this._readTimeout));
              };
            }, { "bit-twiddle": 32, "gl-fbo": 86, ndarray: 259, "typedarray-pool": 308 }], 132: [function(g, k, x) {
              var e = g("./lib/create-uniforms"), r = g("./lib/create-attributes"), n = g("./lib/reflect"), s = g("./lib/shader-cache"), t = g("./lib/runtime-reflect"), d = g("./lib/GLError");
              function u(l) {
                this.gl = l, this.gl.lastAttribCount = 0, this._vref = this._fref = this._relink = this.vertShader = this.fragShader = this.program = this.attributes = this.uniforms = this.types = null;
              }
              var o = u.prototype;
              function h(l, i) {
                return l.name < i.name ? -1 : 1;
              }
              o.bind = function() {
                var l;
                this.program || this._relink();
                var i = this.gl.getProgramParameter(this.program, this.gl.ACTIVE_ATTRIBUTES), p = this.gl.lastAttribCount;
                if (i > p)
                  for (l = p; l < i; l++)
                    this.gl.enableVertexAttribArray(l);
                else if (p > i)
                  for (l = i; l < p; l++)
                    this.gl.disableVertexAttribArray(l);
                this.gl.lastAttribCount = i, this.gl.useProgram(this.program);
              }, o.dispose = function() {
                for (var l = this.gl.lastAttribCount, i = 0; i < l; i++)
                  this.gl.disableVertexAttribArray(i);
                this.gl.lastAttribCount = 0, this._fref && this._fref.dispose(), this._vref && this._vref.dispose(), this.attributes = this.types = this.vertShader = this.fragShader = this.program = this._relink = this._fref = this._vref = null;
              }, o.update = function(l, i, p, c) {
                if (!i || arguments.length === 1) {
                  var a = l;
                  l = a.vertex, i = a.fragment, p = a.uniforms, c = a.attributes;
                }
                var y = this, f = y.gl, _ = y._vref;
                y._vref = s.shader(f, f.VERTEX_SHADER, l), _ && _.dispose(), y.vertShader = y._vref.shader;
                var b = this._fref;
                if (y._fref = s.shader(f, f.FRAGMENT_SHADER, i), b && b.dispose(), y.fragShader = y._fref.shader, !p || !c) {
                  var w = f.createProgram();
                  if (f.attachShader(w, y.fragShader), f.attachShader(w, y.vertShader), f.linkProgram(w), !f.getProgramParameter(w, f.LINK_STATUS)) {
                    var T = f.getProgramInfoLog(w);
                    throw new d(T, "Error linking program:" + T);
                  }
                  p = p || t.uniforms(f, w), c = c || t.attributes(f, w), f.deleteProgram(w);
                }
                (c = c.slice()).sort(h);
                var L, A = [], I = [], P = [];
                for (L = 0; L < c.length; ++L) {
                  var S = c[L];
                  if (S.type.indexOf("mat") >= 0) {
                    for (var E = 0 | S.type.charAt(S.type.length - 1), R = new Array(E), z = 0; z < E; ++z)
                      R[z] = P.length, I.push(S.name + "[" + z + "]"), typeof S.location == "number" ? P.push(S.location + z) : Array.isArray(S.location) && S.location.length === E && typeof S.location[z] == "number" ? P.push(0 | S.location[z]) : P.push(-1);
                    A.push({ name: S.name, type: S.type, locations: R });
                  } else
                    A.push({ name: S.name, type: S.type, locations: [P.length] }), I.push(S.name), typeof S.location == "number" ? P.push(0 | S.location) : P.push(-1);
                }
                var j = 0;
                for (L = 0; L < P.length; ++L)
                  if (P[L] < 0) {
                    for (; P.indexOf(j) >= 0; )
                      j += 1;
                    P[L] = j;
                  }
                var H = new Array(p.length);
                function Y() {
                  y.program = s.program(f, y._vref, y._fref, I, P);
                  for (var J = 0; J < p.length; ++J)
                    H[J] = f.getUniformLocation(y.program, p[J].name);
                }
                Y(), y._relink = Y, y.types = { uniforms: n(p), attributes: n(c) }, y.attributes = r(f, y, A, P), Object.defineProperty(y, "uniforms", e(f, y, p, H));
              }, k.exports = function(l, i, p, c, a) {
                var y = new u(l);
                return y.update(i, p, c, a), y;
              };
            }, { "./lib/GLError": 133, "./lib/create-attributes": 134, "./lib/create-uniforms": 135, "./lib/reflect": 136, "./lib/runtime-reflect": 137, "./lib/shader-cache": 138 }], 133: [function(g, k, x) {
              function e(r, n, s) {
                this.shortMessage = n || "", this.longMessage = s || "", this.rawError = r || "", this.message = "gl-shader: " + (n || r || "") + (s ? `
` + s : ""), this.stack = new Error().stack;
              }
              e.prototype = new Error(), e.prototype.name = "GLError", e.prototype.constructor = e, k.exports = e;
            }, {}], 134: [function(g, k, x) {
              k.exports = function(u, o, h, l) {
                for (var i = {}, p = 0, c = h.length; p < c; ++p) {
                  var a = h[p], y = a.name, f = a.type, _ = a.locations;
                  switch (f) {
                    case "bool":
                    case "int":
                    case "float":
                      t(u, o, _[0], l, 1, i, y);
                      break;
                    default:
                      if (f.indexOf("vec") >= 0) {
                        if ((b = f.charCodeAt(f.length - 1) - 48) < 2 || b > 4)
                          throw new e("", "Invalid data type for attribute " + y + ": " + f);
                        t(u, o, _[0], l, b, i, y);
                      } else {
                        if (!(f.indexOf("mat") >= 0))
                          throw new e("", "Unknown data type for attribute " + y + ": " + f);
                        var b;
                        if ((b = f.charCodeAt(f.length - 1) - 48) < 2 || b > 4)
                          throw new e("", "Invalid data type for attribute " + y + ": " + f);
                        d(u, o, _, l, b, i, y);
                      }
                  }
                }
                return i;
              };
              var e = g("./GLError");
              function r(u, o, h, l, i, p) {
                this._gl = u, this._wrapper = o, this._index = h, this._locations = l, this._dimension = i, this._constFunc = p;
              }
              var n = r.prototype;
              n.pointer = function(u, o, h, l) {
                var i = this._gl, p = this._locations[this._index];
                i.vertexAttribPointer(p, this._dimension, u || i.FLOAT, !!o, h || 0, l || 0), i.enableVertexAttribArray(p);
              }, n.set = function(u, o, h, l) {
                return this._constFunc(this._locations[this._index], u, o, h, l);
              }, Object.defineProperty(n, "location", { get: function() {
                return this._locations[this._index];
              }, set: function(u) {
                return u !== this._locations[this._index] && (this._locations[this._index] = 0 | u, this._wrapper.program = null), 0 | u;
              } });
              var s = [function(u, o, h) {
                return h.length === void 0 ? u.vertexAttrib1f(o, h) : u.vertexAttrib1fv(o, h);
              }, function(u, o, h, l) {
                return h.length === void 0 ? u.vertexAttrib2f(o, h, l) : u.vertexAttrib2fv(o, h);
              }, function(u, o, h, l, i) {
                return h.length === void 0 ? u.vertexAttrib3f(o, h, l, i) : u.vertexAttrib3fv(o, h);
              }, function(u, o, h, l, i, p) {
                return h.length === void 0 ? u.vertexAttrib4f(o, h, l, i, p) : u.vertexAttrib4fv(o, h);
              }];
              function t(u, o, h, l, i, p, c) {
                var a = s[i], y = new r(u, o, h, l, i, a);
                Object.defineProperty(p, c, { set: function(f) {
                  return u.disableVertexAttribArray(l[h]), a(u, l[h], f), f;
                }, get: function() {
                  return y;
                }, enumerable: !0 });
              }
              function d(u, o, h, l, i, p, c) {
                for (var a = new Array(i), y = new Array(i), f = 0; f < i; ++f)
                  t(u, o, h[f], l, i, a, f), y[f] = a[f];
                Object.defineProperty(a, "location", { set: function(w) {
                  if (Array.isArray(w))
                    for (var T = 0; T < i; ++T)
                      y[T].location = w[T];
                  else
                    for (T = 0; T < i; ++T)
                      y[T].location = w + T;
                  return w;
                }, get: function() {
                  for (var w = new Array(i), T = 0; T < i; ++T)
                    w[T] = l[h[T]];
                  return w;
                }, enumerable: !0 }), a.pointer = function(w, T, L, A) {
                  w = w || u.FLOAT, T = !!T, L = L || i * i, A = A || 0;
                  for (var I = 0; I < i; ++I) {
                    var P = l[h[I]];
                    u.vertexAttribPointer(P, i, w, T, L, A + I * i), u.enableVertexAttribArray(P);
                  }
                };
                var _ = new Array(i), b = u["vertexAttrib" + i + "fv"];
                Object.defineProperty(p, c, { set: function(w) {
                  for (var T = 0; T < i; ++T) {
                    var L = l[h[T]];
                    if (u.disableVertexAttribArray(L), Array.isArray(w[0]))
                      b.call(u, L, w[T]);
                    else {
                      for (var A = 0; A < i; ++A)
                        _[A] = w[i * T + A];
                      b.call(u, L, _);
                    }
                  }
                  return w;
                }, get: function() {
                  return a;
                }, enumerable: !0 });
              }
            }, { "./GLError": 133 }], 135: [function(g, k, x) {
              var e = g("./reflect"), r = g("./GLError");
              function n(t) {
                return function() {
                  return t;
                };
              }
              function s(t, d) {
                for (var u = new Array(t), o = 0; o < t; ++o)
                  u[o] = d;
                return u;
              }
              k.exports = function(t, d, u, o) {
                function h(c) {
                  return function(a) {
                    for (var y = function z(j, H) {
                      if (typeof H != "object")
                        return [[j, H]];
                      var Y = [];
                      for (var J in H) {
                        var W = H[J], Z = j;
                        parseInt(J) + "" === J ? Z += "[" + J + "]" : Z += "." + J, typeof W == "object" ? Y.push.apply(Y, z(Z, W)) : Y.push([Z, W]);
                      }
                      return Y;
                    }("", c), f = 0; f < y.length; ++f) {
                      var _ = y[f], b = _[0], w = _[1];
                      if (o[w]) {
                        var T = a;
                        if (typeof b == "string" && (b.indexOf(".") === 0 || b.indexOf("[") === 0)) {
                          var L = b;
                          if (b.indexOf(".") === 0 && (L = b.slice(1)), L.indexOf("]") === L.length - 1) {
                            var A = L.indexOf("["), I = L.slice(0, A), P = L.slice(A + 1, L.length - 1);
                            T = I ? a[I][P] : a[P];
                          } else
                            T = a[L];
                        }
                        var S, E = u[w].type;
                        switch (E) {
                          case "bool":
                          case "int":
                          case "sampler2D":
                          case "samplerCube":
                            t.uniform1i(o[w], T);
                            break;
                          case "float":
                            t.uniform1f(o[w], T);
                            break;
                          default:
                            var R = E.indexOf("vec");
                            if (!(0 <= R && R <= 1 && E.length === 4 + R)) {
                              if (E.indexOf("mat") === 0 && E.length === 4) {
                                if ((S = E.charCodeAt(E.length - 1) - 48) < 2 || S > 4)
                                  throw new r("", "Invalid uniform dimension type for matrix " + name + ": " + E);
                                t["uniformMatrix" + S + "fv"](o[w], !1, T);
                                break;
                              }
                              throw new r("", "Unknown uniform data type for " + name + ": " + E);
                            }
                            if ((S = E.charCodeAt(E.length - 1) - 48) < 2 || S > 4)
                              throw new r("", "Invalid data type");
                            switch (E.charAt(0)) {
                              case "b":
                              case "i":
                                t["uniform" + S + "iv"](o[w], T);
                                break;
                              case "v":
                                t["uniform" + S + "fv"](o[w], T);
                                break;
                              default:
                                throw new r("", "Unrecognized data type for vector " + name + ": " + E);
                            }
                        }
                      }
                    }
                  };
                }
                function l(c, a, y) {
                  if (typeof y == "object") {
                    var f = i(y);
                    Object.defineProperty(c, a, { get: n(f), set: h(y), enumerable: !0, configurable: !1 });
                  } else
                    o[y] ? Object.defineProperty(c, a, { get: (_ = y, function(b, w, T) {
                      return b.getUniform(w.program, T[_]);
                    }), set: h(y), enumerable: !0, configurable: !1 }) : c[a] = function(b) {
                      switch (b) {
                        case "bool":
                          return !1;
                        case "int":
                        case "sampler2D":
                        case "samplerCube":
                        case "float":
                          return 0;
                        default:
                          var w = b.indexOf("vec");
                          if (0 <= w && w <= 1 && b.length === 4 + w) {
                            if ((T = b.charCodeAt(b.length - 1) - 48) < 2 || T > 4)
                              throw new r("", "Invalid data type");
                            return b.charAt(0) === "b" ? s(T, !1) : s(T, 0);
                          }
                          if (b.indexOf("mat") === 0 && b.length === 4) {
                            var T;
                            if ((T = b.charCodeAt(b.length - 1) - 48) < 2 || T > 4)
                              throw new r("", "Invalid uniform dimension type for matrix " + name + ": " + b);
                            return s(T * T, 0);
                          }
                          throw new r("", "Unknown uniform data type for " + name + ": " + b);
                      }
                    }(u[y].type);
                  var _;
                }
                function i(c) {
                  var a;
                  if (Array.isArray(c)) {
                    a = new Array(c.length);
                    for (var y = 0; y < c.length; ++y)
                      l(a, y, c[y]);
                  } else
                    for (var f in a = {}, c)
                      l(a, f, c[f]);
                  return a;
                }
                var p = e(u, !0);
                return { get: n(i(p)), set: h(p), enumerable: !0, configurable: !0 };
              };
            }, { "./GLError": 133, "./reflect": 136 }], 136: [function(g, k, x) {
              k.exports = function(e, r) {
                for (var n = {}, s = 0; s < e.length; ++s)
                  for (var t = e[s].name.split("."), d = n, u = 0; u < t.length; ++u) {
                    var o = t[u].split("[");
                    if (o.length > 1) {
                      o[0] in d || (d[o[0]] = []), d = d[o[0]];
                      for (var h = 1; h < o.length; ++h) {
                        var l = parseInt(o[h]);
                        h < o.length - 1 || u < t.length - 1 ? (l in d || (h < o.length - 1 ? d[l] = [] : d[l] = {}), d = d[l]) : d[l] = r ? s : e[s].type;
                      }
                    } else
                      u < t.length - 1 ? (o[0] in d || (d[o[0]] = {}), d = d[o[0]]) : d[o[0]] = r ? s : e[s].type;
                  }
                return n;
              };
            }, {}], 137: [function(g, k, x) {
              x.uniforms = function(s, t) {
                for (var d = s.getProgramParameter(t, s.ACTIVE_UNIFORMS), u = [], o = 0; o < d; ++o) {
                  var h = s.getActiveUniform(t, o);
                  if (h) {
                    var l = n(s, h.type);
                    if (h.size > 1)
                      for (var i = 0; i < h.size; ++i)
                        u.push({ name: h.name.replace("[0]", "[" + i + "]"), type: l });
                    else
                      u.push({ name: h.name, type: l });
                  }
                }
                return u;
              }, x.attributes = function(s, t) {
                for (var d = s.getProgramParameter(t, s.ACTIVE_ATTRIBUTES), u = [], o = 0; o < d; ++o) {
                  var h = s.getActiveAttrib(t, o);
                  h && u.push({ name: h.name, type: n(s, h.type) });
                }
                return u;
              };
              var e = { FLOAT: "float", FLOAT_VEC2: "vec2", FLOAT_VEC3: "vec3", FLOAT_VEC4: "vec4", INT: "int", INT_VEC2: "ivec2", INT_VEC3: "ivec3", INT_VEC4: "ivec4", BOOL: "bool", BOOL_VEC2: "bvec2", BOOL_VEC3: "bvec3", BOOL_VEC4: "bvec4", FLOAT_MAT2: "mat2", FLOAT_MAT3: "mat3", FLOAT_MAT4: "mat4", SAMPLER_2D: "sampler2D", SAMPLER_CUBE: "samplerCube" }, r = null;
              function n(s, t) {
                if (!r) {
                  var d = Object.keys(e);
                  r = {};
                  for (var u = 0; u < d.length; ++u) {
                    var o = d[u];
                    r[s[o]] = e[o];
                  }
                }
                return r[t];
              }
            }, {}], 138: [function(g, k, x) {
              x.shader = function(h, l, i) {
                return o(h).getShaderReference(l, i);
              }, x.program = function(h, l, i, p, c) {
                return o(h).getProgram(l, i, p, c);
              };
              var e = g("./GLError"), r = g("gl-format-compiler-error"), n = new (typeof WeakMap > "u" ? g("weakmap-shim") : WeakMap)(), s = 0;
              function t(h, l, i, p, c, a, y) {
                this.id = h, this.src = l, this.type = i, this.shader = p, this.count = a, this.programs = [], this.cache = y;
              }
              function d(h) {
                this.gl = h, this.shaders = [{}, {}], this.programs = {};
              }
              t.prototype.dispose = function() {
                if (--this.count == 0) {
                  for (var h = this.cache, l = h.gl, i = this.programs, p = 0, c = i.length; p < c; ++p) {
                    var a = h.programs[i[p]];
                    a && (delete h.programs[p], l.deleteProgram(a));
                  }
                  l.deleteShader(this.shader), delete h.shaders[this.type === l.FRAGMENT_SHADER | 0][this.src];
                }
              };
              var u = d.prototype;
              function o(h) {
                var l = n.get(h);
                return l || (l = new d(h), n.set(h, l)), l;
              }
              u.getShaderReference = function(h, l) {
                var i = this.gl, p = this.shaders[h === i.FRAGMENT_SHADER | 0], c = p[l];
                if (c && i.isShader(c.shader))
                  c.count += 1;
                else {
                  var a = function(y, f, _) {
                    var b = y.createShader(f);
                    if (y.shaderSource(b, _), y.compileShader(b), !y.getShaderParameter(b, y.COMPILE_STATUS)) {
                      var w = y.getShaderInfoLog(b);
                      try {
                        var T = r(w, _, f);
                      } catch (L) {
                        throw console.warn("Failed to format compiler error: " + L), new e(w, `Error compiling shader:
` + w);
                      }
                      throw new e(w, T.short, T.long);
                    }
                    return b;
                  }(i, h, l);
                  c = p[l] = new t(s++, l, h, a, [], 1, this);
                }
                return c;
              }, u.getProgram = function(h, l, i, p) {
                var c = [h.id, l.id, i.join(":"), p.join(":")].join("@"), a = this.programs[c];
                return a && this.gl.isProgram(a) || (this.programs[c] = a = function(y, f, _, b, w) {
                  var T = y.createProgram();
                  y.attachShader(T, f), y.attachShader(T, _);
                  for (var L = 0; L < b.length; ++L)
                    y.bindAttribLocation(T, w[L], b[L]);
                  if (y.linkProgram(T), !y.getProgramParameter(T, y.LINK_STATUS)) {
                    var A = y.getProgramInfoLog(T);
                    throw new e(A, "Error linking program: " + A);
                  }
                  return T;
                }(this.gl, h.shader, l.shader, i, p), h.programs.push(c), l.programs.push(c)), a;
              };
            }, { "./GLError": 133, "gl-format-compiler-error": 87, "weakmap-shim": 316 }], 139: [function(g, k, x) {
              function e(n) {
                this.plot = n, this.enable = [!0, !0, !1, !1], this.width = [1, 1, 1, 1], this.color = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.center = [1 / 0, 1 / 0];
              }
              k.exports = function(n, s) {
                var t = new e(n);
                return t.update(s), n.addOverlay(t), t;
              };
              var r = e.prototype;
              r.update = function(n) {
                n = n || {}, this.enable = (n.enable || [!0, !0, !1, !1]).slice(), this.width = (n.width || [1, 1, 1, 1]).slice(), this.color = (n.color || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]).map(function(s) {
                  return s.slice();
                }), this.center = (n.center || [1 / 0, 1 / 0]).slice(), this.plot.setOverlayDirty();
              }, r.draw = function() {
                var n = this.enable, s = this.width, t = this.color, d = this.center, u = this.plot, o = u.line, h = u.dataBox, l = u.viewBox;
                if (o.bind(), h[0] <= d[0] && d[0] <= h[2] && h[1] <= d[1] && d[1] <= h[3]) {
                  var i = l[0] + (d[0] - h[0]) / (h[2] - h[0]) * (l[2] - l[0]), p = l[1] + (d[1] - h[1]) / (h[3] - h[1]) * (l[3] - l[1]);
                  n[0] && o.drawLine(i, p, l[0], p, s[0], t[0]), n[1] && o.drawLine(i, p, i, l[1], s[1], t[1]), n[2] && o.drawLine(i, p, l[2], p, s[2], t[2]), n[3] && o.drawLine(i, p, i, l[3], s[3], t[3]);
                }
              }, r.dispose = function() {
                this.plot.removeOverlay(this);
              };
            }, {}], 140: [function(g, k, x) {
              var e = g("glslify"), r = g("gl-shader"), n = e([`precision mediump float;
#define GLSLIFY 1

attribute vec3 position, color;
attribute float weight;

uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;

varying vec4 fragColor;

void main() {
  vec3 vertexPosition = mix(coordinates[0],
    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));

  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);
  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;
  vec2 delta = weight * clipOffset * screenShape;
  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;

  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]), s = e([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
  gl_FragColor = fragColor;
}`]);
              k.exports = function(t) {
                return r(t, n, s, null, [{ name: "position", type: "vec3" }, { name: "color", type: "vec3" }, { name: "weight", type: "float" }]);
              };
            }, { "gl-shader": 132, glslify: 231 }], 141: [function(g, k, x) {
              var e = g("gl-buffer"), r = g("gl-vao"), n = g("./shaders/index");
              k.exports = function(l, i) {
                var p = [];
                function c(b, w, T, L, A, I) {
                  var P = [b, w, T, 0, 0, 0, 1];
                  P[L + 3] = 1, P[L] = A, p.push.apply(p, P), P[6] = -1, p.push.apply(p, P), P[L] = I, p.push.apply(p, P), p.push.apply(p, P), P[6] = 1, p.push.apply(p, P), P[L] = A, p.push.apply(p, P);
                }
                c(0, 0, 0, 0, 0, 1), c(0, 0, 0, 1, 0, 1), c(0, 0, 0, 2, 0, 1), c(1, 0, 0, 1, -1, 1), c(1, 0, 0, 2, -1, 1), c(0, 1, 0, 0, -1, 1), c(0, 1, 0, 2, -1, 1), c(0, 0, 1, 0, -1, 1), c(0, 0, 1, 1, -1, 1);
                var a = e(l, p), y = r(l, [{ type: l.FLOAT, buffer: a, size: 3, offset: 0, stride: 28 }, { type: l.FLOAT, buffer: a, size: 3, offset: 12, stride: 28 }, { type: l.FLOAT, buffer: a, size: 1, offset: 24, stride: 28 }]), f = n(l);
                f.attributes.position.location = 0, f.attributes.color.location = 1, f.attributes.weight.location = 2;
                var _ = new t(l, a, y, f);
                return _.update(i), _;
              };
              var s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
              function t(l, i, p, c) {
                this.gl = l, this.buffer = i, this.vao = p, this.shader = c, this.pixelRatio = 1, this.bounds = [[-1e3, -1e3, -1e3], [1e3, 1e3, 1e3]], this.position = [0, 0, 0], this.lineWidth = [2, 2, 2], this.colors = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.enabled = [!0, !0, !0], this.drawSides = [!0, !0, !0], this.axes = null;
              }
              var d = t.prototype, u = [0, 0, 0], o = [0, 0, 0], h = [0, 0];
              d.isTransparent = function() {
                return !1;
              }, d.drawTransparent = function(l) {
              }, d.draw = function(l) {
                var i = this.gl, p = this.vao, c = this.shader;
                p.bind(), c.bind();
                var a, y = l.model || s, f = l.view || s, _ = l.projection || s;
                this.axes && (a = this.axes.lastCubeProps.axis);
                for (var b = u, w = o, T = 0; T < 3; ++T)
                  a && a[T] < 0 ? (b[T] = this.bounds[0][T], w[T] = this.bounds[1][T]) : (b[T] = this.bounds[1][T], w[T] = this.bounds[0][T]);
                for (h[0] = i.drawingBufferWidth, h[1] = i.drawingBufferHeight, c.uniforms.model = y, c.uniforms.view = f, c.uniforms.projection = _, c.uniforms.coordinates = [this.position, b, w], c.uniforms.colors = this.colors, c.uniforms.screenShape = h, T = 0; T < 3; ++T)
                  c.uniforms.lineWidth = this.lineWidth[T] * this.pixelRatio, this.enabled[T] && (p.draw(i.TRIANGLES, 6, 6 * T), this.drawSides[T] && p.draw(i.TRIANGLES, 12, 18 + 12 * T));
                p.unbind();
              }, d.update = function(l) {
                l && ("bounds" in l && (this.bounds = l.bounds), "position" in l && (this.position = l.position), "lineWidth" in l && (this.lineWidth = l.lineWidth), "colors" in l && (this.colors = l.colors), "enabled" in l && (this.enabled = l.enabled), "drawSides" in l && (this.drawSides = l.drawSides));
              }, d.dispose = function() {
                this.vao.dispose(), this.buffer.dispose(), this.shader.dispose();
              };
            }, { "./shaders/index": 140, "gl-buffer": 78, "gl-vao": 150 }], 142: [function(g, k, x) {
              var e = g("glslify"), r = e([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
  float segmentCount = 8.0;

  float angle = 2.0 * 3.14159 * (index / segmentCount);

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d);
  vec3 y = v * sin(angle) * length(d);
  vec3 v3 = x + y;

  normal = normalize(v3);

  return v3;
}

attribute vec4 vector;
attribute vec4 color, position;
attribute vec2 uv;

uniform float vectorScale, tubeScale;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  // Scale the vector magnitude to stay constant with
  // model & view changes.
  vec3 normal;
  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * tubePosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  // vec4 m_position  = model * vec4(tubePosition, 1.0);
  vec4 t_position  = view * tubePosition;
  gl_Position      = projection * t_position;

  f_color          = color;
  f_data           = tubePosition.xyz;
  f_position       = position.xyz;
  f_uv             = uv;
}
`]), n = e([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * opacity;
}
`]), s = e([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
  float segmentCount = 8.0;

  float angle = 2.0 * 3.14159 * (index / segmentCount);

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d);
  vec3 y = v * sin(angle) * length(d);
  vec3 v3 = x + y;

  normal = normalize(v3);

  return v3;
}

attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform float tubeScale;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  vec3 normal;
  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  gl_Position = projection * view * tubePosition;
  f_id        = id;
  f_position  = position.xyz;
}
`]), t = e([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]);
              x.meshShader = { vertex: r, fragment: n, attributes: [{ name: "position", type: "vec4" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }, { name: "vector", type: "vec4" }] }, x.pickShader = { vertex: s, fragment: t, attributes: [{ name: "position", type: "vec4" }, { name: "id", type: "vec4" }, { name: "vector", type: "vec4" }] };
            }, { glslify: 231 }], 143: [function(g, k, x) {
              var e = g("gl-vec3"), r = g("gl-vec4"), n = ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"], s = function(l, i, p, c) {
                for (var a = 0, y = 0; y < l.length; y++)
                  for (var f = l[y].velocities, _ = 0; _ < f.length; _++)
                    a = Math.max(a, e.length(f[_]));
                var b = l.map(function(z) {
                  return function(j, H, Y, J) {
                    for (var W = j.points, Z = j.velocities, re = j.divergences, V = [], B = [], U = [], ee = [], N = [], K = [], X = 0, te = 0, ie = r.create(), le = r.create(), oe = 0; oe < W.length; oe++) {
                      var ve = W[oe], ue = Z[oe], ye = re[oe];
                      H === 0 && (ye = 0.05 * Y), te = e.length(ue) / J, ie = r.create(), e.copy(ie, ue), ie[3] = ye;
                      for (var Ae = 0; Ae < 8; Ae++)
                        N[Ae] = [ve[0], ve[1], ve[2], Ae];
                      if (ee.length > 0)
                        for (Ae = 0; Ae < 8; Ae++) {
                          var pe = (Ae + 1) % 8;
                          V.push(ee[Ae], N[Ae], N[pe], N[pe], ee[pe], ee[Ae]), U.push(le, ie, ie, ie, le, le), K.push(X, te, te, te, X, X);
                          var ge = V.length;
                          B.push([ge - 6, ge - 5, ge - 4], [ge - 3, ge - 2, ge - 1]);
                        }
                      var we = ee;
                      ee = N, N = we;
                      var se = le;
                      le = ie, ie = se;
                      var de = X;
                      X = te, te = de;
                    }
                    return { positions: V, cells: B, vectors: U, vertexIntensity: K };
                  }(z, p, c, a);
                }), w = [], T = [], L = [], A = [];
                for (y = 0; y < b.length; y++) {
                  var I = b[y], P = w.length;
                  for (w = w.concat(I.positions), L = L.concat(I.vectors), A = A.concat(I.vertexIntensity), _ = 0; _ < I.cells.length; _++) {
                    var S = I.cells[_], E = [];
                    T.push(E);
                    for (var R = 0; R < S.length; R++)
                      E.push(S[R] + P);
                  }
                }
                return { positions: w, cells: T, vectors: L, vertexIntensity: A, colormap: i };
              }, t = function(l, i) {
                var p, c = l.length;
                for (p = 0; p < c; p++) {
                  var a = l[p];
                  if (a === i)
                    return p;
                  if (a > i)
                    return p - 1;
                }
                return p;
              }, d = function(l, i, p) {
                return l < i ? i : l > p ? p : l;
              }, u = function(l) {
                var i = 1 / 0;
                l.sort(function(y, f) {
                  return y - f;
                });
                for (var p = l.length, c = 1; c < p; c++) {
                  var a = Math.abs(l[c] - l[c - 1]);
                  a < i && (i = a);
                }
                return i;
              };
              k.exports = function(l, i) {
                var p = l.startingPositions, c = l.maxLength || 1e3, a = l.tubeSize || 1, y = l.absoluteTubeSize, f = l.gridFill || "+x+y+z", _ = {};
                f.indexOf("-x") !== -1 && (_.reversedX = !0), f.indexOf("-y") !== -1 && (_.reversedY = !0), f.indexOf("-z") !== -1 && (_.reversedZ = !0), _.filled = n.indexOf(f.replace(/-/g, "").replace(/\+/g, ""));
                var b = l.getVelocity || function(oe) {
                  return function(ve, ue, ye) {
                    var Ae = ue.vectors, pe = ue.meshgrid, ge = ve[0], we = ve[1], se = ve[2], de = pe[0].length, Te = pe[1].length, Ee = pe[2].length, Me = t(pe[0], ge), ze = t(pe[1], we), Ie = t(pe[2], se), Oe = Me + 1, Ze = ze + 1, Fe = Ie + 1;
                    if (Me = d(Me, 0, de - 1), Oe = d(Oe, 0, de - 1), ze = d(ze, 0, Te - 1), Ze = d(Ze, 0, Te - 1), Ie = d(Ie, 0, Ee - 1), Fe = d(Fe, 0, Ee - 1), Me < 0 || ze < 0 || Ie < 0 || Oe > de - 1 || Ze > Te - 1 || Fe > Ee - 1)
                      return e.create();
                    var Pe, De, Ge, Qe, ot, vt, bt = pe[0][Me], yt = pe[0][Oe], tt = pe[1][ze], Ke = pe[1][Ze], mt = pe[2][Ie], Ft = (ge - bt) / (yt - bt), Vt = (we - tt) / (Ke - tt), Xt = (se - mt) / (pe[2][Fe] - mt);
                    switch (isFinite(Ft) || (Ft = 0.5), isFinite(Vt) || (Vt = 0.5), isFinite(Xt) || (Xt = 0.5), ye.reversedX && (Me = de - 1 - Me, Oe = de - 1 - Oe), ye.reversedY && (ze = Te - 1 - ze, Ze = Te - 1 - Ze), ye.reversedZ && (Ie = Ee - 1 - Ie, Fe = Ee - 1 - Fe), ye.filled) {
                      case 5:
                        ot = Ie, vt = Fe, Ge = ze * Ee, Qe = Ze * Ee, Pe = Me * Ee * Te, De = Oe * Ee * Te;
                        break;
                      case 4:
                        ot = Ie, vt = Fe, Pe = Me * Ee, De = Oe * Ee, Ge = ze * Ee * de, Qe = Ze * Ee * de;
                        break;
                      case 3:
                        Ge = ze, Qe = Ze, ot = Ie * Te, vt = Fe * Te, Pe = Me * Te * Ee, De = Oe * Te * Ee;
                        break;
                      case 2:
                        Ge = ze, Qe = Ze, Pe = Me * Te, De = Oe * Te, ot = Ie * Te * de, vt = Fe * Te * de;
                        break;
                      case 1:
                        Pe = Me, De = Oe, ot = Ie * de, vt = Fe * de, Ge = ze * de * Ee, Qe = Ze * de * Ee;
                        break;
                      default:
                        Pe = Me, De = Oe, Ge = ze * de, Qe = Ze * de, ot = Ie * de * Te, vt = Fe * de * Te;
                    }
                    var Gt = Ae[Pe + Ge + ot], nr = Ae[Pe + Ge + vt], It = Ae[Pe + Qe + ot], Be = Ae[Pe + Qe + vt], He = Ae[De + Ge + ot], he = Ae[De + Ge + vt], be = Ae[De + Qe + ot], Re = Ae[De + Qe + vt], Ue = e.create(), Xe = e.create(), qe = e.create(), st = e.create();
                    e.lerp(Ue, Gt, He, Ft), e.lerp(Xe, nr, he, Ft), e.lerp(qe, It, be, Ft), e.lerp(st, Be, Re, Ft);
                    var it = e.create(), Tt = e.create();
                    e.lerp(it, Ue, qe, Vt), e.lerp(Tt, Xe, st, Vt);
                    var Pt = e.create();
                    return e.lerp(Pt, it, Tt, Xt), Pt;
                  }(oe, l, _);
                }, w = l.getDivergence || function(oe, ve) {
                  var ue = e.create(), ye = 1e-4;
                  e.add(ue, oe, [ye, 0, 0]);
                  var Ae = b(ue);
                  e.subtract(Ae, Ae, ve), e.scale(Ae, Ae, 1 / ye), e.add(ue, oe, [0, ye, 0]);
                  var pe = b(ue);
                  e.subtract(pe, pe, ve), e.scale(pe, pe, 1 / ye), e.add(ue, oe, [0, 0, ye]);
                  var ge = b(ue);
                  return e.subtract(ge, ge, ve), e.scale(ge, ge, 1 / ye), e.add(ue, Ae, pe), e.add(ue, ue, ge), ue;
                }, T = [], L = i[0][0], A = i[0][1], I = i[0][2], P = i[1][0], S = i[1][1], E = i[1][2], R = function(oe) {
                  var ve = oe[0], ue = oe[1], ye = oe[2];
                  return !(ve < L || ve > P || ue < A || ue > S || ye < I || ye > E);
                }, z = 10 * e.distance(i[0], i[1]) / c, j = z * z, H = 1, Y = 0, J = p.length;
                J > 1 && (H = function(oe) {
                  for (var ve = [], ue = [], ye = [], Ae = {}, pe = {}, ge = {}, we = oe.length, se = 0; se < we; se++) {
                    var de = oe[se], Te = de[0], Ee = de[1], Me = de[2];
                    Ae[Te] || (ve.push(Te), Ae[Te] = !0), pe[Ee] || (ue.push(Ee), pe[Ee] = !0), ge[Me] || (ye.push(Me), ge[Me] = !0);
                  }
                  var ze = u(ve), Ie = u(ue), Oe = u(ye), Ze = Math.min(ze, Ie, Oe);
                  return isFinite(Ze) ? Ze : 1;
                }(p));
                for (var W = 0; W < J; W++) {
                  var Z = e.create();
                  e.copy(Z, p[W]);
                  var re = [Z], V = [], B = b(Z), U = Z;
                  V.push(B);
                  var ee = [], N = w(Z, B), K = e.length(N);
                  isFinite(K) && K > Y && (Y = K), ee.push(K), T.push({ points: re, velocities: V, divergences: ee });
                  for (var X = 0; X < 100 * c && re.length < c && R(Z); ) {
                    X++;
                    var te = e.clone(B), ie = e.squaredLength(te);
                    if (ie === 0)
                      break;
                    ie > j && e.scale(te, te, z / Math.sqrt(ie)), e.add(te, te, Z), B = b(te), e.squaredDistance(U, te) - j > -1e-4 * j && (re.push(te), U = te, V.push(B), N = w(te, B), K = e.length(N), isFinite(K) && K > Y && (Y = K), ee.push(K)), Z = te;
                  }
                }
                var le = s(T, l.colormap, Y, H);
                return y ? le.tubeScale = y : (Y === 0 && (Y = 1), le.tubeScale = 0.5 * a * H / Y), le;
              };
              var o = g("./lib/shaders"), h = g("gl-cone3d").createMesh;
              k.exports.createTubeMesh = function(l, i) {
                return h(l, i, { shaders: o, traceType: "streamtube" });
              };
            }, { "./lib/shaders": 142, "gl-cone3d": 79, "gl-vec3": 169, "gl-vec4": 205 }], 144: [function(g, k, x) {
              var e = g("gl-shader"), r = g("glslify"), n = r([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute vec3 f;
attribute vec3 normal;

uniform vec3 objectOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 lightPosition, eyePosition;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 localCoordinate = vec3(uv.zw, f.x);
  worldCoordinate = objectOffset + localCoordinate;
  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);
  vec4 clipPosition = projection * view * worldPosition;
  gl_Position = clipPosition;
  kill = f.y;
  value = f.z;
  planeCoordinate = uv.xy;

  vColor = texture2D(colormap, vec2(value, value));

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * worldPosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  lightDirection = lightPosition - cameraCoordinate.xyz;
  eyeDirection   = eyePosition - cameraCoordinate.xyz;
  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);
}
`]), s = r([`precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float beckmannSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness) {
  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 lowerBound, upperBound;
uniform float contourTint;
uniform vec4 contourColor;
uniform sampler2D colormap;
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform float vertexColor;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  if (
    kill > 0.0 ||
    vColor.a == 0.0 ||
    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)
  ) discard;

  vec3 N = normalize(surfaceNormal);
  vec3 V = normalize(eyeDirection);
  vec3 L = normalize(lightDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  //decide how to interpolate color \u2014 in vertex or in fragment
  vec4 surfaceColor =
    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +
    step(.5, vertexColor) * vColor;

  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;
}
`]), t = r([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute float f;

uniform vec3 objectOffset;
uniform mat3 permutation;
uniform mat4 model, view, projection;
uniform float height, zOffset;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 dataCoordinate = permutation * vec3(uv.xy, height);
  worldCoordinate = objectOffset + dataCoordinate;
  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);

  vec4 clipPosition = projection * view * worldPosition;
  clipPosition.z += zOffset;

  gl_Position = clipPosition;
  value = f + objectOffset.z;
  kill = -1.0;
  planeCoordinate = uv.zw;

  vColor = texture2D(colormap, vec2(value, value));

  //Don't do lighting for contours
  surfaceNormal   = vec3(1,0,0);
  eyeDirection    = vec3(0,1,0);
  lightDirection  = vec3(0,0,1);
}
`]), d = r([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec2 shape;
uniform vec3 clipBounds[2];
uniform float pickId;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 surfaceNormal;

vec2 splitFloat(float v) {
  float vh = 255.0 * v;
  float upper = floor(vh);
  float lower = fract(vh);
  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);
}

void main() {
  if ((kill > 0.0) ||
      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;

  vec2 ux = splitFloat(planeCoordinate.x / shape.x);
  vec2 uy = splitFloat(planeCoordinate.y / shape.y);
  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));
}
`]);
              x.createShader = function(u) {
                var o = e(u, n, s, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "vec3" }, { name: "normal", type: "vec3" }]);
                return o.attributes.uv.location = 0, o.attributes.f.location = 1, o.attributes.normal.location = 2, o;
              }, x.createPickShader = function(u) {
                var o = e(u, n, d, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "vec3" }, { name: "normal", type: "vec3" }]);
                return o.attributes.uv.location = 0, o.attributes.f.location = 1, o.attributes.normal.location = 2, o;
              }, x.createContourShader = function(u) {
                var o = e(u, t, s, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "float" }]);
                return o.attributes.uv.location = 0, o.attributes.f.location = 1, o;
              }, x.createPickContourShader = function(u) {
                var o = e(u, t, d, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "float" }]);
                return o.attributes.uv.location = 0, o.attributes.f.location = 1, o;
              };
            }, { "gl-shader": 132, glslify: 231 }], 145: [function(g, k, x) {
              k.exports = function(B) {
                var U = B.gl, ee = f(U), N = b(U), K = _(U), X = w(U), te = r(U), ie = n(U, [{ buffer: te, size: 4, stride: 40, offset: 0 }, { buffer: te, size: 3, stride: 40, offset: 16 }, { buffer: te, size: 3, stride: 40, offset: 28 }]), le = r(U), oe = n(U, [{ buffer: le, size: 4, stride: 20, offset: 0 }, { buffer: le, size: 1, stride: 20, offset: 16 }]), ve = r(U), ue = n(U, [{ buffer: ve, size: 2, type: U.FLOAT }]), ye = s(U, 1, 256, U.RGBA, U.UNSIGNED_BYTE);
                ye.minFilter = U.LINEAR, ye.magFilter = U.LINEAR;
                var Ae = new P(U, [0, 0], [[0, 0, 0], [0, 0, 0]], ee, N, te, ie, ye, K, X, le, oe, ve, ue, [0, 0, 0]), pe = { levels: [[], [], []] };
                for (var ge in B)
                  pe[ge] = B[ge];
                return pe.colormap = pe.colormap || "jet", Ae.update(pe), Ae;
              };
              var e = g("bit-twiddle"), r = g("gl-buffer"), n = g("gl-vao"), s = g("gl-texture2d"), t = g("typedarray-pool"), d = g("colormap"), u = g("ndarray-ops"), o = g("ndarray-pack"), h = g("ndarray"), l = g("surface-nets"), i = g("gl-mat4/multiply"), p = g("gl-mat4/invert"), c = g("binary-search-bounds"), a = g("ndarray-gradient"), y = g("./lib/shaders"), f = y.createShader, _ = y.createContourShader, b = y.createPickShader, w = y.createPickContourShader, T = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], L = [[0, 0], [0, 1], [1, 0], [1, 1], [1, 0], [0, 1]], A = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
              function I(B, U, ee, N, K) {
                this.position = B, this.index = U, this.uv = ee, this.level = N, this.dataCoordinate = K;
              }
              (function() {
                for (var B = 0; B < 3; ++B) {
                  var U = A[B], ee = (B + 2) % 3;
                  U[(B + 1) % 3 + 0] = 1, U[ee + 3] = 1, U[B + 6] = 1;
                }
              })();
              function P(B, U, ee, N, K, X, te, ie, le, oe, ve, ue, ye, Ae, pe) {
                this.gl = B, this.shape = U, this.bounds = ee, this.objectOffset = pe, this.intensityBounds = [], this._shader = N, this._pickShader = K, this._coordinateBuffer = X, this._vao = te, this._colorMap = ie, this._contourShader = le, this._contourPickShader = oe, this._contourBuffer = ve, this._contourVAO = ue, this._contourOffsets = [[], [], []], this._contourCounts = [[], [], []], this._vertexCount = 0, this._pickResult = new I([0, 0, 0], [0, 0], [0, 0], [0, 0, 0], [0, 0, 0]), this._dynamicBuffer = ye, this._dynamicVAO = Ae, this._dynamicOffsets = [0, 0, 0], this._dynamicCounts = [0, 0, 0], this.contourWidth = [1, 1, 1], this.contourLevels = [[1], [1], [1]], this.contourTint = [0, 0, 0], this.contourColor = [[0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1]], this.showContour = !0, this.showSurface = !0, this.enableHighlight = [!0, !0, !0], this.highlightColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.highlightTint = [1, 1, 1], this.highlightLevel = [-1, -1, -1], this.enableDynamic = [!0, !0, !0], this.dynamicLevel = [NaN, NaN, NaN], this.dynamicColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.dynamicTint = [1, 1, 1], this.dynamicWidth = [1, 1, 1], this.axesBounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.surfaceProject = [!1, !1, !1], this.contourProject = [[!1, !1, !1], [!1, !1, !1], [!1, !1, !1]], this.colorBounds = [!1, !1], this._field = [h(t.mallocFloat(1024), [0, 0]), h(t.mallocFloat(1024), [0, 0]), h(t.mallocFloat(1024), [0, 0])], this.pickId = 1, this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.snapToData = !1, this.pixelRatio = 1, this.opacity = 1, this.lightPosition = [10, 1e4, 0], this.ambientLight = 0.8, this.diffuseLight = 0.8, this.specularLight = 2, this.roughness = 0.5, this.fresnel = 1.5, this.vertexColor = 0, this.dirty = !0;
              }
              var S = P.prototype;
              S.genColormap = function(B, U) {
                var ee = !1, N = o([d({ colormap: B, nshades: 256, format: "rgba" }).map(function(K, X) {
                  var te = U ? function(ie, le) {
                    if (!le || !le.length)
                      return 1;
                    for (var oe = 0; oe < le.length; ++oe) {
                      if (le.length < 2)
                        return 1;
                      if (le[oe][0] === ie)
                        return le[oe][1];
                      if (le[oe][0] > ie && oe > 0) {
                        var ve = (le[oe][0] - ie) / (le[oe][0] - le[oe - 1][0]);
                        return le[oe][1] * (1 - ve) + ve * le[oe - 1][1];
                      }
                    }
                    return 1;
                  }(X / 255, U) : K[3];
                  return te < 1 && (ee = !0), [K[0], K[1], K[2], 255 * te];
                })]);
                return u.divseq(N, 255), this.hasAlphaScale = ee, N;
              }, S.isTransparent = function() {
                return this.opacity < 1 || this.hasAlphaScale;
              }, S.isOpaque = function() {
                return !this.isTransparent();
              }, S.pickSlots = 1, S.setPickBase = function(B) {
                this.pickId = B;
              };
              var E = [0, 0, 0], R = { showSurface: !1, showContour: !1, projections: [T.slice(), T.slice(), T.slice()], clipBounds: [[[0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0]]] };
              function z(B, U) {
                var ee, N, K, X = U.axes && U.axes.lastCubeProps.axis || E, te = U.showSurface, ie = U.showContour;
                for (ee = 0; ee < 3; ++ee)
                  for (te = te || U.surfaceProject[ee], N = 0; N < 3; ++N)
                    ie = ie || U.contourProject[ee][N];
                for (ee = 0; ee < 3; ++ee) {
                  var le = R.projections[ee];
                  for (N = 0; N < 16; ++N)
                    le[N] = 0;
                  for (N = 0; N < 4; ++N)
                    le[5 * N] = 1;
                  le[5 * ee] = 0, le[12 + ee] = U.axesBounds[+(X[ee] > 0)][ee], i(le, B.model, le);
                  var oe = R.clipBounds[ee];
                  for (K = 0; K < 2; ++K)
                    for (N = 0; N < 3; ++N)
                      oe[K][N] = B.clipBounds[K][N];
                  oe[0][ee] = -1e8, oe[1][ee] = 1e8;
                }
                return R.showSurface = te, R.showContour = ie, R;
              }
              var j = { model: T, view: T, projection: T, inverseModel: T.slice(), lowerBound: [0, 0, 0], upperBound: [0, 0, 0], colorMap: 0, clipBounds: [[0, 0, 0], [0, 0, 0]], height: 0, contourTint: 0, contourColor: [0, 0, 0, 1], permutation: [1, 0, 0, 0, 1, 0, 0, 0, 1], zOffset: -1e-4, objectOffset: [0, 0, 0], kambient: 1, kdiffuse: 1, kspecular: 1, lightPosition: [1e3, 1e3, 1e3], eyePosition: [0, 0, 0], roughness: 1, fresnel: 1, opacity: 1, vertexColor: 0 }, H = T.slice(), Y = [1, 0, 0, 0, 1, 0, 0, 0, 1];
              function J(B, U) {
                B = B || {};
                var ee = this.gl;
                ee.disable(ee.CULL_FACE), this._colorMap.bind(0);
                var N = j;
                N.model = B.model || T, N.view = B.view || T, N.projection = B.projection || T, N.lowerBound = [this.bounds[0][0], this.bounds[0][1], this.colorBounds[0] || this.bounds[0][2]], N.upperBound = [this.bounds[1][0], this.bounds[1][1], this.colorBounds[1] || this.bounds[1][2]], N.objectOffset = this.objectOffset, N.contourColor = this.contourColor[0], N.inverseModel = p(N.inverseModel, N.model);
                for (var K = 0; K < 2; ++K)
                  for (var X = N.clipBounds[K], te = 0; te < 3; ++te)
                    X[te] = Math.min(Math.max(this.clipBounds[K][te], -1e8), 1e8);
                N.kambient = this.ambientLight, N.kdiffuse = this.diffuseLight, N.kspecular = this.specularLight, N.roughness = this.roughness, N.fresnel = this.fresnel, N.opacity = this.opacity, N.height = 0, N.permutation = Y, N.vertexColor = this.vertexColor;
                var ie = H;
                for (i(ie, N.view, N.model), i(ie, N.projection, ie), p(ie, ie), K = 0; K < 3; ++K)
                  N.eyePosition[K] = ie[12 + K] / ie[15];
                var le = ie[15];
                for (K = 0; K < 3; ++K)
                  le += this.lightPosition[K] * ie[4 * K + 3];
                for (K = 0; K < 3; ++K) {
                  var oe = ie[12 + K];
                  for (te = 0; te < 3; ++te)
                    oe += ie[4 * te + K] * this.lightPosition[te];
                  N.lightPosition[K] = oe / le;
                }
                var ve = z(N, this);
                if (ve.showSurface) {
                  for (this._shader.bind(), this._shader.uniforms = N, this._vao.bind(), this.showSurface && this._vertexCount && this._vao.draw(ee.TRIANGLES, this._vertexCount), K = 0; K < 3; ++K)
                    this.surfaceProject[K] && this.vertexCount && (this._shader.uniforms.model = ve.projections[K], this._shader.uniforms.clipBounds = ve.clipBounds[K], this._vao.draw(ee.TRIANGLES, this._vertexCount));
                  this._vao.unbind();
                }
                if (ve.showContour) {
                  var ue = this._contourShader;
                  N.kambient = 1, N.kdiffuse = 0, N.kspecular = 0, N.opacity = 1, ue.bind(), ue.uniforms = N;
                  var ye = this._contourVAO;
                  for (ye.bind(), K = 0; K < 3; ++K)
                    for (ue.uniforms.permutation = A[K], ee.lineWidth(this.contourWidth[K] * this.pixelRatio), te = 0; te < this.contourLevels[K].length; ++te)
                      te === this.highlightLevel[K] ? (ue.uniforms.contourColor = this.highlightColor[K], ue.uniforms.contourTint = this.highlightTint[K]) : te !== 0 && te - 1 !== this.highlightLevel[K] || (ue.uniforms.contourColor = this.contourColor[K], ue.uniforms.contourTint = this.contourTint[K]), this._contourCounts[K][te] && (ue.uniforms.height = this.contourLevels[K][te], ye.draw(ee.LINES, this._contourCounts[K][te], this._contourOffsets[K][te]));
                  for (K = 0; K < 3; ++K)
                    for (ue.uniforms.model = ve.projections[K], ue.uniforms.clipBounds = ve.clipBounds[K], te = 0; te < 3; ++te)
                      if (this.contourProject[K][te]) {
                        ue.uniforms.permutation = A[te], ee.lineWidth(this.contourWidth[te] * this.pixelRatio);
                        for (var Ae = 0; Ae < this.contourLevels[te].length; ++Ae)
                          Ae === this.highlightLevel[te] ? (ue.uniforms.contourColor = this.highlightColor[te], ue.uniforms.contourTint = this.highlightTint[te]) : Ae !== 0 && Ae - 1 !== this.highlightLevel[te] || (ue.uniforms.contourColor = this.contourColor[te], ue.uniforms.contourTint = this.contourTint[te]), this._contourCounts[te][Ae] && (ue.uniforms.height = this.contourLevels[te][Ae], ye.draw(ee.LINES, this._contourCounts[te][Ae], this._contourOffsets[te][Ae]));
                      }
                  for (ye.unbind(), (ye = this._dynamicVAO).bind(), K = 0; K < 3; ++K)
                    if (this._dynamicCounts[K] !== 0)
                      for (ue.uniforms.model = N.model, ue.uniforms.clipBounds = N.clipBounds, ue.uniforms.permutation = A[K], ee.lineWidth(this.dynamicWidth[K] * this.pixelRatio), ue.uniforms.contourColor = this.dynamicColor[K], ue.uniforms.contourTint = this.dynamicTint[K], ue.uniforms.height = this.dynamicLevel[K], ye.draw(ee.LINES, this._dynamicCounts[K], this._dynamicOffsets[K]), te = 0; te < 3; ++te)
                        this.contourProject[te][K] && (ue.uniforms.model = ve.projections[te], ue.uniforms.clipBounds = ve.clipBounds[te], ye.draw(ee.LINES, this._dynamicCounts[K], this._dynamicOffsets[K]));
                  ye.unbind();
                }
              }
              S.draw = function(B) {
                return J.call(this, B, !1);
              }, S.drawTransparent = function(B) {
                return J.call(this, B, !0);
              };
              var W = { model: T, view: T, projection: T, inverseModel: T, clipBounds: [[0, 0, 0], [0, 0, 0]], height: 0, shape: [0, 0], pickId: 0, lowerBound: [0, 0, 0], upperBound: [0, 0, 0], zOffset: 0, objectOffset: [0, 0, 0], permutation: [1, 0, 0, 0, 1, 0, 0, 0, 1], lightPosition: [0, 0, 0], eyePosition: [0, 0, 0] };
              function Z(B, U) {
                return Array.isArray(B) ? [U(B[0]), U(B[1]), U(B[2])] : [U(B), U(B), U(B)];
              }
              function re(B) {
                return Array.isArray(B) ? B.length === 3 ? [B[0], B[1], B[2], 1] : [B[0], B[1], B[2], B[3]] : [0, 0, 0, 1];
              }
              function V(B) {
                if (Array.isArray(B)) {
                  if (Array.isArray(B))
                    return [re(B[0]), re(B[1]), re(B[2])];
                  var U = re(B);
                  return [U.slice(), U.slice(), U.slice()];
                }
              }
              S.drawPick = function(B) {
                B = B || {};
                var U = this.gl;
                U.disable(U.CULL_FACE);
                var ee = W;
                ee.model = B.model || T, ee.view = B.view || T, ee.projection = B.projection || T, ee.shape = this._field[2].shape, ee.pickId = this.pickId / 255, ee.lowerBound = this.bounds[0], ee.upperBound = this.bounds[1], ee.objectOffset = this.objectOffset, ee.permutation = Y;
                for (var N = 0; N < 2; ++N)
                  for (var K = ee.clipBounds[N], X = 0; X < 3; ++X)
                    K[X] = Math.min(Math.max(this.clipBounds[N][X], -1e8), 1e8);
                var te = z(ee, this);
                if (te.showSurface) {
                  for (this._pickShader.bind(), this._pickShader.uniforms = ee, this._vao.bind(), this._vao.draw(U.TRIANGLES, this._vertexCount), N = 0; N < 3; ++N)
                    this.surfaceProject[N] && (this._pickShader.uniforms.model = te.projections[N], this._pickShader.uniforms.clipBounds = te.clipBounds[N], this._vao.draw(U.TRIANGLES, this._vertexCount));
                  this._vao.unbind();
                }
                if (te.showContour) {
                  var ie = this._contourPickShader;
                  ie.bind(), ie.uniforms = ee;
                  var le = this._contourVAO;
                  for (le.bind(), X = 0; X < 3; ++X)
                    for (U.lineWidth(this.contourWidth[X] * this.pixelRatio), ie.uniforms.permutation = A[X], N = 0; N < this.contourLevels[X].length; ++N)
                      this._contourCounts[X][N] && (ie.uniforms.height = this.contourLevels[X][N], le.draw(U.LINES, this._contourCounts[X][N], this._contourOffsets[X][N]));
                  for (N = 0; N < 3; ++N)
                    for (ie.uniforms.model = te.projections[N], ie.uniforms.clipBounds = te.clipBounds[N], X = 0; X < 3; ++X)
                      if (this.contourProject[N][X]) {
                        ie.uniforms.permutation = A[X], U.lineWidth(this.contourWidth[X] * this.pixelRatio);
                        for (var oe = 0; oe < this.contourLevels[X].length; ++oe)
                          this._contourCounts[X][oe] && (ie.uniforms.height = this.contourLevels[X][oe], le.draw(U.LINES, this._contourCounts[X][oe], this._contourOffsets[X][oe]));
                      }
                  le.unbind();
                }
              }, S.pick = function(B) {
                if (!B || B.id !== this.pickId)
                  return null;
                var U = this._field[2].shape, ee = this._pickResult, N = U[0] * (B.value[0] + (B.value[2] >> 4) / 16) / 255, K = Math.floor(N), X = N - K, te = U[1] * (B.value[1] + (15 & B.value[2]) / 16) / 255, ie = Math.floor(te), le = te - ie;
                K += 1, ie += 1;
                var oe = ee.position;
                oe[0] = oe[1] = oe[2] = 0;
                for (var ve = 0; ve < 2; ++ve)
                  for (var ue = ve ? X : 1 - X, ye = 0; ye < 2; ++ye)
                    for (var Ae = K + ve, pe = ie + ye, ge = ue * (ye ? le : 1 - le), we = 0; we < 3; ++we)
                      oe[we] += this._field[we].get(Ae, pe) * ge;
                for (var se = this._pickResult.level, de = 0; de < 3; ++de)
                  if (se[de] = c.le(this.contourLevels[de], oe[de]), se[de] < 0)
                    this.contourLevels[de].length > 0 && (se[de] = 0);
                  else if (se[de] < this.contourLevels[de].length - 1) {
                    var Te = this.contourLevels[de][se[de]], Ee = this.contourLevels[de][se[de] + 1];
                    Math.abs(Te - oe[de]) > Math.abs(Ee - oe[de]) && (se[de] += 1);
                  }
                for (ee.index[0] = X < 0.5 ? K : K + 1, ee.index[1] = le < 0.5 ? ie : ie + 1, ee.uv[0] = N / U[0], ee.uv[1] = te / U[1], we = 0; we < 3; ++we)
                  ee.dataCoordinate[we] = this._field[we].get(ee.index[0], ee.index[1]);
                return ee;
              }, S.padField = function(B, U) {
                var ee = U.shape.slice(), N = B.shape.slice();
                u.assign(B.lo(1, 1).hi(ee[0], ee[1]), U), u.assign(B.lo(1).hi(ee[0], 1), U.hi(ee[0], 1)), u.assign(B.lo(1, N[1] - 1).hi(ee[0], 1), U.lo(0, ee[1] - 1).hi(ee[0], 1)), u.assign(B.lo(0, 1).hi(1, ee[1]), U.hi(1)), u.assign(B.lo(N[0] - 1, 1).hi(1, ee[1]), U.lo(ee[0] - 1)), B.set(0, 0, U.get(0, 0)), B.set(0, N[1] - 1, U.get(0, ee[1] - 1)), B.set(N[0] - 1, 0, U.get(ee[0] - 1, 0)), B.set(N[0] - 1, N[1] - 1, U.get(ee[0] - 1, ee[1] - 1));
              }, S.update = function(B) {
                B = B || {}, this.objectOffset = B.objectOffset || this.objectOffset, this.dirty = !0, "contourWidth" in B && (this.contourWidth = Z(B.contourWidth, Number)), "showContour" in B && (this.showContour = Z(B.showContour, Boolean)), "showSurface" in B && (this.showSurface = !!B.showSurface), "contourTint" in B && (this.contourTint = Z(B.contourTint, Boolean)), "contourColor" in B && (this.contourColor = V(B.contourColor)), "contourProject" in B && (this.contourProject = Z(B.contourProject, function(Zt) {
                  return Z(Zt, Boolean);
                })), "surfaceProject" in B && (this.surfaceProject = B.surfaceProject), "dynamicColor" in B && (this.dynamicColor = V(B.dynamicColor)), "dynamicTint" in B && (this.dynamicTint = Z(B.dynamicTint, Number)), "dynamicWidth" in B && (this.dynamicWidth = Z(B.dynamicWidth, Number)), "opacity" in B && (this.opacity = B.opacity), "opacityscale" in B && (this.opacityscale = B.opacityscale), "colorBounds" in B && (this.colorBounds = B.colorBounds), "vertexColor" in B && (this.vertexColor = B.vertexColor ? 1 : 0), "colormap" in B && this._colorMap.setPixels(this.genColormap(B.colormap, this.opacityscale));
                var U = B.field || B.coords && B.coords[2] || null, ee = !1;
                if (U || (U = this._field[2].shape[0] || this._field[2].shape[2] ? this._field[2].lo(1, 1).hi(this._field[2].shape[0] - 2, this._field[2].shape[1] - 2) : this._field[2].hi(0, 0)), "field" in B || "coords" in B) {
                  var N = (U.shape[0] + 2) * (U.shape[1] + 2);
                  N > this._field[2].data.length && (t.freeFloat(this._field[2].data), this._field[2].data = t.mallocFloat(e.nextPow2(N))), this._field[2] = h(this._field[2].data, [U.shape[0] + 2, U.shape[1] + 2]), this.padField(this._field[2], U), this.shape = U.shape.slice();
                  for (var K = this.shape, X = 0; X < 2; ++X)
                    this._field[2].size > this._field[X].data.length && (t.freeFloat(this._field[X].data), this._field[X].data = t.mallocFloat(this._field[2].size)), this._field[X] = h(this._field[X].data, [K[0] + 2, K[1] + 2]);
                  if (B.coords) {
                    var te = B.coords;
                    if (!Array.isArray(te) || te.length !== 3)
                      throw new Error("gl-surface: invalid coordinates for x/y");
                    for (X = 0; X < 2; ++X) {
                      var ie = te[X];
                      for (ye = 0; ye < 2; ++ye)
                        if (ie.shape[ye] !== K[ye])
                          throw new Error("gl-surface: coords have incorrect shape");
                      this.padField(this._field[X], ie);
                    }
                  } else if (B.ticks) {
                    var le = B.ticks;
                    if (!Array.isArray(le) || le.length !== 2)
                      throw new Error("gl-surface: invalid ticks");
                    for (X = 0; X < 2; ++X) {
                      var oe = le[X];
                      if ((Array.isArray(oe) || oe.length) && (oe = h(oe)), oe.shape[0] !== K[X])
                        throw new Error("gl-surface: invalid tick length");
                      var ve = h(oe.data, K);
                      ve.stride[X] = oe.stride[0], ve.stride[1 ^ X] = 0, this.padField(this._field[X], ve);
                    }
                  } else {
                    for (X = 0; X < 2; ++X) {
                      var ue = [0, 0];
                      ue[X] = 1, this._field[X] = h(this._field[X].data, [K[0] + 2, K[1] + 2], ue, 0);
                    }
                    this._field[0].set(0, 0, 0);
                    for (var ye = 0; ye < K[0]; ++ye)
                      this._field[0].set(ye + 1, 0, ye);
                    for (this._field[0].set(K[0] + 1, 0, K[0] - 1), this._field[1].set(0, 0, 0), ye = 0; ye < K[1]; ++ye)
                      this._field[1].set(0, ye + 1, ye);
                    this._field[1].set(0, K[1] + 1, K[1] - 1);
                  }
                  var Ae = this._field, pe = h(t.mallocFloat(3 * Ae[2].size * 2), [3, K[0] + 2, K[1] + 2, 2]);
                  for (X = 0; X < 3; ++X)
                    a(pe.pick(X), Ae[X], "mirror");
                  var ge = h(t.mallocFloat(3 * Ae[2].size), [K[0] + 2, K[1] + 2, 3]);
                  for (X = 0; X < K[0] + 2; ++X)
                    for (ye = 0; ye < K[1] + 2; ++ye) {
                      var we = pe.get(0, X, ye, 0), se = pe.get(0, X, ye, 1), de = pe.get(1, X, ye, 0), Te = pe.get(1, X, ye, 1), Ee = pe.get(2, X, ye, 0), Me = pe.get(2, X, ye, 1), ze = de * Me - Te * Ee, Ie = Ee * se - Me * we, Oe = we * Te - se * de, Ze = Math.sqrt(ze * ze + Ie * Ie + Oe * Oe);
                      Ze < 1e-8 ? (Ze = Math.max(Math.abs(ze), Math.abs(Ie), Math.abs(Oe))) < 1e-8 ? (Oe = 1, Ie = ze = 0, Ze = 1) : Ze = 1 / Ze : Ze = 1 / Math.sqrt(Ze), ge.set(X, ye, 0, ze * Ze), ge.set(X, ye, 1, Ie * Ze), ge.set(X, ye, 2, Oe * Ze);
                    }
                  t.free(pe.data);
                  var Fe = [1 / 0, 1 / 0, 1 / 0], Pe = [-1 / 0, -1 / 0, -1 / 0], De = 1 / 0, Ge = -1 / 0, Qe = (K[0] - 1) * (K[1] - 1) * 6, ot = t.mallocFloat(e.nextPow2(10 * Qe)), vt = 0, bt = 0;
                  for (X = 0; X < K[0] - 1; ++X)
                    e:
                      for (ye = 0; ye < K[1] - 1; ++ye) {
                        for (var yt = 0; yt < 2; ++yt)
                          for (var tt = 0; tt < 2; ++tt)
                            for (var Ke = 0; Ke < 3; ++Ke) {
                              var mt = this._field[Ke].get(1 + X + yt, 1 + ye + tt);
                              if (isNaN(mt) || !isFinite(mt))
                                continue e;
                            }
                        for (Ke = 0; Ke < 6; ++Ke) {
                          var Ft = X + L[Ke][0], Vt = ye + L[Ke][1], Xt = this._field[0].get(Ft + 1, Vt + 1), Gt = this._field[1].get(Ft + 1, Vt + 1);
                          mt = this._field[2].get(Ft + 1, Vt + 1), ze = ge.get(Ft + 1, Vt + 1, 0), Ie = ge.get(Ft + 1, Vt + 1, 1), Oe = ge.get(Ft + 1, Vt + 1, 2), B.intensity && (nr = B.intensity.get(Ft, Vt));
                          var nr = B.intensity ? B.intensity.get(Ft, Vt) : mt + this.objectOffset[2];
                          ot[vt++] = Ft, ot[vt++] = Vt, ot[vt++] = Xt, ot[vt++] = Gt, ot[vt++] = mt, ot[vt++] = 0, ot[vt++] = nr, ot[vt++] = ze, ot[vt++] = Ie, ot[vt++] = Oe, Fe[0] = Math.min(Fe[0], Xt + this.objectOffset[0]), Fe[1] = Math.min(Fe[1], Gt + this.objectOffset[1]), Fe[2] = Math.min(Fe[2], mt + this.objectOffset[2]), De = Math.min(De, nr), Pe[0] = Math.max(Pe[0], Xt + this.objectOffset[0]), Pe[1] = Math.max(Pe[1], Gt + this.objectOffset[1]), Pe[2] = Math.max(Pe[2], mt + this.objectOffset[2]), Ge = Math.max(Ge, nr), bt += 1;
                        }
                      }
                  for (B.intensityBounds && (De = +B.intensityBounds[0], Ge = +B.intensityBounds[1]), X = 6; X < vt; X += 10)
                    ot[X] = (ot[X] - De) / (Ge - De);
                  this._vertexCount = bt, this._coordinateBuffer.update(ot.subarray(0, vt)), t.freeFloat(ot), t.free(ge.data), this.bounds = [Fe, Pe], this.intensity = B.intensity || this._field[2], this.intensityBounds[0] === De && this.intensityBounds[1] === Ge || (ee = !0), this.intensityBounds = [De, Ge];
                }
                if ("levels" in B) {
                  var It = B.levels;
                  for (It = Array.isArray(It[0]) ? It.slice() : [[], [], It], X = 0; X < 3; ++X)
                    It[X] = It[X].slice(), It[X].sort(function(Zt, Ut) {
                      return Zt - Ut;
                    });
                  for (X = 0; X < 3; ++X)
                    for (ye = 0; ye < It[X].length; ++ye)
                      It[X][ye] -= this.objectOffset[X];
                  e:
                    for (X = 0; X < 3; ++X) {
                      if (It[X].length !== this.contourLevels[X].length) {
                        ee = !0;
                        break;
                      }
                      for (ye = 0; ye < It[X].length; ++ye)
                        if (It[X][ye] !== this.contourLevels[X][ye]) {
                          ee = !0;
                          break e;
                        }
                    }
                  this.contourLevels = It;
                }
                if (ee) {
                  Ae = this._field, K = this.shape;
                  for (var Be = [], He = 0; He < 3; ++He) {
                    var he = this.contourLevels[He], be = [], Re = [], Ue = [0, 0, 0];
                    for (X = 0; X < he.length; ++X) {
                      var Xe = l(this._field[He], he[X]);
                      be.push(Be.length / 5 | 0), bt = 0;
                      e:
                        for (ye = 0; ye < Xe.cells.length; ++ye) {
                          var qe = Xe.cells[ye];
                          for (Ke = 0; Ke < 2; ++Ke) {
                            var st = Xe.positions[qe[Ke]], it = st[0], Tt = 0 | Math.floor(it), Pt = it - Tt, rt = st[1], ut = 0 | Math.floor(rt), Bt = rt - ut, wt = !1;
                            t:
                              for (var Lt = 0; Lt < 3; ++Lt) {
                                Ue[Lt] = 0;
                                var Se = (He + Lt + 1) % 3;
                                for (yt = 0; yt < 2; ++yt) {
                                  var We = yt ? Pt : 1 - Pt;
                                  for (Ft = 0 | Math.min(Math.max(Tt + yt, 0), K[0]), tt = 0; tt < 2; ++tt) {
                                    var nt = tt ? Bt : 1 - Bt;
                                    if (Vt = 0 | Math.min(Math.max(ut + tt, 0), K[1]), mt = Lt < 2 ? this._field[Se].get(Ft, Vt) : (this.intensity.get(Ft, Vt) - this.intensityBounds[0]) / (this.intensityBounds[1] - this.intensityBounds[0]), !isFinite(mt) || isNaN(mt)) {
                                      wt = !0;
                                      break t;
                                    }
                                    var ft = We * nt;
                                    Ue[Lt] += ft * mt;
                                  }
                                }
                              }
                            if (wt) {
                              if (Ke > 0) {
                                for (var Mt = 0; Mt < 5; ++Mt)
                                  Be.pop();
                                bt -= 1;
                              }
                              continue e;
                            }
                            Be.push(Ue[0], Ue[1], st[0], st[1], Ue[2]), bt += 1;
                          }
                        }
                      Re.push(bt);
                    }
                    this._contourOffsets[He] = be, this._contourCounts[He] = Re;
                  }
                  var Nt = t.mallocFloat(Be.length);
                  for (X = 0; X < Be.length; ++X)
                    Nt[X] = Be[X];
                  this._contourBuffer.update(Nt), t.freeFloat(Nt);
                }
              }, S.dispose = function() {
                this._shader.dispose(), this._vao.dispose(), this._coordinateBuffer.dispose(), this._colorMap.dispose(), this._contourBuffer.dispose(), this._contourVAO.dispose(), this._contourShader.dispose(), this._contourPickShader.dispose(), this._dynamicBuffer.dispose(), this._dynamicVAO.dispose();
                for (var B = 0; B < 3; ++B)
                  t.freeFloat(this._field[B].data);
              }, S.highlight = function(B) {
                var U, ee;
                if (!B)
                  return this._dynamicCounts = [0, 0, 0], this.dyanamicLevel = [NaN, NaN, NaN], void (this.highlightLevel = [-1, -1, -1]);
                for (U = 0; U < 3; ++U)
                  this.enableHighlight[U] ? this.highlightLevel[U] = B.level[U] : this.highlightLevel[U] = -1;
                for (ee = this.snapToData ? B.dataCoordinate : B.position, U = 0; U < 3; ++U)
                  ee[U] -= this.objectOffset[U];
                if (this.enableDynamic[0] && ee[0] !== this.dynamicLevel[0] || this.enableDynamic[1] && ee[1] !== this.dynamicLevel[1] || this.enableDynamic[2] && ee[2] !== this.dynamicLevel[2]) {
                  for (var N = 0, K = this.shape, X = t.mallocFloat(12 * K[0] * K[1]), te = 0; te < 3; ++te)
                    if (this.enableDynamic[te]) {
                      this.dynamicLevel[te] = ee[te];
                      var ie = (te + 1) % 3, le = (te + 2) % 3, oe = this._field[te], ve = this._field[ie], ue = this._field[le], ye = l(oe, ee[te]), Ae = ye.cells, pe = ye.positions;
                      for (this._dynamicOffsets[te] = N, U = 0; U < Ae.length; ++U)
                        for (var ge = Ae[U], we = 0; we < 2; ++we) {
                          var se = pe[ge[we]], de = +se[0], Te = 0 | de, Ee = 0 | Math.min(Te + 1, K[0]), Me = de - Te, ze = 1 - Me, Ie = +se[1], Oe = 0 | Ie, Ze = 0 | Math.min(Oe + 1, K[1]), Fe = Ie - Oe, Pe = 1 - Fe, De = ze * Pe, Ge = ze * Fe, Qe = Me * Pe, ot = Me * Fe, vt = De * ve.get(Te, Oe) + Ge * ve.get(Te, Ze) + Qe * ve.get(Ee, Oe) + ot * ve.get(Ee, Ze), bt = De * ue.get(Te, Oe) + Ge * ue.get(Te, Ze) + Qe * ue.get(Ee, Oe) + ot * ue.get(Ee, Ze);
                          if (isNaN(vt) || isNaN(bt)) {
                            we && (N -= 1);
                            break;
                          }
                          X[2 * N + 0] = vt, X[2 * N + 1] = bt, N += 1;
                        }
                      this._dynamicCounts[te] = N - this._dynamicOffsets[te];
                    } else
                      this.dynamicLevel[te] = NaN, this._dynamicCounts[te] = 0;
                  this._dynamicBuffer.update(X.subarray(0, 2 * N)), t.freeFloat(X);
                }
              };
            }, { "./lib/shaders": 144, "binary-search-bounds": 31, "bit-twiddle": 32, colormap: 53, "gl-buffer": 78, "gl-mat4/invert": 98, "gl-mat4/multiply": 100, "gl-texture2d": 146, "gl-vao": 150, ndarray: 259, "ndarray-gradient": 252, "ndarray-ops": 254, "ndarray-pack": 255, "surface-nets": 302, "typedarray-pool": 308 }], 146: [function(g, k, x) {
              var e = g("ndarray"), r = g("ndarray-ops"), n = g("typedarray-pool");
              k.exports = function(b) {
                if (arguments.length <= 1)
                  throw new Error("gl-texture2d: Missing arguments for texture2d constructor");
                if (s || u(b), typeof arguments[1] == "number")
                  return y(b, arguments[1], arguments[2], arguments[3] || b.RGBA, arguments[4] || b.UNSIGNED_BYTE);
                if (Array.isArray(arguments[1]))
                  return y(b, 0 | arguments[1][0], 0 | arguments[1][1], arguments[2] || b.RGBA, arguments[3] || b.UNSIGNED_BYTE);
                if (typeof arguments[1] == "object") {
                  var w = arguments[1], T = o(w) ? w : w.raw;
                  if (T)
                    return f(b, T, 0 | w.width, 0 | w.height, arguments[2] || b.RGBA, arguments[3] || b.UNSIGNED_BYTE);
                  if (w.shape && w.data && w.stride)
                    return _(b, w);
                }
                throw new Error("gl-texture2d: Invalid arguments for texture2d constructor");
              };
              var s = null, t = null, d = null;
              function u(b) {
                s = [b.LINEAR, b.NEAREST_MIPMAP_LINEAR, b.LINEAR_MIPMAP_NEAREST, b.LINEAR_MIPMAP_NEAREST], t = [b.NEAREST, b.LINEAR, b.NEAREST_MIPMAP_NEAREST, b.NEAREST_MIPMAP_LINEAR, b.LINEAR_MIPMAP_NEAREST, b.LINEAR_MIPMAP_LINEAR], d = [b.REPEAT, b.CLAMP_TO_EDGE, b.MIRRORED_REPEAT];
              }
              function o(b) {
                return typeof HTMLCanvasElement < "u" && b instanceof HTMLCanvasElement || typeof HTMLImageElement < "u" && b instanceof HTMLImageElement || typeof HTMLVideoElement < "u" && b instanceof HTMLVideoElement || typeof ImageData < "u" && b instanceof ImageData;
              }
              var h = function(b, w) {
                r.muls(b, w, 255);
              };
              function l(b, w, T) {
                var L = b.gl, A = L.getParameter(L.MAX_TEXTURE_SIZE);
                if (w < 0 || w > A || T < 0 || T > A)
                  throw new Error("gl-texture2d: Invalid texture size");
                return b._shape = [w, T], b.bind(), L.texImage2D(L.TEXTURE_2D, 0, b.format, w, T, 0, b.format, b.type, null), b._mipLevels = [0], b;
              }
              function i(b, w, T, L, A, I) {
                this.gl = b, this.handle = w, this.format = A, this.type = I, this._shape = [T, L], this._mipLevels = [0], this._magFilter = b.NEAREST, this._minFilter = b.NEAREST, this._wrapS = b.CLAMP_TO_EDGE, this._wrapT = b.CLAMP_TO_EDGE, this._anisoSamples = 1;
                var P = this, S = [this._wrapS, this._wrapT];
                Object.defineProperties(S, [{ get: function() {
                  return P._wrapS;
                }, set: function(R) {
                  return P.wrapS = R;
                } }, { get: function() {
                  return P._wrapT;
                }, set: function(R) {
                  return P.wrapT = R;
                } }]), this._wrapVector = S;
                var E = [this._shape[0], this._shape[1]];
                Object.defineProperties(E, [{ get: function() {
                  return P._shape[0];
                }, set: function(R) {
                  return P.width = R;
                } }, { get: function() {
                  return P._shape[1];
                }, set: function(R) {
                  return P.height = R;
                } }]), this._shapeVector = E;
              }
              var p = i.prototype;
              function c(b, w) {
                return b.length === 3 ? w[2] === 1 && w[1] === b[0] * b[2] && w[0] === b[2] : w[0] === 1 && w[1] === b[0];
              }
              function a(b) {
                var w = b.createTexture();
                return b.bindTexture(b.TEXTURE_2D, w), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.NEAREST), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.NEAREST), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE), w;
              }
              function y(b, w, T, L, A) {
                var I = b.getParameter(b.MAX_TEXTURE_SIZE);
                if (w < 0 || w > I || T < 0 || T > I)
                  throw new Error("gl-texture2d: Invalid texture shape");
                if (A === b.FLOAT && !b.getExtension("OES_texture_float"))
                  throw new Error("gl-texture2d: Floating point textures not supported on this platform");
                var P = a(b);
                return b.texImage2D(b.TEXTURE_2D, 0, L, w, T, 0, L, A, null), new i(b, P, w, T, L, A);
              }
              function f(b, w, T, L, A, I) {
                var P = a(b);
                return b.texImage2D(b.TEXTURE_2D, 0, A, A, I, w), new i(b, P, T, L, A, I);
              }
              function _(b, w) {
                var T = w.dtype, L = w.shape.slice(), A = b.getParameter(b.MAX_TEXTURE_SIZE);
                if (L[0] < 0 || L[0] > A || L[1] < 0 || L[1] > A)
                  throw new Error("gl-texture2d: Invalid texture size");
                var I = c(L, w.stride.slice()), P = 0;
                T === "float32" ? P = b.FLOAT : T === "float64" ? (P = b.FLOAT, I = !1, T = "float32") : T === "uint8" ? P = b.UNSIGNED_BYTE : (P = b.UNSIGNED_BYTE, I = !1, T = "uint8");
                var S, E, R = 0;
                if (L.length === 2)
                  R = b.LUMINANCE, L = [L[0], L[1], 1], w = e(w.data, L, [w.stride[0], w.stride[1], 1], w.offset);
                else {
                  if (L.length !== 3)
                    throw new Error("gl-texture2d: Invalid shape for texture");
                  if (L[2] === 1)
                    R = b.ALPHA;
                  else if (L[2] === 2)
                    R = b.LUMINANCE_ALPHA;
                  else if (L[2] === 3)
                    R = b.RGB;
                  else {
                    if (L[2] !== 4)
                      throw new Error("gl-texture2d: Invalid shape for pixel coords");
                    R = b.RGBA;
                  }
                }
                P !== b.FLOAT || b.getExtension("OES_texture_float") || (P = b.UNSIGNED_BYTE, I = !1);
                var z = w.size;
                if (I)
                  S = w.offset === 0 && w.data.length === z ? w.data : w.data.subarray(w.offset, w.offset + z);
                else {
                  var j = [L[2], L[2] * L[0], 1];
                  E = n.malloc(z, T);
                  var H = e(E, L, j, 0);
                  T !== "float32" && T !== "float64" || P !== b.UNSIGNED_BYTE ? r.assign(H, w) : h(H, w), S = E.subarray(0, z);
                }
                var Y = a(b);
                return b.texImage2D(b.TEXTURE_2D, 0, R, L[0], L[1], 0, R, P, S), I || n.free(E), new i(b, Y, L[0], L[1], R, P);
              }
              Object.defineProperties(p, { minFilter: { get: function() {
                return this._minFilter;
              }, set: function(b) {
                this.bind();
                var w = this.gl;
                if (this.type === w.FLOAT && s.indexOf(b) >= 0 && (w.getExtension("OES_texture_float_linear") || (b = w.NEAREST)), t.indexOf(b) < 0)
                  throw new Error("gl-texture2d: Unknown filter mode " + b);
                return w.texParameteri(w.TEXTURE_2D, w.TEXTURE_MIN_FILTER, b), this._minFilter = b;
              } }, magFilter: { get: function() {
                return this._magFilter;
              }, set: function(b) {
                this.bind();
                var w = this.gl;
                if (this.type === w.FLOAT && s.indexOf(b) >= 0 && (w.getExtension("OES_texture_float_linear") || (b = w.NEAREST)), t.indexOf(b) < 0)
                  throw new Error("gl-texture2d: Unknown filter mode " + b);
                return w.texParameteri(w.TEXTURE_2D, w.TEXTURE_MAG_FILTER, b), this._magFilter = b;
              } }, mipSamples: { get: function() {
                return this._anisoSamples;
              }, set: function(b) {
                var w = this._anisoSamples;
                if (this._anisoSamples = 0 | Math.max(b, 1), w !== this._anisoSamples) {
                  var T = this.gl.getExtension("EXT_texture_filter_anisotropic");
                  T && this.gl.texParameterf(this.gl.TEXTURE_2D, T.TEXTURE_MAX_ANISOTROPY_EXT, this._anisoSamples);
                }
                return this._anisoSamples;
              } }, wrapS: { get: function() {
                return this._wrapS;
              }, set: function(b) {
                if (this.bind(), d.indexOf(b) < 0)
                  throw new Error("gl-texture2d: Unknown wrap mode " + b);
                return this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, b), this._wrapS = b;
              } }, wrapT: { get: function() {
                return this._wrapT;
              }, set: function(b) {
                if (this.bind(), d.indexOf(b) < 0)
                  throw new Error("gl-texture2d: Unknown wrap mode " + b);
                return this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, b), this._wrapT = b;
              } }, wrap: { get: function() {
                return this._wrapVector;
              }, set: function(b) {
                if (Array.isArray(b) || (b = [b, b]), b.length !== 2)
                  throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");
                for (var w = 0; w < 2; ++w)
                  if (d.indexOf(b[w]) < 0)
                    throw new Error("gl-texture2d: Unknown wrap mode " + b);
                this._wrapS = b[0], this._wrapT = b[1];
                var T = this.gl;
                return this.bind(), T.texParameteri(T.TEXTURE_2D, T.TEXTURE_WRAP_S, this._wrapS), T.texParameteri(T.TEXTURE_2D, T.TEXTURE_WRAP_T, this._wrapT), b;
              } }, shape: { get: function() {
                return this._shapeVector;
              }, set: function(b) {
                if (Array.isArray(b)) {
                  if (b.length !== 2)
                    throw new Error("gl-texture2d: Invalid texture shape");
                } else
                  b = [0 | b, 0 | b];
                return l(this, 0 | b[0], 0 | b[1]), [0 | b[0], 0 | b[1]];
              } }, width: { get: function() {
                return this._shape[0];
              }, set: function(b) {
                return l(this, b |= 0, this._shape[1]), b;
              } }, height: { get: function() {
                return this._shape[1];
              }, set: function(b) {
                return b |= 0, l(this, this._shape[0], b), b;
              } } }), p.bind = function(b) {
                var w = this.gl;
                return b !== void 0 && w.activeTexture(w.TEXTURE0 + (0 | b)), w.bindTexture(w.TEXTURE_2D, this.handle), b !== void 0 ? 0 | b : w.getParameter(w.ACTIVE_TEXTURE) - w.TEXTURE0;
              }, p.dispose = function() {
                this.gl.deleteTexture(this.handle);
              }, p.generateMipmap = function() {
                this.bind(), this.gl.generateMipmap(this.gl.TEXTURE_2D);
                for (var b = Math.min(this._shape[0], this._shape[1]), w = 0; b > 0; ++w, b >>>= 1)
                  this._mipLevels.indexOf(w) < 0 && this._mipLevels.push(w);
              }, p.setPixels = function(b, w, T, L) {
                var A = this.gl;
                this.bind(), Array.isArray(w) ? (L = T, T = 0 | w[1], w = 0 | w[0]) : (w = w || 0, T = T || 0), L = L || 0;
                var I = o(b) ? b : b.raw;
                if (I)
                  this._mipLevels.indexOf(L) < 0 ? (A.texImage2D(A.TEXTURE_2D, 0, this.format, this.format, this.type, I), this._mipLevels.push(L)) : A.texSubImage2D(A.TEXTURE_2D, L, w, T, this.format, this.type, I);
                else {
                  if (!(b.shape && b.stride && b.data))
                    throw new Error("gl-texture2d: Unsupported data type");
                  if (b.shape.length < 2 || w + b.shape[1] > this._shape[1] >>> L || T + b.shape[0] > this._shape[0] >>> L || w < 0 || T < 0)
                    throw new Error("gl-texture2d: Texture dimensions are out of bounds");
                  (function(P, S, E, R, z, j, H, Y) {
                    var J = Y.dtype, W = Y.shape.slice();
                    if (W.length < 2 || W.length > 3)
                      throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");
                    var Z = 0, re = 0, V = c(W, Y.stride.slice());
                    if (J === "float32" ? Z = P.FLOAT : J === "float64" ? (Z = P.FLOAT, V = !1, J = "float32") : J === "uint8" ? Z = P.UNSIGNED_BYTE : (Z = P.UNSIGNED_BYTE, V = !1, J = "uint8"), W.length === 2)
                      re = P.LUMINANCE, W = [W[0], W[1], 1], Y = e(Y.data, W, [Y.stride[0], Y.stride[1], 1], Y.offset);
                    else {
                      if (W.length !== 3)
                        throw new Error("gl-texture2d: Invalid shape for texture");
                      if (W[2] === 1)
                        re = P.ALPHA;
                      else if (W[2] === 2)
                        re = P.LUMINANCE_ALPHA;
                      else if (W[2] === 3)
                        re = P.RGB;
                      else {
                        if (W[2] !== 4)
                          throw new Error("gl-texture2d: Invalid shape for pixel coords");
                        re = P.RGBA;
                      }
                      W[2];
                    }
                    if (re !== P.LUMINANCE && re !== P.ALPHA || z !== P.LUMINANCE && z !== P.ALPHA || (re = z), re !== z)
                      throw new Error("gl-texture2d: Incompatible texture format for setPixels");
                    var B = Y.size, U = H.indexOf(R) < 0;
                    if (U && H.push(R), Z === j && V)
                      Y.offset === 0 && Y.data.length === B ? U ? P.texImage2D(P.TEXTURE_2D, R, z, W[0], W[1], 0, z, j, Y.data) : P.texSubImage2D(P.TEXTURE_2D, R, S, E, W[0], W[1], z, j, Y.data) : U ? P.texImage2D(P.TEXTURE_2D, R, z, W[0], W[1], 0, z, j, Y.data.subarray(Y.offset, Y.offset + B)) : P.texSubImage2D(P.TEXTURE_2D, R, S, E, W[0], W[1], z, j, Y.data.subarray(Y.offset, Y.offset + B));
                    else {
                      var ee;
                      ee = j === P.FLOAT ? n.mallocFloat32(B) : n.mallocUint8(B);
                      var N = e(ee, W, [W[2], W[2] * W[0], 1]);
                      Z === P.FLOAT && j === P.UNSIGNED_BYTE ? h(N, Y) : r.assign(N, Y), U ? P.texImage2D(P.TEXTURE_2D, R, z, W[0], W[1], 0, z, j, ee.subarray(0, B)) : P.texSubImage2D(P.TEXTURE_2D, R, S, E, W[0], W[1], z, j, ee.subarray(0, B)), j === P.FLOAT ? n.freeFloat32(ee) : n.freeUint8(ee);
                    }
                  })(A, w, T, L, this.format, this.type, this._mipLevels, b);
                }
              };
            }, { ndarray: 259, "ndarray-ops": 254, "typedarray-pool": 308 }], 147: [function(g, k, x) {
              k.exports = function(e, r, n) {
                r ? r.bind() : e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, null);
                var s = 0 | e.getParameter(e.MAX_VERTEX_ATTRIBS);
                if (n) {
                  if (n.length > s)
                    throw new Error("gl-vao: Too many vertex attributes");
                  for (var t = 0; t < n.length; ++t) {
                    var d = n[t];
                    if (d.buffer) {
                      var u = d.buffer, o = d.size || 4, h = d.type || e.FLOAT, l = !!d.normalized, i = d.stride || 0, p = d.offset || 0;
                      u.bind(), e.enableVertexAttribArray(t), e.vertexAttribPointer(t, o, h, l, i, p);
                    } else {
                      if (typeof d == "number")
                        e.vertexAttrib1f(t, d);
                      else if (d.length === 1)
                        e.vertexAttrib1f(t, d[0]);
                      else if (d.length === 2)
                        e.vertexAttrib2f(t, d[0], d[1]);
                      else if (d.length === 3)
                        e.vertexAttrib3f(t, d[0], d[1], d[2]);
                      else {
                        if (d.length !== 4)
                          throw new Error("gl-vao: Invalid vertex attribute");
                        e.vertexAttrib4f(t, d[0], d[1], d[2], d[3]);
                      }
                      e.disableVertexAttribArray(t);
                    }
                  }
                  for (; t < s; ++t)
                    e.disableVertexAttribArray(t);
                } else
                  for (e.bindBuffer(e.ARRAY_BUFFER, null), t = 0; t < s; ++t)
                    e.disableVertexAttribArray(t);
              };
            }, {}], 148: [function(g, k, x) {
              var e = g("./do-bind.js");
              function r(n) {
                this.gl = n, this._elements = null, this._attributes = null, this._elementsType = n.UNSIGNED_SHORT;
              }
              r.prototype.bind = function() {
                e(this.gl, this._elements, this._attributes);
              }, r.prototype.update = function(n, s, t) {
                this._elements = s, this._attributes = n, this._elementsType = t || this.gl.UNSIGNED_SHORT;
              }, r.prototype.dispose = function() {
              }, r.prototype.unbind = function() {
              }, r.prototype.draw = function(n, s, t) {
                t = t || 0;
                var d = this.gl;
                this._elements ? d.drawElements(n, s, this._elementsType, t) : d.drawArrays(n, t, s);
              }, k.exports = function(n) {
                return new r(n);
              };
            }, { "./do-bind.js": 147 }], 149: [function(g, k, x) {
              var e = g("./do-bind.js");
              function r(s, t, d, u, o, h) {
                this.location = s, this.dimension = t, this.a = d, this.b = u, this.c = o, this.d = h;
              }
              function n(s, t, d) {
                this.gl = s, this._ext = t, this.handle = d, this._attribs = [], this._useElements = !1, this._elementsType = s.UNSIGNED_SHORT;
              }
              r.prototype.bind = function(s) {
                switch (this.dimension) {
                  case 1:
                    s.vertexAttrib1f(this.location, this.a);
                    break;
                  case 2:
                    s.vertexAttrib2f(this.location, this.a, this.b);
                    break;
                  case 3:
                    s.vertexAttrib3f(this.location, this.a, this.b, this.c);
                    break;
                  case 4:
                    s.vertexAttrib4f(this.location, this.a, this.b, this.c, this.d);
                }
              }, n.prototype.bind = function() {
                this._ext.bindVertexArrayOES(this.handle);
                for (var s = 0; s < this._attribs.length; ++s)
                  this._attribs[s].bind(this.gl);
              }, n.prototype.unbind = function() {
                this._ext.bindVertexArrayOES(null);
              }, n.prototype.dispose = function() {
                this._ext.deleteVertexArrayOES(this.handle);
              }, n.prototype.update = function(s, t, d) {
                if (this.bind(), e(this.gl, t, s), this.unbind(), this._attribs.length = 0, s)
                  for (var u = 0; u < s.length; ++u) {
                    var o = s[u];
                    typeof o == "number" ? this._attribs.push(new r(u, 1, o)) : Array.isArray(o) && this._attribs.push(new r(u, o.length, o[0], o[1], o[2], o[3]));
                  }
                this._useElements = !!t, this._elementsType = d || this.gl.UNSIGNED_SHORT;
              }, n.prototype.draw = function(s, t, d) {
                d = d || 0;
                var u = this.gl;
                this._useElements ? u.drawElements(s, t, this._elementsType, d) : u.drawArrays(s, d, t);
              }, k.exports = function(s, t) {
                return new n(s, t, t.createVertexArrayOES());
              };
            }, { "./do-bind.js": 147 }], 150: [function(g, k, x) {
              var e = g("./lib/vao-native.js"), r = g("./lib/vao-emulated.js");
              function n(s) {
                this.bindVertexArrayOES = s.bindVertexArray.bind(s), this.createVertexArrayOES = s.createVertexArray.bind(s), this.deleteVertexArrayOES = s.deleteVertexArray.bind(s);
              }
              k.exports = function(s, t, d, u) {
                var o, h = s.createVertexArray ? new n(s) : s.getExtension("OES_vertex_array_object");
                return (o = h ? e(s, h) : r(s)).update(t, d, u), o;
              };
            }, { "./lib/vao-emulated.js": 148, "./lib/vao-native.js": 149 }], 151: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] + n[0], e[1] = r[1] + n[1], e[2] = r[2] + n[2], e;
              };
            }, {}], 152: [function(g, k, x) {
              k.exports = function(s, t) {
                var d = e(s[0], s[1], s[2]), u = e(t[0], t[1], t[2]);
                r(d, d), r(u, u);
                var o = n(d, u);
                return o > 1 ? 0 : Math.acos(o);
              };
              var e = g("./fromValues"), r = g("./normalize"), n = g("./dot");
            }, { "./dot": 162, "./fromValues": 168, "./normalize": 179 }], 153: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = Math.ceil(r[0]), e[1] = Math.ceil(r[1]), e[2] = Math.ceil(r[2]), e;
              };
            }, {}], 154: [function(g, k, x) {
              k.exports = function(e) {
                var r = new Float32Array(3);
                return r[0] = e[0], r[1] = e[1], r[2] = e[2], r;
              };
            }, {}], 155: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = r[0], e[1] = r[1], e[2] = r[2], e;
              };
            }, {}], 156: [function(g, k, x) {
              k.exports = function() {
                var e = new Float32Array(3);
                return e[0] = 0, e[1] = 0, e[2] = 0, e;
              };
            }, {}], 157: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = n[0], o = n[1], h = n[2];
                return e[0] = t * h - d * o, e[1] = d * u - s * h, e[2] = s * o - t * u, e;
              };
            }, {}], 158: [function(g, k, x) {
              k.exports = g("./distance");
            }, { "./distance": 159 }], 159: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0] - e[0], s = r[1] - e[1], t = r[2] - e[2];
                return Math.sqrt(n * n + s * s + t * t);
              };
            }, {}], 160: [function(g, k, x) {
              k.exports = g("./divide");
            }, { "./divide": 161 }], 161: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] / n[0], e[1] = r[1] / n[1], e[2] = r[2] / n[2], e;
              };
            }, {}], 162: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] * r[0] + e[1] * r[1] + e[2] * r[2];
              };
            }, {}], 163: [function(g, k, x) {
              k.exports = 1e-6;
            }, {}], 164: [function(g, k, x) {
              k.exports = function(r, n) {
                var s = r[0], t = r[1], d = r[2], u = n[0], o = n[1], h = n[2];
                return Math.abs(s - u) <= e * Math.max(1, Math.abs(s), Math.abs(u)) && Math.abs(t - o) <= e * Math.max(1, Math.abs(t), Math.abs(o)) && Math.abs(d - h) <= e * Math.max(1, Math.abs(d), Math.abs(h));
              };
              var e = g("./epsilon");
            }, { "./epsilon": 163 }], 165: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] === r[0] && e[1] === r[1] && e[2] === r[2];
              };
            }, {}], 166: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = Math.floor(r[0]), e[1] = Math.floor(r[1]), e[2] = Math.floor(r[2]), e;
              };
            }, {}], 167: [function(g, k, x) {
              k.exports = function(r, n, s, t, d, u) {
                var o, h;
                for (n || (n = 3), s || (s = 0), h = t ? Math.min(t * n + s, r.length) : r.length, o = s; o < h; o += n)
                  e[0] = r[o], e[1] = r[o + 1], e[2] = r[o + 2], d(e, e, u), r[o] = e[0], r[o + 1] = e[1], r[o + 2] = e[2];
                return r;
              };
              var e = g("./create")();
            }, { "./create": 156 }], 168: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = new Float32Array(3);
                return s[0] = e, s[1] = r, s[2] = n, s;
              };
            }, {}], 169: [function(g, k, x) {
              k.exports = { EPSILON: g("./epsilon"), create: g("./create"), clone: g("./clone"), angle: g("./angle"), fromValues: g("./fromValues"), copy: g("./copy"), set: g("./set"), equals: g("./equals"), exactEquals: g("./exactEquals"), add: g("./add"), subtract: g("./subtract"), sub: g("./sub"), multiply: g("./multiply"), mul: g("./mul"), divide: g("./divide"), div: g("./div"), min: g("./min"), max: g("./max"), floor: g("./floor"), ceil: g("./ceil"), round: g("./round"), scale: g("./scale"), scaleAndAdd: g("./scaleAndAdd"), distance: g("./distance"), dist: g("./dist"), squaredDistance: g("./squaredDistance"), sqrDist: g("./sqrDist"), length: g("./length"), len: g("./len"), squaredLength: g("./squaredLength"), sqrLen: g("./sqrLen"), negate: g("./negate"), inverse: g("./inverse"), normalize: g("./normalize"), dot: g("./dot"), cross: g("./cross"), lerp: g("./lerp"), random: g("./random"), transformMat4: g("./transformMat4"), transformMat3: g("./transformMat3"), transformQuat: g("./transformQuat"), rotateX: g("./rotateX"), rotateY: g("./rotateY"), rotateZ: g("./rotateZ"), forEach: g("./forEach") };
            }, { "./add": 151, "./angle": 152, "./ceil": 153, "./clone": 154, "./copy": 155, "./create": 156, "./cross": 157, "./dist": 158, "./distance": 159, "./div": 160, "./divide": 161, "./dot": 162, "./epsilon": 163, "./equals": 164, "./exactEquals": 165, "./floor": 166, "./forEach": 167, "./fromValues": 168, "./inverse": 170, "./len": 171, "./length": 172, "./lerp": 173, "./max": 174, "./min": 175, "./mul": 176, "./multiply": 177, "./negate": 178, "./normalize": 179, "./random": 180, "./rotateX": 181, "./rotateY": 182, "./rotateZ": 183, "./round": 184, "./scale": 185, "./scaleAndAdd": 186, "./set": 187, "./sqrDist": 188, "./sqrLen": 189, "./squaredDistance": 190, "./squaredLength": 191, "./sub": 192, "./subtract": 193, "./transformMat3": 194, "./transformMat4": 195, "./transformQuat": 196 }], 170: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = 1 / r[0], e[1] = 1 / r[1], e[2] = 1 / r[2], e;
              };
            }, {}], 171: [function(g, k, x) {
              k.exports = g("./length");
            }, { "./length": 172 }], 172: [function(g, k, x) {
              k.exports = function(e) {
                var r = e[0], n = e[1], s = e[2];
                return Math.sqrt(r * r + n * n + s * s);
              };
            }, {}], 173: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t = r[0], d = r[1], u = r[2];
                return e[0] = t + s * (n[0] - t), e[1] = d + s * (n[1] - d), e[2] = u + s * (n[2] - u), e;
              };
            }, {}], 174: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = Math.max(r[0], n[0]), e[1] = Math.max(r[1], n[1]), e[2] = Math.max(r[2], n[2]), e;
              };
            }, {}], 175: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = Math.min(r[0], n[0]), e[1] = Math.min(r[1], n[1]), e[2] = Math.min(r[2], n[2]), e;
              };
            }, {}], 176: [function(g, k, x) {
              k.exports = g("./multiply");
            }, { "./multiply": 177 }], 177: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] * n[0], e[1] = r[1] * n[1], e[2] = r[2] * n[2], e;
              };
            }, {}], 178: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = -r[0], e[1] = -r[1], e[2] = -r[2], e;
              };
            }, {}], 179: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0], s = r[1], t = r[2], d = n * n + s * s + t * t;
                return d > 0 && (d = 1 / Math.sqrt(d), e[0] = r[0] * d, e[1] = r[1] * d, e[2] = r[2] * d), e;
              };
            }, {}], 180: [function(g, k, x) {
              k.exports = function(e, r) {
                r = r || 1;
                var n = 2 * Math.random() * Math.PI, s = 2 * Math.random() - 1, t = Math.sqrt(1 - s * s) * r;
                return e[0] = Math.cos(n) * t, e[1] = Math.sin(n) * t, e[2] = s * r, e;
              };
            }, {}], 181: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t = n[1], d = n[2], u = r[1] - t, o = r[2] - d, h = Math.sin(s), l = Math.cos(s);
                return e[0] = r[0], e[1] = t + u * l - o * h, e[2] = d + u * h + o * l, e;
              };
            }, {}], 182: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t = n[0], d = n[2], u = r[0] - t, o = r[2] - d, h = Math.sin(s), l = Math.cos(s);
                return e[0] = t + o * h + u * l, e[1] = r[1], e[2] = d + o * l - u * h, e;
              };
            }, {}], 183: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t = n[0], d = n[1], u = r[0] - t, o = r[1] - d, h = Math.sin(s), l = Math.cos(s);
                return e[0] = t + u * l - o * h, e[1] = d + u * h + o * l, e[2] = r[2], e;
              };
            }, {}], 184: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = Math.round(r[0]), e[1] = Math.round(r[1]), e[2] = Math.round(r[2]), e;
              };
            }, {}], 185: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] * n, e[1] = r[1] * n, e[2] = r[2] * n, e;
              };
            }, {}], 186: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                return e[0] = r[0] + n[0] * s, e[1] = r[1] + n[1] * s, e[2] = r[2] + n[2] * s, e;
              };
            }, {}], 187: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                return e[0] = r, e[1] = n, e[2] = s, e;
              };
            }, {}], 188: [function(g, k, x) {
              k.exports = g("./squaredDistance");
            }, { "./squaredDistance": 190 }], 189: [function(g, k, x) {
              k.exports = g("./squaredLength");
            }, { "./squaredLength": 191 }], 190: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0] - e[0], s = r[1] - e[1], t = r[2] - e[2];
                return n * n + s * s + t * t;
              };
            }, {}], 191: [function(g, k, x) {
              k.exports = function(e) {
                var r = e[0], n = e[1], s = e[2];
                return r * r + n * n + s * s;
              };
            }, {}], 192: [function(g, k, x) {
              k.exports = g("./subtract");
            }, { "./subtract": 193 }], 193: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] - n[0], e[1] = r[1] - n[1], e[2] = r[2] - n[2], e;
              };
            }, {}], 194: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2];
                return e[0] = s * n[0] + t * n[3] + d * n[6], e[1] = s * n[1] + t * n[4] + d * n[7], e[2] = s * n[2] + t * n[5] + d * n[8], e;
              };
            }, {}], 195: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = n[3] * s + n[7] * t + n[11] * d + n[15];
                return u = u || 1, e[0] = (n[0] * s + n[4] * t + n[8] * d + n[12]) / u, e[1] = (n[1] * s + n[5] * t + n[9] * d + n[13]) / u, e[2] = (n[2] * s + n[6] * t + n[10] * d + n[14]) / u, e;
              };
            }, {}], 196: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = n[0], o = n[1], h = n[2], l = n[3], i = l * s + o * d - h * t, p = l * t + h * s - u * d, c = l * d + u * t - o * s, a = -u * s - o * t - h * d;
                return e[0] = i * l + a * -u + p * -h - c * -o, e[1] = p * l + a * -o + c * -u - i * -h, e[2] = c * l + a * -h + i * -o - p * -u, e;
              };
            }, {}], 197: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] + n[0], e[1] = r[1] + n[1], e[2] = r[2] + n[2], e[3] = r[3] + n[3], e;
              };
            }, {}], 198: [function(g, k, x) {
              k.exports = function(e) {
                var r = new Float32Array(4);
                return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r;
              };
            }, {}], 199: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = r[0], e[1] = r[1], e[2] = r[2], e[3] = r[3], e;
              };
            }, {}], 200: [function(g, k, x) {
              k.exports = function() {
                var e = new Float32Array(4);
                return e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 0, e;
              };
            }, {}], 201: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0] - e[0], s = r[1] - e[1], t = r[2] - e[2], d = r[3] - e[3];
                return Math.sqrt(n * n + s * s + t * t + d * d);
              };
            }, {}], 202: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] / n[0], e[1] = r[1] / n[1], e[2] = r[2] / n[2], e[3] = r[3] / n[3], e;
              };
            }, {}], 203: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] * r[0] + e[1] * r[1] + e[2] * r[2] + e[3] * r[3];
              };
            }, {}], 204: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t = new Float32Array(4);
                return t[0] = e, t[1] = r, t[2] = n, t[3] = s, t;
              };
            }, {}], 205: [function(g, k, x) {
              k.exports = { create: g("./create"), clone: g("./clone"), fromValues: g("./fromValues"), copy: g("./copy"), set: g("./set"), add: g("./add"), subtract: g("./subtract"), multiply: g("./multiply"), divide: g("./divide"), min: g("./min"), max: g("./max"), scale: g("./scale"), scaleAndAdd: g("./scaleAndAdd"), distance: g("./distance"), squaredDistance: g("./squaredDistance"), length: g("./length"), squaredLength: g("./squaredLength"), negate: g("./negate"), inverse: g("./inverse"), normalize: g("./normalize"), dot: g("./dot"), lerp: g("./lerp"), random: g("./random"), transformMat4: g("./transformMat4"), transformQuat: g("./transformQuat") };
            }, { "./add": 197, "./clone": 198, "./copy": 199, "./create": 200, "./distance": 201, "./divide": 202, "./dot": 203, "./fromValues": 204, "./inverse": 206, "./length": 207, "./lerp": 208, "./max": 209, "./min": 210, "./multiply": 211, "./negate": 212, "./normalize": 213, "./random": 214, "./scale": 215, "./scaleAndAdd": 216, "./set": 217, "./squaredDistance": 218, "./squaredLength": 219, "./subtract": 220, "./transformMat4": 221, "./transformQuat": 222 }], 206: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = 1 / r[0], e[1] = 1 / r[1], e[2] = 1 / r[2], e[3] = 1 / r[3], e;
              };
            }, {}], 207: [function(g, k, x) {
              k.exports = function(e) {
                var r = e[0], n = e[1], s = e[2], t = e[3];
                return Math.sqrt(r * r + n * n + s * s + t * t);
              };
            }, {}], 208: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                var t = r[0], d = r[1], u = r[2], o = r[3];
                return e[0] = t + s * (n[0] - t), e[1] = d + s * (n[1] - d), e[2] = u + s * (n[2] - u), e[3] = o + s * (n[3] - o), e;
              };
            }, {}], 209: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = Math.max(r[0], n[0]), e[1] = Math.max(r[1], n[1]), e[2] = Math.max(r[2], n[2]), e[3] = Math.max(r[3], n[3]), e;
              };
            }, {}], 210: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = Math.min(r[0], n[0]), e[1] = Math.min(r[1], n[1]), e[2] = Math.min(r[2], n[2]), e[3] = Math.min(r[3], n[3]), e;
              };
            }, {}], 211: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] * n[0], e[1] = r[1] * n[1], e[2] = r[2] * n[2], e[3] = r[3] * n[3], e;
              };
            }, {}], 212: [function(g, k, x) {
              k.exports = function(e, r) {
                return e[0] = -r[0], e[1] = -r[1], e[2] = -r[2], e[3] = -r[3], e;
              };
            }, {}], 213: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0], s = r[1], t = r[2], d = r[3], u = n * n + s * s + t * t + d * d;
                return u > 0 && (u = 1 / Math.sqrt(u), e[0] = n * u, e[1] = s * u, e[2] = t * u, e[3] = d * u), e;
              };
            }, {}], 214: [function(g, k, x) {
              var e = g("./normalize"), r = g("./scale");
              k.exports = function(n, s) {
                return s = s || 1, n[0] = Math.random(), n[1] = Math.random(), n[2] = Math.random(), n[3] = Math.random(), e(n, n), r(n, n, s), n;
              };
            }, { "./normalize": 213, "./scale": 215 }], 215: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] * n, e[1] = r[1] * n, e[2] = r[2] * n, e[3] = r[3] * n, e;
              };
            }, {}], 216: [function(g, k, x) {
              k.exports = function(e, r, n, s) {
                return e[0] = r[0] + n[0] * s, e[1] = r[1] + n[1] * s, e[2] = r[2] + n[2] * s, e[3] = r[3] + n[3] * s, e;
              };
            }, {}], 217: [function(g, k, x) {
              k.exports = function(e, r, n, s, t) {
                return e[0] = r, e[1] = n, e[2] = s, e[3] = t, e;
              };
            }, {}], 218: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[0] - e[0], s = r[1] - e[1], t = r[2] - e[2], d = r[3] - e[3];
                return n * n + s * s + t * t + d * d;
              };
            }, {}], 219: [function(g, k, x) {
              k.exports = function(e) {
                var r = e[0], n = e[1], s = e[2], t = e[3];
                return r * r + n * n + s * s + t * t;
              };
            }, {}], 220: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e[0] = r[0] - n[0], e[1] = r[1] - n[1], e[2] = r[2] - n[2], e[3] = r[3] - n[3], e;
              };
            }, {}], 221: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = r[3];
                return e[0] = n[0] * s + n[4] * t + n[8] * d + n[12] * u, e[1] = n[1] * s + n[5] * t + n[9] * d + n[13] * u, e[2] = n[2] * s + n[6] * t + n[10] * d + n[14] * u, e[3] = n[3] * s + n[7] * t + n[11] * d + n[15] * u, e;
              };
            }, {}], 222: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = r[0], t = r[1], d = r[2], u = n[0], o = n[1], h = n[2], l = n[3], i = l * s + o * d - h * t, p = l * t + h * s - u * d, c = l * d + u * t - o * s, a = -u * s - o * t - h * d;
                return e[0] = i * l + a * -u + p * -h - c * -o, e[1] = p * l + a * -o + c * -u - i * -h, e[2] = c * l + a * -h + i * -o - p * -u, e[3] = r[3], e;
              };
            }, {}], 223: [function(g, k, x) {
              var e = g("glsl-tokenizer"), r = g("atob-lite");
              k.exports = function(n) {
                for (var s = Array.isArray(n) ? n : e(n), t = 0; t < s.length; t++) {
                  var d = s[t];
                  if (d.type === "preprocessor") {
                    var u = d.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);
                    if (u && u[2]) {
                      var o = u[1], h = u[2];
                      return (o ? r(h) : h).trim();
                    }
                  }
                }
              };
            }, { "atob-lite": 13, "glsl-tokenizer": 230 }], 224: [function(g, k, x) {
              k.exports = function(u) {
                var o, h, l, i = 0, p = 0, c = 999, a = [], y = [], f = 1, _ = 0, b = 0, w = !1, T = !1, L = "", A = n, I = e;
                (u = u || {}).version === "300 es" && (A = t, I = s);
                var P = {}, S = {};
                for (i = 0; i < A.length; i++)
                  P[A[i]] = !0;
                for (i = 0; i < I.length; i++)
                  S[I[i]] = !0;
                return function(B) {
                  return y = [], B !== null ? function(U) {
                    i = 0, U.toString && (U = U.toString());
                    var ee;
                    for (L += U.replace(/\r\n/g, `
`), l = L.length; o = L[i], i < l; ) {
                      switch (ee = i, c) {
                        case 0:
                          i = H();
                          break;
                        case 1:
                        case 2:
                          i = j();
                          break;
                        case 3:
                          i = Y();
                          break;
                        case 4:
                          i = Z();
                          break;
                        case 11:
                          i = W();
                          break;
                        case 5:
                          i = re();
                          break;
                        case 9999:
                          i = V();
                          break;
                        case 9:
                          i = z();
                          break;
                        case 999:
                          i = R();
                      }
                      if (ee !== i)
                        switch (L[ee]) {
                          case `
`:
                            _ = 0, ++f;
                            break;
                          default:
                            ++_;
                        }
                    }
                    return p += i, L = L.slice(i), y;
                  }(B) : function(U) {
                    return a.length && E(a.join("")), c = 10, E("(eof)"), y;
                  }();
                };
                function E(B) {
                  B.length && y.push({ type: d[c], data: B, position: b, line: f, column: _ });
                }
                function R() {
                  return a = a.length ? [] : a, h === "/" && o === "*" ? (b = p + i - 1, c = 0, h = o, i + 1) : h === "/" && o === "/" ? (b = p + i - 1, c = 1, h = o, i + 1) : o === "#" ? (c = 2, b = p + i, i) : /\s/.test(o) ? (c = 9, b = p + i, i) : (w = /\d/.test(o), T = /[^\w_]/.test(o), b = p + i, c = w ? 4 : T ? 3 : 9999, i);
                }
                function z() {
                  return /[^\s]/g.test(o) ? (E(a.join("")), c = 999, i) : (a.push(o), h = o, i + 1);
                }
                function j() {
                  return o !== "\r" && o !== `
` || h === "\\" ? (a.push(o), h = o, i + 1) : (E(a.join("")), c = 999, i);
                }
                function H() {
                  return o === "/" && h === "*" ? (a.push(o), E(a.join("")), c = 999, i + 1) : (a.push(o), h = o, i + 1);
                }
                function Y() {
                  if (h === "." && /\d/.test(o))
                    return c = 5, i;
                  if (h === "/" && o === "*")
                    return c = 0, i;
                  if (h === "/" && o === "/")
                    return c = 1, i;
                  if (o === "." && a.length) {
                    for (; J(a); )
                      ;
                    return c = 5, i;
                  }
                  if (o === ";" || o === ")" || o === "(") {
                    if (a.length)
                      for (; J(a); )
                        ;
                    return E(o), c = 999, i + 1;
                  }
                  var B = a.length === 2 && o !== "=";
                  if (/[\w_\d\s]/.test(o) || B) {
                    for (; J(a); )
                      ;
                    return c = 999, i;
                  }
                  return a.push(o), h = o, i + 1;
                }
                function J(B) {
                  for (var U, ee, N = 0; ; ) {
                    if (U = r.indexOf(B.slice(0, B.length + N).join("")), ee = r[U], U === -1) {
                      if (N-- + B.length > 0)
                        continue;
                      ee = B.slice(0, 1).join("");
                    }
                    return E(ee), b += ee.length, (a = a.slice(ee.length)).length;
                  }
                }
                function W() {
                  return /[^a-fA-F0-9]/.test(o) ? (E(a.join("")), c = 999, i) : (a.push(o), h = o, i + 1);
                }
                function Z() {
                  return o === "." || /[eE]/.test(o) ? (a.push(o), c = 5, h = o, i + 1) : o === "x" && a.length === 1 && a[0] === "0" ? (c = 11, a.push(o), h = o, i + 1) : /[^\d]/.test(o) ? (E(a.join("")), c = 999, i) : (a.push(o), h = o, i + 1);
                }
                function re() {
                  return o === "f" && (a.push(o), h = o, i += 1), /[eE]/.test(o) ? (a.push(o), h = o, i + 1) : (o !== "-" && o !== "+" || !/[eE]/.test(h)) && /[^\d]/.test(o) ? (E(a.join("")), c = 999, i) : (a.push(o), h = o, i + 1);
                }
                function V() {
                  if (/[^\d\w_]/.test(o)) {
                    var B = a.join("");
                    return c = S[B] ? 8 : P[B] ? 7 : 6, E(a.join("")), c = 999, i;
                  }
                  return a.push(o), h = o, i + 1;
                }
              };
              var e = g("./lib/literals"), r = g("./lib/operators"), n = g("./lib/builtins"), s = g("./lib/literals-300es"), t = g("./lib/builtins-300es"), d = ["block-comment", "line-comment", "preprocessor", "operator", "integer", "float", "ident", "builtin", "keyword", "whitespace", "eof", "integer"];
            }, { "./lib/builtins": 226, "./lib/builtins-300es": 225, "./lib/literals": 228, "./lib/literals-300es": 227, "./lib/operators": 229 }], 225: [function(g, k, x) {
              var e = g("./builtins");
              e = e.slice().filter(function(r) {
                return !/^(gl\_|texture)/.test(r);
              }), k.exports = e.concat(["gl_VertexID", "gl_InstanceID", "gl_Position", "gl_PointSize", "gl_FragCoord", "gl_FrontFacing", "gl_FragDepth", "gl_PointCoord", "gl_MaxVertexAttribs", "gl_MaxVertexUniformVectors", "gl_MaxVertexOutputVectors", "gl_MaxFragmentInputVectors", "gl_MaxVertexTextureImageUnits", "gl_MaxCombinedTextureImageUnits", "gl_MaxTextureImageUnits", "gl_MaxFragmentUniformVectors", "gl_MaxDrawBuffers", "gl_MinProgramTexelOffset", "gl_MaxProgramTexelOffset", "gl_DepthRangeParameters", "gl_DepthRange", "trunc", "round", "roundEven", "isnan", "isinf", "floatBitsToInt", "floatBitsToUint", "intBitsToFloat", "uintBitsToFloat", "packSnorm2x16", "unpackSnorm2x16", "packUnorm2x16", "unpackUnorm2x16", "packHalf2x16", "unpackHalf2x16", "outerProduct", "transpose", "determinant", "inverse", "texture", "textureSize", "textureProj", "textureLod", "textureOffset", "texelFetch", "texelFetchOffset", "textureProjOffset", "textureLodOffset", "textureProjLod", "textureProjLodOffset", "textureGrad", "textureGradOffset", "textureProjGrad", "textureProjGradOffset"]);
            }, { "./builtins": 226 }], 226: [function(g, k, x) {
              k.exports = ["abs", "acos", "all", "any", "asin", "atan", "ceil", "clamp", "cos", "cross", "dFdx", "dFdy", "degrees", "distance", "dot", "equal", "exp", "exp2", "faceforward", "floor", "fract", "gl_BackColor", "gl_BackLightModelProduct", "gl_BackLightProduct", "gl_BackMaterial", "gl_BackSecondaryColor", "gl_ClipPlane", "gl_ClipVertex", "gl_Color", "gl_DepthRange", "gl_DepthRangeParameters", "gl_EyePlaneQ", "gl_EyePlaneR", "gl_EyePlaneS", "gl_EyePlaneT", "gl_Fog", "gl_FogCoord", "gl_FogFragCoord", "gl_FogParameters", "gl_FragColor", "gl_FragCoord", "gl_FragData", "gl_FragDepth", "gl_FragDepthEXT", "gl_FrontColor", "gl_FrontFacing", "gl_FrontLightModelProduct", "gl_FrontLightProduct", "gl_FrontMaterial", "gl_FrontSecondaryColor", "gl_LightModel", "gl_LightModelParameters", "gl_LightModelProducts", "gl_LightProducts", "gl_LightSource", "gl_LightSourceParameters", "gl_MaterialParameters", "gl_MaxClipPlanes", "gl_MaxCombinedTextureImageUnits", "gl_MaxDrawBuffers", "gl_MaxFragmentUniformComponents", "gl_MaxLights", "gl_MaxTextureCoords", "gl_MaxTextureImageUnits", "gl_MaxTextureUnits", "gl_MaxVaryingFloats", "gl_MaxVertexAttribs", "gl_MaxVertexTextureImageUnits", "gl_MaxVertexUniformComponents", "gl_ModelViewMatrix", "gl_ModelViewMatrixInverse", "gl_ModelViewMatrixInverseTranspose", "gl_ModelViewMatrixTranspose", "gl_ModelViewProjectionMatrix", "gl_ModelViewProjectionMatrixInverse", "gl_ModelViewProjectionMatrixInverseTranspose", "gl_ModelViewProjectionMatrixTranspose", "gl_MultiTexCoord0", "gl_MultiTexCoord1", "gl_MultiTexCoord2", "gl_MultiTexCoord3", "gl_MultiTexCoord4", "gl_MultiTexCoord5", "gl_MultiTexCoord6", "gl_MultiTexCoord7", "gl_Normal", "gl_NormalMatrix", "gl_NormalScale", "gl_ObjectPlaneQ", "gl_ObjectPlaneR", "gl_ObjectPlaneS", "gl_ObjectPlaneT", "gl_Point", "gl_PointCoord", "gl_PointParameters", "gl_PointSize", "gl_Position", "gl_ProjectionMatrix", "gl_ProjectionMatrixInverse", "gl_ProjectionMatrixInverseTranspose", "gl_ProjectionMatrixTranspose", "gl_SecondaryColor", "gl_TexCoord", "gl_TextureEnvColor", "gl_TextureMatrix", "gl_TextureMatrixInverse", "gl_TextureMatrixInverseTranspose", "gl_TextureMatrixTranspose", "gl_Vertex", "greaterThan", "greaterThanEqual", "inversesqrt", "length", "lessThan", "lessThanEqual", "log", "log2", "matrixCompMult", "max", "min", "mix", "mod", "normalize", "not", "notEqual", "pow", "radians", "reflect", "refract", "sign", "sin", "smoothstep", "sqrt", "step", "tan", "texture2D", "texture2DLod", "texture2DProj", "texture2DProjLod", "textureCube", "textureCubeLod", "texture2DLodEXT", "texture2DProjLodEXT", "textureCubeLodEXT", "texture2DGradEXT", "texture2DProjGradEXT", "textureCubeGradEXT"];
            }, {}], 227: [function(g, k, x) {
              var e = g("./literals");
              k.exports = e.slice().concat(["layout", "centroid", "smooth", "case", "mat2x2", "mat2x3", "mat2x4", "mat3x2", "mat3x3", "mat3x4", "mat4x2", "mat4x3", "mat4x4", "uvec2", "uvec3", "uvec4", "samplerCubeShadow", "sampler2DArray", "sampler2DArrayShadow", "isampler2D", "isampler3D", "isamplerCube", "isampler2DArray", "usampler2D", "usampler3D", "usamplerCube", "usampler2DArray", "coherent", "restrict", "readonly", "writeonly", "resource", "atomic_uint", "noperspective", "patch", "sample", "subroutine", "common", "partition", "active", "filter", "image1D", "image2D", "image3D", "imageCube", "iimage1D", "iimage2D", "iimage3D", "iimageCube", "uimage1D", "uimage2D", "uimage3D", "uimageCube", "image1DArray", "image2DArray", "iimage1DArray", "iimage2DArray", "uimage1DArray", "uimage2DArray", "image1DShadow", "image2DShadow", "image1DArrayShadow", "image2DArrayShadow", "imageBuffer", "iimageBuffer", "uimageBuffer", "sampler1DArray", "sampler1DArrayShadow", "isampler1D", "isampler1DArray", "usampler1D", "usampler1DArray", "isampler2DRect", "usampler2DRect", "samplerBuffer", "isamplerBuffer", "usamplerBuffer", "sampler2DMS", "isampler2DMS", "usampler2DMS", "sampler2DMSArray", "isampler2DMSArray", "usampler2DMSArray"]);
            }, { "./literals": 228 }], 228: [function(g, k, x) {
              k.exports = ["precision", "highp", "mediump", "lowp", "attribute", "const", "uniform", "varying", "break", "continue", "do", "for", "while", "if", "else", "in", "out", "inout", "float", "int", "uint", "void", "bool", "true", "false", "discard", "return", "mat2", "mat3", "mat4", "vec2", "vec3", "vec4", "ivec2", "ivec3", "ivec4", "bvec2", "bvec3", "bvec4", "sampler1D", "sampler2D", "sampler3D", "samplerCube", "sampler1DShadow", "sampler2DShadow", "struct", "asm", "class", "union", "enum", "typedef", "template", "this", "packed", "goto", "switch", "default", "inline", "noinline", "volatile", "public", "static", "extern", "external", "interface", "long", "short", "double", "half", "fixed", "unsigned", "input", "output", "hvec2", "hvec3", "hvec4", "dvec2", "dvec3", "dvec4", "fvec2", "fvec3", "fvec4", "sampler2DRect", "sampler3DRect", "sampler2DRectShadow", "sizeof", "cast", "namespace", "using"];
            }, {}], 229: [function(g, k, x) {
              k.exports = ["<<=", ">>=", "++", "--", "<<", ">>", "<=", ">=", "==", "!=", "&&", "||", "+=", "-=", "*=", "/=", "%=", "&=", "^^", "^=", "|=", "(", ")", "[", "]", ".", "!", "~", "*", "/", "%", "+", "-", "<", ">", "&", "^", "|", "?", ":", "=", ",", ";", "{", "}"];
            }, {}], 230: [function(g, k, x) {
              var e = g("./index");
              k.exports = function(r, n) {
                var s = e(n), t = [];
                return t = (t = t.concat(s(r))).concat(s(null));
              };
            }, { "./index": 224 }], 231: [function(g, k, x) {
              k.exports = function(e) {
                typeof e == "string" && (e = [e]);
                for (var r = [].slice.call(arguments, 1), n = [], s = 0; s < e.length - 1; s++)
                  n.push(e[s], r[s] || "");
                return n.push(e[s]), n.join("");
              };
            }, {}], 232: [function(g, k, x) {
              var e = g("is-browser");
              k.exports = e && function() {
                var r = !1;
                try {
                  var n = Object.defineProperty({}, "passive", { get: function() {
                    r = !0;
                  } });
                  window.addEventListener("test", null, n), window.removeEventListener("test", null, n);
                } catch {
                  r = !1;
                }
                return r;
              }();
            }, { "is-browser": 236 }], 233: [function(g, k, x) {
              k.exports = function(h, l) {
                var i = h.length;
                if (i === 0)
                  throw new Error("Must have at least d+1 points");
                var p = h[0].length;
                if (i <= p)
                  throw new Error("Must input at least d+1 points");
                var c = h.slice(0, p + 1), a = e.apply(void 0, c);
                if (a === 0)
                  throw new Error("Input not in general position");
                for (var y = new Array(p + 1), f = 0; f <= p; ++f)
                  y[f] = f;
                a < 0 && (y[0] = 1, y[1] = 0);
                var _ = new n(y, new Array(p + 1), !1), b = _.adjacent, w = new Array(p + 2);
                for (f = 0; f <= p; ++f) {
                  for (var T = y.slice(), L = 0; L <= p; ++L)
                    L === f && (T[L] = -1);
                  var A = T[0];
                  T[0] = T[1], T[1] = A;
                  var I = new n(T, new Array(p + 1), !0);
                  b[f] = I, w[f] = I;
                }
                for (w[p + 1] = _, f = 0; f <= p; ++f) {
                  T = b[f].vertices;
                  var P = b[f].adjacent;
                  for (L = 0; L <= p; ++L) {
                    var S = T[L];
                    if (S < 0)
                      P[L] = _;
                    else
                      for (var E = 0; E <= p; ++E)
                        b[E].vertices.indexOf(S) < 0 && (P[L] = b[E]);
                  }
                }
                var R = new u(p, c, w), z = !!l;
                for (f = p + 1; f < i; ++f)
                  R.insert(h[f], z);
                return R.boundary();
              };
              var e = g("robust-orientation"), r = g("simplicial-complex").compareCells;
              function n(h, l, i) {
                this.vertices = h, this.adjacent = l, this.boundary = i, this.lastVisited = -1;
              }
              function s(h, l, i) {
                this.vertices = h, this.cell = l, this.index = i;
              }
              function t(h, l) {
                return r(h.vertices, l.vertices);
              }
              n.prototype.flip = function() {
                var h = this.vertices[0];
                this.vertices[0] = this.vertices[1], this.vertices[1] = h;
                var l = this.adjacent[0];
                this.adjacent[0] = this.adjacent[1], this.adjacent[1] = l;
              };
              var d = [];
              function u(h, l, i) {
                this.dimension = h, this.vertices = l, this.simplices = i, this.interior = i.filter(function(y) {
                  return !y.boundary;
                }), this.tuple = new Array(h + 1);
                for (var p = 0; p <= h; ++p)
                  this.tuple[p] = this.vertices[p];
                var c, a = d[h];
                a || (a = d[h] = ((c = e[h + 1]) || (c = e), function(y) {
                  return function() {
                    var f = this.tuple;
                    return y.apply(this, f);
                  };
                }(c))), this.orient = a;
              }
              var o = u.prototype;
              o.handleBoundaryDegeneracy = function(h, l) {
                var i = this.dimension, p = this.vertices.length - 1, c = this.tuple, a = this.vertices, y = [h];
                for (h.lastVisited = -p; y.length > 0; )
                  for (var f = (h = y.pop()).adjacent, _ = 0; _ <= i; ++_) {
                    var b = f[_];
                    if (b.boundary && !(b.lastVisited <= -p)) {
                      for (var w = b.vertices, T = 0; T <= i; ++T) {
                        var L = w[T];
                        c[T] = L < 0 ? l : a[L];
                      }
                      var A = this.orient();
                      if (A > 0)
                        return b;
                      b.lastVisited = -p, A === 0 && y.push(b);
                    }
                  }
                return null;
              }, o.walk = function(h, l) {
                var i = this.vertices.length - 1, p = this.dimension, c = this.vertices, a = this.tuple, y = l ? this.interior.length * Math.random() | 0 : this.interior.length - 1, f = this.interior[y];
                e:
                  for (; !f.boundary; ) {
                    for (var _ = f.vertices, b = f.adjacent, w = 0; w <= p; ++w)
                      a[w] = c[_[w]];
                    for (f.lastVisited = i, w = 0; w <= p; ++w) {
                      var T = b[w];
                      if (!(T.lastVisited >= i)) {
                        var L = a[w];
                        a[w] = h;
                        var A = this.orient();
                        if (a[w] = L, A < 0) {
                          f = T;
                          continue e;
                        }
                        T.boundary ? T.lastVisited = -i : T.lastVisited = i;
                      }
                    }
                    return;
                  }
                return f;
              }, o.addPeaks = function(h, l) {
                var i = this.vertices.length - 1, p = this.dimension, c = this.vertices, a = this.tuple, y = this.interior, f = this.simplices, _ = [l];
                l.lastVisited = i, l.vertices[l.vertices.indexOf(-1)] = i, l.boundary = !1, y.push(l);
                for (var b = []; _.length > 0; ) {
                  var w = (l = _.pop()).vertices, T = l.adjacent, L = w.indexOf(i);
                  if (!(L < 0)) {
                    for (var A = 0; A <= p; ++A)
                      if (A !== L) {
                        var I = T[A];
                        if (I.boundary && !(I.lastVisited >= i)) {
                          var P = I.vertices;
                          if (I.lastVisited !== -i) {
                            for (var S = 0, E = 0; E <= p; ++E)
                              P[E] < 0 ? (S = E, a[E] = h) : a[E] = c[P[E]];
                            if (this.orient() > 0) {
                              P[S] = i, I.boundary = !1, y.push(I), _.push(I), I.lastVisited = i;
                              continue;
                            }
                            I.lastVisited = -i;
                          }
                          var R = I.adjacent, z = w.slice(), j = T.slice(), H = new n(z, j, !0);
                          f.push(H);
                          var Y = R.indexOf(l);
                          if (!(Y < 0))
                            for (R[Y] = H, j[L] = I, z[A] = -1, j[A] = l, T[A] = H, H.flip(), E = 0; E <= p; ++E) {
                              var J = z[E];
                              if (!(J < 0 || J === i)) {
                                for (var W = new Array(p - 1), Z = 0, re = 0; re <= p; ++re) {
                                  var V = z[re];
                                  V < 0 || re === E || (W[Z++] = V);
                                }
                                b.push(new s(W, H, E));
                              }
                            }
                        }
                      }
                  }
                }
                for (b.sort(t), A = 0; A + 1 < b.length; A += 2) {
                  var B = b[A], U = b[A + 1], ee = B.index, N = U.index;
                  ee < 0 || N < 0 || (B.cell.adjacent[B.index] = U.cell, U.cell.adjacent[U.index] = B.cell);
                }
              }, o.insert = function(h, l) {
                var i = this.vertices;
                i.push(h);
                var p = this.walk(h, l);
                if (p) {
                  for (var c = this.dimension, a = this.tuple, y = 0; y <= c; ++y) {
                    var f = p.vertices[y];
                    a[y] = f < 0 ? h : i[f];
                  }
                  var _ = this.orient(a);
                  _ < 0 || (_ !== 0 || (p = this.handleBoundaryDegeneracy(p, h))) && this.addPeaks(h, p);
                }
              }, o.boundary = function() {
                for (var h = this.dimension, l = [], i = this.simplices, p = i.length, c = 0; c < p; ++c) {
                  var a = i[c];
                  if (a.boundary) {
                    for (var y = new Array(h), f = a.vertices, _ = 0, b = 0, w = 0; w <= h; ++w)
                      f[w] >= 0 ? y[_++] = f[w] : b = 1 & w;
                    if (b === (1 & h)) {
                      var T = y[0];
                      y[0] = y[1], y[1] = T;
                    }
                    l.push(y);
                  }
                }
                return l;
              };
            }, { "robust-orientation": 284, "simplicial-complex": 293 }], 234: [function(g, k, x) {
              var e = g("binary-search-bounds");
              function r(_, b, w, T, L) {
                this.mid = _, this.left = b, this.right = w, this.leftPoints = T, this.rightPoints = L, this.count = (b ? b.count : 0) + (w ? w.count : 0) + T.length;
              }
              k.exports = function(_) {
                return !_ || _.length === 0 ? new y(null) : new y(a(_));
              };
              var n = r.prototype;
              function s(_, b) {
                _.mid = b.mid, _.left = b.left, _.right = b.right, _.leftPoints = b.leftPoints, _.rightPoints = b.rightPoints, _.count = b.count;
              }
              function t(_, b) {
                var w = a(b);
                _.mid = w.mid, _.left = w.left, _.right = w.right, _.leftPoints = w.leftPoints, _.rightPoints = w.rightPoints, _.count = w.count;
              }
              function d(_, b) {
                var w = _.intervals([]);
                w.push(b), t(_, w);
              }
              function u(_, b) {
                var w = _.intervals([]), T = w.indexOf(b);
                return T < 0 ? 0 : (w.splice(T, 1), t(_, w), 1);
              }
              function o(_, b, w) {
                for (var T = 0; T < _.length && _[T][0] <= b; ++T) {
                  var L = w(_[T]);
                  if (L)
                    return L;
                }
              }
              function h(_, b, w) {
                for (var T = _.length - 1; T >= 0 && _[T][1] >= b; --T) {
                  var L = w(_[T]);
                  if (L)
                    return L;
                }
              }
              function l(_, b) {
                for (var w = 0; w < _.length; ++w) {
                  var T = b(_[w]);
                  if (T)
                    return T;
                }
              }
              function i(_, b) {
                return _ - b;
              }
              function p(_, b) {
                var w = _[0] - b[0];
                return w || _[1] - b[1];
              }
              function c(_, b) {
                var w = _[1] - b[1];
                return w || _[0] - b[0];
              }
              function a(_) {
                if (_.length === 0)
                  return null;
                for (var b = [], w = 0; w < _.length; ++w)
                  b.push(_[w][0], _[w][1]);
                b.sort(i);
                var T = b[b.length >> 1], L = [], A = [], I = [];
                for (w = 0; w < _.length; ++w) {
                  var P = _[w];
                  P[1] < T ? L.push(P) : T < P[0] ? A.push(P) : I.push(P);
                }
                var S = I, E = I.slice();
                return S.sort(p), E.sort(c), new r(T, a(L), a(A), S, E);
              }
              function y(_) {
                this.root = _;
              }
              n.intervals = function(_) {
                return _.push.apply(_, this.leftPoints), this.left && this.left.intervals(_), this.right && this.right.intervals(_), _;
              }, n.insert = function(_) {
                var b = this.count - this.leftPoints.length;
                if (this.count += 1, _[1] < this.mid)
                  this.left ? 4 * (this.left.count + 1) > 3 * (b + 1) ? d(this, _) : this.left.insert(_) : this.left = a([_]);
                else if (_[0] > this.mid)
                  this.right ? 4 * (this.right.count + 1) > 3 * (b + 1) ? d(this, _) : this.right.insert(_) : this.right = a([_]);
                else {
                  var w = e.ge(this.leftPoints, _, p), T = e.ge(this.rightPoints, _, c);
                  this.leftPoints.splice(w, 0, _), this.rightPoints.splice(T, 0, _);
                }
              }, n.remove = function(_) {
                var b = this.count - this.leftPoints;
                if (_[1] < this.mid)
                  return this.left ? 4 * (this.right ? this.right.count : 0) > 3 * (b - 1) ? u(this, _) : (A = this.left.remove(_)) === 2 ? (this.left = null, this.count -= 1, 1) : (A === 1 && (this.count -= 1), A) : 0;
                if (_[0] > this.mid)
                  return this.right ? 4 * (this.left ? this.left.count : 0) > 3 * (b - 1) ? u(this, _) : (A = this.right.remove(_)) === 2 ? (this.right = null, this.count -= 1, 1) : (A === 1 && (this.count -= 1), A) : 0;
                if (this.count === 1)
                  return this.leftPoints[0] === _ ? 2 : 0;
                if (this.leftPoints.length === 1 && this.leftPoints[0] === _) {
                  if (this.left && this.right) {
                    for (var w = this, T = this.left; T.right; )
                      w = T, T = T.right;
                    if (w === this)
                      T.right = this.right;
                    else {
                      var L = this.left, A = this.right;
                      w.count -= T.count, w.right = T.left, T.left = L, T.right = A;
                    }
                    s(this, T), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
                  } else
                    this.left ? s(this, this.left) : s(this, this.right);
                  return 1;
                }
                for (L = e.ge(this.leftPoints, _, p); L < this.leftPoints.length && this.leftPoints[L][0] === _[0]; ++L)
                  if (this.leftPoints[L] === _) {
                    for (this.count -= 1, this.leftPoints.splice(L, 1), A = e.ge(this.rightPoints, _, c); A < this.rightPoints.length && this.rightPoints[A][1] === _[1]; ++A)
                      if (this.rightPoints[A] === _)
                        return this.rightPoints.splice(A, 1), 1;
                  }
                return 0;
              }, n.queryPoint = function(_, b) {
                if (_ < this.mid)
                  return this.left && (w = this.left.queryPoint(_, b)) ? w : o(this.leftPoints, _, b);
                if (_ > this.mid) {
                  var w;
                  return this.right && (w = this.right.queryPoint(_, b)) ? w : h(this.rightPoints, _, b);
                }
                return l(this.leftPoints, b);
              }, n.queryInterval = function(_, b, w) {
                var T;
                return _ < this.mid && this.left && (T = this.left.queryInterval(_, b, w)) || b > this.mid && this.right && (T = this.right.queryInterval(_, b, w)) ? T : b < this.mid ? o(this.leftPoints, b, w) : _ > this.mid ? h(this.rightPoints, _, w) : l(this.leftPoints, w);
              };
              var f = y.prototype;
              f.insert = function(_) {
                this.root ? this.root.insert(_) : this.root = new r(_[0], null, null, [_], [_]);
              }, f.remove = function(_) {
                if (this.root) {
                  var b = this.root.remove(_);
                  return b === 2 && (this.root = null), b !== 0;
                }
                return !1;
              }, f.queryPoint = function(_, b) {
                if (this.root)
                  return this.root.queryPoint(_, b);
              }, f.queryInterval = function(_, b, w) {
                if (_ <= b && this.root)
                  return this.root.queryInterval(_, b, w);
              }, Object.defineProperty(f, "count", { get: function() {
                return this.root ? this.root.count : 0;
              } }), Object.defineProperty(f, "intervals", { get: function() {
                return this.root ? this.root.intervals([]) : [];
              } });
            }, { "binary-search-bounds": 31 }], 235: [function(g, k, x) {
              k.exports = function(e) {
                for (var r = new Array(e), n = 0; n < e; ++n)
                  r[n] = n;
                return r;
              };
            }, {}], 236: [function(g, k, x) {
              k.exports = !0;
            }, {}], 237: [function(g, k, x) {
              function e(r) {
                return !!r.constructor && typeof r.constructor.isBuffer == "function" && r.constructor.isBuffer(r);
              }
              /*!
               * Determine if an object is a Buffer
               *
               * @author   Feross Aboukhadijeh <https://feross.org>
               * @license  MIT
               */
              k.exports = function(r) {
                return r != null && (e(r) || function(n) {
                  return typeof n.readFloatLE == "function" && typeof n.slice == "function" && e(n.slice(0, 0));
                }(r) || !!r._isBuffer);
              };
            }, {}], 238: [function(g, k, x) {
              k.exports = n, k.exports.isMobile = n, k.exports.default = n;
              var e = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, r = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;
              function n(s) {
                s || (s = {});
                var t = s.ua;
                if (t || typeof navigator > "u" || (t = navigator.userAgent), t && t.headers && typeof t.headers["user-agent"] == "string" && (t = t.headers["user-agent"]), typeof t != "string")
                  return !1;
                var d = s.tablet ? r.test(t) : e.test(t);
                return !d && s.tablet && s.featureDetect && navigator && navigator.maxTouchPoints > 1 && t.indexOf("Macintosh") !== -1 && t.indexOf("Safari") !== -1 && (d = !0), d;
              }
            }, {}], 239: [function(g, k, x) {
              k.exports = function(e) {
                for (var r, n = e.length, s = 0; s < n; s++)
                  if (((r = e.charCodeAt(s)) < 9 || r > 13) && r !== 32 && r !== 133 && r !== 160 && r !== 5760 && r !== 6158 && (r < 8192 || r > 8205) && r !== 8232 && r !== 8233 && r !== 8239 && r !== 8287 && r !== 8288 && r !== 12288 && r !== 65279)
                    return !1;
                return !0;
              };
            }, {}], 240: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e * (1 - n) + r * n;
              };
            }, {}], 241: [function(g, k, x) {
              var e = g("./normalize"), r = g("gl-mat4/create"), n = g("gl-mat4/clone"), s = g("gl-mat4/determinant"), t = g("gl-mat4/invert"), d = g("gl-mat4/transpose"), u = { length: g("gl-vec3/length"), normalize: g("gl-vec3/normalize"), dot: g("gl-vec3/dot"), cross: g("gl-vec3/cross") }, o = r(), h = r(), l = [0, 0, 0, 0], i = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], p = [0, 0, 0];
              function c(a, y, f, _, b) {
                a[0] = y[0] * _ + f[0] * b, a[1] = y[1] * _ + f[1] * b, a[2] = y[2] * _ + f[2] * b;
              }
              k.exports = function(a, y, f, _, b, w) {
                if (y || (y = [0, 0, 0]), f || (f = [0, 0, 0]), _ || (_ = [0, 0, 0]), b || (b = [0, 0, 0, 1]), w || (w = [0, 0, 0, 1]), !e(o, a) || (n(h, o), h[3] = 0, h[7] = 0, h[11] = 0, h[15] = 1, Math.abs(s(h) < 1e-8)))
                  return !1;
                var T, L, A, I, P, S, E, R = o[3], z = o[7], j = o[11], H = o[12], Y = o[13], J = o[14], W = o[15];
                if (R !== 0 || z !== 0 || j !== 0) {
                  if (l[0] = R, l[1] = z, l[2] = j, l[3] = W, !t(h, h))
                    return !1;
                  d(h, h), T = b, A = h, I = (L = l)[0], P = L[1], S = L[2], E = L[3], T[0] = A[0] * I + A[4] * P + A[8] * S + A[12] * E, T[1] = A[1] * I + A[5] * P + A[9] * S + A[13] * E, T[2] = A[2] * I + A[6] * P + A[10] * S + A[14] * E, T[3] = A[3] * I + A[7] * P + A[11] * S + A[15] * E;
                } else
                  b[0] = b[1] = b[2] = 0, b[3] = 1;
                if (y[0] = H, y[1] = Y, y[2] = J, function(re, V) {
                  re[0][0] = V[0], re[0][1] = V[1], re[0][2] = V[2], re[1][0] = V[4], re[1][1] = V[5], re[1][2] = V[6], re[2][0] = V[8], re[2][1] = V[9], re[2][2] = V[10];
                }(i, o), f[0] = u.length(i[0]), u.normalize(i[0], i[0]), _[0] = u.dot(i[0], i[1]), c(i[1], i[1], i[0], 1, -_[0]), f[1] = u.length(i[1]), u.normalize(i[1], i[1]), _[0] /= f[1], _[1] = u.dot(i[0], i[2]), c(i[2], i[2], i[0], 1, -_[1]), _[2] = u.dot(i[1], i[2]), c(i[2], i[2], i[1], 1, -_[2]), f[2] = u.length(i[2]), u.normalize(i[2], i[2]), _[1] /= f[2], _[2] /= f[2], u.cross(p, i[1], i[2]), u.dot(i[0], p) < 0)
                  for (var Z = 0; Z < 3; Z++)
                    f[Z] *= -1, i[Z][0] *= -1, i[Z][1] *= -1, i[Z][2] *= -1;
                return w[0] = 0.5 * Math.sqrt(Math.max(1 + i[0][0] - i[1][1] - i[2][2], 0)), w[1] = 0.5 * Math.sqrt(Math.max(1 - i[0][0] + i[1][1] - i[2][2], 0)), w[2] = 0.5 * Math.sqrt(Math.max(1 - i[0][0] - i[1][1] + i[2][2], 0)), w[3] = 0.5 * Math.sqrt(Math.max(1 + i[0][0] + i[1][1] + i[2][2], 0)), i[2][1] > i[1][2] && (w[0] = -w[0]), i[0][2] > i[2][0] && (w[1] = -w[1]), i[1][0] > i[0][1] && (w[2] = -w[2]), !0;
              };
            }, { "./normalize": 242, "gl-mat4/clone": 92, "gl-mat4/create": 93, "gl-mat4/determinant": 94, "gl-mat4/invert": 98, "gl-mat4/transpose": 109, "gl-vec3/cross": 157, "gl-vec3/dot": 162, "gl-vec3/length": 172, "gl-vec3/normalize": 179 }], 242: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = r[15];
                if (n === 0)
                  return !1;
                for (var s = 1 / n, t = 0; t < 16; t++)
                  e[t] = r[t] * s;
                return !0;
              };
            }, {}], 243: [function(g, k, x) {
              var e = g("gl-vec3/lerp"), r = g("mat4-recompose"), n = g("mat4-decompose"), s = g("gl-mat4/determinant"), t = g("quat-slerp"), d = h(), u = h(), o = h();
              function h() {
                return { translate: l(), scale: l(1), skew: l(), perspective: [0, 0, 0, 1], quaternion: [0, 0, 0, 1] };
              }
              function l(i) {
                return [i || 0, i || 0, i || 0];
              }
              k.exports = function(i, p, c, a) {
                if (s(p) === 0 || s(c) === 0)
                  return !1;
                var y = n(p, d.translate, d.scale, d.skew, d.perspective, d.quaternion), f = n(c, u.translate, u.scale, u.skew, u.perspective, u.quaternion);
                return !(!y || !f) && (e(o.translate, d.translate, u.translate, a), e(o.skew, d.skew, u.skew, a), e(o.scale, d.scale, u.scale, a), e(o.perspective, d.perspective, u.perspective, a), t(o.quaternion, d.quaternion, u.quaternion, a), r(i, o.translate, o.scale, o.skew, o.perspective, o.quaternion), !0);
              };
            }, { "gl-mat4/determinant": 94, "gl-vec3/lerp": 173, "mat4-decompose": 241, "mat4-recompose": 244, "quat-slerp": 271 }], 244: [function(g, k, x) {
              var e = { identity: g("gl-mat4/identity"), translate: g("gl-mat4/translate"), multiply: g("gl-mat4/multiply"), create: g("gl-mat4/create"), scale: g("gl-mat4/scale"), fromRotationTranslation: g("gl-mat4/fromRotationTranslation") }, r = (e.create(), e.create());
              k.exports = function(n, s, t, d, u, o) {
                return e.identity(n), e.fromRotationTranslation(n, o, s), n[3] = u[0], n[7] = u[1], n[11] = u[2], n[15] = u[3], e.identity(r), d[2] !== 0 && (r[9] = d[2], e.multiply(n, n, r)), d[1] !== 0 && (r[9] = 0, r[8] = d[1], e.multiply(n, n, r)), d[0] !== 0 && (r[8] = 0, r[4] = d[0], e.multiply(n, n, r)), e.scale(n, n, t), n;
              };
            }, { "gl-mat4/create": 93, "gl-mat4/fromRotationTranslation": 96, "gl-mat4/identity": 97, "gl-mat4/multiply": 100, "gl-mat4/scale": 107, "gl-mat4/translate": 108 }], 245: [function(g, k, x) {
              var e = g("binary-search-bounds"), r = g("mat4-interpolate"), n = g("gl-mat4/invert"), s = g("gl-mat4/rotateX"), t = g("gl-mat4/rotateY"), d = g("gl-mat4/rotateZ"), u = g("gl-mat4/lookAt"), o = g("gl-mat4/translate"), h = (g("gl-mat4/scale"), g("gl-vec3/normalize")), l = [0, 0, 0];
              function i(a) {
                this._components = a.slice(), this._time = [0], this.prevMatrix = a.slice(), this.nextMatrix = a.slice(), this.computedMatrix = a.slice(), this.computedInverse = a.slice(), this.computedEye = [0, 0, 0], this.computedUp = [0, 0, 0], this.computedCenter = [0, 0, 0], this.computedRadius = [0], this._limits = [-1 / 0, 1 / 0];
              }
              k.exports = function(a) {
                return new i((a = a || {}).matrix || [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
              };
              var p = i.prototype;
              p.recalcMatrix = function(a) {
                var y = this._time, f = e.le(y, a), _ = this.computedMatrix;
                if (!(f < 0)) {
                  var b = this._components;
                  if (f === y.length - 1)
                    for (var w = 16 * f, T = 0; T < 16; ++T)
                      _[T] = b[w++];
                  else {
                    var L = y[f + 1] - y[f], A = (w = 16 * f, this.prevMatrix), I = !0;
                    for (T = 0; T < 16; ++T)
                      A[T] = b[w++];
                    var P = this.nextMatrix;
                    for (T = 0; T < 16; ++T)
                      P[T] = b[w++], I = I && A[T] === P[T];
                    if (L < 1e-6 || I)
                      for (T = 0; T < 16; ++T)
                        _[T] = A[T];
                    else
                      r(_, A, P, (a - y[f]) / L);
                  }
                  var S = this.computedUp;
                  S[0] = _[1], S[1] = _[5], S[2] = _[9], h(S, S);
                  var E = this.computedInverse;
                  n(E, _);
                  var R = this.computedEye, z = E[15];
                  R[0] = E[12] / z, R[1] = E[13] / z, R[2] = E[14] / z;
                  var j = this.computedCenter, H = Math.exp(this.computedRadius[0]);
                  for (T = 0; T < 3; ++T)
                    j[T] = R[T] - _[2 + 4 * T] * H;
                }
              }, p.idle = function(a) {
                if (!(a < this.lastT())) {
                  for (var y = this._components, f = y.length - 16, _ = 0; _ < 16; ++_)
                    y.push(y[f++]);
                  this._time.push(a);
                }
              }, p.flush = function(a) {
                var y = e.gt(this._time, a) - 2;
                y < 0 || (this._time.splice(0, y), this._components.splice(0, 16 * y));
              }, p.lastT = function() {
                return this._time[this._time.length - 1];
              }, p.lookAt = function(a, y, f, _) {
                this.recalcMatrix(a), y = y || this.computedEye, f = f || l, _ = _ || this.computedUp, this.setMatrix(a, u(this.computedMatrix, y, f, _));
                for (var b = 0, w = 0; w < 3; ++w)
                  b += Math.pow(f[w] - y[w], 2);
                b = Math.log(Math.sqrt(b)), this.computedRadius[0] = b;
              }, p.rotate = function(a, y, f, _) {
                this.recalcMatrix(a);
                var b = this.computedInverse;
                y && t(b, b, y), f && s(b, b, f), _ && d(b, b, _), this.setMatrix(a, n(this.computedMatrix, b));
              };
              var c = [0, 0, 0];
              p.pan = function(a, y, f, _) {
                c[0] = -(y || 0), c[1] = -(f || 0), c[2] = -(_ || 0), this.recalcMatrix(a);
                var b = this.computedInverse;
                o(b, b, c), this.setMatrix(a, n(b, b));
              }, p.translate = function(a, y, f, _) {
                c[0] = y || 0, c[1] = f || 0, c[2] = _ || 0, this.recalcMatrix(a);
                var b = this.computedMatrix;
                o(b, b, c), this.setMatrix(a, b);
              }, p.setMatrix = function(a, y) {
                if (!(a < this.lastT())) {
                  this._time.push(a);
                  for (var f = 0; f < 16; ++f)
                    this._components.push(y[f]);
                }
              }, p.setDistance = function(a, y) {
                this.computedRadius[0] = y;
              }, p.setDistanceLimits = function(a, y) {
                var f = this._limits;
                f[0] = a, f[1] = y;
              }, p.getDistanceLimits = function(a) {
                var y = this._limits;
                return a ? (a[0] = y[0], a[1] = y[1], a) : y;
              };
            }, { "binary-search-bounds": 31, "gl-mat4/invert": 98, "gl-mat4/lookAt": 99, "gl-mat4/rotateX": 104, "gl-mat4/rotateY": 105, "gl-mat4/rotateZ": 106, "gl-mat4/scale": 107, "gl-mat4/translate": 108, "gl-vec3/normalize": 179, "mat4-interpolate": 243 }], 246: [function(g, k, x) {
              k.exports = function(r) {
                var n = r.length;
                if (n < 3) {
                  for (var s = new Array(n), t = 0; t < n; ++t)
                    s[t] = t;
                  return n === 2 && r[0][0] === r[1][0] && r[0][1] === r[1][1] ? [0] : s;
                }
                var d = new Array(n);
                for (t = 0; t < n; ++t)
                  d[t] = t;
                d.sort(function(y, f) {
                  var _ = r[y][0] - r[f][0];
                  return _ || r[y][1] - r[f][1];
                });
                var u = [d[0], d[1]], o = [d[0], d[1]];
                for (t = 2; t < n; ++t) {
                  for (var h = d[t], l = r[h], i = u.length; i > 1 && e(r[u[i - 2]], r[u[i - 1]], l) <= 0; )
                    i -= 1, u.pop();
                  for (u.push(h), i = o.length; i > 1 && e(r[o[i - 2]], r[o[i - 1]], l) >= 0; )
                    i -= 1, o.pop();
                  o.push(h);
                }
                s = new Array(o.length + u.length - 2);
                for (var p = 0, c = (t = 0, u.length); t < c; ++t)
                  s[p++] = u[t];
                for (var a = o.length - 2; a > 0; --a)
                  s[p++] = o[a];
                return s;
              };
              var e = g("robust-orientation")[3];
            }, { "robust-orientation": 284 }], 247: [function(g, k, x) {
              k.exports = function(r, n) {
                n || (n = r, r = window);
                var s = 0, t = 0, d = 0, u = { shift: !1, alt: !1, control: !1, meta: !1 }, o = !1;
                function h(w) {
                  var T = !1;
                  return "altKey" in w && (T = T || w.altKey !== u.alt, u.alt = !!w.altKey), "shiftKey" in w && (T = T || w.shiftKey !== u.shift, u.shift = !!w.shiftKey), "ctrlKey" in w && (T = T || w.ctrlKey !== u.control, u.control = !!w.ctrlKey), "metaKey" in w && (T = T || w.metaKey !== u.meta, u.meta = !!w.metaKey), T;
                }
                function l(w, T) {
                  var L = e.x(T), A = e.y(T);
                  "buttons" in T && (w = 0 | T.buttons), (w !== s || L !== t || A !== d || h(T)) && (s = 0 | w, t = L || 0, d = A || 0, n && n(s, t, d, u));
                }
                function i(w) {
                  l(0, w);
                }
                function p() {
                  (s || t || d || u.shift || u.alt || u.meta || u.control) && (t = d = 0, s = 0, u.shift = u.alt = u.control = u.meta = !1, n && n(0, 0, 0, u));
                }
                function c(w) {
                  h(w) && n && n(s, t, d, u);
                }
                function a(w) {
                  e.buttons(w) === 0 ? l(0, w) : l(s, w);
                }
                function y(w) {
                  l(s | e.buttons(w), w);
                }
                function f(w) {
                  l(s & ~e.buttons(w), w);
                }
                function _() {
                  o || (o = !0, r.addEventListener("mousemove", a), r.addEventListener("mousedown", y), r.addEventListener("mouseup", f), r.addEventListener("mouseleave", i), r.addEventListener("mouseenter", i), r.addEventListener("mouseout", i), r.addEventListener("mouseover", i), r.addEventListener("blur", p), r.addEventListener("keyup", c), r.addEventListener("keydown", c), r.addEventListener("keypress", c), r !== window && (window.addEventListener("blur", p), window.addEventListener("keyup", c), window.addEventListener("keydown", c), window.addEventListener("keypress", c)));
                }
                _();
                var b = { element: r };
                return Object.defineProperties(b, { enabled: { get: function() {
                  return o;
                }, set: function(w) {
                  w ? _() : function() {
                    !o || (o = !1, r.removeEventListener("mousemove", a), r.removeEventListener("mousedown", y), r.removeEventListener("mouseup", f), r.removeEventListener("mouseleave", i), r.removeEventListener("mouseenter", i), r.removeEventListener("mouseout", i), r.removeEventListener("mouseover", i), r.removeEventListener("blur", p), r.removeEventListener("keyup", c), r.removeEventListener("keydown", c), r.removeEventListener("keypress", c), r !== window && (window.removeEventListener("blur", p), window.removeEventListener("keyup", c), window.removeEventListener("keydown", c), window.removeEventListener("keypress", c)));
                  }();
                }, enumerable: !0 }, buttons: { get: function() {
                  return s;
                }, enumerable: !0 }, x: { get: function() {
                  return t;
                }, enumerable: !0 }, y: { get: function() {
                  return d;
                }, enumerable: !0 }, mods: { get: function() {
                  return u;
                }, enumerable: !0 } }), b;
              };
              var e = g("mouse-event");
            }, { "mouse-event": 249 }], 248: [function(g, k, x) {
              var e = { left: 0, top: 0 };
              k.exports = function(r, n, s) {
                n = n || r.currentTarget || r.srcElement, Array.isArray(s) || (s = [0, 0]);
                var t = r.clientX || 0, d = r.clientY || 0, u = (o = n, o === window || o === document || o === document.body ? e : o.getBoundingClientRect()), o;
                return s[0] = t - u.left, s[1] = d - u.top, s;
              };
            }, {}], 249: [function(g, k, x) {
              function e(r) {
                return r.target || r.srcElement || window;
              }
              x.buttons = function(r) {
                if (typeof r == "object") {
                  if ("buttons" in r)
                    return r.buttons;
                  if ("which" in r) {
                    if ((n = r.which) === 2)
                      return 4;
                    if (n === 3)
                      return 2;
                    if (n > 0)
                      return 1 << n - 1;
                  } else if ("button" in r) {
                    var n;
                    if ((n = r.button) === 1)
                      return 4;
                    if (n === 2)
                      return 2;
                    if (n >= 0)
                      return 1 << n;
                  }
                }
                return 0;
              }, x.element = e, x.x = function(r) {
                if (typeof r == "object") {
                  if ("offsetX" in r)
                    return r.offsetX;
                  var n = e(r).getBoundingClientRect();
                  return r.clientX - n.left;
                }
                return 0;
              }, x.y = function(r) {
                if (typeof r == "object") {
                  if ("offsetY" in r)
                    return r.offsetY;
                  var n = e(r).getBoundingClientRect();
                  return r.clientY - n.top;
                }
                return 0;
              };
            }, {}], 250: [function(g, k, x) {
              var e = g("to-px");
              k.exports = function(r, n, s) {
                typeof r == "function" && (s = !!n, n = r, r = window);
                var t = e("ex", r), d = function(u) {
                  s && u.preventDefault();
                  var o = u.deltaX || 0, h = u.deltaY || 0, l = u.deltaZ || 0, i = 1;
                  switch (u.deltaMode) {
                    case 1:
                      i = t;
                      break;
                    case 2:
                      i = window.innerHeight;
                  }
                  if (h *= i, l *= i, (o *= i) || h || l)
                    return n(o, h, l, u);
                };
                return r.addEventListener("wheel", d), d;
              };
            }, { "to-px": 304 }], 251: [function(g, k, x) {
              var e = g("typedarray-pool");
              k.exports = function(n) {
                function s(i) {
                  throw new Error("ndarray-extract-contour: " + i);
                }
                typeof n != "object" && s("Must specify arguments");
                var t = n.order;
                Array.isArray(t) || s("Must specify order");
                var d = n.arrayArguments || 1;
                d < 1 && s("Must have at least one array argument");
                var u = n.scalarArguments || 0;
                u < 0 && s("Scalar arg count must be > 0"), typeof n.vertex != "function" && s("Must specify vertex creation function"), typeof n.cell != "function" && s("Must specify cell creation function"), typeof n.phase != "function" && s("Must specify phase function");
                for (var o = n.getters || [], h = new Array(d), l = 0; l < d; ++l)
                  o.indexOf(l) >= 0 ? h[l] = !0 : h[l] = !1;
                return function(i, p, c, a, y, f) {
                  var _ = [f, y].join(",");
                  return (0, r[_])(i, p, c, e.mallocUint32, e.freeUint32);
                }(n.vertex, n.cell, n.phase, 0, t, h);
              };
              var r = { "false,0,1": function(n, s, t, d, u) {
                return function(o, h, l, i) {
                  var p, c = 0 | o.shape[0], a = 0 | o.shape[1], y = o.data, f = 0 | o.offset, _ = 0 | o.stride[0], b = 0 | o.stride[1], w = f, T = 0 | -_, L = 0, A = 0 | -b, I = 0, P = -_ - b | 0, S = 0, E = 0 | _, R = b - _ * c | 0, z = 0, j = 0, H = 0, Y = 2 * c | 0, J = d(Y), W = d(Y), Z = 0, re = 0, V = -1, B = -1, U = 0, ee = 0 | -c, N = 0 | c, K = 0, X = -c - 1 | 0, te = c - 1 | 0, ie = 0, le = 0, oe = 0;
                  for (z = 0; z < c; ++z)
                    J[Z++] = t(y[w], h, l, i), w += E;
                  if (w += R, a > 0) {
                    if (j = 1, J[Z++] = t(y[w], h, l, i), w += E, c > 0)
                      for (z = 1, p = y[w], re = J[Z] = t(p, h, l, i), U = J[Z + V], K = J[Z + ee], ie = J[Z + X], re === U && re === K && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, U, K, ie, h, l, i), le = W[Z] = H++), Z += 1, w += E, z = 2; z < c; ++z)
                        p = y[w], re = J[Z] = t(p, h, l, i), U = J[Z + V], K = J[Z + ee], ie = J[Z + X], re === U && re === K && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, U, K, ie, h, l, i), le = W[Z] = H++, ie !== U && s(W[Z + V], le, S, L, ie, U, h, l, i)), Z += 1, w += E;
                    for (w += R, Z = 0, oe = V, V = B, B = oe, oe = ee, ee = N, N = oe, oe = X, X = te, te = oe, j = 2; j < a; ++j) {
                      if (J[Z++] = t(y[w], h, l, i), w += E, c > 0)
                        for (z = 1, p = y[w], re = J[Z] = t(p, h, l, i), U = J[Z + V], K = J[Z + ee], ie = J[Z + X], re === U && re === K && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, U, K, ie, h, l, i), le = W[Z] = H++, ie !== K && s(W[Z + ee], le, I, S, K, ie, h, l, i)), Z += 1, w += E, z = 2; z < c; ++z)
                          p = y[w], re = J[Z] = t(p, h, l, i), U = J[Z + V], K = J[Z + ee], ie = J[Z + X], re === U && re === K && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, U, K, ie, h, l, i), le = W[Z] = H++, ie !== K && s(W[Z + ee], le, I, S, K, ie, h, l, i), ie !== U && s(W[Z + V], le, S, L, ie, U, h, l, i)), Z += 1, w += E;
                      1 & j && (Z = 0), oe = V, V = B, B = oe, oe = ee, ee = N, N = oe, oe = X, X = te, te = oe, w += R;
                    }
                  }
                  u(W), u(J);
                };
              }, "false,1,0": function(n, s, t, d, u) {
                return function(o, h, l, i) {
                  var p, c = 0 | o.shape[0], a = 0 | o.shape[1], y = o.data, f = 0 | o.offset, _ = 0 | o.stride[0], b = 0 | o.stride[1], w = f, T = 0 | -_, L = 0, A = 0 | -b, I = 0, P = -_ - b | 0, S = 0, E = 0 | b, R = _ - b * a | 0, z = 0, j = 0, H = 0, Y = 2 * a | 0, J = d(Y), W = d(Y), Z = 0, re = 0, V = -1, B = -1, U = 0, ee = 0 | -a, N = 0 | a, K = 0, X = -a - 1 | 0, te = a - 1 | 0, ie = 0, le = 0, oe = 0;
                  for (j = 0; j < a; ++j)
                    J[Z++] = t(y[w], h, l, i), w += E;
                  if (w += R, c > 0) {
                    if (z = 1, J[Z++] = t(y[w], h, l, i), w += E, a > 0)
                      for (j = 1, p = y[w], re = J[Z] = t(p, h, l, i), K = J[Z + ee], U = J[Z + V], ie = J[Z + X], re === K && re === U && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, K, U, ie, h, l, i), le = W[Z] = H++), Z += 1, w += E, j = 2; j < a; ++j)
                        p = y[w], re = J[Z] = t(p, h, l, i), K = J[Z + ee], U = J[Z + V], ie = J[Z + X], re === K && re === U && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, K, U, ie, h, l, i), le = W[Z] = H++, ie !== U && s(W[Z + V], le, I, S, U, ie, h, l, i)), Z += 1, w += E;
                    for (w += R, Z = 0, oe = ee, ee = N, N = oe, oe = V, V = B, B = oe, oe = X, X = te, te = oe, z = 2; z < c; ++z) {
                      if (J[Z++] = t(y[w], h, l, i), w += E, a > 0)
                        for (j = 1, p = y[w], re = J[Z] = t(p, h, l, i), K = J[Z + ee], U = J[Z + V], ie = J[Z + X], re === K && re === U && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, K, U, ie, h, l, i), le = W[Z] = H++, ie !== K && s(W[Z + ee], le, S, L, ie, K, h, l, i)), Z += 1, w += E, j = 2; j < a; ++j)
                          p = y[w], re = J[Z] = t(p, h, l, i), K = J[Z + ee], U = J[Z + V], ie = J[Z + X], re === K && re === U && re === ie || (L = y[w + T], I = y[w + A], S = y[w + P], n(z, j, p, L, I, S, re, K, U, ie, h, l, i), le = W[Z] = H++, ie !== U && s(W[Z + V], le, I, S, U, ie, h, l, i), ie !== K && s(W[Z + ee], le, S, L, ie, K, h, l, i)), Z += 1, w += E;
                      1 & z && (Z = 0), oe = ee, ee = N, N = oe, oe = V, V = B, B = oe, oe = X, X = te, te = oe, w += R;
                    }
                  }
                  u(W), u(J);
                };
              } };
            }, { "typedarray-pool": 308 }], 252: [function(g, k, x) {
              var e = g("dup"), r = { zero: function(c, a, y, f) {
                var _ = c[0];
                f |= 0;
                var b = 0, w = y[0];
                for (b = 0; b < _; ++b)
                  a[f] = 0, f += w;
              }, fdTemplate1: function(c, a, y, f, _, b, w) {
                var T = c[0], L = y[0], A = -1 * L, I = L;
                f |= 0, w |= 0;
                var P = 0, S = L, E = b[0];
                for (P = 0; P < T; ++P)
                  _[w] = 0.5 * (a[f + A] - a[f + I]), f += S, w += E;
              }, fdTemplate2: function(c, a, y, f, _, b, w, T, L, A) {
                var I = c[0], P = c[1], S = y[0], E = y[1], R = b[0], z = b[1], j = L[0], H = L[1], Y = -1 * S, J = S, W = -1 * E, Z = E;
                f |= 0, w |= 0, A |= 0;
                var re = 0, V = 0, B = E, U = S - P * E, ee = z, N = R - P * z, K = H, X = j - P * H;
                for (V = 0; V < I; ++V) {
                  for (re = 0; re < P; ++re)
                    _[w] = 0.5 * (a[f + Y] - a[f + J]), T[A] = 0.5 * (a[f + W] - a[f + Z]), f += B, w += ee, A += K;
                  f += U, w += N, A += X;
                }
              } }, n = { cdiff: function(c) {
                var a = {};
                return function(y, f, _) {
                  var b = y.dtype, w = y.order, T = f.dtype, L = f.order, A = _.dtype, I = _.order, P = [b, w.join(), T, L.join(), A, I.join()].join(), S = a[P];
                  return S || (a[P] = S = c([b, w, T, L, A, I])), S(y.shape.slice(0), y.data, y.stride, 0 | y.offset, f.data, f.stride, 0 | f.offset, _.data, _.stride, 0 | _.offset);
                };
              }, zero: function(c) {
                var a = {};
                return function(y) {
                  var f = y.dtype, _ = y.order, b = [f, _.join()].join(), w = a[b];
                  return w || (a[b] = w = c([f, _])), w(y.shape.slice(0), y.data, y.stride, 0 | y.offset);
                };
              }, fdTemplate1: function(c) {
                var a = {};
                return function(y, f) {
                  var _ = y.dtype, b = y.order, w = f.dtype, T = f.order, L = [_, b.join(), w, T.join()].join(), A = a[L];
                  return A || (a[L] = A = c([_, b, w, T])), A(y.shape.slice(0), y.data, y.stride, 0 | y.offset, f.data, f.stride, 0 | f.offset);
                };
              }, fdTemplate2: function(c) {
                var a = {};
                return function(y, f, _) {
                  var b = y.dtype, w = y.order, T = f.dtype, L = f.order, A = _.dtype, I = _.order, P = [b, w.join(), T, L.join(), A, I.join()].join(), S = a[P];
                  return S || (a[P] = S = c([b, w, T, L, A, I])), S(y.shape.slice(0), y.data, y.stride, 0 | y.offset, f.data, f.stride, 0 | f.offset, _.data, _.stride, 0 | _.offset);
                };
              } };
              function s(c) {
                return (0, n[c.funcName])(t.bind(void 0, c));
              }
              function t(c) {
                return r[c.funcName];
              }
              function d(c) {
                return s({ funcName: c.funcName });
              }
              var u = {}, o = {}, h = d({ funcName: "cdiff" }), l = d({ funcName: "zero" });
              function i(c) {
                return c in u ? u[c] : u[c] = d({ funcName: "fdTemplate" + c });
              }
              function p(c, a, y, f) {
                return function(_, b) {
                  var w = b.shape.slice();
                  return w[0] > 2 && w[1] > 2 && f(b.pick(-1, -1).lo(1, 1).hi(w[0] - 2, w[1] - 2), _.pick(-1, -1, 0).lo(1, 1).hi(w[0] - 2, w[1] - 2), _.pick(-1, -1, 1).lo(1, 1).hi(w[0] - 2, w[1] - 2)), w[1] > 2 && (y(b.pick(0, -1).lo(1).hi(w[1] - 2), _.pick(0, -1, 1).lo(1).hi(w[1] - 2)), a(_.pick(0, -1, 0).lo(1).hi(w[1] - 2))), w[1] > 2 && (y(b.pick(w[0] - 1, -1).lo(1).hi(w[1] - 2), _.pick(w[0] - 1, -1, 1).lo(1).hi(w[1] - 2)), a(_.pick(w[0] - 1, -1, 0).lo(1).hi(w[1] - 2))), w[0] > 2 && (y(b.pick(-1, 0).lo(1).hi(w[0] - 2), _.pick(-1, 0, 0).lo(1).hi(w[0] - 2)), a(_.pick(-1, 0, 1).lo(1).hi(w[0] - 2))), w[0] > 2 && (y(b.pick(-1, w[1] - 1).lo(1).hi(w[0] - 2), _.pick(-1, w[1] - 1, 0).lo(1).hi(w[0] - 2)), a(_.pick(-1, w[1] - 1, 1).lo(1).hi(w[0] - 2))), _.set(0, 0, 0, 0), _.set(0, 0, 1, 0), _.set(w[0] - 1, 0, 0, 0), _.set(w[0] - 1, 0, 1, 0), _.set(0, w[1] - 1, 0, 0), _.set(0, w[1] - 1, 1, 0), _.set(w[0] - 1, w[1] - 1, 0, 0), _.set(w[0] - 1, w[1] - 1, 1, 0), _;
                };
              }
              k.exports = function(c, a, y) {
                return Array.isArray(y) || (y = e(a.dimension, typeof y == "string" ? y : "clamp")), a.size === 0 ? c : a.dimension === 0 ? (c.set(0), c) : function(f) {
                  var _ = f.join();
                  if (L = o[_])
                    return L;
                  for (var b = f.length, w = [h, l], T = 1; T <= b; ++T)
                    w.push(i(T));
                  var L = p.apply(void 0, w);
                  return o[_] = L, L;
                }(y)(c, a);
              };
            }, { dup: 65 }], 253: [function(g, k, x) {
              function e(t, d) {
                var u = Math.floor(d), o = d - u, h = 0 <= u && u < t.shape[0], l = 0 <= u + 1 && u + 1 < t.shape[0];
                return (1 - o) * (h ? +t.get(u) : 0) + o * (l ? +t.get(u + 1) : 0);
              }
              function r(t, d, u) {
                var o = Math.floor(d), h = d - o, l = 0 <= o && o < t.shape[0], i = 0 <= o + 1 && o + 1 < t.shape[0], p = Math.floor(u), c = u - p, a = 0 <= p && p < t.shape[1], y = 0 <= p + 1 && p + 1 < t.shape[1], f = l && a ? t.get(o, p) : 0, _ = l && y ? t.get(o, p + 1) : 0;
                return (1 - c) * ((1 - h) * f + h * (i && a ? t.get(o + 1, p) : 0)) + c * ((1 - h) * _ + h * (i && y ? t.get(o + 1, p + 1) : 0));
              }
              function n(t, d, u, o) {
                var h = Math.floor(d), l = d - h, i = 0 <= h && h < t.shape[0], p = 0 <= h + 1 && h + 1 < t.shape[0], c = Math.floor(u), a = u - c, y = 0 <= c && c < t.shape[1], f = 0 <= c + 1 && c + 1 < t.shape[1], _ = Math.floor(o), b = o - _, w = 0 <= _ && _ < t.shape[2], T = 0 <= _ + 1 && _ + 1 < t.shape[2], L = i && y && w ? t.get(h, c, _) : 0, A = i && f && w ? t.get(h, c + 1, _) : 0, I = p && y && w ? t.get(h + 1, c, _) : 0, P = p && f && w ? t.get(h + 1, c + 1, _) : 0, S = i && y && T ? t.get(h, c, _ + 1) : 0, E = i && f && T ? t.get(h, c + 1, _ + 1) : 0;
                return (1 - b) * ((1 - a) * ((1 - l) * L + l * I) + a * ((1 - l) * A + l * P)) + b * ((1 - a) * ((1 - l) * S + l * (p && y && T ? t.get(h + 1, c, _ + 1) : 0)) + a * ((1 - l) * E + l * (p && f && T ? t.get(h + 1, c + 1, _ + 1) : 0)));
              }
              function s(t) {
                var d, u, o = 0 | t.shape.length, h = new Array(o), l = new Array(o), i = new Array(o), p = new Array(o);
                for (d = 0; d < o; ++d)
                  u = +arguments[d + 1], h[d] = Math.floor(u), l[d] = u - h[d], i[d] = 0 <= h[d] && h[d] < t.shape[d], p[d] = 0 <= h[d] + 1 && h[d] + 1 < t.shape[d];
                var c, a, y, f = 0;
                e:
                  for (d = 0; d < 1 << o; ++d) {
                    for (a = 1, y = t.offset, c = 0; c < o; ++c)
                      if (d & 1 << c) {
                        if (!p[c])
                          continue e;
                        a *= l[c], y += t.stride[c] * (h[c] + 1);
                      } else {
                        if (!i[c])
                          continue e;
                        a *= 1 - l[c], y += t.stride[c] * h[c];
                      }
                    f += a * t.data[y];
                  }
                return f;
              }
              k.exports = function(t, d, u, o) {
                switch (t.shape.length) {
                  case 0:
                    return 0;
                  case 1:
                    return e(t, d);
                  case 2:
                    return r(t, d, u);
                  case 3:
                    return n(t, d, u, o);
                  default:
                    return s.apply(void 0, arguments);
                }
              }, k.exports.d1 = e, k.exports.d2 = r, k.exports.d3 = n;
            }, {}], 254: [function(g, k, x) {
              var e = { "float64,2,1,0": function() {
                return function(d, u, o, h, l) {
                  var i = d[0], p = d[1], c = d[2], a = o[0], y = o[1], f = o[2];
                  h |= 0;
                  var _ = 0, b = 0, w = 0, T = f, L = y - c * f, A = a - p * y;
                  for (w = 0; w < i; ++w) {
                    for (b = 0; b < p; ++b) {
                      for (_ = 0; _ < c; ++_)
                        u[h] /= l, h += T;
                      h += L;
                    }
                    h += A;
                  }
                };
              }, "uint8,2,0,1,float64,2,1,0": function() {
                return function(d, u, o, h, l, i, p, c) {
                  for (var a = d[0], y = d[1], f = d[2], _ = o[0], b = o[1], w = o[2], T = i[0], L = i[1], A = i[2], I = h |= 0, P = p |= 0, S = 0 | d[0]; S > 0; ) {
                    S < 64 ? (a = S, S = 0) : (a = 64, S -= 64);
                    for (var E = 0 | d[1]; E > 0; ) {
                      E < 64 ? (y = E, E = 0) : (y = 64, E -= 64), h = I + S * _ + E * b, p = P + S * T + E * L;
                      var R = 0, z = 0, j = 0, H = w, Y = _ - f * w, J = b - a * _, W = A, Z = T - f * A, re = L - a * T;
                      for (j = 0; j < y; ++j) {
                        for (z = 0; z < a; ++z) {
                          for (R = 0; R < f; ++R)
                            u[h] = l[p] * c, h += H, p += W;
                          h += Y, p += Z;
                        }
                        h += J, p += re;
                      }
                    }
                  }
                };
              }, "float32,1,0,float32,1,0": function() {
                return function(d, u, o, h, l, i, p) {
                  var c = d[0], a = d[1], y = o[0], f = o[1], _ = i[0], b = i[1];
                  h |= 0, p |= 0;
                  var w = 0, T = 0, L = f, A = y - a * f, I = b, P = _ - a * b;
                  for (T = 0; T < c; ++T) {
                    for (w = 0; w < a; ++w)
                      u[h] = l[p], h += L, p += I;
                    h += A, p += P;
                  }
                };
              }, "float32,1,0,float32,0,1": function() {
                return function(d, u, o, h, l, i, p) {
                  for (var c = d[0], a = d[1], y = o[0], f = o[1], _ = i[0], b = i[1], w = h |= 0, T = p |= 0, L = 0 | d[1]; L > 0; ) {
                    L < 64 ? (a = L, L = 0) : (a = 64, L -= 64);
                    for (var A = 0 | d[0]; A > 0; ) {
                      A < 64 ? (c = A, A = 0) : (c = 64, A -= 64), h = w + L * f + A * y, p = T + L * b + A * _;
                      var I = 0, P = 0, S = f, E = y - a * f, R = b, z = _ - a * b;
                      for (P = 0; P < c; ++P) {
                        for (I = 0; I < a; ++I)
                          u[h] = l[p], h += S, p += R;
                        h += E, p += z;
                      }
                    }
                  }
                };
              }, "uint8,2,0,1,uint8,1,2,0": function() {
                return function(d, u, o, h, l, i, p) {
                  for (var c = d[0], a = d[1], y = d[2], f = o[0], _ = o[1], b = o[2], w = i[0], T = i[1], L = i[2], A = h |= 0, I = p |= 0, P = 0 | d[2]; P > 0; ) {
                    P < 64 ? (y = P, P = 0) : (y = 64, P -= 64);
                    for (var S = 0 | d[0]; S > 0; ) {
                      S < 64 ? (c = S, S = 0) : (c = 64, S -= 64);
                      for (var E = 0 | d[1]; E > 0; ) {
                        E < 64 ? (a = E, E = 0) : (a = 64, E -= 64), h = A + P * b + S * f + E * _, p = I + P * L + S * w + E * T;
                        var R = 0, z = 0, j = 0, H = b, Y = f - y * b, J = _ - c * f, W = L, Z = w - y * L, re = T - c * w;
                        for (j = 0; j < a; ++j) {
                          for (z = 0; z < c; ++z) {
                            for (R = 0; R < y; ++R)
                              u[h] = l[p], h += H, p += W;
                            h += Y, p += Z;
                          }
                          h += J, p += re;
                        }
                      }
                    }
                  }
                };
              }, "uint8,2,0,1,array,2,0,1": function() {
                return function(d, u, o, h, l, i, p) {
                  var c = d[0], a = d[1], y = d[2], f = o[0], _ = o[1], b = o[2], w = i[0], T = i[1], L = i[2];
                  h |= 0, p |= 0;
                  var A = 0, I = 0, P = 0, S = b, E = f - y * b, R = _ - c * f, z = L, j = w - y * L, H = T - c * w;
                  for (P = 0; P < a; ++P) {
                    for (I = 0; I < c; ++I) {
                      for (A = 0; A < y; ++A)
                        u[h] = l[p], h += S, p += z;
                      h += E, p += j;
                    }
                    h += R, p += H;
                  }
                };
              } }, r = function(d, u) {
                var o = u.join(",");
                return (0, e[o])();
              }, n = { mul: function(d) {
                var u = {};
                return function(o, h, l) {
                  var i = o.dtype, p = o.order, c = h.dtype, a = h.order, y = l.dtype, f = l.order, _ = [i, p.join(), c, a.join(), y, f.join()].join(), b = u[_];
                  return b || (u[_] = b = d([i, p, c, a, y, f])), b(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h.data, h.stride, 0 | h.offset, l.data, l.stride, 0 | l.offset);
                };
              }, muls: function(d) {
                var u = {};
                return function(o, h, l) {
                  var i = o.dtype, p = o.order, c = h.dtype, a = h.order, y = [i, p.join(), c, a.join()].join(), f = u[y];
                  return f || (u[y] = f = d([i, p, c, a])), f(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h.data, h.stride, 0 | h.offset, l);
                };
              }, mulseq: function(d) {
                var u = {};
                return function(o, h) {
                  var l = o.dtype, i = o.order, p = [l, i.join()].join(), c = u[p];
                  return c || (u[p] = c = d([l, i])), c(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h);
                };
              }, div: function(d) {
                var u = {};
                return function(o, h, l) {
                  var i = o.dtype, p = o.order, c = h.dtype, a = h.order, y = l.dtype, f = l.order, _ = [i, p.join(), c, a.join(), y, f.join()].join(), b = u[_];
                  return b || (u[_] = b = d([i, p, c, a, y, f])), b(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h.data, h.stride, 0 | h.offset, l.data, l.stride, 0 | l.offset);
                };
              }, divs: function(d) {
                var u = {};
                return function(o, h, l) {
                  var i = o.dtype, p = o.order, c = h.dtype, a = h.order, y = [i, p.join(), c, a.join()].join(), f = u[y];
                  return f || (u[y] = f = d([i, p, c, a])), f(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h.data, h.stride, 0 | h.offset, l);
                };
              }, divseq: function(d) {
                var u = {};
                return function(o, h) {
                  var l = o.dtype, i = o.order, p = [l, i.join()].join(), c = u[p];
                  return c || (u[p] = c = d([l, i])), c(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h);
                };
              }, assign: function(d) {
                var u = {};
                return function(o, h) {
                  var l = o.dtype, i = o.order, p = h.dtype, c = h.order, a = [l, i.join(), p, c.join()].join(), y = u[a];
                  return y || (u[a] = y = d([l, i, p, c])), y(o.shape.slice(0), o.data, o.stride, 0 | o.offset, h.data, h.stride, 0 | h.offset);
                };
              } };
              function s(d) {
                return u = { funcName: d.funcName }, (0, n[u.funcName])(r.bind(void 0, u));
                var u;
              }
              var t = { mul: "*", div: "/" };
              (function() {
                for (var d in t)
                  x[d] = s({ funcName: d }), x[d + "s"] = s({ funcName: d + "s" }), x[d + "seq"] = s({ funcName: d + "seq" });
              })(), x.assign = s({ funcName: "assign" });
            }, {}], 255: [function(g, k, x) {
              var e = g("ndarray"), r = g("./doConvert.js");
              k.exports = function(n, s) {
                for (var t = [], d = n, u = 1; Array.isArray(d); )
                  t.push(d.length), u *= d.length, d = d[0];
                return t.length === 0 ? e() : (s || (s = e(new Float64Array(u), t)), r(s, n), s);
              };
            }, { "./doConvert.js": 256, ndarray: 259 }], 256: [function(g, k, x) {
              var e, r = function() {
                return function(n, s, t, d, u) {
                  var o = n[0], h = n[1], l = n[2], i = t[0], p = t[1], c = t[2], a = [0, 0, 0];
                  d |= 0;
                  var y = 0, f = 0, _ = 0, b = c, w = p - l * c, T = i - h * p;
                  for (_ = 0; _ < o; ++_) {
                    for (f = 0; f < h; ++f) {
                      for (y = 0; y < l; ++y) {
                        var L, A = u;
                        for (L = 0; L < a.length - 1; ++L)
                          A = A[a[L]];
                        s[d] = A[a[a.length - 1]], d += b, ++a[2];
                      }
                      d += w, a[2] -= l, ++a[1];
                    }
                    d += T, a[1] -= h, ++a[0];
                  }
                };
              };
              k.exports = (e = { funcName: "convert" }, function(n) {
                var s = {};
                return function(t, d) {
                  var u = t.dtype, o = t.order, h = [u, o.join()].join(), l = s[h];
                  return l || (s[h] = l = n([u, o])), l(t.shape.slice(0), t.data, t.stride, 0 | t.offset, d);
                };
              }(r.bind(void 0, e)));
            }, {}], 257: [function(g, k, x) {
              var e = g("typedarray-pool");
              function r(d) {
                switch (d) {
                  case "uint32":
                    return [e.mallocUint32, e.freeUint32];
                  default:
                    return null;
                }
              }
              var n = { "uint32,1,0": function(d, u) {
                return function(o, h, l, i, p, c, a, y, f, _, b) {
                  var w, T, L, A, I, P, S, E, R = o * p + i, z = d(y);
                  for (w = o + 1; w <= h; ++w) {
                    for (T = w, L = R += p, I = 0, P = R, A = 0; A < y; ++A)
                      z[I++] = l[P], P += f;
                    e:
                      for (; T-- > o; ) {
                        I = 0, P = L - p;
                        t:
                          for (A = 0; A < y; ++A) {
                            if ((S = l[P]) < (E = z[I]))
                              break e;
                            if (S > E)
                              break t;
                            P += _, I += b;
                          }
                        for (I = L, P = L - p, A = 0; A < y; ++A)
                          l[I] = l[P], I += f, P += f;
                        L -= p;
                      }
                    for (I = L, P = 0, A = 0; A < y; ++A)
                      l[I] = z[P++], I += f;
                  }
                  u(z);
                };
              } }, s = { "uint32,1,0": function(d, u, o) {
                return function h(l, i, p, c, a, y, f, _, b, w, T) {
                  var L, A, I, P, S, E, R, z, j, H, Y, J, W, Z, re, V, B, U, ee, N, K, X, te, ie, le, oe = (i - l + 1) / 6 | 0, ve = l + oe, ue = i - oe, ye = l + i >> 1, Ae = ye - oe, pe = ye + oe, ge = ve, we = Ae, se = ye, de = pe, Te = ue, Ee = l + 1, Me = i - 1, ze = !0, Ie = 0, Oe = 0, Ze = 0, Fe = _, Pe = u(Fe), De = u(Fe);
                  Y = a * ge, J = a * we, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = ge, ge = we, we = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * de, J = a * Te, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = de, de = Te, Te = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * ge, J = a * se, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = ge, ge = se, se = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * we, J = a * se, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = we, we = se, se = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * ge, J = a * de, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = ge, ge = de, de = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * se, J = a * de, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = se, se = de, de = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * we, J = a * Te, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = we, we = Te, Te = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * we, J = a * se, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = we, we = se, se = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  Y = a * de, J = a * Te, le = c;
                  e:
                    for (H = 0; H < _; ++H) {
                      if (z = J + le, (Ze = p[R = Y + le] - p[z]) > 0) {
                        A = de, de = Te, Te = A;
                        break e;
                      }
                      if (Ze < 0)
                        break e;
                      le += w;
                    }
                  for (Y = a * ge, J = a * we, W = a * se, Z = a * de, re = a * Te, V = a * ve, B = a * ye, U = a * ue, ie = 0, le = c, H = 0; H < _; ++H)
                    R = Y + le, z = J + le, j = W + le, ee = Z + le, N = re + le, K = V + le, X = B + le, te = U + le, Pe[ie] = p[z], De[ie] = p[ee], ze = ze && Pe[ie] === De[ie], I = p[R], P = p[j], S = p[N], p[K] = I, p[X] = P, p[te] = S, ++ie, le += b;
                  for (Y = a * Ae, J = a * l, le = c, H = 0; H < _; ++H)
                    z = J + le, p[R = Y + le] = p[z], le += b;
                  for (Y = a * pe, J = a * i, le = c, H = 0; H < _; ++H)
                    z = J + le, p[R = Y + le] = p[z], le += b;
                  if (ze)
                    for (E = Ee; E <= Me; ++E) {
                      for (R = c + E * a, ie = 0, H = 0; H < _ && (Ze = p[R] - Pe[ie]) === 0; ++H)
                        ie += T, R += w;
                      if (Ze !== 0)
                        if (Ze < 0) {
                          if (E !== Ee)
                            for (Y = a * E, J = a * Ee, le = c, H = 0; H < _; ++H)
                              z = J + le, L = p[R = Y + le], p[R] = p[z], p[z] = L, le += b;
                          ++Ee;
                        } else
                          for (; ; ) {
                            for (R = c + Me * a, ie = 0, H = 0; H < _ && (Ze = p[R] - Pe[ie]) === 0; ++H)
                              ie += T, R += w;
                            if (!(Ze > 0)) {
                              if (Ze < 0) {
                                for (Y = a * E, J = a * Ee, W = a * Me, le = c, H = 0; H < _; ++H)
                                  z = J + le, j = W + le, L = p[R = Y + le], p[R] = p[z], p[z] = p[j], p[j] = L, le += b;
                                ++Ee, --Me;
                                break;
                              }
                              for (Y = a * E, J = a * Me, le = c, H = 0; H < _; ++H)
                                z = J + le, L = p[R = Y + le], p[R] = p[z], p[z] = L, le += b;
                              --Me;
                              break;
                            }
                            Me--;
                          }
                    }
                  else
                    for (E = Ee; E <= Me; ++E) {
                      for (R = c + E * a, ie = 0, H = 0; H < _ && (Ie = p[R] - Pe[ie]) === 0; ++H)
                        ie += T, R += w;
                      if (Ie < 0) {
                        if (E !== Ee)
                          for (Y = a * E, J = a * Ee, le = c, H = 0; H < _; ++H)
                            z = J + le, L = p[R = Y + le], p[R] = p[z], p[z] = L, le += b;
                        ++Ee;
                      } else {
                        for (R = c + E * a, ie = 0, H = 0; H < _ && (Oe = p[R] - De[ie]) === 0; ++H)
                          ie += T, R += w;
                        if (Oe > 0)
                          for (; ; ) {
                            for (R = c + Me * a, ie = 0, H = 0; H < _ && (Ze = p[R] - De[ie]) === 0; ++H)
                              ie += T, R += w;
                            if (!(Ze > 0)) {
                              for (R = c + Me * a, ie = 0, H = 0; H < _ && (Ze = p[R] - Pe[ie]) === 0; ++H)
                                ie += T, R += w;
                              if (Ze < 0) {
                                for (Y = a * E, J = a * Ee, W = a * Me, le = c, H = 0; H < _; ++H)
                                  z = J + le, j = W + le, L = p[R = Y + le], p[R] = p[z], p[z] = p[j], p[j] = L, le += b;
                                ++Ee, --Me;
                              } else {
                                for (Y = a * E, J = a * Me, le = c, H = 0; H < _; ++H)
                                  z = J + le, L = p[R = Y + le], p[R] = p[z], p[z] = L, le += b;
                                --Me;
                              }
                              break;
                            }
                            if (--Me < E)
                              break;
                          }
                      }
                    }
                  for (Y = a * l, J = a * (Ee - 1), ie = 0, le = c, H = 0; H < _; ++H)
                    z = J + le, p[R = Y + le] = p[z], p[z] = Pe[ie], ++ie, le += b;
                  for (Y = a * i, J = a * (Me + 1), ie = 0, le = c, H = 0; H < _; ++H)
                    z = J + le, p[R = Y + le] = p[z], p[z] = De[ie], ++ie, le += b;
                  if (Ee - 2 - l <= 32 ? d(l, Ee - 2, p, c, a, y, f, _, b, w, T) : h(l, Ee - 2, p, c, a, y, f, _, b, w, T), i - (Me + 2) <= 32 ? d(Me + 2, i, p, c, a, y, f, _, b, w, T) : h(Me + 2, i, p, c, a, y, f, _, b, w, T), ze)
                    return o(Pe), void o(De);
                  if (Ee < ve && Me > ue) {
                    e:
                      for (; ; ) {
                        for (R = c + Ee * a, ie = 0, le = c, H = 0; H < _; ++H) {
                          if (p[R] !== Pe[ie])
                            break e;
                          ++ie, R += b;
                        }
                        ++Ee;
                      }
                    e:
                      for (; ; ) {
                        for (R = c + Me * a, ie = 0, le = c, H = 0; H < _; ++H) {
                          if (p[R] !== De[ie])
                            break e;
                          ++ie, R += b;
                        }
                        --Me;
                      }
                    for (E = Ee; E <= Me; ++E) {
                      for (R = c + E * a, ie = 0, H = 0; H < _ && (Ie = p[R] - Pe[ie]) === 0; ++H)
                        ie += T, R += w;
                      if (Ie === 0) {
                        if (E !== Ee)
                          for (Y = a * E, J = a * Ee, le = c, H = 0; H < _; ++H)
                            z = J + le, L = p[R = Y + le], p[R] = p[z], p[z] = L, le += b;
                        ++Ee;
                      } else {
                        for (R = c + E * a, ie = 0, H = 0; H < _ && (Oe = p[R] - De[ie]) === 0; ++H)
                          ie += T, R += w;
                        if (Oe === 0)
                          for (; ; ) {
                            for (R = c + Me * a, ie = 0, H = 0; H < _ && (Ze = p[R] - De[ie]) === 0; ++H)
                              ie += T, R += w;
                            if (Ze !== 0) {
                              for (R = c + Me * a, ie = 0, H = 0; H < _ && (Ze = p[R] - Pe[ie]) === 0; ++H)
                                ie += T, R += w;
                              if (Ze < 0) {
                                for (Y = a * E, J = a * Ee, W = a * Me, le = c, H = 0; H < _; ++H)
                                  z = J + le, j = W + le, L = p[R = Y + le], p[R] = p[z], p[z] = p[j], p[j] = L, le += b;
                                ++Ee, --Me;
                              } else {
                                for (Y = a * E, J = a * Me, le = c, H = 0; H < _; ++H)
                                  z = J + le, L = p[R = Y + le], p[R] = p[z], p[z] = L, le += b;
                                --Me;
                              }
                              break;
                            }
                            if (--Me < E)
                              break;
                          }
                      }
                    }
                  }
                  o(Pe), o(De), Me - Ee <= 32 ? d(Ee, Me, p, c, a, y, f, _, b, w, T) : h(Ee, Me, p, c, a, y, f, _, b, w, T);
                };
              } }, t = { "uint32,1,0": function(d, u) {
                return function(o) {
                  var h = o.data, l = 0 | o.offset, i = o.shape, p = o.stride, c = 0 | p[0], a = 0 | i[0], y = 0 | p[1], f = 0 | i[1], _ = y, b = y;
                  a <= 32 ? d(0, a - 1, h, l, c, y, a, f, _, b, 1) : u(0, a - 1, h, l, c, y, a, f, _, b, 1);
                };
              } };
              k.exports = function(d, u) {
                var o = [u, d].join(","), h = t[o], l = function(p, c) {
                  var a = r(c), y = [c, p].join(","), f = n[y];
                  return a ? f(a[0], a[1]) : f();
                }(d, u), i = function(p, c, a) {
                  var y = r(c), f = [c, p].join(","), _ = s[f];
                  return p.length > 1 && y ? _(a, y[0], y[1]) : _(a);
                }(d, u, l);
                return h(l, i);
              };
            }, { "typedarray-pool": 308 }], 258: [function(g, k, x) {
              var e = g("./lib/compile_sort.js"), r = {};
              k.exports = function(n) {
                var s = n.order, t = n.dtype, d = [s, t].join(":"), u = r[d];
                return u || (r[d] = u = e(s, t)), u(n), n;
              };
            }, { "./lib/compile_sort.js": 257 }], 259: [function(g, k, x) {
              var e = g("is-buffer"), r = typeof Float64Array < "u";
              function n(o, h) {
                return o[0] - h[0];
              }
              function s() {
                var o, h = this.stride, l = new Array(h.length);
                for (o = 0; o < l.length; ++o)
                  l[o] = [Math.abs(h[o]), o];
                l.sort(n);
                var i = new Array(l.length);
                for (o = 0; o < i.length; ++o)
                  i[o] = l[o][1];
                return i;
              }
              var t = { T: function(o) {
                function h(i) {
                  this.data = i;
                }
                var l = h.prototype;
                return l.dtype = o, l.index = function() {
                  return -1;
                }, l.size = 0, l.dimension = -1, l.shape = l.stride = l.order = [], l.lo = l.hi = l.transpose = l.step = function() {
                  return new h(this.data);
                }, l.get = l.set = function() {
                }, l.pick = function() {
                  return null;
                }, function(i) {
                  return new h(i);
                };
              }, 0: function(o, h) {
                function l(p, c) {
                  this.data = p, this.offset = c;
                }
                var i = l.prototype;
                return i.dtype = o, i.index = function() {
                  return this.offset;
                }, i.dimension = 0, i.size = 1, i.shape = i.stride = i.order = [], i.lo = i.hi = i.transpose = i.step = function() {
                  return new l(this.data, this.offset);
                }, i.pick = function() {
                  return h(this.data);
                }, i.valueOf = i.get = function() {
                  return o === "generic" ? this.data.get(this.offset) : this.data[this.offset];
                }, i.set = function(p) {
                  return o === "generic" ? this.data.set(this.offset, p) : this.data[this.offset] = p;
                }, function(p, c, a, y) {
                  return new l(p, y);
                };
              }, 1: function(o, h, l) {
                function i(c, a, y, f) {
                  this.data = c, this.shape = [a], this.stride = [y], this.offset = 0 | f;
                }
                var p = i.prototype;
                return p.dtype = o, p.dimension = 1, Object.defineProperty(p, "size", { get: function() {
                  return this.shape[0];
                } }), p.order = [0], p.set = function(c, a) {
                  return o === "generic" ? this.data.set(this.offset + this.stride[0] * c, a) : this.data[this.offset + this.stride[0] * c] = a;
                }, p.get = function(c) {
                  return o === "generic" ? this.data.get(this.offset + this.stride[0] * c) : this.data[this.offset + this.stride[0] * c];
                }, p.index = function(c) {
                  return this.offset + this.stride[0] * c;
                }, p.hi = function(c) {
                  return new i(this.data, typeof c != "number" || c < 0 ? this.shape[0] : 0 | c, this.stride[0], this.offset);
                }, p.lo = function(c) {
                  var a = this.offset, y = 0, f = this.shape[0], _ = this.stride[0];
                  return typeof c == "number" && c >= 0 && (a += _ * (y = 0 | c), f -= y), new i(this.data, f, _, a);
                }, p.step = function(c) {
                  var a = this.shape[0], y = this.stride[0], f = this.offset, _ = 0, b = Math.ceil;
                  return typeof c == "number" && ((_ = 0 | c) < 0 ? (f += y * (a - 1), a = b(-a / _)) : a = b(a / _), y *= _), new i(this.data, a, y, f);
                }, p.transpose = function(c) {
                  c = c === void 0 ? 0 : 0 | c;
                  var a = this.shape, y = this.stride;
                  return new i(this.data, a[c], y[c], this.offset);
                }, p.pick = function(c) {
                  var a = [], y = [], f = this.offset;
                  return typeof c == "number" && c >= 0 ? f = f + this.stride[0] * c | 0 : (a.push(this.shape[0]), y.push(this.stride[0])), (0, h[a.length + 1])(this.data, a, y, f);
                }, function(c, a, y, f) {
                  return new i(c, a[0], y[0], f);
                };
              }, 2: function(o, h, l) {
                function i(c, a, y, f, _, b) {
                  this.data = c, this.shape = [a, y], this.stride = [f, _], this.offset = 0 | b;
                }
                var p = i.prototype;
                return p.dtype = o, p.dimension = 2, Object.defineProperty(p, "size", { get: function() {
                  return this.shape[0] * this.shape[1];
                } }), Object.defineProperty(p, "order", { get: function() {
                  return Math.abs(this.stride[0]) > Math.abs(this.stride[1]) ? [1, 0] : [0, 1];
                } }), p.set = function(c, a, y) {
                  return o === "generic" ? this.data.set(this.offset + this.stride[0] * c + this.stride[1] * a, y) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a] = y;
                }, p.get = function(c, a) {
                  return o === "generic" ? this.data.get(this.offset + this.stride[0] * c + this.stride[1] * a) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a];
                }, p.index = function(c, a) {
                  return this.offset + this.stride[0] * c + this.stride[1] * a;
                }, p.hi = function(c, a) {
                  return new i(this.data, typeof c != "number" || c < 0 ? this.shape[0] : 0 | c, typeof a != "number" || a < 0 ? this.shape[1] : 0 | a, this.stride[0], this.stride[1], this.offset);
                }, p.lo = function(c, a) {
                  var y = this.offset, f = 0, _ = this.shape[0], b = this.shape[1], w = this.stride[0], T = this.stride[1];
                  return typeof c == "number" && c >= 0 && (y += w * (f = 0 | c), _ -= f), typeof a == "number" && a >= 0 && (y += T * (f = 0 | a), b -= f), new i(this.data, _, b, w, T, y);
                }, p.step = function(c, a) {
                  var y = this.shape[0], f = this.shape[1], _ = this.stride[0], b = this.stride[1], w = this.offset, T = 0, L = Math.ceil;
                  return typeof c == "number" && ((T = 0 | c) < 0 ? (w += _ * (y - 1), y = L(-y / T)) : y = L(y / T), _ *= T), typeof a == "number" && ((T = 0 | a) < 0 ? (w += b * (f - 1), f = L(-f / T)) : f = L(f / T), b *= T), new i(this.data, y, f, _, b, w);
                }, p.transpose = function(c, a) {
                  c = c === void 0 ? 0 : 0 | c, a = a === void 0 ? 1 : 0 | a;
                  var y = this.shape, f = this.stride;
                  return new i(this.data, y[c], y[a], f[c], f[a], this.offset);
                }, p.pick = function(c, a) {
                  var y = [], f = [], _ = this.offset;
                  return typeof c == "number" && c >= 0 ? _ = _ + this.stride[0] * c | 0 : (y.push(this.shape[0]), f.push(this.stride[0])), typeof a == "number" && a >= 0 ? _ = _ + this.stride[1] * a | 0 : (y.push(this.shape[1]), f.push(this.stride[1])), (0, h[y.length + 1])(this.data, y, f, _);
                }, function(c, a, y, f) {
                  return new i(c, a[0], a[1], y[0], y[1], f);
                };
              }, 3: function(o, h, l) {
                function i(c, a, y, f, _, b, w, T) {
                  this.data = c, this.shape = [a, y, f], this.stride = [_, b, w], this.offset = 0 | T;
                }
                var p = i.prototype;
                return p.dtype = o, p.dimension = 3, Object.defineProperty(p, "size", { get: function() {
                  return this.shape[0] * this.shape[1] * this.shape[2];
                } }), Object.defineProperty(p, "order", { get: function() {
                  var c = Math.abs(this.stride[0]), a = Math.abs(this.stride[1]), y = Math.abs(this.stride[2]);
                  return c > a ? a > y ? [2, 1, 0] : c > y ? [1, 2, 0] : [1, 0, 2] : c > y ? [2, 0, 1] : y > a ? [0, 1, 2] : [0, 2, 1];
                } }), p.set = function(c, a, y, f) {
                  return o === "generic" ? this.data.set(this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y, f) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y] = f;
                }, p.get = function(c, a, y) {
                  return o === "generic" ? this.data.get(this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y];
                }, p.index = function(c, a, y) {
                  return this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y;
                }, p.hi = function(c, a, y) {
                  return new i(this.data, typeof c != "number" || c < 0 ? this.shape[0] : 0 | c, typeof a != "number" || a < 0 ? this.shape[1] : 0 | a, typeof y != "number" || y < 0 ? this.shape[2] : 0 | y, this.stride[0], this.stride[1], this.stride[2], this.offset);
                }, p.lo = function(c, a, y) {
                  var f = this.offset, _ = 0, b = this.shape[0], w = this.shape[1], T = this.shape[2], L = this.stride[0], A = this.stride[1], I = this.stride[2];
                  return typeof c == "number" && c >= 0 && (f += L * (_ = 0 | c), b -= _), typeof a == "number" && a >= 0 && (f += A * (_ = 0 | a), w -= _), typeof y == "number" && y >= 0 && (f += I * (_ = 0 | y), T -= _), new i(this.data, b, w, T, L, A, I, f);
                }, p.step = function(c, a, y) {
                  var f = this.shape[0], _ = this.shape[1], b = this.shape[2], w = this.stride[0], T = this.stride[1], L = this.stride[2], A = this.offset, I = 0, P = Math.ceil;
                  return typeof c == "number" && ((I = 0 | c) < 0 ? (A += w * (f - 1), f = P(-f / I)) : f = P(f / I), w *= I), typeof a == "number" && ((I = 0 | a) < 0 ? (A += T * (_ - 1), _ = P(-_ / I)) : _ = P(_ / I), T *= I), typeof y == "number" && ((I = 0 | y) < 0 ? (A += L * (b - 1), b = P(-b / I)) : b = P(b / I), L *= I), new i(this.data, f, _, b, w, T, L, A);
                }, p.transpose = function(c, a, y) {
                  c = c === void 0 ? 0 : 0 | c, a = a === void 0 ? 1 : 0 | a, y = y === void 0 ? 2 : 0 | y;
                  var f = this.shape, _ = this.stride;
                  return new i(this.data, f[c], f[a], f[y], _[c], _[a], _[y], this.offset);
                }, p.pick = function(c, a, y) {
                  var f = [], _ = [], b = this.offset;
                  return typeof c == "number" && c >= 0 ? b = b + this.stride[0] * c | 0 : (f.push(this.shape[0]), _.push(this.stride[0])), typeof a == "number" && a >= 0 ? b = b + this.stride[1] * a | 0 : (f.push(this.shape[1]), _.push(this.stride[1])), typeof y == "number" && y >= 0 ? b = b + this.stride[2] * y | 0 : (f.push(this.shape[2]), _.push(this.stride[2])), (0, h[f.length + 1])(this.data, f, _, b);
                }, function(c, a, y, f) {
                  return new i(c, a[0], a[1], a[2], y[0], y[1], y[2], f);
                };
              }, 4: function(o, h, l) {
                function i(c, a, y, f, _, b, w, T, L, A) {
                  this.data = c, this.shape = [a, y, f, _], this.stride = [b, w, T, L], this.offset = 0 | A;
                }
                var p = i.prototype;
                return p.dtype = o, p.dimension = 4, Object.defineProperty(p, "size", { get: function() {
                  return this.shape[0] * this.shape[1] * this.shape[2] * this.shape[3];
                } }), Object.defineProperty(p, "order", { get: l }), p.set = function(c, a, y, f, _) {
                  return o === "generic" ? this.data.set(this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f, _) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f] = _;
                }, p.get = function(c, a, y, f) {
                  return o === "generic" ? this.data.get(this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f];
                }, p.index = function(c, a, y, f) {
                  return this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f;
                }, p.hi = function(c, a, y, f) {
                  return new i(this.data, typeof c != "number" || c < 0 ? this.shape[0] : 0 | c, typeof a != "number" || a < 0 ? this.shape[1] : 0 | a, typeof y != "number" || y < 0 ? this.shape[2] : 0 | y, typeof f != "number" || f < 0 ? this.shape[3] : 0 | f, this.stride[0], this.stride[1], this.stride[2], this.stride[3], this.offset);
                }, p.lo = function(c, a, y, f) {
                  var _ = this.offset, b = 0, w = this.shape[0], T = this.shape[1], L = this.shape[2], A = this.shape[3], I = this.stride[0], P = this.stride[1], S = this.stride[2], E = this.stride[3];
                  return typeof c == "number" && c >= 0 && (_ += I * (b = 0 | c), w -= b), typeof a == "number" && a >= 0 && (_ += P * (b = 0 | a), T -= b), typeof y == "number" && y >= 0 && (_ += S * (b = 0 | y), L -= b), typeof f == "number" && f >= 0 && (_ += E * (b = 0 | f), A -= b), new i(this.data, w, T, L, A, I, P, S, E, _);
                }, p.step = function(c, a, y, f) {
                  var _ = this.shape[0], b = this.shape[1], w = this.shape[2], T = this.shape[3], L = this.stride[0], A = this.stride[1], I = this.stride[2], P = this.stride[3], S = this.offset, E = 0, R = Math.ceil;
                  return typeof c == "number" && ((E = 0 | c) < 0 ? (S += L * (_ - 1), _ = R(-_ / E)) : _ = R(_ / E), L *= E), typeof a == "number" && ((E = 0 | a) < 0 ? (S += A * (b - 1), b = R(-b / E)) : b = R(b / E), A *= E), typeof y == "number" && ((E = 0 | y) < 0 ? (S += I * (w - 1), w = R(-w / E)) : w = R(w / E), I *= E), typeof f == "number" && ((E = 0 | f) < 0 ? (S += P * (T - 1), T = R(-T / E)) : T = R(T / E), P *= E), new i(this.data, _, b, w, T, L, A, I, P, S);
                }, p.transpose = function(c, a, y, f) {
                  c = c === void 0 ? 0 : 0 | c, a = a === void 0 ? 1 : 0 | a, y = y === void 0 ? 2 : 0 | y, f = f === void 0 ? 3 : 0 | f;
                  var _ = this.shape, b = this.stride;
                  return new i(this.data, _[c], _[a], _[y], _[f], b[c], b[a], b[y], b[f], this.offset);
                }, p.pick = function(c, a, y, f) {
                  var _ = [], b = [], w = this.offset;
                  return typeof c == "number" && c >= 0 ? w = w + this.stride[0] * c | 0 : (_.push(this.shape[0]), b.push(this.stride[0])), typeof a == "number" && a >= 0 ? w = w + this.stride[1] * a | 0 : (_.push(this.shape[1]), b.push(this.stride[1])), typeof y == "number" && y >= 0 ? w = w + this.stride[2] * y | 0 : (_.push(this.shape[2]), b.push(this.stride[2])), typeof f == "number" && f >= 0 ? w = w + this.stride[3] * f | 0 : (_.push(this.shape[3]), b.push(this.stride[3])), (0, h[_.length + 1])(this.data, _, b, w);
                }, function(c, a, y, f) {
                  return new i(c, a[0], a[1], a[2], a[3], y[0], y[1], y[2], y[3], f);
                };
              }, 5: function(o, h, l) {
                function i(c, a, y, f, _, b, w, T, L, A, I, P) {
                  this.data = c, this.shape = [a, y, f, _, b], this.stride = [w, T, L, A, I], this.offset = 0 | P;
                }
                var p = i.prototype;
                return p.dtype = o, p.dimension = 5, Object.defineProperty(p, "size", { get: function() {
                  return this.shape[0] * this.shape[1] * this.shape[2] * this.shape[3] * this.shape[4];
                } }), Object.defineProperty(p, "order", { get: l }), p.set = function(c, a, y, f, _, b) {
                  return o === "generic" ? this.data.set(this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f + this.stride[4] * _, b) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f + this.stride[4] * _] = b;
                }, p.get = function(c, a, y, f, _) {
                  return o === "generic" ? this.data.get(this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f + this.stride[4] * _) : this.data[this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f + this.stride[4] * _];
                }, p.index = function(c, a, y, f, _) {
                  return this.offset + this.stride[0] * c + this.stride[1] * a + this.stride[2] * y + this.stride[3] * f + this.stride[4] * _;
                }, p.hi = function(c, a, y, f, _) {
                  return new i(this.data, typeof c != "number" || c < 0 ? this.shape[0] : 0 | c, typeof a != "number" || a < 0 ? this.shape[1] : 0 | a, typeof y != "number" || y < 0 ? this.shape[2] : 0 | y, typeof f != "number" || f < 0 ? this.shape[3] : 0 | f, typeof _ != "number" || _ < 0 ? this.shape[4] : 0 | _, this.stride[0], this.stride[1], this.stride[2], this.stride[3], this.stride[4], this.offset);
                }, p.lo = function(c, a, y, f, _) {
                  var b = this.offset, w = 0, T = this.shape[0], L = this.shape[1], A = this.shape[2], I = this.shape[3], P = this.shape[4], S = this.stride[0], E = this.stride[1], R = this.stride[2], z = this.stride[3], j = this.stride[4];
                  return typeof c == "number" && c >= 0 && (b += S * (w = 0 | c), T -= w), typeof a == "number" && a >= 0 && (b += E * (w = 0 | a), L -= w), typeof y == "number" && y >= 0 && (b += R * (w = 0 | y), A -= w), typeof f == "number" && f >= 0 && (b += z * (w = 0 | f), I -= w), typeof _ == "number" && _ >= 0 && (b += j * (w = 0 | _), P -= w), new i(this.data, T, L, A, I, P, S, E, R, z, j, b);
                }, p.step = function(c, a, y, f, _) {
                  var b = this.shape[0], w = this.shape[1], T = this.shape[2], L = this.shape[3], A = this.shape[4], I = this.stride[0], P = this.stride[1], S = this.stride[2], E = this.stride[3], R = this.stride[4], z = this.offset, j = 0, H = Math.ceil;
                  return typeof c == "number" && ((j = 0 | c) < 0 ? (z += I * (b - 1), b = H(-b / j)) : b = H(b / j), I *= j), typeof a == "number" && ((j = 0 | a) < 0 ? (z += P * (w - 1), w = H(-w / j)) : w = H(w / j), P *= j), typeof y == "number" && ((j = 0 | y) < 0 ? (z += S * (T - 1), T = H(-T / j)) : T = H(T / j), S *= j), typeof f == "number" && ((j = 0 | f) < 0 ? (z += E * (L - 1), L = H(-L / j)) : L = H(L / j), E *= j), typeof _ == "number" && ((j = 0 | _) < 0 ? (z += R * (A - 1), A = H(-A / j)) : A = H(A / j), R *= j), new i(this.data, b, w, T, L, A, I, P, S, E, R, z);
                }, p.transpose = function(c, a, y, f, _) {
                  c = c === void 0 ? 0 : 0 | c, a = a === void 0 ? 1 : 0 | a, y = y === void 0 ? 2 : 0 | y, f = f === void 0 ? 3 : 0 | f, _ = _ === void 0 ? 4 : 0 | _;
                  var b = this.shape, w = this.stride;
                  return new i(this.data, b[c], b[a], b[y], b[f], b[_], w[c], w[a], w[y], w[f], w[_], this.offset);
                }, p.pick = function(c, a, y, f, _) {
                  var b = [], w = [], T = this.offset;
                  return typeof c == "number" && c >= 0 ? T = T + this.stride[0] * c | 0 : (b.push(this.shape[0]), w.push(this.stride[0])), typeof a == "number" && a >= 0 ? T = T + this.stride[1] * a | 0 : (b.push(this.shape[1]), w.push(this.stride[1])), typeof y == "number" && y >= 0 ? T = T + this.stride[2] * y | 0 : (b.push(this.shape[2]), w.push(this.stride[2])), typeof f == "number" && f >= 0 ? T = T + this.stride[3] * f | 0 : (b.push(this.shape[3]), w.push(this.stride[3])), typeof _ == "number" && _ >= 0 ? T = T + this.stride[4] * _ | 0 : (b.push(this.shape[4]), w.push(this.stride[4])), (0, h[b.length + 1])(this.data, b, w, T);
                }, function(c, a, y, f) {
                  return new i(c, a[0], a[1], a[2], a[3], a[4], y[0], y[1], y[2], y[3], y[4], f);
                };
              } };
              function d(o, h) {
                var l = h === -1 ? "T" : String(h), i = t[l];
                return h === -1 ? i(o) : h === 0 ? i(o, u[o][0]) : i(o, u[o], s);
              }
              var u = { generic: [], buffer: [], array: [], float32: [], float64: [], int8: [], int16: [], int32: [], uint8_clamped: [], uint8: [], uint16: [], uint32: [], bigint64: [], biguint64: [] };
              k.exports = function(o, h, l, i) {
                if (o === void 0)
                  return (0, u.array[0])([]);
                typeof o == "number" && (o = [o]), h === void 0 && (h = [o.length]);
                var p = h.length;
                if (l === void 0) {
                  l = new Array(p);
                  for (var c = p - 1, a = 1; c >= 0; --c)
                    l[c] = a, a *= h[c];
                }
                if (i === void 0)
                  for (i = 0, c = 0; c < p; ++c)
                    l[c] < 0 && (i -= (h[c] - 1) * l[c]);
                for (var y = function(_) {
                  if (e(_))
                    return "buffer";
                  if (r)
                    switch (Object.prototype.toString.call(_)) {
                      case "[object Float64Array]":
                        return "float64";
                      case "[object Float32Array]":
                        return "float32";
                      case "[object Int8Array]":
                        return "int8";
                      case "[object Int16Array]":
                        return "int16";
                      case "[object Int32Array]":
                        return "int32";
                      case "[object Uint8ClampedArray]":
                        return "uint8_clamped";
                      case "[object Uint8Array]":
                        return "uint8";
                      case "[object Uint16Array]":
                        return "uint16";
                      case "[object Uint32Array]":
                        return "uint32";
                      case "[object BigInt64Array]":
                        return "bigint64";
                      case "[object BigUint64Array]":
                        return "biguint64";
                    }
                  return Array.isArray(_) ? "array" : "generic";
                }(o), f = u[y]; f.length <= p + 1; )
                  f.push(d(y, f.length - 1));
                return (0, f[p + 1])(o, h, l, i);
              };
            }, { "is-buffer": 237 }], 260: [function(g, k, x) {
              var e = g("double-bits"), r = Math.pow(2, -1074);
              k.exports = function(n, s) {
                if (isNaN(n) || isNaN(s))
                  return NaN;
                if (n === s)
                  return n;
                if (n === 0)
                  return s < 0 ? -r : r;
                var t = e.hi(n), d = e.lo(n);
                return s > n == n > 0 ? d === -1 >>> 0 ? (t += 1, d = 0) : d += 1 : d === 0 ? (d = -1 >>> 0, t -= 1) : d -= 1, e.pack(d, t);
              };
            }, { "double-bits": 64 }], 261: [function(g, k, x) {
              x.vertexNormals = function(e, r, n) {
                for (var s = r.length, t = new Array(s), d = n === void 0 ? 1e-6 : n, u = 0; u < s; ++u)
                  t[u] = [0, 0, 0];
                for (u = 0; u < e.length; ++u)
                  for (var o = e[u], h = 0, l = o[o.length - 1], i = o[0], p = 0; p < o.length; ++p) {
                    h = l, l = i, i = o[(p + 1) % o.length];
                    for (var c = r[h], a = r[l], y = r[i], f = new Array(3), _ = 0, b = new Array(3), w = 0, T = 0; T < 3; ++T)
                      f[T] = c[T] - a[T], _ += f[T] * f[T], b[T] = y[T] - a[T], w += b[T] * b[T];
                    if (_ * w > d) {
                      var L = t[l], A = 1 / Math.sqrt(_ * w);
                      for (T = 0; T < 3; ++T) {
                        var I = (T + 1) % 3, P = (T + 2) % 3;
                        L[T] += A * (b[I] * f[P] - b[P] * f[I]);
                      }
                    }
                  }
                for (u = 0; u < s; ++u) {
                  L = t[u];
                  var S = 0;
                  for (T = 0; T < 3; ++T)
                    S += L[T] * L[T];
                  if (S > d)
                    for (A = 1 / Math.sqrt(S), T = 0; T < 3; ++T)
                      L[T] *= A;
                  else
                    for (T = 0; T < 3; ++T)
                      L[T] = 0;
                }
                return t;
              }, x.faceNormals = function(e, r, n) {
                for (var s = e.length, t = new Array(s), d = n === void 0 ? 1e-6 : n, u = 0; u < s; ++u) {
                  for (var o = e[u], h = new Array(3), l = 0; l < 3; ++l)
                    h[l] = r[o[l]];
                  var i = new Array(3), p = new Array(3);
                  for (l = 0; l < 3; ++l)
                    i[l] = h[1][l] - h[0][l], p[l] = h[2][l] - h[0][l];
                  var c = new Array(3), a = 0;
                  for (l = 0; l < 3; ++l) {
                    var y = (l + 1) % 3, f = (l + 2) % 3;
                    c[l] = i[y] * p[f] - i[f] * p[y], a += c[l] * c[l];
                  }
                  for (a = a > d ? 1 / Math.sqrt(a) : 0, l = 0; l < 3; ++l)
                    c[l] *= a;
                  t[u] = c;
                }
                return t;
              };
            }, {}], 262: [function(g, k, x) {
              k.exports = function(e, r, n, s, t, d, u, o, h, l) {
                var i = r + d + l;
                if (p > 0) {
                  var p = Math.sqrt(i + 1);
                  e[0] = 0.5 * (u - h) / p, e[1] = 0.5 * (o - s) / p, e[2] = 0.5 * (n - d) / p, e[3] = 0.5 * p;
                } else {
                  var c = Math.max(r, d, l);
                  p = Math.sqrt(2 * c - i + 1), r >= c ? (e[0] = 0.5 * p, e[1] = 0.5 * (t + n) / p, e[2] = 0.5 * (o + s) / p, e[3] = 0.5 * (u - h) / p) : d >= c ? (e[0] = 0.5 * (n + t) / p, e[1] = 0.5 * p, e[2] = 0.5 * (h + u) / p, e[3] = 0.5 * (o - s) / p) : (e[0] = 0.5 * (s + o) / p, e[1] = 0.5 * (u + h) / p, e[2] = 0.5 * p, e[3] = 0.5 * (n - t) / p);
                }
                return e;
              };
            }, {}], 263: [function(g, k, x) {
              k.exports = function(i) {
                var p = (i = i || {}).center || [0, 0, 0], c = i.rotation || [0, 0, 0, 1], a = i.radius || 1;
                p = [].slice.call(p, 0, 3), o(c = [].slice.call(c, 0, 4), c);
                var y = new h(c, p, Math.log(a));
                return y.setDistanceLimits(i.zoomMin, i.zoomMax), ("eye" in i || "up" in i) && y.lookAt(0, i.eye, i.center, i.up), y;
              };
              var e = g("filtered-vector"), r = g("gl-mat4/lookAt"), n = g("gl-mat4/fromQuat"), s = g("gl-mat4/invert"), t = g("./lib/quatFromFrame");
              function d(i, p, c) {
                return Math.sqrt(Math.pow(i, 2) + Math.pow(p, 2) + Math.pow(c, 2));
              }
              function u(i, p, c, a) {
                return Math.sqrt(Math.pow(i, 2) + Math.pow(p, 2) + Math.pow(c, 2) + Math.pow(a, 2));
              }
              function o(i, p) {
                var c = p[0], a = p[1], y = p[2], f = p[3], _ = u(c, a, y, f);
                _ > 1e-6 ? (i[0] = c / _, i[1] = a / _, i[2] = y / _, i[3] = f / _) : (i[0] = i[1] = i[2] = 0, i[3] = 1);
              }
              function h(i, p, c) {
                this.radius = e([c]), this.center = e(p), this.rotation = e(i), this.computedRadius = this.radius.curve(0), this.computedCenter = this.center.curve(0), this.computedRotation = this.rotation.curve(0), this.computedUp = [0.1, 0, 0], this.computedEye = [0.1, 0, 0], this.computedMatrix = [0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], this.recalcMatrix(0);
              }
              var l = h.prototype;
              l.lastT = function() {
                return Math.max(this.radius.lastT(), this.center.lastT(), this.rotation.lastT());
              }, l.recalcMatrix = function(i) {
                this.radius.curve(i), this.center.curve(i), this.rotation.curve(i);
                var p = this.computedRotation;
                o(p, p);
                var c = this.computedMatrix;
                n(c, p);
                var a = this.computedCenter, y = this.computedEye, f = this.computedUp, _ = Math.exp(this.computedRadius[0]);
                y[0] = a[0] + _ * c[2], y[1] = a[1] + _ * c[6], y[2] = a[2] + _ * c[10], f[0] = c[1], f[1] = c[5], f[2] = c[9];
                for (var b = 0; b < 3; ++b) {
                  for (var w = 0, T = 0; T < 3; ++T)
                    w += c[b + 4 * T] * y[T];
                  c[12 + b] = -w;
                }
              }, l.getMatrix = function(i, p) {
                this.recalcMatrix(i);
                var c = this.computedMatrix;
                if (p) {
                  for (var a = 0; a < 16; ++a)
                    p[a] = c[a];
                  return p;
                }
                return c;
              }, l.idle = function(i) {
                this.center.idle(i), this.radius.idle(i), this.rotation.idle(i);
              }, l.flush = function(i) {
                this.center.flush(i), this.radius.flush(i), this.rotation.flush(i);
              }, l.pan = function(i, p, c, a) {
                p = p || 0, c = c || 0, a = a || 0, this.recalcMatrix(i);
                var y = this.computedMatrix, f = y[1], _ = y[5], b = y[9], w = d(f, _, b);
                f /= w, _ /= w, b /= w;
                var T = y[0], L = y[4], A = y[8], I = T * f + L * _ + A * b, P = d(T -= f * I, L -= _ * I, A -= b * I);
                T /= P, L /= P, A /= P, y[2], y[6], y[10];
                var S = T * p + f * c, E = L * p + _ * c, R = A * p + b * c;
                this.center.move(i, S, E, R);
                var z = Math.exp(this.computedRadius[0]);
                z = Math.max(1e-4, z + a), this.radius.set(i, Math.log(z));
              }, l.rotate = function(i, p, c, a) {
                this.recalcMatrix(i), p = p || 0, c = c || 0;
                var y = this.computedMatrix, f = y[0], _ = y[4], b = y[8], w = y[1], T = y[5], L = y[9], A = y[2], I = y[6], P = y[10], S = p * f + c * w, E = p * _ + c * T, R = p * b + c * L, z = -(I * R - P * E), j = -(P * S - A * R), H = -(A * E - I * S), Y = Math.sqrt(Math.max(0, 1 - Math.pow(z, 2) - Math.pow(j, 2) - Math.pow(H, 2))), J = u(z, j, H, Y);
                J > 1e-6 ? (z /= J, j /= J, H /= J, Y /= J) : (z = j = H = 0, Y = 1);
                var W = this.computedRotation, Z = W[0], re = W[1], V = W[2], B = W[3], U = Z * Y + B * z + re * H - V * j, ee = re * Y + B * j + V * z - Z * H, N = V * Y + B * H + Z * j - re * z, K = B * Y - Z * z - re * j - V * H;
                if (a) {
                  z = A, j = I, H = P;
                  var X = Math.sin(a) / d(z, j, H);
                  z *= X, j *= X, H *= X, K = K * (Y = Math.cos(p)) - (U = U * Y + K * z + ee * H - N * j) * z - (ee = ee * Y + K * j + N * z - U * H) * j - (N = N * Y + K * H + U * j - ee * z) * H;
                }
                var te = u(U, ee, N, K);
                te > 1e-6 ? (U /= te, ee /= te, N /= te, K /= te) : (U = ee = N = 0, K = 1), this.rotation.set(i, U, ee, N, K);
              }, l.lookAt = function(i, p, c, a) {
                this.recalcMatrix(i), c = c || this.computedCenter, p = p || this.computedEye, a = a || this.computedUp;
                var y = this.computedMatrix;
                r(y, p, c, a);
                var f = this.computedRotation;
                t(f, y[0], y[1], y[2], y[4], y[5], y[6], y[8], y[9], y[10]), o(f, f), this.rotation.set(i, f[0], f[1], f[2], f[3]);
                for (var _ = 0, b = 0; b < 3; ++b)
                  _ += Math.pow(c[b] - p[b], 2);
                this.radius.set(i, 0.5 * Math.log(Math.max(_, 1e-6))), this.center.set(i, c[0], c[1], c[2]);
              }, l.translate = function(i, p, c, a) {
                this.center.move(i, p || 0, c || 0, a || 0);
              }, l.setMatrix = function(i, p) {
                var c = this.computedRotation;
                t(c, p[0], p[1], p[2], p[4], p[5], p[6], p[8], p[9], p[10]), o(c, c), this.rotation.set(i, c[0], c[1], c[2], c[3]);
                var a = this.computedMatrix;
                s(a, p);
                var y = a[15];
                if (Math.abs(y) > 1e-6) {
                  var f = a[12] / y, _ = a[13] / y, b = a[14] / y;
                  this.recalcMatrix(i);
                  var w = Math.exp(this.computedRadius[0]);
                  this.center.set(i, f - a[2] * w, _ - a[6] * w, b - a[10] * w), this.radius.idle(i);
                } else
                  this.center.idle(i), this.radius.idle(i);
              }, l.setDistance = function(i, p) {
                p > 0 && this.radius.set(i, Math.log(p));
              }, l.setDistanceLimits = function(i, p) {
                i = i > 0 ? Math.log(i) : -1 / 0, p = p > 0 ? Math.log(p) : 1 / 0, p = Math.max(p, i), this.radius.bounds[0][0] = i, this.radius.bounds[1][0] = p;
              }, l.getDistanceLimits = function(i) {
                var p = this.radius.bounds;
                return i ? (i[0] = Math.exp(p[0][0]), i[1] = Math.exp(p[1][0]), i) : [Math.exp(p[0][0]), Math.exp(p[1][0])];
              }, l.toJSON = function() {
                return this.recalcMatrix(this.lastT()), { center: this.computedCenter.slice(), rotation: this.computedRotation.slice(), distance: Math.log(this.computedRadius[0]), zoomMin: this.radius.bounds[0][0], zoomMax: this.radius.bounds[1][0] };
              }, l.fromJSON = function(i) {
                var p = this.lastT(), c = i.center;
                c && this.center.set(p, c[0], c[1], c[2]);
                var a = i.rotation;
                a && this.rotation.set(p, a[0], a[1], a[2], a[3]);
                var y = i.distance;
                y && y > 0 && this.radius.set(p, Math.log(y)), this.setDistanceLimits(i.zoomMin, i.zoomMax);
              };
            }, { "./lib/quatFromFrame": 262, "filtered-vector": 68, "gl-mat4/fromQuat": 95, "gl-mat4/invert": 98, "gl-mat4/lookAt": 99 }], 264: [function(g, k, x) {
              var e = g("repeat-string");
              k.exports = function(r, n, s) {
                return e(s = s !== void 0 ? s + "" : " ", n) + r;
              };
            }, { "repeat-string": 277 }], 265: [function(g, k, x) {
              k.exports = function(e, r) {
                r || (r = [0, ""]), e = String(e);
                var n = parseFloat(e, 10);
                return r[0] = n, r[1] = e.match(/[\d.\-\+]*\s*(.*)/)[1] || "", r;
              };
            }, {}], 266: [function(g, k, x) {
              k.exports = function(r, n) {
                for (var s = 0 | n.length, t = r.length, d = [new Array(s), new Array(s)], u = 0; u < s; ++u)
                  d[0][u] = [], d[1][u] = [];
                for (u = 0; u < t; ++u) {
                  var o = r[u];
                  d[0][o[0]].push(o), d[1][o[1]].push(o);
                }
                var h = [];
                for (u = 0; u < s; ++u)
                  d[0][u].length + d[1][u].length === 0 && h.push([u]);
                function l(_, b) {
                  var w = d[b][_[b]];
                  w.splice(w.indexOf(_), 1);
                }
                function i(_, b, w) {
                  for (var T, L, A, I = 0; I < 2; ++I)
                    if (d[I][b].length > 0) {
                      T = d[I][b][0], A = I;
                      break;
                    }
                  L = T[1 ^ A];
                  for (var P = 0; P < 2; ++P)
                    for (var S = d[P][b], E = 0; E < S.length; ++E) {
                      var R = S[E], z = R[1 ^ P];
                      e(n[_], n[b], n[L], n[z]) > 0 && (T = R, L = z, A = P);
                    }
                  return w || T && l(T, A), L;
                }
                function p(_, b) {
                  var w = d[b][_][0], T = [_];
                  l(w, b);
                  for (var L = w[1 ^ b]; ; ) {
                    for (; L !== _; )
                      T.push(L), L = i(T[T.length - 2], L, !1);
                    if (d[0][_].length + d[1][_].length === 0)
                      break;
                    var A = T[T.length - 1], I = _, P = T[1], S = i(A, I, !0);
                    if (e(n[A], n[I], n[P], n[S]) < 0)
                      break;
                    T.push(_), L = i(A, I);
                  }
                  return T;
                }
                function c(_, b) {
                  return b[1] === b[b.length - 1];
                }
                for (u = 0; u < s; ++u)
                  for (var a = 0; a < 2; ++a) {
                    for (var y = []; d[a][u].length > 0; ) {
                      d[0][u].length;
                      var f = p(u, a);
                      c(0, f) ? y.push.apply(y, f) : (y.length > 0 && h.push(y), y = f);
                    }
                    y.length > 0 && h.push(y);
                  }
                return h;
              };
              var e = g("compare-angle");
            }, { "compare-angle": 54 }], 267: [function(g, k, x) {
              k.exports = function(r, n) {
                for (var s = e(r, n.length), t = new Array(n.length), d = new Array(n.length), u = [], o = 0; o < n.length; ++o) {
                  var h = s[o].length;
                  d[o] = h, t[o] = !0, h <= 1 && u.push(o);
                }
                for (; u.length > 0; ) {
                  var l = u.pop();
                  t[l] = !1;
                  var i = s[l];
                  for (o = 0; o < i.length; ++o) {
                    var p = i[o];
                    --d[p] == 0 && u.push(p);
                  }
                }
                var c = new Array(n.length), a = [];
                for (o = 0; o < n.length; ++o)
                  t[o] ? (l = a.length, c[o] = l, a.push(n[o])) : c[o] = -1;
                var y = [];
                for (o = 0; o < r.length; ++o) {
                  var f = r[o];
                  t[f[0]] && t[f[1]] && y.push([c[f[0]], c[f[1]]]);
                }
                return [y, a];
              };
              var e = g("edges-to-adjacency-list");
            }, { "edges-to-adjacency-list": 66 }], 268: [function(g, k, x) {
              k.exports = function(h, l) {
                var i = u(h, l);
                h = i[0];
                for (var p = (l = i[1]).length, c = (h.length, e(h, l.length)), a = 0; a < p; ++a)
                  if (c[a].length % 2 == 1)
                    throw new Error("planar-graph-to-polyline: graph must be manifold");
                var y = r(h, l), f = (y = y.filter(function(oe) {
                  for (var ve = oe.length, ue = [0], ye = 0; ye < ve; ++ye) {
                    var Ae = l[oe[ye]], pe = l[oe[(ye + 1) % ve]], ge = s(-Ae[0], Ae[1]), we = s(-Ae[0], pe[1]), se = s(pe[0], Ae[1]), de = s(pe[0], pe[1]);
                    ue = t(ue, t(t(ge, we), t(se, de)));
                  }
                  return ue[ue.length - 1] > 0;
                })).length, _ = new Array(f), b = new Array(f);
                for (a = 0; a < f; ++a) {
                  _[a] = a;
                  var w = new Array(f), T = y[a].map(function(oe) {
                    return l[oe];
                  }), L = n([T]), A = 0;
                  e:
                    for (var I = 0; I < f; ++I)
                      if (w[I] = 0, a !== I) {
                        for (var P = (ie = y[I]).length, S = 0; S < P; ++S) {
                          var E = L(l[ie[S]]);
                          if (E !== 0) {
                            E < 0 && (w[I] = 1, A += 1);
                            continue e;
                          }
                        }
                        w[I] = 1, A += 1;
                      }
                  b[a] = [A, a, w];
                }
                for (b.sort(function(oe, ve) {
                  return ve[0] - oe[0];
                }), a = 0; a < f; ++a) {
                  var R = (w = b[a])[1], z = w[2];
                  for (I = 0; I < f; ++I)
                    z[I] && (_[I] = R);
                }
                var j = function(oe) {
                  for (var ve = new Array(oe), ue = 0; ue < oe; ++ue)
                    ve[ue] = [];
                  return ve;
                }(f);
                for (a = 0; a < f; ++a)
                  j[a].push(_[a]), j[_[a]].push(a);
                var H = {}, Y = o(p, !1);
                for (a = 0; a < f; ++a)
                  for (P = (ie = y[a]).length, I = 0; I < P; ++I) {
                    var J = ie[I], W = ie[(I + 1) % P], Z = Math.min(J, W) + ":" + Math.max(J, W);
                    if (Z in H) {
                      var re = H[Z];
                      j[re].push(a), j[a].push(re), Y[J] = Y[W] = !0;
                    } else
                      H[Z] = a;
                  }
                function V(oe) {
                  for (var ve = oe.length, ue = 0; ue < ve; ++ue)
                    if (!Y[oe[ue]])
                      return !1;
                  return !0;
                }
                var B = [], U = o(f, -1);
                for (a = 0; a < f; ++a)
                  _[a] !== a || V(y[a]) ? U[a] = -1 : (B.push(a), U[a] = 0);
                for (i = []; B.length > 0; ) {
                  var ee = B.pop(), N = j[ee];
                  d(N, function(oe, ve) {
                    return oe - ve;
                  });
                  var K, X = N.length, te = U[ee];
                  if (te === 0) {
                    var ie = y[ee];
                    K = [ie];
                  }
                  for (a = 0; a < X; ++a) {
                    var le = N[a];
                    U[le] >= 0 || (U[le] = 1 ^ te, B.push(le), te === 0 && (V(ie = y[le]) || (ie.reverse(), K.push(ie))));
                  }
                  te === 0 && i.push(K);
                }
                return i;
              };
              var e = g("edges-to-adjacency-list"), r = g("planar-dual"), n = g("point-in-big-polygon"), s = g("two-product"), t = g("robust-sum"), d = g("uniq"), u = g("./lib/trim-leaves");
              function o(h, l) {
                for (var i = new Array(h), p = 0; p < h; ++p)
                  i[p] = l;
                return i;
              }
            }, { "./lib/trim-leaves": 267, "edges-to-adjacency-list": 66, "planar-dual": 266, "point-in-big-polygon": 269, "robust-sum": 289, "two-product": 306, uniq: 310 }], 269: [function(g, k, x) {
              k.exports = function(o) {
                for (var h = o.length, l = [], i = [], p = 0; p < h; ++p)
                  for (var c = o[p], a = c.length, y = a - 1, f = 0; f < a; y = f++) {
                    var _ = c[y], b = c[f];
                    _[0] === b[0] ? i.push([_, b]) : l.push([_, b]);
                  }
                if (l.length === 0)
                  return i.length === 0 ? u : (w = d(i), function(A) {
                    return w(A[0], A[1]) ? 0 : 1;
                  });
                var w, T = r(l), L = function(A, I) {
                  return function(P) {
                    var S = s.le(I, P[0]);
                    if (S < 0)
                      return 1;
                    var E = A[S];
                    if (!E) {
                      if (!(S > 0 && I[S] === P[0]))
                        return 1;
                      E = A[S - 1];
                    }
                    for (var R = 1; E; ) {
                      var z = E.key, j = e(P, z[0], z[1]);
                      if (z[0][0] < z[1][0])
                        if (j < 0)
                          E = E.left;
                        else {
                          if (!(j > 0))
                            return 0;
                          R = -1, E = E.right;
                        }
                      else if (j > 0)
                        E = E.left;
                      else {
                        if (!(j < 0))
                          return 0;
                        R = 1, E = E.right;
                      }
                    }
                    return R;
                  };
                }(T.slabs, T.coordinates);
                return i.length === 0 ? L : function(A, I) {
                  return function(P) {
                    return A(P[0], P[1]) ? 0 : I(P);
                  };
                }(d(i), L);
              };
              var e = g("robust-orientation")[3], r = g("slab-decomposition"), n = g("interval-tree-1d"), s = g("binary-search-bounds");
              function t() {
                return !0;
              }
              function d(o) {
                for (var h = {}, l = 0; l < o.length; ++l) {
                  var i = o[l], p = i[0][0], c = i[0][1], a = i[1][1], y = [Math.min(c, a), Math.max(c, a)];
                  p in h ? h[p].push(y) : h[p] = [y];
                }
                var f = {}, _ = Object.keys(h);
                for (l = 0; l < _.length; ++l) {
                  var b = h[_[l]];
                  f[_[l]] = n(b);
                }
                return function(w) {
                  return function(T, L) {
                    var A = w[T];
                    return !!A && !!A.queryPoint(L, t);
                  };
                }(f);
              }
              function u(o) {
                return 1;
              }
            }, { "binary-search-bounds": 31, "interval-tree-1d": 234, "robust-orientation": 284, "slab-decomposition": 299 }], 270: [function(g, k, x) {
              var e = new Float64Array(4), r = new Float64Array(4), n = new Float64Array(4);
              k.exports = function(s, t, d, u, o) {
                e.length < u.length && (e = new Float64Array(u.length), r = new Float64Array(u.length), n = new Float64Array(u.length));
                for (var h = 0; h < u.length; ++h)
                  e[h] = s[h] - u[h], r[h] = t[h] - s[h], n[h] = d[h] - s[h];
                var l = 0, i = 0, p = 0, c = 0, a = 0, y = 0;
                for (h = 0; h < u.length; ++h) {
                  var f = r[h], _ = n[h], b = e[h];
                  l += f * f, i += f * _, p += _ * _, c += b * f, a += b * _, y += b * b;
                }
                var w, T, L, A, I, P = Math.abs(l * p - i * i), S = i * a - p * c, E = i * c - l * a;
                if (S + E <= P)
                  if (S < 0)
                    E < 0 && c < 0 ? (E = 0, -c >= l ? (S = 1, w = l + 2 * c + y) : w = c * (S = -c / l) + y) : (S = 0, a >= 0 ? (E = 0, w = y) : -a >= p ? (E = 1, w = p + 2 * a + y) : w = a * (E = -a / p) + y);
                  else if (E < 0)
                    E = 0, c >= 0 ? (S = 0, w = y) : -c >= l ? (S = 1, w = l + 2 * c + y) : w = c * (S = -c / l) + y;
                  else {
                    var R = 1 / P;
                    w = (S *= R) * (l * S + i * (E *= R) + 2 * c) + E * (i * S + p * E + 2 * a) + y;
                  }
                else
                  S < 0 ? (L = p + a) > (T = i + c) ? (A = L - T) >= (I = l - 2 * i + p) ? (S = 1, E = 0, w = l + 2 * c + y) : w = (S = A / I) * (l * S + i * (E = 1 - S) + 2 * c) + E * (i * S + p * E + 2 * a) + y : (S = 0, L <= 0 ? (E = 1, w = p + 2 * a + y) : a >= 0 ? (E = 0, w = y) : w = a * (E = -a / p) + y) : E < 0 ? (L = l + c) > (T = i + a) ? (A = L - T) >= (I = l - 2 * i + p) ? (E = 1, S = 0, w = p + 2 * a + y) : w = (S = 1 - (E = A / I)) * (l * S + i * E + 2 * c) + E * (i * S + p * E + 2 * a) + y : (E = 0, L <= 0 ? (S = 1, w = l + 2 * c + y) : c >= 0 ? (S = 0, w = y) : w = c * (S = -c / l) + y) : (A = p + a - i - c) <= 0 ? (S = 0, E = 1, w = p + 2 * a + y) : A >= (I = l - 2 * i + p) ? (S = 1, E = 0, w = l + 2 * c + y) : w = (S = A / I) * (l * S + i * (E = 1 - S) + 2 * c) + E * (i * S + p * E + 2 * a) + y;
                var z = 1 - S - E;
                for (h = 0; h < u.length; ++h)
                  o[h] = z * s[h] + S * t[h] + E * d[h];
                return w < 0 ? 0 : w;
              };
            }, {}], 271: [function(g, k, x) {
              k.exports = g("gl-quat/slerp");
            }, { "gl-quat/slerp": 124 }], 272: [function(g, k, x) {
              var e = g("big-rat/add");
              k.exports = function(r, n) {
                for (var s = r.length, t = new Array(s), d = 0; d < s; ++d)
                  t[d] = e(r[d], n[d]);
                return t;
              };
            }, { "big-rat/add": 15 }], 273: [function(g, k, x) {
              k.exports = function(r) {
                for (var n = new Array(r.length), s = 0; s < r.length; ++s)
                  n[s] = e(r[s]);
                return n;
              };
              var e = g("big-rat");
            }, { "big-rat": 18 }], 274: [function(g, k, x) {
              var e = g("big-rat"), r = g("big-rat/mul");
              k.exports = function(n, s) {
                for (var t = e(s), d = n.length, u = new Array(d), o = 0; o < d; ++o)
                  u[o] = r(n[o], t);
                return u;
              };
            }, { "big-rat": 18, "big-rat/mul": 27 }], 275: [function(g, k, x) {
              var e = g("big-rat/sub");
              k.exports = function(r, n) {
                for (var s = r.length, t = new Array(s), d = 0; d < s; ++d)
                  t[d] = e(r[d], n[d]);
                return t;
              };
            }, { "big-rat/sub": 29 }], 276: [function(g, k, x) {
              var e = g("compare-cell"), r = g("compare-oriented-cell"), n = g("cell-orientation");
              k.exports = function(s) {
                s.sort(r);
                for (var t = s.length, d = 0, u = 0; u < t; ++u) {
                  var o = s[u], h = n(o);
                  if (h !== 0) {
                    if (d > 0) {
                      var l = s[d - 1];
                      if (e(o, l) === 0 && n(l) !== h) {
                        d -= 1;
                        continue;
                      }
                    }
                    s[d++] = o;
                  }
                }
                return s.length = d, s;
              };
            }, { "cell-orientation": 47, "compare-cell": 56, "compare-oriented-cell": 57 }], 277: [function(g, k, x) {
              var e, r = "";
              k.exports = function(n, s) {
                if (typeof n != "string")
                  throw new TypeError("expected a string");
                if (s === 1)
                  return n;
                if (s === 2)
                  return n + n;
                var t = n.length * s;
                if (e !== n || e === void 0)
                  e = n, r = "";
                else if (r.length >= t)
                  return r.substr(0, t);
                for (; t > r.length && s > 1; )
                  1 & s && (r += n), s >>= 1, n += n;
                return r = (r += n).substr(0, t);
              };
            }, {}], 278: [function(g, k, x) {
              (function(e) {
                (function() {
                  k.exports = e.performance && e.performance.now ? function() {
                    return performance.now();
                  } : Date.now || function() {
                    return +new Date();
                  };
                }).call(this);
              }).call(this, m !== void 0 ? m : typeof self < "u" ? self : typeof window < "u" ? window : {});
            }, {}], 279: [function(g, k, x) {
              k.exports = function(e) {
                for (var r = e.length, n = e[e.length - 1], s = r, t = r - 2; t >= 0; --t) {
                  var d = n, u = e[t];
                  (h = u - ((n = d + u) - d)) && (e[--s] = n, n = h);
                }
                var o = 0;
                for (t = s; t < r; ++t) {
                  var h;
                  d = e[t], (h = (u = n) - ((n = d + u) - d)) && (e[o++] = h);
                }
                return e[o++] = n, e.length = o, e;
              };
            }, {}], 280: [function(g, k, x) {
              var e = g("two-product"), r = g("robust-sum"), n = g("robust-scale"), s = g("robust-compress");
              function t(p, c, a, y) {
                return function(f) {
                  return y(p(a(f[0][0], f[1][1]), a(-f[0][1], f[1][0])));
                };
              }
              function d(p, c, a, y) {
                return function(f) {
                  return y(p(c(p(a(f[1][1], f[2][2]), a(-f[1][2], f[2][1])), f[0][0]), p(c(p(a(f[1][0], f[2][2]), a(-f[1][2], f[2][0])), -f[0][1]), c(p(a(f[1][0], f[2][1]), a(-f[1][1], f[2][0])), f[0][2]))));
                };
              }
              function u(p, c, a, y) {
                return function(f) {
                  return y(p(p(c(p(c(p(a(f[2][2], f[3][3]), a(-f[2][3], f[3][2])), f[1][1]), p(c(p(a(f[2][1], f[3][3]), a(-f[2][3], f[3][1])), -f[1][2]), c(p(a(f[2][1], f[3][2]), a(-f[2][2], f[3][1])), f[1][3]))), f[0][0]), c(p(c(p(a(f[2][2], f[3][3]), a(-f[2][3], f[3][2])), f[1][0]), p(c(p(a(f[2][0], f[3][3]), a(-f[2][3], f[3][0])), -f[1][2]), c(p(a(f[2][0], f[3][2]), a(-f[2][2], f[3][0])), f[1][3]))), -f[0][1])), p(c(p(c(p(a(f[2][1], f[3][3]), a(-f[2][3], f[3][1])), f[1][0]), p(c(p(a(f[2][0], f[3][3]), a(-f[2][3], f[3][0])), -f[1][1]), c(p(a(f[2][0], f[3][1]), a(-f[2][1], f[3][0])), f[1][3]))), f[0][2]), c(p(c(p(a(f[2][1], f[3][2]), a(-f[2][2], f[3][1])), f[1][0]), p(c(p(a(f[2][0], f[3][2]), a(-f[2][2], f[3][0])), -f[1][1]), c(p(a(f[2][0], f[3][1]), a(-f[2][1], f[3][0])), f[1][2]))), -f[0][3]))));
                };
              }
              function o(p, c, a, y) {
                return function(f) {
                  return y(p(p(c(p(p(c(p(c(p(a(f[3][3], f[4][4]), a(-f[3][4], f[4][3])), f[2][2]), p(c(p(a(f[3][2], f[4][4]), a(-f[3][4], f[4][2])), -f[2][3]), c(p(a(f[3][2], f[4][3]), a(-f[3][3], f[4][2])), f[2][4]))), f[1][1]), c(p(c(p(a(f[3][3], f[4][4]), a(-f[3][4], f[4][3])), f[2][1]), p(c(p(a(f[3][1], f[4][4]), a(-f[3][4], f[4][1])), -f[2][3]), c(p(a(f[3][1], f[4][3]), a(-f[3][3], f[4][1])), f[2][4]))), -f[1][2])), p(c(p(c(p(a(f[3][2], f[4][4]), a(-f[3][4], f[4][2])), f[2][1]), p(c(p(a(f[3][1], f[4][4]), a(-f[3][4], f[4][1])), -f[2][2]), c(p(a(f[3][1], f[4][2]), a(-f[3][2], f[4][1])), f[2][4]))), f[1][3]), c(p(c(p(a(f[3][2], f[4][3]), a(-f[3][3], f[4][2])), f[2][1]), p(c(p(a(f[3][1], f[4][3]), a(-f[3][3], f[4][1])), -f[2][2]), c(p(a(f[3][1], f[4][2]), a(-f[3][2], f[4][1])), f[2][3]))), -f[1][4]))), f[0][0]), c(p(p(c(p(c(p(a(f[3][3], f[4][4]), a(-f[3][4], f[4][3])), f[2][2]), p(c(p(a(f[3][2], f[4][4]), a(-f[3][4], f[4][2])), -f[2][3]), c(p(a(f[3][2], f[4][3]), a(-f[3][3], f[4][2])), f[2][4]))), f[1][0]), c(p(c(p(a(f[3][3], f[4][4]), a(-f[3][4], f[4][3])), f[2][0]), p(c(p(a(f[3][0], f[4][4]), a(-f[3][4], f[4][0])), -f[2][3]), c(p(a(f[3][0], f[4][3]), a(-f[3][3], f[4][0])), f[2][4]))), -f[1][2])), p(c(p(c(p(a(f[3][2], f[4][4]), a(-f[3][4], f[4][2])), f[2][0]), p(c(p(a(f[3][0], f[4][4]), a(-f[3][4], f[4][0])), -f[2][2]), c(p(a(f[3][0], f[4][2]), a(-f[3][2], f[4][0])), f[2][4]))), f[1][3]), c(p(c(p(a(f[3][2], f[4][3]), a(-f[3][3], f[4][2])), f[2][0]), p(c(p(a(f[3][0], f[4][3]), a(-f[3][3], f[4][0])), -f[2][2]), c(p(a(f[3][0], f[4][2]), a(-f[3][2], f[4][0])), f[2][3]))), -f[1][4]))), -f[0][1])), p(c(p(p(c(p(c(p(a(f[3][3], f[4][4]), a(-f[3][4], f[4][3])), f[2][1]), p(c(p(a(f[3][1], f[4][4]), a(-f[3][4], f[4][1])), -f[2][3]), c(p(a(f[3][1], f[4][3]), a(-f[3][3], f[4][1])), f[2][4]))), f[1][0]), c(p(c(p(a(f[3][3], f[4][4]), a(-f[3][4], f[4][3])), f[2][0]), p(c(p(a(f[3][0], f[4][4]), a(-f[3][4], f[4][0])), -f[2][3]), c(p(a(f[3][0], f[4][3]), a(-f[3][3], f[4][0])), f[2][4]))), -f[1][1])), p(c(p(c(p(a(f[3][1], f[4][4]), a(-f[3][4], f[4][1])), f[2][0]), p(c(p(a(f[3][0], f[4][4]), a(-f[3][4], f[4][0])), -f[2][1]), c(p(a(f[3][0], f[4][1]), a(-f[3][1], f[4][0])), f[2][4]))), f[1][3]), c(p(c(p(a(f[3][1], f[4][3]), a(-f[3][3], f[4][1])), f[2][0]), p(c(p(a(f[3][0], f[4][3]), a(-f[3][3], f[4][0])), -f[2][1]), c(p(a(f[3][0], f[4][1]), a(-f[3][1], f[4][0])), f[2][3]))), -f[1][4]))), f[0][2]), p(c(p(p(c(p(c(p(a(f[3][2], f[4][4]), a(-f[3][4], f[4][2])), f[2][1]), p(c(p(a(f[3][1], f[4][4]), a(-f[3][4], f[4][1])), -f[2][2]), c(p(a(f[3][1], f[4][2]), a(-f[3][2], f[4][1])), f[2][4]))), f[1][0]), c(p(c(p(a(f[3][2], f[4][4]), a(-f[3][4], f[4][2])), f[2][0]), p(c(p(a(f[3][0], f[4][4]), a(-f[3][4], f[4][0])), -f[2][2]), c(p(a(f[3][0], f[4][2]), a(-f[3][2], f[4][0])), f[2][4]))), -f[1][1])), p(c(p(c(p(a(f[3][1], f[4][4]), a(-f[3][4], f[4][1])), f[2][0]), p(c(p(a(f[3][0], f[4][4]), a(-f[3][4], f[4][0])), -f[2][1]), c(p(a(f[3][0], f[4][1]), a(-f[3][1], f[4][0])), f[2][4]))), f[1][2]), c(p(c(p(a(f[3][1], f[4][2]), a(-f[3][2], f[4][1])), f[2][0]), p(c(p(a(f[3][0], f[4][2]), a(-f[3][2], f[4][0])), -f[2][1]), c(p(a(f[3][0], f[4][1]), a(-f[3][1], f[4][0])), f[2][2]))), -f[1][4]))), -f[0][3]), c(p(p(c(p(c(p(a(f[3][2], f[4][3]), a(-f[3][3], f[4][2])), f[2][1]), p(c(p(a(f[3][1], f[4][3]), a(-f[3][3], f[4][1])), -f[2][2]), c(p(a(f[3][1], f[4][2]), a(-f[3][2], f[4][1])), f[2][3]))), f[1][0]), c(p(c(p(a(f[3][2], f[4][3]), a(-f[3][3], f[4][2])), f[2][0]), p(c(p(a(f[3][0], f[4][3]), a(-f[3][3], f[4][0])), -f[2][2]), c(p(a(f[3][0], f[4][2]), a(-f[3][2], f[4][0])), f[2][3]))), -f[1][1])), p(c(p(c(p(a(f[3][1], f[4][3]), a(-f[3][3], f[4][1])), f[2][0]), p(c(p(a(f[3][0], f[4][3]), a(-f[3][3], f[4][0])), -f[2][1]), c(p(a(f[3][0], f[4][1]), a(-f[3][1], f[4][0])), f[2][3]))), f[1][2]), c(p(c(p(a(f[3][1], f[4][2]), a(-f[3][2], f[4][1])), f[2][0]), p(c(p(a(f[3][0], f[4][2]), a(-f[3][2], f[4][0])), -f[2][1]), c(p(a(f[3][0], f[4][1]), a(-f[3][1], f[4][0])), f[2][2]))), -f[1][3]))), f[0][4])))));
                };
              }
              function h(p) {
                return (p === 2 ? t : p === 3 ? d : p === 4 ? u : p === 5 ? o : void 0)(r, n, e, s);
              }
              var l = [function() {
                return [0];
              }, function(p) {
                return [p[0][0]];
              }];
              function i(p, c, a, y, f, _, b, w) {
                return function(T) {
                  switch (T.length) {
                    case 0:
                      return p(T);
                    case 1:
                      return c(T);
                    case 2:
                      return a(T);
                    case 3:
                      return y(T);
                    case 4:
                      return f(T);
                    case 5:
                      return _(T);
                  }
                  var L = b[T.length];
                  return L || (L = b[T.length] = w(T.length)), L(T);
                };
              }
              (function() {
                for (; l.length < 6; )
                  l.push(h(l.length));
                k.exports = i.apply(void 0, l.concat([l, h]));
                for (var p = 0; p < l.length; ++p)
                  k.exports[p] = l[p];
              })();
            }, { "robust-compress": 279, "robust-scale": 286, "robust-sum": 289, "two-product": 306 }], 281: [function(g, k, x) {
              var e = g("two-product"), r = g("robust-sum");
              k.exports = function(n, s) {
                for (var t = e(n[0], s[0]), d = 1; d < n.length; ++d)
                  t = r(t, e(n[d], s[d]));
                return t;
              };
            }, { "robust-sum": 289, "two-product": 306 }], 282: [function(g, k, x) {
              var e = g("two-product"), r = g("robust-sum"), n = g("robust-subtract"), s = g("robust-scale");
              function t(c) {
                return (c === 3 ? d : c === 4 ? u : c === 5 ? o : h)(r, n, e, s);
              }
              function d(c, a, y, f) {
                return function(_, b, w) {
                  var T = y(_[0], _[0]), L = f(T, b[0]), A = f(T, w[0]), I = y(b[0], b[0]), P = f(I, _[0]), S = f(I, w[0]), E = y(w[0], w[0]), R = f(E, _[0]), z = f(E, b[0]), j = c(a(z, S), a(P, L)), H = a(R, A), Y = a(j, H);
                  return Y[Y.length - 1];
                };
              }
              function u(c, a, y, f) {
                return function(_, b, w, T) {
                  var L = c(y(_[0], _[0]), y(_[1], _[1])), A = f(L, b[0]), I = f(L, w[0]), P = f(L, T[0]), S = c(y(b[0], b[0]), y(b[1], b[1])), E = f(S, _[0]), R = f(S, w[0]), z = f(S, T[0]), j = c(y(w[0], w[0]), y(w[1], w[1])), H = f(j, _[0]), Y = f(j, b[0]), J = f(j, T[0]), W = c(y(T[0], T[0]), y(T[1], T[1])), Z = f(W, _[0]), re = f(W, b[0]), V = f(W, w[0]), B = c(c(f(a(V, J), b[1]), c(f(a(re, z), -w[1]), f(a(Y, R), T[1]))), c(f(a(re, z), _[1]), c(f(a(Z, P), -b[1]), f(a(E, A), T[1])))), U = c(c(f(a(V, J), _[1]), c(f(a(Z, P), -w[1]), f(a(H, I), T[1]))), c(f(a(Y, R), _[1]), c(f(a(H, I), -b[1]), f(a(E, A), w[1])))), ee = a(B, U);
                  return ee[ee.length - 1];
                };
              }
              function o(c, a, y, f) {
                return function(_, b, w, T, L) {
                  var A = c(y(_[0], _[0]), c(y(_[1], _[1]), y(_[2], _[2]))), I = f(A, b[0]), P = f(A, w[0]), S = f(A, T[0]), E = f(A, L[0]), R = c(y(b[0], b[0]), c(y(b[1], b[1]), y(b[2], b[2]))), z = f(R, _[0]), j = f(R, w[0]), H = f(R, T[0]), Y = f(R, L[0]), J = c(y(w[0], w[0]), c(y(w[1], w[1]), y(w[2], w[2]))), W = f(J, _[0]), Z = f(J, b[0]), re = f(J, T[0]), V = f(J, L[0]), B = c(y(T[0], T[0]), c(y(T[1], T[1]), y(T[2], T[2]))), U = f(B, _[0]), ee = f(B, b[0]), N = f(B, w[0]), K = f(B, L[0]), X = c(y(L[0], L[0]), c(y(L[1], L[1]), y(L[2], L[2]))), te = f(X, _[0]), ie = f(X, b[0]), le = f(X, w[0]), oe = f(X, T[0]), ve = c(c(c(f(c(f(a(oe, K), w[1]), c(f(a(le, V), -T[1]), f(a(N, re), L[1]))), b[2]), c(f(c(f(a(oe, K), b[1]), c(f(a(ie, Y), -T[1]), f(a(ee, H), L[1]))), -w[2]), f(c(f(a(le, V), b[1]), c(f(a(ie, Y), -w[1]), f(a(Z, j), L[1]))), T[2]))), c(f(c(f(a(N, re), b[1]), c(f(a(ee, H), -w[1]), f(a(Z, j), T[1]))), -L[2]), c(f(c(f(a(oe, K), b[1]), c(f(a(ie, Y), -T[1]), f(a(ee, H), L[1]))), _[2]), f(c(f(a(oe, K), _[1]), c(f(a(te, E), -T[1]), f(a(U, S), L[1]))), -b[2])))), c(c(f(c(f(a(ie, Y), _[1]), c(f(a(te, E), -b[1]), f(a(z, I), L[1]))), T[2]), c(f(c(f(a(ee, H), _[1]), c(f(a(U, S), -b[1]), f(a(z, I), T[1]))), -L[2]), f(c(f(a(N, re), b[1]), c(f(a(ee, H), -w[1]), f(a(Z, j), T[1]))), _[2]))), c(f(c(f(a(N, re), _[1]), c(f(a(U, S), -w[1]), f(a(W, P), T[1]))), -b[2]), c(f(c(f(a(ee, H), _[1]), c(f(a(U, S), -b[1]), f(a(z, I), T[1]))), w[2]), f(c(f(a(Z, j), _[1]), c(f(a(W, P), -b[1]), f(a(z, I), w[1]))), -T[2]))))), ue = c(c(c(f(c(f(a(oe, K), w[1]), c(f(a(le, V), -T[1]), f(a(N, re), L[1]))), _[2]), f(c(f(a(oe, K), _[1]), c(f(a(te, E), -T[1]), f(a(U, S), L[1]))), -w[2])), c(f(c(f(a(le, V), _[1]), c(f(a(te, E), -w[1]), f(a(W, P), L[1]))), T[2]), f(c(f(a(N, re), _[1]), c(f(a(U, S), -w[1]), f(a(W, P), T[1]))), -L[2]))), c(c(f(c(f(a(le, V), b[1]), c(f(a(ie, Y), -w[1]), f(a(Z, j), L[1]))), _[2]), f(c(f(a(le, V), _[1]), c(f(a(te, E), -w[1]), f(a(W, P), L[1]))), -b[2])), c(f(c(f(a(ie, Y), _[1]), c(f(a(te, E), -b[1]), f(a(z, I), L[1]))), w[2]), f(c(f(a(Z, j), _[1]), c(f(a(W, P), -b[1]), f(a(z, I), w[1]))), -L[2])))), ye = a(ve, ue);
                  return ye[ye.length - 1];
                };
              }
              function h(c, a, y, f) {
                return function(_, b, w, T, L, A) {
                  var I = c(c(y(_[0], _[0]), y(_[1], _[1])), c(y(_[2], _[2]), y(_[3], _[3]))), P = f(I, b[0]), S = f(I, w[0]), E = f(I, T[0]), R = f(I, L[0]), z = f(I, A[0]), j = c(c(y(b[0], b[0]), y(b[1], b[1])), c(y(b[2], b[2]), y(b[3], b[3]))), H = f(j, _[0]), Y = f(j, w[0]), J = f(j, T[0]), W = f(j, L[0]), Z = f(j, A[0]), re = c(c(y(w[0], w[0]), y(w[1], w[1])), c(y(w[2], w[2]), y(w[3], w[3]))), V = f(re, _[0]), B = f(re, b[0]), U = f(re, T[0]), ee = f(re, L[0]), N = f(re, A[0]), K = c(c(y(T[0], T[0]), y(T[1], T[1])), c(y(T[2], T[2]), y(T[3], T[3]))), X = f(K, _[0]), te = f(K, b[0]), ie = f(K, w[0]), le = f(K, L[0]), oe = f(K, A[0]), ve = c(c(y(L[0], L[0]), y(L[1], L[1])), c(y(L[2], L[2]), y(L[3], L[3]))), ue = f(ve, _[0]), ye = f(ve, b[0]), Ae = f(ve, w[0]), pe = f(ve, T[0]), ge = f(ve, A[0]), we = c(c(y(A[0], A[0]), y(A[1], A[1])), c(y(A[2], A[2]), y(A[3], A[3]))), se = f(we, _[0]), de = f(we, b[0]), Te = f(we, w[0]), Ee = f(we, T[0]), Me = f(we, L[0]), ze = c(c(c(f(c(c(f(c(f(a(Me, ge), T[1]), c(f(a(Ee, oe), -L[1]), f(a(pe, le), A[1]))), w[2]), f(c(f(a(Me, ge), w[1]), c(f(a(Te, N), -L[1]), f(a(Ae, ee), A[1]))), -T[2])), c(f(c(f(a(Ee, oe), w[1]), c(f(a(Te, N), -T[1]), f(a(ie, U), A[1]))), L[2]), f(c(f(a(pe, le), w[1]), c(f(a(Ae, ee), -T[1]), f(a(ie, U), L[1]))), -A[2]))), b[3]), c(f(c(c(f(c(f(a(Me, ge), T[1]), c(f(a(Ee, oe), -L[1]), f(a(pe, le), A[1]))), b[2]), f(c(f(a(Me, ge), b[1]), c(f(a(de, Z), -L[1]), f(a(ye, W), A[1]))), -T[2])), c(f(c(f(a(Ee, oe), b[1]), c(f(a(de, Z), -T[1]), f(a(te, J), A[1]))), L[2]), f(c(f(a(pe, le), b[1]), c(f(a(ye, W), -T[1]), f(a(te, J), L[1]))), -A[2]))), -w[3]), f(c(c(f(c(f(a(Me, ge), w[1]), c(f(a(Te, N), -L[1]), f(a(Ae, ee), A[1]))), b[2]), f(c(f(a(Me, ge), b[1]), c(f(a(de, Z), -L[1]), f(a(ye, W), A[1]))), -w[2])), c(f(c(f(a(Te, N), b[1]), c(f(a(de, Z), -w[1]), f(a(B, Y), A[1]))), L[2]), f(c(f(a(Ae, ee), b[1]), c(f(a(ye, W), -w[1]), f(a(B, Y), L[1]))), -A[2]))), T[3]))), c(c(f(c(c(f(c(f(a(Ee, oe), w[1]), c(f(a(Te, N), -T[1]), f(a(ie, U), A[1]))), b[2]), f(c(f(a(Ee, oe), b[1]), c(f(a(de, Z), -T[1]), f(a(te, J), A[1]))), -w[2])), c(f(c(f(a(Te, N), b[1]), c(f(a(de, Z), -w[1]), f(a(B, Y), A[1]))), T[2]), f(c(f(a(ie, U), b[1]), c(f(a(te, J), -w[1]), f(a(B, Y), T[1]))), -A[2]))), -L[3]), f(c(c(f(c(f(a(pe, le), w[1]), c(f(a(Ae, ee), -T[1]), f(a(ie, U), L[1]))), b[2]), f(c(f(a(pe, le), b[1]), c(f(a(ye, W), -T[1]), f(a(te, J), L[1]))), -w[2])), c(f(c(f(a(Ae, ee), b[1]), c(f(a(ye, W), -w[1]), f(a(B, Y), L[1]))), T[2]), f(c(f(a(ie, U), b[1]), c(f(a(te, J), -w[1]), f(a(B, Y), T[1]))), -L[2]))), A[3])), c(f(c(c(f(c(f(a(Me, ge), T[1]), c(f(a(Ee, oe), -L[1]), f(a(pe, le), A[1]))), b[2]), f(c(f(a(Me, ge), b[1]), c(f(a(de, Z), -L[1]), f(a(ye, W), A[1]))), -T[2])), c(f(c(f(a(Ee, oe), b[1]), c(f(a(de, Z), -T[1]), f(a(te, J), A[1]))), L[2]), f(c(f(a(pe, le), b[1]), c(f(a(ye, W), -T[1]), f(a(te, J), L[1]))), -A[2]))), _[3]), f(c(c(f(c(f(a(Me, ge), T[1]), c(f(a(Ee, oe), -L[1]), f(a(pe, le), A[1]))), _[2]), f(c(f(a(Me, ge), _[1]), c(f(a(se, z), -L[1]), f(a(ue, R), A[1]))), -T[2])), c(f(c(f(a(Ee, oe), _[1]), c(f(a(se, z), -T[1]), f(a(X, E), A[1]))), L[2]), f(c(f(a(pe, le), _[1]), c(f(a(ue, R), -T[1]), f(a(X, E), L[1]))), -A[2]))), -b[3])))), c(c(c(f(c(c(f(c(f(a(Me, ge), b[1]), c(f(a(de, Z), -L[1]), f(a(ye, W), A[1]))), _[2]), f(c(f(a(Me, ge), _[1]), c(f(a(se, z), -L[1]), f(a(ue, R), A[1]))), -b[2])), c(f(c(f(a(de, Z), _[1]), c(f(a(se, z), -b[1]), f(a(H, P), A[1]))), L[2]), f(c(f(a(ye, W), _[1]), c(f(a(ue, R), -b[1]), f(a(H, P), L[1]))), -A[2]))), T[3]), f(c(c(f(c(f(a(Ee, oe), b[1]), c(f(a(de, Z), -T[1]), f(a(te, J), A[1]))), _[2]), f(c(f(a(Ee, oe), _[1]), c(f(a(se, z), -T[1]), f(a(X, E), A[1]))), -b[2])), c(f(c(f(a(de, Z), _[1]), c(f(a(se, z), -b[1]), f(a(H, P), A[1]))), T[2]), f(c(f(a(te, J), _[1]), c(f(a(X, E), -b[1]), f(a(H, P), T[1]))), -A[2]))), -L[3])), c(f(c(c(f(c(f(a(pe, le), b[1]), c(f(a(ye, W), -T[1]), f(a(te, J), L[1]))), _[2]), f(c(f(a(pe, le), _[1]), c(f(a(ue, R), -T[1]), f(a(X, E), L[1]))), -b[2])), c(f(c(f(a(ye, W), _[1]), c(f(a(ue, R), -b[1]), f(a(H, P), L[1]))), T[2]), f(c(f(a(te, J), _[1]), c(f(a(X, E), -b[1]), f(a(H, P), T[1]))), -L[2]))), A[3]), f(c(c(f(c(f(a(Ee, oe), w[1]), c(f(a(Te, N), -T[1]), f(a(ie, U), A[1]))), b[2]), f(c(f(a(Ee, oe), b[1]), c(f(a(de, Z), -T[1]), f(a(te, J), A[1]))), -w[2])), c(f(c(f(a(Te, N), b[1]), c(f(a(de, Z), -w[1]), f(a(B, Y), A[1]))), T[2]), f(c(f(a(ie, U), b[1]), c(f(a(te, J), -w[1]), f(a(B, Y), T[1]))), -A[2]))), _[3]))), c(c(f(c(c(f(c(f(a(Ee, oe), w[1]), c(f(a(Te, N), -T[1]), f(a(ie, U), A[1]))), _[2]), f(c(f(a(Ee, oe), _[1]), c(f(a(se, z), -T[1]), f(a(X, E), A[1]))), -w[2])), c(f(c(f(a(Te, N), _[1]), c(f(a(se, z), -w[1]), f(a(V, S), A[1]))), T[2]), f(c(f(a(ie, U), _[1]), c(f(a(X, E), -w[1]), f(a(V, S), T[1]))), -A[2]))), -b[3]), f(c(c(f(c(f(a(Ee, oe), b[1]), c(f(a(de, Z), -T[1]), f(a(te, J), A[1]))), _[2]), f(c(f(a(Ee, oe), _[1]), c(f(a(se, z), -T[1]), f(a(X, E), A[1]))), -b[2])), c(f(c(f(a(de, Z), _[1]), c(f(a(se, z), -b[1]), f(a(H, P), A[1]))), T[2]), f(c(f(a(te, J), _[1]), c(f(a(X, E), -b[1]), f(a(H, P), T[1]))), -A[2]))), w[3])), c(f(c(c(f(c(f(a(Te, N), b[1]), c(f(a(de, Z), -w[1]), f(a(B, Y), A[1]))), _[2]), f(c(f(a(Te, N), _[1]), c(f(a(se, z), -w[1]), f(a(V, S), A[1]))), -b[2])), c(f(c(f(a(de, Z), _[1]), c(f(a(se, z), -b[1]), f(a(H, P), A[1]))), w[2]), f(c(f(a(B, Y), _[1]), c(f(a(V, S), -b[1]), f(a(H, P), w[1]))), -A[2]))), -T[3]), f(c(c(f(c(f(a(ie, U), b[1]), c(f(a(te, J), -w[1]), f(a(B, Y), T[1]))), _[2]), f(c(f(a(ie, U), _[1]), c(f(a(X, E), -w[1]), f(a(V, S), T[1]))), -b[2])), c(f(c(f(a(te, J), _[1]), c(f(a(X, E), -b[1]), f(a(H, P), T[1]))), w[2]), f(c(f(a(B, Y), _[1]), c(f(a(V, S), -b[1]), f(a(H, P), w[1]))), -T[2]))), A[3]))))), Ie = c(c(c(f(c(c(f(c(f(a(Me, ge), T[1]), c(f(a(Ee, oe), -L[1]), f(a(pe, le), A[1]))), w[2]), f(c(f(a(Me, ge), w[1]), c(f(a(Te, N), -L[1]), f(a(Ae, ee), A[1]))), -T[2])), c(f(c(f(a(Ee, oe), w[1]), c(f(a(Te, N), -T[1]), f(a(ie, U), A[1]))), L[2]), f(c(f(a(pe, le), w[1]), c(f(a(Ae, ee), -T[1]), f(a(ie, U), L[1]))), -A[2]))), _[3]), c(f(c(c(f(c(f(a(Me, ge), T[1]), c(f(a(Ee, oe), -L[1]), f(a(pe, le), A[1]))), _[2]), f(c(f(a(Me, ge), _[1]), c(f(a(se, z), -L[1]), f(a(ue, R), A[1]))), -T[2])), c(f(c(f(a(Ee, oe), _[1]), c(f(a(se, z), -T[1]), f(a(X, E), A[1]))), L[2]), f(c(f(a(pe, le), _[1]), c(f(a(ue, R), -T[1]), f(a(X, E), L[1]))), -A[2]))), -w[3]), f(c(c(f(c(f(a(Me, ge), w[1]), c(f(a(Te, N), -L[1]), f(a(Ae, ee), A[1]))), _[2]), f(c(f(a(Me, ge), _[1]), c(f(a(se, z), -L[1]), f(a(ue, R), A[1]))), -w[2])), c(f(c(f(a(Te, N), _[1]), c(f(a(se, z), -w[1]), f(a(V, S), A[1]))), L[2]), f(c(f(a(Ae, ee), _[1]), c(f(a(ue, R), -w[1]), f(a(V, S), L[1]))), -A[2]))), T[3]))), c(c(f(c(c(f(c(f(a(Ee, oe), w[1]), c(f(a(Te, N), -T[1]), f(a(ie, U), A[1]))), _[2]), f(c(f(a(Ee, oe), _[1]), c(f(a(se, z), -T[1]), f(a(X, E), A[1]))), -w[2])), c(f(c(f(a(Te, N), _[1]), c(f(a(se, z), -w[1]), f(a(V, S), A[1]))), T[2]), f(c(f(a(ie, U), _[1]), c(f(a(X, E), -w[1]), f(a(V, S), T[1]))), -A[2]))), -L[3]), f(c(c(f(c(f(a(pe, le), w[1]), c(f(a(Ae, ee), -T[1]), f(a(ie, U), L[1]))), _[2]), f(c(f(a(pe, le), _[1]), c(f(a(ue, R), -T[1]), f(a(X, E), L[1]))), -w[2])), c(f(c(f(a(Ae, ee), _[1]), c(f(a(ue, R), -w[1]), f(a(V, S), L[1]))), T[2]), f(c(f(a(ie, U), _[1]), c(f(a(X, E), -w[1]), f(a(V, S), T[1]))), -L[2]))), A[3])), c(f(c(c(f(c(f(a(Me, ge), w[1]), c(f(a(Te, N), -L[1]), f(a(Ae, ee), A[1]))), b[2]), f(c(f(a(Me, ge), b[1]), c(f(a(de, Z), -L[1]), f(a(ye, W), A[1]))), -w[2])), c(f(c(f(a(Te, N), b[1]), c(f(a(de, Z), -w[1]), f(a(B, Y), A[1]))), L[2]), f(c(f(a(Ae, ee), b[1]), c(f(a(ye, W), -w[1]), f(a(B, Y), L[1]))), -A[2]))), _[3]), f(c(c(f(c(f(a(Me, ge), w[1]), c(f(a(Te, N), -L[1]), f(a(Ae, ee), A[1]))), _[2]), f(c(f(a(Me, ge), _[1]), c(f(a(se, z), -L[1]), f(a(ue, R), A[1]))), -w[2])), c(f(c(f(a(Te, N), _[1]), c(f(a(se, z), -w[1]), f(a(V, S), A[1]))), L[2]), f(c(f(a(Ae, ee), _[1]), c(f(a(ue, R), -w[1]), f(a(V, S), L[1]))), -A[2]))), -b[3])))), c(c(c(f(c(c(f(c(f(a(Me, ge), b[1]), c(f(a(de, Z), -L[1]), f(a(ye, W), A[1]))), _[2]), f(c(f(a(Me, ge), _[1]), c(f(a(se, z), -L[1]), f(a(ue, R), A[1]))), -b[2])), c(f(c(f(a(de, Z), _[1]), c(f(a(se, z), -b[1]), f(a(H, P), A[1]))), L[2]), f(c(f(a(ye, W), _[1]), c(f(a(ue, R), -b[1]), f(a(H, P), L[1]))), -A[2]))), w[3]), f(c(c(f(c(f(a(Te, N), b[1]), c(f(a(de, Z), -w[1]), f(a(B, Y), A[1]))), _[2]), f(c(f(a(Te, N), _[1]), c(f(a(se, z), -w[1]), f(a(V, S), A[1]))), -b[2])), c(f(c(f(a(de, Z), _[1]), c(f(a(se, z), -b[1]), f(a(H, P), A[1]))), w[2]), f(c(f(a(B, Y), _[1]), c(f(a(V, S), -b[1]), f(a(H, P), w[1]))), -A[2]))), -L[3])), c(f(c(c(f(c(f(a(Ae, ee), b[1]), c(f(a(ye, W), -w[1]), f(a(B, Y), L[1]))), _[2]), f(c(f(a(Ae, ee), _[1]), c(f(a(ue, R), -w[1]), f(a(V, S), L[1]))), -b[2])), c(f(c(f(a(ye, W), _[1]), c(f(a(ue, R), -b[1]), f(a(H, P), L[1]))), w[2]), f(c(f(a(B, Y), _[1]), c(f(a(V, S), -b[1]), f(a(H, P), w[1]))), -L[2]))), A[3]), f(c(c(f(c(f(a(pe, le), w[1]), c(f(a(Ae, ee), -T[1]), f(a(ie, U), L[1]))), b[2]), f(c(f(a(pe, le), b[1]), c(f(a(ye, W), -T[1]), f(a(te, J), L[1]))), -w[2])), c(f(c(f(a(Ae, ee), b[1]), c(f(a(ye, W), -w[1]), f(a(B, Y), L[1]))), T[2]), f(c(f(a(ie, U), b[1]), c(f(a(te, J), -w[1]), f(a(B, Y), T[1]))), -L[2]))), _[3]))), c(c(f(c(c(f(c(f(a(pe, le), w[1]), c(f(a(Ae, ee), -T[1]), f(a(ie, U), L[1]))), _[2]), f(c(f(a(pe, le), _[1]), c(f(a(ue, R), -T[1]), f(a(X, E), L[1]))), -w[2])), c(f(c(f(a(Ae, ee), _[1]), c(f(a(ue, R), -w[1]), f(a(V, S), L[1]))), T[2]), f(c(f(a(ie, U), _[1]), c(f(a(X, E), -w[1]), f(a(V, S), T[1]))), -L[2]))), -b[3]), f(c(c(f(c(f(a(pe, le), b[1]), c(f(a(ye, W), -T[1]), f(a(te, J), L[1]))), _[2]), f(c(f(a(pe, le), _[1]), c(f(a(ue, R), -T[1]), f(a(X, E), L[1]))), -b[2])), c(f(c(f(a(ye, W), _[1]), c(f(a(ue, R), -b[1]), f(a(H, P), L[1]))), T[2]), f(c(f(a(te, J), _[1]), c(f(a(X, E), -b[1]), f(a(H, P), T[1]))), -L[2]))), w[3])), c(f(c(c(f(c(f(a(Ae, ee), b[1]), c(f(a(ye, W), -w[1]), f(a(B, Y), L[1]))), _[2]), f(c(f(a(Ae, ee), _[1]), c(f(a(ue, R), -w[1]), f(a(V, S), L[1]))), -b[2])), c(f(c(f(a(ye, W), _[1]), c(f(a(ue, R), -b[1]), f(a(H, P), L[1]))), w[2]), f(c(f(a(B, Y), _[1]), c(f(a(V, S), -b[1]), f(a(H, P), w[1]))), -L[2]))), -T[3]), f(c(c(f(c(f(a(ie, U), b[1]), c(f(a(te, J), -w[1]), f(a(B, Y), T[1]))), _[2]), f(c(f(a(ie, U), _[1]), c(f(a(X, E), -w[1]), f(a(V, S), T[1]))), -b[2])), c(f(c(f(a(te, J), _[1]), c(f(a(X, E), -b[1]), f(a(H, P), T[1]))), w[2]), f(c(f(a(B, Y), _[1]), c(f(a(V, S), -b[1]), f(a(H, P), w[1]))), -T[2]))), L[3]))))), Oe = a(ze, Ie);
                  return Oe[Oe.length - 1];
                };
              }
              var l = [function() {
                return 0;
              }, function() {
                return 0;
              }, function() {
                return 0;
              }];
              function i(c) {
                var a = l[c.length];
                return a || (a = l[c.length] = t(c.length)), a.apply(void 0, c);
              }
              function p(c, a, y, f, _, b, w, T) {
                return function(L, A, I, P, S, E) {
                  switch (arguments.length) {
                    case 0:
                    case 1:
                      return 0;
                    case 2:
                      return f(L, A);
                    case 3:
                      return _(L, A, I);
                    case 4:
                      return b(L, A, I, P);
                    case 5:
                      return w(L, A, I, P, S);
                    case 6:
                      return T(L, A, I, P, S, E);
                  }
                  for (var R = new Array(arguments.length), z = 0; z < arguments.length; ++z)
                    R[z] = arguments[z];
                  return c(R);
                };
              }
              (function() {
                for (; l.length <= 6; )
                  l.push(t(l.length));
                k.exports = p.apply(void 0, [i].concat(l));
                for (var c = 0; c <= 6; ++c)
                  k.exports[c] = l[c];
              })();
            }, { "robust-scale": 286, "robust-subtract": 288, "robust-sum": 289, "two-product": 306 }], 283: [function(g, k, x) {
              var e = g("robust-determinant");
              function r(l) {
                var i = l === 2 ? n : l === 3 ? s : l === 4 ? t : l === 5 ? d : u;
                return i(l < 6 ? e[l] : e);
              }
              function n(l) {
                return function(i, p) {
                  return [l([[+p[0], +i[0][1]], [+p[1], +i[1][1]]]), l([[+i[0][0], +p[0]], [+i[1][0], +p[1]]]), l(i)];
                };
              }
              function s(l) {
                return function(i, p) {
                  return [l([[+p[0], +i[0][1], +i[0][2]], [+p[1], +i[1][1], +i[1][2]], [+p[2], +i[2][1], +i[2][2]]]), l([[+i[0][0], +p[0], +i[0][2]], [+i[1][0], +p[1], +i[1][2]], [+i[2][0], +p[2], +i[2][2]]]), l([[+i[0][0], +i[0][1], +p[0]], [+i[1][0], +i[1][1], +p[1]], [+i[2][0], +i[2][1], +p[2]]]), l(i)];
                };
              }
              function t(l) {
                return function(i, p) {
                  return [l([[+p[0], +i[0][1], +i[0][2], +i[0][3]], [+p[1], +i[1][1], +i[1][2], +i[1][3]], [+p[2], +i[2][1], +i[2][2], +i[2][3]], [+p[3], +i[3][1], +i[3][2], +i[3][3]]]), l([[+i[0][0], +p[0], +i[0][2], +i[0][3]], [+i[1][0], +p[1], +i[1][2], +i[1][3]], [+i[2][0], +p[2], +i[2][2], +i[2][3]], [+i[3][0], +p[3], +i[3][2], +i[3][3]]]), l([[+i[0][0], +i[0][1], +p[0], +i[0][3]], [+i[1][0], +i[1][1], +p[1], +i[1][3]], [+i[2][0], +i[2][1], +p[2], +i[2][3]], [+i[3][0], +i[3][1], +p[3], +i[3][3]]]), l([[+i[0][0], +i[0][1], +i[0][2], +p[0]], [+i[1][0], +i[1][1], +i[1][2], +p[1]], [+i[2][0], +i[2][1], +i[2][2], +p[2]], [+i[3][0], +i[3][1], +i[3][2], +p[3]]]), l(i)];
                };
              }
              function d(l) {
                return function(i, p) {
                  return [l([[+p[0], +i[0][1], +i[0][2], +i[0][3], +i[0][4]], [+p[1], +i[1][1], +i[1][2], +i[1][3], +i[1][4]], [+p[2], +i[2][1], +i[2][2], +i[2][3], +i[2][4]], [+p[3], +i[3][1], +i[3][2], +i[3][3], +i[3][4]], [+p[4], +i[4][1], +i[4][2], +i[4][3], +i[4][4]]]), l([[+i[0][0], +p[0], +i[0][2], +i[0][3], +i[0][4]], [+i[1][0], +p[1], +i[1][2], +i[1][3], +i[1][4]], [+i[2][0], +p[2], +i[2][2], +i[2][3], +i[2][4]], [+i[3][0], +p[3], +i[3][2], +i[3][3], +i[3][4]], [+i[4][0], +p[4], +i[4][2], +i[4][3], +i[4][4]]]), l([[+i[0][0], +i[0][1], +p[0], +i[0][3], +i[0][4]], [+i[1][0], +i[1][1], +p[1], +i[1][3], +i[1][4]], [+i[2][0], +i[2][1], +p[2], +i[2][3], +i[2][4]], [+i[3][0], +i[3][1], +p[3], +i[3][3], +i[3][4]], [+i[4][0], +i[4][1], +p[4], +i[4][3], +i[4][4]]]), l([[+i[0][0], +i[0][1], +i[0][2], +p[0], +i[0][4]], [+i[1][0], +i[1][1], +i[1][2], +p[1], +i[1][4]], [+i[2][0], +i[2][1], +i[2][2], +p[2], +i[2][4]], [+i[3][0], +i[3][1], +i[3][2], +p[3], +i[3][4]], [+i[4][0], +i[4][1], +i[4][2], +p[4], +i[4][4]]]), l([[+i[0][0], +i[0][1], +i[0][2], +i[0][3], +p[0]], [+i[1][0], +i[1][1], +i[1][2], +i[1][3], +p[1]], [+i[2][0], +i[2][1], +i[2][2], +i[2][3], +p[2]], [+i[3][0], +i[3][1], +i[3][2], +i[3][3], +p[3]], [+i[4][0], +i[4][1], +i[4][2], +i[4][3], +p[4]]]), l(i)];
                };
              }
              function u(l) {
                return function(i, p) {
                  return [l([[+p[0], +i[0][1], +i[0][2], +i[0][3], +i[0][4], +i[0][5]], [+p[1], +i[1][1], +i[1][2], +i[1][3], +i[1][4], +i[1][5]], [+p[2], +i[2][1], +i[2][2], +i[2][3], +i[2][4], +i[2][5]], [+p[3], +i[3][1], +i[3][2], +i[3][3], +i[3][4], +i[3][5]], [+p[4], +i[4][1], +i[4][2], +i[4][3], +i[4][4], +i[4][5]], [+p[5], +i[5][1], +i[5][2], +i[5][3], +i[5][4], +i[5][5]]]), l([[+i[0][0], +p[0], +i[0][2], +i[0][3], +i[0][4], +i[0][5]], [+i[1][0], +p[1], +i[1][2], +i[1][3], +i[1][4], +i[1][5]], [+i[2][0], +p[2], +i[2][2], +i[2][3], +i[2][4], +i[2][5]], [+i[3][0], +p[3], +i[3][2], +i[3][3], +i[3][4], +i[3][5]], [+i[4][0], +p[4], +i[4][2], +i[4][3], +i[4][4], +i[4][5]], [+i[5][0], +p[5], +i[5][2], +i[5][3], +i[5][4], +i[5][5]]]), l([[+i[0][0], +i[0][1], +p[0], +i[0][3], +i[0][4], +i[0][5]], [+i[1][0], +i[1][1], +p[1], +i[1][3], +i[1][4], +i[1][5]], [+i[2][0], +i[2][1], +p[2], +i[2][3], +i[2][4], +i[2][5]], [+i[3][0], +i[3][1], +p[3], +i[3][3], +i[3][4], +i[3][5]], [+i[4][0], +i[4][1], +p[4], +i[4][3], +i[4][4], +i[4][5]], [+i[5][0], +i[5][1], +p[5], +i[5][3], +i[5][4], +i[5][5]]]), l([[+i[0][0], +i[0][1], +i[0][2], +p[0], +i[0][4], +i[0][5]], [+i[1][0], +i[1][1], +i[1][2], +p[1], +i[1][4], +i[1][5]], [+i[2][0], +i[2][1], +i[2][2], +p[2], +i[2][4], +i[2][5]], [+i[3][0], +i[3][1], +i[3][2], +p[3], +i[3][4], +i[3][5]], [+i[4][0], +i[4][1], +i[4][2], +p[4], +i[4][4], +i[4][5]], [+i[5][0], +i[5][1], +i[5][2], +p[5], +i[5][4], +i[5][5]]]), l([[+i[0][0], +i[0][1], +i[0][2], +i[0][3], +p[0], +i[0][5]], [+i[1][0], +i[1][1], +i[1][2], +i[1][3], +p[1], +i[1][5]], [+i[2][0], +i[2][1], +i[2][2], +i[2][3], +p[2], +i[2][5]], [+i[3][0], +i[3][1], +i[3][2], +i[3][3], +p[3], +i[3][5]], [+i[4][0], +i[4][1], +i[4][2], +i[4][3], +p[4], +i[4][5]], [+i[5][0], +i[5][1], +i[5][2], +i[5][3], +p[5], +i[5][5]]]), l([[+i[0][0], +i[0][1], +i[0][2], +i[0][3], +i[0][4], +p[0]], [+i[1][0], +i[1][1], +i[1][2], +i[1][3], +i[1][4], +p[1]], [+i[2][0], +i[2][1], +i[2][2], +i[2][3], +i[2][4], +p[2]], [+i[3][0], +i[3][1], +i[3][2], +i[3][3], +i[3][4], +p[3]], [+i[4][0], +i[4][1], +i[4][2], +i[4][3], +i[4][4], +p[4]], [+i[5][0], +i[5][1], +i[5][2], +i[5][3], +i[5][4], +p[5]]]), l(i)];
                };
              }
              var o = [function() {
                return [[0]];
              }, function(l, i) {
                return [[i[0]], [l[0][0]]];
              }];
              function h(l, i, p, c, a, y, f, _) {
                return function(b, w) {
                  switch (b.length) {
                    case 0:
                      return l(b, w);
                    case 1:
                      return i(b, w);
                    case 2:
                      return p(b, w);
                    case 3:
                      return c(b, w);
                    case 4:
                      return a(b, w);
                    case 5:
                      return y(b, w);
                  }
                  var T = f[b.length];
                  return T || (T = f[b.length] = _(b.length)), T(b, w);
                };
              }
              (function() {
                for (; o.length < 6; )
                  o.push(r(o.length));
                k.exports = h.apply(void 0, o.concat([o, r]));
                for (var l = 0; l < 6; ++l)
                  k.exports[l] = o[l];
              })();
            }, { "robust-determinant": 280 }], 284: [function(g, k, x) {
              var e = g("two-product"), r = g("robust-sum"), n = g("robust-scale"), s = g("robust-subtract");
              function t(a, y, f, _) {
                return function(b, w, T) {
                  var L = a(a(y(w[1], T[0]), y(-T[1], w[0])), a(y(b[1], w[0]), y(-w[1], b[0]))), A = a(y(b[1], T[0]), y(-T[1], b[0])), I = _(L, A);
                  return I[I.length - 1];
                };
              }
              function d(a, y, f, _) {
                return function(b, w, T, L) {
                  var A = a(a(f(a(y(T[1], L[0]), y(-L[1], T[0])), w[2]), a(f(a(y(w[1], L[0]), y(-L[1], w[0])), -T[2]), f(a(y(w[1], T[0]), y(-T[1], w[0])), L[2]))), a(f(a(y(w[1], L[0]), y(-L[1], w[0])), b[2]), a(f(a(y(b[1], L[0]), y(-L[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), L[2])))), I = a(a(f(a(y(T[1], L[0]), y(-L[1], T[0])), b[2]), a(f(a(y(b[1], L[0]), y(-L[1], b[0])), -T[2]), f(a(y(b[1], T[0]), y(-T[1], b[0])), L[2]))), a(f(a(y(w[1], T[0]), y(-T[1], w[0])), b[2]), a(f(a(y(b[1], T[0]), y(-T[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), T[2])))), P = _(A, I);
                  return P[P.length - 1];
                };
              }
              function u(a, y, f, _) {
                return function(b, w, T, L, A) {
                  var I = a(a(a(f(a(f(a(y(L[1], A[0]), y(-A[1], L[0])), T[2]), a(f(a(y(T[1], A[0]), y(-A[1], T[0])), -L[2]), f(a(y(T[1], L[0]), y(-L[1], T[0])), A[2]))), w[3]), a(f(a(f(a(y(L[1], A[0]), y(-A[1], L[0])), w[2]), a(f(a(y(w[1], A[0]), y(-A[1], w[0])), -L[2]), f(a(y(w[1], L[0]), y(-L[1], w[0])), A[2]))), -T[3]), f(a(f(a(y(T[1], A[0]), y(-A[1], T[0])), w[2]), a(f(a(y(w[1], A[0]), y(-A[1], w[0])), -T[2]), f(a(y(w[1], T[0]), y(-T[1], w[0])), A[2]))), L[3]))), a(f(a(f(a(y(T[1], L[0]), y(-L[1], T[0])), w[2]), a(f(a(y(w[1], L[0]), y(-L[1], w[0])), -T[2]), f(a(y(w[1], T[0]), y(-T[1], w[0])), L[2]))), -A[3]), a(f(a(f(a(y(L[1], A[0]), y(-A[1], L[0])), w[2]), a(f(a(y(w[1], A[0]), y(-A[1], w[0])), -L[2]), f(a(y(w[1], L[0]), y(-L[1], w[0])), A[2]))), b[3]), f(a(f(a(y(L[1], A[0]), y(-A[1], L[0])), b[2]), a(f(a(y(b[1], A[0]), y(-A[1], b[0])), -L[2]), f(a(y(b[1], L[0]), y(-L[1], b[0])), A[2]))), -w[3])))), a(a(f(a(f(a(y(w[1], A[0]), y(-A[1], w[0])), b[2]), a(f(a(y(b[1], A[0]), y(-A[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), A[2]))), L[3]), a(f(a(f(a(y(w[1], L[0]), y(-L[1], w[0])), b[2]), a(f(a(y(b[1], L[0]), y(-L[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), L[2]))), -A[3]), f(a(f(a(y(T[1], L[0]), y(-L[1], T[0])), w[2]), a(f(a(y(w[1], L[0]), y(-L[1], w[0])), -T[2]), f(a(y(w[1], T[0]), y(-T[1], w[0])), L[2]))), b[3]))), a(f(a(f(a(y(T[1], L[0]), y(-L[1], T[0])), b[2]), a(f(a(y(b[1], L[0]), y(-L[1], b[0])), -T[2]), f(a(y(b[1], T[0]), y(-T[1], b[0])), L[2]))), -w[3]), a(f(a(f(a(y(w[1], L[0]), y(-L[1], w[0])), b[2]), a(f(a(y(b[1], L[0]), y(-L[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), L[2]))), T[3]), f(a(f(a(y(w[1], T[0]), y(-T[1], w[0])), b[2]), a(f(a(y(b[1], T[0]), y(-T[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), T[2]))), -L[3]))))), P = a(a(a(f(a(f(a(y(L[1], A[0]), y(-A[1], L[0])), T[2]), a(f(a(y(T[1], A[0]), y(-A[1], T[0])), -L[2]), f(a(y(T[1], L[0]), y(-L[1], T[0])), A[2]))), b[3]), f(a(f(a(y(L[1], A[0]), y(-A[1], L[0])), b[2]), a(f(a(y(b[1], A[0]), y(-A[1], b[0])), -L[2]), f(a(y(b[1], L[0]), y(-L[1], b[0])), A[2]))), -T[3])), a(f(a(f(a(y(T[1], A[0]), y(-A[1], T[0])), b[2]), a(f(a(y(b[1], A[0]), y(-A[1], b[0])), -T[2]), f(a(y(b[1], T[0]), y(-T[1], b[0])), A[2]))), L[3]), f(a(f(a(y(T[1], L[0]), y(-L[1], T[0])), b[2]), a(f(a(y(b[1], L[0]), y(-L[1], b[0])), -T[2]), f(a(y(b[1], T[0]), y(-T[1], b[0])), L[2]))), -A[3]))), a(a(f(a(f(a(y(T[1], A[0]), y(-A[1], T[0])), w[2]), a(f(a(y(w[1], A[0]), y(-A[1], w[0])), -T[2]), f(a(y(w[1], T[0]), y(-T[1], w[0])), A[2]))), b[3]), f(a(f(a(y(T[1], A[0]), y(-A[1], T[0])), b[2]), a(f(a(y(b[1], A[0]), y(-A[1], b[0])), -T[2]), f(a(y(b[1], T[0]), y(-T[1], b[0])), A[2]))), -w[3])), a(f(a(f(a(y(w[1], A[0]), y(-A[1], w[0])), b[2]), a(f(a(y(b[1], A[0]), y(-A[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), A[2]))), T[3]), f(a(f(a(y(w[1], T[0]), y(-T[1], w[0])), b[2]), a(f(a(y(b[1], T[0]), y(-T[1], b[0])), -w[2]), f(a(y(b[1], w[0]), y(-w[1], b[0])), T[2]))), -A[3])))), S = _(I, P);
                  return S[S.length - 1];
                };
              }
              function o(a) {
                return (a === 3 ? t : a === 4 ? d : u)(r, e, n, s);
              }
              var h = o(3), l = o(4), i = [function() {
                return 0;
              }, function() {
                return 0;
              }, function(a, y) {
                return y[0] - a[0];
              }, function(a, y, f) {
                var _, b = (a[1] - f[1]) * (y[0] - f[0]), w = (a[0] - f[0]) * (y[1] - f[1]), T = b - w;
                if (b > 0) {
                  if (w <= 0)
                    return T;
                  _ = b + w;
                } else {
                  if (!(b < 0) || w >= 0)
                    return T;
                  _ = -(b + w);
                }
                var L = 33306690738754716e-32 * _;
                return T >= L || T <= -L ? T : h(a, y, f);
              }, function(a, y, f, _) {
                var b = a[0] - _[0], w = y[0] - _[0], T = f[0] - _[0], L = a[1] - _[1], A = y[1] - _[1], I = f[1] - _[1], P = a[2] - _[2], S = y[2] - _[2], E = f[2] - _[2], R = w * I, z = T * A, j = T * L, H = b * I, Y = b * A, J = w * L, W = P * (R - z) + S * (j - H) + E * (Y - J), Z = 7771561172376103e-31 * ((Math.abs(R) + Math.abs(z)) * Math.abs(P) + (Math.abs(j) + Math.abs(H)) * Math.abs(S) + (Math.abs(Y) + Math.abs(J)) * Math.abs(E));
                return W > Z || -W > Z ? W : l(a, y, f, _);
              }];
              function p(a) {
                var y = i[a.length];
                return y || (y = i[a.length] = o(a.length)), y.apply(void 0, a);
              }
              function c(a, y, f, _, b, w, T) {
                return function(L, A, I, P, S) {
                  switch (arguments.length) {
                    case 0:
                    case 1:
                      return 0;
                    case 2:
                      return _(L, A);
                    case 3:
                      return b(L, A, I);
                    case 4:
                      return w(L, A, I, P);
                    case 5:
                      return T(L, A, I, P, S);
                  }
                  for (var E = new Array(arguments.length), R = 0; R < arguments.length; ++R)
                    E[R] = arguments[R];
                  return a(E);
                };
              }
              (function() {
                for (; i.length <= 5; )
                  i.push(o(i.length));
                k.exports = c.apply(void 0, [p].concat(i));
                for (var a = 0; a <= 5; ++a)
                  k.exports[a] = i[a];
              })();
            }, { "robust-scale": 286, "robust-subtract": 288, "robust-sum": 289, "two-product": 306 }], 285: [function(g, k, x) {
              var e = g("robust-sum"), r = g("robust-scale");
              k.exports = function(n, s) {
                if (n.length === 1)
                  return r(s, n[0]);
                if (s.length === 1)
                  return r(n, s[0]);
                if (n.length === 0 || s.length === 0)
                  return [0];
                var t = [0];
                if (n.length < s.length)
                  for (var d = 0; d < n.length; ++d)
                    t = e(t, r(s, n[d]));
                else
                  for (d = 0; d < s.length; ++d)
                    t = e(t, r(n, s[d]));
                return t;
              };
            }, { "robust-scale": 286, "robust-sum": 289 }], 286: [function(g, k, x) {
              var e = g("two-product"), r = g("two-sum");
              k.exports = function(n, s) {
                var t = n.length;
                if (t === 1) {
                  var d = e(n[0], s);
                  return d[0] ? d : [d[1]];
                }
                var u = new Array(2 * t), o = [0.1, 0.1], h = [0.1, 0.1], l = 0;
                e(n[0], s, o), o[0] && (u[l++] = o[0]);
                for (var i = 1; i < t; ++i) {
                  e(n[i], s, h);
                  var p = o[1];
                  r(p, h[0], o), o[0] && (u[l++] = o[0]);
                  var c = h[1], a = o[1], y = c + a, f = a - (y - c);
                  o[1] = y, f && (u[l++] = f);
                }
                return o[1] && (u[l++] = o[1]), l === 0 && (u[l++] = 0), u.length = l, u;
              };
            }, { "two-product": 306, "two-sum": 307 }], 287: [function(g, k, x) {
              k.exports = function(r, n, s, t) {
                var d = e(r, s, t), u = e(n, s, t);
                if (d > 0 && u > 0 || d < 0 && u < 0)
                  return !1;
                var o = e(s, r, n), h = e(t, r, n);
                return o > 0 && h > 0 || o < 0 && h < 0 ? !1 : d === 0 && u === 0 && o === 0 && h === 0 ? function(l, i, p, c) {
                  for (var a = 0; a < 2; ++a) {
                    var y = l[a], f = i[a], _ = Math.min(y, f), b = Math.max(y, f), w = p[a], T = c[a], L = Math.min(w, T);
                    if (Math.max(w, T) < _ || b < L)
                      return !1;
                  }
                  return !0;
                }(r, n, s, t) : !0;
              };
              var e = g("robust-orientation")[3];
            }, { "robust-orientation": 284 }], 288: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = 0 | e.length, s = 0 | r.length;
                if (n === 1 && s === 1)
                  return function(I, P) {
                    var S = I + P, E = S - I, R = I - (S - E) + (P - E);
                    return R ? [R, S] : [S];
                  }(e[0], -r[0]);
                var t, d, u = new Array(n + s), o = 0, h = 0, l = 0, i = Math.abs, p = e[h], c = i(p), a = -r[l], y = i(a);
                c < y ? (d = p, (h += 1) < n && (p = e[h], c = i(p))) : (d = a, (l += 1) < s && (a = -r[l], y = i(a))), h < n && c < y || l >= s ? (t = p, (h += 1) < n && (p = e[h], c = i(p))) : (t = a, (l += 1) < s && (a = -r[l], y = i(a)));
                for (var f, _, b = t + d, w = b - t, T = d - w, L = T, A = b; h < n && l < s; )
                  c < y ? (t = p, (h += 1) < n && (p = e[h], c = i(p))) : (t = a, (l += 1) < s && (a = -r[l], y = i(a))), (T = (d = L) - (w = (b = t + d) - t)) && (u[o++] = T), L = A - ((f = A + b) - (_ = f - A)) + (b - _), A = f;
                for (; h < n; )
                  (T = (d = L) - (w = (b = (t = p) + d) - t)) && (u[o++] = T), L = A - ((f = A + b) - (_ = f - A)) + (b - _), A = f, (h += 1) < n && (p = e[h]);
                for (; l < s; )
                  (T = (d = L) - (w = (b = (t = a) + d) - t)) && (u[o++] = T), L = A - ((f = A + b) - (_ = f - A)) + (b - _), A = f, (l += 1) < s && (a = -r[l]);
                return L && (u[o++] = L), A && (u[o++] = A), o || (u[o++] = 0), u.length = o, u;
              };
            }, {}], 289: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = 0 | e.length, s = 0 | r.length;
                if (n === 1 && s === 1)
                  return function(I, P) {
                    var S = I + P, E = S - I, R = I - (S - E) + (P - E);
                    return R ? [R, S] : [S];
                  }(e[0], r[0]);
                var t, d, u = new Array(n + s), o = 0, h = 0, l = 0, i = Math.abs, p = e[h], c = i(p), a = r[l], y = i(a);
                c < y ? (d = p, (h += 1) < n && (p = e[h], c = i(p))) : (d = a, (l += 1) < s && (a = r[l], y = i(a))), h < n && c < y || l >= s ? (t = p, (h += 1) < n && (p = e[h], c = i(p))) : (t = a, (l += 1) < s && (a = r[l], y = i(a)));
                for (var f, _, b = t + d, w = b - t, T = d - w, L = T, A = b; h < n && l < s; )
                  c < y ? (t = p, (h += 1) < n && (p = e[h], c = i(p))) : (t = a, (l += 1) < s && (a = r[l], y = i(a))), (T = (d = L) - (w = (b = t + d) - t)) && (u[o++] = T), L = A - ((f = A + b) - (_ = f - A)) + (b - _), A = f;
                for (; h < n; )
                  (T = (d = L) - (w = (b = (t = p) + d) - t)) && (u[o++] = T), L = A - ((f = A + b) - (_ = f - A)) + (b - _), A = f, (h += 1) < n && (p = e[h]);
                for (; l < s; )
                  (T = (d = L) - (w = (b = (t = a) + d) - t)) && (u[o++] = T), L = A - ((f = A + b) - (_ = f - A)) + (b - _), A = f, (l += 1) < s && (a = r[l]);
                return L && (u[o++] = L), A && (u[o++] = A), o || (u[o++] = 0), u.length = o, u;
              };
            }, {}], 290: [function(g, k, x) {
              k.exports = function(n) {
                return r(e(n));
              };
              var e = g("boundary-cells"), r = g("reduce-simplicial-complex");
            }, { "boundary-cells": 34, "reduce-simplicial-complex": 276 }], 291: [function(g, k, x) {
              k.exports = function(t, d, u, o) {
                if (u = u || 0, o === void 0 && (o = function(f) {
                  for (var _ = f.length, b = 0, w = 0; w < _; ++w)
                    b = 0 | Math.max(b, f[w].length);
                  return b - 1;
                }(t)), t.length === 0 || o < 1)
                  return { cells: [], vertexIds: [], vertexWeights: [] };
                var h = function(f, _) {
                  for (var b = f.length, w = r.mallocUint8(b), T = 0; T < b; ++T)
                    w[T] = f[T] < _ | 0;
                  return w;
                }(d, +u), l = function(f, _) {
                  for (var b = f.length, w = _ * (_ + 1) / 2 * b | 0, T = r.mallocUint32(2 * w), L = 0, A = 0; A < b; ++A)
                    for (var I = f[A], P = (_ = I.length, 0); P < _; ++P)
                      for (var S = 0; S < P; ++S) {
                        var E = I[S], R = I[P];
                        T[L++] = 0 | Math.min(E, R), T[L++] = 0 | Math.max(E, R);
                      }
                  n(e(T, [L / 2 | 0, 2]));
                  var z = 2;
                  for (A = 2; A < L; A += 2)
                    T[A - 2] === T[A] && T[A - 1] === T[A + 1] || (T[z++] = T[A], T[z++] = T[A + 1]);
                  return e(T, [z / 2 | 0, 2]);
                }(t, o), i = function(f, _, b, w) {
                  for (var T = f.data, L = f.shape[0], A = r.mallocDouble(L), I = 0, P = 0; P < L; ++P) {
                    var S = T[2 * P], E = T[2 * P + 1];
                    if (b[S] !== b[E]) {
                      var R = _[S], z = _[E];
                      T[2 * I] = S, T[2 * I + 1] = E, A[I++] = (z - w) / (z - R);
                    }
                  }
                  return f.shape[0] = I, e(A, [I]);
                }(l, d, h, +u), p = function(f, _) {
                  var b = r.mallocInt32(2 * _), w = f.shape[0], T = f.data;
                  b[0] = 0;
                  for (var L = 0, A = 0; A < w; ++A) {
                    var I = T[2 * A];
                    if (I !== L) {
                      for (b[2 * L + 1] = A; ++L < I; )
                        b[2 * L] = A, b[2 * L + 1] = A;
                      b[2 * L] = A;
                    }
                  }
                  for (b[2 * L + 1] = w; ++L < _; )
                    b[2 * L] = b[2 * L + 1] = w;
                  return b;
                }(l, 0 | d.length), c = s(o)(t, l.data, p, h), a = function(f) {
                  for (var _ = 0 | f.shape[0], b = f.data, w = new Array(_), T = 0; T < _; ++T)
                    w[T] = [b[2 * T], b[2 * T + 1]];
                  return w;
                }(l), y = [].slice.call(i.data, 0, i.shape[0]);
                return r.free(h), r.free(l.data), r.free(i.data), r.free(p), { cells: c, vertexIds: a, vertexWeights: y };
              };
              var e = g("ndarray"), r = g("typedarray-pool"), n = g("ndarray-sort"), s = g("./lib/codegen");
            }, { "./lib/codegen": 292, ndarray: 259, "ndarray-sort": 258, "typedarray-pool": 308 }], 292: [function(g, k, x) {
              k.exports = function(r) {
                return e[r]();
              };
              var e = [function() {
                return function(r, n, s, t) {
                  for (var d = r.length, u = 0; u < d; ++u)
                    r[u].length;
                  return [];
                };
              }, function() {
                function r(n, s, t, d) {
                  for (var u = 0 | Math.min(t, d), o = 0 | Math.max(t, d), h = n[2 * u], l = n[2 * u + 1]; h < l; ) {
                    var i = h + l >> 1, p = s[2 * i + 1];
                    if (p === o)
                      return i;
                    o < p ? l = i : h = i + 1;
                  }
                  return h;
                }
                return function(n, s, t, d) {
                  for (var u = n.length, o = [], h = 0; h < u; ++h) {
                    var l = n[h];
                    if (l.length === 2) {
                      var i = (d[l[0]] << 0) + (d[l[1]] << 1);
                      if (i === 0 || i === 3)
                        continue;
                      switch (i) {
                        case 0:
                          break;
                        case 1:
                          o.push([r(t, s, l[0], l[1])]);
                          break;
                        case 2:
                          o.push([r(t, s, l[1], l[0])]);
                      }
                    }
                  }
                  return o;
                };
              }, function() {
                function r(n, s, t, d) {
                  for (var u = 0 | Math.min(t, d), o = 0 | Math.max(t, d), h = n[2 * u], l = n[2 * u + 1]; h < l; ) {
                    var i = h + l >> 1, p = s[2 * i + 1];
                    if (p === o)
                      return i;
                    o < p ? l = i : h = i + 1;
                  }
                  return h;
                }
                return function(n, s, t, d) {
                  for (var u = n.length, o = [], h = 0; h < u; ++h) {
                    var l = n[h], i = l.length;
                    if (i === 3) {
                      if ((p = (d[l[0]] << 0) + (d[l[1]] << 1) + (d[l[2]] << 2)) === 0 || p === 7)
                        continue;
                      switch (p) {
                        case 0:
                          break;
                        case 1:
                          o.push([r(t, s, l[0], l[2]), r(t, s, l[0], l[1])]);
                          break;
                        case 2:
                          o.push([r(t, s, l[1], l[0]), r(t, s, l[1], l[2])]);
                          break;
                        case 3:
                          o.push([r(t, s, l[0], l[2]), r(t, s, l[1], l[2])]);
                          break;
                        case 4:
                          o.push([r(t, s, l[2], l[1]), r(t, s, l[2], l[0])]);
                          break;
                        case 5:
                          o.push([r(t, s, l[2], l[1]), r(t, s, l[0], l[1])]);
                          break;
                        case 6:
                          o.push([r(t, s, l[1], l[0]), r(t, s, l[2], l[0])]);
                      }
                    } else if (i === 2) {
                      var p;
                      if ((p = (d[l[0]] << 0) + (d[l[1]] << 1)) === 0 || p === 3)
                        continue;
                      switch (p) {
                        case 0:
                          break;
                        case 1:
                          o.push([r(t, s, l[0], l[1])]);
                          break;
                        case 2:
                          o.push([r(t, s, l[1], l[0])]);
                      }
                    }
                  }
                  return o;
                };
              }, function() {
                function r(n, s, t, d) {
                  for (var u = 0 | Math.min(t, d), o = 0 | Math.max(t, d), h = n[2 * u], l = n[2 * u + 1]; h < l; ) {
                    var i = h + l >> 1, p = s[2 * i + 1];
                    if (p === o)
                      return i;
                    o < p ? l = i : h = i + 1;
                  }
                  return h;
                }
                return function(n, s, t, d) {
                  for (var u = n.length, o = [], h = 0; h < u; ++h) {
                    var l = n[h], i = l.length;
                    if (i === 4) {
                      if ((p = (d[l[0]] << 0) + (d[l[1]] << 1) + (d[l[2]] << 2) + (d[l[3]] << 3)) === 0 || p === 15)
                        continue;
                      switch (p) {
                        case 0:
                          break;
                        case 1:
                          o.push([r(t, s, l[0], l[1]), r(t, s, l[0], l[2]), r(t, s, l[0], l[3])]);
                          break;
                        case 2:
                          o.push([r(t, s, l[1], l[2]), r(t, s, l[1], l[0]), r(t, s, l[1], l[3])]);
                          break;
                        case 3:
                          o.push([r(t, s, l[1], l[2]), r(t, s, l[0], l[2]), r(t, s, l[0], l[3])], [r(t, s, l[1], l[3]), r(t, s, l[1], l[2]), r(t, s, l[0], l[3])]);
                          break;
                        case 4:
                          o.push([r(t, s, l[2], l[0]), r(t, s, l[2], l[1]), r(t, s, l[2], l[3])]);
                          break;
                        case 5:
                          o.push([r(t, s, l[0], l[1]), r(t, s, l[2], l[1]), r(t, s, l[0], l[3])], [r(t, s, l[2], l[1]), r(t, s, l[2], l[3]), r(t, s, l[0], l[3])]);
                          break;
                        case 6:
                          o.push([r(t, s, l[2], l[0]), r(t, s, l[1], l[0]), r(t, s, l[1], l[3])], [r(t, s, l[2], l[3]), r(t, s, l[2], l[0]), r(t, s, l[1], l[3])]);
                          break;
                        case 7:
                          o.push([r(t, s, l[0], l[3]), r(t, s, l[1], l[3]), r(t, s, l[2], l[3])]);
                          break;
                        case 8:
                          o.push([r(t, s, l[3], l[1]), r(t, s, l[3], l[0]), r(t, s, l[3], l[2])]);
                          break;
                        case 9:
                          o.push([r(t, s, l[3], l[1]), r(t, s, l[0], l[1]), r(t, s, l[0], l[2])], [r(t, s, l[3], l[2]), r(t, s, l[3], l[1]), r(t, s, l[0], l[2])]);
                          break;
                        case 10:
                          o.push([r(t, s, l[1], l[0]), r(t, s, l[3], l[0]), r(t, s, l[1], l[2])], [r(t, s, l[3], l[0]), r(t, s, l[3], l[2]), r(t, s, l[1], l[2])]);
                          break;
                        case 11:
                          o.push([r(t, s, l[1], l[2]), r(t, s, l[0], l[2]), r(t, s, l[3], l[2])]);
                          break;
                        case 12:
                          o.push([r(t, s, l[3], l[0]), r(t, s, l[2], l[0]), r(t, s, l[2], l[1])], [r(t, s, l[3], l[1]), r(t, s, l[3], l[0]), r(t, s, l[2], l[1])]);
                          break;
                        case 13:
                          o.push([r(t, s, l[0], l[1]), r(t, s, l[2], l[1]), r(t, s, l[3], l[1])]);
                          break;
                        case 14:
                          o.push([r(t, s, l[2], l[0]), r(t, s, l[1], l[0]), r(t, s, l[3], l[0])]);
                      }
                    } else if (i === 3) {
                      if ((p = (d[l[0]] << 0) + (d[l[1]] << 1) + (d[l[2]] << 2)) === 0 || p === 7)
                        continue;
                      switch (p) {
                        case 0:
                          break;
                        case 1:
                          o.push([r(t, s, l[0], l[2]), r(t, s, l[0], l[1])]);
                          break;
                        case 2:
                          o.push([r(t, s, l[1], l[0]), r(t, s, l[1], l[2])]);
                          break;
                        case 3:
                          o.push([r(t, s, l[0], l[2]), r(t, s, l[1], l[2])]);
                          break;
                        case 4:
                          o.push([r(t, s, l[2], l[1]), r(t, s, l[2], l[0])]);
                          break;
                        case 5:
                          o.push([r(t, s, l[2], l[1]), r(t, s, l[0], l[1])]);
                          break;
                        case 6:
                          o.push([r(t, s, l[1], l[0]), r(t, s, l[2], l[0])]);
                      }
                    } else if (i === 2) {
                      var p;
                      if ((p = (d[l[0]] << 0) + (d[l[1]] << 1)) === 0 || p === 3)
                        continue;
                      switch (p) {
                        case 0:
                          break;
                        case 1:
                          o.push([r(t, s, l[0], l[1])]);
                          break;
                        case 2:
                          o.push([r(t, s, l[1], l[0])]);
                      }
                    }
                  }
                  return o;
                };
              }];
            }, {}], 293: [function(g, k, x) {
              var e = g("bit-twiddle"), r = g("union-find");
              function n(l, i) {
                var p = l.length, c = l.length - i.length, a = Math.min;
                if (c)
                  return c;
                switch (p) {
                  case 0:
                    return 0;
                  case 1:
                    return l[0] - i[0];
                  case 2:
                    return (_ = l[0] + l[1] - i[0] - i[1]) || a(l[0], l[1]) - a(i[0], i[1]);
                  case 3:
                    var y = l[0] + l[1], f = i[0] + i[1];
                    if (_ = y + l[2] - (f + i[2]))
                      return _;
                    var _, b = a(l[0], l[1]), w = a(i[0], i[1]);
                    return (_ = a(b, l[2]) - a(w, i[2])) || a(b + l[2], y) - a(w + i[2], f);
                  default:
                    var T = l.slice(0);
                    T.sort();
                    var L = i.slice(0);
                    L.sort();
                    for (var A = 0; A < p; ++A)
                      if (c = T[A] - L[A])
                        return c;
                    return 0;
                }
              }
              function s(l, i) {
                return n(l[0], i[0]);
              }
              function t(l, i) {
                if (i) {
                  for (var p = l.length, c = new Array(p), a = 0; a < p; ++a)
                    c[a] = [l[a], i[a]];
                  for (c.sort(s), a = 0; a < p; ++a)
                    l[a] = c[a][0], i[a] = c[a][1];
                  return l;
                }
                return l.sort(n), l;
              }
              function d(l) {
                if (l.length === 0)
                  return [];
                for (var i = 1, p = l.length, c = 1; c < p; ++c) {
                  var a = l[c];
                  if (n(a, l[c - 1])) {
                    if (c === i) {
                      i++;
                      continue;
                    }
                    l[i++] = a;
                  }
                }
                return l.length = i, l;
              }
              function u(l, i) {
                for (var p = 0, c = l.length - 1, a = -1; p <= c; ) {
                  var y = p + c >> 1, f = n(l[y], i);
                  f <= 0 ? (f === 0 && (a = y), p = y + 1) : f > 0 && (c = y - 1);
                }
                return a;
              }
              function o(l, i) {
                for (var p = new Array(l.length), c = 0, a = p.length; c < a; ++c)
                  p[c] = [];
                for (var y = [], f = (c = 0, i.length); c < f; ++c)
                  for (var _ = i[c], b = _.length, w = 1, T = 1 << b; w < T; ++w) {
                    y.length = e.popCount(w);
                    for (var L = 0, A = 0; A < b; ++A)
                      w & 1 << A && (y[L++] = _[A]);
                    var I = u(l, y);
                    if (!(I < 0))
                      for (; p[I++].push(c), !(I >= l.length || n(l[I], y) !== 0); )
                        ;
                  }
                return p;
              }
              function h(l, i) {
                if (i < 0)
                  return [];
                for (var p = [], c = (1 << i + 1) - 1, a = 0; a < l.length; ++a)
                  for (var y = l[a], f = c; f < 1 << y.length; f = e.nextCombination(f)) {
                    for (var _ = new Array(i + 1), b = 0, w = 0; w < y.length; ++w)
                      f & 1 << w && (_[b++] = y[w]);
                    p.push(_);
                  }
                return t(p);
              }
              x.dimension = function(l) {
                for (var i = 0, p = Math.max, c = 0, a = l.length; c < a; ++c)
                  i = p(i, l[c].length);
                return i - 1;
              }, x.countVertices = function(l) {
                for (var i = -1, p = Math.max, c = 0, a = l.length; c < a; ++c)
                  for (var y = l[c], f = 0, _ = y.length; f < _; ++f)
                    i = p(i, y[f]);
                return i + 1;
              }, x.cloneCells = function(l) {
                for (var i = new Array(l.length), p = 0, c = l.length; p < c; ++p)
                  i[p] = l[p].slice(0);
                return i;
              }, x.compareCells = n, x.normalize = t, x.unique = d, x.findCell = u, x.incidence = o, x.dual = function(l, i) {
                if (!i)
                  return o(d(h(l, 0)), l);
                for (var p = new Array(i), c = 0; c < i; ++c)
                  p[c] = [];
                c = 0;
                for (var a = l.length; c < a; ++c)
                  for (var y = l[c], f = 0, _ = y.length; f < _; ++f)
                    p[y[f]].push(c);
                return p;
              }, x.explode = function(l) {
                for (var i = [], p = 0, c = l.length; p < c; ++p)
                  for (var a = l[p], y = 0 | a.length, f = 1, _ = 1 << y; f < _; ++f) {
                    for (var b = [], w = 0; w < y; ++w)
                      f >>> w & 1 && b.push(a[w]);
                    i.push(b);
                  }
                return t(i);
              }, x.skeleton = h, x.boundary = function(l) {
                for (var i = [], p = 0, c = l.length; p < c; ++p)
                  for (var a = l[p], y = 0, f = a.length; y < f; ++y) {
                    for (var _ = new Array(a.length - 1), b = 0, w = 0; b < f; ++b)
                      b !== y && (_[w++] = a[b]);
                    i.push(_);
                  }
                return t(i);
              }, x.connectedComponents = function(l, i) {
                return i ? function(p, c) {
                  for (var a = new r(c), y = 0; y < p.length; ++y)
                    for (var f = p[y], _ = 0; _ < f.length; ++_)
                      for (var b = _ + 1; b < f.length; ++b)
                        a.link(f[_], f[b]);
                  var w = [], T = a.ranks;
                  for (y = 0; y < T.length; ++y)
                    T[y] = -1;
                  for (y = 0; y < p.length; ++y) {
                    var L = a.find(p[y][0]);
                    T[L] < 0 ? (T[L] = w.length, w.push([p[y].slice(0)])) : w[T[L]].push(p[y].slice(0));
                  }
                  return w;
                }(l, i) : function(p) {
                  for (var c = d(t(h(p, 0))), a = new r(c.length), y = 0; y < p.length; ++y)
                    for (var f = p[y], _ = 0; _ < f.length; ++_)
                      for (var b = u(c, [f[_]]), w = _ + 1; w < f.length; ++w)
                        a.link(b, u(c, [f[w]]));
                  var T = [], L = a.ranks;
                  for (y = 0; y < L.length; ++y)
                    L[y] = -1;
                  for (y = 0; y < p.length; ++y) {
                    var A = a.find(u(c, [p[y][0]]));
                    L[A] < 0 ? (L[A] = T.length, T.push([p[y].slice(0)])) : T[L[A]].push(p[y].slice(0));
                  }
                  return T;
                }(l);
              };
            }, { "bit-twiddle": 32, "union-find": 309 }], 294: [function(g, k, x) {
              arguments[4][32][0].apply(x, arguments);
            }, { dup: 32 }], 295: [function(g, k, x) {
              arguments[4][293][0].apply(x, arguments);
            }, { "bit-twiddle": 294, dup: 293, "union-find": 296 }], 296: [function(g, k, x) {
              function e(r) {
                this.roots = new Array(r), this.ranks = new Array(r);
                for (var n = 0; n < r; ++n)
                  this.roots[n] = n, this.ranks[n] = 0;
              }
              k.exports = e, e.prototype.length = function() {
                return this.roots.length;
              }, e.prototype.makeSet = function() {
                var r = this.roots.length;
                return this.roots.push(r), this.ranks.push(0), r;
              }, e.prototype.find = function(r) {
                for (var n = this.roots; n[r] !== r; ) {
                  var s = n[r];
                  n[r] = n[s], r = s;
                }
                return r;
              }, e.prototype.link = function(r, n) {
                var s = this.find(r), t = this.find(n);
                if (s !== t) {
                  var d = this.ranks, u = this.roots, o = d[s], h = d[t];
                  o < h ? u[s] = t : h < o ? u[t] = s : (u[t] = s, ++d[s]);
                }
              };
            }, {}], 297: [function(g, k, x) {
              k.exports = function(n, s, t) {
                for (var d = s.length, u = n.length, o = new Array(d), h = new Array(d), l = new Array(d), i = new Array(d), p = 0; p < d; ++p)
                  o[p] = h[p] = -1, l[p] = 1 / 0, i[p] = !1;
                for (p = 0; p < u; ++p) {
                  var c = n[p];
                  if (c.length !== 2)
                    throw new Error("Input must be a graph");
                  var a = c[1], y = c[0];
                  h[y] !== -1 ? h[y] = -2 : h[y] = a, o[a] !== -1 ? o[a] = -2 : o[a] = y;
                }
                function f(J) {
                  if (i[J])
                    return 1 / 0;
                  var W, Z, re, V, B, U = o[J], ee = h[J];
                  return U < 0 || ee < 0 ? 1 / 0 : (W = s[J], Z = s[U], re = s[ee], V = Math.abs(e(W, Z, re)), B = Math.sqrt(Math.pow(Z[0] - re[0], 2) + Math.pow(Z[1] - re[1], 2)), V / B);
                }
                function _(J, W) {
                  var Z = S[J], re = S[W];
                  S[J] = re, S[W] = Z, E[Z] = W, E[re] = J;
                }
                function b(J) {
                  return l[S[J]];
                }
                function w(J) {
                  return 1 & J ? J - 1 >> 1 : (J >> 1) - 1;
                }
                function T(J) {
                  for (var W = b(J); ; ) {
                    var Z = W, re = 2 * J + 1, V = 2 * (J + 1), B = J;
                    if (re < R) {
                      var U = b(re);
                      U < Z && (B = re, Z = U);
                    }
                    if (V < R && b(V) < Z && (B = V), B === J)
                      return J;
                    _(J, B), J = B;
                  }
                }
                function L(J) {
                  for (var W = b(J); J > 0; ) {
                    var Z = w(J);
                    if (Z >= 0 && W < b(Z)) {
                      _(J, Z), J = Z;
                      continue;
                    }
                    return J;
                  }
                }
                function A() {
                  if (R > 0) {
                    var J = S[0];
                    return _(0, R - 1), R -= 1, T(0), J;
                  }
                  return -1;
                }
                function I(J, W) {
                  var Z = S[J];
                  return l[Z] === W ? J : (l[Z] = -1 / 0, L(J), A(), l[Z] = W, L((R += 1) - 1));
                }
                function P(J) {
                  if (!i[J]) {
                    i[J] = !0;
                    var W = o[J], Z = h[J];
                    o[Z] >= 0 && (o[Z] = W), h[W] >= 0 && (h[W] = Z), E[W] >= 0 && I(E[W], f(W)), E[Z] >= 0 && I(E[Z], f(Z));
                  }
                }
                var S = [], E = new Array(d);
                for (p = 0; p < d; ++p)
                  (l[p] = f(p)) < 1 / 0 ? (E[p] = S.length, S.push(p)) : E[p] = -1;
                var R = S.length;
                for (p = R >> 1; p >= 0; --p)
                  T(p);
                for (; ; ) {
                  var z = A();
                  if (z < 0 || l[z] > t)
                    break;
                  P(z);
                }
                var j = [];
                for (p = 0; p < d; ++p)
                  i[p] || (E[p] = j.length, j.push(s[p].slice()));
                j.length;
                function H(J, W) {
                  if (J[W] < 0)
                    return W;
                  var Z = W, re = W;
                  do {
                    var V = J[re];
                    if (!i[re] || V < 0 || V === re || (V = J[re = V], !i[re] || V < 0 || V === re))
                      break;
                    re = V, Z = J[Z];
                  } while (Z !== re);
                  for (var B = W; B !== re; B = J[B])
                    J[B] = re;
                  return re;
                }
                var Y = [];
                return n.forEach(function(J) {
                  var W = H(o, J[0]), Z = H(h, J[1]);
                  if (W >= 0 && Z >= 0 && W !== Z) {
                    var re = E[W], V = E[Z];
                    re !== V && Y.push([re, V]);
                  }
                }), r.unique(r.normalize(Y)), { positions: j, edges: Y };
              };
              var e = g("robust-orientation"), r = g("simplicial-complex");
            }, { "robust-orientation": 284, "simplicial-complex": 295 }], 298: [function(g, k, x) {
              k.exports = function(n, s) {
                var t, d, u, o;
                if (s[0][0] < s[1][0])
                  t = s[0], d = s[1];
                else {
                  if (!(s[0][0] > s[1][0]))
                    return r(s, n);
                  t = s[1], d = s[0];
                }
                if (n[0][0] < n[1][0])
                  u = n[0], o = n[1];
                else {
                  if (!(n[0][0] > n[1][0]))
                    return -r(n, s);
                  u = n[1], o = n[0];
                }
                var h = e(t, d, o), l = e(t, d, u);
                if (h < 0) {
                  if (l <= 0)
                    return h;
                } else if (h > 0) {
                  if (l >= 0)
                    return h;
                } else if (l)
                  return l;
                if (h = e(o, u, d), l = e(o, u, t), h < 0) {
                  if (l <= 0)
                    return h;
                } else if (h > 0) {
                  if (l >= 0)
                    return h;
                } else if (l)
                  return l;
                return d[0] - o[0];
              };
              var e = g("robust-orientation");
              function r(n, s) {
                var t, d, u, o;
                if (s[0][0] < s[1][0])
                  t = s[0], d = s[1];
                else {
                  if (!(s[0][0] > s[1][0])) {
                    var h = Math.min(n[0][1], n[1][1]), l = Math.max(n[0][1], n[1][1]), i = Math.min(s[0][1], s[1][1]), p = Math.max(s[0][1], s[1][1]);
                    return l < i ? l - i : h > p ? h - p : l - p;
                  }
                  t = s[1], d = s[0];
                }
                n[0][1] < n[1][1] ? (u = n[0], o = n[1]) : (u = n[1], o = n[0]);
                var c = e(d, t, u);
                return c || (c = e(d, t, o)) || o - d;
              }
            }, { "robust-orientation": 284 }], 299: [function(g, k, x) {
              k.exports = function(l) {
                for (var i = l.length, p = 2 * i, c = new Array(p), a = 0; a < i; ++a) {
                  var y = l[a], f = y[0][0] < y[1][0];
                  c[2 * a] = new h(y[0][0], y, f, a), c[2 * a + 1] = new h(y[1][0], y, !f, a);
                }
                c.sort(function(P, S) {
                  var E = P.x - S.x;
                  return E || (E = P.create - S.create) || Math.min(P.segment[0][1], P.segment[1][1]) - Math.min(S.segment[0][1], S.segment[1][1]);
                });
                var _ = r(s), b = [], w = [], T = [];
                for (a = 0; a < p; ) {
                  for (var L = c[a].x, A = []; a < p; ) {
                    var I = c[a];
                    if (I.x !== L)
                      break;
                    a += 1, I.segment[0][0] === I.x && I.segment[1][0] === I.x ? I.create && (I.segment[0][1] < I.segment[1][1] ? (A.push(new o(I.segment[0][1], I.index, !0, !0)), A.push(new o(I.segment[1][1], I.index, !1, !1))) : (A.push(new o(I.segment[1][1], I.index, !0, !1)), A.push(new o(I.segment[0][1], I.index, !1, !0)))) : _ = I.create ? _.insert(I.segment, I.index) : _.remove(I.segment);
                  }
                  b.push(_.root), w.push(L), T.push(A);
                }
                return new t(b, w, T);
              };
              var e = g("binary-search-bounds"), r = g("functional-red-black-tree"), n = g("robust-orientation"), s = g("./lib/order-segments");
              function t(l, i, p) {
                this.slabs = l, this.coordinates = i, this.horizontal = p;
              }
              function d(l, i) {
                return l.y - i;
              }
              function u(l, i) {
                for (var p = null; l; ) {
                  var c, a, y = l.key;
                  y[0][0] < y[1][0] ? (c = y[0], a = y[1]) : (c = y[1], a = y[0]);
                  var f = n(c, a, i);
                  if (f < 0)
                    l = l.left;
                  else if (f > 0)
                    if (i[0] !== y[1][0])
                      p = l, l = l.right;
                    else {
                      if (_ = u(l.right, i))
                        return _;
                      l = l.left;
                    }
                  else {
                    if (i[0] !== y[1][0])
                      return l;
                    var _;
                    if (_ = u(l.right, i))
                      return _;
                    l = l.left;
                  }
                }
                return p;
              }
              function o(l, i, p, c) {
                this.y = l, this.index = i, this.start = p, this.closed = c;
              }
              function h(l, i, p, c) {
                this.x = l, this.segment = i, this.create = p, this.index = c;
              }
              t.prototype.castUp = function(l) {
                var i = e.le(this.coordinates, l[0]);
                if (i < 0)
                  return -1;
                this.slabs[i];
                var p = u(this.slabs[i], l), c = -1;
                if (p && (c = p.value), this.coordinates[i] === l[0]) {
                  var a = null;
                  if (p && (a = p.key), i > 0) {
                    var y = u(this.slabs[i - 1], l);
                    y && (a ? s(y.key, a) > 0 && (a = y.key, c = y.value) : (c = y.value, a = y.key));
                  }
                  var f = this.horizontal[i];
                  if (f.length > 0) {
                    var _ = e.ge(f, l[1], d);
                    if (_ < f.length) {
                      var b = f[_];
                      if (l[1] === b.y) {
                        if (b.closed)
                          return b.index;
                        for (; _ < f.length - 1 && f[_ + 1].y === l[1]; )
                          if ((b = f[_ += 1]).closed)
                            return b.index;
                        if (b.y === l[1] && !b.start) {
                          if ((_ += 1) >= f.length)
                            return c;
                          b = f[_];
                        }
                      }
                      if (b.start)
                        if (a) {
                          var w = n(a[0], a[1], [l[0], b.y]);
                          a[0][0] > a[1][0] && (w = -w), w > 0 && (c = b.index);
                        } else
                          c = b.index;
                      else
                        b.y !== l[1] && (c = b.index);
                    }
                  }
                }
                return c;
              };
            }, { "./lib/order-segments": 298, "binary-search-bounds": 31, "functional-red-black-tree": 69, "robust-orientation": 284 }], 300: [function(g, k, x) {
              var e = g("robust-dot-product"), r = g("robust-sum");
              function n(t, d) {
                var u = r(e(t, d), [d[d.length - 1]]);
                return u[u.length - 1];
              }
              function s(t, d, u, o) {
                var h = -d / (o - d);
                h < 0 ? h = 0 : h > 1 && (h = 1);
                for (var l = 1 - h, i = t.length, p = new Array(i), c = 0; c < i; ++c)
                  p[c] = h * t[c] + l * u[c];
                return p;
              }
              k.exports = function(t, d) {
                for (var u = [], o = [], h = n(t[t.length - 1], d), l = t[t.length - 1], i = t[0], p = 0; p < t.length; ++p, l = i) {
                  var c = n(i = t[p], d);
                  if (h < 0 && c > 0 || h > 0 && c < 0) {
                    var a = s(l, c, i, h);
                    u.push(a), o.push(a.slice());
                  }
                  c < 0 ? o.push(i.slice()) : c > 0 ? u.push(i.slice()) : (u.push(i.slice()), o.push(i.slice())), h = c;
                }
                return { positive: u, negative: o };
              }, k.exports.positive = function(t, d) {
                for (var u = [], o = n(t[t.length - 1], d), h = t[t.length - 1], l = t[0], i = 0; i < t.length; ++i, h = l) {
                  var p = n(l = t[i], d);
                  (o < 0 && p > 0 || o > 0 && p < 0) && u.push(s(h, p, l, o)), p >= 0 && u.push(l.slice()), o = p;
                }
                return u;
              }, k.exports.negative = function(t, d) {
                for (var u = [], o = n(t[t.length - 1], d), h = t[t.length - 1], l = t[0], i = 0; i < t.length; ++i, h = l) {
                  var p = n(l = t[i], d);
                  (o < 0 && p > 0 || o > 0 && p < 0) && u.push(s(h, p, l, o)), p <= 0 && u.push(l.slice()), o = p;
                }
                return u;
              };
            }, { "robust-dot-product": 281, "robust-sum": 289 }], 301: [function(g, k, x) {
              (function() {
                var e = { not_string: /[^s]/, not_bool: /[^t]/, not_type: /[^T]/, not_primitive: /[^v]/, number: /[diefg]/, numeric_arg: /[bcdiefguxX]/, json: /[j]/, not_json: /[^j]/, text: /^[^\x25]+/, modulo: /^\x25{2}/, placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/, key: /^([a-z_][a-z_\d]*)/i, key_access: /^\.([a-z_][a-z_\d]*)/i, index_access: /^\[(\d+)\]/, sign: /^[+-]/ };
                function r(u) {
                  return s(d(u), arguments);
                }
                function n(u, o) {
                  return r.apply(null, [u].concat(o || []));
                }
                function s(u, o) {
                  var h, l, i, p, c, a, y, f, _, b = 1, w = u.length, T = "";
                  for (l = 0; l < w; l++)
                    if (typeof u[l] == "string")
                      T += u[l];
                    else if (typeof u[l] == "object") {
                      if ((p = u[l]).keys)
                        for (h = o[b], i = 0; i < p.keys.length; i++) {
                          if (h == null)
                            throw new Error(r('[sprintf] Cannot access property "%s" of undefined value "%s"', p.keys[i], p.keys[i - 1]));
                          h = h[p.keys[i]];
                        }
                      else
                        h = p.param_no ? o[p.param_no] : o[b++];
                      if (e.not_type.test(p.type) && e.not_primitive.test(p.type) && h instanceof Function && (h = h()), e.numeric_arg.test(p.type) && typeof h != "number" && isNaN(h))
                        throw new TypeError(r("[sprintf] expecting number but found %T", h));
                      switch (e.number.test(p.type) && (f = h >= 0), p.type) {
                        case "b":
                          h = parseInt(h, 10).toString(2);
                          break;
                        case "c":
                          h = String.fromCharCode(parseInt(h, 10));
                          break;
                        case "d":
                        case "i":
                          h = parseInt(h, 10);
                          break;
                        case "j":
                          h = JSON.stringify(h, null, p.width ? parseInt(p.width) : 0);
                          break;
                        case "e":
                          h = p.precision ? parseFloat(h).toExponential(p.precision) : parseFloat(h).toExponential();
                          break;
                        case "f":
                          h = p.precision ? parseFloat(h).toFixed(p.precision) : parseFloat(h);
                          break;
                        case "g":
                          h = p.precision ? String(Number(h.toPrecision(p.precision))) : parseFloat(h);
                          break;
                        case "o":
                          h = (parseInt(h, 10) >>> 0).toString(8);
                          break;
                        case "s":
                          h = String(h), h = p.precision ? h.substring(0, p.precision) : h;
                          break;
                        case "t":
                          h = String(!!h), h = p.precision ? h.substring(0, p.precision) : h;
                          break;
                        case "T":
                          h = Object.prototype.toString.call(h).slice(8, -1).toLowerCase(), h = p.precision ? h.substring(0, p.precision) : h;
                          break;
                        case "u":
                          h = parseInt(h, 10) >>> 0;
                          break;
                        case "v":
                          h = h.valueOf(), h = p.precision ? h.substring(0, p.precision) : h;
                          break;
                        case "x":
                          h = (parseInt(h, 10) >>> 0).toString(16);
                          break;
                        case "X":
                          h = (parseInt(h, 10) >>> 0).toString(16).toUpperCase();
                      }
                      e.json.test(p.type) ? T += h : (!e.number.test(p.type) || f && !p.sign ? _ = "" : (_ = f ? "+" : "-", h = h.toString().replace(e.sign, "")), a = p.pad_char ? p.pad_char === "0" ? "0" : p.pad_char.charAt(1) : " ", y = p.width - (_ + h).length, c = p.width && y > 0 ? a.repeat(y) : "", T += p.align ? _ + h + c : a === "0" ? _ + c + h : c + _ + h);
                    }
                  return T;
                }
                var t = /* @__PURE__ */ Object.create(null);
                function d(u) {
                  if (t[u])
                    return t[u];
                  for (var o, h = u, l = [], i = 0; h; ) {
                    if ((o = e.text.exec(h)) !== null)
                      l.push(o[0]);
                    else if ((o = e.modulo.exec(h)) !== null)
                      l.push("%");
                    else {
                      if ((o = e.placeholder.exec(h)) === null)
                        throw new SyntaxError("[sprintf] unexpected placeholder");
                      if (o[2]) {
                        i |= 1;
                        var p = [], c = o[2], a = [];
                        if ((a = e.key.exec(c)) === null)
                          throw new SyntaxError("[sprintf] failed to parse named argument key");
                        for (p.push(a[1]); (c = c.substring(a[0].length)) !== ""; )
                          if ((a = e.key_access.exec(c)) !== null)
                            p.push(a[1]);
                          else {
                            if ((a = e.index_access.exec(c)) === null)
                              throw new SyntaxError("[sprintf] failed to parse named argument key");
                            p.push(a[1]);
                          }
                        o[2] = p;
                      } else
                        i |= 2;
                      if (i === 3)
                        throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");
                      l.push({ placeholder: o[0], param_no: o[1], keys: o[2], sign: o[3], pad_char: o[4], align: o[5], width: o[6], precision: o[7], type: o[8] });
                    }
                    h = h.substring(o[0].length);
                  }
                  return t[u] = l;
                }
                x !== void 0 && (x.sprintf = r, x.vsprintf = n), typeof window < "u" && (window.sprintf = r, window.vsprintf = n);
              })();
            }, {}], 302: [function(g, k, x) {
              k.exports = function(t, d) {
                if (t.dimension <= 0)
                  return { positions: [], cells: [] };
                if (t.dimension === 1)
                  return function(h, l) {
                    for (var i = r(h, l), p = i.length, c = new Array(p), a = new Array(p), y = 0; y < p; ++y)
                      c[y] = [i[y]], a[y] = [y];
                    return { positions: c, cells: a };
                  }(t, d);
                var u = t.order.join() + "-" + t.dtype, o = s[u];
                return d = +d || 0, o || (o = s[u] = function(h, l) {
                  var i = h.length + "d", p = n[i];
                  if (p)
                    return p(e, h, l);
                }(t.order, t.dtype)), o(t, d);
              };
              var e = g("ndarray-extract-contour"), r = g("zero-crossings"), n = { "2d": function(t, d, u) {
                var o = t({ order: d, scalarArguments: 3, getters: u === "generic" ? [0] : void 0, phase: function(h, l, i, p) {
                  return h > p | 0;
                }, vertex: function(h, l, i, p, c, a, y, f, _, b, w, T, L) {
                  var A = (y << 0) + (f << 1) + (_ << 2) + (b << 3) | 0;
                  if (A !== 0 && A !== 15)
                    switch (A) {
                      case 0:
                        w.push([h - 0.5, l - 0.5]);
                        break;
                      case 1:
                        w.push([h - 0.25 - 0.25 * (p + i - 2 * L) / (i - p), l - 0.25 - 0.25 * (c + i - 2 * L) / (i - c)]);
                        break;
                      case 2:
                        w.push([h - 0.75 - 0.25 * (-p - i + 2 * L) / (p - i), l - 0.25 - 0.25 * (a + p - 2 * L) / (p - a)]);
                        break;
                      case 3:
                        w.push([h - 0.5, l - 0.5 - 0.5 * (c + i + a + p - 4 * L) / (i - c + p - a)]);
                        break;
                      case 4:
                        w.push([h - 0.25 - 0.25 * (a + c - 2 * L) / (c - a), l - 0.75 - 0.25 * (-c - i + 2 * L) / (c - i)]);
                        break;
                      case 5:
                        w.push([h - 0.5 - 0.5 * (p + i + a + c - 4 * L) / (i - p + c - a), l - 0.5]);
                        break;
                      case 6:
                        w.push([h - 0.5 - 0.25 * (-p - i + a + c) / (p - i + c - a), l - 0.5 - 0.25 * (-c - i + a + p) / (c - i + p - a)]);
                        break;
                      case 7:
                        w.push([h - 0.75 - 0.25 * (a + c - 2 * L) / (c - a), l - 0.75 - 0.25 * (a + p - 2 * L) / (p - a)]);
                        break;
                      case 8:
                        w.push([h - 0.75 - 0.25 * (-a - c + 2 * L) / (a - c), l - 0.75 - 0.25 * (-a - p + 2 * L) / (a - p)]);
                        break;
                      case 9:
                        w.push([h - 0.5 - 0.25 * (p + i + -a - c) / (i - p + a - c), l - 0.5 - 0.25 * (c + i + -a - p) / (i - c + a - p)]);
                        break;
                      case 10:
                        w.push([h - 0.5 - 0.5 * (-p - i - a - c + 4 * L) / (p - i + a - c), l - 0.5]);
                        break;
                      case 11:
                        w.push([h - 0.25 - 0.25 * (-a - c + 2 * L) / (a - c), l - 0.75 - 0.25 * (c + i - 2 * L) / (i - c)]);
                        break;
                      case 12:
                        w.push([h - 0.5, l - 0.5 - 0.5 * (-c - i - a - p + 4 * L) / (c - i + a - p)]);
                        break;
                      case 13:
                        w.push([h - 0.75 - 0.25 * (p + i - 2 * L) / (i - p), l - 0.25 - 0.25 * (-a - p + 2 * L) / (a - p)]);
                        break;
                      case 14:
                        w.push([h - 0.25 - 0.25 * (-p - i + 2 * L) / (p - i), l - 0.25 - 0.25 * (-c - i + 2 * L) / (c - i)]);
                        break;
                      case 15:
                        w.push([h - 0.5, l - 0.5]);
                    }
                }, cell: function(h, l, i, p, c, a, y, f, _) {
                  c ? f.push([h, l]) : f.push([l, h]);
                } });
                return function(h, l) {
                  var i = [], p = [];
                  return o(h, i, p, l), { positions: i, cells: p };
                };
              } }, s = {};
            }, { "ndarray-extract-contour": 251, "zero-crossings": 318 }], 303: [function(g, k, x) {
              (function(e) {
                (function() {
                  k.exports = function t(d, u, o) {
                    o = o || {};
                    var h = s[d];
                    h || (h = s[d] = { " ": { data: new Float32Array(0), shape: 0.2 } });
                    var l = h[u];
                    if (!l)
                      if (u.length <= 1 || !/\d/.test(u))
                        l = h[u] = function(L) {
                          for (var A = L.cells, I = L.positions, P = new Float32Array(6 * A.length), S = 0, E = 0, R = 0; R < A.length; ++R)
                            for (var z = A[R], j = 0; j < 3; ++j) {
                              var H = I[z[j]];
                              P[S++] = H[0], P[S++] = H[1] + 1.4, E = Math.max(H[0], E);
                            }
                          return { data: P, shape: E };
                        }(r(u, { triangles: !0, font: d, textAlign: o.textAlign || "left", textBaseline: "alphabetic", styletags: { breaklines: !0, bolds: !0, italics: !0, subscripts: !0, superscripts: !0 } }));
                      else {
                        for (var i = u.split(/(\d|\s)/), p = new Array(i.length), c = 0, a = 0, y = 0; y < i.length; ++y)
                          p[y] = t(d, i[y]), c += p[y].data.length, a += p[y].shape, y > 0 && (a += 0.02);
                        var f = new Float32Array(c), _ = 0, b = -0.5 * a;
                        for (y = 0; y < p.length; ++y) {
                          for (var w = p[y].data, T = 0; T < w.length; T += 2)
                            f[_++] = w[T] + b, f[_++] = w[T + 1];
                          b += p[y].shape + 0.02;
                        }
                        l = h[u] = { data: f, shape: a };
                      }
                    return l;
                  };
                  var r = g("vectorize-text"), n = window || e.global || {}, s = n.__TEXT_CACHE || {};
                  n.__TEXT_CACHE = {};
                }).call(this);
              }).call(this, g("_process"));
            }, { _process: 5, "vectorize-text": 311 }], 304: [function(g, k, x) {
              var e = g("parse-unit");
              k.exports = n;
              function r(s, t) {
                var d = e(getComputedStyle(s).getPropertyValue(t));
                return d[0] * n(d[1], s);
              }
              function n(s, t) {
                switch (t = t || document.body, s = (s || "px").trim().toLowerCase(), t !== window && t !== document || (t = document.body), s) {
                  case "%":
                    return t.clientHeight / 100;
                  case "ch":
                  case "ex":
                    return function(d, u) {
                      var o = document.createElement("div");
                      o.style["font-size"] = "128" + d, u.appendChild(o);
                      var h = r(o, "font-size") / 128;
                      return u.removeChild(o), h;
                    }(s, t);
                  case "em":
                    return r(t, "font-size");
                  case "rem":
                    return r(document.body, "font-size");
                  case "vw":
                    return window.innerWidth / 100;
                  case "vh":
                    return window.innerHeight / 100;
                  case "vmin":
                    return Math.min(window.innerWidth, window.innerHeight) / 100;
                  case "vmax":
                    return Math.max(window.innerWidth, window.innerHeight) / 100;
                  case "in":
                    return 96;
                  case "cm":
                    return 96 / 2.54;
                  case "mm":
                    return 96 / 25.4;
                  case "pt":
                    return 96 / 72;
                  case "pc":
                    return 16;
                }
                return 1;
              }
            }, { "parse-unit": 265 }], 305: [function(g, k, x) {
              k.exports = function(c) {
                var a = (c = c || {}).center || [0, 0, 0], y = c.up || [0, 1, 0], f = c.right || h(y), _ = c.radius || 1, b = c.theta || 0, w = c.phi || 0;
                if (a = [].slice.call(a, 0, 3), y = [].slice.call(y, 0, 3), t(y, y), f = [].slice.call(f, 0, 3), t(f, f), "eye" in c) {
                  var T = c.eye, L = [T[0] - a[0], T[1] - a[1], T[2] - a[2]];
                  s(f, L, y), u(f[0], f[1], f[2]) < 1e-6 ? f = h(y) : t(f, f), _ = u(L[0], L[1], L[2]);
                  var A = d(y, L) / _, I = d(f, L) / _;
                  w = Math.acos(A), b = Math.acos(I);
                }
                return _ = Math.log(_), new l(c.zoomMin, c.zoomMax, a, y, f, _, b, w);
              };
              var e = g("filtered-vector"), r = g("gl-mat4/invert"), n = g("gl-mat4/rotate"), s = g("gl-vec3/cross"), t = g("gl-vec3/normalize"), d = g("gl-vec3/dot");
              function u(c, a, y) {
                return Math.sqrt(Math.pow(c, 2) + Math.pow(a, 2) + Math.pow(y, 2));
              }
              function o(c) {
                return Math.min(1, Math.max(-1, c));
              }
              function h(c) {
                var a = Math.abs(c[0]), y = Math.abs(c[1]), f = Math.abs(c[2]), _ = [0, 0, 0];
                a > Math.max(y, f) ? _[2] = 1 : y > Math.max(a, f) ? _[0] = 1 : _[1] = 1;
                for (var b = 0, w = 0, T = 0; T < 3; ++T)
                  b += c[T] * c[T], w += _[T] * c[T];
                for (T = 0; T < 3; ++T)
                  _[T] -= w / b * c[T];
                return t(_, _), _;
              }
              function l(c, a, y, f, _, b, w, T) {
                this.center = e(y), this.up = e(f), this.right = e(_), this.radius = e([b]), this.angle = e([w, T]), this.angle.bounds = [[-1 / 0, -Math.PI / 2], [1 / 0, Math.PI / 2]], this.setDistanceLimits(c, a), this.computedCenter = this.center.curve(0), this.computedUp = this.up.curve(0), this.computedRight = this.right.curve(0), this.computedRadius = this.radius.curve(0), this.computedAngle = this.angle.curve(0), this.computedToward = [0, 0, 0], this.computedEye = [0, 0, 0], this.computedMatrix = new Array(16);
                for (var L = 0; L < 16; ++L)
                  this.computedMatrix[L] = 0.5;
                this.recalcMatrix(0);
              }
              var i = l.prototype;
              i.setDistanceLimits = function(c, a) {
                c = c > 0 ? Math.log(c) : -1 / 0, a = a > 0 ? Math.log(a) : 1 / 0, a = Math.max(a, c), this.radius.bounds[0][0] = c, this.radius.bounds[1][0] = a;
              }, i.getDistanceLimits = function(c) {
                var a = this.radius.bounds[0];
                return c ? (c[0] = Math.exp(a[0][0]), c[1] = Math.exp(a[1][0]), c) : [Math.exp(a[0][0]), Math.exp(a[1][0])];
              }, i.recalcMatrix = function(c) {
                this.center.curve(c), this.up.curve(c), this.right.curve(c), this.radius.curve(c), this.angle.curve(c);
                for (var a = this.computedUp, y = this.computedRight, f = 0, _ = 0, b = 0; b < 3; ++b)
                  _ += a[b] * y[b], f += a[b] * a[b];
                var w = Math.sqrt(f), T = 0;
                for (b = 0; b < 3; ++b)
                  y[b] -= a[b] * _ / f, T += y[b] * y[b], a[b] /= w;
                var L = Math.sqrt(T);
                for (b = 0; b < 3; ++b)
                  y[b] /= L;
                var A = this.computedToward;
                s(A, a, y), t(A, A);
                var I = Math.exp(this.computedRadius[0]), P = this.computedAngle[0], S = this.computedAngle[1], E = Math.cos(P), R = Math.sin(P), z = Math.cos(S), j = Math.sin(S), H = this.computedCenter, Y = E * z, J = R * z, W = j, Z = -E * j, re = -R * j, V = z, B = this.computedEye, U = this.computedMatrix;
                for (b = 0; b < 3; ++b) {
                  var ee = Y * y[b] + J * A[b] + W * a[b];
                  U[4 * b + 1] = Z * y[b] + re * A[b] + V * a[b], U[4 * b + 2] = ee, U[4 * b + 3] = 0;
                }
                var N = U[1], K = U[5], X = U[9], te = U[2], ie = U[6], le = U[10], oe = K * le - X * ie, ve = X * te - N * le, ue = N * ie - K * te, ye = u(oe, ve, ue);
                for (oe /= ye, ve /= ye, ue /= ye, U[0] = oe, U[4] = ve, U[8] = ue, b = 0; b < 3; ++b)
                  B[b] = H[b] + U[2 + 4 * b] * I;
                for (b = 0; b < 3; ++b) {
                  T = 0;
                  for (var Ae = 0; Ae < 3; ++Ae)
                    T += U[b + 4 * Ae] * B[Ae];
                  U[12 + b] = -T;
                }
                U[15] = 1;
              }, i.getMatrix = function(c, a) {
                this.recalcMatrix(c);
                var y = this.computedMatrix;
                if (a) {
                  for (var f = 0; f < 16; ++f)
                    a[f] = y[f];
                  return a;
                }
                return y;
              };
              var p = [0, 0, 0];
              i.rotate = function(c, a, y, f) {
                if (this.angle.move(c, a, y), f) {
                  this.recalcMatrix(c);
                  var _ = this.computedMatrix;
                  p[0] = _[2], p[1] = _[6], p[2] = _[10];
                  for (var b = this.computedUp, w = this.computedRight, T = this.computedToward, L = 0; L < 3; ++L)
                    _[4 * L] = b[L], _[4 * L + 1] = w[L], _[4 * L + 2] = T[L];
                  for (n(_, _, f, p), L = 0; L < 3; ++L)
                    b[L] = _[4 * L], w[L] = _[4 * L + 1];
                  this.up.set(c, b[0], b[1], b[2]), this.right.set(c, w[0], w[1], w[2]);
                }
              }, i.pan = function(c, a, y, f) {
                a = a || 0, y = y || 0, f = f || 0, this.recalcMatrix(c);
                var _ = this.computedMatrix, b = (Math.exp(this.computedRadius[0]), _[1]), w = _[5], T = _[9], L = u(b, w, T);
                b /= L, w /= L, T /= L;
                var A = _[0], I = _[4], P = _[8], S = A * b + I * w + P * T, E = u(A -= b * S, I -= w * S, P -= T * S), R = (A /= E) * a + b * y, z = (I /= E) * a + w * y, j = (P /= E) * a + T * y;
                this.center.move(c, R, z, j);
                var H = Math.exp(this.computedRadius[0]);
                H = Math.max(1e-4, H + f), this.radius.set(c, Math.log(H));
              }, i.translate = function(c, a, y, f) {
                this.center.move(c, a || 0, y || 0, f || 0);
              }, i.setMatrix = function(c, a, y, f) {
                var _ = 1;
                typeof y == "number" && (_ = 0 | y), (_ < 0 || _ > 3) && (_ = 1);
                var b = (_ + 2) % 3;
                a || (this.recalcMatrix(c), a = this.computedMatrix);
                var w = a[_], T = a[_ + 4], L = a[_ + 8];
                if (f) {
                  var A = Math.abs(w), I = Math.abs(T), P = Math.abs(L), S = Math.max(A, I, P);
                  A === S ? (w = w < 0 ? -1 : 1, T = L = 0) : P === S ? (L = L < 0 ? -1 : 1, w = T = 0) : (T = T < 0 ? -1 : 1, w = L = 0);
                } else {
                  var E = u(w, T, L);
                  w /= E, T /= E, L /= E;
                }
                var R, z, j = a[b], H = a[b + 4], Y = a[b + 8], J = j * w + H * T + Y * L, W = u(j -= w * J, H -= T * J, Y -= L * J), Z = T * (Y /= W) - L * (H /= W), re = L * (j /= W) - w * Y, V = w * H - T * j, B = u(Z, re, V);
                if (Z /= B, re /= B, V /= B, this.center.jump(c, se, de, Te), this.radius.idle(c), this.up.jump(c, w, T, L), this.right.jump(c, j, H, Y), _ === 2) {
                  var U = a[1], ee = a[5], N = a[9], K = U * j + ee * H + N * Y, X = U * Z + ee * re + N * V;
                  R = oe < 0 ? -Math.PI / 2 : Math.PI / 2, z = Math.atan2(X, K);
                } else {
                  var te = a[2], ie = a[6], le = a[10], oe = te * w + ie * T + le * L, ve = te * j + ie * H + le * Y, ue = te * Z + ie * re + le * V;
                  R = Math.asin(o(oe)), z = Math.atan2(ue, ve);
                }
                this.angle.jump(c, z, R), this.recalcMatrix(c);
                var ye = a[2], Ae = a[6], pe = a[10], ge = this.computedMatrix;
                r(ge, a);
                var we = ge[15], se = ge[12] / we, de = ge[13] / we, Te = ge[14] / we, Ee = Math.exp(this.computedRadius[0]);
                this.center.jump(c, se - ye * Ee, de - Ae * Ee, Te - pe * Ee);
              }, i.lastT = function() {
                return Math.max(this.center.lastT(), this.up.lastT(), this.right.lastT(), this.radius.lastT(), this.angle.lastT());
              }, i.idle = function(c) {
                this.center.idle(c), this.up.idle(c), this.right.idle(c), this.radius.idle(c), this.angle.idle(c);
              }, i.flush = function(c) {
                this.center.flush(c), this.up.flush(c), this.right.flush(c), this.radius.flush(c), this.angle.flush(c);
              }, i.setDistance = function(c, a) {
                a > 0 && this.radius.set(c, Math.log(a));
              }, i.lookAt = function(c, a, y, f) {
                this.recalcMatrix(c), a = a || this.computedEye, y = y || this.computedCenter;
                var _ = (f = f || this.computedUp)[0], b = f[1], w = f[2], T = u(_, b, w);
                if (!(T < 1e-6)) {
                  _ /= T, b /= T, w /= T;
                  var L = a[0] - y[0], A = a[1] - y[1], I = a[2] - y[2], P = u(L, A, I);
                  if (!(P < 1e-6)) {
                    L /= P, A /= P, I /= P;
                    var S = this.computedRight, E = S[0], R = S[1], z = S[2], j = _ * E + b * R + w * z, H = u(E -= j * _, R -= j * b, z -= j * w);
                    if (!(H < 0.01 && (H = u(E = b * I - w * A, R = w * L - _ * I, z = _ * A - b * L)) < 1e-6)) {
                      E /= H, R /= H, z /= H, this.up.set(c, _, b, w), this.right.set(c, E, R, z), this.center.set(c, y[0], y[1], y[2]), this.radius.set(c, Math.log(P));
                      var Y = b * z - w * R, J = w * E - _ * z, W = _ * R - b * E, Z = u(Y, J, W), re = _ * L + b * A + w * I, V = E * L + R * A + z * I, B = (Y /= Z) * L + (J /= Z) * A + (W /= Z) * I, U = Math.asin(o(re)), ee = Math.atan2(B, V), N = this.angle._state, K = N[N.length - 1], X = N[N.length - 2];
                      K %= 2 * Math.PI;
                      var te = Math.abs(K + 2 * Math.PI - ee), ie = Math.abs(K - ee), le = Math.abs(K - 2 * Math.PI - ee);
                      te < ie && (K += 2 * Math.PI), le < ie && (K -= 2 * Math.PI), this.angle.jump(this.angle.lastT(), K, X), this.angle.set(c, ee, U);
                    }
                  }
                }
              };
            }, { "filtered-vector": 68, "gl-mat4/invert": 98, "gl-mat4/rotate": 103, "gl-vec3/cross": 157, "gl-vec3/dot": 162, "gl-vec3/normalize": 179 }], 306: [function(g, k, x) {
              k.exports = function(r, n, s) {
                var t = r * n, d = e * r, u = d - (d - r), o = r - u, h = e * n, l = h - (h - n), i = n - l, p = o * i - (t - u * l - o * l - u * i);
                return s ? (s[0] = p, s[1] = t, s) : [p, t];
              };
              var e = +(Math.pow(2, 27) + 1);
            }, {}], 307: [function(g, k, x) {
              k.exports = function(e, r, n) {
                var s = e + r, t = s - e, d = r - t, u = e - (s - t);
                return n ? (n[0] = u + d, n[1] = s, n) : [u + d, s];
              };
            }, {}], 308: [function(g, k, x) {
              (function(e) {
                (function() {
                  var r = g("bit-twiddle"), n = g("dup"), s = g("buffer").Buffer;
                  e.__TYPEDARRAY_POOL || (e.__TYPEDARRAY_POOL = { UINT8: n([32, 0]), UINT16: n([32, 0]), UINT32: n([32, 0]), BIGUINT64: n([32, 0]), INT8: n([32, 0]), INT16: n([32, 0]), INT32: n([32, 0]), BIGINT64: n([32, 0]), FLOAT: n([32, 0]), DOUBLE: n([32, 0]), DATA: n([32, 0]), UINT8C: n([32, 0]), BUFFER: n([32, 0]) });
                  var t = typeof Uint8ClampedArray < "u", d = typeof BigUint64Array < "u", u = typeof BigInt64Array < "u", o = e.__TYPEDARRAY_POOL;
                  o.UINT8C || (o.UINT8C = n([32, 0])), o.BIGUINT64 || (o.BIGUINT64 = n([32, 0])), o.BIGINT64 || (o.BIGINT64 = n([32, 0])), o.BUFFER || (o.BUFFER = n([32, 0]));
                  var h = o.DATA, l = o.BUFFER;
                  function i(E) {
                    if (E) {
                      var R = E.length || E.byteLength, z = r.log2(R);
                      h[z].push(E);
                    }
                  }
                  function p(E) {
                    E = r.nextPow2(E);
                    var R = r.log2(E), z = h[R];
                    return z.length > 0 ? z.pop() : new ArrayBuffer(E);
                  }
                  function c(E) {
                    return new Uint8Array(p(E), 0, E);
                  }
                  function a(E) {
                    return new Uint16Array(p(2 * E), 0, E);
                  }
                  function y(E) {
                    return new Uint32Array(p(4 * E), 0, E);
                  }
                  function f(E) {
                    return new Int8Array(p(E), 0, E);
                  }
                  function _(E) {
                    return new Int16Array(p(2 * E), 0, E);
                  }
                  function b(E) {
                    return new Int32Array(p(4 * E), 0, E);
                  }
                  function w(E) {
                    return new Float32Array(p(4 * E), 0, E);
                  }
                  function T(E) {
                    return new Float64Array(p(8 * E), 0, E);
                  }
                  function L(E) {
                    return t ? new Uint8ClampedArray(p(E), 0, E) : c(E);
                  }
                  function A(E) {
                    return d ? new BigUint64Array(p(8 * E), 0, E) : null;
                  }
                  function I(E) {
                    return u ? new BigInt64Array(p(8 * E), 0, E) : null;
                  }
                  function P(E) {
                    return new DataView(p(E), 0, E);
                  }
                  function S(E) {
                    E = r.nextPow2(E);
                    var R = r.log2(E), z = l[R];
                    return z.length > 0 ? z.pop() : new s(E);
                  }
                  x.free = function(E) {
                    if (s.isBuffer(E))
                      l[r.log2(E.length)].push(E);
                    else {
                      if (Object.prototype.toString.call(E) !== "[object ArrayBuffer]" && (E = E.buffer), !E)
                        return;
                      var R = E.length || E.byteLength, z = 0 | r.log2(R);
                      h[z].push(E);
                    }
                  }, x.freeUint8 = x.freeUint16 = x.freeUint32 = x.freeBigUint64 = x.freeInt8 = x.freeInt16 = x.freeInt32 = x.freeBigInt64 = x.freeFloat32 = x.freeFloat = x.freeFloat64 = x.freeDouble = x.freeUint8Clamped = x.freeDataView = function(E) {
                    i(E.buffer);
                  }, x.freeArrayBuffer = i, x.freeBuffer = function(E) {
                    l[r.log2(E.length)].push(E);
                  }, x.malloc = function(E, R) {
                    if (R === void 0 || R === "arraybuffer")
                      return p(E);
                    switch (R) {
                      case "uint8":
                        return c(E);
                      case "uint16":
                        return a(E);
                      case "uint32":
                        return y(E);
                      case "int8":
                        return f(E);
                      case "int16":
                        return _(E);
                      case "int32":
                        return b(E);
                      case "float":
                      case "float32":
                        return w(E);
                      case "double":
                      case "float64":
                        return T(E);
                      case "uint8_clamped":
                        return L(E);
                      case "bigint64":
                        return I(E);
                      case "biguint64":
                        return A(E);
                      case "buffer":
                        return S(E);
                      case "data":
                      case "dataview":
                        return P(E);
                      default:
                        return null;
                    }
                    return null;
                  }, x.mallocArrayBuffer = p, x.mallocUint8 = c, x.mallocUint16 = a, x.mallocUint32 = y, x.mallocInt8 = f, x.mallocInt16 = _, x.mallocInt32 = b, x.mallocFloat32 = x.mallocFloat = w, x.mallocFloat64 = x.mallocDouble = T, x.mallocUint8Clamped = L, x.mallocBigUint64 = A, x.mallocBigInt64 = I, x.mallocDataView = P, x.mallocBuffer = S, x.clearCache = function() {
                    for (var E = 0; E < 32; ++E)
                      o.UINT8[E].length = 0, o.UINT16[E].length = 0, o.UINT32[E].length = 0, o.INT8[E].length = 0, o.INT16[E].length = 0, o.INT32[E].length = 0, o.FLOAT[E].length = 0, o.DOUBLE[E].length = 0, o.BIGUINT64[E].length = 0, o.BIGINT64[E].length = 0, o.UINT8C[E].length = 0, h[E].length = 0, l[E].length = 0;
                  };
                }).call(this);
              }).call(this, m !== void 0 ? m : typeof self < "u" ? self : typeof window < "u" ? window : {});
            }, { "bit-twiddle": 32, buffer: 3, dup: 65 }], 309: [function(g, k, x) {
              function e(n) {
                this.roots = new Array(n), this.ranks = new Array(n);
                for (var s = 0; s < n; ++s)
                  this.roots[s] = s, this.ranks[s] = 0;
              }
              k.exports = e;
              var r = e.prototype;
              Object.defineProperty(r, "length", { get: function() {
                return this.roots.length;
              } }), r.makeSet = function() {
                var n = this.roots.length;
                return this.roots.push(n), this.ranks.push(0), n;
              }, r.find = function(n) {
                for (var s = n, t = this.roots; t[n] !== n; )
                  n = t[n];
                for (; t[s] !== n; ) {
                  var d = t[s];
                  t[s] = n, s = d;
                }
                return n;
              }, r.link = function(n, s) {
                var t = this.find(n), d = this.find(s);
                if (t !== d) {
                  var u = this.ranks, o = this.roots, h = u[t], l = u[d];
                  h < l ? o[t] = d : l < h ? o[d] = t : (o[d] = t, ++u[t]);
                }
              };
            }, {}], 310: [function(g, k, x) {
              k.exports = function(e, r, n) {
                return e.length === 0 ? e : r ? (n || e.sort(r), function(s, t) {
                  for (var d = 1, u = s.length, o = s[0], h = s[0], l = 1; l < u; ++l)
                    if (h = o, t(o = s[l], h)) {
                      if (l === d) {
                        d++;
                        continue;
                      }
                      s[d++] = o;
                    }
                  return s.length = d, s;
                }(e, r)) : (n || e.sort(), function(s) {
                  for (var t = 1, d = s.length, u = s[0], o = s[0], h = 1; h < d; ++h, o = u)
                    if (o = u, (u = s[h]) !== o) {
                      if (h === t) {
                        t++;
                        continue;
                      }
                      s[t++] = u;
                    }
                  return s.length = t, s;
                }(e));
              };
            }, {}], 311: [function(g, k, x) {
              k.exports = function(s, t) {
                return typeof t == "object" && t !== null || (t = {}), e(s, t.canvas || r, t.context || n, t);
              };
              var e = g("./lib/vtext"), r = null, n = null;
              typeof document < "u" && ((r = document.createElement("canvas")).width = 8192, r.height = 1024, n = r.getContext("2d"));
            }, { "./lib/vtext": 312 }], 312: [function(g, k, x) {
              k.exports = function(i, p, c, a) {
                var y = 64, f = 1.25, _ = { breaklines: !1, bolds: !1, italics: !1, subscripts: !1, superscripts: !1 };
                return a && (a.size && a.size > 0 && (y = a.size), a.lineSpacing && a.lineSpacing > 0 && (f = a.lineSpacing), a.styletags && a.styletags.breaklines && (_.breaklines = !!a.styletags.breaklines), a.styletags && a.styletags.bolds && (_.bolds = !!a.styletags.bolds), a.styletags && a.styletags.italics && (_.italics = !!a.styletags.italics), a.styletags && a.styletags.subscripts && (_.subscripts = !!a.styletags.subscripts), a.styletags && a.styletags.superscripts && (_.superscripts = !!a.styletags.superscripts)), c.font = [a.fontStyle, a.fontVariant, a.fontWeight, y + "px", a.font].filter(function(b) {
                  return b;
                }).join(" "), c.textAlign = "start", c.textBaseline = "alphabetic", c.direction = "ltr", l(function(b, w, T, L, A, I) {
                  T = T.replace(/\n/g, ""), T = I.breaklines === !0 ? T.replace(/\<br\>/g, `
`) : T.replace(/\<br\>/g, " ");
                  var P = "", S = [];
                  for (j = 0; j < T.length; ++j)
                    S[j] = P;
                  I.bolds === !0 && (S = u("b", "b|", T, S)), I.italics === !0 && (S = u("i", "i|", T, S)), I.superscripts === !0 && (S = u("sup", "+1", T, S)), I.subscripts === !0 && (S = u("sub", "-1", T, S));
                  var E = [], R = "";
                  for (j = 0; j < T.length; ++j)
                    S[j] !== null && (R += T[j], E.push(S[j]));
                  var z, j, H, Y, J, W = R.split(`
`), Z = W.length, re = Math.round(A * L), V = L, B = 2 * L, U = 0, ee = Z * re + B;
                  b.height < ee && (b.height = ee), w.fillStyle = "#000", w.fillRect(0, 0, b.width, b.height), w.fillStyle = "#fff";
                  var N = 0, K = "";
                  function X() {
                    if (K !== "") {
                      var Ae = w.measureText(K).width;
                      w.fillText(K, V + H, B + Y), H += Ae;
                    }
                  }
                  function te() {
                    return Math.round(J) + "px ";
                  }
                  function ie(Ae, pe) {
                    var ge = "" + w.font;
                    if (I.subscripts === !0) {
                      var we = Ae.indexOf("-"), se = pe.indexOf("-"), de = we > -1 ? parseInt(Ae[1 + we]) : 0, Te = se > -1 ? parseInt(pe[1 + se]) : 0;
                      de !== Te && (ge = ge.replace(te(), "?px "), J *= Math.pow(0.75, Te - de), ge = ge.replace("?px ", te())), Y += 0.25 * re * (Te - de);
                    }
                    if (I.superscripts === !0) {
                      var Ee = Ae.indexOf("+"), Me = pe.indexOf("+"), ze = Ee > -1 ? parseInt(Ae[1 + Ee]) : 0, Ie = Me > -1 ? parseInt(pe[1 + Me]) : 0;
                      ze !== Ie && (ge = ge.replace(te(), "?px "), J *= Math.pow(0.75, Ie - ze), ge = ge.replace("?px ", te())), Y -= 0.25 * re * (Ie - ze);
                    }
                    if (I.bolds === !0) {
                      var Oe = Ae.indexOf("b|") > -1, Ze = pe.indexOf("b|") > -1;
                      !Oe && Ze && (ge = Fe ? ge.replace("italic ", "italic bold ") : "bold " + ge), Oe && !Ze && (ge = ge.replace("bold ", ""));
                    }
                    if (I.italics === !0) {
                      var Fe = Ae.indexOf("i|") > -1, Pe = pe.indexOf("i|") > -1;
                      !Fe && Pe && (ge = "italic " + ge), Fe && !Pe && (ge = ge.replace("italic ", ""));
                    }
                    w.font = ge;
                  }
                  for (z = 0; z < Z; ++z) {
                    var le = W[z] + `
`;
                    for (H = 0, Y = z * re, J = L, K = "", j = 0; j < le.length; ++j) {
                      var oe = j + N < E.length ? E[j + N] : E[E.length - 1];
                      P === oe ? K += le[j] : (X(), K = le[j], oe !== void 0 && (ie(P, oe), P = oe));
                    }
                    X(), N += le.length;
                    var ve = 0 | Math.round(H + 2 * V);
                    U < ve && (U = ve);
                  }
                  var ue = U, ye = B + re * Z;
                  return r(w.getImageData(0, 0, ue, ye).data, [ye, ue, 4]).pick(-1, -1, 0).transpose(1, 0);
                }(p, c, i, y, f, _), a, y);
              }, k.exports.processPixels = l;
              var e = g("surface-nets"), r = g("ndarray"), n = g("simplify-planar-graph"), s = g("clean-pslg"), t = g("cdt2d"), d = g("planar-graph-to-polyline");
              function u(i, p, c, a) {
                for (var y = "<" + i + ">", f = "</" + i + ">", _ = y.length, b = f.length, w = p[0] === "+" || p[0] === "-", T = 0, L = -b; T > -1 && (T = c.indexOf(y, T)) !== -1 && (L = c.indexOf(f, T + _)) !== -1 && !(L <= T); ) {
                  for (var A = T; A < L + b; ++A)
                    if (A < T + _ || A >= L)
                      a[A] = null, c = c.substr(0, A) + " " + c.substr(A + 1);
                    else if (a[A] !== null) {
                      var I = a[A].indexOf(p[0]);
                      I === -1 ? a[A] += p : w && (a[A] = a[A].substr(0, I + 1) + (1 + parseInt(a[A][I + 1])) + a[A].substr(I + 2));
                    }
                  var P = T + _, S = c.substr(P, L - P).indexOf(y);
                  T = S !== -1 ? S : L + b;
                }
                return a;
              }
              function o(i, p) {
                var c = e(i, 128);
                return p ? n(c.cells, c.positions, 0.25) : { edges: c.cells, positions: c.positions };
              }
              function h(i, p, c, a) {
                var y = o(i, a), f = function(z, j, H) {
                  for (var Y = j.textAlign || "start", J = j.textBaseline || "alphabetic", W = [1 << 30, 1 << 30], Z = [0, 0], re = z.length, V = 0; V < re; ++V)
                    for (var B = z[V], U = 0; U < 2; ++U)
                      W[U] = 0 | Math.min(W[U], B[U]), Z[U] = 0 | Math.max(Z[U], B[U]);
                  var ee = 0;
                  switch (Y) {
                    case "center":
                      ee = -0.5 * (W[0] + Z[0]);
                      break;
                    case "right":
                    case "end":
                      ee = -Z[0];
                      break;
                    case "left":
                    case "start":
                      ee = -W[0];
                      break;
                    default:
                      throw new Error("vectorize-text: Unrecognized textAlign: '" + Y + "'");
                  }
                  var N = 0;
                  switch (J) {
                    case "hanging":
                    case "top":
                      N = -W[1];
                      break;
                    case "middle":
                      N = -0.5 * (W[1] + Z[1]);
                      break;
                    case "alphabetic":
                    case "ideographic":
                      N = -3 * H;
                      break;
                    case "bottom":
                      N = -Z[1];
                      break;
                    default:
                      throw new Error("vectorize-text: Unrecoginized textBaseline: '" + J + "'");
                  }
                  var K = 1 / H;
                  return "lineHeight" in j ? K *= +j.lineHeight : "width" in j ? K = j.width / (Z[0] - W[0]) : "height" in j && (K = j.height / (Z[1] - W[1])), z.map(function(X) {
                    return [K * (X[0] + ee), K * (X[1] + N)];
                  });
                }(y.positions, p, c), _ = y.edges, b = p.orientation === "ccw";
                if (s(f, _), p.polygons || p.polygon || p.polyline) {
                  for (var w = d(_, f), T = new Array(w.length), L = 0; L < w.length; ++L) {
                    for (var A = w[L], I = new Array(A.length), P = 0; P < A.length; ++P) {
                      for (var S = A[P], E = new Array(S.length), R = 0; R < S.length; ++R)
                        E[R] = f[S[R]].slice();
                      b && E.reverse(), I[P] = E;
                    }
                    T[L] = I;
                  }
                  return T;
                }
                return p.triangles || p.triangulate || p.triangle ? { cells: t(f, _, { delaunay: !1, exterior: !1, interior: !0 }), positions: f } : { edges: _, positions: f };
              }
              function l(i, p, c) {
                try {
                  return h(i, p, c, !0);
                } catch {
                }
                try {
                  return h(i, p, c, !1);
                } catch {
                }
                return p.polygons || p.polyline || p.polygon ? [] : p.triangles || p.triangulate || p.triangle ? { cells: [], positions: [] } : { edges: [], positions: [] };
              }
            }, { cdt2d: 42, "clean-pslg": 50, ndarray: 259, "planar-graph-to-polyline": 268, "simplify-planar-graph": 297, "surface-nets": 302 }], 313: [function(g, k, x) {
              (function() {
                if (typeof ses > "u" || !ses.ok || ses.ok()) {
                  typeof ses < "u" && (ses.weakMapPermitHostObjects = y);
                  var e = !1;
                  if (typeof WeakMap == "function") {
                    var r = WeakMap;
                    if (!(typeof navigator < "u" && /Firefox/.test(navigator.userAgent))) {
                      var n = new r(), s = Object.freeze({});
                      if (n.set(s, 1), n.get(s) === 1)
                        return void (k.exports = WeakMap);
                      e = !0;
                    }
                  }
                  var t = Object.getOwnPropertyNames, d = Object.defineProperty, u = Object.isExtensible, o = "weakmap:ident:" + Math.random() + "___";
                  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function" && typeof ArrayBuffer == "function" && typeof Uint8Array == "function") {
                    var h = new ArrayBuffer(25), l = new Uint8Array(h);
                    crypto.getRandomValues(l), o = "weakmap:rand:" + Array.prototype.map.call(l, function(T) {
                      return (T % 36).toString(36);
                    }).join("") + "___";
                  }
                  if (d(Object, "getOwnPropertyNames", { value: function(T) {
                    return t(T).filter(f);
                  } }), "getPropertyNames" in Object) {
                    var i = Object.getPropertyNames;
                    d(Object, "getPropertyNames", { value: function(T) {
                      return i(T).filter(f);
                    } });
                  }
                  (function() {
                    var T = Object.freeze;
                    d(Object, "freeze", { value: function(I) {
                      return _(I), T(I);
                    } });
                    var L = Object.seal;
                    d(Object, "seal", { value: function(I) {
                      return _(I), L(I);
                    } });
                    var A = Object.preventExtensions;
                    d(Object, "preventExtensions", { value: function(I) {
                      return _(I), A(I);
                    } });
                  })();
                  var p = !1, c = 0, a = function() {
                    this instanceof a || w();
                    var T = [], L = [], A = c++;
                    return Object.create(a.prototype, { get___: { value: b(function(I, P) {
                      var S, E = _(I);
                      return E ? A in E ? E[A] : P : (S = T.indexOf(I)) >= 0 ? L[S] : P;
                    }) }, has___: { value: b(function(I) {
                      var P = _(I);
                      return P ? A in P : T.indexOf(I) >= 0;
                    }) }, set___: { value: b(function(I, P) {
                      var S, E = _(I);
                      return E ? E[A] = P : (S = T.indexOf(I)) >= 0 ? L[S] = P : (S = T.length, L[S] = P, T[S] = I), this;
                    }) }, delete___: { value: b(function(I) {
                      var P, S, E = _(I);
                      return E ? A in E && delete E[A] : !((P = T.indexOf(I)) < 0) && (S = T.length - 1, T[P] = void 0, L[P] = L[S], T[P] = T[S], T.length = S, L.length = S, !0);
                    }) } });
                  };
                  a.prototype = Object.create(Object.prototype, { get: { value: function(T, L) {
                    return this.get___(T, L);
                  }, writable: !0, configurable: !0 }, has: { value: function(T) {
                    return this.has___(T);
                  }, writable: !0, configurable: !0 }, set: { value: function(T, L) {
                    return this.set___(T, L);
                  }, writable: !0, configurable: !0 }, delete: { value: function(T) {
                    return this.delete___(T);
                  }, writable: !0, configurable: !0 } }), typeof r == "function" ? function() {
                    function T() {
                      this instanceof a || w();
                      var L, A = new r(), I = void 0, P = !1;
                      return L = e ? function(S, E) {
                        return A.set(S, E), A.has(S) || (I || (I = new a()), I.set(S, E)), this;
                      } : function(S, E) {
                        if (P)
                          try {
                            A.set(S, E);
                          } catch {
                            I || (I = new a()), I.set___(S, E);
                          }
                        else
                          A.set(S, E);
                        return this;
                      }, Object.create(a.prototype, { get___: { value: b(function(S, E) {
                        return I ? A.has(S) ? A.get(S) : I.get___(S, E) : A.get(S, E);
                      }) }, has___: { value: b(function(S) {
                        return A.has(S) || !!I && I.has___(S);
                      }) }, set___: { value: b(L) }, delete___: { value: b(function(S) {
                        var E = !!A.delete(S);
                        return I && I.delete___(S) || E;
                      }) }, permitHostObjects___: { value: b(function(S) {
                        if (S !== y)
                          throw new Error("bogus call to permitHostObjects___");
                        P = !0;
                      }) } });
                    }
                    e && typeof Proxy < "u" && (Proxy = void 0), T.prototype = a.prototype, k.exports = T, Object.defineProperty(WeakMap.prototype, "constructor", { value: WeakMap, enumerable: !1, configurable: !0, writable: !0 });
                  }() : (typeof Proxy < "u" && (Proxy = void 0), k.exports = a);
                }
                function y(T) {
                  T.permitHostObjects___ && T.permitHostObjects___(y);
                }
                function f(T) {
                  return !(T.substr(0, 8) == "weakmap:" && T.substr(T.length - 3) === "___");
                }
                function _(T) {
                  if (T !== Object(T))
                    throw new TypeError("Not an object: " + T);
                  var L = T[o];
                  if (L && L.key === T)
                    return L;
                  if (u(T)) {
                    L = { key: T };
                    try {
                      return d(T, o, { value: L, writable: !1, enumerable: !1, configurable: !1 }), L;
                    } catch {
                      return;
                    }
                  }
                }
                function b(T) {
                  return T.prototype = null, Object.freeze(T);
                }
                function w() {
                  p || typeof console > "u" || (p = !0, console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."));
                }
              })();
            }, {}], 314: [function(g, k, x) {
              var e = g("./hidden-store.js");
              k.exports = function() {
                var r = {};
                return function(n) {
                  if ((typeof n != "object" || n === null) && typeof n != "function")
                    throw new Error("Weakmap-shim: Key must be object");
                  var s = n.valueOf(r);
                  return s && s.identity === r ? s : e(n, r);
                };
              };
            }, { "./hidden-store.js": 315 }], 315: [function(g, k, x) {
              k.exports = function(e, r) {
                var n = { identity: r }, s = e.valueOf;
                return Object.defineProperty(e, "valueOf", { value: function(t) {
                  return t !== r ? s.apply(this, arguments) : n;
                }, writable: !0 }), n;
              };
            }, {}], 316: [function(g, k, x) {
              var e = g("./create-store.js");
              k.exports = function() {
                var r = e();
                return { get: function(n, s) {
                  var t = r(n);
                  return t.hasOwnProperty("value") ? t.value : s;
                }, set: function(n, s) {
                  return r(n).value = s, this;
                }, has: function(n) {
                  return "value" in r(n);
                }, delete: function(n) {
                  return delete r(n).value;
                } };
              };
            }, { "./create-store.js": 314 }], 317: [function(g, k, x) {
              var e, r = function() {
                return function(n, s, t, d, u, o) {
                  var h = n[0], l = t[0], i = [0], p = l;
                  d |= 0;
                  var c = 0, a = l;
                  for (c = 0; c < h; ++c) {
                    var y = s[d] - o, f = s[d + p] - o;
                    y >= 0 != f >= 0 && u.push(i[0] + 0.5 + 0.5 * (y + f) / (y - f)), d += a, ++i[0];
                  }
                };
              };
              k.exports = (e = { funcName: "zeroCrossings" }, function(n) {
                var s = {};
                return function(t, d, u) {
                  var o = t.dtype, h = t.order, l = [o, h.join()].join(), i = s[l];
                  return i || (s[l] = i = n([o, h])), i(t.shape.slice(0), t.data, t.stride, 0 | t.offset, d, u);
                };
              }(r.bind(void 0, e)));
            }, {}], 318: [function(g, k, x) {
              k.exports = function(r, n) {
                var s = [];
                return n = +n || 0, e(r.hi(r.shape[0] - 1), s, n), s;
              };
              var e = g("./lib/zc-core");
            }, { "./lib/zc-core": 317 }] }, {}, [6])(6);
          });
        }).call(this);
      }).call(this, typeof Vi < "u" ? Vi : typeof self < "u" ? self : typeof window < "u" ? window : {});
    }, {}] }, {}, [27])(27);
  });
})(fh);
const $p = /* @__PURE__ */ Kp(fh.exports), ed = {
  displaylogo: !1,
  responsive: !0
}, td = {
  modebar: {
    orientation: "v"
  }
}, ad = /* @__PURE__ */ Hp({
  __name: "Plotly",
  props: {
    plotJson: null,
    responsive: { type: Boolean }
  },
  setup(Yl) {
    const Zs = Yl, v = qp("singleBlockEmbed"), Q = `vega_${Qp()}`, $ = (g) => {
      const { layout: k } = g;
      k && (delete k.autosize, delete k.width, v && delete k.height);
    }, m = async () => {
      Zs.responsive && $(Zs.plotJson), $p.newPlot(Q, {
        data: Zs.plotJson.data,
        layout: {
          ...td,
          ...Zs.plotJson.layout,
          autosize: Zs.responsive
        },
        config: ed,
        frames: Zs.plotJson.frames || void 0
      });
    };
    return Gp(() => {
      m();
    }), (g, k) => (Yp(), Wp("div", {
      "data-cy": "block-plotly",
      class: Zp([
        "bg-white m-auto flex justify-center",
        { "w-full": Zs.responsive, "h-iframe": Xp(v) }
      ])
    }, [
      Jp("div", {
        id: Q,
        class: "w-full"
      })
    ], 2));
  }
});
export {
  ad as default
};
